From 31ad952dcf0e14a0d6e70772cfc7e70bf574c505 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 7 Apr 2014 12:48:57 +0100 Subject: [PATCH] Add patch to fix quoting around mke2fs parameter (RHBZ#1084960). --- ...nd-parameter-when-calling-external-m.patch | 37 +++++++++++++++++++ supermin.spec | 9 ++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 0001-Add-quoting-around-parameter-when-calling-external-m.patch diff --git a/0001-Add-quoting-around-parameter-when-calling-external-m.patch b/0001-Add-quoting-around-parameter-when-calling-external-m.patch new file mode 100644 index 0000000..749cf99 --- /dev/null +++ b/0001-Add-quoting-around-parameter-when-calling-external-m.patch @@ -0,0 +1,37 @@ +From ae88217aa64f1924ff88941d2ad0ce1aa6ad7fc4 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 7 Apr 2014 12:44:09 +0100 +Subject: [PATCH] Add quoting around parameter when calling external mke2fs + (RHBZ#1084921). + +If you tried to write the appliance to a path containing a space, it +would fail like this: + +supermin: ext2: creating empty ext2 filesystem '/media/bigon/Little disk/.guestfs-1000/appliance.d.p4ovrvj6/root' +mke2fs: invalid blocks 'disk/.guestfs-1000/appliance.d.p4ovrvj6/root' on device '/media/bigon/Little' + +This is because there was missing quoting around the parameter passed +to mke2fs. + +Thanks: Laurent Bigonville +https://bugzilla.redhat.com/show_bug.cgi?id=1084921 +--- + src/ext2.ml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ext2.ml b/src/ext2.ml +index c9c8933..bccf3a7 100644 +--- a/src/ext2.ml ++++ b/src/ext2.ml +@@ -49,7 +49,7 @@ let build_ext2 debug basedir files modpath kernel_version appliance = + sprintf "%s %s ext2 -F%s %s" + Config.mke2fs Config.mke2fs_t_option + (if debug >= 2 then "" else "q") +- appliance in ++ (quote appliance) in + run_command cmd; + + let fs = ext2fs_open appliance in +-- +1.8.5.3 + diff --git a/supermin.spec b/supermin.spec index 1bafcd1..ab6583c 100644 --- a/supermin.spec +++ b/supermin.spec @@ -1,7 +1,7 @@ Summary: Tool for creating supermin appliances Name: supermin Version: 5.1.7 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ %if 0%{?rhel} >= 7 @@ -11,6 +11,8 @@ ExclusiveArch: x86_64 URL: http://people.redhat.com/~rjones/supermin/ Source0: http://libguestfs.org/download/supermin/%{name}-%{version}.tar.gz +Patch1: 0001-Add-quoting-around-parameter-when-calling-external-m.patch + BuildRequires: /usr/bin/pod2man BuildRequires: rpm BuildRequires: yum-utils @@ -52,6 +54,8 @@ second when you need to boot one of them. %prep %setup -q +%patch1 -p1 + %build %configure --disable-network-tests @@ -85,6 +89,9 @@ make check || { %changelog +* Mon Apr 7 2014 Richard W.M. Jones - 5.1.7-2 +- Add patch to fix quoting around mke2fs parameter (RHBZ#1084960). + * Sun Apr 6 2014 Richard W.M. Jones - 5.1.7-1 - New upstream version 5.1.7. - Remove ppc64p7 patch which is now upstream.