#251 closed task

make debian packages of dependencies — at Version 5

Reported by: warner Owned by: zooko
Priority: critical Milestone: 1.1.0
Component: packaging Version: 0.6.1
Keywords: debian Cc:
Launchpad Bug:

Description (last modified by warner)

To release tahoe-0.7.0, we need debian packages of all runtime dependencies that aren't already in debian, so that the tahoe .debs will actually be usable.

That means:

  • zfec-1.3.4
  • pycryptopp-0.2.10
  • foolscap-0.2.3

The zfec package should really depend upon argparse (/usr/bin/zfec requires it), so that means a debian package for argparse too.

Post-0.7.0, if we implement #47 and depend upon pyutil, then we'll need to make debian packages of pyutil-1.3.12 too.

Foolscap comes with its own debian packaging rules: just do 'make debian-feisty' or whatever.

Zooko's packages use setuptools, and I've been using the 'stdeb' utility to turn them into debian packages. It's not trivial. The first step is to install stdeb (perhaps from http://stdeb.python-hosting.com/), then have it generate a .orig.tar.gz, .dsc, and most importantly the .diff.gz debian files. The next step is to unpack the tarball and apply the patch, then run 'debuild -uc -us' or './debian/rules binary' or dpkg-buildpackage (or some other utility that I'm not familiar with) and see if it works. Note that it's best if a copy of the .orig.tar.gz is present in the parent of the working directory, because then debuild has something against which it can generate a new .diff file. Also keep a copy of the stdeb-produced .diff.gz somewhere else, since debuild will probably overwrite the one in the parent directory.

The resulting package must also be inspected to see if it has all the desired files: usually documentation, examples, and README files are missing and/or misplaced. Most importantly, the debian/control file needs to be updated to list all the debian dependencies that the package requires: it can usually figure out C/.so deps by itself, but it can't usually figure out python dependencies. Build-time dependencies also go into debian/control . Edit debian/rules and debian/control until things work the way they ought to, then run 'debuild'/etc again to regenerate the .diff.gz . Then copy the .orig.tar.gz and .diff.gz over to a new directory, unpack/patch/build to make sure it all works. Then the source .orig.tar.gz and .diff.gz get copied to buildslave@hanford:tahoe-debs/dists/DIST/main/source/ , and the .deb file gets copied to main/binary-i386/ .

This needs to be done for each debian/ubuntu release we support: edgy, feisty, gusty, etch, and sid. It would probably be nice to make amd64 versions as well, but we haven't ever done this before and it would require changes to our repository config to actually make them reachable.

The same .diff.gz can probably be used for multiple releases, although several minimum versions probably get recorded in the debian/control files, so if you choose this approach, you might want to run stdeb on our oldest supported platform (which would be edgy) rather than on the newest (sid). Either 1: copy the .orig.tar.gz and .diff.gz to a new host, run debuild, then upload everything to hanford, or 2: copy (on hanford) the .orig.tar.gz and .diff.gz (and .dsc) into DIST/main/source/ for all dists, then go to the debian build host and do 'apt-get update && apt-get source PACKAGENAME', which will grab the source from hanford and unpack it. Doing 'apt-get build-dep PACKAGENAME' will look at the build-time dependencies and install them, which can save a lot of time. If you choose this path, you'll only have to upload the .deb file to hanford.

Once you've added something to tahoe-debs/ , run 'make' in that directory and it will update the index and push a copy out to org.

Once something has been packaged, it is frequently sufficient to apply the old .diff.gz to the new release tarball, add an entry to debian/changelog, modify the version number that stdeb unfortunately embeds in debian/rules, then run debuild.

Debian build hosts:

  • edgy: slave-edgy.allmydata.com (inside the firewall)
  • feisty: tahoeslave-fesity (inside the firewall)
  • gutsy: tahoecs2 (in colo)
  • etch: slave-etch (inside the firewall)
  • sid: fluxx (inside the firewall)

For reference, we use slave3.allmydata.com (in colo) as a dapper buildslave. We test tahoe on dapper but don't produce debian package for it (although I do make foolscap packages for dapper).

Change History (5)

comment:1 Changed at 2008-01-01T00:16:01Z by warner

