Various fixes to the build system, add 'make test-boot-image' target.
authorRichard Jones <rjones@redhat.com>
Wed, 1 Apr 2009 11:57:45 +0000 (12:57 +0100)
committerRichard Jones <rjones@redhat.com>
Wed, 1 Apr 2009 11:57:45 +0000 (12:57 +0100)
Makefile.am
README
configure.ac
daemon/Makefile.am
daemon/configure.ac

index cbc4c59..154347f 100644 (file)
@@ -15,6 +15,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
+ACLOCAL_AMFLAGS = -I m4
+
 SUBDIRS = src daemon examples
 
 EXTRA_DIST = make-initramfs.sh
 SUBDIRS = src daemon examples
 
 EXTRA_DIST = make-initramfs.sh
@@ -26,16 +28,35 @@ EXTRA_DIST = make-initramfs.sh
 
 fsdir = $(libdir)/guestfs
 
 
 fsdir = $(libdir)/guestfs
 
-fs_DATA = initramfs.$(REPO).$(host_cpu).img vmlinuz.$(REPO).$(host_cpu)
+INITRAMFSIMG = initramfs.$(REPO).$(host_cpu).img
+VMLINUZ = vmlinuz.$(REPO).$(host_cpu)
+
+fs_DATA =  $(INITRAMFSIMG) $(VMLINUZ)
 
 
-$(fs_DATA): make-initramfs.sh.in daemon/guestfsd
+$(VMLINUZ) $(INITRAMFSIMG): initramfs.timestamp
+
+initramfs.timestamp: make-initramfs.sh.in daemon/guestfsd
+       rm -f $@
        $(builddir)/make-initramfs.sh
        $(builddir)/make-initramfs.sh
+       touch $@
 
 .PHONY: daemon/guestfsd
 
 # Make clean.
 
 
 .PHONY: daemon/guestfsd
 
 # Make clean.
 
-CLEANFILES = $(fs_DATA)
+CLEANFILES = $(fs_DATA) initramfs.timestamp
 
 clean-local:
        rm -rf initramfs
 
 clean-local:
        rm -rf initramfs
+
+# Test-boot the image.
+
+test-boot-image:
+       rm -f emptydisk
+       dd if=/dev/zero of=emptydisk bs=1024 count=1440
+       echo 0, | sfdisk -C 80 -H 2 -S 18 emptydisk
+       qemu-system-$(host_cpu) \
+         -m 384 \
+         -kernel $(VMLINUZ) -initrd $(INITRAMFSIMG) \
+         -hda emptydisk -boot c
+       rm -f emptydisk
diff --git a/README b/README
index a017249..369295c 100644 (file)
--- a/README
+++ b/README
@@ -63,6 +63,7 @@ these commands as root:
 
   make install
 
 
   make install
 
+
 Notes on cross-architecture support
 ----------------------------------------------------------------------
 
 Notes on cross-architecture support
 ----------------------------------------------------------------------
 
@@ -72,12 +73,27 @@ operations and NFS export will work fine, but running commands in
 guests may not be possible.
 
 To enable this requires work for cross-architecture and 32-on-64
 guests may not be possible.
 
 To enable this requires work for cross-architecture and 32-on-64
-support in febootstrap.
+support in febootstrap, fakeroot and fakechroot.
 
 The daemon/ directory contains its own configure script.  This is so
 that in future we will be able to cross-compile the daemon.
 
 
 
 The daemon/ directory contains its own configure script.  This is so
 that in future we will be able to cross-compile the daemon.
 
 
+Mirroring tip
+----------------------------------------------------------------------
+
+Having a local Fedora mirror makes a massive difference to the time it
+takes to build and rebuild initramfs images.
+
+Failing that, use squid to cache yum downloads, but read this first:
+https://lists.dulug.duke.edu/pipermail/yum/2006-August/009041.html
+(In brief, because yum chooses random mirrors each time, squid doesn't
+work very well with default yum configuration.  To get around this,
+choose a Fedora mirror which is close to you, set this with
+'./configure --with-mirror=[...]', and then proxy the whole lot
+through squid by setting http_proxy environment variable).
+
+
 Copyright and license information
 ----------------------------------------------------------------------
 
 Copyright and license information
 ----------------------------------------------------------------------
 
index 297ae99..4e71dde 100644 (file)
@@ -17,6 +17,9 @@
 
 AC_INIT([libguestfs],[0.2])
 AM_INIT_AUTOMAKE
 
 AC_INIT([libguestfs],[0.2])
 AM_INIT_AUTOMAKE
+
+AC_CONFIG_MACRO_DIR([m4])
+
 AC_PROG_LIBTOOL
 
 dnl Check for basic C environment.
 AC_PROG_LIBTOOL
 
 dnl Check for basic C environment.
index 686f4b6..a5c1637 100644 (file)
@@ -14,3 +14,5 @@
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ACLOCAL_AMFLAGS = -I m4
\ No newline at end of file
index 59ed51e..af0a78a 100644 (file)
@@ -18,6 +18,8 @@
 AC_INIT([libguestfs-daemon],[0.2])
 AM_INIT_AUTOMAKE
 
 AC_INIT([libguestfs-daemon],[0.2])
 AM_INIT_AUTOMAKE
 
+AC_CONFIG_MACRO_DIR([m4])
+
 dnl If the user specified --enable-32bit, then force the C compiler
 dnl to build 32 bit binaries (gcc -m32).
 AC_ARG_ENABLE([32bit],
 dnl If the user specified --enable-32bit, then force the C compiler
 dnl to build 32 bit binaries (gcc -m32).
 AC_ARG_ENABLE([32bit],