Rethinking appliance building
I spent the last couple of days rethinking how we go about building the appliance, and the difficulties we have porting that to other Linux distros. I've come up with a much better way that works better and faster on (so far) Fedora and Debian (probably on Ubuntu too, not tried it), and should be much simpler to port to other distros. The current way is to do: +------------------+ +-----------------+ | febootstrap/ | | | | debootstrap | | extract list of | | install packages |---------->| installed files | | in a chroot | | | +------------------+ +-----------------+ ^ | | | | | | V +------------------+ +--------------------------+ | list of | | calculate supermin | | packages | | base image and hostfiles | +------------------+ +--------------------------+ You might be able to see from the way I've drawn the diagram that there is an obvious thing we've been missing: Go directly from the list of packages we want to install, to the supermin appliance base image and hostfiles. In RPM terms, all we need to do is to "rpm -qlp" (find out what files are in the RPMs). +------------------+ +--------------------------+ | list of | ========> | calculate supermin | | packages | | base image and hostfiles | +------------------+ +--------------------------+ This completely eliminates fakeroot, fakechroot, {fe,de}bootstrap, debirf from the equation, and means that we can support any packaging system provided it supports some set of basic operations like downloading packages and listing files from packages. The details are more complex (only a little), but I have reimplemented febootstrap as a general cross-distro supermin appliance building tool, with working backends for YUM/RPM and Debian/APT/dpkg. I'll be pushing patches to implement this over the next few days, so everything will be in flux for a while. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html
The febootstrap 3.0 package is now available: http://people.redhat.com/~rjones/febootstrap/ http://git.annexia.org/?p=febootstrap.git;a=commitdiff;h=66a9d53e48f14d7fe1d... libguestfs 1.7.19 includes a relatively large set of changes to build using febootstrap 3.0: http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=6d75ce8e6ca1f3f0a946... This has been tested on Fedora 14 and Debian 5.05. There are a few issues described below. On Fedora: - The yum dependency resolving script fails if the yum repos are out of date. If you get an error during 'make' which seems to indicate the yum is trying to write to one of the root-owned yum directories, you need to do 'sudo yum update' (don't need to actually install any packages), then repeat the operation. I'll ask the yum maintainers how to fix this. On Debian: - /sbin/insmod.static is not packaged on Debian. febootstrap-supermin-helper needs this in order to build the appliance. I ended up building a version by hand. - qemu is ancient. You need qemu 0.13 from experimental. - kernel 2.6.32 is ancient. You need to upgrade to 2.6.36 from experimental. - udev gives a big scary warning in the appliance about how it is being run interactively (not actually true) and then pauses for 60 seconds. The warning is wrong, but this means that the Debian appliance has an unnecessary 60 second wait during launch. - The test for db_dump / db_load in configure is wrong somehow (not looked at this closely yet). As a result the phony images in images/ cannot be built during 'make check'. - There are a handful of failing tests on Debian. Not looked closely but doesn't seem too serious. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
Another problem with building under Koji (not for normal builds): febootstrap includes the contents of all the RPMs, not just the RPMs we want for the appliance (eg. including all the java-devel RPMs that are used to build the Java bindings but would not be needed in the appliance). This needs a few fixes to febootstrap 3.0 ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html
participants (1)
-
Richard W.M. Jones