← Back to team overview

dailydebs-team team mailing list archive

Déjà Dup's daily script

 

After being inspired by Jorge, I decided to sit down and make a
dailydeb script for my pet project, Déjà Dup [1].  There are a couple
oddities about Déjà Dup's build process that caused me to write a
somewhat complicated script, and I thought I'd share it with you.

In addition to a daily build, I wanted the ability to create builds
for more than one distribution at a time, so I wrote a bit of a
meta-recipe.  You can see the script from bzr [2] but it's attached
too.

Basically, the gist of the script is that it runs over a list of
distribution names and writes a recipe for each one and calls dailydeb
for each distribution.  It would be neat if dailydeb had built-in
support for this.

Secondly, because of how Déjà Dup is built (generates C code from Vala
in bzr and ships that, as well as additional build dependencies for
building-from-bzr vs building-from-a-tarball), I found it easier to
build a dist tarball from bzr and then use that to build the daily
deb.  Theoretically, I prefer this approach anyway because it means
there's only one path to consumable code -- it always goes through a
'make dist'.  So what I did here was write a recipe like:

lp:deja-dup
run ./autogen.sh
run make && make dist
run tar xj -C $EXTRACTDIR -f *.tar.bz2 && cp -r debian $EXTRACTDIR/*/
run rm -r * && mv $EXTRACTDIR/*/* ."

(The extra make call is because of a bug in my automake scripts,
usually 'run make dist' should be enough.)

I think this is an interesting and complicated enough pattern
(creating a dist tarball) that it would be nice if dailydeb had
built-in support for it as well.  Maybe there are too many variables
to make it as easy as one flag (--make-dist), but I think building a
dist tarball is the Right Way for projects that normally distribute
full tarballs upon release.

[1] https://launchpad.net/deja-dup
[2] http://bazaar.launchpad.net/~deja-dup-team/deja-dup/trunk/annotate/head%3A/debian/recipe

-mt

Attachment: recipe
Description: Binary data


Follow ups