PPA management tools

We use PPA’s quite heavily in OpenStack. Each of the core projects have a trunk PPA and a milestone-proposed PPA. Every commit to our bzr trunk branch results in an upload to the trunk PPA, and every commit to our milestone-proposed bzr branch results in an upload to (you guessed it) the milestone-proposed PPA. Additionally, we have a common openstack-release PPA for each of our major releases, where we combine all the projects into one PPA, for simpler distribution.

This poses a number of challenges.

We support every Ubuntu release since Lucid, but most of them lack new enough versions of various stuff (and in some cases, the packages are missing altogether). This means we backport a bunch of things to the various trunk PPA’s, and at the right moments we need to copy all these dependencies either from the trunk PPA to the milestone-proposed PPA (when we branch off for a new milestone) or from the milestone-proposed PPA to the common release PPA (at final release time).

This used to involve a lot of mucking around with Launchpad’s web UI which is not only boring and tedious (checking half a bajillion boxes is even less fun than it sounds), but also error prone, since it’s all manual.

I decided to write a number of tools to help make this simpler. So far, these tools are:

  • copy-ppa-pkg.py

    Simply copies a package from one PPA to another.

  • detect_ppa_mismatches.py

    This one takes a number of PPA’s as arguments, and finds packages that exist in more than one of them, but at different versions. During the development cycle, this is not much of a problem since most people only run the trunk version of a single project, but when we shove them all together in one great, big PPA, it could mean that one of the projects suddenly is being run against another version of one of its dependencies than during the dev cycle.

  • sync-ppas.py

    This one takes all the packages from one PPA and copies them to another and removes stuff from the destination PPA that’s been removed from the source PPA. It’s handy if have a PPA with all your stuff in it, it’s all been QA’ed together and is in good shape, and you want to sync it all over into a “stable” PPA in one fell swoop.

  • list-ppa.py

    Lists the contents of a PPA. Simple as that.

I’ve branched lp:ubuntu-archive-tools and added these tools to lp:~openstack-release/ubuntu-archive-tools/openstack. I can’t really decide if I think they belong inlp:ubuntu-archive-tools, but if someone else wants them I can look into getting them merged back.

5 thoughts on “PPA management tools

  1. Cody A.W. Somerville

    Except for detect_ppa_mismatches.py, I’ve also written scripts to perform these functions. I regret not sharing them now as I may have been able to spare you some trouble. :-)

    I also wrote some scripts to manage upload permissions to PPAs (its possible via the launchpadlib API to grant upload permissions to individuals or teams without requiring membership in the team owning the PPA).

    I wish there was something equivalent to http://djangosnippets.org/ for Launchpad scripts.

    FYI, You might be interested in utilizing a tool called reprepro in conjunction with PPAs to provide more advanced archive management capabilities. It has features that could help with some of the problems/tasks you have, can mirror remote archives, has features that let you propagate packages between suites, etc.

  2. Soren Post author

    I also submitted a patch against edit_acl.py to make it work with PPA’s. I forgot to mention that. It works quite well.

    I used reprepro in the past, but I don’t see how it can be used in conjunction with PPA’s? If I’m setting up a repository myself, setting up a buildd isn’t that much extra work (and would completely resolve any issues with build queues), so I don’t see the motivation to stitch them together.

  3. Benjamin

    Ok, then they could fit into ubuntu-dev-tools if they have a man page.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>