Hi, as our manpower does not increase with the number of packages we maintain we need to improve our efficiency. I have thus created a few helpful scripts in our tools repository, http://darcs.debian.org/darcs/pkg-haskell/tools/ In the following, repos/ is a directory containing all our packaging repositories and them only, i.e there is a repos/ghc/control file. === mass-change === $ ./mass-change.sh Usage: ./mass-change.sh <message> '<action>' dirs... Runs <action> in each given directory; commits with <message> if <action> had an effect. Does not push, so you can fix your mess afterwards. Example: This is how I did the recent mass changes: ~/debian/pkg-haskell/tools/mass-change.sh 'Depend on haskell-devscripts 0.8.13 to ensure this packages is built against experimental' 'sed -i "s,haskell-devscripts (>=[^)]*),haskell-devscripts (>= 0.8.13)," control' repos/* ~/debian/pkg-haskell/tools/mass-change.sh 'Bump standards version, no change' 'sed -i "s,Standards-Version: .*,Standards-Version: 3.9.4," control' * If you make sure your action is idempotent then this is very safe, as it only creates a changelog entry when something has changed. === mass-release === $ ./mass-release.sh Usage: ./mass-release.sh [-D distribution] dirs... Calls debchange -r on all repos that are not already released (i.e. distribution is UNRELEASED). === mass-build === $ ./mass-build.sh Usage: ./mass-build.sh <results/> dirs... Check each directory whether it is marked for release (distribution set) but not tagged with the latest version. Those packages will be built with sbuild inside the given chroot. The result will be stored in the second directory passed. Also, all packages in this directory are made available as a repository inside the chroot. If the build is sucessful, it runs "debcommit -r" in the repository to create the correct tag. Until http://bugs.debian.org/608840 is fixed you have to ensure that results/ is set up as an apt source in the source schroot. This script will however keep Packages and Sources up-to-date. For this to work the schroot should have Apt::Get::AllowUnauthenticated 1; set, e.g. in a file named /etc/apt/apt.conf.d/unauthenticated. I’m running this at the moment. It does not upload or push anything, but I will then probably do something like $ for changes in build/*changes; do debsign $changes && dput $changes && rm $changes; done $ for repo in repos/*; do darcs push -a -v --repodir=$repo; done The latter script uses these two possibly generically useful scripts: === debian2dsc === $ ./debian2dsc.sh Usage: ./debian2dsc.sh [dir ...] Expects directories containing the contents of the debian/ directory of a Debian source package (i.e. control, changelog, watch, ...). Uses the watch file to retrieve the upstream tarball (unless it already exists in the local directory), creates a debian.tar.gz tarball from the given directory (ignoring the ususal suspects like _darcs and *~) and creates a corresponding .dsc file; all without unpacking the upstream tarball. This is of course only safe if the person checking in the new version number into the repository (by changing the version in the changelog) did things like update build dependencies and refreshed patches. === order-sources === $ ./order-sources.pl Usage: ./order-sources.pl <dir / control / dsc>... Each argument is expected to be a Debian source package directory; the debian directory in a Debian source package directory the control file or the .dsc file of a Debian source. These will be ordered by “obvious” build-dependencies and printed out again. Feel free to use and improve the scripts, also outside the DHG of course. Greetings, Joachim -- Joachim "nomeata" Breitner Debian Developer nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata
Attachment:
signature.asc
Description: This is a digitally signed message part