diff --git a/.libguestfs.metadata b/.libguestfs.metadata
new file mode 100644
index 0000000..708ece2
--- /dev/null
+++ b/.libguestfs.metadata
@@ -0,0 +1 @@
+7025453de58d7a7330903877e3bf788d5891cd07 SOURCES/libguestfs-1.22.6.tar.gz
diff --git a/README.md b/README.md
deleted file mode 100644
index 0e7897f..0000000
--- a/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-The master branch has no content
- 
-Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6
- 
-If you find this file in a distro specific branch, it means that no content has been checked in yet
diff --git a/SOURCES/0001-tests-Add-a-regression-test-for-all-disk_-info-comma.patch b/SOURCES/0001-tests-Add-a-regression-test-for-all-disk_-info-comma.patch
new file mode 100644
index 0000000..8060c17
--- /dev/null
+++ b/SOURCES/0001-tests-Add-a-regression-test-for-all-disk_-info-comma.patch
@@ -0,0 +1,244 @@
+From 11e147bea7392f3c59b76efb1c62c81250e9ff20 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Thu, 18 Jul 2013 13:59:09 +0100
+Subject: [PATCH] tests: Add a regression test for all disk_* info commands
+ (RHBZ#981663).
+
+(cherry picked from commit 2311fb0632a64cfa2bab8bf65c82ffaa042d619e)
+---
+ Makefile.am                  |   1 +
+ configure.ac                 |   1 +
+ tests/disk-info/Makefile.am  |  31 +++++++++
+ tests/disk-info/disk-info.pl | 158 +++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 191 insertions(+)
+ create mode 100644 tests/disk-info/Makefile.am
+ create mode 100755 tests/disk-info/disk-info.pl
+
+diff --git a/Makefile.am b/Makefile.am
+index 071fc43..de747b0 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -60,6 +60,7 @@ SUBDIRS += tests/hotplug
+ SUBDIRS += tests/nbd
+ SUBDIRS += tests/http
+ SUBDIRS += tests/syslinux
++SUBDIRS += tests/disk-info
+ SUBDIRS += tests/regressions
+ endif
+ 
+diff --git a/configure.ac b/configure.ac
+index f48f3a3..62d558f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1633,6 +1633,7 @@ AC_CONFIG_FILES([Makefile
+                  tests/charsets/Makefile
+                  tests/data/Makefile
+                  tests/disks/Makefile
++                 tests/disk-info/Makefile
+                  tests/disk-labels/Makefile
+                  tests/guests/Makefile
+                  tests/guests/guests.xml
+diff --git a/tests/disk-info/Makefile.am b/tests/disk-info/Makefile.am
+new file mode 100644
+index 0000000..5a34c47
+--- /dev/null
++++ b/tests/disk-info/Makefile.am
+@@ -0,0 +1,31 @@
++# libguestfs
++# Copyright (C) 2013 Red Hat Inc.
++#
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++
++include $(top_srcdir)/subdir-rules.mk
++
++EXTRA_DIST = \
++	$(TESTS)
++
++TESTS = \
++	disk-info.pl
++
++TESTS_ENVIRONMENT = $(top_builddir)/run --test $(VG)
++
++check-valgrind:
++	$(MAKE) VG="@VG@" check
++
++CLEANFILES = *~
+diff --git a/tests/disk-info/disk-info.pl b/tests/disk-info/disk-info.pl
+new file mode 100755
+index 0000000..2fecc20
+--- /dev/null
++++ b/tests/disk-info/disk-info.pl
+@@ -0,0 +1,158 @@
++#!/usr/bin/perl -w
++# Test guestfs_disk_* functions.
++# Copyright (C) 2013 Red Hat Inc.
++#
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++
++use strict;
++use warnings;
++
++use File::Temp qw(tempdir);
++
++use Sys::Guestfs;
++
++# Bail on 32 bit perl.
++if (~1 == 4294967294) {
++    print "$0: test skipped because your perl is not 64 bits\n";
++    exit 77;
++}
++
++$ENV{LC_ALL} = "C";
++
++my $tmpdir = tempdir (CLEANUP => 1);
++my $errors = 0;
++
++my $g = Sys::Guestfs->new ();
++
++my ($format, $size, $backing);
++foreach $format ("raw", "qcow2") {
++    foreach $size (1024, 1024*1024, 1024*1024*1024, 1024*1024*1024*1024) {
++        foreach $backing (0, 1) {
++            # Raw files can't have backing files.
++            next if $format eq "raw" && $backing;
++
++            my $filename = create_disk ($tmpdir, $format, $size, $backing);
++
++            my $detected_format = $g->disk_format ($filename);
++            if ($detected_format ne $format) {
++                print_disk ($filename, $format, $size, $backing, \*STDERR);
++                printf STDERR ("unexpected format: detected %s, expected %s\n",
++                               $detected_format, $format);
++                $errors++;
++            }
++
++            my $detected_size = $g->disk_virtual_size ($filename);
++            if ($detected_size != $size) {
++                print_disk ($filename, $format, $size, $backing, \*STDERR);
++                printf STDERR ("unexpected size: detected %d, expected %d\n",
++                               $detected_size, $size);
++                $errors++;
++            }
++
++            my $detected_backing = $g->disk_has_backing_file ($filename);
++            if ($detected_backing != $backing) {
++                print_disk ($filename, $format, $size, $backing, \*STDERR);
++                printf STDERR ("unexpected backing file: detected %d, expected %d\n",
++                               $detected_backing, $backing);
++                $errors++;
++            }
++        }
++    }
++}
++
++# Check the negative cases too: file not found, file is a directory.
++# Note that since anything can be a raw file, there's no way to test
++# that this would fail for a non-disk-image.
++eval { $g->disk_format ($tmpdir . "/nosuchfile") };
++if (!$@) {
++    print STDERR "expected non-existent file to fail, but it did not\n";
++    $errors++;
++}
++if ($@ !~ /No such file/) {
++    print STDERR "unexpected error from non-existent file: $@\n";
++    $errors++;
++}
++
++my $testdir = $tmpdir . "/dir";
++mkdir $testdir, 0755;
++eval { $g->disk_format ($testdir) };
++if (!$@) {
++    print STDERR "expected directory fail, but it did not\n";
++    $errors++;
++}
++if ($@ !~ /is a directory/) {
++    print STDERR "unexpected error from directory: $@\n";
++    $errors++;
++}
++
++#----------------------------------------------------------------------
++
++my $unique = 0;
++sub get_unique
++{
++    return $unique++;
++}
++
++sub create_disk
++{
++    my $tmpdir = shift;
++    my $format = shift;
++    my $size = shift;
++    my $backing = shift;
++
++    my $options;
++
++    if ($backing) {
++        my $backing_file = sprintf ("%s/b%d", $tmpdir, get_unique ());
++        qemu_img_create ("raw", "", $backing_file, 1024*1024);
++        $options = "backing_file=%s"
++    }
++
++    my $filename = sprintf ("%s/d%d", $tmpdir, get_unique ());
++    qemu_img_create ($format, $options, $filename, $size);
++    return $filename;
++}
++
++sub qemu_img_create
++{
++    my $format = shift;
++    my $options = shift;
++    my $filename = shift;
++    my $size = shift;
++
++    my @cmd = ("qemu-img", "create", "-f", $format);
++    if (defined $options) {
++        push @cmd, "-o", $options;
++    }
++    push @cmd, $filename;
++    if (defined $size) {
++        push @cmd, $size;
++    }
++    system (@cmd) == 0 or die "system ", join (" ", @cmd), " failed: $?"
++}
++
++sub print_disk
++{
++    my $filename = shift;
++    my $format = shift;
++    my $size = shift;
++    my $backing = shift;
++    my $io = shift;
++
++    printf $io ("created disk %s: format=%s, size=%d, backing=%d\n",
++                $filename, $format, $size, $backing);
++}
++
++exit ($errors == 0 ? 0 : 1);
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0002-New-API-add-drive-scratch.patch b/SOURCES/0002-New-API-add-drive-scratch.patch
new file mode 100644
index 0000000..6712886
--- /dev/null
+++ b/SOURCES/0002-New-API-add-drive-scratch.patch
@@ -0,0 +1,147 @@
+From eaffd8105fcd164616aad47cea2b2bf56686acfa Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Fri, 19 Jul 2013 14:09:56 +0100
+Subject: [PATCH] New API: add-drive-scratch.
+
+This adds a temporary scratch drive to the handle.
+
+(cherry picked from commit 1b11a83d5248511abbf86775601eb6e25a36c1ee)
+---
+ generator/actions.ml | 15 +++++++++++++++
+ gobject/Makefile.inc |  2 ++
+ po/POTFILES          |  1 +
+ src/drives.c         | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 71 insertions(+)
+
+diff --git a/generator/actions.ml b/generator/actions.ml
+index d30aec8..eb09aa7 100644
+--- a/generator/actions.ml
++++ b/generator/actions.ml
+@@ -2954,6 +2954,21 @@ it is set to the empty string (but never C<NULL>)." };
+     longdesc = "\
+ Get the program name.  See C<guestfs_set_program>." };
+ 
++  { defaults with
++    name = "add_drive_scratch";
++    style = RErr, [Int64 "size"], [OString "name"; OString "label"];
++    blocking = false;
++    fish_alias = ["scratch"];
++    shortdesc = "add a temporary scratch drive";
++    longdesc = "\
++This command adds a temporary scratch drive to the handle.  The
++C<size> parameter is the virtual size (in bytes).  The scratch
++drive is blank initially (all reads return zeroes until you start
++writing to it).  The drive is deleted when the handle is closed.
++
++The optional arguments C<name> and C<label> are passed through to
++C<guestfs_add_drive>." };
++
+ ]
+ 
+ (* daemon_functions are any functions which cause some action
+diff --git a/gobject/Makefile.inc b/gobject/Makefile.inc
+index 69f7215..17da527 100644
+--- a/gobject/Makefile.inc
++++ b/gobject/Makefile.inc
+@@ -51,6 +51,7 @@ guestfs_gobject_headers= \
+   include/guestfs-gobject/optargs-inspect_get_icon.h \
+   include/guestfs-gobject/optargs-mount_local.h \
+   include/guestfs-gobject/optargs-umount_local.h \
++  include/guestfs-gobject/optargs-add_drive_scratch.h \
+   include/guestfs-gobject/optargs-is_file.h \
+   include/guestfs-gobject/optargs-is_dir.h \
+   include/guestfs-gobject/optargs-umount.h \
+@@ -123,6 +124,7 @@ guestfs_gobject_sources= \
+   src/optargs-inspect_get_icon.c \
+   src/optargs-mount_local.c \
+   src/optargs-umount_local.c \
++  src/optargs-add_drive_scratch.c \
+   src/optargs-is_file.c \
+   src/optargs-is_dir.c \
+   src/optargs-umount.c \
+diff --git a/po/POTFILES b/po/POTFILES
+index bc4be6f..e2e63a2 100644
+--- a/po/POTFILES
++++ b/po/POTFILES
+@@ -150,6 +150,7 @@ fuse/guestunmount.c
+ fuse/test-guestunmount-fd.c
+ gobject/src/optargs-add_domain.c
+ gobject/src/optargs-add_drive.c
++gobject/src/optargs-add_drive_scratch.c
+ gobject/src/optargs-btrfs_filesystem_resize.c
+ gobject/src/optargs-btrfs_fsck.c
+ gobject/src/optargs-compress_device_out.c
+diff --git a/src/drives.c b/src/drives.c
+index df6f7e0..3854961 100644
+--- a/src/drives.c
++++ b/src/drives.c
+@@ -33,6 +33,7 @@
+ #include <netdb.h>
+ #include <arpa/inet.h>
+ #include <assert.h>
++#include <sys/types.h>
+ 
+ #include <pcre.h>
+ 
+@@ -1072,6 +1073,58 @@ guestfs__add_drive_ro_with_if (guestfs_h *g, const char *filename,
+ }
+ 
+ int
++guestfs__add_drive_scratch (guestfs_h *g, int64_t size,
++                                 const struct guestfs_add_drive_scratch_argv *optargs)
++{
++  struct guestfs_add_drive_opts_argv add_drive_optargs;
++  CLEANUP_FREE char *filename = NULL;
++  int fd;
++
++  /* Some parameters we always set. */
++  add_drive_optargs.bitmask = GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK;
++  add_drive_optargs.format = "raw";
++
++  /* Copy the optional arguments through to guestfs_add_drive_opts. */
++  if (optargs->bitmask & GUESTFS_ADD_DRIVE_SCRATCH_NAME_BITMASK) {
++    add_drive_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_NAME_BITMASK;
++    add_drive_optargs.name = optargs->name;
++  }
++  if (optargs->bitmask & GUESTFS_ADD_DRIVE_SCRATCH_LABEL_BITMASK) {
++    add_drive_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_LABEL_BITMASK;
++    add_drive_optargs.label = optargs->label;
++  }
++
++  /* Create the temporary file.  We don't have to worry about cleanup
++   * because everything in g->tmpdir is 'rm -rf'd when the handle is
++   * closed.
++   */
++  if (guestfs___lazy_make_tmpdir (g) == -1)
++    return -1;
++  filename = safe_asprintf (g, "%s/scratch.%d", g->tmpdir, ++g->unique);
++
++  /* Create a raw format temporary disk. */
++  fd = open (filename, O_WRONLY|O_CREAT|O_TRUNC|O_NOCTTY|O_CLOEXEC, 0600);
++  if (fd == -1) {
++    perrorf (g, "open: %s", filename);
++    return -1;
++  }
++
++  if (ftruncate (fd, size) == -1) {
++    perrorf (g, "ftruncate: %s", filename);
++    close (fd);
++    return -1;
++  }
++
++  if (close (fd) == -1) {
++    perrorf (g, "close: %s", filename);
++    return -1;
++  }
++
++  /* Call guestfs_add_drive_opts to add the drive. */
++  return guestfs_add_drive_opts_argv (g, filename, &add_drive_optargs);
++}
++
++int
+ guestfs__add_cdrom (guestfs_h *g, const char *filename)
+ {
+   if (strchr (filename, ':') != NULL) {
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0003-daemon-Implement-set-label-for-XFS-and-fix-it-for-bt.patch b/SOURCES/0003-daemon-Implement-set-label-for-XFS-and-fix-it-for-bt.patch
new file mode 100644
index 0000000..33f8bea
--- /dev/null
+++ b/SOURCES/0003-daemon-Implement-set-label-for-XFS-and-fix-it-for-bt.patch
@@ -0,0 +1,212 @@
+From 6d4a1c16c88e8a728183590fee2867aabe8a15d8 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Mon, 22 Jul 2013 11:29:42 +0100
+Subject: [PATCH] daemon: Implement set-label for XFS and fix it for btrfs
+ (RHBZ#986875).
+
+Implement 'set-label' for XFS filesystems.
+
+Fix the call for btrfs.  Previous
+commit d5817537fa6c51a7f851ecc5e4e63e60609e0c03 added some bogus
+documentation implying this call would work for btrfs, but it did
+not.
+
+Add tests.
+
+(cherry picked from commit 091d22f49e7fcb53fb3bb23e2ba94ca12eb88eab)
+---
+ Makefile.am                    |  1 +
+ configure.ac                   |  1 +
+ tests/btrfs/Makefile.am        |  1 +
+ tests/btrfs/test-btrfs-misc.pl | 51 ++++++++++++++++++++++++++++++++++++++++++
+ tests/xfs/Makefile.am          | 26 +++++++++++++++++++++
+ tests/xfs/test-xfs-misc.pl     | 50 +++++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 130 insertions(+)
+ create mode 100755 tests/btrfs/test-btrfs-misc.pl
+ create mode 100644 tests/xfs/Makefile.am
+ create mode 100755 tests/xfs/test-xfs-misc.pl
+
+diff --git a/Makefile.am b/Makefile.am
+index de747b0..c36f028 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -49,6 +49,7 @@ SUBDIRS += tests/md
+ SUBDIRS += tests/selinux
+ SUBDIRS += tests/ntfsclone
+ SUBDIRS += tests/btrfs
++SUBDIRS += tests/xfs
+ SUBDIRS += tests/charsets
+ SUBDIRS += tests/xml
+ SUBDIRS += tests/mount-local
+diff --git a/configure.ac b/configure.ac
+index 62d558f..75232e8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1654,6 +1654,7 @@ AC_CONFIG_FILES([Makefile
+                  tests/selinux/Makefile
+                  tests/syslinux/Makefile
+                  tests/tmpdirs/Makefile
++                 tests/xfs/Makefile
+                  tests/xml/Makefile
+                  tools/Makefile])
+ AC_OUTPUT
+diff --git a/tests/btrfs/Makefile.am b/tests/btrfs/Makefile.am
+index 32a2d65..87854ac 100644
+--- a/tests/btrfs/Makefile.am
++++ b/tests/btrfs/Makefile.am
+@@ -18,6 +18,7 @@
+ include $(top_srcdir)/subdir-rules.mk
+ 
+ TESTS = \
++	test-btrfs-misc.pl \
+ 	test-btrfs-devices.sh \
+ 	test-btrfs-subvolume-default.pl
+ 
+diff --git a/tests/btrfs/test-btrfs-misc.pl b/tests/btrfs/test-btrfs-misc.pl
+new file mode 100755
+index 0000000..2fe7c59
+--- /dev/null
++++ b/tests/btrfs/test-btrfs-misc.pl
+@@ -0,0 +1,51 @@
++#!/usr/bin/perl
++# libguestfs
++# Copyright (C) 2013 Red Hat Inc.
++#
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++
++# Miscellaneous btrfs features.
++
++use strict;
++use warnings;
++
++use Sys::Guestfs;
++
++# Allow the test to be skipped since btrfs is often broken.
++exit 77 if $ENV{SKIP_TEST_BTRFS_MISC_PL};
++
++my $g = Sys::Guestfs->new ();
++
++$g->add_drive_scratch (1024*1024*1024);
++$g->launch ();
++
++# If btrfs is not available, bail.
++unless ($g->feature_available (["btrfs"])) {
++    warn "$0: skipping test because btrfs is not available\n";
++    exit 77;
++}
++
++$g->part_disk ("/dev/sda", "mbr");
++
++$g->mkfs_btrfs (["/dev/sda1"]);
++
++# Setting label.
++$g->set_label ("/dev/sda1", "newlabel");
++my $label = $g->vfs_label ("/dev/sda1");
++die "unexpected label: expecting 'newlabel' but got '$label'"
++    unless $label eq "newlabel";
++
++$g->shutdown ();
++$g->close ();
+diff --git a/tests/xfs/Makefile.am b/tests/xfs/Makefile.am
+new file mode 100644
+index 0000000..fbe0e15
+--- /dev/null
++++ b/tests/xfs/Makefile.am
+@@ -0,0 +1,26 @@
++# libguestfs
++# Copyright (C) 2013 Red Hat Inc.
++#
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++
++include $(top_srcdir)/subdir-rules.mk
++
++TESTS = \
++	test-xfs-misc.pl
++
++TESTS_ENVIRONMENT = $(top_builddir)/run --test
++
++EXTRA_DIST = \
++	$(TESTS)
+diff --git a/tests/xfs/test-xfs-misc.pl b/tests/xfs/test-xfs-misc.pl
+new file mode 100755
+index 0000000..4036708
+--- /dev/null
++++ b/tests/xfs/test-xfs-misc.pl
+@@ -0,0 +1,50 @@
++#!/usr/bin/perl
++# libguestfs
++# Copyright (C) 2013 Red Hat Inc.
++#
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++
++# Miscellaneous xfs features.
++
++use strict;
++use warnings;
++
++use Sys::Guestfs;
++
++exit 77 if $ENV{SKIP_TEST_XFS_MISC_PL};
++
++my $g = Sys::Guestfs->new ();
++
++$g->add_drive_scratch (1024*1024*1024);
++$g->launch ();
++
++# If xfs is not available, bail.
++unless ($g->feature_available (["xfs"])) {
++    warn "$0: skipping test because xfs is not available\n";
++    exit 77;
++}
++
++$g->part_disk ("/dev/sda", "mbr");
++
++$g->mkfs ("xfs", "/dev/sda1");
++
++# Setting label.
++$g->set_label ("/dev/sda1", "newlabel");
++my $label = $g->vfs_label ("/dev/sda1");
++die "unexpected label: expecting 'newlabel' but got '$label'"
++    unless $label eq "newlabel";
++
++$g->shutdown ();
++$g->close ();
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0004-New-API-Implement-set-uuid-for-ext2-3-4-and-XFS-RHBZ.patch b/SOURCES/0004-New-API-Implement-set-uuid-for-ext2-3-4-and-XFS-RHBZ.patch
new file mode 100644
index 0000000..347261a
--- /dev/null
+++ b/SOURCES/0004-New-API-Implement-set-uuid-for-ext2-3-4-and-XFS-RHBZ.patch
@@ -0,0 +1,254 @@
+From b2f75a3168d2d84ecf76c2544e23514ac8cc13a3 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Mon, 22 Jul 2013 12:41:47 +0100
+Subject: [PATCH] New API: Implement set-uuid for ext2/3/4 and XFS
+ (RHBZ#986877).
+
+Also includes tests.
+
+(cherry picked from commit 8580ef7d0f2aac2118fa7b4055f3eb28cd127093)
+---
+ daemon/Makefile.am         |   1 +
+ daemon/blkid.c             |   2 +-
+ daemon/daemon.h            |   3 ++
+ daemon/uuids.c             | 101 +++++++++++++++++++++++++++++++++++++++++++++
+ generator/actions.ml       |  23 ++++++++++-
+ po/POTFILES                |   1 +
+ src/MAX_PROC_NR            |   2 +-
+ tests/xfs/test-xfs-misc.pl |   7 ++++
+ 8 files changed, 136 insertions(+), 4 deletions(-)
+ create mode 100644 daemon/uuids.c
+
+diff --git a/daemon/Makefile.am b/daemon/Makefile.am
+index 7889aec..d077dab 100644
+--- a/daemon/Makefile.am
++++ b/daemon/Makefile.am
+@@ -168,6 +168,7 @@ guestfsd_SOURCES = \
+ 	upload.c \
+ 	utimens.c \
+ 	utsname.c \
++	uuids.c \
+ 	wc.c \
+ 	xattr.c \
+ 	xfs.c \
+diff --git a/daemon/blkid.c b/daemon/blkid.c
+index 01ee044..d52f6c5 100644
+--- a/daemon/blkid.c
++++ b/daemon/blkid.c
+@@ -29,7 +29,7 @@
+ 
+ GUESTFSD_EXT_CMD(str_blkid, blkid);
+ 
+-static char *
++char *
+ get_blkid_tag (const char *device, const char *tag)
+ {
+   char *out;
+diff --git a/daemon/daemon.h b/daemon/daemon.h
+index 9a32bea..c93d620 100644
+--- a/daemon/daemon.h
++++ b/daemon/daemon.h
+@@ -209,6 +209,9 @@ extern int sync_disks (void);
+ #define EXT2_LABEL_MAX 16
+ extern int fstype_is_extfs (const char *fstype);
+ 
++/*-- in blkid.c --*/
++extern char *get_blkid_tag (const char *device, const char *tag);
++
+ /*-- in lvm.c --*/
+ extern int lv_canonical (const char *device, char **ret);
+ 
+diff --git a/daemon/uuids.c b/daemon/uuids.c
+new file mode 100644
+index 0000000..672f3db
+--- /dev/null
++++ b/daemon/uuids.c
+@@ -0,0 +1,101 @@
++/* libguestfs - the guestfsd daemon
++ * Copyright (C) 2013 Red Hat Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++ */
++
++#include <config.h>
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++
++#include "daemon.h"
++#include "actions.h"
++#include "optgroups.h"
++
++GUESTFSD_EXT_CMD(str_tune2fs, tune2fs);
++GUESTFSD_EXT_CMD(str_xfs_admin, xfs_admin);
++
++static int
++e2uuid (const char *device, const char *uuid)
++{
++  int r;
++  CLEANUP_FREE char *err = NULL;
++
++  /* Don't allow the magic values here.  If callers want to do this
++   * we'll add alternate set_uuid_* calls.
++   */
++  if (STREQ (uuid, "clear") || STREQ (uuid, "random") ||
++      STREQ (uuid, "time")) {
++    reply_with_error ("e2: invalid new UUID");
++    return -1;
++  }
++
++  r = command (NULL, &err, str_tune2fs, "-U", uuid, device, NULL);
++  if (r == -1) {
++    reply_with_error ("%s", err);
++    return -1;
++  }
++
++  return 0;
++}
++
++static int
++xfsuuid (const char *device, const char *uuid)
++{
++  int r;
++  CLEANUP_FREE char *err = NULL;
++
++  /* Don't allow special values. */
++  if (STREQ (uuid, "nil") || STREQ (uuid, "generate")) {
++    reply_with_error ("xfs: invalid new UUID");
++    return -1;
++  }
++
++  r = command (NULL, &err, str_xfs_admin, "-U", uuid, device, NULL);
++  if (r == -1) {
++    reply_with_error ("%s", err);
++    return -1;
++  }
++
++  return 0;
++}
++
++int
++do_set_uuid (const char *device, const char *uuid)
++{
++  int r;
++
++  /* How we set the UUID depends on the filesystem type. */
++  CLEANUP_FREE char *vfs_type = get_blkid_tag (device, "TYPE");
++  if (vfs_type == NULL)
++    return -1;
++
++  if (fstype_is_extfs (vfs_type))
++    r = e2uuid (device, uuid);
++
++  else if (STREQ (vfs_type, "xfs"))
++    r = xfsuuid (device, uuid);
++
++  else {
++    reply_with_error ("don't know how to set the UUID for '%s' filesystems",
++                      vfs_type);
++    r = -1;
++  }
++
++  return r;
++}
+diff --git a/generator/actions.ml b/generator/actions.ml
+index eb09aa7..3b6e098 100644
+--- a/generator/actions.ml
++++ b/generator/actions.ml
+@@ -4742,6 +4742,7 @@ C<device>." };
+     name = "set_e2uuid";
+     style = RErr, [Device "device"; String "uuid"], [];
+     proc_nr = Some 82;
++    deprecated_by = Some "set_uuid";
+     tests =
+       (let uuid = uuidgen () in [
+         InitBasicFS, Always, TestResultString (
+@@ -4764,8 +4765,8 @@ C<device> to C<uuid>.  The format of the UUID and alternatives
+ such as C<clear>, C<random> and C<time> are described in the
+ L<tune2fs(8)> manpage.
+ 
+-You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid>
+-to return the existing UUID of a filesystem." };
++You can use C<guestfs_vfs_uuid> to return the existing UUID
++of a filesystem." };
+ 
+   { defaults with
+     name = "get_e2uuid";
+@@ -11300,6 +11301,24 @@ is useful when you don't want to preserve permissions, because
+ the target filesystem does not support it (primarily when
+ writing to DOS FAT filesystems)." };
+ 
++  { defaults with
++    name = "set_uuid";
++    style = RErr, [Device "device"; String "uuid"], [];
++    proc_nr = Some 403;
++    tests =
++      (let uuid = uuidgen () in [
++        InitBasicFS, Always, TestResultString (
++          [["set_uuid"; "/dev/sda1"; uuid];
++           ["vfs_uuid"; "/dev/sda1"]], uuid), [];
++      ]);
++    shortdesc = "set the filesystem UUID";
++    longdesc = "\
++Set the filesystem UIUD on C<device> to C<label>.
++
++Only some filesystem types support setting UUIDs.
++
++To read the UUID on a filesystem, call C<guestfs_vfs_uuid>." };
++
+ ]
+ 
+ (* Non-API meta-commands available only in guestfish.
+diff --git a/po/POTFILES b/po/POTFILES
+index e2e63a2..a88707a 100644
+--- a/po/POTFILES
++++ b/po/POTFILES
+@@ -92,6 +92,7 @@ daemon/umask.c
+ daemon/upload.c
+ daemon/utimens.c
+ daemon/utsname.c
++daemon/uuids.c
+ daemon/wc.c
+ daemon/xattr.c
+ daemon/xfs.c
+diff --git a/src/MAX_PROC_NR b/src/MAX_PROC_NR
+index 066cbfe..e1a29c1 100644
+--- a/src/MAX_PROC_NR
++++ b/src/MAX_PROC_NR
+@@ -1 +1 @@
+-401
++403
+diff --git a/tests/xfs/test-xfs-misc.pl b/tests/xfs/test-xfs-misc.pl
+index 4036708..1d09474 100755
+--- a/tests/xfs/test-xfs-misc.pl
++++ b/tests/xfs/test-xfs-misc.pl
+@@ -46,5 +46,12 @@ my $label = $g->vfs_label ("/dev/sda1");
+ die "unexpected label: expecting 'newlabel' but got '$label'"
+     unless $label eq "newlabel";
+ 
++# Setting UUID.
++my $newuuid = "01234567-0123-0123-0123-0123456789ab";
++$g->set_uuid ("/dev/sda1", $newuuid);
++my $uuid = $g->vfs_uuid ("/dev/sda1");
++die "unexpected UUID: expecting '$newuuid' but got '$uuid'"
++    unless $uuid eq $newuuid;
++
+ $g->shutdown ();
+ $g->close ();
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0005-docs-Document-labels-and-UUIDs-in-the-API-overview-s.patch b/SOURCES/0005-docs-Document-labels-and-UUIDs-in-the-API-overview-s.patch
new file mode 100644
index 0000000..c58026e
--- /dev/null
+++ b/SOURCES/0005-docs-Document-labels-and-UUIDs-in-the-API-overview-s.patch
@@ -0,0 +1,52 @@
+From 36cf82f0f7f4a0d2b56623d0c8130370658daf9d Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Mon, 22 Jul 2013 13:13:18 +0100
+Subject: [PATCH] docs: Document labels and UUIDs in the API overview section.
+
+(cherry picked from commit df02c2471f3fe94c691c389c17a5d23d052848dd)
+---
+ src/guestfs.pod | 28 ++++++++++++++++++++++++++++
+ 1 file changed, 28 insertions(+)
+
+diff --git a/src/guestfs.pod b/src/guestfs.pod
+index 65fb00f..0c57f50 100644
+--- a/src/guestfs.pod
++++ b/src/guestfs.pod
+@@ -526,6 +526,34 @@ L</guestfs_chmod> after creating each file or directory.
+ 
+ For more information about umask, see L<umask(2)>.
+ 
++=head2 LABELS AND UUIDS
++
++Many filesystems, devices and logical volumes support either labels
++(short strings like "BOOT" which might not be unique) and/or UUIDs
++(globally unique IDs).
++
++For filesystems, use L</guestfs_vfs_label> or L</guestfs_vfs_uuid> to
++read the label or UUID.  Some filesystems let you call
++L</guestfs_set_label> or L</guestfs_set_uuid> to change the label or
++UUID.
++
++You can locate a filesystem by its label or UUID using
++L</guestfs_findfs_label> or L</guestfs_findfs_uuid>.
++
++For LVM2 (which supports only UUIDs), there is a rich set of APIs for
++fetching UUIDs, fetching UUIDs of the contained objects, and changing
++UUIDs.  See:
++L</guestfs_lvuuid>,
++L</guestfs_vguuid>,
++L</guestfs_pvuuid>,
++L</guestfs_vglvuuids>,
++L</guestfs_vgpvuuids>,
++L</guestfs_vgchange_uuid>, L</guestfs_vgchange_uuid_all>,
++L</guestfs_pvchange_uuid>, L</guestfs_pvchange_uuid_all>.
++
++Note when cloning a filesystem, device or whole guest, it is a good
++idea to set new randomly generated UUIDs on the copy.
++
+ =head2 ENCRYPTED DISKS
+ 
+ Libguestfs allows you to access Linux guests which have been
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0006-sysprep-Add-new-fs-uuids-operation.patch b/SOURCES/0006-sysprep-Add-new-fs-uuids-operation.patch
new file mode 100644
index 0000000..0791ef4
--- /dev/null
+++ b/SOURCES/0006-sysprep-Add-new-fs-uuids-operation.patch
@@ -0,0 +1,137 @@
+From 883418f9a3e98eefaba4e9958f1b446270c034cf Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Mon, 22 Jul 2013 13:28:28 +0100
+Subject: [PATCH] sysprep: Add new fs-uuids operation.
+
+This creates new random UUIDs for all filesystems in a guest.
+
+Cherry picked from commit 8965368eb89532ac1613fffb0a3a661f005bae81
+and modified for virt-sysprep in libguestfs 1.22.
+---
+ po/POTFILES-ml                        |  1 +
+ resize/common_utils.ml                | 23 ++++++++++++++
+ sysprep/Makefile.am                   |  1 +
+ sysprep/sysprep_operation_fs_uuids.ml | 56 +++++++++++++++++++++++++++++++++++
+ 4 files changed, 81 insertions(+)
+ create mode 100644 sysprep/sysprep_operation_fs_uuids.ml
+
+diff --git a/po/POTFILES-ml b/po/POTFILES-ml
+index ba64fa3..6ea4ee2 100644
+--- a/po/POTFILES-ml
++++ b/po/POTFILES-ml
+@@ -20,6 +20,7 @@ sysprep/sysprep_operation_dhcp_server_state.ml
+ sysprep/sysprep_operation_dovecot_data.ml
+ sysprep/sysprep_operation_firstboot.ml
+ sysprep/sysprep_operation_flag_reconfiguration.ml
++sysprep/sysprep_operation_fs_uuids.ml
+ sysprep/sysprep_operation_hostname.ml
+ sysprep/sysprep_operation_kerberos_data.ml
+ sysprep/sysprep_operation_logfiles.ml
+diff --git a/resize/common_utils.ml b/resize/common_utils.ml
+index 0f71810..37da8df 100644
+--- a/resize/common_utils.ml
++++ b/resize/common_utils.ml
+@@ -252,3 +252,26 @@ let display_long_options () =
+         printf "%s\n" arg
+   ) !long_options;
+   exit 0
++
++let uuidgen () =
++  let cmd = "uuidgen -r" in
++  let chan = Unix.open_process_in cmd in
++  let uuid = input_line chan in
++  let stat = Unix.close_process_in chan in
++  (match stat with
++  | Unix.WEXITED 0 -> ()
++  | Unix.WEXITED i ->
++    error (f_"external command '%s' exited with error %d") cmd i
++  | Unix.WSIGNALED i ->
++    error (f_"external command '%s' killed by signal %d") cmd i
++  | Unix.WSTOPPED i ->
++    error (f_"external command '%s' stopped by signal %d") cmd i
++  );
++  let len = String.length uuid in
++  let uuid, len =
++    if len > 0 && uuid.[len-1] = '\n' then
++      String.sub uuid 0 (len-1), len-1
++    else
++      uuid, len in
++  if len < 10 then assert false; (* sanity check on uuidgen *)
++  uuid
+diff --git a/sysprep/Makefile.am b/sysprep/Makefile.am
+index 6bc5873..3060587 100644
+--- a/sysprep/Makefile.am
++++ b/sysprep/Makefile.am
+@@ -41,6 +41,7 @@ operations = \
+ 	dovecot_data \
+ 	flag_reconfiguration \
+ 	firstboot \
++	fs_uuids \
+ 	hostname \
+ 	kerberos_data \
+ 	lvm_uuids \
+diff --git a/sysprep/sysprep_operation_fs_uuids.ml b/sysprep/sysprep_operation_fs_uuids.ml
+new file mode 100644
+index 0000000..3c319f0
+--- /dev/null
++++ b/sysprep/sysprep_operation_fs_uuids.ml
+@@ -0,0 +1,56 @@
++(* virt-sysprep
++ * Copyright (C) 2013 Red Hat Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program; if not, write to the Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++ *)
++
++open Printf
++
++open Sysprep_operation
++open Common_gettext.Gettext
++
++module G = Guestfs
++
++let rec fs_uuids_perform g root =
++  let fses = g#list_filesystems () in
++  List.iter (function
++  | _, "unknown" -> ()
++  | _, "swap" ->
++    (* XXX Not implemented *) ()
++  | dev, typ ->
++    let new_uuid = Common_utils.uuidgen () in
++    try
++      g#set_uuid dev new_uuid
++    with
++      G.Error msg ->
++        eprintf (f_"warning: cannot set random UUID on filesystem %s type %s: %s\n")
++          dev typ msg
++  ) fses;
++  []
++
++let fs_uuids_op = {
++  name = "fs-uuids";
++  enabled_by_default = true;
++  heading = s_"Change filesystem UUIDs";
++  pod_description = Some (s_"\
++On guests and filesystem types where this is supported,
++new random UUIDs are generated and assigned to filesystems.");
++  pod_notes = None;
++  extra_args = [];
++  perform_on_filesystems = None;
++  perform_on_devices = Some fs_uuids_perform;
++}
++
++let () = register_operation fs_uuids_op
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0007-sysprep-Disable-fs-uuids-operation-by-default.patch b/SOURCES/0007-sysprep-Disable-fs-uuids-operation-by-default.patch
new file mode 100644
index 0000000..4883fbe
--- /dev/null
+++ b/SOURCES/0007-sysprep-Disable-fs-uuids-operation-by-default.patch
@@ -0,0 +1,40 @@
+From 54a616cfb842a8203e03ff1db54a179d6ca133ce Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Fri, 2 Aug 2013 15:16:10 +0100
+Subject: [PATCH] sysprep: Disable fs-uuids operation by default.
+
+Disable this operation because it is more likely than not to break
+Linux guests.
+
+To fix this properly will involve finding all the places in the guest
+where the UUIDs are used to locate and mount filesystems,
+eg. /etc/fstab and possibly initramfs.
+
+This updates commit 8965368eb89532ac1613fffb0a3a661f005bae81.
+
+(cherry picked from commit 5deea7fce675edb6803cd83a699b80e8ea383488)
+---
+ sysprep/sysprep_operation_fs_uuids.ml | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/sysprep/sysprep_operation_fs_uuids.ml b/sysprep/sysprep_operation_fs_uuids.ml
+index 3c319f0..9cdf576 100644
+--- a/sysprep/sysprep_operation_fs_uuids.ml
++++ b/sysprep/sysprep_operation_fs_uuids.ml
+@@ -42,7 +42,12 @@ let rec fs_uuids_perform g root =
+ 
+ let fs_uuids_op = {
+   name = "fs-uuids";
+-  enabled_by_default = true;
++  (* NB: This is disabled by default now because doing this
++   * properly requires us to find all places in the image
++   * where the UUID might be used.  This includes /etc/fstab
++   * and possibly the initramfs.  XXX
++   *)
++  enabled_by_default = false;
+   heading = s_"Change filesystem UUIDs";
+   pod_description = Some (s_"\
+ On guests and filesystem types where this is supported,
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0008-New-API-remount-Allow-rw-flag-to-be-adjusted-on-moun.patch b/SOURCES/0008-New-API-remount-Allow-rw-flag-to-be-adjusted-on-moun.patch
new file mode 100644
index 0000000..9e48b32
--- /dev/null
+++ b/SOURCES/0008-New-API-remount-Allow-rw-flag-to-be-adjusted-on-moun.patch
@@ -0,0 +1,129 @@
+From 511c8f0f0d3b51ce3cf37d344566f0a6b2051a21 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Fri, 31 May 2013 14:36:08 +0100
+Subject: [PATCH] New API: remount: Allow rw flag to be adjusted on mounted
+ filesystem.
+
+(cherry picked from commit 2019d0e9c7cd4b927cb98fe96d97e945dd4847e0)
+---
+ daemon/mount.c       | 35 +++++++++++++++++++++++++++++++++++
+ generator/actions.ml | 22 ++++++++++++++++++++++
+ gobject/Makefile.inc |  6 ++++--
+ po/POTFILES          |  1 +
+ 4 files changed, 62 insertions(+), 2 deletions(-)
+
+diff --git a/daemon/mount.c b/daemon/mount.c
+index b89bb88..0ad9995 100644
+--- a/daemon/mount.c
++++ b/daemon/mount.c
+@@ -458,6 +458,41 @@ do_mount_loop (const char *file, const char *mountpoint)
+   return 0;
+ }
+ 
++/* Takes optional arguments, consult optargs_bitmask. */
++int
++do_remount (const char *mountpoint, int rw)
++{
++  CLEANUP_FREE char *mp = NULL, *err = NULL;
++  const char *options;
++  int r;
++
++  /* In future we'll allow other flags / parameters to be adjusted.
++   * For now we just have to check rw was passed, but in future it
++   * will genuinely be an optional argument.
++   */
++  if (!(optargs_bitmask & GUESTFS_REMOUNT_RW_BITMASK)) {
++    reply_with_error ("parameter 'rw' must be specified");
++    return -1;
++  }
++  options = rw ? "remount,rw" : "remount,ro";
++
++  mp = sysroot_path (mountpoint);
++  if (!mp) {
++    reply_with_perror ("malloc");
++    return -1;
++  }
++
++  /* XXX Do we need to check the mountpoint exists? */
++
++  r = command (NULL, &err, str_mount, "-o", options, mp, NULL);
++  if (r == -1) {
++    reply_with_error ("%s: %s: %s", mountpoint, options, err);
++    return -1;
++  }
++
++  return 0;
++}
++
+ /* Specialized calls mkmountpoint and rmmountpoint are really
+  * variations on mkdir and rmdir which do no checking of the
+  * is_root_mounted() flag.
+diff --git a/generator/actions.ml b/generator/actions.ml
+index 3b6e098..302d61b 100644
+--- a/generator/actions.ml
++++ b/generator/actions.ml
+@@ -11302,6 +11302,28 @@ the target filesystem does not support it (primarily when
+ writing to DOS FAT filesystems)." };
+ 
+   { defaults with
++    name = "remount";
++    style = RErr, [Pathname "mountpoint"], [OBool "rw"];
++    proc_nr = Some 402;
++    tests = [
++      InitScratchFS, Always, TestLastFail (
++        [["remount"; "/"; "false"];
++         ["write"; "/remount1"; "data"]]), [];
++      InitScratchFS, Always, TestRun (
++        [["remount"; "/"; "false"];
++         ["remount"; "/"; "true"];
++         ["write"; "/remount2"; "data"]]), []
++    ];
++    shortdesc = "remount a filesystem with different options";
++    longdesc = "\
++This call allows you to change the C<rw> (readonly/read-write)
++flag on an already mounted filesystem at C<mountpoint>,
++converting a readonly filesystem to be read-write, or vice-versa.
++
++Note that at the moment you must supply the \"optional\" C<rw>
++parameter.  In future we may allow other flags to be adjusted." };
++
++  { defaults with
+     name = "set_uuid";
+     style = RErr, [Device "device"; String "uuid"], [];
+     proc_nr = Some 403;
+diff --git a/gobject/Makefile.inc b/gobject/Makefile.inc
+index 17da527..19c771f 100644
+--- a/gobject/Makefile.inc
++++ b/gobject/Makefile.inc
+@@ -91,7 +91,8 @@ guestfs_gobject_headers= \
+   include/guestfs-gobject/optargs-xfs_repair.h \
+   include/guestfs-gobject/optargs-mke2fs.h \
+   include/guestfs-gobject/optargs-mktemp.h \
+-  include/guestfs-gobject/optargs-syslinux.h
++  include/guestfs-gobject/optargs-syslinux.h \
++  include/guestfs-gobject/optargs-remount.h
+ 
+ guestfs_gobject_sources= \
+   src/session.c \
+@@ -164,4 +165,5 @@ guestfs_gobject_sources= \
+   src/optargs-xfs_repair.c \
+   src/optargs-mke2fs.c \
+   src/optargs-mktemp.c \
+-  src/optargs-syslinux.c
++  src/optargs-syslinux.c \
++  src/optargs-remount.c
+diff --git a/po/POTFILES b/po/POTFILES
+index a88707a..53b660d 100644
+--- a/po/POTFILES
++++ b/po/POTFILES
+@@ -185,6 +185,7 @@ gobject/src/optargs-mount_local.c
+ gobject/src/optargs-ntfsclone_out.c
+ gobject/src/optargs-ntfsfix.c
+ gobject/src/optargs-ntfsresize.c
++gobject/src/optargs-remount.c
+ gobject/src/optargs-rsync.c
+ gobject/src/optargs-rsync_in.c
+ gobject/src/optargs-rsync_out.c
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0009-launch-direct-Specify-cpu-host-kvmclock.patch b/SOURCES/0009-launch-direct-Specify-cpu-host-kvmclock.patch
new file mode 100644
index 0000000..fe1932a
--- /dev/null
+++ b/SOURCES/0009-launch-direct-Specify-cpu-host-kvmclock.patch
@@ -0,0 +1,60 @@
+From b385c694f1028413c36188ae99279ed0d56bccd5 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Mon, 5 Aug 2013 16:35:47 +0100
+Subject: [PATCH] launch: direct: Specify -cpu host,+kvmclock.
+
+'-cpu host' makes the CPU look like the host CPU.  This is useful
+because it means the appliance can use all the host CPU's features,
+eg. for fast checksumming or MD XORing.
+
+'kvmclock' is the paravirtualized clock for qemu/KVM.  It's much more
+stable than relying on tsc or a virtualized device such as HPET, and
+clock instability is one of the problems we have encountered when
+running libguestfs on a heavily loaded machine, especially in a nested VM.
+
+Note that we require qemu >= 1.2 (and have for a while) which has long
+supported both of these options.
+
+(cherry picked from commit 038ed0a08eaed33e62a27c9f91780a25de0bc08c)
+---
+ TODO                | 8 --------
+ src/launch-direct.c | 4 ++++
+ 2 files changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/TODO b/TODO
+index 0a8cf57..61cde40 100644
+--- a/TODO
++++ b/TODO
+@@ -477,14 +477,6 @@ image would be replaced by equivalent files of zeroes, thus minimizing
+ the size of the debug image that needs to be shipped to us by the
+ customer.
+ 
+-Optimize the appliance
+-----------------------
+-
+-Pass -cpu host.  Anything else?
+-
+-[The libvirt backend uses 'host-model' which is basically
+-the same as this]
+-
+ Sort out partitioning
+ ---------------------
+ 
+diff --git a/src/launch-direct.c b/src/launch-direct.c
+index f1edb53..90d0df9 100644
+--- a/src/launch-direct.c
++++ b/src/launch-direct.c
+@@ -315,6 +315,10 @@ launch_direct (guestfs_h *g, const char *arg)
+         add_cmdline (g, "-enable-kvm");
+     }
+ 
++    /* Specify the host CPU for speed, and kvmclock for stability. */
++    add_cmdline (g, "-cpu");
++    add_cmdline (g, "host,+kvmclock");
++
+     if (g->smp > 1) {
+       snprintf (buf, sizeof buf, "%d", g->smp);
+       add_cmdline (g, "-smp");
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0010-launch-direct-Don-t-use-cpu-host-on-TCG.patch b/SOURCES/0010-launch-direct-Don-t-use-cpu-host-on-TCG.patch
new file mode 100644
index 0000000..70534f6
--- /dev/null
+++ b/SOURCES/0010-launch-direct-Don-t-use-cpu-host-on-TCG.patch
@@ -0,0 +1,98 @@
+From 75ea7130586243c500d6e27d26942facf516226f Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Wed, 14 Aug 2013 15:08:04 +0100
+Subject: [PATCH] launch: direct: Don't use -cpu host on TCG.
+
+qemu -cpu \? documents this as:
+
+host  KVM processor with all supported host features (only available in KVM mode)
+
+And indeed if you try it with TCG you'll get this error:
+
+Unable to find CPU definition: host
+
+This fixes commit 038ed0a08eaed33e62a27c9f91780a25de0bc08c.
+
+(cherry picked from commit c53b459fdd7fc340f48a76496b7e7e18256a2d64)
+---
+ src/launch-direct.c | 39 ++++++++++++++++++++++++++-------------
+ 1 file changed, 26 insertions(+), 13 deletions(-)
+
+diff --git a/src/launch-direct.c b/src/launch-direct.c
+index 90d0df9..299a3d9 100644
+--- a/src/launch-direct.c
++++ b/src/launch-direct.c
+@@ -20,6 +20,7 @@
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <stdbool.h>
+ #include <stdint.h>
+ #include <inttypes.h>
+ #include <unistd.h>
+@@ -258,6 +259,7 @@ launch_direct (guestfs_h *g, const char *arg)
+     char buf[256];
+     int virtio_scsi = qemu_supports_virtio_scsi (g);
+     struct qemu_param *qp;
++    bool has_kvm;
+ 
+     /* Set up the full command line.  Do this in the subprocess so we
+      * don't need to worry about cleaning up.
+@@ -290,6 +292,14 @@ launch_direct (guestfs_h *g, const char *arg)
+ 
+     add_cmdline (g, "-nographic");
+ 
++    /* Try to guess if KVM is available.  We are just checking that
++     * /dev/kvm is openable.  That's not reliable, since /dev/kvm
++     * might be openable by qemu but not by us (think: SELinux) in
++     * which case the user would not get hardware virtualization,
++     * although at least shouldn't fail.
++     */
++    has_kvm = is_openable (g, "/dev/kvm", O_RDWR|O_CLOEXEC);
++
+     /* The qemu -machine option (added 2010-12) is a bit more sane
+      * since it falls back through various different acceleration
+      * modes, so try that first (thanks Markus Armbruster).
+@@ -301,23 +311,26 @@ launch_direct (guestfs_h *g, const char *arg)
+       /* qemu sometimes needs this option to enable hardware
+        * virtualization, but some versions of 'qemu-kvm' will use KVM
+        * regardless (even where this option appears in the help text).
+-       * It is rumoured that there are versions of qemu where supplying
+-       * this option when hardware virtualization is not available will
+-       * cause qemu to fail, so we we have to check at least that
+-       * /dev/kvm is openable.  That's not reliable, since /dev/kvm
+-       * might be openable by qemu but not by us (think: SELinux) in
+-       * which case the user would not get hardware virtualization,
+-       * although at least shouldn't fail.  A giant clusterfuck with the
+-       * qemu command line, again.
++       * It is rumoured that there are versions of qemu where
++       * supplying this option when hardware virtualization is not
++       * available will cause qemu to fail.  A giant clusterfuck with
++       * the qemu command line, again.
+        */
+-      if (qemu_supports (g, "-enable-kvm") &&
+-          is_openable (g, "/dev/kvm", O_RDWR|O_CLOEXEC))
++      if (qemu_supports (g, "-enable-kvm") && has_kvm)
+         add_cmdline (g, "-enable-kvm");
+     }
+ 
+-    /* Specify the host CPU for speed, and kvmclock for stability. */
+-    add_cmdline (g, "-cpu");
+-    add_cmdline (g, "host,+kvmclock");
++    /* -cpu host only works if KVM is available. */
++    if (has_kvm) {
++      /* Specify the host CPU for speed, and kvmclock for stability. */
++      add_cmdline (g, "-cpu");
++      add_cmdline (g, "host,+kvmclock");
++    } else {
++      /* Specify default CPU for speed, and kvmclock for stability. */
++      snprintf (buf, sizeof buf, "qemu%d,+kvmclock", SIZEOF_LONG*8);
++      add_cmdline (g, "-cpu");
++      add_cmdline (g, buf);
++    }
+ 
+     if (g->smp > 1) {
+       snprintf (buf, sizeof buf, "%d", g->smp);
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0011-launch-libvirt-Enable-cpu-mode-host-model.patch b/SOURCES/0011-launch-libvirt-Enable-cpu-mode-host-model.patch
new file mode 100644
index 0000000..3c5848b
--- /dev/null
+++ b/SOURCES/0011-launch-libvirt-Enable-cpu-mode-host-model.patch
@@ -0,0 +1,45 @@
+From 00b829acdf83904e5fbae21130853247b36f2348 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Mon, 5 Aug 2013 16:42:43 +0100
+Subject: [PATCH] launch: libvirt: Enable <cpu mode=host-model>.
+
+This may still cause problems on some CPUs because of a bug
+in libvirt.  See:
+https://bugzilla.redhat.com/show_bug.cgi?id=870071
+
+(cherry picked from commit 6f76fdb41eb6bd124fbc3d084f5c2a3371b37d9b)
+---
+ src/launch-libvirt.c | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
+index 6fcb880..e6f6b0b 100644
+--- a/src/launch-libvirt.c
++++ b/src/launch-libvirt.c
+@@ -820,13 +820,10 @@ construct_libvirt_xml_cpu (guestfs_h *g,
+   XMLERROR (-1, xmlTextWriterWriteFormatString (xo, "%d", g->memsize));
+   XMLERROR (-1, xmlTextWriterEndElement (xo));
+ 
+-  /* It would be faster to pass the CPU host model to the appliance,
++  /* It is faster to pass the CPU host model to the appliance,
+    * allowing maximum speed for things like checksums, encryption.
+-   * However this doesn't work because KVM doesn't emulate all of the
+-   * required guest insns (RHBZ#870071).  This is why the following
+-   * section is commented out.
++   * Note this may cause problems on some CPUs.  See: RHBZ#870071.
+    */
+-#if 0
+   XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "cpu"));
+   XMLERROR (-1,
+             xmlTextWriterWriteAttribute (xo, BAD_CAST "mode",
+@@ -837,7 +834,6 @@ construct_libvirt_xml_cpu (guestfs_h *g,
+                                          BAD_CAST "allow"));
+   XMLERROR (-1, xmlTextWriterEndElement (xo));
+   XMLERROR (-1, xmlTextWriterEndElement (xo));
+-#endif
+ 
+   XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "vcpu"));
+   XMLERROR (-1, xmlTextWriterWriteFormatString (xo, "%d", g->smp));
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0012-launch-libvirt-Don-t-enable-cpu-mode-host-model-on-T.patch b/SOURCES/0012-launch-libvirt-Don-t-enable-cpu-mode-host-model-on-T.patch
new file mode 100644
index 0000000..c98e95c
--- /dev/null
+++ b/SOURCES/0012-launch-libvirt-Don-t-enable-cpu-mode-host-model-on-T.patch
@@ -0,0 +1,55 @@
+From 1d7136f27bb842dde00a2ec0dc2943eb16588cb4 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Wed, 14 Aug 2013 15:25:17 +0100
+Subject: [PATCH] launch: libvirt: Don't enable <cpu mode="host-model"> on TCG.
+
+It's fairly pointless to do this with TCG, since all we would be doing
+is emulating a more complicated processor slowly.  Also it may be the
+cause of subtle problems we see during testing.
+
+This updates commit 6f76fdb41eb6bd124fbc3d084f5c2a3371b37d9b.
+
+(cherry picked from commit 46763bcc0b9d04ada367f29ca07bd3e11e264a8e)
+---
+ src/launch-libvirt.c | 24 ++++++++++++++----------
+ 1 file changed, 14 insertions(+), 10 deletions(-)
+
+diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
+index e6f6b0b..ff3d720 100644
+--- a/src/launch-libvirt.c
++++ b/src/launch-libvirt.c
+@@ -823,17 +823,21 @@ construct_libvirt_xml_cpu (guestfs_h *g,
+   /* It is faster to pass the CPU host model to the appliance,
+    * allowing maximum speed for things like checksums, encryption.
+    * Note this may cause problems on some CPUs.  See: RHBZ#870071.
++   * Only do this with KVM.  It is broken in subtle ways on TCG, and
++   * fairly pointless anyway.
+    */
+-  XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "cpu"));
+-  XMLERROR (-1,
+-            xmlTextWriterWriteAttribute (xo, BAD_CAST "mode",
+-                                         BAD_CAST "host-model"));
+-  XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "model"));
+-  XMLERROR (-1,
+-            xmlTextWriterWriteAttribute (xo, BAD_CAST "fallback",
+-                                         BAD_CAST "allow"));
+-  XMLERROR (-1, xmlTextWriterEndElement (xo));
+-  XMLERROR (-1, xmlTextWriterEndElement (xo));
++  if (params->is_kvm) {
++    XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "cpu"));
++    XMLERROR (-1,
++	      xmlTextWriterWriteAttribute (xo, BAD_CAST "mode",
++					   BAD_CAST "host-model"));
++    XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "model"));
++    XMLERROR (-1,
++	      xmlTextWriterWriteAttribute (xo, BAD_CAST "fallback",
++					   BAD_CAST "allow"));
++    XMLERROR (-1, xmlTextWriterEndElement (xo));
++    XMLERROR (-1, xmlTextWriterEndElement (xo));
++  }
+ 
+   XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "vcpu"));
+   XMLERROR (-1, xmlTextWriterWriteFormatString (xo, "%d", g->smp));
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0013-daemon-tar-Use-a-temporary-file-to-pass-excludes-to-.patch b/SOURCES/0013-daemon-tar-Use-a-temporary-file-to-pass-excludes-to-.patch
new file mode 100644
index 0000000..8da7a58
--- /dev/null
+++ b/SOURCES/0013-daemon-tar-Use-a-temporary-file-to-pass-excludes-to-.patch
@@ -0,0 +1,144 @@
+From a9492cf1a031ddcec9d2e6f879731bc49122e7e1 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Thu, 29 Aug 2013 13:26:51 +0100
+Subject: [PATCH] daemon: tar: Use a temporary file to pass excludes to tar
+ command (RHBZ#1001875).
+
+Use tar -X option instead of tar --exclude=... option.
+
+(cherry picked from commit 91c162586cc2170ea224016307016153f3d081b5)
+---
+ daemon/tar.c | 78 +++++++++++++++++++++++++++++++++++-------------------------
+ 1 file changed, 46 insertions(+), 32 deletions(-)
+
+diff --git a/daemon/tar.c b/daemon/tar.c
+index 51f82f8..da19de7 100644
+--- a/daemon/tar.c
++++ b/daemon/tar.c
+@@ -239,41 +239,60 @@ do_txz_in (const char *dir)
+   return do_tar_in (dir, "xz");
+ }
+ 
+-/* Turn list 'excludes' into list of " --excludes=..." strings, all
+- * properly quoted.  Caller must free the returned string.
++/* Turn list 'excludes' into a temporary file, and return a string
++ * containing the temporary file name.  Caller must unlink the file
++ * and free the string.
+  */
+ static char *
+-make_excludes_args (char *const *excludes)
++make_exclude_from_file (char *const *excludes)
+ {
+-  DECLARE_STRINGSBUF (strings);
+   size_t i;
+-  char *s, *ret;
++  int fd;
++  char template[] = "/tmp/excludesXXXXXX";
++  char *ret;
++
++  fd = mkstemp (template);
++  if (fd == -1) {
++    reply_with_perror ("mkstemp");
++    return NULL;
++  }
+ 
+   for (i = 0; excludes[i] != NULL; ++i) {
+-    if (asprintf_nowarn (&s, " --exclude=%Q", excludes[i]) == -1) {
+-      reply_with_perror ("asprintf");
+-      free_stringslen (strings.argv, strings.size);
+-      return NULL;
++    if (strchr (excludes[i], '\n')) {
++      reply_with_error ("tar-out: excludes file patterns cannot contain \\n character");
++      goto error;
+     }
+-    if (add_string_nodup (&strings, s) == -1) {
+-      free (s);
+-      return NULL;
++
++    if (xwrite (fd, excludes[i], strlen (excludes[i])) == -1 ||
++        xwrite (fd, "\n", 1) == -1) {
++      reply_with_perror ("write");
++      goto error;
+     }
+-  }
+ 
+-  if (end_stringsbuf (&strings) == -1)
+-    return NULL;
++    if (verbose)
++      fprintf (stderr, "tar-out: adding excludes pattern '%s'\n", excludes[i]);
++  }
+ 
+-  ret = concat_strings (strings.argv);
+-  if (!ret) {
+-    reply_with_perror ("concat");
+-    free_stringslen (strings.argv, strings.size);
+-    return NULL;
++  if (close (fd) == -1) {
++    reply_with_perror ("close");
++    fd = -1;
++    goto error;
+   }
++  fd = -1;
+ 
+-  free_stringslen (strings.argv, strings.size);
++  ret = strdup (template);
++  if (ret == NULL) {
++    reply_with_perror ("strdup");
++    goto error;
++  }
+ 
+   return ret;
++
++ error:
++  if (fd >= 0)
++    close (fd);
++  unlink (template);
++  return NULL;
+ }
+ 
+ /* Has one FileOut parameter. */
+@@ -287,7 +306,7 @@ do_tar_out (const char *dir, const char *compress, int numericowner,
+   const char *filter;
+   int r;
+   FILE *fp;
+-  CLEANUP_FREE char *excludes_args = NULL;
++  CLEANUP_UNLINK_FREE char *exclude_from_file = NULL;
+   CLEANUP_FREE char *cmd = NULL;
+   char buffer[GUESTFS_MAX_CHUNK_SIZE];
+ 
+@@ -313,15 +332,9 @@ do_tar_out (const char *dir, const char *compress, int numericowner,
+     numericowner = 0;
+ 
+   if ((optargs_bitmask & GUESTFS_TAR_OUT_EXCLUDES_BITMASK)) {
+-    excludes_args = make_excludes_args (excludes);
+-    if (!excludes_args)
+-      return -1;
+-  } else {
+-    excludes_args = strdup ("");
+-    if (excludes_args == NULL) {
+-      reply_with_perror ("strdup");
++    exclude_from_file = make_exclude_from_file (excludes);
++    if (!exclude_from_file)
+       return -1;
+-    }
+   }
+ 
+   /* Check the filename exists and is a directory (RHBZ#908322). */
+@@ -342,11 +355,12 @@ do_tar_out (const char *dir, const char *compress, int numericowner,
+   }
+ 
+   /* "tar -C /sysroot%s -cf - ." but we have to quote the dir. */
+-  if (asprintf_nowarn (&cmd, "%s -C %Q%s%s%s -cf - .",
++  if (asprintf_nowarn (&cmd, "%s -C %Q%s%s%s%s -cf - .",
+                        str_tar,
+                        buf, filter,
+                        numericowner ? " --numeric-owner" : "",
+-                       excludes_args) == -1) {
++                       exclude_from_file ? " -X " : "",
++                       exclude_from_file ? exclude_from_file : "") == -1) {
+     reply_with_perror ("asprintf");
+     return -1;
+   }
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0014-Add-a-regression-test-of-tar-out-excludes-option-RHB.patch b/SOURCES/0014-Add-a-regression-test-of-tar-out-excludes-option-RHB.patch
new file mode 100644
index 0000000..9cbe735
--- /dev/null
+++ b/SOURCES/0014-Add-a-regression-test-of-tar-out-excludes-option-RHB.patch
@@ -0,0 +1,100 @@
+From 93bc2c859a0d570f965ed38c91f7ffea5e802586 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Thu, 29 Aug 2013 13:36:56 +0100
+Subject: [PATCH] Add a regression test of tar-out excludes option
+ (RHBZ#1001875).
+
+(cherry picked from commit 1b34d6171bb4aaa1134a9d867918d7163cc7e069)
+---
+ tests/regressions/Makefile.am    |  1 +
+ tests/regressions/rhbz1001875.sh | 66 ++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 67 insertions(+)
+ create mode 100755 tests/regressions/rhbz1001875.sh
+
+diff --git a/tests/regressions/Makefile.am b/tests/regressions/Makefile.am
+index 1cc307d..5b0d1c3 100644
+--- a/tests/regressions/Makefile.am
++++ b/tests/regressions/Makefile.am
+@@ -33,6 +33,7 @@ TESTS = \
+ 	rhbz914931 \
+ 	rhbz957772.sh \
+ 	rhbz975797.sh \
++	rhbz1001875.sh \
+ 	test-noexec-stack.pl
+ 
+ tests_not_run = \
+diff --git a/tests/regressions/rhbz1001875.sh b/tests/regressions/rhbz1001875.sh
+new file mode 100755
+index 0000000..b17ca78
+--- /dev/null
++++ b/tests/regressions/rhbz1001875.sh
+@@ -0,0 +1,66 @@
++#!/bin/bash -
++# libguestfs
++# Copyright (C) 2013 Red Hat Inc.
++#
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++
++# Regression test for:
++# https://bugzilla.redhat.com/show_bug.cgi?id=1001875
++# tar-out excludes option.
++
++set -e
++export LANG=C
++
++if [ -n "$SKIP_TEST_RHBZ1001875_SH" ]; then
++    echo "$0: test skipped because environment variable is set."
++    exit 77
++fi
++
++rm -f test1.img rhbz1001875-[123].tar
++
++../../fish/guestfish -N fs -m /dev/sda1 <<EOF
++touch /hello
++touch /world
++touch /helloworld
++tar-out / rhbz1001875-1.tar "excludes:hello"
++tar-out / rhbz1001875-2.tar "excludes:hello world"
++tar-out / rhbz1001875-3.tar "excludes:he* w*"
++EOF
++
++if [ "$(tar tf rhbz1001875-1.tar | sort)" != "./
++./helloworld
++./lost+found/
++./world" ]; then
++    echo "$0: unexpected output from #1 test:"
++    tar tf rhbz1001875-1.tar | sort
++    exit 1
++fi
++
++if [ "$(tar tf rhbz1001875-2.tar | sort)" != "./
++./helloworld
++./lost+found/" ]; then
++    echo "$0: unexpected output from #2 test:"
++    tar tf rhbz1001875-2.tar | sort
++    exit 1
++fi
++
++if [ "$(tar tf rhbz1001875-3.tar | sort)" != "./
++./lost+found/" ]; then
++    echo "$0: unexpected output from #3 test:"
++    tar tf rhbz1001875-3.tar | sort
++    exit 1
++fi
++
++rm test1.img rhbz1001875-[123].tar
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0015-rsync-Document-use-of-glob-rsync-out-in-guestfish-RH.patch b/SOURCES/0015-rsync-Document-use-of-glob-rsync-out-in-guestfish-RH.patch
new file mode 100644
index 0000000..65e8df7
--- /dev/null
+++ b/SOURCES/0015-rsync-Document-use-of-glob-rsync-out-in-guestfish-RH.patch
@@ -0,0 +1,34 @@
+From 7131c46d9a89f4a3c3d3e92006fc52ecb683b2db Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Thu, 29 Aug 2013 13:49:26 +0100
+Subject: [PATCH] rsync: Document use of glob + rsync-out in guestfish
+ (RHBZ#1001876).
+
+(cherry picked from commit c04fbbda3e1d2bf98e241a95e069ac1fe202c14f)
+---
+ generator/actions.ml | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/generator/actions.ml b/generator/actions.ml
+index 302d61b..d679f1a 100644
+--- a/generator/actions.ml
++++ b/generator/actions.ml
+@@ -10347,7 +10347,14 @@ The format of the remote server string is defined by L<rsync(1)>.
+ Note that there is no way to supply a password or passphrase
+ so the target must be set up not to require one.
+ 
+-The optional arguments are the same as those of C<guestfs_rsync>." };
++The optional arguments are the same as those of C<guestfs_rsync>.
++
++Globbing does not happen on the C<src> parameter.  In programs
++which use the API directly you have to expand wildcards yourself
++(see C<guestfs_glob_expand>).  In guestfish you can use the C<glob>
++command (see L<guestfish(1)/glob>), for example:
++
++ ><fs> glob rsync-out /* rsync://remote/" };
+ 
+   { defaults with
+     name = "ls0";
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0016-mke2fs-Document-that-too-small-blockscount-will-resu.patch b/SOURCES/0016-mke2fs-Document-that-too-small-blockscount-will-resu.patch
new file mode 100644
index 0000000..2a77e54
--- /dev/null
+++ b/SOURCES/0016-mke2fs-Document-that-too-small-blockscount-will-resu.patch
@@ -0,0 +1,37 @@
+From 7248348ed7b68e68048c3075629691745e361cad Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Thu, 29 Aug 2013 13:59:14 +0100
+Subject: [PATCH] mke2fs: Document that too small blockscount will result in
+ ext2 filesystem (RHBZ#1002032).
+
+(cherry picked from commit 1c8986e45c3f1a7e2391bde2848667332495e3aa)
+---
+ generator/actions.ml | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/generator/actions.ml b/generator/actions.ml
+index d679f1a..435411b 100644
+--- a/generator/actions.ml
++++ b/generator/actions.ml
+@@ -10748,11 +10748,15 @@ or C<guestfs_rm_rf> to remove directories recursively." };
+             ["cat"; "/new"]], "new file contents"), []
+        ]);
+     shortdesc = "create an ext2/ext3/ext4 filesystem on device";
++    (* XXX document optional args properly *)
+     longdesc = "\
+ C<mke2fs> is used to create an ext2, ext3, or ext4 filesystem
+-on C<device>.  The optional C<blockscount> is the size of the
+-filesystem in blocks.  If omitted it defaults to the size of
+-C<device>." (* XXX document optional args properly *) };
++on C<device>.
++
++The optional C<blockscount> is the size of the filesystem in blocks.
++If omitted it defaults to the size of C<device>.  Note if the
++filesystem is too small to contain a journal, C<mke2fs> will
++silently create an ext2 filesystem instead." };
+ 
+   { defaults with
+     name = "list_disk_labels";
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0017-format-Set-MBR-partition-type-byte-appropriately-RHB.patch b/SOURCES/0017-format-Set-MBR-partition-type-byte-appropriately-RHB.patch
new file mode 100644
index 0000000..93160c3
--- /dev/null
+++ b/SOURCES/0017-format-Set-MBR-partition-type-byte-appropriately-RHB.patch
@@ -0,0 +1,85 @@
+From a78d6b7a5e4524f67e9cfea93e3aee153e80f540 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Thu, 29 Aug 2013 11:24:00 +0100
+Subject: [PATCH] format: Set MBR partition type byte appropriately
+ (RHBZ#1000428).
+
+Windows won't see a filesystem unless the MBR partition type
+byte is set correctly.
+
+$ ./run ./format/virt-format -a /tmp/test.img
+$ ./run ./cat/virt-filesystems -a /tmp/test.img --all --long -h
+Name       Type        VFS      Label  MBR  Size  Parent
+/dev/sda1  filesystem  unknown  -      -    1.0G  -
+/dev/sda1  partition   -        -      83   1.0G  /dev/sda
+/dev/sda   device      -        -      -    1.0G  -
+
+$ ./run ./format/virt-format -a /tmp/test.img --filesystem=ntfs
+$ ./run ./cat/virt-filesystems -a /tmp/test.img --all --long -h
+Name       Type        VFS   Label  MBR  Size  Parent
+/dev/sda1  filesystem  ntfs  -      -    1.0G  -
+/dev/sda1  partition   -     -      07   1.0G  /dev/sda
+/dev/sda   device      -     -      -    1.0G  -
+
+$ ./run ./format/virt-format -a /tmp/test.img --filesystem=vfat
+$ ./run ./cat/virt-filesystems -a /tmp/test.img --all --long -h
+Name       Type        VFS   Label  MBR  Size  Parent
+/dev/sda1  filesystem  vfat  -      -    1.0G  -
+/dev/sda1  partition   -     -      0b   1.0G  /dev/sda
+/dev/sda   device      -     -      -    1.0G  -
+
+$ ./run ./format/virt-format -a /tmp/test.img --lvm --filesystem=vfat
+$ ./run ./cat/virt-filesystems -a /tmp/test.img --all --long -h
+Name        Type        VFS   Label  MBR  Size   Parent
+/dev/VG/LV  filesystem  vfat  -      -    1020M  -
+/dev/VG/LV  lv          -     -      -    1020M  /dev/VG
+/dev/VG     vg          -     -      -    1020M  /dev/sda1
+/dev/sda1   pv          -     -      -    1020M  -
+/dev/sda1   partition   -     -      8e   1.0G   /dev/sda
+/dev/sda    device      -     -      -    1.0G   -
+
+Thanks: Gerd Hoffmann (kraxel)
+(cherry picked from commit d432ab2b5a965110bab542bfd397785eee9753dd)
+---
+ format/format.c | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+diff --git a/format/format.c b/format/format.c
+index 3418d2c..718fb2b 100644
+--- a/format/format.c
++++ b/format/format.c
+@@ -364,6 +364,31 @@ do_format (void)
+         exit (EXIT_FAILURE);
+       }
+       free_dev = 1;
++
++      /* Set the partition type byte appropriately, otherwise Windows
++       * won't see the filesystem (RHBZ#1000428).
++       */
++      if (STREQ (ptype, "mbr") || STREQ (ptype, "msdos")) {
++        int mbr_id = 0;
++
++        if (vg && lv)
++          mbr_id = 0x8e;
++        else if (filesystem) {
++          if (STREQ (filesystem, "msdos"))
++            mbr_id = 0x01;
++          else if (STREQ (filesystem, "fat") || STREQ (filesystem, "vfat"))
++            mbr_id = 0x0b;
++          else if (STREQ (filesystem, "ntfs"))
++            mbr_id = 0x07;
++          else if (STRPREFIX (filesystem, "ext"))
++            mbr_id = 0x83;
++          else if (STREQ (filesystem, "minix"))
++            mbr_id = 0x81;
++        }
++
++        if (mbr_id > 0)
++          guestfs_part_set_mbr_id (g, devices[i], 1, mbr_id);
++      }
+     }
+ 
+     if (vg && lv) {
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0018-format-Add-label-option-for-setting-filesystem-label.patch b/SOURCES/0018-format-Add-label-option-for-setting-filesystem-label.patch
new file mode 100644
index 0000000..a13dcc8
--- /dev/null
+++ b/SOURCES/0018-format-Add-label-option-for-setting-filesystem-label.patch
@@ -0,0 +1,86 @@
+From 340ee2f41ee30f8699e676171c37feeb33ca1435 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Thu, 29 Aug 2013 11:32:05 +0100
+Subject: [PATCH] format: Add --label option for setting filesystem label.
+
+$ ./run ./format/virt-format -a /tmp/test.img --filesystem=ext2 --label=BOOT
+$ ./run ./cat/virt-filesystems -a /tmp/test.img --all --long -h
+Name       Type        VFS   Label  MBR  Size  Parent
+/dev/sda1  filesystem  ext2  BOOT   -    1.0G  -
+/dev/sda1  partition   -     -      83   1.0G  /dev/sda
+/dev/sda   device      -     -      -    1.0G  -
+
+Thanks: Gerd Hoffmann (kraxel)
+(cherry picked from commit c46e41cb3c41f6283e0350cac6ef0b9178ed3941)
+---
+ format/format.c        | 10 ++++++++++
+ format/virt-format.pod |  4 ++++
+ 2 files changed, 14 insertions(+)
+
+diff --git a/format/format.c b/format/format.c
+index 718fb2b..cff0d82 100644
+--- a/format/format.c
++++ b/format/format.c
+@@ -47,6 +47,7 @@ const char *libvirt_uri = NULL;
+ static const char *filesystem = NULL;
+ static const char *vg = NULL, *lv = NULL;
+ static const char *partition = "DEFAULT";
++static const char *label = NULL;
+ static int wipe = 0;
+ static int have_wipefs;
+ 
+@@ -77,6 +78,7 @@ usage (int status)
+              "  --filesystem=..      Create empty filesystem\n"
+              "  --format[=raw|..]    Force disk format for -a option\n"
+              "  --help               Display brief help\n"
++             "  --label=..           Set filesystem label\n"
+              "  --lvm=..             Create Linux LVM2 logical volume\n"
+              "  --partition=..       Create / set partition type\n"
+              "  -v|--verbose         Verbose messages\n"
+@@ -107,6 +109,7 @@ main (int argc, char *argv[])
+     { "filesystem", 1, 0, 0 },
+     { "format", 2, 0, 0 },
+     { "help", 0, 0, HELP_OPTION },
++    { "label", 1, 0, 0 },
+     { "long-options", 0, 0, 0 },
+     { "lvm", 2, 0, 0 },
+     { "partition", 2, 0, 0 },
+@@ -174,6 +177,8 @@ main (int argc, char *argv[])
+           partition = optarg;
+       } else if (STREQ (long_options[option_index].name, "wipe")) {
+         wipe = 1;
++      } else if (STREQ (long_options[option_index].name, "label")) {
++        label = optarg;
+       } else {
+         fprintf (stderr, _("%s: unknown long option: %s (%d)\n"),
+                  program_name, long_options[option_index].name, option_index);
+@@ -415,6 +420,11 @@ do_format (void)
+     if (filesystem) {
+       if (guestfs_mkfs_opts (g, filesystem, dev, -1) == -1)
+         exit (EXIT_FAILURE);
++
++      if (label) {
++        if (guestfs_set_label (g, dev, label) == -1)
++          exit (EXIT_FAILURE);
++      }
+     }
+ 
+     if (free_dev)
+diff --git a/format/virt-format.pod b/format/virt-format.pod
+index bcab888..ac2b8e6 100755
+--- a/format/virt-format.pod
++++ b/format/virt-format.pod
+@@ -114,6 +114,10 @@ If you have untrusted raw-format guest disk images, you should use
+ this option to specify the disk format.  This avoids a possible
+ security problem with malicious guests (CVE-2010-3851).
+ 
++=item B<--label=LABEL>
++
++Set the filesystem label.
++
+ =item B<--lvm=/dev/I<VG>/I<LV>>
+ 
+ Create a Linux LVM2 logical volume called C</dev/I<VG>/I<LV>>.  You
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0019-virt-make-fs-Add-label-option-for-setting-filesystem.patch b/SOURCES/0019-virt-make-fs-Add-label-option-for-setting-filesystem.patch
new file mode 100644
index 0000000..8c1466f
--- /dev/null
+++ b/SOURCES/0019-virt-make-fs-Add-label-option-for-setting-filesystem.patch
@@ -0,0 +1,66 @@
+From 59652f2426cccdb04ec1ac63df8928d16816ad3b Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Thu, 29 Aug 2013 11:37:06 +0100
+Subject: [PATCH] virt-make-fs: Add --label option for setting filesystem
+ label.
+
+$ ./run ./tools/virt-make-fs /tmp/supermin-4.1.4.tar.gz /tmp/test.img
+$ ./run ./cat/virt-filesystems -a /tmp/test.img --all --long -h
+Name      Type        VFS   Label  MBR  Size  Parent
+/dev/sda  filesystem  ext2  -      -    3.7M  -
+/dev/sda  device      -     -      -    3.7M  -
+
+$ ./run ./tools/virt-make-fs /tmp/supermin-4.1.4.tar.gz /tmp/test.img --label=BOOT
+$ ./run ./cat/virt-filesystems -a /tmp/test.img --all --long -h
+Name      Type        VFS   Label  MBR  Size  Parent
+/dev/sda  filesystem  ext2  BOOT   -    3.7M  -
+/dev/sda  device      -     -      -    3.7M  -
+
+Thanks: Gerd Hoffmann (kraxel)
+(cherry picked from commit e17cd73fb7e3d7ce5e28f51c8451033f48a39153)
+---
+ tools/virt-make-fs | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/tools/virt-make-fs b/tools/virt-make-fs
+index d29e7df..7d94b92 100755
+--- a/tools/virt-make-fs
++++ b/tools/virt-make-fs
+@@ -251,6 +251,14 @@ here.
+ 
+ =cut
+ 
++my $label;
++
++=item B<--label=E<lt>LABELE<gt>>
++
++Set the filesystem label.
++
++=cut
++
+ my $partition;
+ 
+ =item B<--partition>
+@@ -292,6 +300,7 @@ GetOptions ("help|?" => \$help,
+             "s|size=s" => \$size,
+             "F|format=s" => \$format,
+             "t|type=s" => \$type,
++            "label=s" => \$label,
+             "partition:s" => \$partition,
+     ) or pod2usage (2);
+ pod2usage (1) if $help;
+@@ -509,6 +518,11 @@ eval {
+         $g->mkfs_btrfs ([$dev], datatype => "single", metadata => "single");
+     }
+ 
++    # Set label.
++    if (defined $label) {
++        $g->set_label ($dev, $label);
++    }
++
+     # Mount it.
+ 
+     # For vfat, add the utf8 mount option because we want to be able
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0020-daemon-Allow-labels-to-be-set-on-DOS-filesystems-usi.patch b/SOURCES/0020-daemon-Allow-labels-to-be-set-on-DOS-filesystems-usi.patch
new file mode 100644
index 0000000..ebee3e8
--- /dev/null
+++ b/SOURCES/0020-daemon-Allow-labels-to-be-set-on-DOS-filesystems-usi.patch
@@ -0,0 +1,125 @@
+From 48035cf253bdf27a1a7d460b86e19e53cfc82e3b Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Thu, 29 Aug 2013 11:41:46 +0100
+Subject: [PATCH] daemon: Allow labels to be set on DOS filesystems using
+ 'dosfslabel'.
+
+You can now use virt-format or virt-make-fs --label option to set a
+label for a DOS filesystem:
+
+$ ./run ./format/virt-format -a /tmp/test.img --filesystem=vfat --label=BOOT
+$ ./run ./cat/virt-filesystems -a /tmp/test.img --all --long -h
+Name       Type        VFS   Label  MBR  Size  Parent
+/dev/sda1  filesystem  vfat  BOOT   -    1.0G  -
+/dev/sda1  partition   -     -      0b   1.0G  /dev/sda
+/dev/sda   device      -     -      -    1.0G  -
+
+This also contains a small code refactoring.
+
+Thanks: Gerd Hoffmann (kraxel)
+(cherry picked from commit a75ca610b80614253f8a9d9828a97dc61d919b8a)
+---
+ daemon/labels.c | 61 ++++++++++++++++++++++++++++++++++++++-------------------
+ 1 file changed, 41 insertions(+), 20 deletions(-)
+
+diff --git a/daemon/labels.c b/daemon/labels.c
+index 10e40dc..f417c57 100644
+--- a/daemon/labels.c
++++ b/daemon/labels.c
+@@ -28,11 +28,43 @@
+ #include "optgroups.h"
+ 
+ GUESTFSD_EXT_CMD(str_btrfs, btrfs);
++GUESTFSD_EXT_CMD(str_dosfslabel, dosfslabel);
+ GUESTFSD_EXT_CMD(str_e2label, e2label);
+ GUESTFSD_EXT_CMD(str_ntfslabel, ntfslabel);
+ GUESTFSD_EXT_CMD(str_xfs_admin, xfs_admin);
+ 
+ static int
++btrfslabel (const char *device, const char *label)
++{
++  int r;
++  CLEANUP_FREE char *err = NULL;
++
++  r = command (NULL, &err, str_btrfs, "filesystem", "label",
++               device, label, NULL);
++  if (r == -1) {
++    reply_with_error ("%s", err);
++    return -1;
++  }
++
++  return 0;
++}
++
++static int
++dosfslabel (const char *device, const char *label)
++{
++  int r;
++  CLEANUP_FREE char *err = NULL;
++
++  r = command (NULL, &err, str_dosfslabel, device, label, NULL);
++  if (r == -1) {
++    reply_with_error ("%s", err);
++    return -1;
++  }
++
++  return 0;
++}
++
++static int
+ e2label (const char *device, const char *label)
+ {
+   int r;
+@@ -95,22 +127,6 @@ xfslabel (const char *device, const char *label)
+   return 0;
+ }
+ 
+-static int
+-btrfslabel (const char *device, const char *label)
+-{
+-  int r;
+-  CLEANUP_FREE char *err = NULL;
+-
+-  r = command (NULL, &err, str_btrfs, "filesystem", "label",
+-               device, label, NULL);
+-  if (r == -1) {
+-    reply_with_error ("%s", err);
+-    return -1;
+-  }
+-
+-  return 0;
+-}
+-
+ int
+ do_set_label (const mountable_t *mountable, const char *label)
+ {
+@@ -121,7 +137,15 @@ do_set_label (const mountable_t *mountable, const char *label)
+   if (vfs_type == NULL)
+     return -1;
+ 
+-  if (fstype_is_extfs (vfs_type))
++  if (STREQ (vfs_type, "btrfs"))
++    r = btrfslabel (mountable->device, label);
++
++  else if (STREQ (vfs_type, "msdos") ||
++           STREQ (vfs_type, "fat") ||
++           STREQ (vfs_type, "vfat"))
++    r = dosfslabel (mountable->device, label);
++
++  else if (fstype_is_extfs (vfs_type))
+     r = e2label (mountable->device, label);
+ 
+   else if (STREQ (vfs_type, "ntfs"))
+@@ -130,9 +154,6 @@ do_set_label (const mountable_t *mountable, const char *label)
+   else if (STREQ (vfs_type, "xfs"))
+     r = xfslabel (mountable->device, label);
+ 
+-  else if (STREQ (vfs_type, "btrfs"))
+-    r = btrfslabel (mountable->device, label);
+-
+   else {
+     reply_with_error ("don't know how to set the label for '%s' filesystems",
+                       vfs_type);
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0021-javadoc-Install-javadoc-in-datadir-javadoc-libguestf.patch b/SOURCES/0021-javadoc-Install-javadoc-in-datadir-javadoc-libguestf.patch
new file mode 100644
index 0000000..83fe4a4
--- /dev/null
+++ b/SOURCES/0021-javadoc-Install-javadoc-in-datadir-javadoc-libguestf.patch
@@ -0,0 +1,32 @@
+From 66c2a9697d4a0e17cf3afde837740f92552725df Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Wed, 28 Aug 2013 18:45:14 +0100
+Subject: [PATCH] javadoc: Install javadoc in $(datadir)/javadoc/libguestfs
+ (without -java-$(version)).
+
+Apparently this is the normal place for javadoc, and not
+where we installed it before.
+
+(cherry picked from commit 532117de297ecedb121f20fdc122ad83482e9b48)
+---
+ java/Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/java/Makefile.am b/java/Makefile.am
+index 7cb22e9..524302f 100644
+--- a/java/Makefile.am
++++ b/java/Makefile.am
+@@ -115,8 +115,8 @@ doc-stamp: $(java_sources)
+ 	touch $@
+ 
+ install-data-hook:
+-	mkdir -p $(DESTDIR)$(datadir)/javadoc/$(PACKAGE_NAME)-java-$(PACKAGE_VERSION)
+-	cp -a api/* $(DESTDIR)$(datadir)/javadoc/$(PACKAGE_NAME)-java-$(PACKAGE_VERSION)
++	mkdir -p $(DESTDIR)$(datadir)/javadoc/$(PACKAGE_NAME)
++	cp -a api/* $(DESTDIR)$(datadir)/javadoc/$(PACKAGE_NAME)
+ 
+ # Tests (not comprehensive).
+ 
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0022-appliance-Use-gzip-compressed-cpio-files-if-supermin.patch b/SOURCES/0022-appliance-Use-gzip-compressed-cpio-files-if-supermin.patch
new file mode 100644
index 0000000..4acf84a
--- /dev/null
+++ b/SOURCES/0022-appliance-Use-gzip-compressed-cpio-files-if-supermin.patch
@@ -0,0 +1,101 @@
+From f9a0c0ba0ddbdd351199f52eccf9b183556d3ed4 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Wed, 28 Aug 2013 22:35:42 +0100
+Subject: [PATCH] appliance: Use gzip-compressed cpio files if supermin-helper
+ supports it.
+
+supermin-helper >= 4.1.4 has new support for compressed cpio files
+(not hostfiles).  Detect if this is supported, and use it.
+
+(cherry picked from commit ca4b4089689c0c908ee56a8021d65a79d39d803e)
+---
+ appliance/Makefile.am | 23 +++++++++++++++++------
+ configure.ac          | 15 +++++++++++++++
+ 2 files changed, 32 insertions(+), 6 deletions(-)
+
+diff --git a/appliance/Makefile.am b/appliance/Makefile.am
+index 54d3379..a9cc9fe 100644
+--- a/appliance/Makefile.am
++++ b/appliance/Makefile.am
+@@ -35,14 +35,18 @@ superminfs_DATA = \
+ 	supermin.d/init.img \
+ 	supermin.d/udev-rules.img
+ 
++if SUPERMIN_HELPER_COMPRESSED_CPIO
++GZ = .gz
++endif
++
+ if ENABLE_DAEMON
+ superminfs_DATA += \
+-	supermin.d/daemon.img
++	supermin.d/daemon.img$(GZ)
+ endif
+ 
+ if ENABLE_APPLIANCE
+ superminfs_DATA += \
+-	supermin.d/base.img \
++	supermin.d/base.img$(GZ) \
+ 	supermin.d/hostfiles
+ endif
+ 
+@@ -73,20 +77,27 @@ excludelist: excludelist.in Makefile
+ 	cmp -s $@ $@-t || mv $@-t $@
+ 	rm -f $@-t
+ 
+-supermin.d/base.img supermin.d/hostfiles: stamp-supermin
++supermin.d/base.img$(GZ) supermin.d/hostfiles: stamp-supermin
+ stamp-supermin: make.sh packagelist excludelist
+-	rm -f $@ supermin.d/base.img supermin.d/hostfiles
++	rm -f $@ supermin.d/base.img$(GZ) supermin.d/hostfiles
+ 	./make.sh
++if SUPERMIN_HELPER_COMPRESSED_CPIO
++	gzip -9 supermin.d/base.img
++endif
+ 	touch $@
+ 
+-supermin.d/daemon.img: ../daemon/guestfsd guestfsd.suppressions
+-	rm -f $@ $@-t
++supermin.d/daemon.img$(GZ): ../daemon/guestfsd guestfsd.suppressions
++	rm -f $@ $@-t $@-tt
+ 	rm -rf tmp-d
+ 	mkdir -p tmp-d$(DAEMON_SUPERMIN_DIR) tmp-d/etc
+ 	ln ../daemon/guestfsd tmp-d$(DAEMON_SUPERMIN_DIR)/guestfsd
+ 	ln $(srcdir)/guestfsd.suppressions tmp-d/etc/guestfsd.suppressions
+ 	( cd tmp-d && find | cpio --quiet -o -H newc ) > $@-t
+ 	rm -r tmp-d
++if SUPERMIN_HELPER_COMPRESSED_CPIO
++	gzip -9 -c $@-t > $@-tt
++	mv $@-tt $@-t
++endif
+ 	mv $@-t $@
+ 
+ supermin.d/init.img: init
+diff --git a/configure.ac b/configure.ac
+index 75232e8..3e8a274 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -445,6 +445,21 @@ AC_CHECK_PROGS([SUPERMIN],
+ AC_CHECK_PROGS([SUPERMIN_HELPER],
+                [supermin-helper febootstrap-supermin-helper],[no])
+ 
++dnl supermin >= 4.1.4 supports compressed cpio images.
++AC_MSG_CHECKING([for supermin-helper version])
++supermin_helper_version=`$SUPERMIN_HELPER --version | awk '{print $2}'`
++AC_MSG_RESULT([$supermin_helper_version])
++AC_MSG_CHECKING([if supermin-helper supports compressed cpio images])
++supermin_helper_version_int=`echo "$supermin_helper_version" | awk -F. '{print $1 * 1000000 + $2 * 1000 + $3}'`
++if test $supermin_helper_version_int -ge 4001004; then
++    supermin_helper_compressed_cpio=yes
++else
++    supermin_helper_compressed_cpio=yes
++fi
++AC_MSG_RESULT([$supermin_helper_compressed_cpio])
++AM_CONDITIONAL([SUPERMIN_HELPER_COMPRESSED_CPIO],
++               [test "x$supermin_helper_compressed_cpio" = "xyes"])
++
+ dnl Pass supermin --packager-config option.
+ dnl
+ dnl Note that in febootstrap >= 3.21 / supermin >= 4.1.0, this option
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0023-add_drive-Introduce-cachemode-parameter-to-control-d.patch b/SOURCES/0023-add_drive-Introduce-cachemode-parameter-to-control-d.patch
new file mode 100644
index 0000000..e06c9b1
--- /dev/null
+++ b/SOURCES/0023-add_drive-Introduce-cachemode-parameter-to-control-d.patch
@@ -0,0 +1,565 @@
+From c7304d0c8ebe38bc90547f149026ca279a4e7c46 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Sat, 31 Aug 2013 22:24:40 +0100
+Subject: [PATCH] add_drive: Introduce 'cachemode' parameter to control drive
+ caching.
+
+This commit adds an optional 'cachemode' parameter to the 'add_drive'
+API to control caching.  This corresponds approximately to the
+'-drive ...,cache=' parameter in qemu, but the choices are much more
+restrictive, just 'writeback' or 'unsafe', for reasons outlined below.
+
+The caching modes supported by recent QEMU are:
+
+  writeback:
+   - Reports data writes completed when data is present in the host
+     page cache.
+     Only safe provided guest correctly issues flush operations.
+
+  writethrough:
+   - Reports data writes completed only when each write has been
+     flushed to disk.  Performance is reported as not good.
+
+  none:
+   - Uses O_DIRECT (avoids all interaction with host cache), but does
+     not ensure every write is flushed to disk.
+     Only safe provided guest correctly issues flush operations.
+
+  directsync:
+   - Uses O_DIRECT (avoids all interaction with host cache), and
+     ensures every write has been flushed to disk.
+
+  unsafe:
+   - No special handling.
+
+Since the libguestfs appliance kernel always issues flush operations
+(eg. for filesystem journalling and for sync) the following modes can
+be ignored: 'directsync', 'writethrough'.
+
+That leaves 'writeback', 'none' and 'unsafe'.  However 'none' is both
+a constant source of pain (RHBZ#994517), is inefficient because it
+doesn't use the host cache, and does not give us any safety guarantees
+over and above 'writeback'.  Therefore we should ignore 'none'.
+
+This leaves 'writeback' (safe) and 'unsafe' (fast, useful for scratch
+disks), which is what we implement in this patch.
+
+Note that the previous behaviour was to use 'none' if possible, else
+to use 'writeback'.  The new behaviour is to use 'writeback' only
+which is (in safety terms) equivalent to 'none', and also faster and
+less painful (RHBZ#994517).
+
+This patch also allows you to specify a cache mode for network drives
+which also previously defaulted to 'writeback'.
+
+There is a considerable performance benefit to using unsafe (for
+scratch disks only, of course).  The C API tests only use scratch
+disks (since they are just tests, the final state of the disk doesn't
+matter), and this decreases total run time from 202 seconds to 163
+seconds, about 25% faster.
+
+(cherry picked from commit 749e947bb0103f19feda0f29b6cbbf3cbfa350da)
+---
+ generator/actions.ml   |  30 ++++++++++-
+ src/drives.c           | 141 +++++++++++++++++--------------------------------
+ src/guestfs-internal.h |   2 +-
+ src/launch-direct.c    |   4 +-
+ src/launch-libvirt.c   |  11 ++--
+ 5 files changed, 85 insertions(+), 103 deletions(-)
+
+diff --git a/generator/actions.ml b/generator/actions.ml
+index 435411b..8bc37de 100644
+--- a/generator/actions.ml
++++ b/generator/actions.ml
+@@ -1246,7 +1246,7 @@ not all belong to a single logical operating system
+ 
+   { defaults with
+     name = "add_drive";
+-    style = RErr, [String "filename"], [OBool "readonly"; OString "format"; OString "iface"; OString "name"; OString "label"; OString "protocol"; OStringList "server"; OString "username"; OString "secret"];
++    style = RErr, [String "filename"], [OBool "readonly"; OString "format"; OString "iface"; OString "name"; OString "label"; OString "protocol"; OStringList "server"; OString "username"; OString "secret"; OString "cachemode"];
+     once_had_no_optargs = true;
+     blocking = false;
+     fish_alias = ["add"];
+@@ -1436,6 +1436,34 @@ If not given, then a secret matching the given username will be looked up in the
+ default keychain locations, or if no username is given, then no authentication
+ will be used.
+ 
++=item C<cachemode>
++
++Choose whether or not libguestfs will obey sync operations (safe but slow)
++or not (unsafe but fast).  The possible values for this string are:
++
++=over 4
++
++=item C<cachemode = \"writeback\">
++
++This is the default.
++
++Write operations in the API do not return until a L<write(2)>
++call has completed in the host [but note this does not imply
++that anything gets written to disk].
++
++Sync operations in the API, including implicit syncs caused by
++filesystem journalling, will not return until an L<fdatasync(2)>
++call has completed in the host, indicating that data has been
++committed to disk.
++
++=item C<cachemode = \"unsafe\">
++
++In this mode, there are no guarantees.  Libguestfs may cache
++anything and ignore sync requests.  This is suitable only
++for scratch or temporary disks.
++
++=back
++
+ =back" };
+ 
+   { defaults with
+diff --git a/src/drives.c b/src/drives.c
+index 3854961..97be2ed 100644
+--- a/src/drives.c
++++ b/src/drives.c
+@@ -86,8 +86,7 @@ static struct drive *
+ create_drive_file (guestfs_h *g, const char *path,
+                    bool readonly, const char *format,
+                    const char *iface, const char *name,
+-                   const char *disk_label,
+-                   bool use_cache_none)
++                   const char *disk_label, const char *cachemode)
+ {
+   struct drive *drv = safe_calloc (g, 1, sizeof *drv);
+ 
+@@ -99,7 +98,7 @@ create_drive_file (guestfs_h *g, const char *path,
+   drv->iface = iface ? safe_strdup (g, iface) : NULL;
+   drv->name = name ? safe_strdup (g, name) : NULL;
+   drv->disk_label = disk_label ? safe_strdup (g, disk_label) : NULL;
+-  drv->use_cache_none = use_cache_none;
++  drv->cachemode = cachemode ? safe_strdup (g, cachemode) : NULL;
+ 
+   drv->priv = drv->free_priv = NULL;
+ 
+@@ -114,8 +113,7 @@ create_drive_non_file (guestfs_h *g,
+                        const char *username, const char *secret,
+                        bool readonly, const char *format,
+                        const char *iface, const char *name,
+-                       const char *disk_label,
+-                       bool use_cache_none)
++                       const char *disk_label, const char *cachemode)
+ {
+   struct drive *drv = safe_calloc (g, 1, sizeof *drv);
+ 
+@@ -131,7 +129,7 @@ create_drive_non_file (guestfs_h *g,
+   drv->iface = iface ? safe_strdup (g, iface) : NULL;
+   drv->name = name ? safe_strdup (g, name) : NULL;
+   drv->disk_label = disk_label ? safe_strdup (g, disk_label) : NULL;
+-  drv->use_cache_none = use_cache_none;
++  drv->cachemode = cachemode ? safe_strdup (g, cachemode) : NULL;
+ 
+   drv->priv = drv->free_priv = NULL;
+ 
+@@ -146,8 +144,7 @@ create_drive_curl (guestfs_h *g,
+                    const char *username, const char *secret,
+                    bool readonly, const char *format,
+                    const char *iface, const char *name,
+-                   const char *disk_label,
+-                   bool use_cache_none)
++                   const char *disk_label, const char *cachemode)
+ {
+   if (secret != NULL) {
+     error (g, _("curl: you cannot specify a secret with this protocol"));
+@@ -179,7 +176,7 @@ create_drive_curl (guestfs_h *g,
+                                 servers, nr_servers, exportname,
+                                 username, secret,
+                                 readonly, format, iface, name, disk_label,
+-                                use_cache_none);
++                                cachemode);
+ }
+ 
+ static struct drive *
+@@ -189,8 +186,7 @@ create_drive_gluster (guestfs_h *g,
+                       const char *username, const char *secret,
+                       bool readonly, const char *format,
+                       const char *iface, const char *name,
+-                      const char *disk_label,
+-                      bool use_cache_none)
++                      const char *disk_label, const char *cachemode)
+ {
+   if (username != NULL) {
+     error (g, _("gluster: you cannot specify a username with this protocol"));
+@@ -220,7 +216,7 @@ create_drive_gluster (guestfs_h *g,
+                                 servers, nr_servers, exportname,
+                                 username, secret,
+                                 readonly, format, iface, name, disk_label,
+-                                use_cache_none);
++                                cachemode);
+ }
+ 
+ static int
+@@ -242,8 +238,7 @@ create_drive_nbd (guestfs_h *g,
+                   const char *username, const char *secret,
+                   bool readonly, const char *format,
+                   const char *iface, const char *name,
+-                  const char *disk_label,
+-                  bool use_cache_none)
++                  const char *disk_label, const char *cachemode)
+ {
+   if (username != NULL) {
+     error (g, _("nbd: you cannot specify a username with this protocol"));
+@@ -266,7 +261,7 @@ create_drive_nbd (guestfs_h *g,
+                                 servers, nr_servers, exportname,
+                                 username, secret,
+                                 readonly, format, iface, name, disk_label,
+-                                use_cache_none);
++                                cachemode);
+ }
+ 
+ static struct drive *
+@@ -276,8 +271,7 @@ create_drive_rbd (guestfs_h *g,
+                   const char *username, const char *secret,
+                   bool readonly, const char *format,
+                   const char *iface, const char *name,
+-                  const char *disk_label,
+-                  bool use_cache_none)
++                  const char *disk_label, const char *cachemode)
+ {
+   size_t i;
+ 
+@@ -312,7 +306,7 @@ create_drive_rbd (guestfs_h *g,
+                                 servers, nr_servers, exportname,
+                                 username, secret,
+                                 readonly, format, iface, name, disk_label,
+-                                use_cache_none);
++                                cachemode);
+ }
+ 
+ static struct drive *
+@@ -322,8 +316,7 @@ create_drive_sheepdog (guestfs_h *g,
+                        const char *username, const char *secret,
+                        bool readonly, const char *format,
+                        const char *iface, const char *name,
+-                       const char *disk_label,
+-                       bool use_cache_none)
++                       const char *disk_label, const char *cachemode)
+ {
+   size_t i;
+ 
+@@ -362,7 +355,7 @@ create_drive_sheepdog (guestfs_h *g,
+                                 servers, nr_servers, exportname,
+                                 username, secret,
+                                 readonly, format, iface, name, disk_label,
+-                                use_cache_none);
++                                cachemode);
+ }
+ 
+ static struct drive *
+@@ -372,8 +365,7 @@ create_drive_ssh (guestfs_h *g,
+                   const char *username, const char *secret,
+                   bool readonly, const char *format,
+                   const char *iface, const char *name,
+-                  const char *disk_label,
+-                  bool use_cache_none)
++                  const char *disk_label, const char *cachemode)
+ {
+   if (secret != NULL) {
+     error (g, _("ssh: you cannot specify a secret with this protocol"));
+@@ -410,7 +402,7 @@ create_drive_ssh (guestfs_h *g,
+                                 servers, nr_servers, exportname,
+                                 username, secret,
+                                 readonly, format, iface, name, disk_label,
+-                                use_cache_none);
++                                cachemode);
+ }
+ 
+ static struct drive *
+@@ -420,8 +412,7 @@ create_drive_iscsi (guestfs_h *g,
+                     const char *username, const char *secret,
+                     bool readonly, const char *format,
+                     const char *iface, const char *name,
+-                    const char *disk_label,
+-                    bool use_cache_none)
++                    const char *disk_label, const char *cachemode)
+ {
+   if (username != NULL) {
+     error (g, _("iscsi: you cannot specify a username with this protocol"));
+@@ -458,7 +449,7 @@ create_drive_iscsi (guestfs_h *g,
+                                 servers, nr_servers, exportname,
+                                 username, secret,
+                                 readonly, format, iface, name, disk_label,
+-                                use_cache_none);
++                                cachemode);
+ }
+ 
+ /* Traditionally you have been able to use /dev/null as a filename, as
+@@ -537,6 +528,7 @@ free_drive_struct (struct drive *drv)
+   free (drv->iface);
+   free (drv->name);
+   free (drv->disk_label);
++  free (drv->cachemode);
+ 
+   if (drv->priv && drv->free_priv)
+     drv->free_priv (drv->priv);
+@@ -555,7 +547,7 @@ drive_to_string (guestfs_h *g, const struct drive *drv)
+   p = guestfs___drive_source_qemu_param (g, &drv->src);
+ 
+   return safe_asprintf
+-    (g, "%s%s%s%s%s%s%s%s%s%s%s",
++    (g, "%s%s%s%s%s%s%s%s%s%s%s%s",
+      p,
+      drv->readonly ? " readonly" : "",
+      drv->format ? " format=" : "",
+@@ -566,7 +558,8 @@ drive_to_string (guestfs_h *g, const struct drive *drv)
+      drv->name ? : "",
+      drv->disk_label ? " label=" : "",
+      drv->disk_label ? : "",
+-     drv->use_cache_none ? " cache=none" : "");
++     drv->cachemode ? " cache=" : "",
++     drv->cachemode ? : "");
+ }
+ 
+ /* Add struct drive to the g->drives vector at the given index. */
+@@ -621,47 +614,6 @@ guestfs___free_drives (guestfs_h *g)
+   g->nr_drives = 0;
+ }
+ 
+-/* cache=none improves reliability in the event of a host crash.
+- *
+- * However this option causes qemu to try to open the file with
+- * O_DIRECT.  This fails on some filesystem types (notably tmpfs).
+- * So we check if we can open the file with or without O_DIRECT,
+- * and use cache=none (or not) accordingly.
+- *
+- * Notes:
+- *
+- * (1) In qemu, cache=none and cache=off are identical.
+- *
+- * (2) cache=none does not disable caching entirely.  qemu still
+- * maintains a writeback cache internally, which will be written out
+- * when qemu is killed (with SIGTERM).  It disables *host kernel*
+- * caching by using O_DIRECT.  To disable caching entirely in kernel
+- * and qemu we would need to use cache=directsync but there is a
+- * performance penalty for that.
+- *
+- * (3) This function is only called on the !readonly path.  We must
+- * try to open with O_RDWR to test that the file is readable and
+- * writable here.
+- */
+-static int
+-test_cache_none (guestfs_h *g, const char *filename)
+-{
+-  int fd = open (filename, O_RDWR|O_DIRECT);
+-  if (fd >= 0) {
+-    close (fd);
+-    return 1;
+-  }
+-
+-  fd = open (filename, O_RDWR);
+-  if (fd >= 0) {
+-    close (fd);
+-    return 0;
+-  }
+-
+-  perrorf (g, "%s", filename);
+-  return -1;
+-}
+-
+ /* Check string parameter matches ^[-_[:alnum:]]+$ (in C locale). */
+ static int
+ valid_format_iface (const char *str)
+@@ -827,7 +779,7 @@ guestfs__add_drive_opts (guestfs_h *g, const char *filename,
+   struct drive_server *servers = NULL;
+   const char *username;
+   const char *secret;
+-  int use_cache_none;
++  const char *cachemode;
+   struct drive *drv;
+   size_t i, drv_index;
+ 
+@@ -853,6 +805,8 @@ guestfs__add_drive_opts (guestfs_h *g, const char *filename,
+     ? optargs->username : NULL;
+   secret = optargs->bitmask & GUESTFS_ADD_DRIVE_OPTS_SECRET_BITMASK
+     ? optargs->secret : NULL;
++  cachemode = optargs->bitmask & GUESTFS_ADD_DRIVE_OPTS_CACHEMODE_BITMASK
++    ? optargs->cachemode : NULL;
+ 
+   if (format && !valid_format_iface (format)) {
+     error (g, _("%s parameter is empty or contains disallowed characters"),
+@@ -871,6 +825,12 @@ guestfs__add_drive_opts (guestfs_h *g, const char *filename,
+     free_drive_servers (servers, nr_servers);
+     return -1;
+   }
++  if (cachemode &&
++      !(STREQ (cachemode, "writeback") || STREQ (cachemode, "unsafe"))) {
++    error (g, _("cachemode parameter must be 'writeback' (default) or 'unsafe'"));
++    free_drive_servers (servers, nr_servers);
++    return -1;
++  }
+ 
+   if (STREQ (protocol, "file")) {
+     if (servers != NULL) {
+@@ -893,23 +853,16 @@ guestfs__add_drive_opts (guestfs_h *g, const char *filename,
+       drv = create_drive_dev_null (g, readonly, format, iface, name,
+                                    disk_label);
+     else {
+-      /* For writable files, see if we can use cache=none.  This also
+-       * checks for the existence of the file.  For readonly we have
+-       * to do the check explicitly.
++      /* We have to check for the existence of the file since that's
++       * required by the API.
+        */
+-      use_cache_none = readonly ? false : test_cache_none (g, filename);
+-      if (use_cache_none == -1)
++      if (access (filename, R_OK) == -1) {
++        perrorf (g, "%s", filename);
+         return -1;
+-
+-      if (readonly) {
+-        if (access (filename, R_OK) == -1) {
+-          perrorf (g, "%s", filename);
+-          return -1;
+-        }
+       }
+ 
+       drv = create_drive_file (g, filename, readonly, format, iface, name,
+-                               disk_label, use_cache_none);
++                               disk_label, cachemode);
+     }
+   }
+   else if (STREQ (protocol, "ftp")) {
+@@ -917,71 +870,71 @@ guestfs__add_drive_opts (guestfs_h *g, const char *filename,
+                              servers, nr_servers, filename,
+                              username, secret,
+                              readonly, format, iface, name,
+-                             disk_label, false);
++                             disk_label, cachemode);
+   }
+   else if (STREQ (protocol, "ftps")) {
+     drv = create_drive_curl (g, drive_protocol_ftps,
+                              servers, nr_servers, filename,
+                              username, secret,
+                              readonly, format, iface, name,
+-                             disk_label, false);
++                             disk_label, cachemode);
+   }
+   else if (STREQ (protocol, "gluster")) {
+     drv = create_drive_gluster (g, servers, nr_servers, filename,
+                                 username, secret,
+                                 readonly, format, iface, name,
+-                                disk_label, false);
++                                disk_label, cachemode);
+   }
+   else if (STREQ (protocol, "http")) {
+     drv = create_drive_curl (g, drive_protocol_http,
+                              servers, nr_servers, filename,
+                              username, secret,
+                              readonly, format, iface, name,
+-                             disk_label, false);
++                             disk_label, cachemode);
+   }
+   else if (STREQ (protocol, "https")) {
+     drv = create_drive_curl (g, drive_protocol_https,
+                              servers, nr_servers, filename,
+                              username, secret,
+                              readonly, format, iface, name,
+-                             disk_label, false);
++                             disk_label, cachemode);
+   }
+   else if (STREQ (protocol, "iscsi")) {
+     drv = create_drive_iscsi (g, servers, nr_servers, filename,
+                               username, secret,
+                               readonly, format, iface, name,
+-                              disk_label, false);
++                              disk_label, cachemode);
+   }
+   else if (STREQ (protocol, "nbd")) {
+     drv = create_drive_nbd (g, servers, nr_servers, filename,
+                             username, secret,
+                             readonly, format, iface, name,
+-                            disk_label, false);
++                            disk_label, cachemode);
+   }
+   else if (STREQ (protocol, "rbd")) {
+     drv = create_drive_rbd (g, servers, nr_servers, filename,
+                             username, secret,
+                             readonly, format, iface, name,
+-                            disk_label, false);
++                            disk_label, cachemode);
+   }
+   else if (STREQ (protocol, "sheepdog")) {
+     drv = create_drive_sheepdog (g, servers, nr_servers, filename,
+                                  username, secret,
+                                  readonly, format, iface, name,
+-                                 disk_label, false);
++                                 disk_label, cachemode);
+   }
+   else if (STREQ (protocol, "ssh")) {
+     drv = create_drive_ssh (g, servers, nr_servers, filename,
+                             username, secret,
+                             readonly, format, iface, name,
+-                            disk_label, false);
++                            disk_label, cachemode);
+   }
+   else if (STREQ (protocol, "tftp")) {
+     drv = create_drive_curl (g, drive_protocol_tftp,
+                              servers, nr_servers, filename,
+                              username, secret,
+                              readonly, format, iface, name,
+-                             disk_label, false);
++                             disk_label, cachemode);
+   }
+   else {
+     error (g, _("unknown protocol '%s'"), protocol);
+diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h
+index 8fd6388..d789dcc 100644
+--- a/src/guestfs-internal.h
++++ b/src/guestfs-internal.h
+@@ -179,7 +179,7 @@ struct drive {
+   char *iface;
+   char *name;
+   char *disk_label;
+-  bool use_cache_none;
++  char *cachemode;
+ 
+   /* Data used by the backend. */
+   void *priv;
+diff --git a/src/launch-direct.c b/src/launch-direct.c
+index 299a3d9..3866c9b 100644
+--- a/src/launch-direct.c
++++ b/src/launch-direct.c
+@@ -1008,10 +1008,10 @@ qemu_drive_param (guestfs_h *g, const struct drive *drv, size_t index)
+     iface = "virtio";
+ 
+   return safe_asprintf
+-    (g, "file=%s%s%s%s%s%s%s,id=hd%zu,if=%s",
++    (g, "file=%s%s,cache=%s%s%s%s%s,id=hd%zu,if=%s",
+      escaped_file,
+      drv->readonly ? ",snapshot=on" : "",
+-     drv->use_cache_none ? ",cache=none" : "",
++     drv->cachemode ? drv->cachemode : "writeback",
+      drv->format ? ",format=" : "",
+      drv->format ? drv->format : "",
+      drv->disk_label ? ",serial=" : "",
+diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
+index ff3d720..3690b1d 100644
+--- a/src/launch-libvirt.c
++++ b/src/launch-libvirt.c
+@@ -1218,11 +1218,12 @@ construct_libvirt_xml_disk (guestfs_h *g,
+     return -1;
+   }
+ 
+-  if (drv->use_cache_none) {
+-    XMLERROR (-1,
+-              xmlTextWriterWriteAttribute (xo, BAD_CAST "cache",
+-                                           BAD_CAST "none"));
+-  }
++  XMLERROR (-1,
++            xmlTextWriterWriteAttribute (xo, BAD_CAST "cache",
++                                         BAD_CAST (drv->cachemode ?
++                                                   drv->cachemode :
++                                                   "writeback")));
++
+   XMLERROR (-1, xmlTextWriterEndElement (xo));
+ 
+   if (drv->disk_label) {
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0024-drives-Ensure-all-scratch-drives-use-cachemode-unsaf.patch b/SOURCES/0024-drives-Ensure-all-scratch-drives-use-cachemode-unsaf.patch
new file mode 100644
index 0000000..609f462
--- /dev/null
+++ b/SOURCES/0024-drives-Ensure-all-scratch-drives-use-cachemode-unsaf.patch
@@ -0,0 +1,38 @@
+From 053061f66f79d21bb48d089717a171470e05e47e Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Sat, 31 Aug 2013 22:38:03 +0100
+Subject: [PATCH] drives: Ensure all scratch drives use cachemode "unsafe".
+
+They are _scratch_ drives so any data on them doesn't matter and can
+be reconstructed in the event of a host system crash.
+
+(cherry picked from commit 96cd7fcecb031bfe6baa49addfb026ae988fb7c1)
+---
+ src/drives.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/drives.c b/src/drives.c
+index 97be2ed..f310b06 100644
+--- a/src/drives.c
++++ b/src/drives.c
+@@ -1029,13 +1029,15 @@ int
+ guestfs__add_drive_scratch (guestfs_h *g, int64_t size,
+                                  const struct guestfs_add_drive_scratch_argv *optargs)
+ {
+-  struct guestfs_add_drive_opts_argv add_drive_optargs;
++  struct guestfs_add_drive_opts_argv add_drive_optargs = { .bitmask = 0 };
+   CLEANUP_FREE char *filename = NULL;
+   int fd;
+ 
+   /* Some parameters we always set. */
+-  add_drive_optargs.bitmask = GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK;
++  add_drive_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK;
+   add_drive_optargs.format = "raw";
++  add_drive_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_CACHEMODE_BITMASK;
++  add_drive_optargs.cachemode = "unsafe";
+ 
+   /* Copy the optional arguments through to guestfs_add_drive_opts. */
+   if (optargs->bitmask & GUESTFS_ADD_DRIVE_SCRATCH_NAME_BITMASK) {
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0025-sparsify-Use-cachemode-unsafe-for-the-overlay-disk.patch b/SOURCES/0025-sparsify-Use-cachemode-unsafe-for-the-overlay-disk.patch
new file mode 100644
index 0000000..1ca89c5
--- /dev/null
+++ b/SOURCES/0025-sparsify-Use-cachemode-unsafe-for-the-overlay-disk.patch
@@ -0,0 +1,26 @@
+From 322bf1dd40559d554f5c7540adbe49deacd5f590 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Sat, 31 Aug 2013 22:47:44 +0100
+Subject: [PATCH] sparsify: Use cachemode "unsafe" for the overlay disk.
+
+(cherry picked from commit f3a9c9f867bed178d1aabf9675955f633bf3069a)
+---
+ sparsify/sparsify.ml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sparsify/sparsify.ml b/sparsify/sparsify.ml
+index 819a145..659d46f 100644
+--- a/sparsify/sparsify.ml
++++ b/sparsify/sparsify.ml
+@@ -260,7 +260,7 @@ let g =
+   if verbose then g#set_verbose true;
+ 
+   (* Note that the temporary overlay disk is always qcow2 format. *)
+-  g#add_drive ~format:"qcow2" ~readonly:false overlaydisk;
++  g#add_drive ~format:"qcow2" ~readonly:false ~cachemode:"unsafe" overlaydisk;
+ 
+   if not quiet then Progress.set_up_progress_bar ~machine_readable g;
+   g#launch ();
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0026-rescue-Use-cachemode-unsafe-for-the-virt-rescue-scra.patch b/SOURCES/0026-rescue-Use-cachemode-unsafe-for-the-virt-rescue-scra.patch
new file mode 100644
index 0000000..10e7c8f
--- /dev/null
+++ b/SOURCES/0026-rescue-Use-cachemode-unsafe-for-the-virt-rescue-scra.patch
@@ -0,0 +1,63 @@
+From 1e421afa988195bead6650c421d9752fed32b73f Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Sat, 31 Aug 2013 22:48:04 +0100
+Subject: [PATCH] rescue: Use cachemode "unsafe" for the virt-rescue --scratch
+ option.
+
+(cherry picked from commit 3f0748f1fc64e42517c0d4535c27b1f32da86023)
+---
+ fish/options.c       | 5 +++++
+ fish/options.h       | 1 +
+ rescue/virt-rescue.c | 1 +
+ 3 files changed, 7 insertions(+)
+
+diff --git a/fish/options.c b/fish/options.c
+index 6d63afa..75d61ad 100644
+--- a/fish/options.c
++++ b/fish/options.c
+@@ -110,6 +110,10 @@ add_drives (struct drv *drv, char next_drive)
+         ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK;
+         ad_optargs.format = drv->a.format;
+       }
++      if (drv->a.cachemode) {
++        ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_CACHEMODE_BITMASK;
++        ad_optargs.cachemode = drv->a.cachemode;
++      }
+ 
+       r = guestfs_add_drive_opts_argv (g, drv->a.filename, &ad_optargs);
+       if (r == -1)
+@@ -254,6 +258,7 @@ free_drives (struct drv *drv)
+   case drv_a:
+     free (drv->a.filename);
+     /* a.format is an optarg, so don't free it */
++    /* a.cachemode is a static string, so don't free it */
+     break;
+   case drv_uri:
+     free (drv->uri.path);
+diff --git a/fish/options.h b/fish/options.h
+index 507ec1c..e2192b5 100644
+--- a/fish/options.h
++++ b/fish/options.h
+@@ -60,6 +60,7 @@ struct drv {
+     struct {
+       char *filename;       /* disk filename */
+       const char *format;   /* format (NULL == autodetect) */
++      const char *cachemode;/* cachemode (NULL == default) */
+     } a;
+     struct {
+       char *path;           /* disk path */
+diff --git a/rescue/virt-rescue.c b/rescue/virt-rescue.c
+index 65dd473..942c54a 100644
+--- a/rescue/virt-rescue.c
++++ b/rescue/virt-rescue.c
+@@ -580,6 +580,7 @@ add_scratch_disk (struct drv **drvs)
+     exit (EXIT_FAILURE);
+   }
+   drv->a.format = "raw";
++  drv->a.cachemode = "unsafe"; /* because it's a scratch disk */
+   drv->next = *drvs;
+   *drvs = drv;
+ }
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0027-launch-direct-Always-use-cache-unsafe-for-the-applia.patch b/SOURCES/0027-launch-direct-Always-use-cache-unsafe-for-the-applia.patch
new file mode 100644
index 0000000..c67fa4e
--- /dev/null
+++ b/SOURCES/0027-launch-direct-Always-use-cache-unsafe-for-the-applia.patch
@@ -0,0 +1,42 @@
+From 5be3a863c57aa56677338b499c4d6774d6384c3d Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Thu, 5 Sep 2013 18:45:24 +0100
+Subject: [PATCH] launch: direct: Always use cache=unsafe for the appliance.
+
+The code to select writeback was redundant, because current
+qemu always supports cache=unsafe.
+
+(cherry picked from commit 011c9639267f5f1bfac41e664b2c57cc12deabf8)
+---
+ src/launch-direct.c | 12 ++----------
+ 1 file changed, 2 insertions(+), 10 deletions(-)
+
+diff --git a/src/launch-direct.c b/src/launch-direct.c
+index 3866c9b..0de7c40 100644
+--- a/src/launch-direct.c
++++ b/src/launch-direct.c
+@@ -392,19 +392,11 @@ launch_direct (guestfs_h *g, const char *arg)
+ 
+     /* Add the ext2 appliance drive (after all the drives). */
+     if (has_appliance_drive) {
+-      const char *cachemode = "";
+-      if (qemu_supports (g, "cache=")) {
+-        if (qemu_supports (g, "unsafe"))
+-          cachemode = ",cache=unsafe";
+-        else if (qemu_supports (g, "writeback"))
+-          cachemode = ",cache=writeback";
+-      }
+-
+       size_t buf2_len = strlen (appliance) + 64;
+       char buf2[buf2_len];
+       add_cmdline (g, "-drive");
+-      snprintf (buf2, buf2_len, "file=%s,snapshot=on,id=appliance,if=%s%s",
+-                appliance, virtio_scsi ? "none" : "virtio", cachemode);
++      snprintf (buf2, buf2_len, "file=%s,snapshot=on,id=appliance,if=%s",
++                appliance, virtio_scsi ? "none" : "virtio");
+       add_cmdline (g, buf2);
+ 
+       if (virtio_scsi) {
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0028-daemon-augeas-Enhance-error-reporting-for-aug_init-f.patch b/SOURCES/0028-daemon-augeas-Enhance-error-reporting-for-aug_init-f.patch
new file mode 100644
index 0000000..3cc6370
--- /dev/null
+++ b/SOURCES/0028-daemon-augeas-Enhance-error-reporting-for-aug_init-f.patch
@@ -0,0 +1,47 @@
+From 9eb1b906eb978a46826a5eaeacb0fd29a81250ca Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Mon, 2 Sep 2013 19:19:26 +0100
+Subject: [PATCH] daemon: augeas: Enhance error reporting for aug_init
+ failures.
+
+Thanks: Dominic Cleal.
+(cherry picked from commit 3d132f29204e8c5c77f08841b5288dfe3013f4f0)
+---
+ daemon/augeas.c | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/daemon/augeas.c b/daemon/augeas.c
+index 83e2739..9d6a553 100644
+--- a/daemon/augeas.c
++++ b/daemon/augeas.c
+@@ -98,12 +98,26 @@ do_aug_init (const char *root, int flags)
+     return -1;
+   }
+ 
++#ifdef AUG_NO_ERR_CLOSE
++  /* Pass AUG_NO_ERR_CLOSE so we can display detailed errors. */
++  aug = aug_init (buf, NULL, flags | AUG_NO_ERR_CLOSE);
++#else
+   aug = aug_init (buf, NULL, flags);
++#endif
+ 
+   if (!aug) {
+-    reply_with_error ("Augeas initialization failed");
++    reply_with_error ("augeas initialization failed");
++    return -1;
++  }
++
++#ifdef AUG_NO_ERR_CLOSE
++  if (aug_error (aug) != AUG_NOERROR) {
++    AUGEAS_ERROR ("aug_init: %s (flags %d)", root, flags);
++    aug_close (aug);
++    aug = NULL;
+     return -1;
+   }
++#endif
+ 
+   return 0;
+ }
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0029-daemon-augeas-Don-t-test-if-AUG_NO_ERR_CLOSE-is-defi.patch b/SOURCES/0029-daemon-augeas-Don-t-test-if-AUG_NO_ERR_CLOSE-is-defi.patch
new file mode 100644
index 0000000..67b5a4f
--- /dev/null
+++ b/SOURCES/0029-daemon-augeas-Don-t-test-if-AUG_NO_ERR_CLOSE-is-defi.patch
@@ -0,0 +1,50 @@
+From 6beec59965fb3c18ad58d7541199a87d8d7fd4b5 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Mon, 2 Sep 2013 19:37:57 +0100
+Subject: [PATCH] daemon: augeas: Don't test if AUG_NO_ERR_CLOSE is defined.
+
+It's an enum, not a macro, and in any case it has been present in
+augeas.h since 0.10.0, and the minimum version that libguestfs
+requires is 1.0.0.
+
+This fixes commit 3d132f29204e8c5c77f08841b5288dfe3013f4f0.
+
+(cherry picked from commit 091eb0780349dade778d1ad3412ffacc7ffec9ec)
+---
+ daemon/augeas.c | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/daemon/augeas.c b/daemon/augeas.c
+index 9d6a553..45338da 100644
+--- a/daemon/augeas.c
++++ b/daemon/augeas.c
+@@ -98,26 +98,20 @@ do_aug_init (const char *root, int flags)
+     return -1;
+   }
+ 
+-#ifdef AUG_NO_ERR_CLOSE
+   /* Pass AUG_NO_ERR_CLOSE so we can display detailed errors. */
+   aug = aug_init (buf, NULL, flags | AUG_NO_ERR_CLOSE);
+-#else
+-  aug = aug_init (buf, NULL, flags);
+-#endif
+ 
+   if (!aug) {
+     reply_with_error ("augeas initialization failed");
+     return -1;
+   }
+ 
+-#ifdef AUG_NO_ERR_CLOSE
+   if (aug_error (aug) != AUG_NOERROR) {
+     AUGEAS_ERROR ("aug_init: %s (flags %d)", root, flags);
+     aug_close (aug);
+     aug = NULL;
+     return -1;
+   }
+-#endif
+ 
+   return 0;
+ }
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0030-launch-libvirt-Use-host-passthrough-instead-of-host-.patch b/SOURCES/0030-launch-libvirt-Use-host-passthrough-instead-of-host-.patch
new file mode 100644
index 0000000..7887981
--- /dev/null
+++ b/SOURCES/0030-launch-libvirt-Use-host-passthrough-instead-of-host-.patch
@@ -0,0 +1,46 @@
+From 7790ed8ef557f413c46de458cf8a91e4d73fcca6 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Wed, 25 Sep 2013 12:20:37 +0100
+Subject: [PATCH] launch: libvirt: Use host-passthrough instead of host-model.
+
+<cpu model="host-passthrough"> really passes -cpu host to qemu, which
+is what we want since we don't care about live migration or ABI
+stability.
+
+This should avoid http://bugzilla.redhat.com/870071 .
+
+Note this "taints" the libvirt domain.  We don't particularly care
+about that, and the reason for the tainting doesn't seem to make much
+sense anyway.
+
+This updates commit 6f76fdb41eb6bd124fbc3d084f5c2a3371b37d9b.
+
+(cherry picked from commit 2f4f7726e8c81cc56befcb7caa78c01174354d76)
+---
+ src/launch-libvirt.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
+index 3690b1d..80bf44c 100644
+--- a/src/launch-libvirt.c
++++ b/src/launch-libvirt.c
+@@ -822,7 +822,6 @@ construct_libvirt_xml_cpu (guestfs_h *g,
+ 
+   /* It is faster to pass the CPU host model to the appliance,
+    * allowing maximum speed for things like checksums, encryption.
+-   * Note this may cause problems on some CPUs.  See: RHBZ#870071.
+    * Only do this with KVM.  It is broken in subtle ways on TCG, and
+    * fairly pointless anyway.
+    */
+@@ -830,7 +829,7 @@ construct_libvirt_xml_cpu (guestfs_h *g,
+     XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "cpu"));
+     XMLERROR (-1,
+ 	      xmlTextWriterWriteAttribute (xo, BAD_CAST "mode",
+-					   BAD_CAST "host-model"));
++					   BAD_CAST "host-passthrough"));
+     XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "model"));
+     XMLERROR (-1,
+ 	      xmlTextWriterWriteAttribute (xo, BAD_CAST "fallback",
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0031-appliance-Create-dev-loop-control-and-similar-device.patch b/SOURCES/0031-appliance-Create-dev-loop-control-and-similar-device.patch
new file mode 100644
index 0000000..8e6e752
--- /dev/null
+++ b/SOURCES/0031-appliance-Create-dev-loop-control-and-similar-device.patch
@@ -0,0 +1,39 @@
+From f30de70c1cb828a4fe20d46946bf8779a7707dc3 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Thu, 26 Sep 2013 10:47:17 +0100
+Subject: [PATCH] appliance: Create /dev/loop-control and similar devices.
+
+When 'mount -o loop' and similar commands are used, the loop module is
+loaded automatically by the kernel when /dev/loop-control is accessed.
+
+/dev/loop-control is created semi-statically by an unholy and
+overcomplex combination of kmod static-nodes and systemd-tmpfiles
+(instead of using, say, just udev or even just a simple series of
+mknod commands).
+
+(cherry picked from commit e2895b19bb2be67c01172cdd0634553c21923605)
+---
+ appliance/init | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/appliance/init b/appliance/init
+index 79083a4..bd383c3 100755
+--- a/appliance/init
++++ b/appliance/init
+@@ -83,6 +83,13 @@ if grep -sq selinux=1 /proc/cmdline; then
+   mount -t selinuxfs none /sys/fs/selinux
+ fi
+ 
++# Set up kmod static-nodes (RHBZ#1011907).
++mkdir -p /run/tmpfiles.d
++kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf
++
++# Set up tmpfiles (must run after kmod.conf is created above).
++systemd-tmpfiles --prefix=/dev --create
++
+ # Disk optimizations.
+ # Increase the SCSI timeout so we can read remote images.
+ for f in /sys/block/sd*/device/timeout; do echo 300 > $f; done
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0032-fish-Use-UNIX_PATH_MAX-instead-of-hard-coded-value-f.patch b/SOURCES/0032-fish-Use-UNIX_PATH_MAX-instead-of-hard-coded-value-f.patch
new file mode 100644
index 0000000..f3248a9
--- /dev/null
+++ b/SOURCES/0032-fish-Use-UNIX_PATH_MAX-instead-of-hard-coded-value-f.patch
@@ -0,0 +1,36 @@
+From 9392c0f95695bd83ec5805f35b32d9d1f5c09d7c Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Wed, 9 Oct 2013 12:07:39 +0100
+Subject: [PATCH] fish: Use UNIX_PATH_MAX instead of hard-coded value for max
+ length of socket buf.
+
+(cherry picked from commit 9f1bcbca55661632176dea4e1dadc4dea0ca7f21)
+---
+ fish/rc.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/fish/rc.c b/fish/rc.c
+index bbaaee7..aa4b849 100644
+--- a/fish/rc.c
++++ b/fish/rc.c
+@@ -180,7 +180,7 @@ close_stdout (void)
+ void
+ rc_listen (void)
+ {
+-  char sockpath[128];
++  char sockpath[UNIX_PATH_MAX];
+   pid_t pid;
+   struct sockaddr_un addr;
+   int sock, s;
+@@ -336,7 +336,7 @@ rc_remote (int pid, const char *cmd, size_t argc, char *argv[],
+   guestfish_hello hello;
+   guestfish_call call;
+   guestfish_reply reply;
+-  char sockpath[128];
++  char sockpath[UNIX_PATH_MAX];
+   struct sockaddr_un addr;
+   int sock;
+   FILE *fp;
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0033-fish-CVE-2013-4419-Fix-insecure-temporary-directory-.patch b/SOURCES/0033-fish-CVE-2013-4419-Fix-insecure-temporary-directory-.patch
new file mode 100644
index 0000000..bda6cf6
--- /dev/null
+++ b/SOURCES/0033-fish-CVE-2013-4419-Fix-insecure-temporary-directory-.patch
@@ -0,0 +1,159 @@
+From d572bdf341bccafe55367335b0fe1c83553e6993 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Wed, 9 Oct 2013 12:08:10 +0100
+Subject: [PATCH] fish: CVE-2013-4419: Fix insecure temporary directory
+ handling for remote guestfish (RHBZ#1016960).
+
+When using the guestfish --remote or guestfish --listen options,
+guestfish would create a socket in a known location
+(/tmp/.guestfish-$UID/socket-$PID).
+
+The location has to be a known one in order for both ends to
+communicate.  However no checking was done that the containing
+directory (/tmp/.guestfish-$UID) is owned by the user.  Thus another
+user could create this directory and potentially modify sockets owned
+by another user's guestfish client or server.
+
+This commit fixes the issue by creating the directory unconditionally,
+and then checking that the directory has the correct owner and
+permissions, thus preventing another user from creating the directory
+first.
+
+If guestfish sees a suspicious socket directory it will print an error
+like this and exit with an error status:
+
+  guestfish: '/tmp/.guestfish-1000' is not a directory or has insecure owner or permissions
+
+Thanks: Michael Scherer for discovering this issue.
+
+Version 2:
+ - Add assigned CVE number.
+ - Update documentation.
+
+Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
+---
+ fish/guestfish.pod |  3 +++
+ fish/rc.c          | 43 +++++++++++++++++++++++++++++++++++++++----
+ src/guestfs.pod    | 17 +++++++++++++++++
+ 3 files changed, 59 insertions(+), 4 deletions(-)
+
+diff --git a/fish/guestfish.pod b/fish/guestfish.pod
+index 06663ac..2ecc058 100644
+--- a/fish/guestfish.pod
++++ b/fish/guestfish.pod
+@@ -1006,6 +1006,9 @@ user ID of the process, and C<$PID> is the process ID of the server.
+ 
+ Guestfish client and server versions must match exactly.
+ 
++Older versions of guestfish were vulnerable to CVE-2013-4419 (see
++L<guestfs(3)/CVE-2013-4419>).  This is fixed in the current version.
++
+ =head2 USING REMOTE CONTROL ROBUSTLY FROM SHELL SCRIPTS
+ 
+ From Bash, you can use the following code which creates a guestfish
+diff --git a/fish/rc.c b/fish/rc.c
+index aa4b849..c736042 100644
+--- a/fish/rc.c
++++ b/fish/rc.c
+@@ -29,6 +29,7 @@
+ #include <sys/un.h>
+ #include <signal.h>
+ #include <sys/socket.h>
++#include <errno.h>
+ 
+ #include <rpc/types.h>
+ #include <rpc/xdr.h>
+@@ -38,17 +39,49 @@
+ #include "fish.h"
+ #include "rc_protocol.h"
+ 
++/* Because this is a Unix domain socket, the total path length must be
++ * under 108 bytes.
++ */
++#define SOCKET_DIR "/tmp/.guestfish-%d" /* euid */
++#define SOCKET_PATH "/tmp/.guestfish-%d/socket-%d" /* euid, pid */
++
++static void
++create_sockdir (void)
++{
++  uid_t euid = geteuid ();
++  char dir[128];
++  int r;
++  struct stat statbuf;
++
++  /* Create the directory, and ensure it is owned by the user. */
++  snprintf (dir, sizeof dir, SOCKET_DIR, euid);
++  r = mkdir (dir, 0700);
++  if (r == -1 && errno != EEXIST) {
++  error:
++    perror (dir);
++    exit (EXIT_FAILURE);
++  }
++  if (lstat (dir, &statbuf) == -1)
++    goto error;
++  if (!S_ISDIR (statbuf.st_mode) ||
++      (statbuf.st_mode & 0777) != 0700 ||
++      statbuf.st_uid != euid) {
++    fprintf (stderr,
++             _("guestfish: '%s' is not a directory or has insecure owner or permissions\n"),
++             dir);
++    exit (EXIT_FAILURE);
++  }
++}
++
+ static void
+ create_sockpath (pid_t pid, char *sockpath, size_t len,
+                  struct sockaddr_un *addr)
+ {
+-  char dir[128];
+   uid_t euid = geteuid ();
+ 
+-  snprintf (dir, sizeof dir, "/tmp/.guestfish-%d", euid);
+-  ignore_value (mkdir (dir, 0700));
++  create_sockdir ();
+ 
+-  snprintf (sockpath, len, "/tmp/.guestfish-%d/socket-%d", euid, pid);
++  snprintf (sockpath, len, SOCKET_PATH, euid, pid);
+ 
+   addr->sun_family = AF_UNIX;
+   strcpy (addr->sun_path, sockpath);
+@@ -196,6 +229,8 @@ rc_listen (void)
+   memset (&hello, 0, sizeof hello);
+   memset (&call, 0, sizeof call);
+ 
++  create_sockdir ();
++
+   pid = fork ();
+   if (pid == -1) {
+     perror ("fork");
+diff --git a/src/guestfs.pod b/src/guestfs.pod
+index 0c57f50..eedea94 100644
+--- a/src/guestfs.pod
++++ b/src/guestfs.pod
+@@ -1998,6 +1998,23 @@ double-free in the C library (denial of service).
+ It is sufficient to update libguestfs to a version that is not
+ vulnerable: libguestfs E<ge> 1.20.8, E<ge> 1.22.2 or E<ge> 1.23.2.
+ 
++=head2 CVE-2013-4419
++
++L<https://bugzilla.redhat.com/1016960>
++
++When using the L<guestfish(1)> I<--remote> or guestfish I<--listen>
++options, guestfish would create a socket in a known location
++(C</tmp/.guestfish-$UID/socket-$PID>).
++
++The location has to be a known one in order for both ends to
++communicate.  However no checking was done that the containing
++directory (C</tmp/.guestfish-$UID>) is owned by the user.  Thus
++another user could create this directory and potentially hijack
++sockets owned by another user's guestfish client or server.
++
++It is sufficient to update libguestfs to a version that is not
++vulnerable: libguestfs E<ge> 1.20.12, E<ge> 1.22.7 or E<ge> 1.24.
++
+ =head1 CONNECTION MANAGEMENT
+ 
+ =head2 guestfs_h *
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0034-launch-libvirt-Enable-kvmclock.patch b/SOURCES/0034-launch-libvirt-Enable-kvmclock.patch
new file mode 100644
index 0000000..e2c0bcd
--- /dev/null
+++ b/SOURCES/0034-launch-libvirt-Enable-kvmclock.patch
@@ -0,0 +1,31 @@
+From ca34d94d13cd3177b0e914a225ca62b879b617c9 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Mon, 5 Aug 2013 16:50:15 +0100
+Subject: [PATCH] launch: libvirt: Enable kvmclock.
+
+This enables stable guest clocks.
+
+(cherry picked from commit a709b10bb6f6e5cad81b9333ac7f15458f2e1ce5)
+---
+ src/launch-libvirt.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
+index 80bf44c..b73f86c 100644
+--- a/src/launch-libvirt.c
++++ b/src/launch-libvirt.c
+@@ -846,6 +846,11 @@ construct_libvirt_xml_cpu (guestfs_h *g,
+   XMLERROR (-1,
+             xmlTextWriterWriteAttribute (xo, BAD_CAST "offset",
+                                          BAD_CAST "utc"));
++  XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "timer"));
++  XMLERROR (-1,
++            xmlTextWriterWriteAttribute (xo, BAD_CAST "name",
++                                         BAD_CAST "kvmclock"));
++  XMLERROR (-1, xmlTextWriterEndElement (xo));
+   XMLERROR (-1, xmlTextWriterEndElement (xo));
+ 
+   return 0;
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0035-launch-libvirt-Set-attribute-present-yes-to-enable-k.patch b/SOURCES/0035-launch-libvirt-Set-attribute-present-yes-to-enable-k.patch
new file mode 100644
index 0000000..eb9d3a1
--- /dev/null
+++ b/SOURCES/0035-launch-libvirt-Set-attribute-present-yes-to-enable-k.patch
@@ -0,0 +1,28 @@
+From 1ab268dfd95cc2630862c2b3eb98937fa36f3214 Mon Sep 17 00:00:00 2001
+From: Cole Robinson <crobinso@redhat.com>
+Date: Thu, 3 Oct 2013 15:06:03 +0100
+Subject: [PATCH] launch: libvirt: Set attribute present=yes to enable
+ kvmclock.
+
+(cherry picked from commit 216cb004aef8ad6cb554ecdb9d7c4eb7634fe678)
+---
+ src/launch-libvirt.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
+index b73f86c..8f56985 100644
+--- a/src/launch-libvirt.c
++++ b/src/launch-libvirt.c
+@@ -850,6 +850,9 @@ construct_libvirt_xml_cpu (guestfs_h *g,
+   XMLERROR (-1,
+             xmlTextWriterWriteAttribute (xo, BAD_CAST "name",
+                                          BAD_CAST "kvmclock"));
++  XMLERROR (-1,
++            xmlTextWriterWriteAttribute (xo, BAD_CAST "present",
++                                         BAD_CAST "yes"));
+   XMLERROR (-1, xmlTextWriterEndElement (xo));
+   XMLERROR (-1, xmlTextWriterEndElement (xo));
+ 
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0036-blockdev-Deprecate-blockdev_setbsz-and-make-it-do-no.patch b/SOURCES/0036-blockdev-Deprecate-blockdev_setbsz-and-make-it-do-no.patch
new file mode 100644
index 0000000..1311518
--- /dev/null
+++ b/SOURCES/0036-blockdev-Deprecate-blockdev_setbsz-and-make-it-do-no.patch
@@ -0,0 +1,78 @@
+From 756e6cd77aa2fe0089f3ae66696b467d86996883 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Tue, 8 Oct 2013 10:00:33 +0100
+Subject: [PATCH] blockdev: Deprecate blockdev_setbsz and make it do nothing
+ (RHBZ#624334).
+
+This call never did anything.  Don't use it.  Also I have submitted a
+patch upstream to remove the corresponding option from blockdev.
+
+See RHBZ#1002825 for an explanation of why this call was always
+useless.
+
+Thanks: Masayoshi Mizuma
+(cherry picked from commit 4fc44a0157a1bcd4c618e0eb8afd7c553ed0f31d)
+---
+ daemon/blockdev.c    |  7 ++-----
+ generator/actions.ml | 17 ++++++++++-------
+ 2 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/daemon/blockdev.c b/daemon/blockdev.c
+index 04cede9..8a7b1a8 100644
+--- a/daemon/blockdev.c
++++ b/daemon/blockdev.c
+@@ -121,11 +121,8 @@ do_blockdev_getbsz (const char *device)
+ int
+ do_blockdev_setbsz (const char *device, int blocksize)
+ {
+-  if (blocksize <= 0 /* || blocksize >= what? */) {
+-    reply_with_error ("blocksize must be > 0");
+-    return -1;
+-  }
+-  return (int) call_blockdev (device, "--setbsz", blocksize, 0);
++  /* Do nothing.  See https://bugzilla.redhat.com/show_bug.cgi?id=1002825 */
++  return 0;
+ }
+ 
+ int64_t
+diff --git a/generator/actions.ml b/generator/actions.ml
+index 8bc37de..24f4468 100644
+--- a/generator/actions.ml
++++ b/generator/actions.ml
+@@ -4265,8 +4265,11 @@ This uses the L<blockdev(8)> command." };
+     longdesc = "\
+ This returns the block size of a device.
+ 
+-(Note this is different from both I<size in blocks> and
+-I<filesystem block size>).
++Note: this is different from both I<size in blocks> and
++I<filesystem block size>.  Also this setting is not really
++used by anything.  You should probably not use it for
++anything.  Filesystems have their own idea about what
++block size to choose.
+ 
+ This uses the L<blockdev(8)> command." };
+ 
+@@ -4274,14 +4277,14 @@ This uses the L<blockdev(8)> command." };
+     name = "blockdev_setbsz";
+     style = RErr, [Device "device"; Int "blocksize"], [];
+     proc_nr = Some 61;
++    deprecated_by = Some "mkfs";
+     shortdesc = "set blocksize of block device";
+     longdesc = "\
+-This sets the block size of a device.
+-
+-(Note this is different from both I<size in blocks> and
+-I<filesystem block size>).
++This call does nothing and has never done anything
++because of a bug in blockdev.  B<Do not use it.>
+ 
+-This uses the L<blockdev(8)> command." };
++If you need to set the filesystem block size, use the
++C<blocksize> option of C<guestfs_mkfs>." };
+ 
+   { defaults with
+     name = "blockdev_getsz";
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0037-daemon-Fix-xfs_info-parser-because-of-new-format.patch b/SOURCES/0037-daemon-Fix-xfs_info-parser-because-of-new-format.patch
new file mode 100644
index 0000000..0586d5c
--- /dev/null
+++ b/SOURCES/0037-daemon-Fix-xfs_info-parser-because-of-new-format.patch
@@ -0,0 +1,216 @@
+From 57e674ae7bff996a263ca4f70ebea7606e250eb0 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Thu, 3 Oct 2013 18:17:39 +0100
+Subject: [PATCH] daemon: Fix xfs_info parser because of new format.
+
+The old parser had several problems: firstly it called the error path
+sometimes without calling reply_with_error causing a protocol hang.
+More seriously it had hard-coded line numbers, and since Fedora 21 the
+output of xfs_info has changed, moving lines around.
+
+Change the parser to be more robust against added fields by using the
+first name on the line as the section name, thus 'bsize=' is
+interpreted differently depending on whether it appears in the "data"
+section or the "naming" section.
+
+Ensure also that we don't call the error path without calling
+reply_with_error, which is a side-effect of the above change.
+
+(cherry picked from commit 8abd0a83b3a94e4adbd0926df818686be982cdb8)
+---
+ daemon/xfs.c | 114 ++++++++++++++++++++++++++++++++++++-----------------------
+ 1 file changed, 70 insertions(+), 44 deletions(-)
+
+diff --git a/daemon/xfs.c b/daemon/xfs.c
+index e31da8f..725f7b3 100644
+--- a/daemon/xfs.c
++++ b/daemon/xfs.c
+@@ -28,6 +28,8 @@
+ #include "actions.h"
+ #include "optgroups.h"
+ 
++#include "c-ctype.h"
++
+ #define MAX_ARGS 64
+ 
+ GUESTFSD_EXT_CMD(str_mkfs_xfs, mkfs.xfs);
+@@ -42,7 +44,7 @@ optgroup_xfs_available (void)
+   return prog_exists (str_mkfs_xfs);
+ }
+ 
+-/* Return everything up to the first comma or space in the input
++/* Return everything up to the first comma, equals or space in the input
+  * string, strdup'ing the return value.
+  */
+ static char *
+@@ -51,7 +53,7 @@ split_strdup (char *string)
+   size_t len;
+   char *ret;
+ 
+-  len = strcspn (string, " ,");
++  len = strcspn (string, " ,=");
+   ret = strndup (string, len);
+   if (!ret) {
+     reply_with_perror ("malloc");
+@@ -92,6 +94,7 @@ parse_uint64 (uint64_t *ret, const char *str)
+  *
+  * meta-data=/dev/sda1              isize=256    agcount=4, agsize=6392 blks
+  *          =                       sectsz=512   attr=2
++ *[         =                       crc=0                                    ]
+  * data     =                       bsize=4096   blocks=25568, imaxpct=25
+  *          =                       sunit=0      swidth=0 blks
+  * naming   =version 2              bsize=4096   ascii-ci=0
+@@ -99,6 +102,8 @@ parse_uint64 (uint64_t *ret, const char *str)
+  *          =                       sectsz=512   sunit=0 blks, lazy-count=1
+  * realtime =none                   extsz=4096   blocks=0, rtextents=0
+  *
++ * [...] line only appears in Fedora >= 21
++ *
+  * We may need to revisit this parsing code if the output changes
+  * in future.
+  */
+@@ -106,6 +111,7 @@ static guestfs_int_xfsinfo *
+ parse_xfs_info (char **lines)
+ {
+   guestfs_int_xfsinfo *ret;
++  CLEANUP_FREE char *section = NULL; /* first column, eg "meta-data", "data" */
+   char *p;
+   size_t i;
+ 
+@@ -145,6 +151,18 @@ parse_xfs_info (char **lines)
+   ret->xfs_rtextents = -1;
+ 
+   for (i = 0; lines[i] != NULL; ++i) {
++    if (verbose)
++      fprintf (stderr, "xfs_info: lines[%zu] = \'%s\'\n", i, lines[i]);
++
++    if (c_isalpha (lines[i][0])) {
++      free (section);
++      section = split_strdup (lines[i]);
++      if (!section) goto error;
++
++      if (verbose)
++	fprintf (stderr, "xfs_info: new section %s\n", section);
++    }
++
+     if ((p = strstr (lines[i], "meta-data="))) {
+       ret->xfs_mntpoint = split_strdup (p + 10);
+       if (ret->xfs_mntpoint == NULL) goto error;
+@@ -168,15 +186,17 @@ parse_xfs_info (char **lines)
+         goto error;
+     }
+     if ((p = strstr (lines[i], "sectsz="))) {
+-      CLEANUP_FREE char *buf = split_strdup (p + 7);
+-      if (buf == NULL) goto error;
+-      if (i == 1) {
+-        if (parse_uint32 (&ret->xfs_sectsize, buf) == -1)
+-          goto error;
+-      } else if (i == 6) {
+-        if (parse_uint32 (&ret->xfs_logsectsize, buf) == -1)
+-          goto error;
+-      } else goto error;
++      if (section) {
++	CLEANUP_FREE char *buf = split_strdup (p + 7);
++	if (buf == NULL) goto error;
++	if (STREQ (section, "meta-data")) {
++	  if (parse_uint32 (&ret->xfs_sectsize, buf) == -1)
++	    goto error;
++	} else if (STREQ (section, "log")) {
++	  if (parse_uint32 (&ret->xfs_logsectsize, buf) == -1)
++	    goto error;
++	}
++      }
+     }
+     if ((p = strstr (lines[i], "attr="))) {
+       CLEANUP_FREE char *buf = split_strdup (p + 5);
+@@ -185,32 +205,36 @@ parse_xfs_info (char **lines)
+         goto error;
+     }
+     if ((p = strstr (lines[i], "bsize="))) {
+-      CLEANUP_FREE char *buf = split_strdup (p + 6);
+-      if (buf == NULL) goto error;
+-      if (i == 2) {
+-        if (parse_uint32 (&ret->xfs_blocksize, buf) == -1)
+-          goto error;
+-      } else if (i == 4) {
+-        if (parse_uint32 (&ret->xfs_dirblocksize, buf) == -1)
+-          goto error;
+-      } else if (i == 5) {
+-        if (parse_uint32 (&ret->xfs_logblocksize, buf) == -1)
+-          goto error;
+-      } else goto error;
++      if (section) {
++	CLEANUP_FREE char *buf = split_strdup (p + 6);
++	if (buf == NULL) goto error;
++	if (STREQ (section, "data")) {
++	  if (parse_uint32 (&ret->xfs_blocksize, buf) == -1)
++	    goto error;
++	} else if (STREQ (section, "naming")) {
++	  if (parse_uint32 (&ret->xfs_dirblocksize, buf) == -1)
++	    goto error;
++	} else if (STREQ (section, "log")) {
++	  if (parse_uint32 (&ret->xfs_logblocksize, buf) == -1)
++	    goto error;
++	}
++      }
+     }
+     if ((p = strstr (lines[i], "blocks="))) {
+-      CLEANUP_FREE char *buf = split_strdup (p + 7);
+-      if (buf == NULL) goto error;
+-      if (i == 2) {
+-        if (parse_uint64 (&ret->xfs_datablocks, buf) == -1)
+-          goto error;
+-      } else if (i == 5) {
+-        if (parse_uint32 (&ret->xfs_logblocks, buf) == -1)
+-          goto error;
+-      } else if (i == 7) {
+-        if (parse_uint64 (&ret->xfs_rtblocks, buf) == -1)
+-          goto error;
+-      } else goto error;
++      if (section) {
++	CLEANUP_FREE char *buf = split_strdup (p + 7);
++	if (buf == NULL) goto error;
++	if (STREQ (section, "data")) {
++	  if (parse_uint64 (&ret->xfs_datablocks, buf) == -1)
++	    goto error;
++	} else if (STREQ (section, "log")) {
++	  if (parse_uint32 (&ret->xfs_logblocks, buf) == -1)
++	    goto error;
++	} else if (STREQ (section, "realtime")) {
++	  if (parse_uint64 (&ret->xfs_rtblocks, buf) == -1)
++	    goto error;
++	}
++      }
+     }
+     if ((p = strstr (lines[i], "imaxpct="))) {
+       CLEANUP_FREE char *buf = split_strdup (p + 8);
+@@ -219,15 +243,17 @@ parse_xfs_info (char **lines)
+         goto error;
+     }
+     if ((p = strstr (lines[i], "sunit="))) {
+-      CLEANUP_FREE char *buf = split_strdup (p + 6);
+-      if (buf == NULL) goto error;
+-      if (i == 3) {
+-        if (parse_uint32 (&ret->xfs_sunit, buf) == -1)
+-          goto error;
+-      } else if (i == 6) {
+-        if (parse_uint32 (&ret->xfs_logsunit, buf) == -1)
+-          goto error;
+-      } else goto error;
++      if (section) {
++	CLEANUP_FREE char *buf = split_strdup (p + 6);
++	if (buf == NULL) goto error;
++	if (STREQ (section, "data")) {
++	  if (parse_uint32 (&ret->xfs_sunit, buf) == -1)
++	    goto error;
++	} else if (STREQ (section, "log")) {
++	  if (parse_uint32 (&ret->xfs_logsunit, buf) == -1)
++	    goto error;
++	}
++      }
+     }
+     if ((p = strstr (lines[i], "swidth="))) {
+       CLEANUP_FREE char *buf = split_strdup (p + 7);
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0038-Add-man-page-for-etc-libguestfs-tools.conf-RHBZ-1019.patch b/SOURCES/0038-Add-man-page-for-etc-libguestfs-tools.conf-RHBZ-1019.patch
new file mode 100644
index 0000000..2870f23
--- /dev/null
+++ b/SOURCES/0038-Add-man-page-for-etc-libguestfs-tools.conf-RHBZ-1019.patch
@@ -0,0 +1,373 @@
+From 154b705f32d7e179aea1af5ed367a3d33612f294 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Thu, 17 Oct 2013 15:12:19 +0100
+Subject: [PATCH] Add man page for /etc/libguestfs-tools.conf (RHBZ#1019889).
+
+Add a man page to document this configuration file.  This is
+required by some distros, eg. Debian and RHEL.
+
+(cherry picked from commit 24a315507d1293a0ec097b57d15efb3dae784489)
+---
+ .gitignore                     |  4 +++
+ fish/Makefile.am               | 15 +++++++++
+ fish/guestfish.pod             |  3 +-
+ fish/libguestfs-tools.conf     | 16 +---------
+ fish/libguestfs-tools.conf.pod | 70 ++++++++++++++++++++++++++++++++++++++++++
+ fuse/guestmount.pod            |  3 +-
+ po-docs/ja/Makefile.am         | 12 +++++++-
+ po-docs/podfiles               |  1 +
+ po-docs/uk/Makefile.am         | 12 +++++++-
+ rescue/virt-rescue.pod         |  3 +-
+ 10 files changed, 119 insertions(+), 20 deletions(-)
+ create mode 100644 fish/libguestfs-tools.conf.pod
+
+diff --git a/.gitignore b/.gitignore
+index 6c2f580..1a94f1e 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -136,11 +136,13 @@ Makefile.in
+ /fish/guestfish-actions.pod
+ /fish/guestfish-commands.pod
+ /fish/guestfish-prepopts.pod
++/fish/libguestfs-tools.conf.5
+ /fish/prepopts.c
+ /fish/prepopts.h
+ /fish/rc_protocol.c
+ /fish/rc_protocol.h
+ /fish/stamp-guestfish.pod
++/fish/stamp-libguestfs-tools.conf.pod
+ /fish/stamp-virt-copy-in.pod
+ /fish/stamp-virt-copy-out.pod
+ /fish/stamp-virt-tar-in.pod
+@@ -201,6 +203,7 @@ Makefile.in
+ /html/guestunmount.1.html
+ /html/libguestfs-make-fixed-appliance.1.html
+ /html/libguestfs-test-tool.1.html
++/html/libguestfs-tools.conf.5.html
+ /html/virt-alignment-scan.1.html
+ /html/virt-cat.1.html
+ /html/virt-copy-in.1.html
+@@ -325,6 +328,7 @@ Makefile.in
+ /pick-guests.pl
+ /po-docs/*/*.1
+ /po-docs/*/*.3
++/po-docs/*/*.5
+ /po-docs/*/*.8
+ /po-docs/*/*.pl
+ /po-docs/po4a.conf
+diff --git a/fish/Makefile.am b/fish/Makefile.am
+index ceceb96..83a8458 100644
+--- a/fish/Makefile.am
++++ b/fish/Makefile.am
+@@ -19,6 +19,7 @@ include $(top_srcdir)/subdir-rules.mk
+ 
+ CLEANFILES = \
+ 	stamp-guestfish.pod \
++	stamp-libguestfs-tools.conf.pod \
+ 	stamp-virt-copy-in.pod \
+ 	stamp-virt-copy-out.pod \
+ 	stamp-virt-tar-in.pod \
+@@ -49,6 +50,7 @@ EXTRA_DIST = \
+ 	rc_protocol.x \
+ 	guestfish.pod \
+ 	libguestfs-tools.conf \
++	libguestfs-tools.conf.pod \
+ 	virt-copy-in \
+ 	virt-copy-out \
+ 	virt-tar-in \
+@@ -178,12 +180,14 @@ bin_SCRIPTS = virt-copy-in virt-copy-out virt-tar-in virt-tar-out
+ 
+ man_MANS = \
+ 	guestfish.1 \
++	libguestfs-tools.conf.5 \
+ 	virt-copy-in.1 \
+ 	virt-copy-out.1 \
+ 	virt-tar-in.1 \
+ 	virt-tar-out.1
+ noinst_DATA = \
+ 	$(top_builddir)/html/guestfish.1.html \
++	$(top_builddir)/html/libguestfs-tools.conf.5.html \
+ 	$(top_builddir)/html/virt-copy-in.1.html \
+ 	$(top_builddir)/html/virt-copy-out.1.html \
+ 	$(top_builddir)/html/virt-tar-in.1.html \
+@@ -202,6 +206,17 @@ stamp-guestfish.pod: guestfish.pod guestfish-actions.pod guestfish-commands.pod
+ 	  $<
+ 	touch $@
+ 
++libguestfs-tools.conf.5 $(top_builddir)/html/libguestfs-tools.conf.5.html: stamp-libguestfs-tools.conf.pod
++
++stamp-libguestfs-tools.conf.pod: libguestfs-tools.conf.pod
++	$(PODWRAPPER) \
++	  --section 5 \
++	  --man libguestfs-tools.conf.5 \
++	  --html $(top_builddir)/html/libguestfs-tools.conf.5.html \
++	  --license GPLv2+ \
++	  $<
++	touch $@
++
+ virt-copy-in.1 $(top_builddir)/html/virt-copy-in.1.html: stamp-virt-copy-in.pod
+ 
+ stamp-virt-copy-in.pod: virt-copy-in.pod
+diff --git a/fish/guestfish.pod b/fish/guestfish.pod
+index 2ecc058..c19fe6c 100644
+--- a/fish/guestfish.pod
++++ b/fish/guestfish.pod
+@@ -1495,7 +1495,7 @@ See L</LIBGUESTFS_CACHEDIR>, L</LIBGUESTFS_TMPDIR>.
+ This configuration file controls the default read-only or read-write
+ mode (I<--ro> or I<--rw>).
+ 
+-See L</OPENING DISKS FOR READ AND WRITE>.
++See L<libguestfs-tools.conf(5)>.
+ 
+ =item $HOME/.guestfish
+ 
+@@ -1567,6 +1567,7 @@ L<virt-tar(1)>,
+ L<virt-tar-in(1)>,
+ L<virt-tar-out(1)>,
+ L<virt-win-reg(1)>,
++L<libguestfs-tools.conf(5)>,
+ L<display(1)>,
+ L<hexedit(1)>,
+ L<supermin-helper(8)>.
+diff --git a/fish/libguestfs-tools.conf b/fish/libguestfs-tools.conf
+index 7e60468..898a8de 100644
+--- a/fish/libguestfs-tools.conf
++++ b/fish/libguestfs-tools.conf
+@@ -1,21 +1,7 @@
+ # /etc/libguestfs-tools.conf or .libguestfs-tools.rc
+ #
+-# This configuration file changes the defaults for the following programs:
+-#   * guestfish
+-#   * guestmount
+-#   * virt-rescue
+-# For more information on these programs, read the manual pages
+-# (guestfish(1) etc).
++# See libguestfs-tools.conf(5) man page for documentation.
+ #
+-# /etc/libguestfs-tools.conf is the global configuration file for all
+-# of the above programs.  Local users can override the global
+-# configuration by copying this file into '.libguestfs-tools.rc' in
+-# their home directory and modifying it accordingly.
+-#
+-# This file is parsed by the libconfig library.  For more information
+-# about the format, see
+-# http://www.hyperrealm.com/libconfig/libconfig_manual.html
+-
+ # Uncomment the following line to make guestfish, guestmount,
+ # virt-rescue be read-only by default (as if the --ro flag was given).
+ # If it is commented out then the default is read-write.  Note that
+diff --git a/fish/libguestfs-tools.conf.pod b/fish/libguestfs-tools.conf.pod
+new file mode 100644
+index 0000000..0c1817a
+--- /dev/null
++++ b/fish/libguestfs-tools.conf.pod
+@@ -0,0 +1,70 @@
++=encoding utf8
++
++=head1 NAME
++
++/etc/libguestfs-tools.conf - configuration file for guestfish, guestmount, virt-rescue
++
++=head1 SYNOPSIS
++
++ /etc/libguestfs-tools.conf
++
++ $HOME/.libguestfs-tools.rc
++
++=head1 DESCRIPTION
++
++C</etc/libguestfs-tools.conf> or C<$HOME/.libguestfs-tools.rc> changes
++the defaults for the following programs only:
++
++=over 4
++
++=item *
++
++L<guestfish(1)>
++
++=item *
++
++L<guestmount(1)>
++
++=item *
++
++L<virt-rescue(1)>
++
++=back
++
++There is currently only one setting which is controlled by this
++file.  Adding (or uncommenting):
++
++ read_only = true;
++
++changes these programs so they act as if the I<--ro> flag was given on
++the command line.  You can use this to make the programs safe against
++accidental modification of a live guest (users would have to
++explicitly add the I<--rw> flag to modify guests).  This is not the
++default because it is not backwards compatible.
++See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>.
++
++Note that B<the semicolon is required>.
++
++C</etc/libguestfs-tools.conf> is the global configuration file for all
++of the above programs.  Local users can override the global
++configuration by copying this file into C<.libguestfs-tools.rc> in
++their home directory and modifying it accordingly.
++
++This file is parsed by the libconfig library.  For more information
++about the format, see:
++L<http://www.hyperrealm.com/libconfig/libconfig_manual.html>
++
++=head1 SEE ALSO
++
++L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>,
++L<guestmount(1)>,
++L<virt-rescue(1)>,
++L<http://libguestfs.org/>.
++
++=head1 AUTHORS
++
++Richard W.M. Jones (C<rjones at redhat dot com>)
++
++=head1 COPYRIGHT
++
++Copyright (C) 2011-2013 Red Hat Inc.
+diff --git a/fuse/guestmount.pod b/fuse/guestmount.pod
+index b9e93de..42e8579 100644
+--- a/fuse/guestmount.pod
++++ b/fuse/guestmount.pod
+@@ -394,7 +394,7 @@ This also stops the daemon from forking into the background
+ This configuration file controls the default read-only or read-write
+ mode (I<--ro> or I<--rw>).
+ 
+-See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>.
++See L<libguestfs-tools.conf(5)>.
+ 
+ =back
+ 
+@@ -412,6 +412,7 @@ L<virt-inspector(1)>,
+ L<virt-cat(1)>,
+ L<virt-edit(1)>,
+ L<virt-tar(1)>,
++L<libguestfs-tools.conf(5)>,
+ L<guestfs(3)/MOUNT LOCAL>,
+ L<http://libguestfs.org/>,
+ L<http://fuse.sf.net/>.
+diff --git a/po-docs/ja/Makefile.am b/po-docs/ja/Makefile.am
+index 0b1b10f..217dcd4 100644
+--- a/po-docs/ja/Makefile.am
++++ b/po-docs/ja/Makefile.am
+@@ -23,7 +23,7 @@ include $(top_srcdir)/subdir-rules.mk
+ 
+ LINGUA = $(shell basename -- `pwd`)
+ 
+-CLEANFILES = *.1 *.3 stamp-update-po
++CLEANFILES = *.1 *.3 *.5 stamp-update-po
+ 
+ MANPAGES = \
+ 	guestfish.1 \
+@@ -46,6 +46,7 @@ MANPAGES = \
+ 	guestunmount.1 \
+ 	libguestfs-make-fixed-appliance.1 \
+ 	libguestfs-test-tool.1 \
++	libguestfs-tools.conf.5 \
+ 	virt-alignment-scan.1 \
+ 	virt-cat.1 \
+ 	virt-copy-in.1 \
+@@ -122,6 +123,13 @@ virt-sysprep.1: virt-sysprep.pod sysprep-extra-options.pod sysprep-operations.po
+ 	  --section 3 \
+ 	  $<
+ 
++%.5: %.pod
++	$(PODWRAPPER) \
++	  --no-strict-checks \
++	  --man $@ \
++	  --section 5 \
++	  $<
++
+ %.8: %.pod
+ 	$(PODWRAPPER) \
+ 	  --no-strict-checks \
+@@ -149,3 +157,5 @@ install-data-hook:
+ 	$(INSTALL) -m 0644 *.1 $(DESTDIR)$(mandir)/$(LINGUA)/man1
+ 	$(MKDIR_P) $(DESTDIR)$(mandir)/$(LINGUA)/man3
+ 	$(INSTALL) -m 0644 *.3 $(DESTDIR)$(mandir)/$(LINGUA)/man3
++	$(MKDIR_P) $(DESTDIR)$(mandir)/$(LINGUA)/man5
++	$(INSTALL) -m 0644 *.5 $(DESTDIR)$(mandir)/$(LINGUA)/man5
+diff --git a/po-docs/podfiles b/po-docs/podfiles
+index 3347554..629a6b0 100644
+--- a/po-docs/podfiles
++++ b/po-docs/podfiles
+@@ -16,6 +16,7 @@
+ ../fish/guestfish-commands.pod
+ ../fish/guestfish-prepopts.pod
+ ../fish/guestfish.pod
++../fish/libguestfs-tools.conf.pod
+ ../fish/virt-copy-in.pod
+ ../fish/virt-copy-out.pod
+ ../fish/virt-tar-in.pod
+diff --git a/po-docs/uk/Makefile.am b/po-docs/uk/Makefile.am
+index 0b1b10f..217dcd4 100644
+--- a/po-docs/uk/Makefile.am
++++ b/po-docs/uk/Makefile.am
+@@ -23,7 +23,7 @@ include $(top_srcdir)/subdir-rules.mk
+ 
+ LINGUA = $(shell basename -- `pwd`)
+ 
+-CLEANFILES = *.1 *.3 stamp-update-po
++CLEANFILES = *.1 *.3 *.5 stamp-update-po
+ 
+ MANPAGES = \
+ 	guestfish.1 \
+@@ -46,6 +46,7 @@ MANPAGES = \
+ 	guestunmount.1 \
+ 	libguestfs-make-fixed-appliance.1 \
+ 	libguestfs-test-tool.1 \
++	libguestfs-tools.conf.5 \
+ 	virt-alignment-scan.1 \
+ 	virt-cat.1 \
+ 	virt-copy-in.1 \
+@@ -122,6 +123,13 @@ virt-sysprep.1: virt-sysprep.pod sysprep-extra-options.pod sysprep-operations.po
+ 	  --section 3 \
+ 	  $<
+ 
++%.5: %.pod
++	$(PODWRAPPER) \
++	  --no-strict-checks \
++	  --man $@ \
++	  --section 5 \
++	  $<
++
+ %.8: %.pod
+ 	$(PODWRAPPER) \
+ 	  --no-strict-checks \
+@@ -149,3 +157,5 @@ install-data-hook:
+ 	$(INSTALL) -m 0644 *.1 $(DESTDIR)$(mandir)/$(LINGUA)/man1
+ 	$(MKDIR_P) $(DESTDIR)$(mandir)/$(LINGUA)/man3
+ 	$(INSTALL) -m 0644 *.3 $(DESTDIR)$(mandir)/$(LINGUA)/man3
++	$(MKDIR_P) $(DESTDIR)$(mandir)/$(LINGUA)/man5
++	$(INSTALL) -m 0644 *.5 $(DESTDIR)$(mandir)/$(LINGUA)/man5
+diff --git a/rescue/virt-rescue.pod b/rescue/virt-rescue.pod
+index 9484ad5..7b77f97 100755
+--- a/rescue/virt-rescue.pod
++++ b/rescue/virt-rescue.pod
+@@ -410,7 +410,7 @@ manual page L<sh(1)> for details.
+ This configuration file controls the default read-only or read-write
+ mode (I<--ro> or I<--rw>).
+ 
+-See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>.
++See L<libguestfs-tools.conf(5)>.
+ 
+ =back
+ 
+@@ -421,6 +421,7 @@ L<guestfish(1)>,
+ L<virt-cat(1)>,
+ L<virt-edit(1)>,
+ L<virt-filesystems(1)>,
++L<libguestfs-tools.conf(5)>,
+ L<http://libguestfs.org/>.
+ 
+ =head1 AUTHOR
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0039-RHEL-7-Emphasize-libguestfs-winsupport-package-RHBZ-.patch b/SOURCES/0039-RHEL-7-Emphasize-libguestfs-winsupport-package-RHBZ-.patch
new file mode 100644
index 0000000..2aa449f
--- /dev/null
+++ b/SOURCES/0039-RHEL-7-Emphasize-libguestfs-winsupport-package-RHBZ-.patch
@@ -0,0 +1,96 @@
+From 66eb6b8c3a5b851035d5f24fb60e7045e15a4b4d Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Mon, 10 Jan 2011 16:07:12 +0000
+Subject: [PATCH] RHEL 7: Emphasize libguestfs-winsupport package
+ (RHBZ#627468).
+
+This RHEL-only patch changes the error messages when the
+inspection code cannot find an operating system inside the guest
+image.  For a Windows guest this may happen because the user has not
+installed the separate 'libguestfs-winsupport' package.  Therefore we
+emphasize that the user may need to install this package.
+
+Notes:
+
+(1) In RHEL there are two pieces of inspection code, the old Perl code
+(deprecated upstream) and the new C core inspection API.  Therefore
+this patch has to touch two places with essentially the same change.
+
+(2) This patch doesn't try to be clever and detect if it was a Windows
+guest.  This should reduce the chance of failure.
+
+Output from (Perl) virt-inspector now looks like this:
+
+ $ virt-inspector disk.img
+ No operating system could be detected inside this disk image.
+
+ This may be because the file is not a disk image, or is not a virtual machine
+ image, or because the OS type is not understood by virt-inspector.
+
+ If you feel this is an error, please file a bug report including as much
+ information about the disk image as possible.
+
+ RHEL notice
+ -------------
+ libguestfs will return this error for Microsoft Windows guests if the
+ separate 'libguestfs-winsupport' package is not installed. If the
+ guest is running Microsoft Windows, please try again after installing
+ 'libguestfs-winsupport'.
+
+Output from guestfish (ie. C core inspection API) now looks like this:
+
+ $ guestfish -i disk.img
+ guestfish: no operating system was found on this disk
+
+ RHEL notice
+ -------------
+ libguestfs will return this error for Microsoft Windows guests if the
+ separate 'libguestfs-winsupport' package is not installed. If the
+ guest is running Microsoft Windows, please try again after installing
+ 'libguestfs-winsupport'.
+---
+ fish/inspect.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/fish/inspect.c b/fish/inspect.c
+index 801d867..8858fcd 100644
+--- a/fish/inspect.c
++++ b/fish/inspect.c
+@@ -22,6 +22,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <errno.h>
++#include <unistd.h>
+ #include <libintl.h>
+ 
+ #include "c-ctype.h"
+@@ -68,6 +69,10 @@ inspect_mount (void)
+     exit (EXIT_FAILURE);
+ 
+   if (roots[0] == NULL) {
++    int libguestfs_winsupport_installed =
++      access ("/usr/lib/guestfs/supermin.d/ntfs.img", F_OK) == 0 ||
++      access ("/usr/lib64/guestfs/supermin.d/ntfs.img", F_OK) == 0;
++
+     fprintf (stderr,
+       _("%s: no operating system was found on this disk\n"
+         "\n"
+@@ -84,6 +89,15 @@ inspect_mount (void)
+         "with these tools.  Use the guestfish equivalent commands\n"
+         "(see the virt tool manual page).\n"),
+              program_name);
++    if (!libguestfs_winsupport_installed)
++      fprintf (stderr,
++    _("\nRHEL notice\n"
++      "-------------\n"
++      "libguestfs will return this error for Microsoft Windows guests if the\n"
++      "separate 'libguestfs-winsupport' package is not installed. If the\n"
++      "guest is running Microsoft Windows, please try again after installing\n"
++      "'libguestfs-winsupport'.\n"));
++
+     guestfs___free_string_list (roots);
+     exit (EXIT_FAILURE);
+   }
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0040-RHEL-7-Remove-libguestfs-live-RHBZ-798980.patch b/SOURCES/0040-RHEL-7-Remove-libguestfs-live-RHBZ-798980.patch
new file mode 100644
index 0000000..0941689
--- /dev/null
+++ b/SOURCES/0040-RHEL-7-Remove-libguestfs-live-RHBZ-798980.patch
@@ -0,0 +1,38 @@
+From c80606c691abda13cc0f76381fe9bf6af3e52a1a Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Fri, 21 Dec 2012 15:50:11 +0000
+Subject: [PATCH] RHEL 7: Remove libguestfs live (RHBZ#798980).
+
+This isn't supported in RHEL 7.
+---
+ src/launch-unix.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/launch-unix.c b/src/launch-unix.c
+index ed71ab4..6eafd25 100644
+--- a/src/launch-unix.c
++++ b/src/launch-unix.c
+@@ -36,6 +36,12 @@
+ static int
+ launch_unix (guestfs_h *g, const char *sockpath)
+ {
++  error (g,
++	 "launch: In RHEL, only the 'libvirt' or 'appliance' method is supported.\n"
++	 "In particular, \"libguestfs live\" is not supported.");
++  return -1;
++
++#if 0
+   int r, daemon_sock = -1;
+   struct sockaddr_un addr;
+   uint32_t size;
+@@ -101,6 +107,7 @@ launch_unix (guestfs_h *g, const char *sockpath)
+     g->conn = NULL;
+   }
+   return -1;
++#endif
+ }
+ 
+ static int
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0041-RHEL-7-Exclude-iptables-from-the-appliance-RHBZ-8586.patch b/SOURCES/0041-RHEL-7-Exclude-iptables-from-the-appliance-RHBZ-8586.patch
new file mode 100644
index 0000000..34c28fa
--- /dev/null
+++ b/SOURCES/0041-RHEL-7-Exclude-iptables-from-the-appliance-RHBZ-8586.patch
@@ -0,0 +1,26 @@
+From 4b7cf0b65705f7b570ebd2fcdd3873d058113b4c Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Wed, 19 Sep 2012 15:02:27 +0100
+Subject: [PATCH] RHEL 7: Exclude iptables from the appliance (RHBZ#858648).
+
+---
+ appliance/excludelist.in | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/appliance/excludelist.in b/appliance/excludelist.in
+index aa4c406..c43006e 100644
+--- a/appliance/excludelist.in
++++ b/appliance/excludelist.in
+@@ -50,6 +50,9 @@
+ ^redhat-logos
+ ^dracut
+ 
++/* RHBZ#858648 */
++^iptables
++
+ #endif
+ 
+ #ifdef DEBIAN
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0042-RHEL-7-Ignore-etc-release-if-etc-redhat-release-exis.patch b/SOURCES/0042-RHEL-7-Ignore-etc-release-if-etc-redhat-release-exis.patch
new file mode 100644
index 0000000..4aed775
--- /dev/null
+++ b/SOURCES/0042-RHEL-7-Ignore-etc-release-if-etc-redhat-release-exis.patch
@@ -0,0 +1,29 @@
+From e053a58f7881df8372ff0d6d849d193b7778e1d8 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Mon, 5 Nov 2012 11:19:19 +0000
+Subject: [PATCH] RHEL 7: Ignore /etc/release if /etc/redhat-release exists
+ (RHBZ#873219).
+
+If the user has created /etc/release on a RHEL machine, don't
+mis-detect the OS as NetBSD.
+---
+ src/inspect-fs.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/inspect-fs.c b/src/inspect-fs.c
+index 0473e92..4ad294b 100644
+--- a/src/inspect-fs.c
++++ b/src/inspect-fs.c
+@@ -223,7 +223,8 @@ check_filesystem (guestfs_h *g, const char *mountable,
+   else if (is_dir_etc &&
+            is_dir_bin &&
+            guestfs_is_file (g, "/etc/fstab") > 0 &&
+-           guestfs_is_file (g, "/etc/release") > 0) {
++           guestfs_is_file (g, "/etc/release") > 0 &&
++           guestfs_is_file (g, "/etc/redhat-release") == 0) {
+     /* Ignore /dev/sda1 which is a shadow of the real root filesystem
+      * that is probably /dev/sda5 (see:
+      * http://www.freebsd.org/doc/handbook/disk-organization.html)
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0043-RHEL-7-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch b/SOURCES/0043-RHEL-7-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch
new file mode 100644
index 0000000..18bbe13
--- /dev/null
+++ b/SOURCES/0043-RHEL-7-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch
@@ -0,0 +1,344 @@
+From 3001eccab8e8907128ffd73745fdfeb82493809c Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Thu, 18 Jul 2013 18:31:53 +0100
+Subject: [PATCH] RHEL 7: Remove 9p APIs from RHEL (RHBZ#921710).
+
+---
+ Makefile.am          |   2 +-
+ daemon/9p.c          | 221 ---------------------------------------------------
+ daemon/Makefile.am   |   1 -
+ generator/actions.ml |  23 ------
+ gobject/Makefile.inc |   2 -
+ po/POTFILES          |   2 -
+ 6 files changed, 1 insertion(+), 250 deletions(-)
+ delete mode 100644 daemon/9p.c
+
+diff --git a/Makefile.am b/Makefile.am
+index c36f028..a09bd82 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -53,7 +53,7 @@ SUBDIRS += tests/xfs
+ SUBDIRS += tests/charsets
+ SUBDIRS += tests/xml
+ SUBDIRS += tests/mount-local
+-SUBDIRS += tests/9p
++#SUBDIRS += tests/9p
+ SUBDIRS += tests/rsync
+ SUBDIRS += tests/bigdirs
+ SUBDIRS += tests/disk-labels
+diff --git a/daemon/9p.c b/daemon/9p.c
+deleted file mode 100644
+index 024ac24..0000000
+--- a/daemon/9p.c
++++ /dev/null
+@@ -1,221 +0,0 @@
+-/* libguestfs - the guestfsd daemon
+- * Copyright (C) 2011 Red Hat Inc.
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2 of the License, or
+- * (at your option) any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+- */
+-
+-#include <config.h>
+-
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <string.h>
+-#include <unistd.h>
+-#include <limits.h>
+-#include <errno.h>
+-#include <sys/types.h>
+-#include <sys/stat.h>
+-#include <dirent.h>
+-#include <fcntl.h>
+-
+-#include "daemon.h"
+-#include "actions.h"
+-
+-#define BUS_PATH "/sys/bus/virtio/drivers/9pnet_virtio"
+-GUESTFSD_EXT_CMD(str_mount, mount);
+-
+-static char *read_whole_file (const char *filename);
+-
+-/* https://bugzilla.redhat.com/show_bug.cgi?id=714981#c1 */
+-char **
+-do_list_9p (void)
+-{
+-  DECLARE_STRINGSBUF (r);
+-
+-  DIR *dir;
+-
+-  dir = opendir (BUS_PATH);
+-  if (!dir) {
+-    perror ("opendir: " BUS_PATH);
+-    if (errno != ENOENT) {
+-      reply_with_perror ("opendir: " BUS_PATH);
+-      return NULL;
+-    }
+-
+-    /* If this directory doesn't exist, it probably means that
+-     * the virtio driver isn't loaded.  Don't return an error
+-     * in this case, but return an empty list.
+-     */
+-    if (end_stringsbuf (&r) == -1)
+-      return NULL;
+-
+-    return r.argv;
+-  }
+-
+-  while (1) {
+-    errno = 0;
+-    struct dirent *d = readdir (dir);
+-    if (d == NULL) break;
+-
+-    if (STRPREFIX (d->d_name, "virtio")) {
+-      char mount_tag_path[256];
+-      snprintf (mount_tag_path, sizeof mount_tag_path,
+-                BUS_PATH "/%s/mount_tag", d->d_name);
+-
+-      /* A bit unclear, but it looks like the virtio transport allows
+-       * the mount tag length to be unlimited (or up to 65536 bytes).
+-       * See: linux/include/linux/virtio_9p.h
+-       */
+-      CLEANUP_FREE char *mount_tag = read_whole_file (mount_tag_path);
+-      if (mount_tag == 0)
+-        continue;
+-
+-      if (add_string (&r, mount_tag) == -1) {
+-        closedir (dir);
+-        return NULL;
+-      }
+-    }
+-  }
+-
+-  /* Check readdir didn't fail */
+-  if (errno != 0) {
+-    reply_with_perror ("readdir: /sys/block");
+-    free_stringslen (r.argv, r.size);
+-    closedir (dir);
+-    return NULL;
+-  }
+-
+-  /* Close the directory handle */
+-  if (closedir (dir) == -1) {
+-    reply_with_perror ("closedir: /sys/block");
+-    free_stringslen (r.argv, r.size);
+-    return NULL;
+-  }
+-
+-  /* Sort the tags. */
+-  if (r.size > 0)
+-    sort_strings (r.argv, r.size);
+-
+-  /* NULL terminate the list */
+-  if (end_stringsbuf (&r) == -1)
+-    return NULL;
+-
+-  return r.argv;
+-}
+-
+-/* Read whole file into dynamically allocated array.  If there is an
+- * error, DON'T call reply_with_perror, just return NULL.  Returns a
+- * \0-terminated string.
+- */
+-static char *
+-read_whole_file (const char *filename)
+-{
+-  char *r = NULL;
+-  size_t alloc = 0, size = 0;
+-  int fd;
+-
+-  fd = open (filename, O_RDONLY|O_CLOEXEC);
+-  if (fd == -1) {
+-    perror (filename);
+-    return NULL;
+-  }
+-
+-  while (1) {
+-    alloc += 256;
+-    char *r2 = realloc (r, alloc);
+-    if (r2 == NULL) {
+-      perror ("realloc");
+-      free (r);
+-      close (fd);
+-      return NULL;
+-    }
+-    r = r2;
+-
+-    /* The '- 1' in the size calculation ensures there is space below
+-     * to add \0 to the end of the input.
+-     */
+-    ssize_t n = read (fd, r + size, alloc - size - 1);
+-    if (n == -1) {
+-      fprintf (stderr, "read: %s: %m\n", filename);
+-      free (r);
+-      close (fd);
+-      return NULL;
+-    }
+-    if (n == 0)
+-      break;
+-    size += n;
+-  }
+-
+-  if (close (fd) == -1) {
+-    fprintf (stderr, "close: %s: %m\n", filename);
+-    free (r);
+-    return NULL;
+-  }
+-
+-  r[size] = '\0';
+-
+-  return r;
+-}
+-
+-/* Takes optional arguments, consult optargs_bitmask. */
+-int
+-do_mount_9p (const char *mount_tag, const char *mountpoint, const char *options)
+-{
+-  CLEANUP_FREE char *mp = NULL, *opts = NULL, *err = NULL;
+-  struct stat statbuf;
+-  int r;
+-
+-  ABS_PATH (mountpoint, , return -1);
+-
+-  mp = sysroot_path (mountpoint);
+-  if (!mp) {
+-    reply_with_perror ("malloc");
+-    return -1;
+-  }
+-
+-  /* Check the mountpoint exists and is a directory. */
+-  if (stat (mp, &statbuf) == -1) {
+-    reply_with_perror ("%s", mountpoint);
+-    return -1;
+-  }
+-  if (!S_ISDIR (statbuf.st_mode)) {
+-    reply_with_perror ("%s: mount point is not a directory", mountpoint);
+-    return -1;
+-  }
+-
+-  /* Add trans=virtio to the options. */
+-  if ((optargs_bitmask & GUESTFS_MOUNT_9P_OPTIONS_BITMASK) &&
+-      STRNEQ (options, "")) {
+-    if (asprintf (&opts, "trans=virtio,%s", options) == -1) {
+-      reply_with_perror ("asprintf");
+-      return -1;
+-    }
+-  }
+-  else {
+-    opts = strdup ("trans=virtio");
+-    if (opts == NULL) {
+-      reply_with_perror ("strdup");
+-      return -1;
+-    }
+-  }
+-
+-  r = command (NULL, &err,
+-               str_mount, "-o", opts, "-t", "9p", mount_tag, mp, NULL);
+-  if (r == -1) {
+-    reply_with_error ("%s on %s: %s", mount_tag, mountpoint, err);
+-    return -1;
+-  }
+-
+-  return 0;
+-}
+diff --git a/daemon/Makefile.am b/daemon/Makefile.am
+index d077dab..13a04ac 100644
+--- a/daemon/Makefile.am
++++ b/daemon/Makefile.am
+@@ -77,7 +77,6 @@ noinst_PROGRAMS = guestfsd
+ endif
+ 
+ guestfsd_SOURCES = \
+-	9p.c \
+ 	acl.c \
+ 	actions.h \
+ 	available.c \
+diff --git a/generator/actions.ml b/generator/actions.ml
+index 24f4468..ccd9e95 100644
+--- a/generator/actions.ml
++++ b/generator/actions.ml
+@@ -8886,29 +8886,6 @@ This returns true iff the device exists and contains all zero bytes.
+ Note that for large devices this can take a long time to run." };
+ 
+   { defaults with
+-    name = "list_9p";
+-    style = RStringList "mounttags", [], [];
+-    proc_nr = Some 285;
+-    shortdesc = "list 9p filesystems";
+-    longdesc = "\
+-List all 9p filesystems attached to the guest.  A list of
+-mount tags is returned." };
+-
+-  { defaults with
+-    name = "mount_9p";
+-    style = RErr, [String "mounttag"; String "mountpoint"], [OString "options"];
+-    proc_nr = Some 286;
+-    camel_name = "Mount9P";
+-    shortdesc = "mount 9p filesystem";
+-    longdesc = "\
+-Mount the virtio-9p filesystem with the tag C<mounttag> on the
+-directory C<mountpoint>.
+-
+-If required, C<trans=virtio> will be automatically added to the options.
+-Any other options required can be passed in the optional C<options>
+-parameter." };
+-
+-  { defaults with
+     name = "list_dm_devices";
+     style = RStringList "devices", [], [];
+     proc_nr = Some 287;
+diff --git a/gobject/Makefile.inc b/gobject/Makefile.inc
+index 19c771f..47360cb 100644
+--- a/gobject/Makefile.inc
++++ b/gobject/Makefile.inc
+@@ -64,7 +64,6 @@ guestfs_gobject_headers= \
+   include/guestfs-gobject/optargs-is_fifo.h \
+   include/guestfs-gobject/optargs-is_socket.h \
+   include/guestfs-gobject/optargs-mkfs.h \
+-  include/guestfs-gobject/optargs-mount_9p.h \
+   include/guestfs-gobject/optargs-ntfsresize.h \
+   include/guestfs-gobject/optargs-btrfs_filesystem_resize.h \
+   include/guestfs-gobject/optargs-compress_out.h \
+@@ -138,7 +137,6 @@ guestfs_gobject_sources= \
+   src/optargs-is_fifo.c \
+   src/optargs-is_socket.c \
+   src/optargs-mkfs.c \
+-  src/optargs-mount_9p.c \
+   src/optargs-ntfsresize.c \
+   src/optargs-btrfs_filesystem_resize.c \
+   src/optargs-compress_out.c \
+diff --git a/po/POTFILES b/po/POTFILES
+index 53b660d..cc4e917 100644
+--- a/po/POTFILES
++++ b/po/POTFILES
+@@ -2,7 +2,6 @@ align/scan.c
+ cat/virt-cat.c
+ cat/virt-filesystems.c
+ cat/virt-ls.c
+-daemon/9p.c
+ daemon/acl.c
+ daemon/augeas.c
+ daemon/available.c
+@@ -180,7 +179,6 @@ gobject/src/optargs-mkfs.c
+ gobject/src/optargs-mkfs_btrfs.c
+ gobject/src/optargs-mkswap.c
+ gobject/src/optargs-mktemp.c
+-gobject/src/optargs-mount_9p.c
+ gobject/src/optargs-mount_local.c
+ gobject/src/optargs-ntfsclone_out.c
+ gobject/src/optargs-ntfsfix.c
+-- 
+1.8.3.1
+
diff --git a/SOURCES/0044-RHEL-7-Disable-unsupported-remote-drive-protocols-RH.patch b/SOURCES/0044-RHEL-7-Disable-unsupported-remote-drive-protocols-RH.patch
new file mode 100644
index 0000000..bf0dd2e
--- /dev/null
+++ b/SOURCES/0044-RHEL-7-Disable-unsupported-remote-drive-protocols-RH.patch
@@ -0,0 +1,475 @@
+From c1bb594927f8fbc8df2c608f804249611893f06c Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Mon, 29 Jul 2013 14:47:56 +0100
+Subject: [PATCH] RHEL 7: Disable unsupported remote drive protocols
+ (RHBZ#962113).
+
+This disables support for unsupported remote drive protocols:
+
+ * ftp
+ * ftps
+ * http
+ * https
+ * tftp
+ * gluster
+ * iscsi
+ * rbd
+ * sheepdog
+ * ssh
+
+Note 'nbd' is not disabled, and of course 'file' works.
+
+We hope to gradually add some of these back over the lifetime of RHEL 7.
+---
+ fish/guestfish.pod   |  67 ----------------------------
+ fish/test-add-uri.sh |  29 ------------
+ generator/actions.ml |  72 ------------------------------
+ src/drives.c         |   8 ++++
+ src/guestfs.pod      | 121 ---------------------------------------------------
+ 5 files changed, 8 insertions(+), 289 deletions(-)
+
+diff --git a/fish/guestfish.pod b/fish/guestfish.pod
+index c19fe6c..a240280 100644
+--- a/fish/guestfish.pod
++++ b/fish/guestfish.pod
+@@ -1138,40 +1138,6 @@ The possible I<-a URI> formats are described below.
+ 
+ Add the local disk image (or device) called C<disk.img>.
+ 
+-=head2 B<-a ftp://[user@]example.com[:port]/disk.img>
+-
+-=head2 B<-a ftps://[user@]example.com[:port]/disk.img>
+-
+-=head2 B<-a http://[user@]example.com[:port]/disk.img>
+-
+-=head2 B<-a https://[user@]example.com[:port]/disk.img>
+-
+-=head2 B<-a tftp://[user@]example.com[:port]/disk.img>
+-
+-Add a disk located on a remote FTP, HTTP or TFTP server.
+-
+-The equivalent API command would be:
+-
+- ><fs> add /disk.img protocol:(ftp|...) server:tcp:example.com
+-
+-=head2 B<-a gluster://example.com[:port]/disk>
+-
+-Add a disk image located on GlusterFS storage.
+-
+-The server is the one running C<glusterd>, and may be C<localhost>.
+-
+-The equivalent API command would be:
+-
+- ><fs> add /disk protocol:gluster server:tcp:example.com
+-
+-=head2 B<-a iscsi://example.com[:port]/target-iqn-name[/lun]>
+-
+-Add a disk located on an iSCSI server.
+-
+-The equivalent API command would be:
+-
+- ><fs> add /target-iqn-name/lun protocol:iscsi server:tcp:example.com
+-
+ =head2 B<-a nbd://example.com[:port]>
+ 
+ =head2 B<-a nbd://example.com[:port]/exportname>
+@@ -1193,39 +1159,6 @@ The equivalent API command would be (no export name):
+ 
+  ><fs> add "" protocol:nbd server:[tcp:example.com|unix:/socket]
+ 
+-=head2 B<-a rbd://example.com[:port]/disk>
+-
+-Add a disk image located on a Ceph (RBD/librbd) storage volume.
+-
+-Although libguestfs and Ceph supports multiple servers, only a single
+-server can be specified when using this URI syntax.
+-
+-The equivalent API command would be:
+-
+- ><fs> add /disk protocol:rbd server:tcp:example.com
+-
+-=head2 B<-a sheepdog://[example.com[:port]]/volume/image>
+-
+-Add a disk image located on a Sheepdog volume.
+-
+-The server name is optional.  Although libguestfs and Sheepdog
+-supports multiple servers, only at most one server can be specified
+-when using this URI syntax.
+-
+-The equivalent API command would be:
+-
+- ><fs> add /disk protocol:sheepdog [server:tcp:example.com]
+-
+-=head2 B<-a ssh://[user@]example.com[:port]/disk.img>
+-
+-Add a disk image located on a remote server, accessed using the Secure
+-Shell (ssh) SFTP protocol.  SFTP is supported out of the box by all
+-major SSH servers.
+-
+-The equivalent API command would be:
+-
+- ><fs> add /disk protocol:ssh server:tcp:example.com [username:user]
+-
+ =head1 PROGRESS BARS
+ 
+ Some (not all) long-running commands send progress notification
+diff --git a/fish/test-add-uri.sh b/fish/test-add-uri.sh
+index dfeccf7..c481e88 100755
+--- a/fish/test-add-uri.sh
++++ b/fish/test-add-uri.sh
+@@ -37,14 +37,6 @@ function fail ()
+ $VG ./guestfish -x -a file://$(pwd)/test-add-uri.img </dev/null >test-add-uri.out 2>&1
+ grep -sq 'add_drive ".*/test-add-uri.img"' test-add-uri.out || fail
+ 
+-# curl
+-$VG ./guestfish -x -a ftp://user@example.com/disk.img </dev/null >test-add-uri.out 2>&1
+-grep -sq 'add_drive "/disk.img" "protocol:ftp" "server:tcp:example.com" "username:user"' test-add-uri.out || fail
+-
+-# gluster
+-$VG ./guestfish -x -a gluster://example.com/disk </dev/null >test-add-uri.out 2>&1
+-grep -sq 'add_drive "/disk" "protocol:gluster" "server:tcp:example.com"' test-add-uri.out || fail
+-
+ # NBD
+ $VG ./guestfish -x -a nbd://example.com </dev/null >test-add-uri.out 2>&1
+ grep -sq 'add_drive "" "protocol:nbd" "server:tcp:example.com"' test-add-uri.out || fail
+@@ -58,26 +50,5 @@ grep -sq 'add_drive "" "protocol:nbd" "server:unix:/sk"' test-add-uri.out || fai
+ $VG ./guestfish -x -a 'nbd:///export?socket=/sk' </dev/null >test-add-uri.out 2>&1
+ grep -sq 'add_drive "/export" "protocol:nbd" "server:unix:/sk"' test-add-uri.out || fail
+ 
+-# rbd
+-$VG ./guestfish -x -a rbd://example.com:3000/disk </dev/null >test-add-uri.out 2>&1
+-grep -sq 'add_drive "/disk" "protocol:rbd" "server:tcp:example.com:3000"' test-add-uri.out || fail
+-
+-# sheepdog
+-$VG ./guestfish -x -a sheepdog:///volume/image </dev/null >test-add-uri.out 2>&1
+-grep -sq 'add_drive "/volume/image" "protocol:sheepdog"' test-add-uri.out || fail
+-
+-$VG ./guestfish -x -a sheepdog://example.com:3000/volume/image </dev/null >test-add-uri.out 2>&1
+-grep -sq 'add_drive "/volume/image" "protocol:sheepdog" "server:tcp:example.com:3000"' test-add-uri.out || fail
+-
+-# ssh
+-$VG ./guestfish -x -a ssh://example.com/disk.img </dev/null >test-add-uri.out 2>&1
+-grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com"' test-add-uri.out || fail
+-
+-$VG ./guestfish -x -a ssh://user@example.com/disk.img </dev/null >test-add-uri.out 2>&1
+-grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com" "username:user"' test-add-uri.out || fail
+-
+-$VG ./guestfish -x -a ssh://user@example.com:2000/disk.img </dev/null >test-add-uri.out 2>&1
+-grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com:2000" "username:user"' test-add-uri.out || fail
+-
+ rm test-add-uri.out
+ rm test-add-uri.img
+diff --git a/generator/actions.ml b/generator/actions.ml
+index ccd9e95..7d0eae6 100644
+--- a/generator/actions.ml
++++ b/generator/actions.ml
+@@ -1333,27 +1333,6 @@ C<filename> is interpreted as a local file or device.
+ This is the default if the optional protocol parameter
+ is omitted.
+ 
+-=item C<protocol = \"ftp\"|\"ftps\"|\"http\"|\"https\"|\"tftp\">
+-
+-Connect to a remote FTP, HTTP or TFTP server.
+-The C<server> parameter must also be supplied - see below.
+-
+-See also: L<guestfs(3)/FTP, HTTP AND TFTP>
+-
+-=item C<protocol = \"gluster\">
+-
+-Connect to the GlusterFS server.
+-The C<server> parameter must also be supplied - see below.
+-
+-See also: L<guestfs(3)/GLUSTER>
+-
+-=item C<protocol = \"iscsi\">
+-
+-Connect to the iSCSI server.
+-The C<server> parameter must also be supplied - see below.
+-
+-See also: L<guestfs(3)/ISCSI>.
+-
+ =item C<protocol = \"nbd\">
+ 
+ Connect to the Network Block Device server.
+@@ -1361,31 +1340,6 @@ The C<server> parameter must also be supplied - see below.
+ 
+ See also: L<guestfs(3)/NETWORK BLOCK DEVICE>.
+ 
+-=item C<protocol = \"rbd\">
+-
+-Connect to the Ceph (librbd/RBD) server.
+-The C<server> parameter must also be supplied - see below.
+-The C<username> parameter may be supplied.  See below.
+-The C<secret> parameter may be supplied.  See below.
+-
+-See also: L<guestfs(3)/CEPH>.
+-
+-=item C<protocol = \"sheepdog\">
+-
+-Connect to the Sheepdog server.
+-The C<server> parameter may also be supplied - see below.
+-
+-See also: L<guestfs(3)/SHEEPDOG>.
+-
+-=item C<protocol = \"ssh\">
+-
+-Connect to the Secure Shell (ssh) server.
+-
+-The C<server> parameter must be supplied.
+-The C<username> parameter may be supplied.  See below.
+-
+-See also: L<guestfs(3)/SSH>.
+-
+ =back
+ 
+ =item C<server>
+@@ -1396,13 +1350,7 @@ is a list of server(s).
+  Protocol       Number of servers required
+  --------       --------------------------
+  file           List must be empty or param not used at all
+- ftp|ftps|http|https|tftp  Exactly one
+- gluster        Exactly one
+- iscsi          Exactly one
+  nbd            Exactly one
+- rbd            One or more
+- sheepdog       Zero or more
+- ssh            Exactly one
+ 
+ Each list element is a string specifying a server.  The string must be
+ in one of the following formats:
+@@ -1416,26 +1364,6 @@ in one of the following formats:
+ If the port number is omitted, then the standard port number
+ for the protocol is used (see C</etc/services>).
+ 
+-=item C<username>
+-
+-For the C<ftp>, C<ftps>, C<http>, C<https>, C<iscsi>, C<rbd>, C<ssh>
+-and C<tftp> protocols, this specifies the remote username.
+-
+-If not given, then the local username is used for C<ssh>, and no authentication
+-is attempted for ceph.  But note this sometimes may give unexpected results, for
+-example if using the libvirt backend and if the libvirt backend is configured to
+-start the qemu appliance as a special user such as C<qemu.qemu>.  If in doubt,
+-specify the remote username you want.
+-
+-=item C<secret>
+-
+-For the C<rbd> protocol only, this specifies the 'secret' to use when
+-connecting to the remote device.
+-
+-If not given, then a secret matching the given username will be looked up in the
+-default keychain locations, or if no username is given, then no authentication
+-will be used.
+-
+ =item C<cachemode>
+ 
+ Choose whether or not libguestfs will obey sync operations (safe but slow)
+diff --git a/src/drives.c b/src/drives.c
+index f310b06..7abd952 100644
+--- a/src/drives.c
++++ b/src/drives.c
+@@ -136,6 +136,7 @@ create_drive_non_file (guestfs_h *g,
+   return drv;
+ }
+ 
++#if 0 /* DISABLED IN RHEL 7 */
+ static struct drive *
+ create_drive_curl (guestfs_h *g,
+                    enum drive_protocol protocol,
+@@ -218,6 +219,7 @@ create_drive_gluster (guestfs_h *g,
+                                 readonly, format, iface, name, disk_label,
+                                 cachemode);
+ }
++#endif /* DISABLED IN RHEL 7 */
+ 
+ static int
+ nbd_port (void)
+@@ -264,6 +266,7 @@ create_drive_nbd (guestfs_h *g,
+                                 cachemode);
+ }
+ 
++#if 0 /* DISABLED IN RHEL 7 */
+ static struct drive *
+ create_drive_rbd (guestfs_h *g,
+                   struct drive_server *servers, size_t nr_servers,
+@@ -451,6 +454,7 @@ create_drive_iscsi (guestfs_h *g,
+                                 readonly, format, iface, name, disk_label,
+                                 cachemode);
+ }
++#endif /* DISABLED IN RHEL 7 */
+ 
+ /* Traditionally you have been able to use /dev/null as a filename, as
+  * many times as you like.  Ancient KVM (RHEL 5) cannot handle adding
+@@ -865,6 +869,7 @@ guestfs__add_drive_opts (guestfs_h *g, const char *filename,
+                                disk_label, cachemode);
+     }
+   }
++#if 0 /* DISABLED IN RHEL 7 */
+   else if (STREQ (protocol, "ftp")) {
+     drv = create_drive_curl (g, drive_protocol_ftp,
+                              servers, nr_servers, filename,
+@@ -905,12 +910,14 @@ guestfs__add_drive_opts (guestfs_h *g, const char *filename,
+                               readonly, format, iface, name,
+                               disk_label, cachemode);
+   }
++#endif /* DISABLED IN RHEL 7 */
+   else if (STREQ (protocol, "nbd")) {
+     drv = create_drive_nbd (g, servers, nr_servers, filename,
+                             username, secret,
+                             readonly, format, iface, name,
+                             disk_label, cachemode);
+   }
++#if 0 /* DISABLED IN RHEL 7 */
+   else if (STREQ (protocol, "rbd")) {
+     drv = create_drive_rbd (g, servers, nr_servers, filename,
+                             username, secret,
+@@ -936,6 +943,7 @@ guestfs__add_drive_opts (guestfs_h *g, const char *filename,
+                              readonly, format, iface, name,
+                              disk_label, cachemode);
+   }
++#endif /* DISABLED IN RHEL 7 */
+   else {
+     error (g, _("unknown protocol '%s'"), protocol);
+     drv = NULL; /*FALLTHROUGH*/
+diff --git a/src/guestfs.pod b/src/guestfs.pod
+index eedea94..87e8882 100644
+--- a/src/guestfs.pod
++++ b/src/guestfs.pod
+@@ -668,91 +668,6 @@ you don't need to add any disks.
+ 
+ =head2 REMOTE STORAGE
+ 
+-=head3 CEPH
+-
+-Libguestfs can access Ceph (librbd/RBD) disks.
+-
+-To do this, set the optional C<protocol> and C<server> parameters of
+-L</guestfs_add_drive_opts> like this:
+-
+- char **servers = { "ceph1.example.org:3000", /* ... */, NULL };
+- guestfs_add_drive_opts (g, "/pool/image",
+-                         GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
+-                         GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "rbd",
+-                         GUESTFS_ADD_DRIVE_OPTS_SERVER, servers,
+-                         GUESTFS_ADD_DRIVE_OPTS_USERNAME, "rbduser",
+-                         GUESTFS_ADD_DRIVE_OPTS_SECRET, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
+-                         -1);
+-
+-C<servers> (the C<server> parameter) is a list of one or more Ceph
+-servers.  The server string is documented in
+-L</guestfs_add_drive_opts>. The C<username> and C<secret> parameters are
+-also optional, and if not given, then no authentication will be used.
+-
+-=head3 FTP, HTTP AND TFTP
+-
+-Libguestfs can access remote disks over FTP, FTPS, HTTP, HTTPS
+-or TFTP protocols.
+-
+-To do this, set the optional C<protocol> and C<server> parameters of
+-L</guestfs_add_drive_opts> like this:
+-
+- char **servers = { "www.example.org", NULL };
+- guestfs_add_drive_opts (g, "/disk.img",
+-                         GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
+-                         GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "http",
+-                         GUESTFS_ADD_DRIVE_OPTS_SERVER, servers,
+-                         -1);
+-
+-The C<protocol> can be one of C<"ftp">, C<"ftps">, C<"http">,
+-C<"https"> or C<"tftp">.
+-
+-C<servers> (the C<server> parameter) is a list which must have a
+-single element.  The single element is a string defining the web,
+-FTP or TFTP server.  The format of this string is documented in
+-L</guestfs_add_drive_opts>.
+-
+-=head3 GLUSTER
+-
+-Libguestfs can access Gluster disks.
+-
+-To do this, set the optional C<protocol> and C<server> parameters of
+-L</guestfs_add_drive_opts> like this:
+-
+- char **servers = { "gluster.example.org:24007", NULL };
+- guestfs_add_drive_opts (g, "/volname/image",
+-                         GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
+-                         GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "gluster",
+-                         GUESTFS_ADD_DRIVE_OPTS_SERVER, servers,
+-                         -1);
+-
+-C<servers> (the C<server> parameter) is a list which must have a
+-single element.  The single element is a string defining the Gluster
+-server.  The format of this string is documented in
+-L</guestfs_add_drive_opts>.
+-
+-Note that gluster usually requires the client process (ie. libguestfs)
+-to run as B<root> and will give unfathomable errors if it is not
+-(eg. "No data available").
+-
+-=head3 ISCSI
+-
+-Libguestfs can access iSCSI disks remotely.
+-
+-To do this, set the optional C<protocol> and C<server> parameters like
+-this:
+-
+- char **server = { "iscsi.example.org:3000", NULL };
+- guestfs_add_drive_opts (g, "/target-iqn-name/lun",
+-                         GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
+-                         GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "iscsi",
+-                         GUESTFS_ADD_DRIVE_OPTS_SERVER, server,
+-                         -1);
+-
+-The C<server> parameter is a list which must have a single element.
+-The single element is a string defining the iSCSI server.  The format
+-of this string is documented in L</guestfs_add_drive_opts>.
+-
+ =head3 NETWORK BLOCK DEVICE
+ 
+ Libguestfs can access Network Block Device (NBD) disks remotely.
+@@ -815,42 +730,6 @@ L<https://bugs.launchpad.net/qemu/+bug/1155677>
+ 
+ =back
+ 
+-=head3 SHEEPDOG
+-
+-Libguestfs can access Sheepdog disks.
+-
+-To do this, set the optional C<protocol> and C<server> parameters of
+-L</guestfs_add_drive_opts> like this:
+-
+- char **servers = { /* optional servers ... */ NULL };
+- guestfs_add_drive_opts (g, "/volume",
+-                         GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
+-                         GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "sheepdog",
+-                         GUESTFS_ADD_DRIVE_OPTS_SERVER, servers,
+-                         -1);
+-
+-The optional list of C<servers> may be zero or more server addresses
+-(C<"hostname:port">).  The format of the server strings is documented
+-in L</guestfs_add_drive_opts>.
+-
+-=head3 SSH
+-
+-Libguestfs can access disks over a Secure Shell (SSH) connection.
+-
+-To do this, set the C<protocol> and C<server> and (optionally)
+-C<username> parameters of L</guestfs_add_drive_opts> like this:
+-
+- char **server = { "remote.example.com", NULL };
+- guestfs_add_drive_opts (g, "/path/to/disk.img",
+-                         GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
+-                         GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "ssh",
+-                         GUESTFS_ADD_DRIVE_OPTS_SERVER, server,
+-                         GUESTFS_ADD_DRIVE_OPTS_USERNAME, "remoteuser",
+-                         -1);
+-
+-The format of the server string is documented in
+-L</guestfs_add_drive_opts>.
+-
+ =head2 INSPECTION
+ 
+ Libguestfs has APIs for inspecting an unknown disk image to find out
+-- 
+1.8.3.1
+
diff --git a/SOURCES/README-replacement.in b/SOURCES/README-replacement.in
new file mode 100644
index 0000000..ee45abb
--- /dev/null
+++ b/SOURCES/README-replacement.in
@@ -0,0 +1,38 @@
+Libguestfs is a set of tools and a library for accessing and modifying
+guest disk images.  For more information see the home page:
+
+  http://libguestfs.org/
+
+For discussion, development, patches, etc. please use the mailing
+list:
+
+  http://www.redhat.com/mailman/listinfo/libguestfs
+
+This Red Hat Enterprise Linux package comes with a lot of help and
+examples to get you started.
+
+The first place to start are the manual pages.  Type:
+
+  man guestfs
+  man guestfs-faq
+  man guestfs-release-notes
+  man guestfish
+  man virt-cat   # and other virt-* tools
+
+If you install the libguestfs-devel package, then in the
+/usr/share/doc/libguestfs-devel-@VERSION@/ directory you will also
+find:
+
+ - BUGS: list of open bugs in this version
+
+ - ChangeLog: the detailed list of changes in this version
+
+ - ROADMAP: the roadmap for future versions
+
+ - TODO: ideas for extending libguestfs
+
+ - *.c: example C programs using the API
+
+ - *.xml: example virt-inspector output
+
+ - *.rng: virt-inspector RelaxNG schema
diff --git a/SOURCES/copy-patches.sh b/SOURCES/copy-patches.sh
new file mode 100755
index 0000000..47d1819
--- /dev/null
+++ b/SOURCES/copy-patches.sh
@@ -0,0 +1,65 @@
+#!/bin/bash -
+
+set -e
+
+# Maintainer script to copy patches from the git repo to the current
+# directory.  Use it like this:
+#   ./copy-patches.sh
+
+# Check we're in the right directory.
+if [ ! -f libguestfs.spec ]; then
+    echo "$0: run this from the directory containing 'libguestfs.spec'"
+    exit 1
+fi
+
+git_checkout=$HOME/d/libguestfs-rhel-7.0
+if [ ! -d $git_checkout ]; then
+    echo "$0: $git_checkout does not exist"
+    echo "This script is only for use by the maintainer when preparing a"
+    echo "libguestfs release on RHEL."
+    exit 1
+fi
+
+# Get the base version of libguestfs.
+version=`grep '^Version:' libguestfs.spec | awk '{print $2}'`
+
+# Remove any existing patches.
+git rm -f [0-9]*.patch ||:
+rm -f [0-9]*.patch
+
+# Get the patches.
+(cd $git_checkout; rm -f [0-9]*.patch; git format-patch -N $version)
+mv $git_checkout/[0-9]*.patch .
+
+# Remove any not to be applied.
+rm -f *NOT-FOR-RPM*.patch
+
+# Add the patches.
+git add [0-9]*.patch
+
+# Print out the patch lines.
+echo
+echo "--- Copy the following text into libguestfs.spec file"
+echo
+
+rhel_7_flag=no
+echo "# Feature and backport patches."
+for f in [0-9]*.patch; do
+    n=`echo $f | awk -F- '{print $1}'`
+    is_rhel_7=no
+    if [ "$(echo $f | awk -F- '{print $2 $3}')" = "RHEL7" ]; then
+	is_rhel_7=yes
+    fi
+    if [ "$rhel_7_flag" = "no" -a "$is_rhel_7" = "yes" ]; then
+	echo
+	echo "# RHEL 7 specific patches."
+	rhel_7_flag=yes
+    elif [ "$rhel_7_flag" = "yes" -a "$is_rhel_7" = "no" ]; then
+	echo "$0: error: patch out of order near $f"
+	exit 1
+    fi
+    echo "Patch$n:     $f"
+done
+
+echo
+echo "--- End of text"
diff --git a/SOURCES/libguestfs-find-requires.sh b/SOURCES/libguestfs-find-requires.sh
new file mode 100755
index 0000000..252d581
--- /dev/null
+++ b/SOURCES/libguestfs-find-requires.sh
@@ -0,0 +1,39 @@
+#!/bin/bash -
+# Additional custom requires for libguestfs package.
+#
+# Note this script is *ONLY* applicable to Fedora 17+ (ie. with UsrMove)
+# since we now assume that /usr/lib{,64} and /lib{,64} are the same
+# directory and hence that:
+#
+#   Requires: libfoo.so.1           <=>  /usr/lib/libfoo.so.1 exists
+#   Requires: libfoo.so.1()(64bit)  <=>  /usr/lib64/libfoo.so.1 exists
+
+original_find_requires="$1"
+shift
+
+# Get the list of files.
+files=`sed "s/['\"]/\\\&/g"`
+
+# Use ordinary find-requires first.
+echo $files | tr [:blank:] '\n' | $original_find_requires
+
+# Is supermin.d/hostfiles included in the list of files?
+hostfiles=`echo $files | tr [:blank:] '\n' | grep 'supermin\.d/hostfiles$'`
+
+if [ -z "$hostfiles" ]; then
+    exit 0
+fi
+
+# Generate extra requires for libraries listed in hostfiles.
+sofiles=`grep 'lib.*\.so\.' $hostfiles | fgrep -v '*'`
+for f in $sofiles; do
+    if [ -f "$f" ]; then
+        if [[ "$f" =~ (/usr)?/lib64/([^/]*)$ ]]; then
+            echo "${BASH_REMATCH[2]}()(64bit)"
+        elif [[ "$f" =~ (/usr)?/lib/([^/]*)$ ]]; then
+            echo "${BASH_REMATCH[2]}"
+        else
+            echo "$f"
+        fi
+    fi
+done
diff --git a/SPECS/libguestfs.spec b/SPECS/libguestfs.spec
new file mode 100644
index 0000000..f7dce22
--- /dev/null
+++ b/SPECS/libguestfs.spec
@@ -0,0 +1,3019 @@
+# Enable to run tests during check
+# Default is enabled
+%if %{defined libguestfs_runtests}
+%global runtests %{libguestfs_runtests}
+%else
+%global runtests 1
+%endif
+
+%global _hardened_build 1
+
+Summary:       Access and modify virtual machine disk images
+Name:          libguestfs
+Epoch:         1
+Version:       1.22.6
+Release:       15%{?dist}
+License:       LGPLv2+
+URL:           http://libguestfs.org/
+Source0:       http://libguestfs.org/download/1.22-stable/%{name}-%{version}.tar.gz
+
+ExclusiveArch: x86_64
+
+# RHEL 7 git repository is:
+# https://github.com/libguestfs/libguestfs/tree/rhel-7.0
+# Use 'copy-patches.sh' to copy the patches from the git repo
+# to the current directory.
+
+# Feature and backport patches.
+Patch0001:     0001-tests-Add-a-regression-test-for-all-disk_-info-comma.patch
+Patch0002:     0002-New-API-add-drive-scratch.patch
+Patch0003:     0003-daemon-Implement-set-label-for-XFS-and-fix-it-for-bt.patch
+Patch0004:     0004-New-API-Implement-set-uuid-for-ext2-3-4-and-XFS-RHBZ.patch
+Patch0005:     0005-docs-Document-labels-and-UUIDs-in-the-API-overview-s.patch
+Patch0006:     0006-sysprep-Add-new-fs-uuids-operation.patch
+Patch0007:     0007-sysprep-Disable-fs-uuids-operation-by-default.patch
+Patch0008:     0008-New-API-remount-Allow-rw-flag-to-be-adjusted-on-moun.patch
+Patch0009:     0009-launch-direct-Specify-cpu-host-kvmclock.patch
+Patch0010:     0010-launch-direct-Don-t-use-cpu-host-on-TCG.patch
+Patch0011:     0011-launch-libvirt-Enable-cpu-mode-host-model.patch
+Patch0012:     0012-launch-libvirt-Don-t-enable-cpu-mode-host-model-on-T.patch
+Patch0013:     0013-daemon-tar-Use-a-temporary-file-to-pass-excludes-to-.patch
+Patch0014:     0014-Add-a-regression-test-of-tar-out-excludes-option-RHB.patch
+Patch0015:     0015-rsync-Document-use-of-glob-rsync-out-in-guestfish-RH.patch
+Patch0016:     0016-mke2fs-Document-that-too-small-blockscount-will-resu.patch
+Patch0017:     0017-format-Set-MBR-partition-type-byte-appropriately-RHB.patch
+Patch0018:     0018-format-Add-label-option-for-setting-filesystem-label.patch
+Patch0019:     0019-virt-make-fs-Add-label-option-for-setting-filesystem.patch
+Patch0020:     0020-daemon-Allow-labels-to-be-set-on-DOS-filesystems-usi.patch
+Patch0021:     0021-javadoc-Install-javadoc-in-datadir-javadoc-libguestf.patch
+Patch0022:     0022-appliance-Use-gzip-compressed-cpio-files-if-supermin.patch
+Patch0023:     0023-add_drive-Introduce-cachemode-parameter-to-control-d.patch
+Patch0024:     0024-drives-Ensure-all-scratch-drives-use-cachemode-unsaf.patch
+Patch0025:     0025-sparsify-Use-cachemode-unsafe-for-the-overlay-disk.patch
+Patch0026:     0026-rescue-Use-cachemode-unsafe-for-the-virt-rescue-scra.patch
+Patch0027:     0027-launch-direct-Always-use-cache-unsafe-for-the-applia.patch
+Patch0028:     0028-daemon-augeas-Enhance-error-reporting-for-aug_init-f.patch
+Patch0029:     0029-daemon-augeas-Don-t-test-if-AUG_NO_ERR_CLOSE-is-defi.patch
+Patch0030:     0030-launch-libvirt-Use-host-passthrough-instead-of-host-.patch
+Patch0031:     0031-appliance-Create-dev-loop-control-and-similar-device.patch
+Patch0032:     0032-fish-Use-UNIX_PATH_MAX-instead-of-hard-coded-value-f.patch
+Patch0033:     0033-fish-CVE-2013-4419-Fix-insecure-temporary-directory-.patch
+Patch0034:     0034-launch-libvirt-Enable-kvmclock.patch
+Patch0035:     0035-launch-libvirt-Set-attribute-present-yes-to-enable-k.patch
+Patch0036:     0036-blockdev-Deprecate-blockdev_setbsz-and-make-it-do-no.patch
+Patch0037:     0037-daemon-Fix-xfs_info-parser-because-of-new-format.patch
+Patch0038:     0038-Add-man-page-for-etc-libguestfs-tools.conf-RHBZ-1019.patch
+
+# RHEL 7 specific patches.
+Patch0039:     0039-RHEL-7-Emphasize-libguestfs-winsupport-package-RHBZ-.patch
+Patch0040:     0040-RHEL-7-Remove-libguestfs-live-RHBZ-798980.patch
+Patch0041:     0041-RHEL-7-Exclude-iptables-from-the-appliance-RHBZ-8586.patch
+Patch0042:     0042-RHEL-7-Ignore-etc-release-if-etc-redhat-release-exis.patch
+Patch0043:     0043-RHEL-7-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch
+Patch0044:     0044-RHEL-7-Disable-unsupported-remote-drive-protocols-RH.patch
+
+# Use git for patch management.
+BuildRequires: git
+
+# Run autotools after applying the patches.
+BuildRequires: autoconf, automake, libtool, gettext-devel
+
+# Basic build requirements:
+BuildRequires: perl(Pod::Simple)
+BuildRequires: perl(Pod::Man)
+BuildRequires: /usr/bin/pod2text
+BuildRequires: supermin >= 4.1.4
+BuildRequires: hivex-devel >= 1.2.7-7
+BuildRequires: perl(Win::Hivex)
+BuildRequires: perl(Win::Hivex::Regedit)
+BuildRequires: augeas-devel >= 0.5.0
+BuildRequires: readline-devel
+BuildRequires: genisoimage
+BuildRequires: libxml2-devel
+BuildRequires: createrepo
+BuildRequires: glibc-static
+BuildRequires: libselinux-utils
+BuildRequires: libselinux-devel
+BuildRequires: fuse-devel
+BuildRequires: pcre-devel
+BuildRequires: file-devel
+BuildRequires: libvirt-devel
+BuildRequires: po4a
+BuildRequires: gperf
+BuildRequires: libdb-utils
+BuildRequires: cpio
+BuildRequires: libconfig-devel
+BuildRequires: ocaml
+BuildRequires: ocaml-findlib-devel
+BuildRequires: ocaml-gettext-devel
+BuildRequires: systemd-units
+BuildRequires: netpbm-progs
+BuildRequires: icoutils
+BuildRequires: perl(XML::XPath)
+BuildRequires: perl(XML::XPath::XMLParser)
+BuildRequires: libvirt-daemon-kvm
+#BuildRequires: perl(Expect)
+BuildRequires: lua
+BuildRequires: lua-devel
+BuildRequires: libacl-devel
+BuildRequires: libcap-devel
+#BuildRequires: libldm-devel
+BuildRequires: yajl-devel
+#BuildRequires: bash-completion
+BuildRequires: /usr/bin/ping
+BuildRequires: /usr/bin/wget
+BuildRequires: perl(Sys::Virt)
+BuildRequires: /usr/bin/qemu-img
+BuildRequires: perl(Test::More)
+BuildRequires: perl(Test::Pod) >= 1.00
+BuildRequires: perl(Test::Pod::Coverage) >= 1.00
+BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: perl(String::ShellQuote)
+BuildRequires: perl(Locale::TextDomain)
+BuildRequires: python-devel
+BuildRequires: ruby-devel
+BuildRequires: rubygem-rake
+BuildRequires: rubygem(minitest)
+BuildRequires: ruby-irb
+BuildRequires: java-1.7.0-openjdk
+BuildRequires: java-1.7.0-openjdk-devel
+BuildRequires: jpackage-utils
+#BuildRequires: php-devel
+BuildRequires: glib2-devel
+BuildRequires: gobject-introspection-devel
+BuildRequires: gjs
+
+# Build requirements for the appliance.
+# sed 's/^ *//' < appliance/packagelist | sort
+%global appliance_buildreqs0 acl attr augeas-libs bash binutils btrfs-progs bzip2 coreutils cpio cryptsetup diffutils dosfstools e2fsprogs file findutils gawk gdisk gfs2-utils grep gzip hivex iproute iputils kernel kmod less libcap libselinux libxml2 lsof lsscsi lvm2 lzop mdadm openssh-clients parted pcre procps psmisc rsync scrub sed strace systemd tar udev util-linux vim-minimal xfsprogs xz yajl
+%ifarch %{ix86} x86_64
+%global appliance_buildreqs2 syslinux syslinux-extlinux
+%endif
+%global appliance_buildreqs %{appliance_buildreqs0} %{?appliance_buildreqs2}
+BuildRequires: %{appliance_buildreqs}
+Requires:      %{appliance_buildreqs}
+
+# Hack to work around missing dependency (RHBZ#901542).
+BuildRequires: seabios-bin
+
+# For building the appliance.
+Requires:      supermin-helper >= 4.1.4
+
+# For core inspection API.
+Requires:      libdb-utils
+Requires:      netpbm-progs
+Requires:      icoutils
+Requires:      libosinfo
+
+# For core mount-local (FUSE) API.
+Requires:      fuse
+
+# For libvirt backend.
+%ifarch %{ix86} x86_64
+Requires:      libvirt-daemon-kvm >= 0.10.2-3
+%endif
+Requires:      selinux-policy >= 3.11.1-63
+
+# Provide our own custom requires for the supermin appliance.
+Source1:       libguestfs-find-requires.sh
+%global _use_internal_dependency_generator 0
+%global __find_provides %{_rpmconfigdir}/find-provides
+%global __find_requires %{SOURCE1} %{_rpmconfigdir}/find-requires
+
+# Replacement README file for RHEL users.
+Source4:       README-replacement.in
+
+Source99:      copy-patches.sh
+
+# https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Packages_granted_exceptions
+Provides:      bundled(gnulib)
+
+
+%description
+Libguestfs is a library for accessing and modifying guest disk images.
+Amongst the things this is good for: making batch configuration
+changes to guests, getting disk used/free statistics (see also:
+virt-df), migrating between virtualization systems (see also:
+virt-p2v), performing partial backups, performing partial guest
+clones, cloning guests and changing registry/UUID/hostname info, and
+much else besides.
+
+Libguestfs uses Linux kernel and qemu code, and can access any type of
+guest filesystem that Linux and qemu can, including but not limited
+to: ext2/3/4, btrfs, FAT and NTFS, LVM, many different disk partition
+schemes, qcow, qcow2, vmdk.
+
+Libguestfs provides ways to enumerate guest storage (eg. partitions,
+LVs, what filesystem is in each LV, etc.).  It can also run commands
+in the context of the guest.
+
+Libguestfs is a library that can be linked with C and C++ management
+programs.
+
+For high level virt tools, guestfish (shell scripting and command line
+access), and guestmount (mount guest filesystems using FUSE), install
+'%{name}-tools'.
+
+For shell scripting and command line access, install 'guestfish'.
+
+To mount guest filesystems on the host using FUSE, install
+'%{name}-mount'.
+
+For GObject bindings and GObject Introspection, install
+'libguestfs-gobject-devel'.
+
+For Java bindings, install 'libguestfs-java-devel'.
+
+For Lua bindings, install 'lua-guestfs'
+
+For OCaml bindings, install 'ocaml-libguestfs-devel'.
+
+For Perl bindings, install 'perl-Sys-Guestfs'.
+
+For Python bindings, install 'python-libguestfs'.
+
+For Ruby bindings, install 'ruby-libguestfs'.
+
+
+%package devel
+Summary:       Development tools and libraries for %{name}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      pkgconfig
+
+# For libguestfs-make-fixed-appliance.
+Requires:      xz
+Requires:      %{name}-tools-c = %{epoch}:%{version}-%{release}
+
+
+%description devel
+%{name}-devel contains development tools and libraries
+for %{name}.
+
+
+%package tools-c
+Summary:       System administration tools for virtual machines
+License:       GPLv2+
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+
+# for guestfish:
+#Requires:      /usr/bin/emacs #theoretically, but too large
+Requires:      /usr/bin/hexedit
+Requires:      /usr/bin/less
+Requires:      /usr/bin/man
+Requires:      /usr/bin/vi
+
+# for virt-sparsify:
+Requires:      /usr/bin/qemu-img
+
+# Obsolete and replace earlier packages.
+Provides:      guestfish = %{epoch}:%{version}-%{release}
+Obsoletes:     guestfish < %{epoch}:%{version}-%{release}
+Provides:      libguestfs-mount = %{epoch}:%{version}-%{release}
+Obsoletes:     libguestfs-mount < %{epoch}:%{version}-%{release}
+
+
+%description tools-c
+This package contains miscellaneous system administrator command line
+tools for virtual machines.
+
+Note that you should install %{name}-tools (which pulls in
+this package).  This package is only used directly when you want
+to avoid dependencies on Perl.
+
+
+%package tools
+Summary:       System administration tools for virtual machines
+License:       GPLv2+
+BuildArch:     noarch
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      %{name}-tools-c = %{epoch}:%{version}-%{release}
+
+# NB: Only list deps here which are not picked up automatically.
+Requires:      perl(Sys::Virt)
+Requires:      perl(String::ShellQuote)
+Requires:      perl(XML::Writer)
+Requires:      perl(Win::Hivex) >= 1.2.7
+
+# for virt-make-fs:
+Requires:      /usr/bin/qemu-img
+
+
+%description tools
+This package contains miscellaneous system administrator command line
+tools for virtual machines.
+
+Guestfish is the Filesystem Interactive SHell, for accessing and
+modifying virtual machine disk images from the command line and shell
+scripts.
+
+The guestmount command lets you mount guest filesystems on the host
+using FUSE and %{name}.
+
+Virt-alignment-scan scans virtual machines looking for partition
+alignment problems.
+
+Virt-cat is a command line tool to display the contents of a file in a
+virtual machine.
+
+Virt-copy-in and virt-copy-out are command line tools for uploading
+and downloading files and directories to and from virtual machines.
+
+Virt-df is a command line tool to display free space on virtual
+machine filesystems.  Unlike other tools, it doesn’t just display the
+amount of space allocated to a virtual machine, but can look inside
+the virtual machine to see how much space is really being used.  It is
+like the df(1) command, but for virtual machines, except that it also
+works for Windows virtual machines.
+
+Virt-edit is a command line tool to edit the contents of a file in a
+virtual machine.
+
+Virt-filesystems is a command line tool to display the filesystems,
+partitions, block devices, LVs, VGs and PVs found in a disk image
+or virtual machine.
+
+Virt-format is a command line tool to erase and make blank disks.
+
+Virt-inspector examines a virtual machine and tries to determine the
+version of the OS, the kernel version, what drivers are installed,
+whether the virtual machine is fully virtualized (FV) or
+para-virtualized (PV), what applications are installed and more.
+
+Virt-ls is a command line tool to list out files in a virtual machine.
+
+Virt-make-fs is a command line tool to build a filesystem out of
+a collection of files or a tarball.
+
+Virt-rescue provides a rescue shell for making interactive,
+unstructured fixes to virtual machines.
+
+Virt-resize can resize existing virtual machine disk images.
+
+Virt-sparsify makes virtual machine disk images sparse (thin-provisioned).
+
+Virt-sysprep lets you reset or unconfigure virtual machines in
+preparation for cloning them.
+
+Virt-tar-in and virt-tar-out are archive, backup and upload tools
+for virtual machines.
+
+Virt-win-reg lets you look at and modify the Windows Registry of
+Windows virtual machines.
+
+
+# %package bash-completion
+# Summary:       Bash tab-completion scripts for %{name} tools
+# BuildArch:     noarch
+# Requires:      bash-completion >= 2.0
+# Requires:      %{name}-tools-c = %{epoch}:%{version}-%{release}
+
+
+# %description bash-completion
+# Install this package if you want intelligent bash tab-completion
+# for guestfish, guestmount and various virt-* tools.
+
+
+%package -n ocaml-%{name}
+Summary:       OCaml bindings for %{name}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+
+
+%description -n ocaml-%{name}
+ocaml-%{name} contains OCaml bindings for %{name}.
+
+This is for toplevel and scripting access only.  To compile OCaml
+programs which use %{name} you will also need ocaml-%{name}-devel.
+
+
+%package -n ocaml-%{name}-devel
+Summary:       OCaml bindings for %{name}
+Requires:      ocaml-%{name} = %{epoch}:%{version}-%{release}
+
+
+%description -n ocaml-%{name}-devel
+ocaml-%{name}-devel contains development libraries
+required to use the OCaml bindings for %{name}.
+
+
+%package -n perl-Sys-Guestfs
+Summary:       Perl bindings for %{name} (Sys::Guestfs)
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+# RHBZ#523547
+Requires:      perl(XML::XPath)
+# RHBZ#652587 - for backwards compat with the old name
+Provides:      perl-%{name} = %{epoch}:%{version}-%{release}
+Obsoletes:     perl-%{name} < %{epoch}:%{version}-%{release}
+
+
+%description -n perl-Sys-Guestfs
+perl-Sys-Guestfs contains Perl bindings for %{name} (Sys::Guestfs).
+
+
+%package -n python-%{name}
+Summary:       Python bindings for %{name}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+
+%description -n python-%{name}
+python-%{name} contains Python bindings for %{name}.
+
+
+%package -n ruby-%{name}
+Summary:       Ruby bindings for %{name}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      ruby(release) = 2.0.0
+Requires:      ruby
+Provides:      ruby(guestfs) = %{version}
+
+%description -n ruby-%{name}
+ruby-%{name} contains Ruby bindings for %{name}.
+
+
+%package java
+Summary:       Java bindings for %{name}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      java >= 1.5.0
+Requires:      jpackage-utils
+
+%description java
+%{name}-java contains Java bindings for %{name}.
+
+If you want to develop software in Java which uses %{name}, then
+you will also need %{name}-java-devel.
+
+
+%package java-devel
+Summary:       Java development package for %{name}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      %{name}-java = %{epoch}:%{version}-%{release}
+
+%description java-devel
+%{name}-java-devel contains the tools for developing Java software
+using %{name}.
+
+See also %{name}-javadoc.
+
+
+%package javadoc
+Summary:       Java documentation for %{name}
+BuildArch:     noarch
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      %{name}-java = %{epoch}:%{version}-%{release}
+Requires:      jpackage-utils
+
+%description javadoc
+%{name}-javadoc contains the Java documentation for %{name}.
+
+
+%package -n lua-guestfs
+Summary:       Lua bindings for %{name}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      lua
+
+%description -n lua-guestfs
+lua-guestfs contains Lua bindings for %{name}.
+
+
+%package gobject
+Summary:       GObject bindings for %{name}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+
+%description gobject
+%{name}-gobject contains GObject bindings for %{name}.
+
+To develop software against these bindings, you need to install
+%{name}-gobject-devel.
+
+
+%package gobject-devel
+Summary:       GObject bindings for %{name}
+Requires:      %{name}-gobject = %{epoch}:%{version}-%{release}
+Requires:      gtk-doc
+
+%description gobject-devel
+%{name}-gobject contains GObject bindings for %{name}.
+
+This package is needed if you want to write software using the
+GObject bindings.  It also contains GObject Introspection information.
+
+
+%package gobject-doc
+Summary:       Documentation for %{name} GObject bindings
+BuildArch:     noarch
+Requires:      %{name}-gobject-devel = %{epoch}:%{version}-%{release}
+
+%description gobject-doc
+%{name}-gobject-doc contains documentation for
+%{name} GObject bindings.
+
+
+%package man-pages-ja
+Summary:       Japanese (ja) man pages for %{name}
+BuildArch:     noarch
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+
+%description man-pages-ja
+%{name}-man-pages-ja contains Japanese (ja) man pages
+for %{name}.
+
+
+%package man-pages-uk
+Summary:       Ukrainian (uk) man pages for %{name}
+BuildArch:     noarch
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+
+%description man-pages-uk
+%{name}-man-pages-uk contains Ukrainian (uk) man pages
+for %{name}.
+
+
+%prep
+%setup -q
+
+if [ "$(getenforce | tr '[A-Z]' '[a-z]')" != "disabled" ]; then
+    # For sVirt to work, the local temporary directory we use in the
+    # tests must be labelled the same way as /tmp.
+    chcon --reference=/tmp tmp
+fi
+
+# Use git to manage patches.
+# http://rwmj.wordpress.com/2011/08/09/nice-rpm-git-patch-management-trick/
+git init
+git config user.email "libguestfs@redhat.com"
+git config user.name "libguestfs"
+git add .
+git commit -a -q -m "%{version} baseline"
+git am %{patches}
+
+# Patches affect Makefile.am and configure.ac, so rerun autotools.
+autoreconf
+autoconf
+
+mkdir -p daemon/m4
+
+# Replace developer-centric README that ships with libguestfs, with
+# our replacement file.
+mv README README.orig
+sed 's/@VERSION@/%{version}/g' < %{SOURCE4} > README
+
+# Remove udev from the packagelist.  systemd now 'obsoletes' udev, but
+# supermin doesn't get this relationship right.  When udev disappears
+# from the repository we can stop doing this.
+cp appliance/packagelist.in appliance/packagelist.in.orig
+grep -Ev '\budev\b' < appliance/packagelist.in.orig > appliance/packagelist.in
+
+
+%build
+# Test if network is available.
+if ping -c 3 -w 20 8.8.8.8 && wget http://libguestfs.org -O /dev/null; then
+  extra=
+else
+  mkdir repo
+  # -n 1 because of RHBZ#980502.
+  find /var/cache/yum -type f -name '*.rpm' -print0 | xargs -0 -n 1 cp -t repo
+  createrepo repo
+  cat > yum.conf <<EOF
+[main]
+cachedir=/var/cache/yum
+debuglevel=1
+logfile=/var/log/yum.log
+retries=20
+obsoletes=1
+gpgcheck=0
+assumeyes=1
+reposdir=/dev/null
+
+[local]
+name=local
+baseurl=file://$(pwd)/repo
+failovermethod=priority
+enabled=1
+gpgcheck=0
+EOF
+  extra=--with-supermin-packager-config=$(pwd)/yum.conf
+fi
+
+%{configure} \
+  --with-default-backend=libvirt \
+  --with-extra="rhel=%{rhel},release=%{release},libvirt" \
+  --with-qemu="qemu-kvm qemu-system-%{_build_arch} qemu" \
+  --disable-php \
+  --disable-haskell \
+  --disable-erlang \
+  $extra
+
+# This is *only* required because one patch adds a new manual page.
+# We can remove this once libguestfs-tools.conf(5) is upstream.
+make -C po-docs update-po
+
+# 'INSTALLDIRS' ensures that Perl and Ruby libs are installed in the
+# vendor dir not the site dir.
+make V=1 INSTALLDIRS=vendor %{?_smp_mflags}
+
+# This file is creeping over 1 MB uncompressed, and since it is
+# included in the -devel subpackage, compress it to reduce
+# installation size.
+gzip -9 ChangeLog
+
+
+%check
+# Enable debugging - very useful if a test does fail, although
+# it produces masses of output in the build.log.
+export LIBGUESTFS_DEBUG=1
+
+# Enable trace.  Since libguestfs 1.9.7 this produces 'greppable'
+# output even when combined with trace (see RHBZ#673477).
+export LIBGUESTFS_TRACE=1
+
+# This test fails because we build the ISO after encoding the checksum
+# of the ISO in the test itself.  Need to fix the test to work out the
+# checksum at runtime.
+export SKIP_TEST_CHECKSUM_DEVICE=1
+
+# This triggers a bug in btrfs (RHBZ#907554).
+export SKIP_TEST_CHARSET_FIDELITY=1
+
+# Disable virt-format test (RHBZ#872831).
+export SKIP_TEST_VIRT_FORMAT_SH=1
+
+# Disable set_label tests (RHBZ#906777).
+export SKIP_TEST_SET_LABEL=1
+
+# Disable all btrfs tests (RHBZ#863978).
+export SKIP_TEST_BTRFS_FSCK=1
+export SKIP_TEST_BTRFS_SET_SEEDING=1
+export SKIP_TEST_BTRFS_FILESYSTEM_SYNC=1
+export SKIP_TEST_BTRFS_SUBVOLUME_DELETE=1
+export SKIP_TEST_BTRFS_SUBVOLUME_SNAPSHOT=1
+export SKIP_TEST_MKFS_BTRFS=1
+export SKIP_TEST_BTRFS_DEVICES_SH=1
+export SKIP_TEST_BTRFS_SUBVOLUME_DEFAULT_PL=1
+export SKIP_TEST_CHARSET_FIDELITY=1
+export SKIP_TEST_VIRT_MAKE_FS_BTRFS=1
+
+# No NBD in RHEL.
+export SKIP_TEST_NBD_PL=1
+
+# Workaround for libvirt/KVM RHBZ#878406
+cat > qemu-wrapper.sh <<'EOF'
+#!/bin/sh -
+exec /usr/libexec/qemu-kvm -machine accel=tcg "$@"
+EOF
+chmod +x qemu-wrapper.sh
+export LIBGUESTFS_QEMU=`pwd`/qemu-wrapper.sh
+
+# Skip gnulib tests which fail (probably these are kernel/glibc bugs).
+pushd gnulib/tests
+make -k check ||:
+for f in test-getaddrinfo test-utimens ; do
+  rm -f $f $f.o
+  touch $f.o
+  echo 'exit 77' > $f
+  chmod +x $f
+done
+popd
+
+%if %{runtests}
+make check -k
+%endif
+
+
+%install
+# 'INSTALLDIRS' ensures that Perl and Ruby libs are installed in the
+# vendor dir not the site dir.
+make DESTDIR=$RPM_BUILD_ROOT INSTALLDIRS=vendor install
+
+# Delete static libraries, libtool files.
+rm $(
+  find $RPM_BUILD_ROOT -path '*/ocaml/guestfs' -prune -o -name '*.a' -print
+)
+find $RPM_BUILD_ROOT -name '*.la' -delete
+
+# Delete some bogus Perl files.
+find $RPM_BUILD_ROOT -name perllocal.pod -delete
+find $RPM_BUILD_ROOT -name .packlist -delete
+find $RPM_BUILD_ROOT -name '*.bs' -delete
+find $RPM_BUILD_ROOT -name 'bindtests.pl' -delete
+
+# Move Python libraries to sitelib.
+if [ "$RPM_BUILD_ROOT%{python_sitearch}" != "$RPM_BUILD_ROOT%{python_sitelib}" ]; then
+   mkdir -p $RPM_BUILD_ROOT%{python_sitelib}
+   mv $RPM_BUILD_ROOT%{python_sitearch}/guestfs.py* \
+     $RPM_BUILD_ROOT%{python_sitelib}/
+fi
+
+# Remove obsolete binaries (RHBZ#947438).
+rm $RPM_BUILD_ROOT%{_bindir}/virt-list-filesystems
+rm $RPM_BUILD_ROOT%{_bindir}/virt-list-partitions
+rm $RPM_BUILD_ROOT%{_bindir}/virt-tar
+rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-list-filesystems.1*
+rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-list-partitions.1*
+rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-tar.1*
+
+# Move installed documentation back to the source directory so
+# we can install it using a %%doc rule.
+mv $RPM_BUILD_ROOT%{_docdir}/libguestfs installed-docs
+gzip --best installed-docs/*.xml
+
+# For SELinux to work with the libvirt backend.
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs
+
+# Find locale files.
+%find_lang %{name}
+
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%post java -p /sbin/ldconfig
+
+%postun java -p /sbin/ldconfig
+
+
+%files -f %{name}.lang
+%doc COPYING README
+%{_bindir}/libguestfs-test-tool
+%{_libdir}/guestfs/
+%{_libdir}/libguestfs.so.*
+%{_mandir}/man1/guestfs-faq.1*
+%{_mandir}/man1/guestfs-performance.1*
+%{_mandir}/man1/guestfs-recipes.1*
+%{_mandir}/man1/guestfs-release-notes.1*
+%{_mandir}/man1/guestfs-testing.1*
+%{_mandir}/man1/libguestfs-test-tool.1*
+%dir %attr(0755,root,root) %{_localstatedir}/run/libguestfs
+
+
+%files devel
+%doc AUTHORS BUGS ChangeLog.gz HACKING TODO README ROADMAP
+%doc examples/*.c
+%doc installed-docs/*
+%{_libdir}/libguestfs.so
+%{_sbindir}/libguestfs-make-fixed-appliance
+%{_mandir}/man1/libguestfs-make-fixed-appliance.1*
+%{_mandir}/man3/guestfs.3*
+%{_mandir}/man3/guestfs-examples.3*
+%{_mandir}/man3/libguestfs.3*
+%{_includedir}/guestfs.h
+%{_libdir}/pkgconfig/libguestfs.pc
+
+
+%files tools-c
+%doc README
+%config(noreplace) %{_sysconfdir}/libguestfs-tools.conf
+%{_mandir}/man5/libguestfs-tools.conf.5*
+%{_bindir}/guestfish
+%{_mandir}/man1/guestfish.1*
+%{_bindir}/guestmount
+%{_mandir}/man1/guestmount.1*
+%{_bindir}/guestunmount
+%{_mandir}/man1/guestunmount.1*
+%{_bindir}/virt-alignment-scan
+%{_mandir}/man1/virt-alignment-scan.1*
+%{_bindir}/virt-cat
+%{_mandir}/man1/virt-cat.1*
+%{_bindir}/virt-copy-in
+%{_mandir}/man1/virt-copy-in.1*
+%{_bindir}/virt-copy-out
+%{_mandir}/man1/virt-copy-out.1*
+%{_bindir}/virt-df
+%{_mandir}/man1/virt-df.1*
+%{_bindir}/virt-edit
+%{_mandir}/man1/virt-edit.1*
+%{_bindir}/virt-filesystems
+%{_mandir}/man1/virt-filesystems.1*
+%{_bindir}/virt-format
+%{_mandir}/man1/virt-format.1*
+%{_bindir}/virt-inspector
+%{_mandir}/man1/virt-inspector.1*
+%{_bindir}/virt-ls
+%{_mandir}/man1/virt-ls.1*
+%{_bindir}/virt-rescue
+%{_mandir}/man1/virt-rescue.1*
+%{_bindir}/virt-resize
+%{_mandir}/man1/virt-resize.1*
+%{_bindir}/virt-sparsify
+%{_mandir}/man1/virt-sparsify.1*
+%{_bindir}/virt-sysprep
+%{_mandir}/man1/virt-sysprep.1*
+%{_bindir}/virt-tar-in
+%{_mandir}/man1/virt-tar-in.1*
+%{_bindir}/virt-tar-out
+%{_mandir}/man1/virt-tar-out.1*
+
+
+%files tools
+%doc README
+%{_bindir}/virt-make-fs
+%{_mandir}/man1/virt-make-fs.1*
+%{_bindir}/virt-win-reg
+%{_mandir}/man1/virt-win-reg.1*
+
+
+# %files bash-completion
+# %dir %{_datadir}/bash-completion/completions
+# %{_datadir}/bash-completion/completions/guestfish
+# %{_datadir}/bash-completion/completions/guestmount
+# %{_datadir}/bash-completion/completions/virt-*
+
+
+%files -n ocaml-%{name}
+%{_libdir}/ocaml/guestfs
+%exclude %{_libdir}/ocaml/guestfs/*.a
+%exclude %{_libdir}/ocaml/guestfs/*.cmxa
+%exclude %{_libdir}/ocaml/guestfs/*.cmx
+%exclude %{_libdir}/ocaml/guestfs/*.mli
+%{_libdir}/ocaml/stublibs/*.so
+%{_libdir}/ocaml/stublibs/*.so.owner
+
+
+%files -n ocaml-%{name}-devel
+%doc ocaml/examples/*.ml
+%{_libdir}/ocaml/guestfs/*.a
+%{_libdir}/ocaml/guestfs/*.cmxa
+%{_libdir}/ocaml/guestfs/*.cmx
+%{_libdir}/ocaml/guestfs/*.mli
+%{_mandir}/man3/guestfs-ocaml.3*
+
+
+%files -n perl-Sys-Guestfs
+%doc perl/examples/*.pl
+%{perl_vendorarch}/*
+%{_mandir}/man3/Sys::Guestfs.3pm*
+%{_mandir}/man3/guestfs-perl.3*
+
+
+%files -n python-%{name}
+%doc python/examples/*.py
+%{python_sitearch}/*
+%{python_sitelib}/*.py
+%{python_sitelib}/*.pyc
+%{python_sitelib}/*.pyo
+%{_mandir}/man3/guestfs-python.3*
+
+
+%files -n ruby-%{name}
+%doc ruby/examples/*.rb
+%doc ruby/doc/site/*
+%{ruby_vendorlibdir}/guestfs.rb
+%{ruby_vendorarchdir}/_guestfs.so
+%{_mandir}/man3/guestfs-ruby.3*
+
+
+%files java
+%{_libdir}/libguestfs_jni*.so.*
+%{_datadir}/java/*.jar
+
+
+%files java-devel
+%doc java/examples/*.java
+%{_libdir}/libguestfs_jni*.so
+%{_mandir}/man3/guestfs-java.3*
+
+
+%files javadoc
+%{_javadocdir}/%{name}
+
+
+%files -n lua-guestfs
+%doc lua/examples/*.lua
+%doc lua/examples/LICENSE
+%{_libdir}/lua/*/guestfs.so
+%{_mandir}/man3/guestfs-lua.3*
+
+
+%files gobject
+%{_libdir}/libguestfs-gobject-1.0.so.0*
+%{_libdir}/girepository-1.0/Guestfs-1.0.typelib
+
+
+%files gobject-devel
+%{_libdir}/libguestfs-gobject-1.0.so
+%{_includedir}/guestfs-gobject.h
+%dir %{_includedir}/guestfs-gobject
+%{_includedir}/guestfs-gobject/*.h
+%{_datadir}/gir-1.0/Guestfs-1.0.gir
+%{_libdir}/pkgconfig/libguestfs-gobject-1.0.pc
+
+
+%files gobject-doc
+%{_datadir}/gtk-doc/html/guestfs
+
+
+%files man-pages-ja
+%lang(ja) %{_mandir}/ja/man1/*.1*
+%lang(ja) %{_mandir}/ja/man3/*.3*
+%lang(ja) %{_mandir}/ja/man5/*.5*
+
+
+%files man-pages-uk
+%lang(uk) %{_mandir}/uk/man1/*.1*
+%lang(uk) %{_mandir}/uk/man3/*.3*
+%lang(uk) %{_mandir}/uk/man5/*.5*
+
+
+%changelog
+* Thu Oct 31 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.22.6-15
+- Add libguestfs-tools.conf(5) man page
+  resovles: rhbz#1019891
+- Drop PHP bindings
+  resolves: rhbz#1020021
+- Disable Haskell & Erlang (in case someone has these dependencies
+  installed and tries to rebuild the package).
+
+* Wed Oct 16 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.22.6-12
+- Backport: "daemon: Fix xfs_info parser because of new format."
+  which is required to fix libguestfs tests.
+  related: rhbz#1019503
+
+* Wed Oct 16 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.22.6-11
+- Further fixes for kvmclock
+  resolves: rhbz#998109
+- Document that blockdev-setbsz is deprecated and should not be used
+  resolves: rhbz#1016465
+
+* Wed Oct 16 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.22.6-10
+- Fix CVE-2013-4419: insecure temporary directory handling for
+  guestfish's network socket
+  resolves: rhbz#1019503
+
+* Thu Sep 26 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.22.6-9
+- Use 'host-passthrough' instead of 'host-model' (RHBZ#1011922)
+- Fix mount-loop failed to setup loop device: No such file or directory
+  resolves: rhbz#1011907
+
+* Fri Sep 13 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.22.6-8
+- Backport 'cachemode' property of 'add_drive'
+  resolves: rhbz#1003291
+- Improve error reporting from aug_init
+  related: rhbz# 1003685
+
+* Thu Aug 29 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.22.6-5
+- Various fixes to tar-out 'excludes'
+  resolves: rhbz#1001875
+- Document use of glob + rsync-out
+  resolves: rhbz#1001876
+- Document mke2fs blockscount
+  resolves: rhbz#1002032
+- Fix virt-format MBR partition type byte, add --label option to
+  virt-format and virt-make-fs, and allow labels to be set on DOS filesystems
+  resolves: rhbz#1000428
+- Fix javadoc location to use _javadocdir macro.
+- Call ldconfig in java post and postun scripts.
+- Do not explicitly depend on perl-devel.
+- Compress the ChangeLog and *.xml files in devel package.
+- Create new subpackage gobject-doc for the huge HTML documentation.
+- Make javadoc, gobject-doc, bash-completion, man-pages-*, tools packages
+  'noarch'.
+- Enable gzip-compressed appliance.
+- Note this requires supermin >= 4.1.4.
+
+* Tue Aug 27 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.22.6-4
+- New upstream stable version 1.22.6.
+  resolves: rhbz#995712, rhbz#998750, rhbz#998485
+- Backport set-UUID API and related
+  resolves: rhbz#995176
+- Enable kvmclock
+  resolves: rhbz#998109
+- Add upstream APIs guestfs_add_drive_scratch, guestfs_remount.
+
+* Tue Jul 30 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.22.5-3
+- Backport support for virt-sysprep -a URI option
+  resolves: rhbz#968785
+
+* Mon Jul 29 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.22.5-2
+- New upstream stable version 1.22.5.
+- Fix virt-sysprep --firstboot option
+  resolves: rhbz#988862
+- Disable unsupported remote drives
+  resolves: rhbz#962113
+- cap-get-file returns empty string instead of error if no capabilities
+  resolves: rhbz#989356
+
+* Fri Jul 19 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.22.4-2
+- New upstream stable version 1.22.4.
+- Move virt-sysprep to libguestfs-tools-c package
+  resolves: rhbz#975573
+- Remove 9p APIs from RHEL
+  resolves: rhbz#921710
+- Reenable swapon test
+  resolves: rhbz#911674
+- Reenable file architecture test
+  resolves: rhbz#911678
+- Fix mkfs blocksize option when using xfs
+  resolves: rhbz#976250
+- Fix double-free when kernel link fails during launch
+  resolves: rhbz#983691
+- Fix disk-format "JSON parse error" when target file does not exist
+  resolves: rhbz#980338
+- Fix documentation for acl-set-file
+  resolves: rhbz#985856
+- libguestfs-devel should depend on full ENVR of libguestfs-tools-c.
+- Require /usr/bin/vi instead of /bin/vi for UsrMove.
+
+* Mon Jun  3 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.22.2-1
+- New upstream version 1.22.2.
+- Do not need to remove guestfsd man page, since libguestfs no longer
+  installs it.
+
+* Mon May 20 2013 Daniel Mach <dmach@redhat.com> - 1:1.21.33-1.1.el7
+- Rebuild for cyrus-sasl
+
+* Mon Apr 29 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.21.33-1.el7
+- New upstream version 1.21.33.
+- Rebuild for renamed Kerberos library.
+  resolves: rhbz#957616
+- Skip gnulib tests which fail.
+- Skip NBD test since there is no NBD in RHEL.
+
+* Wed Apr 17 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.21.31-1.el7.1
+- Rebase RHEL 7 onto libguestfs 1.21.
+- Update spec file from Rawhide.
+
+* Tue Apr  9 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.20.5-4
+- In RHEL 7, 'ruby(abi)' has been replaced by 'ruby(release)'
+  and the version of the ruby ABI/release is now 2.0.0.
+
+* Fri Apr  5 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.20.5-3
+- Remove man pages of deprecated programs.
+
+* Tue Apr  2 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.20.5-2
+- Remove deprecated programs virt-tar, virt-list-filesystems and
+  virt-list-partitions from RHEL 7.
+
+* Sun Mar 31 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.20.5-1
+- New upstream version 1.20.5.
+- Remove ruby vendor patch.
+- Set INSTALLDIRS=vendor on both make and make install rules.
+
+* Tue Mar  5 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.20.3-1
+- New upstream version 1.20.3.
+
+* Fri Feb 15 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.20.2-1
+- New upstream version 1.20.2.
+- Synchronize list of tests to be skipped with local list.
+- Use openjdk instead of java (GCJ).
+- Add BRs: libcap.
+- Ship the gobject pkgconfig file.
+
+* Mon Feb 11 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.20.1-7
+- 'febootstrap' has been renamed 'supermin'.
+  resolves: rhbz#909573
+
+* Sat Jan 19 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.20.1-6
+- Add explicit BR on seabios-bin to work around RHBZ#901542.
+
+* Fri Jan 18 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.20.1-5
+- Bump and rebuild.
+
+* Fri Dec 21 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.20.1-4
+- Go over all non-upstream patches from RHEL 6 and add appropriate ones
+  to RHEL 7:
+  * Emphasize libguestfs-winsupport.
+  * Remove libguestfs-live ('unix' attach-method).
+  * Exclude iptables.
+  * Ignore /etc/release file if /etc/redhat-release file exists.
+  resolves: rhbz#889536, rhbz#889537, rhbz#889538, rhbz#873219
+- Do not number patches.
+
+* Thu Dec 20 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.20.1-3
+- New upstream version 1.20.1.
+
+* Tue Dec 18 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.20.0-5
+- Remove RHEL-conditionals, since I have branched spec file for RHEL 7.
+- Add BR gdisk.
+- Change to using git to manage patches.
+- Add copy-patches.sh script.
+- Disable libguestfs live (RHEL only).
+- "Fedora" -> "RHEL" in replacement README file.
+- "fedora" -> "rhel" in version extra field.
+
+* Mon Dec 17 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.20.0-2
+- Use 'make check -k' so we get to see all test failures at once.
+- For RHEL 7:
+  * Do not depend on perl(Expect) (only needed to test virt-rescue).
+  * Depend on /usr/bin/qemu-img instead of qemu-img package, since the
+    package name (but not the binary) is different in RHEL 7.
+  * Add workaround for libvirt/KVM bug RHBZ#878406.
+  * Do not depend on libvirt-daemon-qemu.
+  * Do not depend on libldm (not yet in RHEL 7: RHBZ#887894).
+
+* Thu Dec 13 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.20.0-1
+- New upstream version 1.20.0.
+- New source URL for this branch.
+- Reconcile upstream packagelist, BRs and Requires lists.
+- Requires newest SELinux policy so that SVirt works.
+- Fix patch 2.  Actually, remove and replace with a small script.
+
+* Sat Dec 01 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.66-1
+- New upstream version 1.19.66.
+
+* Fri Nov 30 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.65-2
+- Add a hack to work around glibc header bug <rpc/svc.h>.
+
+* Thu Nov 29 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.65-1
+- New upstream version 1.19.65.
+
+* Sat Nov 24 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.64-1
+- New upstream version 1.19.64.
+
+* Sat Nov 24 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.63-3
+- Re-add: Non-upstream patch to add the noapic flag on the kernel
+  command line on i386 only.  This works around a bug in 32-bit qemu,
+  https://bugzilla.redhat.com/show_bug.cgi?id=857026
+
+* Fri Nov 23 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.63-2
+- Remove non-upstream patch designed to work around
+  https://bugzilla.redhat.com/show_bug.cgi?id=857026
+  to see if this has been fixed.
+- Re-enable tests on i686 to see if
+  https://bugzilla.redhat.com/show_bug.cgi?id=870042
+  has been fixed.
+
+* Fri Nov 23 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.63-1
+- New upstream version 1.19.63.
+
+* Tue Nov 20 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.62-1
+- New upstream version 1.19.62.
+
+* Mon Nov 19 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.61-1
+- New upstream version 1.19.61.
+
+* Sat Nov 17 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.60-2
+- Remove Lua bogus libtool *.la file.
+
+* Sat Nov 17 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.60-1
+- New upstream version 1.19.60.
+
+* Tue Nov 13 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.59-1
+- New upstream version 1.19.59.
+
+* Sat Nov 10 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.58-1
+- New upstream version 1.19.58.
+
+* Thu Nov 08 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.57-1
+- New upstream version 1.19.57.
+
+* Tue Nov 06 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.56-3
+- Add upstream patch to disable virt-format test, and disable
+  it because wipefs utility is broken.
+
+* Sat Nov 03 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.56-2
+- Add upstream patch to fix wipefs test.
+
+* Fri Nov 02 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.56-1
+- New upstream version 1.19.56.
+
+* Tue Oct 30 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.55-1
+- New upstream version 1.19.55.
+
+* Mon Oct 29 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.54-1
+- New upstream version 1.19.54.
+
+* Wed Oct 24 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.53-3
+- Disable tests on ix86 because qemu/kernel is broken (RHBZ#870042).
+
+* Wed Oct 24 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.53-2
+- Add upstream patch to fix guestfish tests.
+
+* Fri Oct 19 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.53-1
+- New upstream version 1.19.53.
+
+* Sun Oct 14 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.52-1
+- New upstream version 1.19.52.
+
+* Thu Oct 11 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.51-1
+- New upstream version 1.19.51.
+
+* Thu Oct 11 2012 Petr Pisar <ppisar@redhat.com> - 1:1.19.50-2
+- Correct perl dependencies
+
+* Thu Oct 11 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.50-1
+- New upstream version 1.19.50.
+
+* Wed Oct 10 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.49-3
+- Upstream patch to workaround btrfs problems with kernel 3.7.0.
+
+* Tue Oct 09 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.49-2
+- Install all libguestfs-live-service udev rules into /usr/lib/udev/rules.d.
+
+* Tue Oct 09 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.49-1
+- New upstream version 1.19.49.
+
+* Sun Oct 07 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.48-1
+- New upstream version 1.19.48.
+
+* Mon Oct 01 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.46-1
+- New upstream version 1.19.46.
+
+* Wed Sep 26 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.45-1
+- New upstream version 1.19.45.
+
+* Tue Sep 25 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.44-2
+- Enable sVirt (NB: requires libvirt >= 0.10.2-3, selinux-policy >= 3.11.1-23).
+- Add upstream patch to label the custom $TMPDIR used in test-launch-race.
+
+* Mon Sep 24 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.44-1
+- New upstream version 1.19.44.
+
+* Sat Sep 22 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.43-1
+- New upstream version 1.19.43.
+
+* Tue Sep 18 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.42-2
+- New upstream version 1.19.42.
+- Rebase sVirt (disable) patch.
+
+* Sun Sep 16 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.41-1
+- New upstream version 1.19.41.
+
+* Fri Sep 14 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.40-3
+- Add (non-upstream) patch to add the noapic flag on the kernel
+  command line on i386 only.  This works around a bug in 32-bit qemu.
+
+* Wed Sep 12 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.40-2
+- Enable tests because RHBZ#853408 has been fixed in qemu-1.2.0-3.fc18.
+
+* Wed Sep 05 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.40-1
+- New upstream version 1.19.40.
+
+* Tue Sep 04 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.39-1
+- New upstream version 1.19.39.
+
+* Mon Sep 03 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.38-1
+- New upstream version 1.19.38.
+
+* Fri Aug 31 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.37-1
+- New upstream version 1.19.37.
+
+* Thu Aug 30 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.36-2
+- New upstream version 1.19.36.
+- Require libvirt-daemon-qemu (for libvirt attach method).
+
+* Thu Aug 30 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.36-1
+- Switch to using libvirt as the backend for running the appliance.  See:
+  https://www.redhat.com/archives/libguestfs/2012-August/msg00070.html
+- Use configure RPM macro instead of ./configure.
+
+* Wed Aug 29 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.35-1
+- New upstream version 1.19.35.
+
+* Wed Aug 29 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.34-2
+- Add upstream patch to fix Perl bindtests on 32 bit.
+
+* Tue Aug 28 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.34-1
+- New upstream version 1.19.34.
+
+* Tue Aug 28 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.33-1
+- New upstream version 1.19.33.
+
+* Mon Aug 27 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.33-3
+- Fix Perl examples directory so we only include the examples.
+- Add Java examples to java-devel RPM.
+
+* Tue Aug 21 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.33-2
+- New upstream version 1.19.33.
+- Reenable tests.
+
+* Sat Aug 18 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.32-1
+- New upstream version 1.19.32.
+
+* Wed Aug 15 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.31-1
+- New upstream version 1.19.31.
+
+* Tue Aug 14 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.30-1
+- New upstream version 1.19.30.
+
+* Sat Aug 11 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.29-2
+- New upstream version 1.19.29.
+- Remove RELEASE NOTES from doc section, and add equivalent man page.
+
+* Fri Aug 10 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.28-4
+- Bump and rebuild.
+
+* Thu Aug 02 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.28-3
+- New upstream version 1.19.28.
+- Update libguestfs-find-requires to generate ordinary lib dependencies.
+
+* Wed Aug  1 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.27-2
+- Disable tests because of RHBZ#844485.
+
+* Mon Jul 30 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.27-1
+- New upstream version 1.19.27.
+
+* Thu Jul 26 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.26-2
+- Remove old RPM-isms like defattr.
+- Add upstream patches to fix use of 'run' script in tests.
+
+* Thu Jul 26 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.26-1
+- New upstream version 1.19.26.
+
+* Tue Jul 24 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.25-1
+- New upstream version 1.19.25.
+
+* Mon Jul 23 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.24-1
+- New upstream version 1.19.24.
+
+* Sun Jul 22 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.23-1
+- New upstream version 1.19.23.
+
+* Thu Jul 19 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.22-2
+- Add upstream patch to skip mount-local test if /dev/fuse not writable.
+
+* Thu Jul 19 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.22-1
+- New upstream version 1.19.22.
+
+* Wed Jul 18 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.21-1
+- New upstream version 1.19.21.
+
+* Tue Jul 17 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.20-1
+- New upstream version 1.19.20.
+
+* Mon Jul 16 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.19-1
+- New upstream version 1.19.19.
+
+* Tue Jul 10 2012 Petr Pisar <ppisar@redhat.com> - 1:1.19.18-2
+- Perl 5.16 rebuild
+
+* Mon Jul 09 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.18-1
+- New upstream version 1.19.18.
+
+* Fri Jul 06 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.17-1
+- New upstream version 1.19.17.
+
+* Wed Jul 04 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.16-1
+- New upstream version 1.19.16.
+
+* Fri Jun 29 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.15-1
+- New upstream version 1.19.15.
+
+* Thu Jun 28 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.14-1
+- New upstream version 1.19.14.
+
+* Wed Jun 27 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.13-2
+- New upstream version 1.19.13.
+- Add upstream patch to fix GObject/Javascript tests.
+
+* Tue Jun 26 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.12-1
+- New upstream version 1.19.12.
+
+* Mon Jun 25 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.11-1
+- New upstream version 1.19.11.
+
+* Fri Jun 22 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.10-1
+- New upstream version 1.19.10.
+
+* Mon Jun 18 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.9-1
+- New upstream version 1.19.9.
+
+* Thu Jun 14 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.8-1
+- New upstream version 1.19.8.
+
+* Thu Jun 14 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.7-2
+- New upstream version 1.19.7.
+- Require febotstrap >= 3.17.
+
+* Tue Jun 12 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.6-2
+- Require febootstrap >= 3.16.
+
+* Tue Jun 12 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.6-1
+- New upstream version 1.19.6.
+
+* Tue Jun 12 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.6-1
+- New upstream version 1.19.6.
+- This version defaults to using virtio-scsi.
+- Requires qemu >= 1.0.
+- Requires febootstrap >= 3.15.
+
+* Mon Jun 11 2012 Petr Pisar <ppisar@redhat.com> - 1:1.19.5-2
+- Perl 5.16 rebuild
+
+* Sat Jun 09 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.5-1
+- New upstream version 1.19.5.
+
+* Thu Jun 07 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.4-1
+- New upstream version 1.19.4.
+
+* Fri Jun 01 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.3-2
+- New upstream version 1.19.3.
+- Remove patches which are now upstream.
+
+* Tue May 29 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.2-3
+- Remove obsolete list of bugs in make check rule.
+- Remove some obsolete test workarounds.
+- Disable i386 tests (because of RHBZ#825944).
+
+* Mon May 28 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.2-2
+- Include patches to fix udev.
+
+* Mon May 28 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.2-1
+- New upstream version 1.19.2.
+
+* Sat May 26 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.1-1
+- New upstream version 1.19.1.
+
+* Mon May 21 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.0-1
+- New upstream version 1.19.0.
+
+* Thu May 17 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.43-1
+- New upstream version 1.17.43.
+
+* Thu May 17 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.42-4
+- On RHEL 7 only, remove reiserfs-utils, zerofree.
+
+* Thu May 17 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.42-3
+- On RHEL 7 only, remove nilfs-utils.
+
+* Tue May 15 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.42-2
+- Bundled gnulib (RHBZ#821767).
+
+* Mon May 14 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.42-1
+- New upstream version 1.17.42.
+
+* Fri May 11 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.41-1
+- New upstream version 1.17.41.
+
+* Tue May 08 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.40-1
+- New upstream version 1.17.40.
+
+* Tue May  8 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.39-3
+- Disable hfsplus-tools on RHEL 7.
+
+* Thu May 03 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.39-2
+- BR perl-XML-XPath to run the new XML test.
+
+* Thu May 03 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.39-1
+- New upstream version 1.17.39.
+
+* Wed May 02 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.38-3
+- Remove explicit runtime deps for old virt-sysprep.
+- Add explicit runtime dep on fuse (RHBZ#767852, thanks Pádraig Brady).
+- Remove explicit versioned dep on glibc.
+
+* Tue May  1 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 1:1.17.38-2
+- Update supported filesystems for ARM
+
+* Tue May 01 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.38-1
+- New upstream version 1.17.38.
+
+* Tue May 01 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.37-2
+- Add guestfs-faq(1) (FAQ is now a man page).
+
+* Tue May 01 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.37-1
+- New upstream version 1.17.37.
+
+* Fri Apr 27 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.36-2
+- Add upstream patch to fix installation of gobject headers.
+
+* Thu Apr 26 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.36-1
+- New upstream version 1.17.36.
+
+* Thu Apr 26 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.35-1
+- New upstream version 1.17.35.
+
+* Tue Apr 24 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.34-1
+- New upstream version 1.17.34.
+
+* Mon Apr 23 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.33-1
+- New upstream version 1.17.33.
+
+* Tue Apr 17 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.32-1
+- New upstream version 1.17.32.
+
+* Mon Apr 16 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.31-1
+- New upstream version 1.17.31.
+
+* Fri Apr 13 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.30-1
+- New upstream version 1.17.30.
+
+* Thu Apr 12 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.29-1
+- New upstream version 1.17.29.
+
+* Thu Apr 12 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.28-2
+- Enable ruby 1.9 patch in RHEL 7 (RHBZ#812139).
+
+* Thu Apr 12 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.28-1
+- New upstream version 1.17.28.
+
+* Wed Apr 11 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.27-2
+- Add guestfs-performance(1) manual page.
+
+* Tue Apr 10 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.27-1
+- New upstream version 1.17.27.
+
+* Tue Apr 03 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.26-1
+- New upstream version 1.17.26.
+
+* Mon Apr 02 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.25-1
+- New upstream version 1.17.25.
+
+* Sun Apr 01 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.24-1
+- New upstream version 1.17.24.
+
+* Sun Apr 01 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.23-1
+- New upstream version 1.17.23.
+
+* Thu Mar 29 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.22-2
+- Include all gobject header files.
+- Include gtk-doc, and depend on the gtk-doc package at runtime.
+
+* Thu Mar 29 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.22-1
+- New upstream version 1.17.22.
+
+* Thu Mar 29 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.21-2
+- Bump and rebuild.
+
+* Wed Mar 21 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.21-1
+- New upstream version 1.17.21.
+
+* Mon Mar 19 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.20-3
+- Reenable LUKS, since RHBZ#804345 is reported to be fixed.
+
+* Sun Mar 18 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.20-2
+- Disable LUKS tests because LUKS is broken in Rawhide (RHBZ#804345).
+
+* Sat Mar 17 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.20-1
+- New upstream version 1.17.20.
+
+* Sat Mar 17 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.19-2
+- Add libguestfs-make-fixed-appliance (with man page).
+
+* Fri Mar 16 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.19-1
+- New upstream version 1.17.19.
+
+* Thu Mar 15 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.18-1
+- New upstream version 1.17.18.
+
+* Wed Mar 14 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.17-1
+- New upstream version 1.17.17.
+
+* Wed Mar 14 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.16-2
+- Bump and rebuild.
+
+* Tue Mar 13 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.16-1
+- New upstream version 1.17.16.
+
+* Mon Mar 12 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.15-1
+- New upstream version 1.17.15.
+
+* Fri Mar 09 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.14-1
+- New upstream version 1.17.14.
+
+* Thu Mar 08 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.13-1
+- New upstream version 1.17.13.
+
+* Thu Mar 08 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.12-2
+- Enable Japanese man pages, since these are in a better state upstream.
+
+* Wed Mar 07 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.12-1
+- New upstream version 1.17.12.
+
+* Wed Mar 07 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.11-2
+- Require netpbm-progs, icoutils.  These are needed for icon generation
+  during inspection, but were not being pulled in before.
+
+* Mon Mar 05 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.11-1
+- New upstream version 1.17.11.
+
+* Sat Mar 03 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.10-2
+- New upstream version 1.17.10.
+- Rebase Ruby patch against new libguestfs.
+
+* Wed Feb 29 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.9-1
+- New upstream version 1.17.9.
+
+* Wed Feb 15 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.8-1
+- New upstream version 1.17.8.
+
+* Mon Feb 13 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.7-1
+- New upstream version 1.17.7.
+
+* Fri Feb 10 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.6-1
+- +BR ruby-irb.
+- Make virtio unconditional.  It's been a very long time since disabling
+  virtio was a good idea.
+- Disable some packages not available in RHEL 7.
+- New upstream version 1.17.6.
+
+* Fri Feb 10 2012 Petr Pisar <ppisar@redhat.com> - 1:1.17.5-3
+- Rebuild against PCRE 8.30
+
+* Thu Feb  9 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.5-2
+- Rebuild with ruby(abi) = 1.9.1.
+
+* Wed Feb  8 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.5-1
+- New upstream version 1.17.5.
+- Remove usrmove workaround patch, now upstream.
+
+* Wed Feb  8 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.4-8
+- Further Ruby 1.9 changes.
+
+* Tue Feb 07 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.4-7
+- Bump and rebuild for Ruby update.
+
+* Mon Feb  6 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.4-6
+- Add workaround for usrmove in Fedora.
+
+* Wed Feb  1 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.4-1
+- New upstream version 1.17.4.
+- Remove patch now upstream.
+
+* Sat Jan 28 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.3-2
+- New upstream version 1.17.3.
+- Remove patch now upstream.
+- Add upstream patch to fix OCaml bytecode compilation.
+
+* Fri Jan 27 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.2-3
+- Upstream patch to work with udev >= 176.
+
+* Thu Jan 26 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.2-2
+- New upstream version 1.17.2.
+- Use libdb-utils instead of old db4-utils.
+- net-tools is no longer used; replaced by iproute (RHBZ#784647).
+- Try re-enabling tests on i686.
+
+* Tue Jan 24 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.17.1-1
+- New upstream version 1.17.1.
+
+* Mon Jan 23 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.16.0-1
+- New upstream version 1.16.0.
+- Remove patches which are now upstream.
+- GObject: Move *.typelib file to base gobject package.
+
+* Sun Jan 22 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.19-1
+- New upstream version 1.15.19.
+- +BR psmisc for the appliance.
+- Includes GObject bindings in libguestfs-gobject and
+  libguestfs-gobject-devel subpackages.
+- Include upstream patches for PHP 5.4.
+
+* Thu Jan 19 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.18-1
+- New upstream version 1.15.18.
+
+* Wed Jan 18 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.17-1
+- New upstream version 1.15.17.
+- New tool: virt-format.
+
+* Tue Jan 10 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.16-1
+- New upstream version 1.15.16.
+
+* Sun Jan  8 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.15-2
+- New upstream version 1.15.15.
+- Updated gnulib fixes builds with gcc 4.7.
+- Rebuild for OCaml 3.12.1.
+- Add explicit BR perl-hivex, required for various Perl virt tools.
+
+* Fri Dec 23 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.14-1
+- New upstream version 1.15.14.
+- Remove three patches, now upstream.
+
+* Thu Dec 22 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.13-4
+- New upstream version 1.15.13.
+- Fixes Security: Mitigate possible privilege escalation via SG_IO ioctl
+  (CVE-2011-4127, RHBZ#757071).
+- Add three upstream patches to fix 'make check'.
+
+* Thu Dec 22 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.12-1
+- New upstream version 1.15.12.
+
+* Fri Dec  9 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.11-1
+- New upstream version 1.15.11.
+
+* Tue Dec  6 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.10-1
+- New upstream version 1.15.10.
+- Remove patch, now upstream.
+
+* Sat Dec  3 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.9-2
+- New upstream version 1.15.9.
+- Add upstream patch to fix Augeas library detection.
+- Appliance explicitly requires libxml2 (because Augeas >= 0.10 requires it),
+  although it was implicitly included already.
+
+* Tue Nov 29 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.8-1
+- New upstream version 1.15.8.
+
+* Tue Nov 29 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.7-1
+- New upstream version 1.15.7.
+
+* Thu Nov 24 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.6-1
+- New upstream version 1.15.6.
+
+* Mon Nov 21 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.5-1
+- New upstream version 1.15.5.
+- Add guestfs-testing(1) man page.
+
+* Thu Nov 17 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.4-2
+- New upstream version 1.15.4.
+- Remove patch which is now upstream.
+- libguestfs_jni.a is no longer built.
+
+* Fri Nov 11 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.3-3
+- Add upstream patch to disable part of virt-df test.
+
+* Thu Nov 10 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.3-1
+- New upstream version 1.15.3.
+- Fix list of BuildRequires so they precisely match the appliance.
+
+* Thu Nov  3 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.2-1
+- New upstream version 1.15.2.
+- ocaml-pcre is no longer required for virt-resize.
+- xmlstarlet is no longer required for virt-sysprep.
+
+* Tue Nov  1 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.1-1
+- New upstream version 1.15.1.
+
+* Fri Oct 28 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.15.0-1
+- Stable branch 1.14.0 was released.  This is the new development
+  branch version 1.15.0.
+
+* Wed Oct 26 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.26-1
+- New upstream version 1.13.26.
+
+* Wed Oct 26 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.25-1
+- New upstream version 1.13.25.
+
+* Mon Oct 24 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.24-1
+- New upstream version 1.13.24.
+- This version includes upstream workarounds for broken qemu, so both
+  non-upstream patches have now been removed from Fedora.
+
+* Fri Oct 21 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1:1.13.23-1.1
+- rebuild with new gmp without compat lib
+
+* Thu Oct 20 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.23-1
+- New upstream version 1.13.23.
+
+* Wed Oct 19 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.22-2
+- New upstream version 1.13.22.
+- Remove 3x upstream patches.
+- Renumber the two remaining non-upstream patches as patch0, patch1.
+- Rebase patch1.
+
+* Mon Oct 17 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.21-4
+- Add upstream patch to skip FUSE tests if there is no /dev/fuse.
+  This allows us also to remove the Fedora-specific patch which
+  disabled these tests before.
+
+* Sat Oct 15 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.21-3
+- Add upstream patch to fix virt-sysprep test.
+
+* Fri Oct 14 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.21-2
+- New upstream version 1.13.21.
+- Move virt-sysprep to libguestfs-tools, to avoid pulling in extra
+  dependencies for RHEV-H.  This tool is not likely to be useful
+  for RHEV-H in its current form anyway.
+- Change BR cryptsetup-luks -> cryptsetup since that package changed.
+
+* Wed Oct 12 2011 Peter Schiffer <pschiffe@redhat.com> - 1:1.13.20-1.1
+- rebuild with new gmp
+
+* Tue Oct 11 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.20-1
+- New upstream version 1.13.20.
+
+* Sat Oct  8 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.19-1
+- New upstream version 1.13.19.
+- New tool: virt-sysprep.
+- Remove the old guestfish and libguestfs-mount packages, and put these
+  tools into libguestfs-tools.  This change is long overdue, but is also
+  necessitated by the new virt-sysprep tool.  This new tool would pull
+  in guestfish anyway, so having separate packages makes no sense.
+- Remove old obsoletes for virt-cat, virt-df, virt-df2 and virt-inspector,
+  since those packages existed only in much older Fedora.
+
+* Wed Oct  5 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.18-1
+- New upstream version 1.13.18.
+- New tool: virt-alignment-scan.
+
+* Tue Oct  4 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.17-1
+- New upstream version 1.13.17.
+- New tool: virt-sparsify.
+
+* Sat Oct  1 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.16-1
+- New upstream version 1.13.16.
+
+* Thu Sep 29 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.15-2
+- Rearrange description to make it clearer.
+- virt-resize was written in OCaml.  Move it to libguestfs-tools-c
+  subpackage since it doesn't require Perl.
+
+* Wed Sep 28 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.15-1
+- New upstream version 1.13.15.
+- Add lzop program to the appliance (for compress-out API).
+- Remove upstream patch.
+
+* Mon Sep 26 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.14-2
+- Upstream patch to fix timer check failures during boot (RHBZ#502058).
+
+* Sat Sep 24 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.14-1
+- New upstream version 1.13.14.
+
+* Wed Sep 21 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.13-1
+- Add Erlang bindings in erlang-libguestfs subpackage.
+- Remove upstream patch.
+
+* Fri Sep 16 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.12-4
+- Don't require grub.  See RHBZ#737261.
+- Note this (hopefully temporarily) breaks guestfs_grub_install API.
+- Include upstream patch to add guestfs_grub_install into an optional group.
+
+* Wed Sep 14 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.12-1
+- New upstream version 1.13.12.
+
+* Thu Sep  1 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.11-1
+- New upstream version 1.13.11.
+
+* Tue Aug 30 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.10-2
+- Remove MAKEDEV dependency (RHBZ#727247).
+
+* Sun Aug 28 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.10-1
+- New upstream version 1.13.10.
+
+* Fri Aug 26 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.9-1
+- New upstream version 1.13.9.
+
+* Fri Aug 26 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.8-1
+- New upstream version 1.13.8.
+- Static python library is no longer built, so don't rm it.
+
+* Tue Aug 23 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.7-1
+- New upstream version 1.13.7.
+- configure --with-extra version string contains Fedora release.
+- Build with make V=1 to display full compile commands.
+- Remove /usr/sbin PATH setting, not used for a very long time.
+
+* Fri Aug 19 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.6-2
+- New upstream version 1.13.6.
+- Rebase non-upstream patch to fix qemu -machine option.
+
+* Wed Aug 17 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.5-1
+- New upstream version 1.13.5.
+
+* Thu Aug 11 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.4-1
+- New upstream version 1.13.4.
+
+* Mon Aug  8 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.3-4
+- New upstream version 1.13.3.
+- 'test-getlogin_r.c:55: assertion failed' test must now be fixed in
+  gnulib/tests directory instead of daemon/tests (the latter directory
+  no longer exists).
+- Only run testsuite on x86_64 because of qemu bug.
+
+* Tue Aug  2 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.13.2-3
+- Switch Rawhide to use the new development branch (1.13).
+- New upstream version 1.13.2.
+- Remove upstream patch.
+- Ensure config.log is printed, even in the error case.
+
+* Tue Jul 26 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.12.1-4
+- New upstream stable branch version 1.12.1.
+- Remove 5 x upstream patches.
+- Add non-upstream patch to deal with broken qemu -machine option.
+- Add upstream patch to fix segfault in OCaml bindings.
+
+* Tue Jul 26 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.12.0-11
+- Bump and rebuild.
+
+* Fri Jul 22 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.12.0-10
+- Rebuild against fixed hivex 1.2.7-7 in dist-f16-perl.
+
+* Thu Jul 21 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.12.0-9
+- Attempt rebuild in dist-f16-perl.
+
+* Thu Jul 21 2011 Petr Sabata <contyk@redhat.com> - 1:1.12.0-8
+- Perl mass rebuild
+
+* Thu Jul 21 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.12.0-4
+- Disable tests, use quickcheck, because of RHBZ#723555, RHBZ#723822.
+
+* Wed Jul 20 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.12.0-2
+- Readd patch to fix virtio-serial test for qemu 0.15.
+
+* Wed Jul 20 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.12.0-1
+- New stable version 1.12.0 for Fedora 16.
+- Remove upstream patch.
+- Disable tests on i686 (because of RHBZ#723555).
+
+* Wed Jul 20 2011 Petr Sabata <contyk@redhat.com> - 1:1.11.20-3
+- Perl mass rebuild
+
+* Tue Jul 19 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.20-2
+- Add upstream patch to fix virtio-serial test for qemu 0.15.
+
+* Tue Jul 19 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.20-1
+- New upstream version 1.11.20.
+- Replace standard README file with one suited for Fedora.
+- Add guestfs-java(3) manpage to libguestfs-java-devel package.
+
+* Mon Jul 18 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.19-1
+- New upstream version 1.11.19.
+- Remove upstream patch.
+- Add Ukrainian (uk) man pages subpackage.
+
+* Fri Jul 15 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.18-2
+- Add upstream patch to fix regression test.
+
+* Fri Jul 15 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.18-1
+- New upstream version 1.11.18.
+- Force febootstrap >= 3.7 which contains a fix for latest Rawhide.
+- Use --enable-install-daemon to install guestfsd.
+
+* Thu Jul 14 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.17-1
+- New upstream version 1.11.17.
+
+* Wed Jul 13 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.16-1
+- New upstream version 1.11.16.
+
+* Tue Jul 12 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.15-1
+- New upstream version 1.11.15.
+
+* Wed Jul  6 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.14-1
+- New upstream version 1.11.14.
+
+* Wed Jul  6 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.13-3
+- Further updates to libguestfs-live-service after feedback from
+  Dan Berrange and Lennart Poettering.
+
+* Tue Jul  5 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.13-2
+- Add libguestfs-live-service subpackage.  This can be installed in
+  virtual machines in order to enable safe editing of files in running
+  guests (eg. guestfish --live).
+
+* Thu Jun 30 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.13-1
+- New upstream version 1.11.13.
+
+* Wed Jun 29 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.12-3
+- Bump and rebuild for parted 3.0.
+- Depend on fixed parted >= 3.0-2.
+
+* Tue Jun 28 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.12-1
+- New upstream version 1.11.12.
+
+* Tue Jun 21 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.11-1
+- New upstream version 1.11.11.
+
+* Mon Jun 20 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.10-3
+- Temporarily stop setting CCFLAGS in perl subdirectory.
+  See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628522
+
+* Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1:1.11.10-2
+- Perl mass rebuild
+
+* Fri Jun 10 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.10-1
+- New upstream version 1.11.10.
+- Enable tests since fix for RHBZ#710921 is in Rawhide kernel package.
+
+* Fri Jun 10 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1:1.11.9-8
+- Perl 5.14 mass rebuild
+
+* Sun Jun  5 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.9-7
+- Build against new parted.
+- Disable tests on i686 because of RHBZ#710921.
+- Remove recipes/ doc directory.  This is no longer present because it
+  was replaced by a guestfs-recipes(1) man page.
+
+* Sat Jun  4 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.9-1
+- New upstream version 1.11.9.
+
+* Wed May 18 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.8-1
+- New upstream version 1.11.8.
+- "zero" command test is fixed now, so we don't need to skip it.
+
+* Tue May 17 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.7-3
+- New upstream version 1.11.7.
+- Depends on hivex >= 1.2.7.
+- Remove upstream patch.
+- Skip test of "zero" command (RHBZ#705499).
+
+* Mon May  9 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.5-2
+- configure: Use Python platform-dependent site-packages.
+
+* Mon May  9 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.5-1
+- New upstream version 1.11.5.
+- virt-edit has been rewritten in C, therefore this tool has been moved
+  into the libguestfs-tools-c package.
+
+* Sun May  8 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.4-1
+- New upstream version 1.11.4.
+
+* Fri Apr 22 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.3-1
+- New upstream version 1.11.3.
+
+* Mon Apr 18 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.2-1
+- New upstream version 1.11.2.
+- Fixes Python bindings when used in Python threads.
+- Remove upstream patch.
+
+* Sat Apr 16 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.1-2
+- New upstream version 1.11.1.
+- Add upstream patch so we don't depend on libtool.
+
+* Fri Apr 15 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.0-2
+- Bump and rebuild.
+
+* Tue Apr 12 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.0-1
+- New upstream development branch 1.11.0.
+- New Source URL.
+- Remove patches which are now upstream.
+
+* Sun Apr 10 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.18-4
+- Include further fixes to virt-resize from upstream.
+
+* Sat Apr  9 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.18-2
+- New upstream version 1.9.18.
+- Requires ocaml-pcre for new virt-resize.
+- Remove libguestfs-test-tool-helper program which is no longer used.
+- Include upstream fix for virt-resize build.
+
+* Wed Apr  6 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.17-2
+- Remove partially translated Ukrainian manpages.
+
+* Tue Apr  5 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.17-1
+- New upstream version 1.9.17.
+
+* Fri Apr  1 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.16-1
+- New upstream version 1.9.16.
+
+* Fri Apr  1 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.15-1
+- New upstream version 1.9.15.
+- Add BR libconfig-devel.
+- Add /etc/libguestfs-tools.conf (config file for guestfish, guestmount,
+  virt-rescue; in future for other tools as well).
+
+* Mon Mar 28 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.14-1
+- New upstream version 1.9.14.
+- Include 'acl' as BR so virt-rescue gets getfacl and setfacl programs.
+
+* Mon Mar 28 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.13-2
+- Include 'attr' as BR (required for getfattr, setfattr programs in
+  virt-rescue).
+
+* Thu Mar 24 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.13-1
+- New upstream version 1.9.13.
+
+* Fri Mar 18 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.12-1
+- New upstream version 1.9.12.
+
+* Wed Mar 16 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.11-2
+- Add runtime requires on minimum glibc because of newly readable binaries.
+
+* Tue Mar 15 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.11-1
+- New upstream version 1.9.11.
+- Add generated Ruby documentation (rdoc).
+
+* Tue Mar  8 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.10-1
+- New upstream version 1.9.10.
+- Remove patches (now upstream).
+
+* Fri Mar  4 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.9-2
+- Include upstream patches to fix virt-make-fs with qemu-img 0.14.
+
+* Fri Mar  4 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.9-1
+- New upstream version 1.9.9.
+
+* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.9.8-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Sun Feb  6 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.8-1
+- New upstream version 1.9.8.
+
+* Sun Feb  6 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.7-7
+- Rebuild against rpm-4.9.0-0.beta1.6.fc15 to fix OCaml deps.  See discussion:
+  http://lists.fedoraproject.org/pipermail/devel/2011-February/148398.html
+
+* Wed Feb  2 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.7-6
+- Add temporary non-upstream patch to fix /etc/mtab.
+  See: https://www.redhat.com/archives/libguestfs/2011-February/msg00006.html
+- Add fix for regressions/rhbz557655.sh so it works when tracing is enabled.
+- Add guestfs-perl(3) man page.
+
+* Tue Feb  1 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.7-3
+- Enable trace in 'make check' section.
+
+* Sun Jan 30 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.7-1
+- New upstream version 1.9.7.
+
+* Wed Jan 26 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.6-2
+- Bump and rebuild.
+
+* Sat Jan 22 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.6-1
+- New upstream version 1.9.6.
+
+* Tue Jan 18 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.5-1
+- New upstream version 1.9.5.
+
+* Sat Jan 15 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.4-1
+- New upstream version 1.9.4.
+
+* Fri Jan 14 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.3-2
+- Only runtime require febootstrap-supermin-helper (not whole of
+  febootstrap).
+
+* Tue Jan 11 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.3-1
+- New upstream version 1.9.3.
+
+* Wed Jan 05 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.2-2
+- Bump and rebuild.
+
+* Mon Jan  3 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.2-1
+- New upstream version 1.9.2.
+- New tools: virt-copy-in, virt-copy-out, virt-tar-in, virt-tar-out.
+  These are just shell script wrappers around guestfish so they are
+  included in the guestfish package.
+
+* Fri Dec 31 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.1-1
+- New upstream version 1.9.1.
+
+* Tue Dec 21 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.0-2
+- Bump and rebuild.
+
+* Sun Dec 19 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.9.0-1
+- New upstream development branch 1.9.0.
+- Include ROADMAP in devel package.
+
+* Thu Dec 16 2010 Richard Jones <rjones@redhat.com> - 1:1.7.24-1
+- New upstream version 1.7.24.
+- Adds getxattr/lgetxattr APIs to support guestfs-browser.
+
+* Sat Dec 11 2010 Richard Jones <rjones@redhat.com> - 1:1.7.23-1
+- New upstream version 1.7.23.
+
+* Sat Dec 11 2010 Richard Jones <rjones@redhat.com> - 1:1.7.22-1
+- New upstream version 1.7.22.
+- Depend on febootstrap 3.3 which fixes the checksum stability problem.
+
+* Fri Dec 10 2010 Richard Jones <rjones@redhat.com> - 1:1.7.21-1
+- New upstream version 1.7.21.
+
+* Tue Dec  7 2010 Richard Jones <rjones@redhat.com> - 1:1.7.20-1
+- New upstream version 1.7.20.
+- Remove patches which are upstream.
+
+* Tue Dec  7 2010 Richard Jones <rjones@redhat.com> - 1:1.7.19-15
+- Rebuild appliance with febootstrap 3.1-5 because we accidentally
+  reopened RHBZ#654638.
+
+* Mon Dec  6 2010 Richard Jones <rjones@redhat.com> - 1:1.7.19-14
+- Rebuild appliance properly using febootstrap 3.1 and alternate yum repo.
+
+* Sun Dec  5 2010 Richard Jones <rjones@redhat.com> - 1:1.7.19-1
+- New upstream development version 1.7.19.
+- Appliance building in this version has been substantially rewritten
+  and this requires febootstrap >= 3.0 to build.
+- createrepo no longer required.
+- Supermin appliance is the default.
+
+* Wed Dec  1 2010 Richard Jones <rjones@redhat.com> - 1:1.7.18-1
+- New upstream development version 1.7.18.
+
+* Tue Nov 30 2010 Richard Jones <rjones@redhat.com> - 1:1.7.17-1
+- New upstream development version 1.7.17.
+
+* Fri Nov 26 2010 Richard Jones <rjones@redhat.com> - 1:1.7.16-1
+- New upstream development version 1.7.16.
+- guestfish no longer requires pod2text, hence no longer requires perl.
+- Require febootstrap >= 2.11.
+
+* Fri Nov 26 2010 Richard Jones <rjones@redhat.com> - 1:1.7.15-2
+- New upstream development version 1.7.15.
+- Split out new libguestfs-tools-c package from libguestfs-tools.
+  . This is so that the -tools-c package can be pulled in by people
+    wanting to avoid a dependency on Perl, while -tools pulls in everything
+    as before.
+  . The C tools currently are: cat, df, filesystems, fish, inspector, ls,
+    mount, rescue.
+  . guestfish still requires pod2text which requires perl.  This will be
+    rectified in the next release.
+  . libguestfs-tools no longer pulls in guestfish.
+- guestfish also depends on: less, man, vi
+- Add BR db4-utils (although since RPM needs it, it not really necessary).
+- Runtime requires on db4-utils should be on core lib, not tools package.
+- Change all "Requires: perl-Foo" to "Requires: perl(Foo)".
+
+* Thu Nov 25 2010 Richard Jones <rjones@redhat.com> - 1:1.7.14-1
+- New upstream development version 1.7.14.
+
+* Wed Nov 24 2010 Richard Jones <rjones@redhat.com> - 1:1.7.13-3
+- New upstream development version 1.7.13.
+- New manual pages containing example code.
+- Ship examples for C, OCaml, Ruby, Python.
+- Don't ship HTML versions of man pages.
+- Rebase no-fuse-test patch to latest version.
+
+* Tue Nov 23 2010 Richard Jones <rjones@redhat.com> - 1:1.7.12-1
+- New upstream development version 1.7.12.
+- New tool: virt-filesystems.  virt-list-filesystems and virt-list-partitions
+  are deprecated, but still included in the package.
+
+* Wed Nov 17 2010 Richard Jones <rjones@redhat.com> - 1:1.7.11-1
+- New upstream development version 1.7.11.
+- Fix Source0 URL which had pointed to the 1.5 directory.
+- virt-inspector is not a dependency of guestmount.
+
+* Wed Nov 17 2010 Richard Jones <rjones@redhat.com> - 1:1.7.10-1
+- New upstream development version 1.7.10.
+
+* Tue Nov 16 2010 Richard Jones <rjones@redhat.com> - 1:1.7.9-1
+- New upstream development version 1.7.9.
+
+* Mon Nov 15 2010 Richard Jones <rjones@redhat.com> - 1:1.7.8-1
+- New upstream development version 1.7.8.
+- Add Obsoletes so perl-Sys-Guestfs overrides perl-libguestfs (RHBZ#652587).
+
+* Mon Nov 15 2010 Richard Jones <rjones@redhat.com> - 1:1.7.7-1
+- New upstream development version 1.7.7.
+- Rename perl-libguestfs as perl-Sys-Guestfs (RHBZ#652587).
+
+* Sat Nov 13 2010 Richard Jones <rjones@redhat.com> - 1:1.7.6-1
+- New upstream development version 1.7.6.
+
+* Sat Nov 13 2010 Richard Jones <rjones@redhat.com> - 1:1.7.5-2
+- New upstream development version 1.7.5.
+- Remove hand-installation of Ruby bindings.
+- Remove upstream patch.
+
+* Thu Nov 11 2010 Richard Jones <rjones@redhat.com> - 1:1.7.4-2
+- New upstream development version 1.7.4.
+- ocaml-xml-light is no longer required.
+- Remove guestfs-actions.h and guestfs-structs.h.  Libguestfs now
+  only exports a single <guestfs.h> header file.
+- Add patch to fix broken Perl test.
+- Remove workaround for RHBZ#563103.
+
+* Mon Nov  8 2010 Richard Jones <rjones@redhat.com> - 1:1.7.3-1
+- New upstream development version 1.7.3.
+- Add AUTHORS file from tarball.
+
+* Fri Nov  5 2010 Richard Jones <rjones@redhat.com> - 1:1.7.2-1
+- New upstream development version 1.7.2.
+- Add requires ruby to ruby-libguestfs package.
+
+* Wed Nov  3 2010 Richard Jones <rjones@redhat.com> - 1:1.7.1-1
+- New upstream development version 1.7.1.
+- Add BR gperf.
+
+* Tue Nov  2 2010 Richard Jones <rjones@redhat.com> - 1:1.7.0-1
+- New upstream development branch and version 1.7.0.
+
+* Fri Oct 29 2010 Richard Jones <rjones@redhat.com> - 1:1.5.26-1
+- New upstream development version 1.5.26.
+
+* Thu Oct 28 2010 Richard Jones <rjones@redhat.com> - 1:1.5.25-1
+- New upstream development version 1.5.25.
+- Rewritten virt-inspector.
+- Requires febootstrap >= 2.10.
+- New virt-inspector requires db_dump program.
+
+* Wed Oct 27 2010 Richard Jones <rjones@redhat.com> - 1:1.5.24-2
+- Attempt to run tests.
+
+* Wed Oct 27 2010 Richard Jones <rjones@redhat.com> - 1:1.5.24-1
+- New upstream development version 1.5.24.
+
+* Sat Oct 23 2010 Richard Jones <rjones@redhat.com> - 1:1.5.23-1
+- Fix for libguestfs: missing disk format specifier when adding a disk
+  (RHBZ#642934, CVE-2010-3851).
+
+* Tue Oct 19 2010 Richard Jones <rjones@redhat.com> - 1:1.5.22-1
+- New upstream development version 1.5.22.
+
+* Sat Oct  9 2010 Richard Jones <rjones@redhat.com> - 1:1.5.21-2
+- guestfish no longer requires virt-inspector.
+
+* Fri Oct  1 2010 Richard Jones <rjones@redhat.com> - 1:1.5.21-1
+- New upstream development version 1.5.21.
+
+* Sun Sep 26 2010 Richard Jones <rjones@redhat.com> - 1:1.5.20-1
+- New upstream development version 1.5.20.
+
+* Wed Sep 22 2010 Richard Jones <rjones@redhat.com> - 1:1.5.18-1
+- New upstream development version 1.5.18.
+- Note that guestfish '-a' and '-d' options were broken in 1.5.17, so
+  upgrading to this version is highly recommended.
+
+* Tue Sep 21 2010 Richard Jones <rjones@redhat.com> - 1:1.5.17-1
+- New upstream development version 1.5.17.
+
+* Wed Sep 15 2010 Richard Jones <rjones@redhat.com> - 1:1.5.16-1
+- New upstream development version 1.5.16.
+
+* Wed Sep 15 2010 Richard Jones <rjones@redhat.com> - 1:1.5.15-1
+- New upstream development version 1.5.15.
+
+* Tue Sep 14 2010 Richard Jones <rjones@redhat.com> - 1:1.5.14-1
+- New upstream development version 1.5.14.
+
+* Mon Sep 13 2010 Richard Jones <rjones@redhat.com> - 1:1.5.13-1
+- New upstream version 1.5.13.
+- Removed the patch workaround for RHBZ#630583.  The same workaround
+  is now upstream (the bug is not fixed).
+
+* Sat Sep 11 2010 Richard Jones <rjones@redhat.com> - 1:1.5.12-1
+- New upstream version 1.5.12.
+
+* Fri Sep 10 2010 Richard Jones <rjones@redhat.com> - 1:1.5.11-1
+- New upstream version 1.5.11.
+- Note: fixes a serious bug in guestfish 'copy-out' command.
+
+* Thu Sep  9 2010 Richard Jones <rjones@redhat.com> - 1:1.5.10-1
+- New upstream version 1.5.10.
+
+* Wed Sep  8 2010 Richard Jones <rjones@redhat.com> - 1:1.5.9-2
+- Disable tests, still failing because of RHBZ#630777.
+
+* Wed Sep  8 2010 Richard Jones <rjones@redhat.com> - 1:1.5.9-1
+- New upstream version 1.5.9.
+
+* Mon Sep  6 2010 Richard Jones <rjones@redhat.com> - 1:1.5.8-2
+- Add patch to work around RHBZ#630583 and reenable tests.
+
+* Sat Sep  4 2010 Richard Jones <rjones@redhat.com> - 1:1.5.8-1
+- New upstream version 1.5.8.
+- Add BR po4a for translations of man pages.
+- Add PHP bindings.
+- Remove partially-translated Japanese webpages.
+
+* Wed Sep  1 2010 Richard Jones <rjones@redhat.com> - 1:1.5.7-1
+- New upstream version 1.5.7.
+- 'debug' command is enabled by default now.
+
+* Fri Aug 27 2010 Richard Jones <rjones@redhat.com> - 1:1.5.6-1
+- New upstream version 1.5.6.
+
+* Fri Aug 27 2010 Richard Jones <rjones@redhat.com> - 1:1.5.5-2
+- Use bug-fixed febootstrap 2.9.
+
+* Thu Aug 26 2010 Richard Jones <rjones@redhat.com> - 1:1.5.5-1
+- New upstream version 1.5.5.
+
+* Tue Aug 24 2010 Richard Jones <rjones@redhat.com> - 1:1.5.4-2
+- Disable tests again, because the Rawhide kernel still won't boot.
+
+* Tue Aug 24 2010 Richard Jones <rjones@redhat.com> - 1:1.5.4-1
+- New upstream development version 1.5.4.
+- Now requires febootstrap >= 2.8 and qemu >= 0.12.
+- Re-enable tests because RHBZ#624854 is supposed to be fixed.
+- Upstream Source URL has changed.
+
+* Wed Aug 18 2010 Richard Jones <rjones@redhat.com> - 1:1.5.3-2
+- Disable tests because of RHBZ#624854.
+
+* Tue Aug 17 2010 Richard Jones <rjones@redhat.com> - 1:1.5.3-1
+- New upstream development version 1.5.3.
+
+* Wed Aug 11 2010 Richard Jones <rjones@redhat.com> - 1:1.5.2-6
+- Bump and rebuild.
+
+* Thu Aug 05 2010 Richard Jones - 1:1.5.2-5
+- Bump and rebuild.
+
+* Fri Jul 23 2010 David Malcolm <dmalcolm@redhat.com> - 1:1.5.2-4
+- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
+
+* Fri Jul 23 2010 David Malcolm <dmalcolm@redhat.com> - 1:1.5.2-3
+- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
+
+* Thu Jul 22 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.5.2-2
+- New upstream development version 1.5.2.
+- +BuildRequires: cryptsetup-luks.
+
+* Wed Jul 21 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.5.1-1
+- New upstream development version 1.5.1.
+
+* Tue Jul 20 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.5.0-7
+- Requires binutils (RHBZ#616437).
+
+* Mon Jul 19 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.5.0-6
+- Fix libguestfs-find-requires.sh for new location of hostfiles (RHBZ#615946).
+
+* Thu Jul  8 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.5.0-5
+- Include RELEASE-NOTES in devel package.
+
+* Thu Jul  8 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.5.0-4
+- New development branch 1.5.0.
+- Remove two upstream patches.
+- Work around permanently broken test-getlogin_r Gnulib test.
+
+* Mon Jun 28 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.21-4
+- Explicitly depend on e2fsprogs.
+- Add patch to add e2fsprogs to the appliance.
+- Add patch to fix GFS kernel module problem.
+
+* Fri Jun 25 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1:1.3.21-2
+- Rebuild
+
+* Wed Jun 16 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.21-1
+- New upstream version 1.3.21.
+
+* Tue Jun  8 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.20-1
+- New upstream version 1.3.20.
+- Since upstream commit a043b6854a0c4 we don't need to run make install
+  twice.
+
+* Fri Jun  4 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.19-1
+- New upstream version 1.3.19.
+
+* Wed Jun  2 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.18-1
+- New upstream version 1.3.18.
+
+* Thu May 27 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.17-1
+- New upstream version 1.3.17.
+- Change repo name to 'fedora-14'.
+
+* Wed May 26 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.16-6
+- Co-own bash_completion.d directory.
+
+* Tue May 25 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.16-4
+- New upstream version 1.3.16.
+- Add guestfish bash tab completion script.
+
+* Mon May 24 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.14-1
+- New upstream version 1.3.14.
+
+* Sun May 16 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.13-1
+- New upstream version 1.3.13.
+- Add BUGS to documentation.
+- Force update of hivex dependency to 1.2.2 since it contains
+  important registry import fixes.
+- Remove patch1, now upstream.
+
+* Fri May 14 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.12-3
+- Backport supermin build fix from upstream.
+- Further changes required for new layout of supermin appliance.
+
+* Fri May 14 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.12-1
+- New upstream version 1.3.12.
+- febootstrap >= 2.7 is required at compile time and at runtime (at runtime
+  because of the new febootstrap-supermin-helper).
+- Bugs fixed: 591155 591250 576879 591142 588651 507810 521674 559963 516096.
+
+* Sat May  8 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.11-1
+- New upstream version 1.3.11.
+
+* Fri May  7 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.10-2
+- New upstream version 1.3.10.
+
+* Thu May 06 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.9-2
+- Bump and rebuild against updated libconfig
+
+* Fri Apr 30 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.9-1
+- New upstream version 1.3.9.
+
+* Thu Apr 29 2010 Marcela Maslanova <mmaslano@redhat.com> - 1:1.3.8-2
+- Mass rebuild with perl-5.12.0
+
+* Tue Apr 27 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.8-1
+- New upstream version 1.3.8.
+
+* Fri Apr 23 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.7-1
+- New upstream version 1.3.7.
+- NOTE: fixes a segfault in guestfish 1.3.6 when using the -a option.
+
+* Thu Apr 22 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.6-1
+- New upstream version 1.3.6.
+
+* Mon Apr 19 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.5-1
+- New upstream version 1.3.5.
+
+* Sat Apr 17 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.4-1
+- New upstream version 1.3.4.
+
+* Sun Apr 11 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.3-1
+- New upstream version 1.3.3.
+- New virt-resize option --LV-expand.
+- New API: lvresize-free.
+- Fixes RHBZ#581501.
+
+* Sun Apr 11 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.2-3
+- Disable checksum-device test.
+
+* Sat Apr 10 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.2-2
+- Bump and rebuild.
+
+* Sat Apr 10 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.2-1
+- New upstream version 1.3.2.
+- New APIs: checksum-device, part-del, part-get-bootable, part-get-mbr-id,
+  part-set-mbr-id, vgscan, ntfsresize, txz-in, txz-out.
+- Enhanced/fixed virt-resize tool.
+- Enhanced virt-list-partitions tool.
+- Fixes: 580016, 580650, 579155, 580556.
+
+* Sat Apr 10 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.1-4
+- Bump and rebuild.
+
+* Thu Apr  8 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.1-3
+- Runtime requires should only be on libguestfs-tools subpackage.
+
+* Thu Apr  8 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.1-2
+- Missing BR on qemu-img package.
+
+* Thu Apr  8 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.3.1-1
+- New upstream version 1.3.1.
+- For explanation of apparently large version jump, see:
+  https://www.redhat.com/archives/libguestfs/2010-April/msg00057.html
+- New tool: virt-make-fs.
+- New API: guestfs_zero_device.
+- Fixes RHBZ#580246 (tar-in command hangs if uploading more than
+  available space)
+- Fixes RHBZ#579664 (guestfish doesn't report error when there is not
+  enough space for image allocation)
+- +BR perl-String-ShellQuote (for virt-make-fs).
+
+* Tue Mar 30 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.89-1
+- New upstream version 1.0.89.
+- Improved version of virt-win-reg.
+- Many smaller bugfixes.
+- Requires hivex >= 1.2.1.
+- Remove TERM=dumb patch which is now upstream.
+
+* Tue Mar 30 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.88-7
+- Backport of TERM=dumb patch from upstream.
+- Workaround failure caused by RHBZ#575734.
+- Workaround unknown failure of test_swapon_label_0.
+
+* Tue Mar 30 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.88-5
+- Attempted workaround for RHBZ#563103, so we can reenable tests.
+
+* Fri Mar 26 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.88-2
+- Remember to check in the new sources.
+
+* Fri Mar 26 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.88-1
+- New upstream version 1.0.88.
+- Mainly small bugfixes.
+- Update Spanish translation of libguestfs (RHBZ#576876).
+- Use ext4 dev tools on RHEL 5 (RHBZ#576688).
+- Add support for minix filesystem (RHBZ#576689).
+
+* Fri Mar 26 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.87-2
+- Add vim-minimal to BR, it is now required by the appliance.
+
+* Tue Mar 23 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.87-1
+- New upstream version 1.0.87.
+- New tools: virt-resize and virt-list-partitions.
+- New APIs: guestfs_copy_size; APIs for querying the relationship between
+  LVM objects.
+- Add vim to the virt-rescue appliance.
+
+* Fri Mar 12 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.86-1
+- New upstream version 1.0.86.
+- libguestfs-supermin-helper rewritten in C (from shell), reduces
+  appliance boot time by 2-3 seconds.
+- Fix parsing of integers in guestfish on 32 bit platforms (RHBZ#569757
+  and RHBZ#567567).
+- Enhance virt-inspector output for Windows guests.
+- Add product_name field to virt-inspector output for all guests.
+- Weaken dependencies on libntfs-3g.so, don't include SONAME in dep.
+- Remove false dependency on libply (plymouth libraries).
+- Spanish translation (RHBZ#570181).
+- Fix bash regexp quoting bug.
+
+* Fri Mar 12 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.85-4
+- Bump and rebuild.
+
+* Thu Mar 11 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.85-3
+- Bump and rebuild.
+
+* Sat Mar 06 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.85-2
+- Bump and rebuild.
+
+* Mon Mar  1 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.85-1
+- New upstream version 1.0.85.
+- Remove hivex, now a separate upstream project and package.
+- Remove supermin quoting patch, now upstream.
+
+* Mon Mar  1 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.84-6
+- Fix quoting in supermin-split script (RHBZ#566511).
+- Don't include bogus './builddir' entries in supermin hostfiles
+  (RHBZ#566512).
+
+* Mon Feb 22 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.84-4
+- Don't include generator.ml in rpm.  It's 400K and almost no one will need it.
+- Add comments to spec file about how repo building works.
+- Whitespace changes in the spec file.
+
+* Mon Feb 22 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.84-3
+- Bump and rebuild.
+
+* Tue Feb 16 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.84-2
+- Bump and rebuild.
+
+* Fri Feb 12 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.84-1
+- New upstream version 1.0.84.
+
+* Fri Feb 12 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.83-8
+- Bump and rebuild.
+
+* Thu Feb 11 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.83-7
+- Disable tests.  These fail in Koji (on RHEL 5 kernel) because of a
+  bug in preadv/pwritev emulation in glibc (RHBZ#563103).
+
+* Tue Feb  9 2010 Matthew Booth <mbooth@redhat.com> - 1.0.83-6
+- Change buildnonet to buildnet
+- Allow buildnet, mirror, updates, virtio and runtests to be configured by user
+  macros.
+
+* Mon Feb  8 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.83-5
+- libguestfs-tools should require perl-XML-Writer (RHBZ#562858).
+
+* Mon Feb  8 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.83-4
+- Use virtio for block device access (RHBZ#509383 is fixed).
+
+* Fri Feb  5 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.83-3
+- Rebuild: possible timing-related build problem in Koji.
+
+* Fri Feb  5 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.83-2
+- New upstream release 1.0.83.
+- This release fixes:
+  Add Marathi translations (RHBZ#561671).
+  Polish translations (RHBZ#502533).
+  Add Gujarti translations (Sweta Kothari) (RHBZ#560918).
+  Update Oriya translations (thanks Manoj Kumar Giri) (RHBZ#559498).
+  Set locale in C programs so l10n works (RHBZ#559962).
+  Add Tamil translation (RHBZ#559877) (thanks to I.Felix)
+  Update Punjabi translation (RHBZ#559480) (thanks Jaswinder Singh)
+- There are significant fixes to hive file handling.
+- Add hivexsh and manual page.
+- Remove two patches, now upstream.
+
+* Sun Jan 31 2010 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.82-7
+- Bump and rebuild.
+
+* Fri Jan 29 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.82-6
+- Backport a better fix for RHBZ557655 test from upstream.
+- Backport fix for unreadable yum.log from upstream.
+
+* Thu Jan 28 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.82-3
+- Backport RHBZ557655 test fix from upstream.
+
+* Thu Jan 28 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.82-1
+- New upstream version 1.0.82.  This includes the two patches
+  we were carrying, so those are now removed.
+- This release fixes:
+  RHBZ#559498 (Oriya translation).
+  RHBZ#559480 (Punjabi translation).
+  RHBZ#558593 (Should prevent corruption by multilib).
+  RHBZ#559237 (Telugu translation).
+  RHBZ#557655 (Use xstrtol/xstrtoll to parse integers in guestfish).
+  RHBZ#557195 (Missing crc kernel modules for recent Linux).
+- In addition this contains numerous fixes to the hivex library
+  for parsing Windows Registry files, making hivex* and virt-win-reg
+  more robust.
+- New API call 'filesize'.
+
+* Thu Jan 28 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.81-8
+- Backport special handling of libgcc_s.so.
+- Backport unreadable files patch from RHEL 6 / upstream.
+
+* Fri Jan 22 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.81-5
+- Require febootstrap >= 2.6 (RHBZ#557262).
+
+* Thu Jan 21 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.81-4
+- Rebuild for unannounced soname bump (libntfs-3g.so).
+
+* Fri Jan 15 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.81-3
+- Rebuild for unannounced soname bump (libplybootsplash.so).
+
+* Thu Jan 14 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.81-2
+- Rebuild for broken dependency (iptables soname bump).
+
+* Wed Jan 13 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.81-1
+- New upstream version 1.0.81.
+- Remove two upstream patches.
+- virt-inspector: Make RPM application data more specific (RHBZ#552718).
+
+* Tue Jan 12 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.80-14
+- Reenable tests because RHBZ#553689 is fixed.
+
+* Tue Jan 12 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.80-13
+- Rebuild because of libparted soname bump (1.9 -> 2.1).
+
+* Fri Jan  8 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.80-12
+- qemu in Rawhide is totally broken (RHBZ#553689).  Disable tests.
+
+* Thu Jan  7 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0.80-11
+- Remove gfs-utils (deprecated and removed from Fedora 13 by the
+  upstream Cluster Suite developers).
+- Include patch to fix regression in qemu -serial stdio option.
+
+* Tue Dec 29 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.80-10
+- Remove some debugging statements which were left in the requires
+  script by accident.
+
+* Mon Dec 21 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.80-9
+- Generate additional requires for supermin (RHBZ#547496).
+
+* Fri Dec 18 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.80-3
+- Work around udevsettle command problem (RHBZ#548121).
+- Enable tests.
+
+* Wed Dec 16 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.80-2
+- Disable tests because of RHBZ#548121.
+
+* Wed Dec 16 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.80-1
+- New upstream release 1.0.80.
+- New Polish translations (RHBZ#502533).
+- Give a meaningful error if no usable kernels are found (RHBZ#539746).
+- New tool: virt-list-filesystems
+
+* Fri Dec  4 2009 Stepan Kasal <skasal@redhat.com> - 1:1.0.79-3
+- rebuild against perl 5.10.1
+
+* Wed Nov 18 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.79-2
+- New upstream release 1.0.79.
+- Adds FUSE test script and multiple fixes for FUSE (RHBZ#538069).
+- Fix virt-df in Xen (RHBZ#538041).
+- Improve speed of supermin appliance.
+- Disable FUSE-related tests because Koji doesn't currently allow them.
+  fuse: device not found, try 'modprobe fuse' first
+
+* Tue Nov 10 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.78-2
+- New upstream release 1.0.78.
+- Many more filesystem types supported by this release - add them
+  as dependencies.
+
+* Tue Nov  3 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.77-1
+- New upstream release 1.0.77.
+- Support for mounting guest in host using FUSE (guestmount command).
+- hivex*(1) man pages should be in main package, not -devel, since
+  they are user commands.
+- libguestfs-tools: Fix "self-obsoletion" issue raised by rpmlint.
+- perl: Remove bogus script Sys/bindtests.pl.
+
+* Thu Oct 29 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.75-2
+- New upstream release 1.0.75.
+- New library: libhivex.
+- New tools: virt-win-reg, hivexml, hivexget.
+- Don't require chntpw.
+- Add BR libxml2-devel, accidentally omitted before.
+
+* Tue Oct 20 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.74-1
+- New upstream release 1.0.74.
+- New API call: guestfs_find0.
+- New tools: virt-ls, virt-tar.
+
+* Wed Oct 14 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.73-1
+- New upstream release 1.0.73.
+- OCaml library now depends on xml-light.
+- Deal with installed documentation.
+
+* Tue Sep 29 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.72-2
+- Force rebuild.
+
+* Wed Sep 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.72-1
+- New upstream release 1.0.72.
+- New tools: virt-edit, virt-rescue.
+- Combine virt-cat, virt-df, virt-edit, virt-inspector and virt-rescue
+  into a single package called libguestfs-tools.
+
+* Tue Sep 22 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.71-2
+- New upstream release 1.0.71.
+
+* Fri Sep 18 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.70-2
+- Perl bindings require perl-XML-XPath (fixed RHBZ#523547).
+
+* Tue Sep 15 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.70-1
+- New upstream release 1.0.70.
+- Fixes build problem related to old version of GNU gettext.
+
+* Tue Sep 15 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.69-1
+- New upstream release 1.0.69.
+- Reenable the tests (because RHBZ#516543 is supposed to be fixed).
+- New main loop code should fix RHBZ#501888, RHBZ#504418.
+- Add waitpid along guestfs_close path (fixes RHBZ#518747).
+
+* Wed Aug 19 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.68-2
+- New upstream release 1.0.68.
+- BR genisoimage.
+
+* Thu Aug 13 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.67-2
+- New upstream release 1.0.67.
+
+* Fri Aug  7 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.66-5
+- Set network interface to ne2k_pci (workaround for RHBZ#516022).
+- Rerun autoconf because patch touches configure script.
+
+* Thu Aug  6 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.66-1
+- New upstream release 1.0.66.
+
+* Wed Jul 29 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.65-1
+- New upstream release 1.0.65.
+- Add Obsoletes for virt-df2 (RHBZ#514309).
+- Disable tests because of ongoing TCG problems with newest qemu in Rawhide.
+
+* Thu Jul 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.64-3
+- RHBZ#513249 bug in qemu is now fixed, so try to rebuild and run tests.
+- However RHBZ#503236 still prevents us from testing on i386.
+
+* Thu Jul 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.64-1
+- New upstream release 1.0.64.
+- New tool 'libguestfs-test-tool'.
+
+* Wed Jul 15 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.61-1
+- New upstream release 1.0.61.
+- New tool / subpackage 'virt-cat'.
+- New BR perl-libintl.
+
+* Wed Jul 15 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.60-2
+- Fix runtime Requires so they use epoch correctly.
+
+* Tue Jul 14 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.60-1
+- New upstream release 1.0.60.
+
+* Fri Jul 10 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.58-2
+- New upstream release 1.0.58.
+
+* Fri Jul 10 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.57-1
+- New upstream release 1.0.57.
+- New tool virt-df (obsoletes existing package with this name).
+- RHBZ#507066 may be fixed, so reenable tests.
+
+* Tue Jul  7 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.56-2
+- New upstream release 1.0.56.
+- Don't rerun generator.
+
+* Thu Jul  2 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.55-1
+- New upstream release 1.0.55.
+- New manual page libguestfs(3).
+
+* Mon Jun 29 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.54-2
+- New upstream release 1.0.54.
+- +BR perl-XML-Writer.
+
+* Wed Jun 24 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.53-1
+- New upstream release 1.0.53.
+- Disable all tests (because of RHBZ#507066).
+
+* Wed Jun 24 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.52-1
+- New upstream release 1.0.52.
+
+* Mon Jun 22 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.51-1
+- New upstream release 1.0.51.
+- Removed patches which are now upstream.
+
+* Sat Jun 20 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.49-5
+- Remove workaround for RHBZ#507007, since bug is now fixed.
+- Pull in upstream patch to fix pclose checking
+  (testing as possible fix for RHBZ#507066).
+- Pull in upstream patch to check waitpid return values
+  (testing as possible fix for RHBZ#507066).
+
+* Fri Jun 19 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.49-2
+- New upstream release 1.0.49.
+- Add workaround for RHBZ#507007.
+
+* Tue Jun 16 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.48-2
+- Accidentally omitted the supermin image from previous version.
+
+* Tue Jun 16 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.48-1
+- New upstream release 1.0.48.
+- Should fix all the brokenness from 1.0.47.
+- Requires febootstrap >= 2.3.
+
+* Mon Jun 15 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.47-2
+- New upstream release 1.0.47.
+- Enable experimental supermin appliance build.
+- Fix path to appliance.
+
+* Fri Jun 12 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.45-2
+- New upstream release 1.0.45.
+
+* Wed Jun 10 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.44-2
+- Disable ppc/ppc64 tests again because of RHBZ#505109.
+
+* Wed Jun 10 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.44-1
+- New upstream version 1.0.44.
+- Try enabling tests on ppc & ppc64 since it looks like the bug(s?)
+  in qemu which might have caused them to fail have been fixed.
+
+* Tue Jun  9 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.43-1
+- New upstream version 1.0.43.
+- New upstream URL.
+- Requires chntpw program.
+
+* Sat Jun  6 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.42-1
+- New upstream version 1.0.42.
+
+* Thu Jun  4 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.41-1
+- New upstream version 1.0.41.
+- Fixes a number of regressions in RHBZ#503169.
+
+* Thu Jun  4 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.40-1
+- New upstream version 1.0.40.
+
+* Thu Jun  4 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.39-1
+- New upstream version 1.0.39.
+- Fixes:
+  . libguestfs /dev is too sparse for kernel installation/upgrade (RHBZ#503169)
+  . OCaml bindings build failure (RHBZ#502309)
+
+* Tue Jun  2 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.38-2
+- Disable tests on ix86 because of RHBZ#503236.
+
+* Tue Jun  2 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.38-1
+- New upstream version 1.0.38.
+
+* Fri May 29 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.37-1
+- New upstream version 1.0.37.
+- Fixes:
+  . "mkdir-p" should not throw errors on preexisting directories (RHBZ#503133)
+  . cramfs and squashfs modules should be available in libguestfs appliances
+      (RHBZ#503135)
+
+* Thu May 28 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.36-2
+- New upstream version 1.0.36.
+- Rerun the generator in prep section.
+
+* Thu May 28 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.35-1
+- New upstream version 1.0.35.
+- Fixes multiple bugs in bindings parameters (RHBZ#501892).
+
+* Wed May 27 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.34-1
+- New upstream version 1.0.34.
+
+* Wed May 27 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.33-1
+- New upstream version 1.0.33.
+- --with-java-home option is no longer required.
+- Upstream contains potential fixes for:
+    501878 built-in commands like 'alloc' and 'help' don't autocomplete
+    501883 javadoc messed up in libguestfs java documentation
+    501885 Doesn't detect missing Java, --with-java-home=no should not be needed
+    502533 Polish translation of libguestfs
+    n/a    Allow more ext filesystem kmods (Charles Duffy)
+
+* Tue May 26 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.32-2
+- New upstream version 1.0.32.
+- Use %%find_lang macro.
+
+* Sat May 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.31-1
+- Rebuild for OCaml 3.11.1.
+- New upstream version 1.0.31.
+
+* Thu May 21 2009 Richard Jones <rjones@redhat.com> - 1.0.30-1
+- New upstream version 1.0.30.  Now includes test-bootbootboot.sh script.
+
+* Thu May 21 2009 Richard Jones <rjones@redhat.com> - 1.0.29-3
+- New upstream version 1.0.29 (fixes RHBZ#502007 RHBZ#502018).
+- This should allow us to enable tests for i386 and x86-64.
+- Added test-bootbootboot.sh script which was missed from 1.0.29 tarball.
+- Pass kernel noapic flag to workaround RHBZ#502058.
+
+* Thu May 21 2009 Richard Jones <rjones@redhat.com> - 1.0.28-1
+- New upstream version 1.0.28.  Nothing has visibly changed, but
+  the source has been gettextized and we want to check that doesn't
+  break anything.
+
+* Thu May 21 2009 Richard Jones <rjones@redhat.com> - 1.0.27-3
+- Change requirement from qemu -> qemu-kvm (RHBZ#501761).
+
+* Tue May 19 2009 Richard Jones <rjones@redhat.com> - 1.0.27-2
+- New upstream version 1.0.27.
+
+* Mon May 18 2009 Richard Jones <rjones@redhat.com> - 1.0.26-6
+- Experimentally try to reenable ppc and ppc64 builds.
+- Note BZ numbers which are causing tests to fail.
+
+* Mon May 18 2009 Richard Jones <rjones@redhat.com> - 1.0.26-1
+- New upstream version 1.0.26.
+
+* Tue May 12 2009 Richard Jones <rjones@redhat.com> - 1.0.25-4
+- New upstream version 1.0.25.
+- Enable debugging when running the tests.
+- Disable tests - don't work correctly in Koji.
+
+* Tue May 12 2009 Richard Jones <rjones@redhat.com> - 1.0.24-1
+- New upstream version 1.0.24.
+- BRs glibc-static for the new command tests.
+- Enable tests.
+
+* Mon May 11 2009 Richard Jones <rjones@redhat.com> - 1.0.23-2
+- New upstream version 1.0.23.
+- Don't try to use updates during build.
+
+* Fri May  8 2009 Richard Jones <rjones@redhat.com> - 1.0.21-3
+- New upstream version 1.0.21.
+
+* Thu May  7 2009 Richard Jones <rjones@redhat.com> - 1.0.20-2
+- New upstream version 1.0.20.
+
+* Thu May  7 2009 Richard Jones <rjones@redhat.com> - 1.0.19-1
+- New upstream version 1.0.19.
+
+* Tue Apr 28 2009 Richard Jones <rjones@redhat.com> - 1.0.15-1
+- New upstream version 1.0.15.
+
+* Fri Apr 24 2009 Richard Jones <rjones@redhat.com> - 1.0.12-1
+- New upstream version 1.0.12.
+
+* Wed Apr 22 2009 Richard Jones <rjones@redhat.com> - 1.0.6-1
+- New upstream version 1.0.6.
+
+* Mon Apr 20 2009 Richard Jones <rjones@redhat.com> - 1.0.2-1
+- New upstream version 1.0.2.
+
+* Thu Apr 16 2009 Richard Jones <rjones@redhat.com> - 0.9.9-12
+- Multiple fixes to get it to scratch build in Koji.
+
+* Sat Apr  4 2009 Richard Jones <rjones@redhat.com> - 0.9.9-1
+- Initial build.