Bug 1018007 - etcd third-party libs need to be broken out into individual (upstream-based packages)
etcd third-party libs need to be broken out into individual (upstream-based p...
Product: Fedora
Classification: Fedora
Component: etcd (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Luke Cypret
Fedora Extras Quality Assurance
Depends On: 1018476 1018477 1018478 1018479 1018480 1018481 1018534
  Show dependency treegraph
Reported: 2013-10-10 20:43 EDT by Matthew Miller
Modified: 2013-10-20 06:18 EDT (History)
3 users (show)

See Also:
Fixed In Version: etcd-0.1.2-5.fc21
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-20 05:29:18 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matthew Miller 2013-10-10 20:43:49 EDT
The Fedora packaging guidelines call for splitting all third-party code into separate packages based on the upstream. We need to do this in etcd.

We're still working out how to do this in Go -- see https://fedoraproject.org/wiki/PackagingDrafts/Go, and the Docker spec file http://pkgs.fedoraproject.org/cgit/docker-io.git/tree/docker-io.spec for an example (although to be absolutely clear we don't actually have everything figured out yet).

Anyway, all  the stuff in third_party should be separate golang-* RPMs. Except maybe third_party/github.com/coreos/go-etcd -- I'm not sure what that's all about.
Comment 1 Matthew Miller 2013-10-10 21:02:39 EDT
Third party deps are


We do have go.net packaged as golang-googlecode-net.

go-raft is forked from https://github.com/goraft/raft, but described as "mainly a staging repo before being merged upstream". We should probably focus on the upstream.

The other stuff we'll have to figure out. :)
Comment 2 Lokesh Mandvekar 2013-10-10 21:09:46 EDT
I'm cool with taking any or all of these, unless there's any disagreement :)
Comment 3 Lokesh Mandvekar 2013-10-10 21:21:31 EDT
I'm going ahead with all of them. If anyone wants to join in the fun, we can co-maintain :)
Comment 4 Luke Cypret 2013-10-11 10:45:32 EDT
Lokesh, thanks! I just got pinged from release monitoring that etcd has a new version as of yesterday so I'll work on that.
Comment 5 Matthew Miller 2013-10-11 10:59:06 EDT
Awesome -- thanks Lokesh. We'll make the review requests for the deps block this bug, which can serve as a tracker.

The specfile for etcd itself will also need to change. Either patch the build script to not include the third_party/* loop, or else just remove everything in that directory before building. And we'll need to set GOPATH to not just PWD but that plus %{_datadir}/gocode. (See the docker-io.spec). It might just be easiest to duplicate the part of the build script in %build in the specfile, modified for our conventions. (Again, that's basically what we did in Docker.)
Comment 6 Matthew Miller 2013-10-11 11:05:02 EDT
So, with the above, the %build section might look something like this. This version tries to follow the existing build script, modified in several places. We could also skip all of their variable-building and just do it directly -- that might be cleaner (and more like what we're doing in the docker-io.spec). But here's a start.

export GOPATH=${PWD}:%{gopath}
ETCD_BASE=$(dirname ${ETCD_DIR})
mkdir -p ${ETCD_BASE}
ln -s ../../../ ${ETCD_DIR}

./scripts/release-version > release_version.go

go build -v -a ${ETCD_PACKAGE}


and note that gopath would (currently -- eventually it might be in the golang package itself) be defined at the top of the spec file, like

%global gopath  %{_datadir}/gocode
Comment 7 Matthew Miller 2013-10-11 11:05:55 EDT
Oh, wait -- that "release-version" script doesn't work -- it uses "git describe --tags HEAD", and the tarball isn't a git tree. So we'll need to do something else there.
Comment 8 Peter Lemenkov 2013-10-12 03:25:48 EDT
(In reply to Luke Cypret from comment #4)
> Lokesh, thanks! I just got pinged from release monitoring that etcd has a
> new version as of yesterday so I'll work on that.

Hello Luke!
I already started bulding it, so no need to worry. I also added proper integradion with systemd (socket activation and all ncessary RPM stuff).
Comment 9 Luke Cypret 2013-10-13 23:29:47 EDT
Thanks Peter, I'm reviewing your SRPM to see your changes. Once all of the other go packages get pushed to stable I'll fix etcd for the unbundled packages in a new release. Currently they are all in package review.
Comment 10 Peter Lemenkov 2013-10-20 05:29:18 EDT
Ok, thanks to Lokesh we finally did it! Since etcd-0.1.2-5.fc21 it doesn't use any bundled libs but instead uses system-wide ones.

I don't think we should hurry up and rebuild etcd for F19 and F20 since it doesn' add up any value to the end users, but we'll eventually rebuild etcd in these branches w/o bundled libs as well.

I'm going to close this as "CLOSED/RAWHIDE".

Note You need to log in before you can comment on or make changes to this bug.