ok, foolscap-0.2.3 debs have been created for i386 on all releases

comment:2 Changed at 2008-01-01T00:40:49Z by warner

I started to work on the pycrypto debs, but the new pycrypto requires darcsver and setuptools_darcs and stuff, and that got to be too much work, so I think I'll leave it for zooko. I suspect zfec has the same requirements.

comment:3 Changed at 2008-01-01T22:18:22Z by zooko

"To release tahoe-0.7.0, we need debian packages of all runtime dependencies that aren't already in debian, so that the tahoe .debs will actually be usable. ... This needs to be done for each debian/ubuntu release we support: edgy, feisty, gusty, etch, and sid."

Okay, I've just spent some time learning how to to this -- thank you, Brian, for the extensive notes -- and it seems like packaging things for Debian is a lot of work.

Could we de-prioritize this for v0.7.0?

My general strategy for Tahoe until now has been not to offer binaries, because that's more work for us, and I don't mind if Tahoe v0.7.0 is available only to that subset of people who are willing to build from source, and I would like to spend our development effort on improving the build-from-source process. (Which still needs a lot of work, as we speak.)

My intent had been to make Tahoe v0.7.0 more easily installable from source (and we've succeeded -- see the new install.html), and then to start offering binary packages in Tahoe v0.7.1.

When it is time for us to spend the development resources to support binary distributions, then my priorities for platforms to support would be: 1. Whatever Zandr wants to deploy Tahoe on (I guess that is Gutsy), 2. Windows, which would potentially help Mike, Dmitry, Greg Hazel, Fabrice (?), Peter, Richard Samantha, and lots of other people, 3. whatever platform Richard Samantha has in his lab. 4. More Debian-likes not already supported for Zandr as number 1 above, 5. Mac OS X (note that allmydata.com receives frequent requests for a Mac client).

So I accept responsibility for increasing the work-load of making Debian packages by my choice of how to split up Python packages. Part of my justification for doing that is that it decreases the work-load for development and for making Python packages, which is the kind of trade-off that led me to focus on source packaging this time around.

So I'm willing to spend my time and effort to support Debian, which is a platform that I love and which I consider very important, but I would like to prioritize other things (The Roadmap) over this issue for v0.7.0.

By the way, both darcsver and setuptools_darcs are build requirements, not install requirements, so presumably we don't need to produce .deb's for them. Hopefully that will make things easier.

comment:4 Changed at 2008-01-02T18:46:39Z by warner

Could we de-prioritize this for v0.7.0?

I'm willing to accept that (although I can't say I'm happy about the regression). The consequences are:

  • production nodes (testnet, perfnet, loadnet, i.e. tahoebs1-5 and tahoecs2) will be unable to run from debian packages, and must therefore run from source. I'm unwilling to have production machines using code installed via easy_install, and I'm reluctant to have them use code from /usr/local : these machines are a test case for how Zandr would deploy servers, so if we're not going to run them from debian packages, the remaining option which is the easiest to keep straight and to clean up after is running from a local source tree.
  • we should stop updating our APT repository with new Tahoe .debs, since they are unusable, and older ones (before these new dependencies went in) are more usable than the new ones. In fact we should figure out what the last known usable version is, and remove any .debs produced after that date. Of course we should keep the buildbot .deb builder running.. we can just turn off the automatic mirror-to-org script. We should also update the .deb making code in our tree to express the new dependencies, so that anyone who *does* try to use them gets a clear install error rather than a cryptic runtime error.

Both of those are pretty easy to manage. So, ok, 0.7.0 will not have functional .debs, but the first thing we do for 0.7.1 should be to make these work again.

comment:5 Changed at 2008-01-02T18:53:18Z by warner

  • Description modified (diff)
  • Milestone changed from 0.7.0 to 0.7.1
  • Owner changed from somebody to zooko

oh, and I concur that darcsver and setuptools_darcs do not require debian packages, as long as they are buildable in the Desert Island mode: the debian/rules code that build the tahoe .deb will need to build these as well, to figure out the version number that should be put into the debian/changelog (and thus determine the .deb's version number).

Note: See TracTickets for help on using tickets.