[pkg-go] Building golang-github-google-btree from its git repo

Matthew Dawson matthew at mjdsystems.ca
Mon Oct 19 03:39:35 UTC 2015


On October 19, 2015 12:50:30 PM you wrote:
> Hi Matthew,
> 
> On Sunday 18 October 2015 20:57:31 Matthew Dawson wrote:
> > I'm working on building a copy of etcd for Jessie, as part of my work to
> > get Kubernetes on my Jessie system
> 
> Why? Etcd is as a statically linked binary so you do not need to re-build it
> for Jessie. Just use the package from "testing" as is. You can use Apt-
> Pinning technique to allow list of certain packages to be installed from
> "testing".
I generally avoid this method only because eventually I find packages that 
start requiring newer versions of core packages that I don't want to pull and 
keep up to date constantly.  In the past I usually got away with what was 
available in Wheezy, but this time I have a huge dependency list.

If etcd (and Kubernetes in the future) can keep its runtime dependencies 
Jessie friendly, I wouldn't have an issue doing as you suggest.  If not, you 
could consider this a start on a backports effort :)

> 
> > (I saw the ITP, and would be happy to help if possible).
> 
> Thanks. I think Kubernetes is strategically important for Debian as we may
> be losing our audience to inferior RHEL/CentOS because Debian is not yet
> enterprise-container-ready...
> 
> I've made some progress with Kubernetes packaging -- a lot of effort!
> I've taken care of build system, init/systemd scripts, man pages and some of
> the dependencies. I'm planning to publish first draft of the packaging
> before end of the week. However there are many dependencies are due to be
> packaged. Here is the incomplete list:
> 
> 		bitbucket.org/ww/goautoneg
> 		speter.net/go/exp
> 		github.com/beorn7/perks
> 		github.com/codegangsta/negroni
> 		github.com/daviddengcn/go-colortext
> 		github.com/dgrijalva/jwt-go
> 		github.com/elazarl/go-bindata-assetfs
> 		github.com/emicklei/go-restful
> 		github.com/evanphx/json-patch
> 		github.com/ghodss/yaml
> 		github.com/golang/groupcache
> 		github.com/google/gofuzz
> 		github.com/imdario/mergo
> 		github.com/juju/ratelimit
> 		github.com/mitchellh/mapstructure
> 		github.com/rackspace/gophercloud
> 		github.com/shurcooL/sanitized_anchor_name
> 		github.com/skynetservices/skydns
> 		github.com/xyproto/simpleredis
> 
> I can't package 'em all alone so any help with packaging of the above
> software would be much appreciated. I might be available for sponsorship. ;)
I'm happy to help in any way I can.  I haven't dug into Debian packaging 
before, so I figured I'd start on etcd and move on to Kubernetes after.  Is 
there any specific method you'd want me to follow to work on those packages?  
I was going to start with one of the other Go packages as a template, so if 
you can point me at a good example I can try starting from there.  I do want 
to finish dealing with etcd first, so that I can start Kubernetes once its 
ready.

> 
> Some other dependencies (e.g. cadvisor,
> golang-github-fsouza-go-dockerclient) are almost ready and waiting for
> "runc" which is stuck in NEW queue...
> > As part of this, I've been trying to build all of
> > etcd's dependencies for Jessie as well.
> 
> I hope that you do not have to do that.
I'm doing this mostly to get the build system as clean of a Jessie system as 
possible.  It may not be necessary, but so far it hasn't been too much of an 
issue.

> 
> > I'm attempting to do this from
> > their git repositories, so I can point an instance of Jenkins at the
> > repositories and trigger builds automatically whenever there is an update.
> 
> OK. Just curious, you are building from repository instead of "apt-get
> source" to trigger automatic re-build?
Yes, I'm building from the repository, not "apt-get source".  Mostly for ease 
of Jenkins integration.

> 
> > I managed to get to golang-github-google-btree, but I can't get it to
> > compile.
> 
> ??
> 
> > Looking at its repository, I noticed it is missing the usual
> > debian/* tag,
> 
> Tagged, thanks for reminder.
> 
> > and attempting to build master with git-buildpackage always
> > fails as it can't find the go files.  Is there a push missing for this
> > package to allow it to build? Or do I need to pass an argument to gbp to
> > work with this repository?
> 
> Everything is up-to-date and I believe that build problem is a
> misconfiguration of GBP. This particular repository layout ("master" for
> packaging; "upstream"/"pristine-tar" for upstream) is compatible with git-
> buildpackage as long as you have something like the following in your
> "~/.gbp.conf" file (as far as I remember):
> 
> ~~~~
>     [git-buildpackage]
>     tarball-dir = ../
> ~~~~
I tried adding that, but it didn't seem to help.  It seems gbp doesn't like 
this repository format by default, as it assume the upstream files are 
available.  Making it use git-pbuilder does fix it, as it builds everything 
from the tar archive.  Google doesn't seem to talk much about this.

I'll keep poking at this, but any other suggestions would be appreciated.

> 
> > Alternately, is this just not a supported method to build these packages?
> 
> I have no idea what "supported method" of building packages is. I usually
> build using "pbuilder" but I reckon any other method is good as long as it
> suits you...
"supported method" is whatever the maintainers say it is.  If you say gbp 
should work, I'll keep at it.

> 
> > Would I be better off teaching Jenkins about Debian's archive format? 
> > This
> > seemed like a much more intensive approach, so I don't want to do this if
> > I don't have too.
> 
> Sorry, I know nothing about Jenkins...
No problem, if gbp should work against the git repository, then Jenkins 
shouldn't affect it.  Jenkins just triggers builds when the git repository 
changes.

> 
> > For reference, I've so far used the command:
> > git-buildpackage --git-ignore-branch --git-no-pristine-tar
> > --git-export-dir=./ output-deb --git-builder='dpkg-buildpackage -rfakeroot
> > -D -us -uc -i -I' to build the other packages.  Each build happens in a
> > Jessie Docker container.
> 
> I do not use git-buildpackage so I can't comment whether command is
> correct...
Ok, for reference what do you run to build from the git repository?  That 
might help me get this going.

Thanks,
-- 
Matthew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-go-maintainers/attachments/20151018/9088822a/attachment-0001.sig>


More information about the Pkg-go-maintainers mailing list