Ubuntu live filesystem builds moved to live-build

Colin Watson cjwatson at ubuntu.com
Mon Jun 13 22:38:38 UTC 2011

I've moved Ubuntu's live filesystem build process over from our original
custom shell script in livecd-rootfs to the newer live-build system from
Debian (formerly called live-helper).  Thanks in particular to Daniel
Baumann for guidance and for speedy upstream patch integration, and to
LaMont Jones for deployment assistance.

This only affects Oneiric and later releases.  Live filesystem builds
for previous releases will continue to use livecd-rootfs.

Developers who have not needed to modify livecd-rootfs in the past
should have no more need to modify it now than before; it still uses
tasks in much the same way to decide which packages should be installed.
However, people working on Ubuntu live filesystems will need to know how
the new build process is laid out.  I needed to have somewhere to put
configuration anyway, so I repurposed the livecd-rootfs package for
that, using auto/* files along the lines of
http://live.debian.net/manual/en/html/managing-a-configuration.html.  I
expect that the exact details may change here as we gain more experience
with live-build.  Briefly, the current way to reproduce an Ubuntu live
filesystem build is to do this in a scratch directory:

  Once only:
    $ mkdir -p auto
    $ ln -sf /usr/share/livecd-rootfs/live-build/auto/* auto/

  Each time:
    $ export PROJECT=ubuntu SUITE=oneiric ARCH=i386
    $ sudo lb clean
    $ lb config
    $ sudo lb build

There were a handful of changes in ubiquity 2.7.6 to cope with slight
differences in manifest files and sources.list generation.  These only
make a difference if you're producing installable live CDs.

If you are modifying the live build process for Ubuntu, please remember
that we are now working with an upstream codebase: the days of hacking a
couple of special-purpose lines into livecd-rootfs are over.  While we
do have three outstanding patches against upstream right now, they have
all been submitted as Debian bug reports (if it's any guide, there were
seven outstanding when I started drafting this mail!), and my goal is,
if at all possible, to be using an unpatched version of live-build from
Debian by the time we release Oneiric.  Instead of perpetrating
Ubuntu-specific hacks, please consider these alternatives:

 * live-build has lots and lots of options, and in many cases you can do
   what you need by tweaking those.

 * Patch live-build to do what you need, send your patch as a Debian
   bug, and engage in upstream discussion if necessary.  Note that, if
   need be, you can guard your code with [ "${LB_MODE}" = ubuntu ].

 * If necessary, there are various hook script facilities that you can
   use: for example, scripts in config/chroot_local-hooks/ are run in
   the chroot near the end of the chroot build process.  Try to keep
   this to a minimum, though; I'm trying to avoid using hook scripts in
   builds for Ubuntu proper, as it would be better for live-build to do
   the right thing out of the box without the need for hooks.  Right
   now, the only hook script I'm using is one to remove icon-theme.cache
   from Kubuntu images.

If you have any questions about the Ubuntu integration here, please ask.


Colin Watson                                       [cjwatson at ubuntu.com]

More information about the ubuntu-devel mailing list