rpms/libguestfs/devel libguestfs-1.0.84-supermin-split-quoting.patch, NONE, 1.1 libguestfs.spec, 1.151, 1.152

Richard W.M. Jones rjones at fedoraproject.org
Mon Mar 1 11:54:11 UTC 2010


Author: rjones

Update of /cvs/pkgs/rpms/libguestfs/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18341

Modified Files:
	libguestfs.spec 
Added Files:
	libguestfs-1.0.84-supermin-split-quoting.patch 
Log Message:
* Mon Mar  1 2010 Richard W.M. Jones <rjones at 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).


libguestfs-1.0.84-supermin-split-quoting.patch:
 supermin-split.sh.in |   26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

--- NEW FILE libguestfs-1.0.84-supermin-split-quoting.patch ---
--- libguestfs-1.0.84.orig/appliance/supermin-split.sh.in	2010-01-28 09:58:20.000000000 +0000
+++ libguestfs-1.0.84.rhbz566512/appliance/supermin-split.sh.in	2010-03-01 11:43:20.647728435 +0000
@@ -51,17 +51,27 @@
     dir=$(dirname "$path")
     file=$(basename "$path")
 
+    # For quoting problems with the bash =~ operator, see bash FAQ
+    # question E14 here http://tiswww.case.edu/php/chet/bash/FAQ and
+    # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487387#25
+    # (RHBZ#566511).
+
     # All we're going to keep are the special files /init, the daemon,
     # configuration files (/etc), devices and modifiable stuff (/var).
     if [ "$path" = "./init" -o "$file" = "guestfsd" ]; then
         echo "$path" >&5
 
-    elif [[ "$path" =~ '^\./etc' || "$path" =~ '^./dev' || "$path" =~ '^\./var' ]]; then
+    elif [[ "$path" =~ ^\./etc || "$path" =~ ^./dev || "$path" =~ ^\./var ]]; then
         echo "$path" >&5
 
     # Kernel modules are always copied in from the host, including all
     # the dependency files.
-    elif [[ "$path" =~ '^\./lib/modules/' ]]; then
+    elif [[ "$path" =~ ^\./lib/modules/ ]]; then
+        :
+
+    # On mock/Koji, exclude bogus /builddir directory which for some
+    # reason contains some yum temporary files (RHBZ#566512).
+    elif [[ "$path" =~ ^\./builddir ]]; then
         :
 
     elif [ -d "$path" ]; then
@@ -71,27 +81,27 @@
 
     # Some libraries need fixed version numbers replaced by wildcards.
 
-    elif [[ "$file" =~ '^ld-[.0-9]+\.so$' ]]; then
+    elif [[ "$file" =~ ^ld-[.0-9]+\.so$ ]]; then
         echo "$dir/ld-*.so" >&6
 
     # Special case for libbfd
-    elif [[ "$file" =~ '^libbfd-.*\.so$' ]]; then
+    elif [[ "$file" =~ ^libbfd-.*\.so$ ]]; then
         echo "$dir/libbfd-*.so" >&6
 
     # Special case for libgcc_s-<gccversion>-<date>.so.N
-    elif [[ "$file" =~ '^libgcc_s-.*\.so\.([0-9]+)$' ]]; then
+    elif [[ "$file" =~ ^libgcc_s-.*\.so\.([0-9]+)$ ]]; then
         echo "$dir/libgcc_s-*.so.${BASH_REMATCH[1]}" >&6
 
     # libfoo-1.2.3.so
-    elif [[ "$file" =~ '^lib(.*)-[-.0-9]+\.so$' ]]; then
+    elif [[ "$file" =~ ^lib(.*)-[-.0-9]+\.so$ ]]; then
         echo "$dir/lib${BASH_REMATCH[1]}-*.so" >&6
 
     # libfoo-1.2.3.so.1.2.3 (but NOT '*.so.N')
-    elif [[ "$file" =~ '^lib(.*)-[-.0-9]+\.so\.([0-9]+)\.' ]]; then
+    elif [[ "$file" =~ ^lib(.*)-[-.0-9]+\.so\.([0-9]+)\. ]]; then
         echo "$dir/lib${BASH_REMATCH[1]}-*.so.${BASH_REMATCH[2]}.*" >&6
 
     # libfoo.so.1.2.3 (but NOT '*.so.N')
-    elif [[ "$file" =~ '^lib(.*)\.so\.([0-9]+)\.' ]]; then
+    elif [[ "$file" =~ ^lib(.*)\.so\.([0-9]+)\. ]]; then
         echo "$dir/lib${BASH_REMATCH[1]}.so.${BASH_REMATCH[2]}.*" >&6
 
     else


Index: libguestfs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libguestfs/devel/libguestfs.spec,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -p -r1.151 -r1.152
--- libguestfs.spec	25 Feb 2010 16:38:21 -0000	1.151
+++ libguestfs.spec	1 Mar 2010 11:54:11 -0000	1.152
@@ -1,3 +1,7 @@
+# If you have trouble building locally ('make local') try adding
+#   %libguestfs_buildnet 1
+# to your ~/.rpmmacros file.
+
 # Enable to build using a network repo
 # Default is disabled
 %if %{defined libguestfs_buildnet}
@@ -38,7 +42,7 @@ Summary:       Access and modify virtual
 Name:          libguestfs
 Epoch:         1
 Version:       1.0.84
-Release:       4%{?dist}
+Release:       6%{?dist}
 License:       LGPLv2+
 Group:         Development/Libraries
 URL:           http://libguestfs.org/
@@ -48,6 +52,11 @@ BuildRoot:     %{_tmppath}/%{name}-%{ver
 # Disable FUSE tests, not supported in Koji at the moment.
 Patch0:        libguestfs-1.0.79-no-fuse-test.patch
 
+# RHBZ#566511 and RHBZ#566512.  Not upstream yet.  Needs to go
+# upstream in both libguestfs and febootstrap once we have done more
+# testing, and worked out if this works with older versions of bash.
+Patch1:        libguestfs-1.0.84-supermin-split-quoting.patch
+
 # Basic build requirements:
 BuildRequires: /usr/bin/pod2man
 BuildRequires: /usr/bin/pod2text
@@ -368,6 +377,7 @@ Requires:      jpackage-utils
 %setup -q
 
 %patch0 -p1
+%patch1 -p1
 
 mkdir -p daemon/m4
 
@@ -651,6 +661,11 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Mon Mar  1 2010 Richard W.M. Jones <rjones at 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 at 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.



More information about the scm-commits mailing list