[libguestfs/el5] Rebase to upstream stable branch version 1.20.12. This contains a complete fix for CVE-2013-4419 (RH

Richard W.M. Jones rjones at fedoraproject.org
Fri Oct 18 18:55:09 UTC 2013


commit 51c8ac4b2a852aa68b1ae079791727bd4143fb6c
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Fri Oct 18 19:54:35 2013 +0100

    Rebase to upstream stable branch version 1.20.12.
    This contains a complete fix for CVE-2013-4419 (RHBZ#1020950).

 ...emove-checks-which-fail-with-ancient-qemu.patch |   10 +-
 ...L-5-Remove-AS_ECHO_N-for-ancient-autoconf.patch |    8 +-
 ...ace-macro-AC_STRUCT_DIRENT_D_TYPE-for-anc.patch |    6 +-
 ...t-use-C99-style-variable-decls-in-for-loo.patch |   57 +++++++++--
 0005-EPEL-5-Remove-Erlang-bindings.patch           |   18 ++--
 ...ve-GObject-GObject-Introspection-GJS-bind.patch |   18 ++--
 0007-EPEL-5-Remove-PHP-bindings.patch              |   18 ++--
 ...L-5-Define-le64toh-le32toh-if-not-defined.patch |    6 +-
 0009-EPEL-5-Add-gnulib-utimensat-module.patch      |    4 +-
 ...ocamlopt-didn-t-support-debugging-g-optio.patch |   20 ++--
 ...ace-format6-with-format4-in-OCaml-gettext.patch |    6 +-
 ...s-preserve-dup-deps-explicitly-to-libtool.patch |    8 +-
 ...ve-id-from-drive-parameter-on-qemu-comman.patch |   10 +-
 ...null-vmchannel-back-for-qemu-without-virt.patch |  103 ++++++++++++--------
 0015-EPEL-5-Disable-libvirt-attach-method.patch    |    6 +-
 ...5-Fix-blkid-to-return-LVM2_member-for-PVs.patch |    4 +-
 ...sify-Fix-command-line-options-for-old-qem.patch |    4 +-
 0018-EPEL-5-Remove-Fedora-MD-test-images.patch     |   10 +-
 0019-EPEL-5-Add-mkisofs-to-package-list.patch      |    4 +-
 ...1-second-pause-after-unmounting-any-files.patch |    8 +-
 0021-EPEL-5-podwrapper-Remove-HTML-output.patch    |   13 ++-
 0022-EPEL-5-podwrapper-Don-t-use-Pod-Man.patch     |    4 +-
 ...rt-Mac-OS-X-Use-libtool-mode-execute-inst.patch |    8 +-
 0024-EPEL-5-Don-t-use-sgabios.patch                |    8 +-
 ...rt-daemon-Remove-e2prog-hack-only-needed-.patch |   88 +++++++++---------
 0026-EPEL-5-Disable-tar-xz-test.patch              |    8 +-
 ...re-sparsify-error-if-qemu-img-help-is-kil.patch |    4 +-
 ...rt-daemon-remove-call-to-obsolete-udevset.patch |    8 +-
 0029-EPEL-5-No-libtoolize-install-option.patch     |    4 +-
 0030-EPEL-5-Disable-valgrind.patch                 |    6 +-
 0031-EPEL-5-Remove-Linux-capabilities.patch        |    6 +-
 ...-Use-old-rake-rdoctask-and-rake-gempackag.patch |    4 +-
 0033-EPEL-5-Revert-Use-pkg-config-for-Python.patch |   13 ++-
 ...HEL-5-Don-t-use-truncate-command-in-tests.patch |   46 +++++++++
 ...-img-in-RHEL-5-doesn-t-let-you-create-512.patch |   67 +++++++++++++
 libguestfs.spec                                    |   11 ++-
 sources                                            |    3 +-
 37 files changed, 403 insertions(+), 226 deletions(-)
---
diff --git a/0001-EPEL-5-Remove-checks-which-fail-with-ancient-qemu.patch b/0001-EPEL-5-Remove-checks-which-fail-with-ancient-qemu.patch
index 3104e4a..08c80f0 100644
--- a/0001-EPEL-5-Remove-checks-which-fail-with-ancient-qemu.patch
+++ b/0001-EPEL-5-Remove-checks-which-fail-with-ancient-qemu.patch
@@ -1,7 +1,7 @@
-From 8f5ea9ebe047912e1850180926c1baa25830d3f0 Mon Sep 17 00:00:00 2001
+From 31d54be5c2ca27f65c3580acfbafd46f4c040a33 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Sat, 16 Jun 2012 10:19:39 +0100
-Subject: [PATCH 01/33] EPEL 5: Remove checks which fail with ancient qemu.
+Subject: [PATCH 01/35] EPEL 5: Remove checks which fail with ancient qemu.
 
 Note that g->app.qemu_version and g->app.qemu_devices will both
 be empty strings.
@@ -11,7 +11,7 @@ be empty strings.
  2 files changed, 2 insertions(+), 78 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index cf505e4..9f5371b 100644
+index 7e75cb7..df1ef2e 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -697,63 +697,6 @@ This could be a very old version of qemu, or qemu might not be
@@ -79,10 +79,10 @@ index cf505e4..9f5371b 100644
  
  dnl Enable packet dumps when in verbose mode.  This generates lots
 diff --git a/src/launch-appliance.c b/src/launch-appliance.c
-index 86f8ad8..9fb0bbd 100644
+index bb9c832..c769ae0 100644
 --- a/src/launch-appliance.c
 +++ b/src/launch-appliance.c
-@@ -770,30 +770,11 @@ test_qemu (guestfs_h *g)
+@@ -805,30 +805,11 @@ test_qemu (guestfs_h *g)
    if (r == -1 || !WIFEXITED (r) || WEXITSTATUS (r) != 0)
      goto error;
  
diff --git a/0002-EPEL-5-Remove-AS_ECHO_N-for-ancient-autoconf.patch b/0002-EPEL-5-Remove-AS_ECHO_N-for-ancient-autoconf.patch
index 811674d..0c2e54e 100644
--- a/0002-EPEL-5-Remove-AS_ECHO_N-for-ancient-autoconf.patch
+++ b/0002-EPEL-5-Remove-AS_ECHO_N-for-ancient-autoconf.patch
@@ -1,17 +1,17 @@
-From e89db097fd2bba5888f56faa06c7f7420ce372c7 Mon Sep 17 00:00:00 2001
+From dc3cbf4232d83cf94b2ca9b47b564d1145bfaa14 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Sat, 16 Jun 2012 10:23:19 +0100
-Subject: [PATCH 02/33] EPEL 5: Remove AS_ECHO_N for ancient autoconf.
+Subject: [PATCH 02/35] EPEL 5: Remove AS_ECHO_N for ancient autoconf.
 
 ---
  configure.ac |   28 ++++++++++++++--------------
  1 files changed, 14 insertions(+), 14 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 9f5371b..a0d8007 100644
+index df1ef2e..380d2ec 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1559,33 +1559,33 @@ echo       "Appliance ........................... $enable_appliance"
+@@ -1568,33 +1568,33 @@ echo       "Appliance ........................... $enable_appliance"
  echo       "QEMU ................................ $QEMU $QEMU_OPTIONS"
  echo       "guestfish and C-based virt tools .... yes"
  echo       "FUSE filesystem ..................... $enable_fuse"
diff --git a/0003-EPEL-5-Replace-macro-AC_STRUCT_DIRENT_D_TYPE-for-anc.patch b/0003-EPEL-5-Replace-macro-AC_STRUCT_DIRENT_D_TYPE-for-anc.patch
index 6715549..cb02c35 100644
--- a/0003-EPEL-5-Replace-macro-AC_STRUCT_DIRENT_D_TYPE-for-anc.patch
+++ b/0003-EPEL-5-Replace-macro-AC_STRUCT_DIRENT_D_TYPE-for-anc.patch
@@ -1,14 +1,14 @@
-From 66035f3e05e6cd9a87f8b59605d38bc5cd7b97fa Mon Sep 17 00:00:00 2001
+From 4adfd0f6653ed10e33b38e63f58ec9a51eebf349 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Sat, 16 Jun 2012 10:46:20 +0100
-Subject: [PATCH 03/33] EPEL 5: Replace macro AC_STRUCT_DIRENT_D_TYPE for ancient autoconf.
+Subject: [PATCH 03/35] EPEL 5: Replace macro AC_STRUCT_DIRENT_D_TYPE for ancient autoconf.
 
 ---
  configure.ac |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index a0d8007..81f5466 100644
+index 380d2ec..7c3dff6 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -258,7 +258,7 @@ The code will still compile, but is likely to leak memory and other
diff --git a/0004-EPEL-5-Don-t-use-C99-style-variable-decls-in-for-loo.patch b/0004-EPEL-5-Don-t-use-C99-style-variable-decls-in-for-loo.patch
index e498a22..67c5e9a 100644
--- a/0004-EPEL-5-Don-t-use-C99-style-variable-decls-in-for-loo.patch
+++ b/0004-EPEL-5-Don-t-use-C99-style-variable-decls-in-for-loo.patch
@@ -1,14 +1,15 @@
-From 14afa058957a45100e87f391423d4d953ce50108 Mon Sep 17 00:00:00 2001
+From 7ad71f29ce0310526e8622abcf9857a102054025 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Sat, 16 Jun 2012 13:55:44 +0100
-Subject: [PATCH 04/33] EPEL 5: Don't use C99-style variable decls in for-loop.
+Subject: [PATCH 04/35] EPEL 5: Don't use C99-style variable decls in for-loop.
 
 ---
- daemon/btrfs.c         |    3 ++-
- daemon/md.c            |    6 ++++--
- generator/bindtests.ml |    3 ++-
- src/inspect-fs-unix.c  |   17 +++++++++++------
- 4 files changed, 19 insertions(+), 10 deletions(-)
+ daemon/btrfs.c           |    3 ++-
+ daemon/md.c              |    6 ++++--
+ generator/bindtests.ml   |    3 ++-
+ src/inspect-fs-unix.c    |   17 +++++++++++------
+ src/inspect-fs-windows.c |    9 ++++++---
+ 5 files changed, 25 insertions(+), 13 deletions(-)
 
 diff --git a/daemon/btrfs.c b/daemon/btrfs.c
 index 81ce5f5..7053642 100644
@@ -25,7 +26,7 @@ index 81ce5f5..7053642 100644
       * path.  Thus we don't need to free 'line', since it will be
       * freed by the calling (XDR) code.
 diff --git a/daemon/md.c b/daemon/md.c
-index b302a8c..d106783 100644
+index e9a3f09..93380b1 100644
 --- a/daemon/md.c
 +++ b/daemon/md.c
 @@ -201,7 +201,8 @@ do_list_md_devices (void)
@@ -35,10 +36,10 @@ index b302a8c..d106783 100644
 -  for (size_t i = 0; i < mds.gl_pathc; i++) {
 +  size_t i;
 +  for (i = 0; i < mds.gl_pathc; i++) {
-     size_t len = strlen (mds.gl_pathv[i]) - strlen (PREFIX) - strlen (SUFFIX);
+     size_t len;
+     char *dev, *n;
  
- #define DEV "/dev/md"
-@@ -277,7 +278,8 @@ do_md_detail(const char *md)
+@@ -280,7 +281,8 @@ do_md_detail(const char *md)
         * case */
        if (STRPREFIX (line, "MD_")) {
          line += 3;
@@ -125,6 +126,40 @@ index c2f8dba..7127162 100644
      size_t orig_buflen = buflen;
      conflen = strlen(*i);
      buflen += EXCL_LEN + conflen + 1 /* Closing " */;
+diff --git a/src/inspect-fs-windows.c b/src/inspect-fs-windows.c
+index ba062eb..3d4ac08 100644
+--- a/src/inspect-fs-windows.c
++++ b/src/inspect-fs-windows.c
+@@ -135,7 +135,8 @@ guestfs___get_windows_systemroot (guestfs_h *g)
+   static const char *systemroots[] =
+     { "/windows", "/winnt", "/win32", "/win", NULL };
+ 
+-  for (size_t i = 0; i < sizeof systemroots / sizeof systemroots[0]; ++i) {
++  size_t i;
++  for (i = 0; i < sizeof systemroots / sizeof systemroots[0]; ++i) {
+     char *systemroot =
+       guestfs___case_sensitive_path_silently (g, systemroots[i]);
+     if (!systemroot)
+@@ -163,7 +164,8 @@ guestfs___get_windows_systemroot (guestfs_h *g)
+     }
+ 
+     int found_os = 0;
+-    for (char **i = boot_ini; *i != NULL; i++) {
++    char **i;
++    for (i = boot_ini; *i != NULL; i++) {
+       CLEANUP_FREE char *controller_type = NULL;
+       CLEANUP_FREE char *controller = NULL;
+       CLEANUP_FREE char *disk = NULL;
+@@ -214,7 +216,8 @@ guestfs___get_windows_systemroot (guestfs_h *g)
+ 
+         /* Swap backslashes for forward slashes in the system root
+          * path */
+-        for (char *j = path; *j != '\0'; j++) {
++        char *j;
++        for (j = path; *j != '\0'; j++) {
+           if (*j == '\\') *j = '/';
+         }
+ 
 -- 
 1.7.4.1
 
diff --git a/0005-EPEL-5-Remove-Erlang-bindings.patch b/0005-EPEL-5-Remove-Erlang-bindings.patch
index 672733c..b40c66e 100644
--- a/0005-EPEL-5-Remove-Erlang-bindings.patch
+++ b/0005-EPEL-5-Remove-Erlang-bindings.patch
@@ -1,7 +1,7 @@
-From 53ff4ac0b5610226c73d07e5a5aa4e329aca5cdb Mon Sep 17 00:00:00 2001
+From 68b094e0b06c79d3d7805f115416437396f25498 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Sat, 16 Jun 2012 14:34:25 +0100
-Subject: [PATCH 05/33] EPEL 5: Remove Erlang bindings.
+Subject: [PATCH 05/35] EPEL 5: Remove Erlang bindings.
 
 ---
  Makefile.am  |    3 ---
@@ -10,10 +10,10 @@ Subject: [PATCH 05/33] EPEL 5: Remove Erlang bindings.
  3 files changed, 0 insertions(+), 28 deletions(-)
 
 diff --git a/Makefile.am b/Makefile.am
-index 5b541d8..baf7b9f 100644
+index b3fe403..986a13e 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -89,9 +89,6 @@ endif
+@@ -90,9 +90,6 @@ endif
  if HAVE_PHP
  SUBDIRS += php
  endif
@@ -24,10 +24,10 @@ index 5b541d8..baf7b9f 100644
  SUBDIRS += lua lua/examples
  endif
 diff --git a/configure.ac b/configure.ac
-index 81f5466..b78e98b 100644
+index 7c3dff6..4ce58fc 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1311,25 +1311,6 @@ AS_IF([test "x$enable_php" != "xno"],[
+@@ -1320,25 +1320,6 @@ AS_IF([test "x$enable_php" != "xno"],[
  ])
  AM_CONDITIONAL([HAVE_PHP], [test "x$PHP" != "xno" && test "x$PHPIZE" != "xno"])
  
@@ -53,7 +53,7 @@ index 81f5466..b78e98b 100644
  dnl Lua
  AC_ARG_ENABLE([lua],
      AS_HELP_STRING([--disable-lua], [disable Lua language bindings]),
-@@ -1476,8 +1457,6 @@ AC_CONFIG_FILES([Makefile
+@@ -1485,8 +1466,6 @@ AC_CONFIG_FILES([Makefile
                   daemon/Makefile
                   df/Makefile
                   edit/Makefile
@@ -62,7 +62,7 @@ index 81f5466..b78e98b 100644
                   examples/Makefile
                   fish/Makefile
                   format/Makefile
-@@ -1579,8 +1558,6 @@ echo -n "Haskell bindings .................... "
+@@ -1588,8 +1567,6 @@ echo -n "Haskell bindings .................... "
  if test "x$HAVE_HASKELL_TRUE" = "x"; then echo "yes"; else echo "no"; fi
  echo -n "PHP bindings ........................ "
  if test "x$HAVE_PHP_TRUE" = "x"; then echo "yes"; else echo "no"; fi
@@ -72,7 +72,7 @@ index 81f5466..b78e98b 100644
  if test "x$HAVE_LUA_TRUE" = "x"; then echo "yes"; else echo "no"; fi
  echo -n "gobject bindings .................... "
 diff --git a/po/POTFILES b/po/POTFILES
-index e64492b..89eda53 100644
+index 7b28d38..ab3a279 100644
 --- a/po/POTFILES
 +++ b/po/POTFILES
 @@ -101,8 +101,6 @@ df/domains.c
diff --git a/0006-EPEL-5-Remove-GObject-GObject-Introspection-GJS-bind.patch b/0006-EPEL-5-Remove-GObject-GObject-Introspection-GJS-bind.patch
index 11cc4c1..86c8bc7 100644
--- a/0006-EPEL-5-Remove-GObject-GObject-Introspection-GJS-bind.patch
+++ b/0006-EPEL-5-Remove-GObject-GObject-Introspection-GJS-bind.patch
@@ -1,7 +1,7 @@
-From 08b2008ccd16d2a2f0b041100187607d5193f170 Mon Sep 17 00:00:00 2001
+From 9a427b97c0bbe7f2c2201418df612f035e181dcb Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Sat, 16 Jun 2012 14:35:06 +0100
-Subject: [PATCH 06/33] EPEL 5: Remove GObject / GObject Introspection / GJS bindings.
+Subject: [PATCH 06/35] EPEL 5: Remove GObject / GObject Introspection / GJS bindings.
 
 ---
  Makefile.am  |    3 --
@@ -10,10 +10,10 @@ Subject: [PATCH 06/33] EPEL 5: Remove GObject / GObject Introspection / GJS bind
  3 files changed, 0 insertions(+), 126 deletions(-)
 
 diff --git a/Makefile.am b/Makefile.am
-index baf7b9f..9a8062e 100644
+index 986a13e..6c1b9ce 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -92,9 +92,6 @@ endif
+@@ -93,9 +93,6 @@ endif
  if HAVE_LUA
  SUBDIRS += lua lua/examples
  endif
@@ -24,10 +24,10 @@ index baf7b9f..9a8062e 100644
  # Unconditional because nothing is built yet.
  SUBDIRS += csharp
 diff --git a/configure.ac b/configure.ac
-index b78e98b..582ca44 100644
+index 4ce58fc..0eda702 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1362,58 +1362,6 @@ AS_IF([test "x$PERL" != "xno"],[
+@@ -1371,58 +1371,6 @@ AS_IF([test "x$PERL" != "xno"],[
  AM_CONDITIONAL([HAVE_TOOLS],
      [test "x$PERL" != "xno" && test "x$missing_perl_modules" != "xyes"])
  
@@ -86,7 +86,7 @@ index b78e98b..582ca44 100644
  dnl Library versioning.
  MAX_PROC_NR=`cat $srcdir/src/MAX_PROC_NR`
  AC_SUBST(MAX_PROC_NR)
-@@ -1464,10 +1412,6 @@ AC_CONFIG_FILES([Makefile
+@@ -1473,10 +1421,6 @@ AC_CONFIG_FILES([Makefile
                   generator/Makefile
                   gnulib/lib/Makefile
                   gnulib/tests/Makefile
@@ -97,7 +97,7 @@ index b78e98b..582ca44 100644
                   haskell/Makefile
                   inspector/Makefile
                   java/Makefile
-@@ -1560,10 +1504,6 @@ echo -n "PHP bindings ........................ "
+@@ -1569,10 +1513,6 @@ echo -n "PHP bindings ........................ "
  if test "x$HAVE_PHP_TRUE" = "x"; then echo "yes"; else echo "no"; fi
  echo -n "Lua bindings ........................ "
  if test "x$HAVE_LUA_TRUE" = "x"; then echo "yes"; else echo "no"; fi
@@ -109,7 +109,7 @@ index b78e98b..582ca44 100644
  echo "If any optional component is configured 'no' when you expected 'yes'"
  echo "then you should check the preceding messages."
 diff --git a/po/POTFILES b/po/POTFILES
-index 89eda53..c3f1d67 100644
+index ab3a279..c9ef148 100644
 --- a/po/POTFILES
 +++ b/po/POTFILES
 @@ -140,69 +140,6 @@ fish/tilde.c
diff --git a/0007-EPEL-5-Remove-PHP-bindings.patch b/0007-EPEL-5-Remove-PHP-bindings.patch
index 6c4f9d1..e6ce9e4 100644
--- a/0007-EPEL-5-Remove-PHP-bindings.patch
+++ b/0007-EPEL-5-Remove-PHP-bindings.patch
@@ -1,7 +1,7 @@
-From 56819cbece86d6051acc64ea70f6dda6dfe0cbd2 Mon Sep 17 00:00:00 2001
+From c0eceb1bd16b0feb0f657abe86382bd412317f00 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Sun, 17 Jun 2012 23:01:43 +0100
-Subject: [PATCH 07/33] EPEL 5: Remove PHP bindings.
+Subject: [PATCH 07/35] EPEL 5: Remove PHP bindings.
 
 ---
  Makefile.am  |    3 ---
@@ -10,10 +10,10 @@ Subject: [PATCH 07/33] EPEL 5: Remove PHP bindings.
  3 files changed, 0 insertions(+), 20 deletions(-)
 
 diff --git a/Makefile.am b/Makefile.am
-index 9a8062e..a8154d3 100644
+index 6c1b9ce..6a17fda 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -86,9 +86,6 @@ endif
+@@ -87,9 +87,6 @@ endif
  if HAVE_HASKELL
  SUBDIRS += haskell
  endif
@@ -24,10 +24,10 @@ index 9a8062e..a8154d3 100644
  SUBDIRS += lua lua/examples
  endif
 diff --git a/configure.ac b/configure.ac
-index 582ca44..9d1544e 100644
+index 0eda702..a32d38d 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1298,19 +1298,6 @@ AS_IF([test "x$enable_haskell" != "xno"],[
+@@ -1307,19 +1307,6 @@ AS_IF([test "x$enable_haskell" != "xno"],[
  ])
  AM_CONDITIONAL([HAVE_HASKELL],[test "x$GHC" != "xno"])
  
@@ -47,7 +47,7 @@ index 582ca44..9d1544e 100644
  dnl Lua
  AC_ARG_ENABLE([lua],
      AS_HELP_STRING([--disable-lua], [disable Lua language bindings]),
-@@ -1424,7 +1411,6 @@ AC_CONFIG_FILES([Makefile
+@@ -1433,7 +1420,6 @@ AC_CONFIG_FILES([Makefile
                   perl/Makefile
                   perl/Makefile.PL
                   perl/examples/Makefile
@@ -55,7 +55,7 @@ index 582ca44..9d1544e 100644
                   po-docs/Makefile
                   po-docs/ja/Makefile
                   po-docs/uk/Makefile
-@@ -1500,8 +1486,6 @@ echo -n "Java bindings ....................... "
+@@ -1509,8 +1495,6 @@ echo -n "Java bindings ....................... "
  if test "x$HAVE_JAVA_TRUE" = "x"; then echo "yes"; else echo "no"; fi
  echo -n "Haskell bindings .................... "
  if test "x$HAVE_HASKELL_TRUE" = "x"; then echo "yes"; else echo "no"; fi
@@ -65,7 +65,7 @@ index 582ca44..9d1544e 100644
  if test "x$HAVE_LUA_TRUE" = "x"; then echo "yes"; else echo "no"; fi
  echo
 diff --git a/po/POTFILES b/po/POTFILES
-index c3f1d67..14eb1e8 100644
+index c9ef148..548e7f7 100644
 --- a/po/POTFILES
 +++ b/po/POTFILES
 @@ -149,7 +149,6 @@ perl/Guestfs.c
diff --git a/0008-EPEL-5-Define-le64toh-le32toh-if-not-defined.patch b/0008-EPEL-5-Define-le64toh-le32toh-if-not-defined.patch
index 3d0c722..5bfbd6a 100644
--- a/0008-EPEL-5-Define-le64toh-le32toh-if-not-defined.patch
+++ b/0008-EPEL-5-Define-le64toh-le32toh-if-not-defined.patch
@@ -1,14 +1,14 @@
-From 2559e63836a7f87acba0e3c2d37b81b78b1de323 Mon Sep 17 00:00:00 2001
+From 8bf06ca604d42f0c568d4bc8b312e1b24792e66c Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Sun, 17 Jun 2012 22:17:06 +0100
-Subject: [PATCH 08/33] EPEL 5: Define le64toh, le32toh if not defined.
+Subject: [PATCH 08/35] EPEL 5: Define le64toh, le32toh if not defined.
 
 ---
  src/inspect-fs-windows.c |   16 ++++++++++++++++
  1 files changed, 16 insertions(+), 0 deletions(-)
 
 diff --git a/src/inspect-fs-windows.c b/src/inspect-fs-windows.c
-index a979775..1afaf26 100644
+index 3d4ac08..42287d0 100644
 --- a/src/inspect-fs-windows.c
 +++ b/src/inspect-fs-windows.c
 @@ -44,6 +44,22 @@
diff --git a/0009-EPEL-5-Add-gnulib-utimensat-module.patch b/0009-EPEL-5-Add-gnulib-utimensat-module.patch
index 5992254..43a74e7 100644
--- a/0009-EPEL-5-Add-gnulib-utimensat-module.patch
+++ b/0009-EPEL-5-Add-gnulib-utimensat-module.patch
@@ -1,7 +1,7 @@
-From d8bc097cf9dadad2a73f195a197f5812f80388e4 Mon Sep 17 00:00:00 2001
+From a45170e0d7db3c10b0fd0713aa4b89b7bc4ef33c Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Sun, 17 Jun 2012 22:58:58 +0100
-Subject: [PATCH 09/33] EPEL 5: Add gnulib utimensat module.
+Subject: [PATCH 09/35] EPEL 5: Add gnulib utimensat module.
 
 This function is missing in RHEL 5-era kernels.
 ---
diff --git a/0010-EPEL-5-Old-ocamlopt-didn-t-support-debugging-g-optio.patch b/0010-EPEL-5-Old-ocamlopt-didn-t-support-debugging-g-optio.patch
index 4031590..f9c9740 100644
--- a/0010-EPEL-5-Old-ocamlopt-didn-t-support-debugging-g-optio.patch
+++ b/0010-EPEL-5-Old-ocamlopt-didn-t-support-debugging-g-optio.patch
@@ -1,7 +1,7 @@
-From 547f896280150d56f902308dd320417c5de938a5 Mon Sep 17 00:00:00 2001
+From 6f8097c9fb00708bd8ea0c4d30a40455d99cb796 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Sun, 17 Jun 2012 23:00:16 +0100
-Subject: [PATCH 10/33] EPEL 5: Old ocamlopt didn't support debugging (-g option).
+Subject: [PATCH 10/35] EPEL 5: Old ocamlopt didn't support debugging (-g option).
 
 ---
  ocaml/Makefile.am    |    2 +-
@@ -11,10 +11,10 @@ Subject: [PATCH 10/33] EPEL 5: Old ocamlopt didn't support debugging (-g option)
  4 files changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
-index 520cce9..46acde5 100644
+index e8bed4b..171193f 100644
 --- a/ocaml/Makefile.am
 +++ b/ocaml/Makefile.am
-@@ -44,7 +44,7 @@ CLEANFILES += t/*.cmi t/*.cmo t/*.cmx t/*.o t/*.a t/*.so
+@@ -38,7 +38,7 @@ CLEANFILES += t/*.cmi t/*.cmo t/*.cmx t/*.o t/*.a t/*.so
  if HAVE_OCAML
  
  OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX
@@ -24,10 +24,10 @@ index 520cce9..46acde5 100644
  noinst_DATA = mlguestfs.cma mlguestfs.cmxa META
  
 diff --git a/resize/Makefile.am b/resize/Makefile.am
-index 9ce473e..e19693c 100644
+index 2431e34..55ecb24 100644
 --- a/resize/Makefile.am
 +++ b/resize/Makefile.am
-@@ -62,7 +62,7 @@ OCAMLPACKAGES += -package gettext-stub
+@@ -61,7 +61,7 @@ OCAMLPACKAGES += -package gettext-stub
  endif
  
  OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX $(OCAMLPACKAGES)
@@ -37,10 +37,10 @@ index 9ce473e..e19693c 100644
  virt-resize: $(OBJECTS)
  	$(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
 diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am
-index f5428d7..93f2c32 100644
+index 3bc1d0e..536c7ef 100644
 --- a/sparsify/Makefile.am
 +++ b/sparsify/Makefile.am
-@@ -56,7 +56,7 @@ OCAMLPACKAGES += -package gettext-stub
+@@ -52,7 +52,7 @@ OCAMLPACKAGES += -package gettext-stub
  endif
  
  OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX $(OCAMLPACKAGES)
@@ -50,10 +50,10 @@ index f5428d7..93f2c32 100644
  virt-sparsify: $(OBJECTS)
  	$(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
 diff --git a/sysprep/Makefile.am b/sysprep/Makefile.am
-index b663143..179713a 100644
+index 6145264..bd45d9d 100644
 --- a/sysprep/Makefile.am
 +++ b/sysprep/Makefile.am
-@@ -105,7 +105,7 @@ OCAMLPACKAGES += -package gettext-stub
+@@ -96,7 +96,7 @@ OCAMLPACKAGES += -package gettext-stub
  endif
  
  OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX $(OCAMLPACKAGES)
diff --git a/0011-EPEL-5-Replace-format6-with-format4-in-OCaml-gettext.patch b/0011-EPEL-5-Replace-format6-with-format4-in-OCaml-gettext.patch
index a996643..46f3fb3 100644
--- a/0011-EPEL-5-Replace-format6-with-format4-in-OCaml-gettext.patch
+++ b/0011-EPEL-5-Replace-format6-with-format4-in-OCaml-gettext.patch
@@ -1,14 +1,14 @@
-From a35275200505c8457c4192bf144c5169c99e1e41 Mon Sep 17 00:00:00 2001
+From a26861d9eb040adeddb5090a487389914a425eff Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Mon, 18 Jun 2012 08:35:14 +0100
-Subject: [PATCH 11/33] EPEL 5: Replace format6 with format4 in OCaml gettext routines.
+Subject: [PATCH 11/35] EPEL 5: Replace format6 with format4 in OCaml gettext routines.
 
 ---
  configure.ac |   10 +++++-----
  1 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 9d1544e..3d099a8 100644
+index a32d38d..b38acc2 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -978,14 +978,14 @@ EOF
diff --git a/0012-EPEL-5-Pass-preserve-dup-deps-explicitly-to-libtool.patch b/0012-EPEL-5-Pass-preserve-dup-deps-explicitly-to-libtool.patch
index f9ed0e3..124bfb5 100644
--- a/0012-EPEL-5-Pass-preserve-dup-deps-explicitly-to-libtool.patch
+++ b/0012-EPEL-5-Pass-preserve-dup-deps-explicitly-to-libtool.patch
@@ -1,7 +1,7 @@
-From ba288405498c6e648cb3a043bc6941c49b69a3b8 Mon Sep 17 00:00:00 2001
+From 20674c5467fe29fe702ffd4050c7b46e22a968cd Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Mon, 18 Jun 2012 12:18:35 +0100
-Subject: [PATCH 12/33] EPEL 5: Pass --preserve-dup-deps explicitly to libtool.
+Subject: [PATCH 12/35] EPEL 5: Pass --preserve-dup-deps explicitly to libtool.
 
 See this thread:
 https://lists.gnu.org/archive/html/bug-gnulib/2012-06/msg00162.html
@@ -10,10 +10,10 @@ https://lists.gnu.org/archive/html/bug-gnulib/2012-06/msg00162.html
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 3d099a8..0d5c655 100644
+index b38acc2..2680acf 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1355,7 +1355,7 @@ AC_SUBST(MAX_PROC_NR)
+@@ -1364,7 +1364,7 @@ AC_SUBST(MAX_PROC_NR)
  
  dnl Replace libtool with a wrapper that clobbers dependency_libs in *.la files
  dnl http://lists.fedoraproject.org/pipermail/devel/2010-November/146343.html
diff --git a/0013-EPEL-5-Remove-id-from-drive-parameter-on-qemu-comman.patch b/0013-EPEL-5-Remove-id-from-drive-parameter-on-qemu-comman.patch
index 118519f..bf0db1e 100644
--- a/0013-EPEL-5-Remove-id-from-drive-parameter-on-qemu-comman.patch
+++ b/0013-EPEL-5-Remove-id-from-drive-parameter-on-qemu-comman.patch
@@ -1,17 +1,17 @@
-From 85db50303c7701b7ba4dea73ce937a0a456437d5 Mon Sep 17 00:00:00 2001
+From cb25d3c32fdd7fabffd125960cc5f5c3bb8fb691 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Mon, 18 Jun 2012 17:21:30 +0100
-Subject: [PATCH 13/33] EPEL 5: Remove id= from -drive parameter on qemu command line.
+Subject: [PATCH 13/35] EPEL 5: Remove id= from -drive parameter on qemu command line.
 
 ---
  src/launch-appliance.c |    5 ++---
  1 files changed, 2 insertions(+), 3 deletions(-)
 
 diff --git a/src/launch-appliance.c b/src/launch-appliance.c
-index 9fb0bbd..5de3b0a 100644
+index c769ae0..e32c2e5 100644
 --- a/src/launch-appliance.c
 +++ b/src/launch-appliance.c
-@@ -332,7 +332,7 @@ launch_appliance (guestfs_h *g, const char *arg)
+@@ -390,7 +390,7 @@ launch_appliance (guestfs_h *g, const char *arg)
        size_t buf2_len = strlen (appliance) + 64;
        char buf2[buf2_len];
        add_cmdline (g, "-drive");
@@ -20,7 +20,7 @@ index 9fb0bbd..5de3b0a 100644
                  appliance, virtio_scsi ? "none" : "virtio", cachemode);
        add_cmdline (g, buf2);
  
-@@ -963,14 +963,13 @@ qemu_drive_param (guestfs_h *g, const struct drive *drv, size_t index)
+@@ -998,14 +998,13 @@ qemu_drive_param (guestfs_h *g, const struct drive *drv, size_t index)
    else
      iface = "virtio";
  
diff --git a/0014-EPEL-5-Add-null-vmchannel-back-for-qemu-without-virt.patch b/0014-EPEL-5-Add-null-vmchannel-back-for-qemu-without-virt.patch
index efe6925..e916de5 100644
--- a/0014-EPEL-5-Add-null-vmchannel-back-for-qemu-without-virt.patch
+++ b/0014-EPEL-5-Add-null-vmchannel-back-for-qemu-without-virt.patch
@@ -1,18 +1,19 @@
-From c661a2588c92d2607e0b97c84db37844a45daf5c Mon Sep 17 00:00:00 2001
+From 2d836027a0a273dbcafa4216f8ab554063d71bf3 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Mon, 18 Jun 2012 16:06:34 +0100
-Subject: [PATCH 14/33] EPEL 5: Add "null vmchannel" back for qemu without virtio-serial support.
+Subject: [PATCH 14/35] EPEL 5: Add "null vmchannel" back for qemu without virtio-serial support.
 
 ---
  appliance/init         |    4 +-
- daemon/guestfsd.c      |   99 ++++++++++++++++++++++--
+ daemon/guestfsd.c      |   98 ++++++++++++++++++++++--
  src/guestfs-internal.h |    2 +-
- src/launch-appliance.c |  196 ++++++++++++++++++++++++++++++++++--------------
+ src/launch-appliance.c |  199 ++++++++++++++++++++++++++++++++++--------------
+ src/launch-libvirt.c   |    2 +-
  src/launch.c           |    4 +-
- 5 files changed, 236 insertions(+), 69 deletions(-)
+ 6 files changed, 238 insertions(+), 71 deletions(-)
 
 diff --git a/appliance/init b/appliance/init
-index 30d4f60..4cd3861 100755
+index cfeb3a9..c12d2f4 100755
 --- a/appliance/init
 +++ b/appliance/init
 @@ -80,10 +80,10 @@ hwclock -u -s
@@ -29,7 +30,7 @@ index 30d4f60..4cd3861 100755
  # Scan for MDs.
  mdadm -As --auto=yes --run
 diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
-index 254e0ea..bcb836a 100644
+index bba13f8..d17d8bc 100644
 --- a/daemon/guestfsd.c
 +++ b/daemon/guestfsd.c
 @@ -118,9 +118,6 @@ int autosync_umount = 1;
@@ -42,15 +43,16 @@ index 254e0ea..bcb836a 100644
  static void
  usage (void)
  {
-@@ -139,6 +136,7 @@ main (int argc, char *argv[])
+@@ -139,6 +136,8 @@ main (int argc, char *argv[])
    };
    int c;
    char *cmdline;
 +  char *vmchannel = NULL;
++  int sock = -1;
  
    ignore_value (chdir ("/"));
  
-@@ -210,8 +208,6 @@ main (int argc, char *argv[])
+@@ -210,8 +209,6 @@ main (int argc, char *argv[])
        printf ("could not read linux command line\n");
    }
  
@@ -59,7 +61,7 @@ index 254e0ea..bcb836a 100644
  #ifndef WIN32
    /* Make sure SIGPIPE doesn't kill us. */
    struct sigaction sa;
-@@ -253,9 +249,94 @@ main (int argc, char *argv[])
+@@ -253,9 +250,92 @@ main (int argc, char *argv[])
     */
    copy_lvm ();
  
@@ -100,8 +102,6 @@ index 254e0ea..bcb836a 100644
 +    printf ("vmchannel: %s\n", vmchannel);
 +
 +  /* Connect to vmchannel. */
-+  int sock = -1;
-+
 +  if (STREQLEN (vmchannel, "tcp:", 4)) {
 +    /* Resolve the hostname. */
 +    struct addrinfo *res, *rr;
@@ -156,7 +156,7 @@ index 254e0ea..bcb836a 100644
      fprintf (stderr,
               "\n"
               "Failed to connect to virtio-serial channel.\n"
-@@ -269,7 +350,7 @@ main (int argc, char *argv[])
+@@ -269,7 +349,7 @@ main (int argc, char *argv[])
               "output to the libguestfs developers, either in a bug report\n"
               "or on the libguestfs redhat com mailing list.\n"
               "\n");
@@ -165,7 +165,7 @@ index 254e0ea..bcb836a 100644
      exit (EXIT_FAILURE);
    }
  
-@@ -300,6 +381,8 @@ main (int argc, char *argv[])
+@@ -300,6 +380,8 @@ main (int argc, char *argv[])
  
    xdr_destroy (&xdr);
  
@@ -175,10 +175,10 @@ index 254e0ea..bcb836a 100644
    main_loop (sock);
  
 diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h
-index aaa9d41..cb812ed 100644
+index 0675123..c275029 100644
 --- a/src/guestfs-internal.h
 +++ b/src/guestfs-internal.h
-@@ -516,7 +516,7 @@ extern int64_t guestfs___timeval_diff (const struct timeval *x, const struct tim
+@@ -542,7 +542,7 @@ extern int64_t guestfs___timeval_diff (const struct timeval *x, const struct tim
  extern void guestfs___print_timestamped_message (guestfs_h *g, const char *fs, ...) __attribute__((format (printf,2,3)));
  extern void guestfs___launch_send_progress (guestfs_h *g, int perdozen);
  extern void guestfs___launch_failed_error (guestfs_h *g);
@@ -186,12 +186,21 @@ index aaa9d41..cb812ed 100644
 +extern char *guestfs___appliance_command_line (guestfs_h *g, const char *appliance_dev, int flags, const char *vmchannel);
  #define APPLIANCE_COMMAND_LINE_IS_TCG 1
  
- /* launch-appliance.c */
+ /* inspect.c */
 diff --git a/src/launch-appliance.c b/src/launch-appliance.c
-index 5de3b0a..71d7aa6 100644
+index e32c2e5..66c130c 100644
 --- a/src/launch-appliance.c
 +++ b/src/launch-appliance.c
-@@ -74,12 +74,16 @@ free_regexps (void)
+@@ -29,6 +29,8 @@
+ #include <sys/wait.h>
+ #include <signal.h>
+ #include <sys/socket.h>
++#include <netinet/in.h>
++#include <arpa/inet.h>
+ #include <sys/un.h>
+ 
+ #include <pcre.h>
+@@ -74,6 +76,9 @@ free_regexps (void)
    pcre_free (re_major_minor);
  }
  
@@ -199,8 +208,9 @@ index 5de3b0a..71d7aa6 100644
 +#define ROUTER "10.0.2.2"
 +
  static int is_openable (guestfs_h *g, const char *path, int flags);
+ static char *make_appliance_dev (guestfs_h *g, int virtio_scsi);
  static void print_qemu_command_line (guestfs_h *g, char **argv);
- static int qemu_supports (guestfs_h *g, const char *option);
+@@ -81,6 +86,7 @@ static int qemu_supports (guestfs_h *g, const char *option);
  static int qemu_supports_device (guestfs_h *g, const char *device_name);
  static int qemu_supports_virtio_scsi (guestfs_h *g);
  static char *qemu_drive_param (guestfs_h *g, const struct drive *drv, size_t index);
@@ -208,18 +218,19 @@ index 5de3b0a..71d7aa6 100644
  
  /* Functions to build up the qemu command line.  These are only run
   * in the child process so no clean-up is required.
-@@ -169,7 +173,9 @@ launch_appliance (guestfs_h *g, const char *arg)
+@@ -169,8 +175,9 @@ launch_appliance (guestfs_h *g, const char *arg)
+ {
    int r;
    int wfd[2], rfd[2];
-   char guestfsd_sock[256];
+-  char guestfsd_sock[256];
 -  struct sockaddr_un addr;
 +  struct sockaddr_in addr;
 +  socklen_t addrlen = sizeof addr;
 +  int null_vmchannel_port;
    CLEANUP_FREE char *kernel = NULL, *initrd = NULL, *appliance = NULL;
    int has_appliance_drive;
-   uint32_t size;
-@@ -203,37 +209,43 @@ launch_appliance (guestfs_h *g, const char *arg)
+   CLEANUP_FREE char *appliance_dev = NULL;
+@@ -205,37 +212,43 @@ launch_appliance (guestfs_h *g, const char *arg)
    if (qemu_supports (g, NULL) == -1)
      goto cleanup0;
  
@@ -278,9 +289,9 @@ index 5de3b0a..71d7aa6 100644
    if (!g->direct) {
      if (pipe (wfd) == -1 || pipe (rfd) == -1) {
        perrorf (g, "pipe");
-@@ -398,23 +410,9 @@ launch_appliance (guestfs_h *g, const char *arg)
-     if (qemu_supports (g, "-rtc-td-hack"))
-       add_cmdline (g, "-rtc-td-hack");
+@@ -402,23 +415,9 @@ launch_appliance (guestfs_h *g, const char *arg)
+       appliance_dev = make_appliance_dev (g, virtio_scsi);
+     }
  
 -    /* Create the virtio serial bus. */
 -    add_cmdline (g, "-device");
@@ -303,7 +314,7 @@ index 5de3b0a..71d7aa6 100644
  
      if (qemu_supports_device (g, "Serial Graphics Adapter")) {
        /* Use sgabios instead of vgabios.  This means we'll see BIOS
-@@ -427,12 +425,16 @@ launch_appliance (guestfs_h *g, const char *arg)
+@@ -431,12 +430,16 @@ launch_appliance (guestfs_h *g, const char *arg)
        add_cmdline (g, "sga");
      }
  
@@ -326,7 +337,7 @@ index 5de3b0a..71d7aa6 100644
  
  #ifdef VALGRIND_DAEMON
      /* Set up virtio-serial channel for valgrind messages. */
-@@ -444,14 +446,6 @@ launch_appliance (guestfs_h *g, const char *arg)
+@@ -448,17 +451,9 @@ launch_appliance (guestfs_h *g, const char *arg)
      add_cmdline (g, "virtserialport,chardev=valgrind,name=org.libguestfs.valgrind");
  #endif
  
@@ -338,11 +349,6 @@ index 5de3b0a..71d7aa6 100644
 -      add_cmdline (g, "virtio-net-pci,netdev=usernet");
 -    }
 -
-     add_cmdline (g, "-kernel");
-     add_cmdline (g, kernel);
-     add_cmdline (g, "-initrd");
-@@ -459,7 +453,7 @@ launch_appliance (guestfs_h *g, const char *arg)
- 
      add_cmdline (g, "-append");
      CLEANUP_FREE char *cmdline =
 -      guestfs___appliance_command_line (g, appliance_dev, 0);
@@ -350,7 +356,7 @@ index 5de3b0a..71d7aa6 100644
      add_cmdline (g, cmdline);
  
      /* Note: custom command line parameters must come last so that
-@@ -620,19 +614,30 @@ launch_appliance (guestfs_h *g, const char *arg)
+@@ -619,19 +614,30 @@ launch_appliance (guestfs_h *g, const char *arg)
  
    g->state = LAUNCHING;
  
@@ -392,8 +398,8 @@ index 5de3b0a..71d7aa6 100644
  
    /* Close the listening socket. */
    if (close (g->sock) != 0) {
-@@ -987,6 +992,83 @@ guestfs___drive_name (size_t index, char *ret)
-   return ret;
+@@ -1010,6 +1016,83 @@ qemu_drive_param (guestfs_h *g, const struct drive *drv, size_t index)
+   return r;                     /* caller frees */
  }
  
 +/* Check the peer effective UID for a TCP socket.  Ideally we'd like
@@ -476,8 +482,21 @@ index 5de3b0a..71d7aa6 100644
  static int
  shutdown_appliance (guestfs_h *g, int check_for_errors)
  {
+diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
+index 6188671..27580a3 100644
+--- a/src/launch-libvirt.c
++++ b/src/launch-libvirt.c
+@@ -873,7 +873,7 @@ construct_libvirt_xml_boot (guestfs_h *g,
+   flags = 0;
+   if (!params->is_kvm)
+     flags |= APPLIANCE_COMMAND_LINE_IS_TCG;
+-  cmdline = guestfs___appliance_command_line (g, params->appliance_dev, flags);
++  cmdline = guestfs___appliance_command_line (g, params->appliance_dev, flags, "");
+ 
+   XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "os"));
+ 
 diff --git a/src/launch.c b/src/launch.c
-index 4333821..c77c229 100644
+index 1583075..09fa73c 100644
 --- a/src/launch.c
 +++ b/src/launch.c
 @@ -316,7 +316,7 @@ guestfs__config (guestfs_h *g,
@@ -487,18 +506,18 @@ index 4333821..c77c229 100644
 -                                  int flags)
 +                                  int flags, const char *vmchannel)
  {
+   char root[64] = "";
    char *term = getenv ("TERM");
-   char *ret;
-@@ -344,12 +344,14 @@ guestfs___appliance_command_line (guestfs_h *g, const char *appliance_dev,
+@@ -348,12 +348,14 @@ guestfs___appliance_command_line (guestfs_h *g, const char *appliance_dev,
       " cgroup_disable=memory"   /* saves us about 5 MB of RAM */
-      " root=%s"                 /* root (appliance_dev) */
+      "%s"                       /* root=appliance_dev */
       " %s"                      /* selinux */
 +     " %s"                      /* vmchannel */
       "%s"                       /* verbose */
       " TERM=%s"                 /* TERM environment variable */
       "%s%s",                    /* append */
       lpj_s,
-      appliance_dev,
+      root,
       g->selinux ? "selinux=1 enforcing=0" : "selinux=0",
 +     vmchannel,
       g->verbose ? " guestfs_verbose=1" : "",
diff --git a/0015-EPEL-5-Disable-libvirt-attach-method.patch b/0015-EPEL-5-Disable-libvirt-attach-method.patch
index 59092f8..53330f3 100644
--- a/0015-EPEL-5-Disable-libvirt-attach-method.patch
+++ b/0015-EPEL-5-Disable-libvirt-attach-method.patch
@@ -1,14 +1,14 @@
-From d0abac9e46c5222457c0ee6f3cdbb6ef30b97fb2 Mon Sep 17 00:00:00 2001
+From d35083900f9d5a5edac0291bbb97066a4cec532d Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Thu, 30 Aug 2012 17:57:46 +0100
-Subject: [PATCH 15/33] EPEL 5: Disable libvirt attach method.
+Subject: [PATCH 15/35] EPEL 5: Disable libvirt attach method.
 
 ---
  src/launch-libvirt.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
-index 5849421..b0e9ea3 100644
+index 27580a3..fe8d5ca 100644
 --- a/src/launch-libvirt.c
 +++ b/src/launch-libvirt.c
 @@ -72,7 +72,7 @@
diff --git a/0016-EPEL-5-Fix-blkid-to-return-LVM2_member-for-PVs.patch b/0016-EPEL-5-Fix-blkid-to-return-LVM2_member-for-PVs.patch
index 25a6b32..bc2b13a 100644
--- a/0016-EPEL-5-Fix-blkid-to-return-LVM2_member-for-PVs.patch
+++ b/0016-EPEL-5-Fix-blkid-to-return-LVM2_member-for-PVs.patch
@@ -1,7 +1,7 @@
-From b514aa51bc4c9c63bc220b1220bea79a95e8fb67 Mon Sep 17 00:00:00 2001
+From 751ea66fc7a16b2d80498e7e74c4abb2ca44d1ca Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Fri, 22 Jun 2012 10:06:47 +0100
-Subject: [PATCH 16/33] EPEL 5: Fix blkid to return "LVM2_member" for PVs.
+Subject: [PATCH 16/35] EPEL 5: Fix blkid to return "LVM2_member" for PVs.
 
 Old blkid in RHEL 5 didn't return the right thing for PVs.
 ---
diff --git a/0017-EPEL-5-sparsify-Fix-command-line-options-for-old-qem.patch b/0017-EPEL-5-sparsify-Fix-command-line-options-for-old-qem.patch
index d909809..8f868c1 100644
--- a/0017-EPEL-5-sparsify-Fix-command-line-options-for-old-qem.patch
+++ b/0017-EPEL-5-sparsify-Fix-command-line-options-for-old-qem.patch
@@ -1,7 +1,7 @@
-From 75155d928942470c9e0a00701c929cc6df02fc0e Mon Sep 17 00:00:00 2001
+From aeeecfdbb0308cacfb61910dbd6fb03b5aac4406 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Fri, 22 Jun 2012 10:24:48 +0100
-Subject: [PATCH 17/33] EPEL 5: sparsify: Fix command line options for old qemu-img.
+Subject: [PATCH 17/35] EPEL 5: sparsify: Fix command line options for old qemu-img.
 
 This didn't have -o backing_file etc.  Use old -b and -F options instead.
 ---
diff --git a/0018-EPEL-5-Remove-Fedora-MD-test-images.patch b/0018-EPEL-5-Remove-Fedora-MD-test-images.patch
index aa1bab6..7b95fd9 100644
--- a/0018-EPEL-5-Remove-Fedora-MD-test-images.patch
+++ b/0018-EPEL-5-Remove-Fedora-MD-test-images.patch
@@ -1,7 +1,7 @@
-From b80cc1f8013dc4e4a52db0cb3db67d37b7801382 Mon Sep 17 00:00:00 2001
+From 2a5114201501d9b6a7090b113b674c8263f1c82d Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Fri, 22 Jun 2012 13:15:49 +0100
-Subject: [PATCH 18/33] EPEL 5: Remove Fedora MD test images.
+Subject: [PATCH 18/35] EPEL 5: Remove Fedora MD test images.
 
 On RHEL 5, mdadm is not able to create md devices with aliases,
 eg. '/dev/md/boot'.
@@ -10,10 +10,10 @@ eg. '/dev/md/boot'.
  1 files changed, 0 insertions(+), 14 deletions(-)
 
 diff --git a/tests/guests/Makefile.am b/tests/guests/Makefile.am
-index b55259f..669296b 100644
+index 765b2c2..1ef7bf2 100644
 --- a/tests/guests/Makefile.am
 +++ b/tests/guests/Makefile.am
-@@ -46,8 +46,6 @@ disk_images = \
+@@ -43,8 +43,6 @@ disk_images = \
  	blank-bootrootlv.img \
  	debian.img \
  	fedora.img \
@@ -22,7 +22,7 @@ index b55259f..669296b 100644
  	ubuntu.img \
  	windows.img
  
-@@ -85,18 +83,6 @@ fedora.img: guest-aux/make-fedora-img.pl \
+@@ -82,18 +80,6 @@ fedora.img: guest-aux/make-fedora-img.pl \
  	SRCDIR=$(srcdir) LAYOUT=partitions $(top_builddir)/run --test $<
  	$(call display,$@)
  
diff --git a/0019-EPEL-5-Add-mkisofs-to-package-list.patch b/0019-EPEL-5-Add-mkisofs-to-package-list.patch
index fb78a8c..e1df256 100644
--- a/0019-EPEL-5-Add-mkisofs-to-package-list.patch
+++ b/0019-EPEL-5-Add-mkisofs-to-package-list.patch
@@ -1,7 +1,7 @@
-From b0fd7f38bda93f4aa1e717c66d1c662bfe9c7e5a Mon Sep 17 00:00:00 2001
+From 19ce5c576af99f330b5c76b185e12176b3a1015f Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Fri, 22 Jun 2012 14:46:43 +0100
-Subject: [PATCH 19/33] EPEL 5: Add mkisofs to package list.
+Subject: [PATCH 19/35] EPEL 5: Add mkisofs to package list.
 
 This package contains the 'isoinfo' program which is required
 to implement the corresponding API and for tests to pass.
diff --git a/0020-EPEL-5-Add-1-second-pause-after-unmounting-any-files.patch b/0020-EPEL-5-Add-1-second-pause-after-unmounting-any-files.patch
index 24b83f2..60a6053 100644
--- a/0020-EPEL-5-Add-1-second-pause-after-unmounting-any-files.patch
+++ b/0020-EPEL-5-Add-1-second-pause-after-unmounting-any-files.patch
@@ -1,7 +1,7 @@
-From 7b8e8343f44e35aef2d8fd45702999b814998cba Mon Sep 17 00:00:00 2001
+From 33195f966d0c0a1e46e8e9dbd247d433052e9e48 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Fri, 22 Jun 2012 21:58:32 +0100
-Subject: [PATCH 20/33] EPEL 5: Add 1 second pause after unmounting any filesystem.
+Subject: [PATCH 20/35] EPEL 5: Add 1 second pause after unmounting any filesystem.
 
 This fixes the test-charset-fidelity test case.  A simpler example
 which fails without this is:
@@ -24,7 +24,7 @@ which fails without this is:
  1 files changed, 6 insertions(+), 0 deletions(-)
 
 diff --git a/daemon/mount.c b/daemon/mount.c
-index af92834..30a8a8c 100644
+index 2f4674d..d6fc175 100644
 --- a/daemon/mount.c
 +++ b/daemon/mount.c
 @@ -228,6 +228,9 @@ do_umount (const char *pathordevice,
@@ -37,7 +37,7 @@ index af92834..30a8a8c 100644
    return 0;
  }
  
-@@ -386,6 +389,9 @@ do_umount_all (void)
+@@ -393,6 +396,9 @@ do_umount_all (void)
  
    free_stringslen (mounts.argv, mounts.size);
  
diff --git a/0021-EPEL-5-podwrapper-Remove-HTML-output.patch b/0021-EPEL-5-podwrapper-Remove-HTML-output.patch
index 8aed4a9..a8868ee 100644
--- a/0021-EPEL-5-podwrapper-Remove-HTML-output.patch
+++ b/0021-EPEL-5-podwrapper-Remove-HTML-output.patch
@@ -1,16 +1,16 @@
-From b3a067100238c12aae33d48abcaefe01e5ad8a2d Mon Sep 17 00:00:00 2001
+From 42da2432bfd7ef92768786fe1ef5085a66ad7763 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Thu, 30 Aug 2012 18:01:00 +0100
-Subject: [PATCH 21/33] EPEL 5: podwrapper: Remove HTML output.
+Subject: [PATCH 21/35] EPEL 5: podwrapper: Remove HTML output.
 
 It requires perl Pod::Simple::XHTML which did not exist in
 RHEL 5 era.
 ---
- podwrapper.pl.in |   92 ------------------------------------------------------
- 1 files changed, 0 insertions(+), 92 deletions(-)
+ podwrapper.pl.in |   93 ------------------------------------------------------
+ 1 files changed, 0 insertions(+), 93 deletions(-)
 
 diff --git a/podwrapper.pl.in b/podwrapper.pl.in
-index af21ef0..e7e1de2 100755
+index c14044c..e7e1de2 100755
 --- a/podwrapper.pl.in
 +++ b/podwrapper.pl.in
 @@ -25,7 +25,6 @@ use Getopt::Long;
@@ -21,7 +21,7 @@ index af21ef0..e7e1de2 100755
  use File::Basename;
  
  # https://www.redhat.com/archives/libguestfs/2013-May/thread.html#00088
-@@ -420,97 +419,6 @@ if ($man) {
+@@ -420,98 +419,6 @@ if ($man) {
      print "$progname: wrote $man\n";
  }
  
@@ -52,6 +52,7 @@ index af21ef0..e7e1de2 100755
 -        return 1 if /^libguestf/;
 -        return 1 if /^guestf/;
 -        return 1 if /^guestmount/;
+-        return 1 if /^guestunmount/;
 -        return 1 if /^hivex/;
 -        return 1 if /^febootstrap/;
 -        return 1 if /^supermin/;
diff --git a/0022-EPEL-5-podwrapper-Don-t-use-Pod-Man.patch b/0022-EPEL-5-podwrapper-Don-t-use-Pod-Man.patch
index e2e5d49..3477519 100644
--- a/0022-EPEL-5-podwrapper-Don-t-use-Pod-Man.patch
+++ b/0022-EPEL-5-podwrapper-Don-t-use-Pod-Man.patch
@@ -1,7 +1,7 @@
-From a1cbdb766643f16035523f943bc8e876d7f9c13c Mon Sep 17 00:00:00 2001
+From 53bffd9d0f014f7ec341412cf1e7ed5ef6ba77d8 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Thu, 30 Aug 2012 18:16:18 +0100
-Subject: [PATCH 22/33] EPEL 5: podwrapper: Don't use Pod::Man.
+Subject: [PATCH 22/35] EPEL 5: podwrapper: Don't use Pod::Man.
 
 This unfortunately means the man pages are generated as plain text.
 However that's necessary as Pod::Man does not have an output_string
diff --git a/0023-EPEL-5-Revert-Mac-OS-X-Use-libtool-mode-execute-inst.patch b/0023-EPEL-5-Revert-Mac-OS-X-Use-libtool-mode-execute-inst.patch
index d4be3cd..f3056bb 100644
--- a/0023-EPEL-5-Revert-Mac-OS-X-Use-libtool-mode-execute-inst.patch
+++ b/0023-EPEL-5-Revert-Mac-OS-X-Use-libtool-mode-execute-inst.patch
@@ -1,7 +1,7 @@
-From 1a696970d8e6bf2a969c06cdf764cec16d419073 Mon Sep 17 00:00:00 2001
+From 9a77f3071faa3fd396a8b49d8210f83c1319f1c7 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Thu, 30 Aug 2012 18:19:28 +0100
-Subject: [PATCH 23/33] EPEL 5: Revert "Mac OS X: Use libtool --mode=execute instead of LD_LIBRARY_PATH"
+Subject: [PATCH 23/35] EPEL 5: Revert "Mac OS X: Use libtool --mode=execute instead of LD_LIBRARY_PATH"
 
 This reverts commit 61c9ea496e0579bb7d1bcf496595d66c3f08cfec.
 ---
@@ -9,10 +9,10 @@ This reverts commit 61c9ea496e0579bb7d1bcf496595d66c3f08cfec.
  1 files changed, 16 insertions(+), 8 deletions(-)
 
 diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
-index 46acde5..9e07fbc 100644
+index 171193f..67bb7fc 100644
 --- a/ocaml/Makefile.am
 +++ b/ocaml/Makefile.am
-@@ -112,56 +112,64 @@ noinst_DATA += \
+@@ -107,56 +107,64 @@ noinst_DATA += \
  	$(test_progs:%=%.opt)
  
  bindtests.bc: bindtests.cmo mlguestfs.cma
diff --git a/0024-EPEL-5-Don-t-use-sgabios.patch b/0024-EPEL-5-Don-t-use-sgabios.patch
index c8346f6..2986bb1 100644
--- a/0024-EPEL-5-Don-t-use-sgabios.patch
+++ b/0024-EPEL-5-Don-t-use-sgabios.patch
@@ -1,7 +1,7 @@
-From 9f157857641bd3797f545748392a3356a9a47c5c Mon Sep 17 00:00:00 2001
+From 74a3698379bc7d69833670d5185436f8c9918229 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Fri, 31 Aug 2012 10:24:06 +0100
-Subject: [PATCH 24/33] EPEL 5: Don't use sgabios.
+Subject: [PATCH 24/35] EPEL 5: Don't use sgabios.
 
 Old qemu doesn't support '-device' parameter.
 ---
@@ -9,10 +9,10 @@ Old qemu doesn't support '-device' parameter.
  1 files changed, 0 insertions(+), 11 deletions(-)
 
 diff --git a/src/launch-appliance.c b/src/launch-appliance.c
-index 71d7aa6..8e17793 100644
+index 66c130c..4395768 100644
 --- a/src/launch-appliance.c
 +++ b/src/launch-appliance.c
-@@ -414,17 +414,6 @@ launch_appliance (guestfs_h *g, const char *arg)
+@@ -419,17 +419,6 @@ launch_appliance (guestfs_h *g, const char *arg)
      add_cmdline (g, "-serial");
      add_cmdline (g, "stdio");
  
diff --git a/0025-EPEL-5-Revert-daemon-Remove-e2prog-hack-only-needed-.patch b/0025-EPEL-5-Revert-daemon-Remove-e2prog-hack-only-needed-.patch
index a62251a..179abaa 100644
--- a/0025-EPEL-5-Revert-daemon-Remove-e2prog-hack-only-needed-.patch
+++ b/0025-EPEL-5-Revert-daemon-Remove-e2prog-hack-only-needed-.patch
@@ -1,7 +1,7 @@
-From fb0ae7109ae5e85722cf7d38ea41fb696ccfe5e0 Mon Sep 17 00:00:00 2001
+From 628cc664e51b048106b0d74e1f08472c10f389db Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Fri, 31 Aug 2012 13:48:18 +0100
-Subject: [PATCH 25/33] EPEL 5: Revert "daemon: Remove e2prog hack (only needed for RHEL 5)."
+Subject: [PATCH 25/35] EPEL 5: Revert "daemon: Remove e2prog hack (only needed for RHEL 5)."
 
 This reverts commit 163e030ee13644ad9efe1e078aff47b879657333.
 ---
@@ -12,10 +12,10 @@ This reverts commit 163e030ee13644ad9efe1e078aff47b879657333.
  4 files changed, 114 insertions(+), 19 deletions(-)
 
 diff --git a/daemon/daemon.h b/daemon/daemon.h
-index a7371ea..ec0fa3d 100644
+index 544feb2..69e1620 100644
 --- a/daemon/daemon.h
 +++ b/daemon/daemon.h
-@@ -185,6 +185,8 @@ extern int filesystem_available (const char *filesystem);
+@@ -187,6 +187,8 @@ extern int filesystem_available (const char *filesystem);
  extern int sync_disks (void);
  
  /*-- in ext2.c --*/
@@ -23,14 +23,14 @@ index a7371ea..ec0fa3d 100644
 +
  /* Confirmed this is true up to ext4 from the Linux sources. */
  #define EXT2_LABEL_MAX 16
- 
+ extern int fstype_is_extfs (const char *fstype);
 diff --git a/daemon/ext2.c b/daemon/ext2.c
-index e4548d6..72694f4 100644
+index a618e66..1a62387 100644
 --- a/daemon/ext2.c
 +++ b/daemon/ext2.c
-@@ -38,6 +38,32 @@ GUESTFSD_EXT_CMD(str_mke2fs, mke2fs);
- GUESTFSD_EXT_CMD(str_lsattr, lsattr);
- GUESTFSD_EXT_CMD(str_chattr, chattr);
+@@ -46,6 +46,32 @@ fstype_is_extfs (const char *fstype)
+     || STREQ (fstype, "ext4");
+ }
  
 +/* Choose which tools like mke2fs to use.  For RHEL 5 (only) there
 + * is a special set of tools which support ext2/3/4.  eg. On RHEL 5,
@@ -61,7 +61,7 @@ index e4548d6..72694f4 100644
  char **
  do_tune2fs_l (const char *device)
  {
-@@ -46,7 +72,11 @@ do_tune2fs_l (const char *device)
+@@ -54,7 +80,11 @@ do_tune2fs_l (const char *device)
    char *p, *pend, *colon;
    DECLARE_STRINGSBUF (ret);
  
@@ -74,7 +74,7 @@ index e4548d6..72694f4 100644
    if (r == -1) {
      reply_with_error ("%s", err);
      return NULL;
-@@ -131,7 +161,11 @@ do_set_e2uuid (const char *device, const char *uuid)
+@@ -139,7 +169,11 @@ do_set_e2uuid (const char *device, const char *uuid)
    int r;
    CLEANUP_FREE char *err = NULL;
  
@@ -87,7 +87,7 @@ index e4548d6..72694f4 100644
    if (r == -1) {
      reply_with_error ("%s", err);
      return -1;
-@@ -152,6 +186,10 @@ if_not_mounted_run_e2fsck (const char *device)
+@@ -160,6 +194,10 @@ if_not_mounted_run_e2fsck (const char *device)
  {
    CLEANUP_FREE char *err = NULL;
    int r, mounted;
@@ -98,7 +98,7 @@ index e4548d6..72694f4 100644
  
    mounted = is_device_mounted (device);
    if (mounted == -1)
-@@ -160,7 +198,7 @@ if_not_mounted_run_e2fsck (const char *device)
+@@ -168,7 +206,7 @@ if_not_mounted_run_e2fsck (const char *device)
    if (!mounted) {
      r = commandf (NULL, &err,
                    COMMAND_FLAG_FOLD_STDOUT_ON_STDERR,
@@ -107,7 +107,7 @@ index e4548d6..72694f4 100644
      if (r == -1) {
        reply_with_error ("%s", err);
        return -1;
-@@ -176,10 +214,14 @@ do_resize2fs (const char *device)
+@@ -184,10 +222,14 @@ do_resize2fs (const char *device)
    CLEANUP_FREE char *err = NULL;
    int r;
  
@@ -123,7 +123,7 @@ index e4548d6..72694f4 100644
    if (r == -1) {
      reply_with_error ("%s", err);
      return -1;
-@@ -194,6 +236,10 @@ do_resize2fs_size (const char *device, int64_t size)
+@@ -202,6 +244,10 @@ do_resize2fs_size (const char *device, int64_t size)
    CLEANUP_FREE char *err = NULL;
    int r;
  
@@ -134,7 +134,7 @@ index e4548d6..72694f4 100644
    /* resize2fs itself may impose additional limits.  Since we are
     * going to use the 'K' suffix however we can only work with whole
     * kilobytes.
-@@ -211,7 +257,7 @@ do_resize2fs_size (const char *device, int64_t size)
+@@ -219,7 +265,7 @@ do_resize2fs_size (const char *device, int64_t size)
    char buf[32];
    snprintf (buf, sizeof buf, "%" PRIi64 "K", size);
  
@@ -143,7 +143,7 @@ index e4548d6..72694f4 100644
    if (r == -1) {
      reply_with_error ("%s", err);
      return -1;
-@@ -226,10 +272,14 @@ do_resize2fs_M (const char *device)
+@@ -234,10 +280,14 @@ do_resize2fs_M (const char *device)
    CLEANUP_FREE char *err = NULL;
    int r;
  
@@ -159,7 +159,7 @@ index e4548d6..72694f4 100644
    if (r == -1) {
      reply_with_error ("%s", err);
      return -1;
-@@ -248,6 +298,10 @@ do_e2fsck (const char *device,
+@@ -256,6 +306,10 @@ do_e2fsck (const char *device,
    CLEANUP_FREE char *err = NULL;
    size_t i = 0;
    int r;
@@ -170,7 +170,7 @@ index e4548d6..72694f4 100644
  
    /* Default if not selected. */
    if (!(optargs_bitmask & GUESTFS_E2FSCK_CORRECT_BITMASK))
-@@ -260,7 +314,7 @@ do_e2fsck (const char *device,
+@@ -268,7 +322,7 @@ do_e2fsck (const char *device,
      return -1;
    }
  
@@ -179,7 +179,7 @@ index e4548d6..72694f4 100644
    ADD_ARG (argv, i, "-f");
  
    if (correct)
-@@ -303,13 +357,17 @@ do_mke2journal (int blocksize, const char *device)
+@@ -311,13 +365,17 @@ do_mke2journal (int blocksize, const char *device)
    CLEANUP_FREE char *err = NULL;
    int r;
  
@@ -198,7 +198,7 @@ index e4548d6..72694f4 100644
                 device, NULL);
    if (r == -1) {
      reply_with_error ("%s", err);
-@@ -325,6 +383,10 @@ do_mke2journal_L (int blocksize, const char *label, const char *device)
+@@ -333,6 +391,10 @@ do_mke2journal_L (int blocksize, const char *label, const char *device)
    CLEANUP_FREE char *err = NULL;
    int r;
  
@@ -209,7 +209,7 @@ index e4548d6..72694f4 100644
    if (strlen (label) > EXT2_LABEL_MAX) {
      reply_with_error ("%s: ext2 labels are limited to %d bytes",
                        label, EXT2_LABEL_MAX);
-@@ -337,7 +399,7 @@ do_mke2journal_L (int blocksize, const char *label, const char *device)
+@@ -345,7 +407,7 @@ do_mke2journal_L (int blocksize, const char *label, const char *device)
    wipe_device_before_mkfs (device);
  
    r = command (NULL, &err,
@@ -218,7 +218,7 @@ index e4548d6..72694f4 100644
                 "-L", label,
                 device, NULL);
    if (r == -1) {
-@@ -354,13 +416,17 @@ do_mke2journal_U (int blocksize, const char *uuid, const char *device)
+@@ -362,13 +424,17 @@ do_mke2journal_U (int blocksize, const char *uuid, const char *device)
    CLEANUP_FREE char *err = NULL;
    int r;
  
@@ -237,9 +237,9 @@ index e4548d6..72694f4 100644
                 "-U", uuid,
                 device, NULL);
    if (r == -1) {
-@@ -378,6 +444,10 @@ do_mke2fs_J (const char *fstype, int blocksize, const char *device,
-   CLEANUP_FREE char *err = NULL;
-   int r;
+@@ -391,6 +457,10 @@ do_mke2fs_J (const char *fstype, int blocksize, const char *device,
+     return -1;
+   }
  
 +  char prog[] = "mke2fs";
 +  if (e2prog (prog) == -1)
@@ -248,7 +248,7 @@ index e4548d6..72694f4 100644
    char blocksize_s[32];
    snprintf (blocksize_s, sizeof blocksize_s, "%d", blocksize);
  
-@@ -388,7 +458,7 @@ do_mke2fs_J (const char *fstype, int blocksize, const char *device,
+@@ -401,7 +471,7 @@ do_mke2fs_J (const char *fstype, int blocksize, const char *device,
    wipe_device_before_mkfs (device);
  
    r = command (NULL, &err,
@@ -257,9 +257,9 @@ index e4548d6..72694f4 100644
                 device, NULL);
    if (r == -1) {
      reply_with_error ("%s", err);
-@@ -405,6 +475,10 @@ do_mke2fs_JL (const char *fstype, int blocksize, const char *device,
-   CLEANUP_FREE char *err = NULL;
-   int r;
+@@ -423,6 +493,10 @@ do_mke2fs_JL (const char *fstype, int blocksize, const char *device,
+     return -1;
+   }
  
 +  char prog[] = "mke2fs";
 +  if (e2prog (prog) == -1)
@@ -268,7 +268,7 @@ index e4548d6..72694f4 100644
    if (strlen (label) > EXT2_LABEL_MAX) {
      reply_with_error ("%s: ext2 labels are limited to %d bytes",
                        label, EXT2_LABEL_MAX);
-@@ -421,7 +495,7 @@ do_mke2fs_JL (const char *fstype, int blocksize, const char *device,
+@@ -439,7 +513,7 @@ do_mke2fs_JL (const char *fstype, int blocksize, const char *device,
    wipe_device_before_mkfs (device);
  
    r = command (NULL, &err,
@@ -277,9 +277,9 @@ index e4548d6..72694f4 100644
                 device, NULL);
    if (r == -1) {
      reply_with_error ("%s", err);
-@@ -438,6 +512,10 @@ do_mke2fs_JU (const char *fstype, int blocksize, const char *device,
-   CLEANUP_FREE char *err = NULL;
-   int r;
+@@ -461,6 +535,10 @@ do_mke2fs_JU (const char *fstype, int blocksize, const char *device,
+     return -1;
+   }
  
 +  char prog[] = "mke2fs";
 +  if (e2prog (prog) == -1)
@@ -288,7 +288,7 @@ index e4548d6..72694f4 100644
    char blocksize_s[32];
    snprintf (blocksize_s, sizeof blocksize_s, "%d", blocksize);
  
-@@ -448,7 +526,7 @@ do_mke2fs_JU (const char *fstype, int blocksize, const char *device,
+@@ -471,7 +549,7 @@ do_mke2fs_JU (const char *fstype, int blocksize, const char *device,
    wipe_device_before_mkfs (device);
  
    r = command (NULL, &err,
@@ -297,7 +297,7 @@ index e4548d6..72694f4 100644
                 device, NULL);
    if (r == -1) {
      reply_with_error ("%s", err);
-@@ -476,6 +554,7 @@ do_tune2fs (const char *device, /* only required parameter */
+@@ -499,6 +577,7 @@ do_tune2fs (const char *device, /* only required parameter */
    size_t i = 0;
    int r;
    CLEANUP_FREE char *err = NULL;
@@ -305,7 +305,7 @@ index e4548d6..72694f4 100644
    char maxmountcount_s[64];
    char mountcount_s[64];
    char group_s[64];
-@@ -484,7 +563,10 @@ do_tune2fs (const char *device, /* only required parameter */
+@@ -507,7 +586,10 @@ do_tune2fs (const char *device, /* only required parameter */
    char reservedblockscount_s[64];
    char user_s[64];
  
@@ -317,7 +317,7 @@ index e4548d6..72694f4 100644
  
    if (optargs_bitmask & GUESTFS_TUNE2FS_FORCE_BITMASK) {
      if (force)
-@@ -592,7 +674,7 @@ do_tune2fs (const char *device, /* only required parameter */
+@@ -615,7 +697,7 @@ do_tune2fs (const char *device, /* only required parameter */
  
    r = commandv (NULL, &err, argv);
    if (r == -1) {
@@ -326,7 +326,7 @@ index e4548d6..72694f4 100644
      return -1;
    }
  
-@@ -836,7 +918,10 @@ do_mke2fs (const char *device,               /* 0 */
+@@ -859,7 +941,10 @@ do_mke2fs (const char *device,               /* 0 */
    char maxonlineresize_s[74];
    size_t i = 0;
  
@@ -339,10 +339,10 @@ index e4548d6..72694f4 100644
    if (optargs_bitmask & GUESTFS_MKE2FS_BLOCKSIZE_BITMASK) {
      if (blocksize < 0) {
 diff --git a/daemon/labels.c b/daemon/labels.c
-index 2fda354..9f08a07 100644
+index d1ce6a4..6732047 100644
 --- a/daemon/labels.c
 +++ b/daemon/labels.c
-@@ -36,13 +36,17 @@ e2label (const char *device, const char *label)
+@@ -38,13 +38,17 @@ e2label (const char *device, const char *label)
    int r;
    CLEANUP_FREE char *err = NULL;
  
@@ -362,7 +362,7 @@ index 2fda354..9f08a07 100644
      reply_with_error ("%s", err);
      return -1;
 diff --git a/daemon/mkfs.c b/daemon/mkfs.c
-index ff0f2fc..88dea8b 100644
+index e753d9a..dddb388 100644
 --- a/daemon/mkfs.c
 +++ b/daemon/mkfs.c
 @@ -45,6 +45,7 @@ do_mkfs (const char *fstype, const char *device, int blocksize,
@@ -372,8 +372,8 @@ index ff0f2fc..88dea8b 100644
 +  char mke2fs[] = "mke2fs";
    int extfs = 0;
  
-   if (STREQ (fstype, "ext2") || STREQ (fstype, "ext3") ||
-@@ -55,8 +56,11 @@ do_mkfs (const char *fstype, const char *device, int blocksize,
+   if (fstype_is_extfs (fstype))
+@@ -54,8 +55,11 @@ do_mkfs (const char *fstype, const char *device, int blocksize,
     * the mkfs program "eats" some options, in particular the -F
     * option.
     */
diff --git a/0026-EPEL-5-Disable-tar-xz-test.patch b/0026-EPEL-5-Disable-tar-xz-test.patch
index 2623608..826b56c 100644
--- a/0026-EPEL-5-Disable-tar-xz-test.patch
+++ b/0026-EPEL-5-Disable-tar-xz-test.patch
@@ -1,7 +1,7 @@
-From ce5760a6a6660aed36592958b21edc5bcb7616b5 Mon Sep 17 00:00:00 2001
+From 0e29c1ea90cf42421a945592c0c0847d13dfdef2 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Fri, 31 Aug 2012 14:59:25 +0100
-Subject: [PATCH 26/33] EPEL 5: Disable tar --xz test.
+Subject: [PATCH 26/35] EPEL 5: Disable tar --xz test.
 
 Although xz is available, ancient tar didn't have the --xz option.
 ---
@@ -9,10 +9,10 @@ Although xz is available, ancient tar didn't have the --xz option.
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/generator/actions.ml b/generator/actions.ml
-index ba380cf..7231f05 100644
+index b0f93d2..cabf2f0 100644
 --- a/generator/actions.ml
 +++ b/generator/actions.ml
-@@ -4105,7 +4105,7 @@ To get the checksums for many files, use C<guestfs_checksums_out>." };
+@@ -4129,7 +4129,7 @@ To get the checksums for many files, use C<guestfs_checksums_out>." };
          [["mkdir"; "/tar_in_gz"];
           ["tar_in"; "../data/helloworld.tar.gz"; "/tar_in_gz"; "gzip"];
           ["cat"; "/tar_in_gz/hello"]], "hello\n");
diff --git a/0027-EPEL-5-Ignore-sparsify-error-if-qemu-img-help-is-kil.patch b/0027-EPEL-5-Ignore-sparsify-error-if-qemu-img-help-is-kil.patch
index bfcdc11..11b4dd6 100644
--- a/0027-EPEL-5-Ignore-sparsify-error-if-qemu-img-help-is-kil.patch
+++ b/0027-EPEL-5-Ignore-sparsify-error-if-qemu-img-help-is-kil.patch
@@ -1,7 +1,7 @@
-From abdd04f42ccd7e07d665fb7e9549d5c33704ed55 Mon Sep 17 00:00:00 2001
+From 0533583754bfef4a329a0277042c55d7197d85f1 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Fri, 31 Aug 2012 22:12:59 +0100
-Subject: [PATCH 27/33] EPEL 5: Ignore sparsify error if qemu-img --help is killed by a signal.
+Subject: [PATCH 27/35] EPEL 5: Ignore sparsify error if qemu-img --help is killed by a signal.
 
 ---
  sparsify/sparsify.ml |    3 +--
diff --git a/0028-EPEL-5-Revert-daemon-remove-call-to-obsolete-udevset.patch b/0028-EPEL-5-Revert-daemon-remove-call-to-obsolete-udevset.patch
index b561749..737f692 100644
--- a/0028-EPEL-5-Revert-daemon-remove-call-to-obsolete-udevset.patch
+++ b/0028-EPEL-5-Revert-daemon-remove-call-to-obsolete-udevset.patch
@@ -1,7 +1,7 @@
-From a184fc93a2f7e1763ec135154f2442aa55a4605b Mon Sep 17 00:00:00 2001
+From d0136bc8aaabdf91051fcc2f0b839f8b927e0469 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Mon, 3 Sep 2012 11:04:39 +0100
-Subject: [PATCH 28/33] EPEL 5: Revert "daemon: remove call to obsolete udevsettle"
+Subject: [PATCH 28/35] EPEL 5: Revert "daemon: remove call to obsolete udevsettle"
 
 This reverts commit b6413f8dbef92c46c4baf9499366716a166f2163.
 ---
@@ -9,7 +9,7 @@ This reverts commit b6413f8dbef92c46c4baf9499366716a166f2163.
  1 files changed, 8 insertions(+), 0 deletions(-)
 
 diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
-index bcb836a..44d7f77 100644
+index d17d8bc..4916c73 100644
 --- a/daemon/guestfsd.c
 +++ b/daemon/guestfsd.c
 @@ -54,6 +54,7 @@
@@ -20,7 +20,7 @@ index bcb836a..44d7f77 100644
  
  static char *read_cmdline (void);
  
-@@ -1392,11 +1393,18 @@ random_name (char *template)
+@@ -1401,11 +1402,18 @@ random_name (char *template)
   *
   * Use 'udevadm settle' after certain commands, but don't be too
   * fussed if it fails.
diff --git a/0029-EPEL-5-No-libtoolize-install-option.patch b/0029-EPEL-5-No-libtoolize-install-option.patch
index 5465f7b..7d74c06 100644
--- a/0029-EPEL-5-No-libtoolize-install-option.patch
+++ b/0029-EPEL-5-No-libtoolize-install-option.patch
@@ -1,7 +1,7 @@
-From 2d8c62bda97fe92ccb0eabab9bd7775524a0e70d Mon Sep 17 00:00:00 2001
+From 3f6ea65904be8a301bc2824f8b28bd087470f6e0 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Fri, 8 Mar 2013 19:09:21 +0000
-Subject: [PATCH 29/33] EPEL 5: No libtoolize --install option.
+Subject: [PATCH 29/35] EPEL 5: No libtoolize --install option.
 
 ---
  bootstrap |    2 +-
diff --git a/0030-EPEL-5-Disable-valgrind.patch b/0030-EPEL-5-Disable-valgrind.patch
index 7fa5658..37ad8a1 100644
--- a/0030-EPEL-5-Disable-valgrind.patch
+++ b/0030-EPEL-5-Disable-valgrind.patch
@@ -1,7 +1,7 @@
-From a1f128cb4bbb231fba61e493c3825fbb538163f7 Mon Sep 17 00:00:00 2001
+From 49ba9324f86322814a29d1addc3b1f011508ab29 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Fri, 8 Mar 2013 19:19:43 +0000
-Subject: [PATCH 30/33] EPEL 5: Disable valgrind.
+Subject: [PATCH 30/35] EPEL 5: Disable valgrind.
 
 Ancient automake didn't have AM_SUBST_NOTMAKE.
 ---
@@ -9,7 +9,7 @@ Ancient automake didn't have AM_SUBST_NOTMAKE.
  1 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 0d5c655..3b28b49 100644
+index 2680acf..900c23b 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -868,8 +868,8 @@ AS_IF([test "x$VALGRIND" != "xno"],[
diff --git a/0031-EPEL-5-Remove-Linux-capabilities.patch b/0031-EPEL-5-Remove-Linux-capabilities.patch
index 4506df5..6597dbc 100644
--- a/0031-EPEL-5-Remove-Linux-capabilities.patch
+++ b/0031-EPEL-5-Remove-Linux-capabilities.patch
@@ -1,7 +1,7 @@
-From 4c74438489ec8178a3890ffa14c09491f2739476 Mon Sep 17 00:00:00 2001
+From 13a9733fb853d4aa607c6e6ad7873d58164d1da0 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Fri, 8 Mar 2013 20:20:23 +0000
-Subject: [PATCH 31/33] EPEL 5: Remove Linux capabilities.
+Subject: [PATCH 31/35] EPEL 5: Remove Linux capabilities.
 
 Linux file capabilities are not supported in RHEL 5, and the
 cap_*_file functions don't exist in the libcap library (although
@@ -11,7 +11,7 @@ confusingly they are in the header file).
  1 files changed, 0 insertions(+), 8 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 3b28b49..25e15e2 100644
+index 900c23b..3ea263f 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -751,14 +751,6 @@ AC_CHECK_LIB([acl],[acl_from_text],[
diff --git a/0032-EPEL-5-ruby-Use-old-rake-rdoctask-and-rake-gempackag.patch b/0032-EPEL-5-ruby-Use-old-rake-rdoctask-and-rake-gempackag.patch
index 756cfec..beca317 100644
--- a/0032-EPEL-5-ruby-Use-old-rake-rdoctask-and-rake-gempackag.patch
+++ b/0032-EPEL-5-ruby-Use-old-rake-rdoctask-and-rake-gempackag.patch
@@ -1,7 +1,7 @@
-From 0c40ac88a26e9645c568a5b8b37310257a0c4915 Mon Sep 17 00:00:00 2001
+From dbd34c694764f4ca75224ad3739e7c8a1da5ee23 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Sat, 9 Mar 2013 19:24:29 +0000
-Subject: [PATCH 32/33] EPEL 5: ruby: Use old rake/rdoctask and rake/gempackagetask.
+Subject: [PATCH 32/35] EPEL 5: ruby: Use old rake/rdoctask and rake/gempackagetask.
 
 The 'begin ... rescue' code is supposed to ensure these old packages
 are required, but for reasons not understood this doesn't work on
diff --git a/0033-EPEL-5-Revert-Use-pkg-config-for-Python.patch b/0033-EPEL-5-Revert-Use-pkg-config-for-Python.patch
index 5a4dec4..c61285c 100644
--- a/0033-EPEL-5-Revert-Use-pkg-config-for-Python.patch
+++ b/0033-EPEL-5-Revert-Use-pkg-config-for-Python.patch
@@ -1,7 +1,7 @@
-From 5f7acbb95e055efa840d2108e207e3ef8106761a Mon Sep 17 00:00:00 2001
+From 8c8f83353748852f9b5af0695f06615e36719029 Mon Sep 17 00:00:00 2001
 From: Richard W.M. Jones <rjones at redhat.com>
 Date: Wed, 29 May 2013 17:27:06 +0100
-Subject: [PATCH 33/33] EPEL 5: Revert "Use pkg-config for Python"
+Subject: [PATCH 33/35] EPEL 5: Revert "Use pkg-config for Python"
 
 In RHEL 5, python doesn't have pkg-config configuration.
 
@@ -12,7 +12,7 @@ This reverts commit ba2e4f1794dabdb251823c86ee843a0fe3186a74.
  2 files changed, 16 insertions(+), 21 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 25e15e2..e4f768d 100644
+index 3ea263f..b7d158b 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -1020,6 +1020,7 @@ AM_CONDITIONAL([HAVE_PERL],
@@ -66,12 +66,13 @@ index 25e15e2..e4f768d 100644
  
          AC_ARG_WITH([python-installdir],
                      [AS_HELP_STRING([--with-python-installdir],
-@@ -1091,10 +1085,11 @@ AS_IF([test "x$enable_python" != "xno"],[
+@@ -1099,11 +1093,12 @@ AS_IF([test "x$enable_python" != "xno"],[
  
      AC_SUBST(PYTHON_PREFIX)
      AC_SUBST(PYTHON_VERSION)
 +    AC_SUBST(PYTHON_INCLUDEDIR)
      AC_SUBST(PYTHON_INSTALLDIR)
+     AC_SUBST(PYTHON_EXT_SUFFIX)
  ])
  AM_CONDITIONAL([HAVE_PYTHON],
 -    [test "x$PYTHON" != "xno" && test "x$PYTHON_LIBS" != "x" ])
@@ -80,10 +81,10 @@ index 25e15e2..e4f768d 100644
  dnl Check for Ruby and rake (optional, for Ruby bindings).
  AC_ARG_ENABLE([ruby],
 diff --git a/python/Makefile.am b/python/Makefile.am
-index c88b994..3bc01b5 100644
+index e9a9b85..2caa07f 100644
 --- a/python/Makefile.am
 +++ b/python/Makefile.am
-@@ -43,7 +43,7 @@ libguestfsmod_la_SOURCES = guestfs-py.c guestfs-py.h guestfs-py-byhand.c
+@@ -40,7 +40,7 @@ libguestfsmod_la_SOURCES = guestfs-py.c guestfs-py.h guestfs-py-byhand.c
  
  libguestfsmod_la_CPPFLAGS = \
  	-DGUESTFS_PRIVATE=1 \
diff --git a/0034-RHEL-5-Don-t-use-truncate-command-in-tests.patch b/0034-RHEL-5-Don-t-use-truncate-command-in-tests.patch
new file mode 100644
index 0000000..7ec84d1
--- /dev/null
+++ b/0034-RHEL-5-Don-t-use-truncate-command-in-tests.patch
@@ -0,0 +1,46 @@
+From d35729d68445dd8f5183cc9e6fb438ce61e037a2 Mon Sep 17 00:00:00 2001
+From: Richard W.M. Jones <rjones at redhat.com>
+Date: Fri, 18 Oct 2013 09:12:40 +0100
+Subject: [PATCH 34/35] RHEL 5: Don't use 'truncate' command in tests.
+
+Use 'guestfish sparse' instead, which is roughly equivalent.
+
+See commit ef1514aa1e0a099d71cbb7d2c5f24f9f32e1939d
+and commit 39df80dcc0e485e69048bddbf33c259ce532e50d.
+(cherry picked from commit 18c93ac61f8f5a0059d8ceda37f963ad4c06d19d)
+---
+ tests/data/Makefile.am |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
+index b8f76b2..586e7ec 100644
+--- a/tests/data/Makefile.am
++++ b/tests/data/Makefile.am
+@@ -135,21 +135,21 @@ $(builddir)/abssymlink:
+ # Blank disk images in various sizes and formats.
+ $(builddir)/blank-disk-1s.raw:
+ 	rm -f $@
+-	truncate -s 512 $@
++	../../fish/guestfish sparse $@ 512
+ 
+ $(builddir)/blank-disk-1s.qcow2:
+ 	qemu-img create -f qcow2 $@ 512
+ 
+ $(builddir)/blank-disk-1K.raw:
+ 	rm -f $@
+-	truncate -s 1K $@
++	../../fish/guestfish sparse $@ 1K
+ 
+ $(builddir)/blank-disk-1K.qcow2:
+ 	qemu-img create -f qcow2 $@ 1K
+ 
+ $(builddir)/blank-disk-1M.raw:
+ 	rm -f $@
+-	truncate -s 1M $@
++	../../fish/guestfish sparse $@ 1M
+ 
+ $(builddir)/blank-disk-1M.qcow2:
+ 	qemu-img create -f qcow2 $@ 1M
+-- 
+1.7.4.1
+
diff --git a/0035-EPEL-5-qemu-img-in-RHEL-5-doesn-t-let-you-create-512.patch b/0035-EPEL-5-qemu-img-in-RHEL-5-doesn-t-let-you-create-512.patch
new file mode 100644
index 0000000..f7f44e1
--- /dev/null
+++ b/0035-EPEL-5-qemu-img-in-RHEL-5-doesn-t-let-you-create-512.patch
@@ -0,0 +1,67 @@
+From 9e582f9cf4818cc67c46b5408e36cb313c9c58f1 Mon Sep 17 00:00:00 2001
+From: Richard W.M. Jones <rjones at redhat.com>
+Date: Fri, 18 Oct 2013 19:43:53 +0100
+Subject: [PATCH 35/35] EPEL 5: qemu-img in RHEL 5 doesn't let you create 512 byte qcow2 image.
+
+I checked the source of qemu-img and this is not possible to create.
+---
+ generator/actions.ml   |    6 ------
+ tests/data/Makefile.am |    4 ----
+ 2 files changed, 0 insertions(+), 10 deletions(-)
+
+diff --git a/generator/actions.ml b/generator/actions.ml
+index cabf2f0..cd0d49b 100644
+--- a/generator/actions.ml
++++ b/generator/actions.ml
+@@ -2428,8 +2428,6 @@ data." };
+       InitEmpty, Always, TestOutput (
+         [["disk_format"; "../data/blank-disk-1s.raw"]], "raw");
+       InitEmpty, Always, TestOutput (
+-        [["disk_format"; "../data/blank-disk-1s.qcow2"]], "qcow2");
+-      InitEmpty, Always, TestOutput (
+         [["disk_format"; "../data/blank-disk-1K.raw"]], "raw");
+       InitEmpty, Always, TestOutput (
+         [["disk_format"; "../data/blank-disk-1K.qcow2"]], "qcow2");
+@@ -2458,8 +2456,6 @@ See also: L<guestfs(3)/DISK IMAGE FORMATS>" };
+       InitEmpty, Always, TestOutputInt (
+         [["disk_virtual_size"; "../data/blank-disk-1s.raw"]], 512);
+       InitEmpty, Always, TestOutputInt (
+-        [["disk_virtual_size"; "../data/blank-disk-1s.qcow2"]], 512);
+-      InitEmpty, Always, TestOutputInt (
+         [["disk_virtual_size"; "../data/blank-disk-1K.raw"]], 1024);
+       InitEmpty, Always, TestOutputInt (
+         [["disk_virtual_size"; "../data/blank-disk-1K.qcow2"]], 1024);
+@@ -2485,8 +2481,6 @@ circumstances.  See L<guestfs(3)/CVE-2010-3851>." };
+       InitEmpty, Always, TestOutputFalse (
+         [["disk_has_backing_file"; "../data/blank-disk-1s.raw"]]);
+       InitEmpty, Always, TestOutputFalse (
+-        [["disk_has_backing_file"; "../data/blank-disk-1s.qcow2"]]);
+-      InitEmpty, Always, TestOutputFalse (
+         [["disk_has_backing_file"; "../data/blank-disk-1K.raw"]]);
+       InitEmpty, Always, TestOutputFalse (
+         [["disk_has_backing_file"; "../data/blank-disk-1K.qcow2"]]);
+diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
+index 586e7ec..9c78881 100644
+--- a/tests/data/Makefile.am
++++ b/tests/data/Makefile.am
+@@ -75,7 +75,6 @@ images_files_build = \
+ 	$(builddir)/10klines \
+ 	$(builddir)/abssymlink \
+ 	$(builddir)/blank-disk-1s.raw \
+-	$(builddir)/blank-disk-1s.qcow2 \
+ 	$(builddir)/blank-disk-1K.raw \
+ 	$(builddir)/blank-disk-1K.qcow2 \
+ 	$(builddir)/blank-disk-1M.raw \
+@@ -137,9 +136,6 @@ $(builddir)/blank-disk-1s.raw:
+ 	rm -f $@
+ 	../../fish/guestfish sparse $@ 512
+ 
+-$(builddir)/blank-disk-1s.qcow2:
+-	qemu-img create -f qcow2 $@ 512
+-
+ $(builddir)/blank-disk-1K.raw:
+ 	rm -f $@
+ 	../../fish/guestfish sparse $@ 1K
+-- 
+1.7.4.1
+
diff --git a/libguestfs.spec b/libguestfs.spec
index 8e745ec..c9a5373 100644
--- a/libguestfs.spec
+++ b/libguestfs.spec
@@ -21,7 +21,7 @@
 Summary:       Access and modify virtual machine disk images
 Name:          libguestfs
 Epoch:         1
-Version:       1.20.8
+Version:       1.20.12
 Release:       1%{?dist}
 License:       LGPLv2+
 Group:         Development/Libraries
@@ -77,6 +77,8 @@ Patch0030:     0030-EPEL-5-Disable-valgrind.patch
 Patch0031:     0031-EPEL-5-Remove-Linux-capabilities.patch
 Patch0032:     0032-EPEL-5-ruby-Use-old-rake-rdoctask-and-rake-gempackag.patch
 Patch0033:     0033-EPEL-5-Revert-Use-pkg-config-for-Python.patch
+Patch0034:     0034-RHEL-5-Don-t-use-truncate-command-in-tests.patch
+Patch0035:     0035-EPEL-5-qemu-img-in-RHEL-5-doesn-t-let-you-create-512.patch
 
 # Basic build requirements:
 BuildRequires: /usr/bin/pod2man
@@ -710,6 +712,9 @@ export SKIP_TEST_DISK_LABELS_PL=1
 export SKIP_TEST_ACL_SET_FILE=1
 export SKIP_TEST_ACL_DELETE_DEF_FILE=1
 
+# grub-install doesn't work.
+export SKIP_TEST_GRUB_INSTALL=1
+
 %if %{runtests}
 make check
 %endif
@@ -912,6 +917,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Fri Oct 18 2013 Richard W.M. Jones <rjones at redhat.com> - 1:1.20.12-1
+- Rebase to upstream stable branch version 1.20.12.
+- This contains a complete fix for CVE-2013-4419 (RHBZ#1020950).
+
 * Mon Jun  3 2013 Richard W.M. Jones <rjones at redhat.com> - 1:1.20.8-1
 - Rebase to upstream stable branch version 1.20.8.
   This contains a complete fix for CVE-2013-2124.
diff --git a/sources b/sources
index 4e78577..a5608bb 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-da5f7fcd0f48f4e17dca4ce33a52cc7a  gnulib-4a8c422f.tar.gz
-f05e8a9d1f852be4e85d00c9663493f2  libguestfs-1.20.8.tar.gz
+c497115cfd3323061dd100ec876f9191  libguestfs-1.20.12.tar.gz


More information about the scm-commits mailing list