diff --git a/README b/README index e1a911a22..7a503465f 100644 --- a/README +++ b/README @@ -61,7 +61,9 @@ The full requirements are described below. | | | | - virtio-block | | | | | - virtio-net | +--------------+-------------+---+-----------------------------------------+ -| febootstrap | 3.20 | R | This is required on all distros. | +| supermin | 4.1.0 | R | This is required on all distros. | +| febootstrap | 3.20 | | 'supermin' is the new name for | +| | | | 'febootstrap'. | | | | | For alternatives, see: | | | | | libguestfs.org/download/binaries/appliance/ | | | | febootstrap 2.x WILL NOT WORK | diff --git a/TODO b/TODO index 295bcfe89..959d44930 100644 --- a/TODO +++ b/TODO @@ -427,7 +427,7 @@ Launch remote sessions over ssh ------------------------------- We had an idea you could add a launch method that uses ssh, ie. all -febootstrap and qemu commands happen the same as now, but prefixed by +supermin and qemu commands happen the same as now, but prefixed by ssh so it happens on a remote machine. Note that proper remote support and integration with libvirt is diff --git a/appliance/libguestfs-make-fixed-appliance.pod b/appliance/libguestfs-make-fixed-appliance.pod index 4b2309875..32d9ca138 100644 --- a/appliance/libguestfs-make-fixed-appliance.pod +++ b/appliance/libguestfs-make-fixed-appliance.pod @@ -18,7 +18,7 @@ appliance for libguestfs. B. The only reason to use it is if you want to make a self-contained libguestfs appliance that can be copied to another machine or platform -that doesn't support L. To understand why you might +that doesn't support L. To understand why you might need to use this tool, read the section L below. Instead of running this tool, you can download fixed appliances from @@ -107,21 +107,21 @@ looking for an appliance. The path is built into libguestfs, or can be set using the C environment variable. Normally a supermin appliance is located on this path (see -L). libguestfs reconstructs this -into a full appliance by running L. +L). libguestfs reconstructs this +into a full appliance by running L. However, a simpler "fixed appliance" can also be used. libguestfs detects this by looking for a directory on the path containing four files called C, C, C and C (note the C file must be present as well). -If the fixed appliance is found, libguestfs skips febootstrap entirely +If the fixed appliance is found, libguestfs skips supermin entirely and just runs qemu with the kernel, initrd and root disk from the fixed appliance. Thus the fixed appliance can be used when a platform or Linux distro -does not support febootstrap. You build the fixed appliance on a -platform that does support febootstrap, and copy it over, and use that +does not support supermin. You build the fixed appliance on a +platform that does support supermin, and copy it over, and use that to run libguestfs. =head1 LICENSING @@ -144,8 +144,8 @@ libguestfs, please see the L manual page. =head1 SEE ALSO L, -L, -L, +L, +L, L, L, L. diff --git a/appliance/make.sh.in b/appliance/make.sh.in index e7994e604..50c60f174 100755 --- a/appliance/make.sh.in +++ b/appliance/make.sh.in @@ -27,15 +27,15 @@ while read regexp <&5; do done exec 5<&- -# Run febootstrap on the package list. +# Run supermin on the package list. # NB: Keep using --yum-config (deprecated alias) here since both old -# and new febootstrap still support it. -if [ "x@FEBOOTSTRAP_PACKAGER_CONFIG@" != "xno" ]; then - extra="--yum-config @FEBOOTSTRAP_PACKAGER_CONFIG@" +# and new supermin still support it. +if [ "x@SUPERMIN_PACKAGER_CONFIG@" != "xno" ]; then + extra="--yum-config @SUPERMIN_PACKAGER_CONFIG@" fi -echo @FEBOOTSTRAP@ -v -o supermin.d --names $(< packagelist ) $excludes $extra -@FEBOOTSTRAP@ -v -o supermin.d --names $(< packagelist ) $excludes $extra +echo @SUPERMIN@ -v -o supermin.d --names $(< packagelist ) $excludes $extra +@SUPERMIN@ -v -o supermin.d --names $(< packagelist ) $excludes $extra # Remove some things that we don't want in the appliance. This is # copied from the old febootstrap-minimize. However minimization is diff --git a/configure.ac b/configure.ac index 44a2ac686..62a2fda20 100644 --- a/configure.ac +++ b/configure.ac @@ -402,39 +402,55 @@ AC_ARG_ENABLE([appliance], AM_CONDITIONAL([ENABLE_APPLIANCE],[test "x$enable_appliance" = "xyes"]) AC_MSG_RESULT([$enable_appliance]) -dnl Check for febootstrap >= 3.0 -AC_CHECK_PROG([FEBOOTSTRAP], - [febootstrap],[febootstrap],[no]) +dnl Check for supermin >= 4.1.0 or febootstrap >= 3.20. +AC_CHECK_PROGS([SUPERMIN], + [supermin febootstrap],[no]) +AC_CHECK_PROGS([SUPERMIN_HELPER], + [supermin-helper febootstrap-supermin-helper],[no]) -dnl Pass a febootstrap --yum-config option. +dnl Pass supermin --packager-config option. dnl -dnl Note that in febootstrap >= 3.21, this option is now called -dnl --packager-config, although --yum-config can still be used -dnl as a deprecated alias. +dnl Note that in febootstrap >= 3.21 / supermin >= 4.1.0, this option +dnl is now called --packager-config, although --yum-config can still +dnl be used as a deprecated alias. +SUPERMIN_PACKAGER_CONFIG=no + +AC_MSG_CHECKING([for --with-supermin-packager-config option]) +AC_ARG_WITH([supermin-packager-config], + [AS_HELP_STRING([--with-supermin-packager-config=FILE], + [pass supermin --packager-config option @<:@default=no@:>@])], + [SUPERMIN_PACKAGER_CONFIG="$withval" + AC_MSG_RESULT([$SUPERMIN_PACKAGER_CONFIG"])], + [AC_MSG_RESULT([not set])]) + AC_MSG_CHECKING([for --with-febootstrap-yum-config option (deprecated)]) AC_ARG_WITH([febootstrap-yum-config], [AS_HELP_STRING([--with-febootstrap-yum-config=FILE], - [pass febootstrap --packager-config option @<:@default=no@:>@])], - [FEBOOTSTRAP_PACKAGER_CONFIG="$withval"],[ - AC_MSG_RESULT([not set]) - AC_MSG_CHECKING([for --with-febootstrap-packager-config option]) - AC_ARG_WITH([febootstrap-packager-config], - [AS_HELP_STRING([--with-febootstrap-packager-config=FILE], - [pass febootstrap --packager-config option @<:@default=no@:>@])], - [FEBOOTSTRAP_PACKAGER_CONFIG="$withval"], - [FEBOOTSTRAP_PACKAGER_CONFIG=no]) -]) -AC_MSG_RESULT([$FEBOOTSTRAP_PACKAGER_CONFIG]) -AC_SUBST([FEBOOTSTRAP_PACKAGER_CONFIG]) + [pass supermin --packager-config option @<:@default=no@:>@])], + [SUPERMIN_PACKAGER_CONFIG="$withval" + AC_MSG_RESULT([$SUPERMIN_PACKAGER_CONFIG"])], + [AC_MSG_RESULT([not set])]) + +AC_MSG_CHECKING([for --with-febootstrap-packager-config option (deprecated)]) +AC_ARG_WITH([febootstrap-packager-config], + [AS_HELP_STRING([--with-febootstrap-packager-config=FILE], + [pass supermin --packager-config option @<:@default=no@:>@])], + [SUPERMIN_PACKAGER_CONFIG="$withval" + AC_MSG_RESULT([$SUPERMIN_PACKAGER_CONFIG"])], + [AC_MSG_RESULT([not set])]) + +AC_SUBST([SUPERMIN_PACKAGER_CONFIG]) if test "x$enable_appliance" = "xyes"; then - test "x$FEBOOTSTRAP" = "xno" && - AC_MSG_ERROR([febootstrap must be installed]) + test "x$SUPERMIN" = "xno" && + AC_MSG_ERROR([supermin (formerly called febootstrap) must be installed]) dnl febootstrap 2.x did not support the --version parameter - $FEBOOTSTRAP --version >&AS_MESSAGE_LOG_FD 2>&1 || - AC_MSG_ERROR([febootstrap >= 3.0 must be installed, your version is too old]) + $SUPERMIN --version >&AS_MESSAGE_LOG_FD 2>&1 || + AC_MSG_ERROR([supermin (formerly called febootstrap) >= 3.20 must be installed, your version is too old]) fi +AC_DEFINE_UNQUOTED([SUPERMIN_HELPER],["$SUPERMIN_HELPER"],[Name of supermin-helper program.]) + dnl Which distro? dnl dnl This used to be Very Important but is now just used to select diff --git a/examples/guestfs-faq.pod b/examples/guestfs-faq.pod index 035493a52..8a8dd2c6c 100644 --- a/examples/guestfs-faq.pod +++ b/examples/guestfs-faq.pod @@ -345,17 +345,17 @@ You'll have to compile from source, and port it. =head2 How can I compile and install libguestfs from source? -If your Linux distro has a working port of febootstrap (that is, +If your Linux distro has a working port of supermin (that is, Fedora, S 6.3>, Debian, Ubuntu and ArchLinux) then you should just be able to compile from source in the usual way. Download the latest tarball from L, unpack it, and start by reading the README file. -If you I have febootstrap, you will need to use the "fixed +If you I have supermin, you will need to use the "fixed appliance method". See: L -Patches to port febootstrap to more Linux distros are welcome. +Patches to port supermin to more Linux distros are welcome. =head2 Why do I get an error when I try to rebuild from the source RPMs supplied by Red Hat / Fedora? diff --git a/examples/guestfs-performance.pod b/examples/guestfs-performance.pod index e00f3dd30..d0395c922 100644 --- a/examples/guestfs-performance.pod +++ b/examples/guestfs-performance.pod @@ -90,7 +90,7 @@ set C<$TMPDIR> or C<$LIBGUESTFS_CACHEDIR> in which case it will be under that temporary directory. For more information about how the appliance is constructed, see -L. +L. Every time libguestfs runs it will check that no host files used by the appliance have changed. If any have, then the appliance is @@ -166,7 +166,7 @@ times. =item 2. -By default libguestfs (or rather, L) +By default libguestfs (or rather, L) searches over the root filesystem to find out if any host files have changed and if it needs to rebuild the appliance. If these files are not cached and the root filesystem is on an HDD, then this generates @@ -302,7 +302,7 @@ timings: $ annotate-output +'%T.%N' guestfish -a /dev/null run -v 22:17:53.215784625 I: Started guestfish -a /dev/null run -v - 22:17:53.240335409 E: libguestfs: [00000ms] febootstrap-supermin-helper --verbose -f checksum '/usr/lib64/guestfs/supermin.d' x86_64 + 22:17:53.240335409 E: libguestfs: [00000ms] supermin-helper --verbose -f checksum '/usr/lib64/guestfs/supermin.d' x86_64 22:17:53.266857866 E: supermin helper [00000ms] whitelist = (not specified), host_cpu = x86_64, kernel = (null), initrd = (null), appliance = (null) 22:17:53.272704072 E: supermin helper [00000ms] inputs[0] = /usr/lib64/guestfs/supermin.d 22:17:53.276528651 E: checking modpath /lib/modules/3.4.0-1.fc17.x86_64.debug is a directory @@ -428,8 +428,8 @@ bit. =head1 SEE ALSO -L, -L, +L, +L, L, L, L, diff --git a/fish/guestfish.pod b/fish/guestfish.pod index 7afec4c17..5fec2f29f 100644 --- a/fish/guestfish.pod +++ b/fish/guestfish.pod @@ -1218,11 +1218,8 @@ set, it uses C. =item FEBOOTSTRAP_MODULES -These two environment variables allow the kernel that libguestfs uses -in the appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not -set, then the most recent host kernel is chosen. For more information -about kernel selection, see L. This -feature is only available in febootstrap E 3.8. +When using supermin E 4.1.0, these have been renamed +L and L. =item GUESTFISH_DISPLAY_IMAGE @@ -1312,6 +1309,16 @@ Set C to enable command traces. The C command uses C<$PAGER> as the pager. If not set, it uses C. +=item SUPERMIN_KERNEL + +=item SUPERMIN_MODULES + +These two environment variables allow the kernel that libguestfs uses +in the appliance to be selected. If C<$SUPERMIN_KERNEL> is not +set, then the most recent host kernel is chosen. For more information +about kernel selection, see L. This +feature is only available in supermin / febootstrap E 3.8. + =item TMPDIR See L, L. @@ -1403,7 +1410,7 @@ L, L, L, L, -L. +L. =head1 AUTHORS diff --git a/podwrapper.pl.in b/podwrapper.pl.in index 399878211..cb6e9b270 100755 --- a/podwrapper.pl.in +++ b/podwrapper.pl.in @@ -446,6 +446,7 @@ SUBHTML: { return 1 if /^guestmount/; return 1 if /^hivex/; return 1 if /^febootstrap/; + return 1 if /^supermin/; return 0; } diff --git a/src/appliance.c b/src/appliance.c index ff6534c7e..acd195c97 100644 --- a/src/appliance.c +++ b/src/appliance.c @@ -103,7 +103,7 @@ gl_lock_define_initialized (static, building_lock); * * $TMPDIR/.guestfs-$UID/checksum - the checksum * $TMPDIR/.guestfs-$UID/kernel - the kernel - * $TMPDIR/.guestfs-$UID/initrd - the febootstrap initrd + * $TMPDIR/.guestfs-$UID/initrd - the supermin initrd * $TMPDIR/.guestfs-$UID/root - the appliance * * Since multiple instances of libguestfs with the same UID may be @@ -251,7 +251,7 @@ read_checksum (guestfs_h *g, void *checksumv, const char *line, size_t len) } /* supermin_path is a path which is known to contain a supermin - * appliance. Using febootstrap-supermin-helper -f checksum calculate + * appliance. Using supermin-helper -f checksum calculate * the checksum so we can see if it is cached. */ static char * @@ -264,7 +264,7 @@ calculate_supermin_checksum (guestfs_h *g, const char *supermin_path) char checksum[MAX_CHECKSUM_LEN + 1] = { 0 }; cmd = guestfs___new_command (g); - guestfs___cmd_add_arg (cmd, "febootstrap-supermin-helper"); + guestfs___cmd_add_arg (cmd, SUPERMIN_HELPER); if (g->verbose) guestfs___cmd_add_arg (cmd, "--verbose"); if (pass_u_g_args) { @@ -289,7 +289,7 @@ calculate_supermin_checksum (guestfs_h *g, const char *supermin_path) len = strlen (checksum); if (len < 16) { /* sanity check */ - warning (g, "febootstrap-supermin-helper -f checksum returned a short string"); + warning (g, "supermin-helper -f checksum returned a short string"); return NULL; } @@ -485,7 +485,7 @@ build_supermin_appliance (guestfs_h *g, } if (g->verbose) - guestfs___print_timestamped_message (g, "run febootstrap-supermin-helper"); + guestfs___print_timestamped_message (g, "run supermin-helper"); int r = run_supermin_helper (g, supermin_path, tmpcd); if (r == -1) { @@ -656,7 +656,7 @@ hard_link_to_cached_appliance (guestfs_h *g, return -1; } -/* Run febootstrap-supermin-helper and tell it to generate the +/* Run supermin-helper and tell it to generate the * appliance. */ static int @@ -672,7 +672,7 @@ run_supermin_helper (guestfs_h *g, const char *supermin_path, int pass_u_g_args = uid != euid || gid != egid; cmd = guestfs___new_command (g); - guestfs___cmd_add_arg (cmd, "febootstrap-supermin-helper"); + guestfs___cmd_add_arg (cmd, SUPERMIN_HELPER); if (g->verbose) guestfs___cmd_add_arg (cmd, "--verbose"); if (pass_u_g_args) { diff --git a/src/guestfs.pod b/src/guestfs.pod index 67b33ab89..93fc06169 100644 --- a/src/guestfs.pod +++ b/src/guestfs.pod @@ -3092,14 +3092,14 @@ debugging (set the environment variable C). =item Create the appliance -C is invoked to create the kernel, a +C is invoked to create the kernel, a small initrd and the appliance. The appliance is cached in CUIDE> (or in another directory if C or C are set). For a complete description of how the appliance is created and cached, -read the L and L man +read the L and L man pages. =item Start qemu and boot the kernel @@ -3108,7 +3108,7 @@ qemu is invoked to boot the kernel. =item Run the initrd -C builds a small initrd. The initrd is +C builds a small initrd. The initrd is not the appliance. The purpose of the initrd is to load enough kernel modules in order that the appliance itself can be mounted and started. @@ -3118,10 +3118,10 @@ CUIDE/initrd>. When the initrd has started you will see messages showing that kernel modules are being loaded, similar to this: - febootstrap: ext2 mini initrd starting up - febootstrap: mounting /sys - febootstrap: internal insmod libcrc32c.ko - febootstrap: internal insmod crc32c-intel.ko + supermin: ext2 mini initrd starting up + supermin: mounting /sys + supermin: internal insmod libcrc32c.ko + supermin: internal insmod crc32c-intel.ko =item Find and mount the appliance device @@ -3141,10 +3141,10 @@ the appliance. If this works successfully you will see messages such as: - febootstrap: picked /sys/block/vdb/dev as root device - febootstrap: creating /dev/root as block special 252:16 - febootstrap: mounting new root on /root - febootstrap: chroot + supermin: picked /sys/block/vdb/dev as root device + supermin: creating /dev/root as block special 252:16 + supermin: mounting new root on /root + supermin: chroot Starting /init script ... Note that C indicates that the appliance's @@ -4096,11 +4096,8 @@ be reached in practice. See the source code for more information. =item FEBOOTSTRAP_MODULES -These two environment variables allow the kernel that libguestfs uses -in the appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not -set, then the most recent host kernel is chosen. For more information -about kernel selection, see L. This -feature is only available in febootstrap E 3.8. +When using supermin E 4.1.0, these have been renamed +L and L. =item LIBGUESTFS_APPEND @@ -4162,6 +4159,16 @@ See also L, L. Set C to enable command traces. This has the same effect as calling C. +=item SUPERMIN_KERNEL + +=item SUPERMIN_MODULES + +These two environment variables allow the kernel that libguestfs uses +in the appliance to be selected. If C<$SUPERMIN_KERNEL> is not +set, then the most recent host kernel is chosen. For more information +about kernel selection, see L. This +feature is only available in supermin / febootstrap E 3.8. + =item TMPDIR See L, L. @@ -4207,8 +4214,8 @@ L, L, L, L, -L, -L, +L, +L, L, L, L, diff --git a/test-tool/libguestfs-test-tool.pod b/test-tool/libguestfs-test-tool.pod index 785abdaad..ddd212d4c 100644 --- a/test-tool/libguestfs-test-tool.pod +++ b/test-tool/libguestfs-test-tool.pod @@ -81,11 +81,13 @@ libguestfs-test-tool writes a wrapper script for you if one is needed. =head1 TRYING OUT A DIFFERENT KERNEL -If you are using febootstrap E 3.8 then you can select which -kernel libguestfs tries. You do this by setting the environment -variables C and/or C. +If you are using supermin / febootstrap E 3.8 then you can select +which kernel libguestfs tries. You do this by setting the environment +variables C and/or C +(C and C if still using the +old febootstrap 3.21 program). -Refer to L +Refer to L for further information. =head1 SELF-DIAGNOSIS diff --git a/test-tool/test-tool.c b/test-tool/test-tool.c index 5c69a9681..afda85f44 100644 --- a/test-tool/test-tool.c +++ b/test-tool/test-tool.c @@ -198,6 +198,8 @@ main (int argc, char *argv[]) printf ("%s\n", environ[i]); if (STRPREFIX (environ[i], "FEBOOTSTRAP_")) printf ("%s\n", environ[i]); + if (STRPREFIX (environ[i], "SUPERMIN_")) + printf ("%s\n", environ[i]); if (STRPREFIX (environ[i], "LIBVIRT_")) printf ("%s\n", environ[i]); if (STRPREFIX (environ[i], "LIBVIRTD_")) diff --git a/tests/qemu/qemu-liveness.sh b/tests/qemu/qemu-liveness.sh index eb8f60898..6ed42ddc1 100755 --- a/tests/qemu/qemu-liveness.sh +++ b/tests/qemu/qemu-liveness.sh @@ -18,7 +18,7 @@ # Boot and check that writes work. # Note this is the first boot test that we run, so it's looking for -# all sorts of qemu/kernel/febootstrap problems. +# all sorts of qemu/kernel/supermin problems. set -e diff --git a/tests/regressions/rhbz789960.sh b/tests/regressions/rhbz789960.sh index b1d593438..ac66c4a78 100755 --- a/tests/regressions/rhbz789960.sh +++ b/tests/regressions/rhbz789960.sh @@ -36,7 +36,7 @@ run # Should fail even though the device exists. -mount /dev/sda / -# In some configurations, this is the febootstrap appliance. This +# In some configurations, this is the supermin appliance. This # should fail. -mount /dev/vdb /