← Back to team overview

dailydebs-team team mailing list archive

Re: Déjà Dup's daily script

 

On Sun Aug 23 15:58:19 +0100 2009 Michael Terry wrote:
> 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.

Hi Michael,

Thanks for this, very interesting. Sorry it's taken a while to
respond, but Feature Freeze got in the way.

> 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.

Interesting.

There are two possible features that might be of use here.

  * I want to provide a command that works on groups of recipes (cookbooks),
    which takes care of the for-loop.
  * The recipe format is designed to allow derivation, so you can point
    to a recipe from another, and then just modify it as needed (including
    doing nothing), so that would take care of the repetition.
    There are some unanswered questions, such as how do you refer to another
    recipe?

> 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/*/* ."

What is $EXTRACTDIR here? Is it expected to be set when you use the recipe?
That would be fragile.

Are the last two lines because "make dist" doesn't include the debian
directory in the tarball?

> 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.

This is something that has also come up in bzr-builddeb, as it can
also have a need to go from bzr branch -> tarball, which can be
done in many different ways.

I'm not sure what a standard interface would look like that could
accomodate this, but having one would allow things like this to be done.

In your example I'm not sure what would be done by "make dist" that
wouldn't be done by "make c" or whatever. Going through the tarball
seems to be an unncessary step there.

Thanks,

James



Follow ups

References