[supermin/f20] Add patch to fix quoting around mke2fs parameter (RHBZ#1084960).

Richard W.M. Jones rjones at fedoraproject.org
Mon Apr 7 11:54:00 UTC 2014


commit 2dbabc61156ff0d691bd28f4cd6f2156eaf60dba
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Mon Apr 7 12:48:57 2014 +0100

    Add patch to fix quoting around mke2fs parameter (RHBZ#1084960).
    
    (cherry picked from commit 31ad952dcf0e14a0d6e70772cfc7e70bf574c505)

 ...-around-parameter-when-calling-external-m.patch |   37 ++++++++++++++++++++
 supermin.spec                                      |    9 ++++-
 2 files changed, 45 insertions(+), 1 deletions(-)
---
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" <rjones at redhat.com>
+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 2365fed..84b1a9b 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 <rjones at redhat.com> - 5.1.7-2
+- Add patch to fix quoting around mke2fs parameter (RHBZ#1084960).
+
 * Sun Apr  6 2014 Richard W.M. Jones <rjones at redhat.com> - 5.1.7-1
 - New upstream version 5.1.7.
 - Remove ppc64p7 patch which is now upstream.


More information about the scm-commits mailing list