[redhat-rpm-config] Patch to fix spaces in java jar files
Toshio くらとみ
toshio at fedoraproject.org
Fri Nov 9 21:49:21 UTC 2012
commit 83cfe608da011316bb61c0f19d2b3a356967723a
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date: Fri Nov 9 13:49:08 2012 -0800
Patch to fix spaces in java jar files
https://bugzilla.redhat.com/show_bug.cgi?id=872737
...fig-9.1.0-java-repack-spaces-in-filenames.patch | 64 ++++++++++++++++++++
redhat-rpm-config.spec | 9 +++-
2 files changed, 72 insertions(+), 1 deletions(-)
---
diff --git a/redhat-rpm-config-9.1.0-java-repack-spaces-in-filenames.patch b/redhat-rpm-config-9.1.0-java-repack-spaces-in-filenames.patch
new file mode 100644
index 0000000..44172f3
--- /dev/null
+++ b/redhat-rpm-config-9.1.0-java-repack-spaces-in-filenames.patch
@@ -0,0 +1,64 @@
+Index: redhat-rpm-config-9.1.0/brp-java-repack-jars
+===================================================================
+--- redhat-rpm-config-9.1.0.orig/brp-java-repack-jars
++++ redhat-rpm-config-9.1.0/brp-java-repack-jars
+@@ -25,17 +25,19 @@ if [ ! -z "$JARS" ]; then
+
+ # unpack every jar, set the date of the files and directories and
+ # repack the jar
++ OLD_IFS="$IFS"
++ IFS=$(printf '\n\t')
+ for j in $JARS ; do
+- JARNAME=`basename $j`
+- JTMPDIR=`mktemp -d -p $RPM_BUILD_ROOT/tmp $JARNAME.tmpdir.XXXXXXXXXX` || exit 1
+- JARDIR=`mktemp -d -p $RPM_BUILD_ROOT/tmp $JARNAME.jardir.XXXXXXXXXX` || exit 1
+- TIMEREF=`mktemp -p $RPM_BUILD_ROOT/tmp $JARNAME.timeref.XXXXXXXXXX` || exit 1
++ JARNAME=`basename "$j"`
++ JTMPDIR=`mktemp -d -p $RPM_BUILD_ROOT/tmp "$JARNAME.tmpdir.XXXXXXXXXX"` || exit 1
++ JARDIR=`mktemp -d -p $RPM_BUILD_ROOT/tmp "$JARNAME.jardir.XXXXXXXXXX"` || exit 1
++ TIMEREF=`mktemp -p $RPM_BUILD_ROOT/tmp "$JARNAME.timeref.XXXXXXXXXX"` || exit 1
+
+- pushd $JTMPDIR > /dev/null
+- /usr/bin/unzip -qq -o $j
++ pushd "$JTMPDIR" > /dev/null
++ /usr/bin/unzip -qq -o "$j"
+ find -type d -exec chmod a+rx {} \;
+ find -type f -exec chmod a+r {} \;
+- rm -f $j
++ rm -f "$j"
+
+ # Create the directories first.
+ find -type d | LC_ALL=C sort | while read d; do
+@@ -76,24 +78,25 @@ if [ ! -z "$JARS" ]; then
+ done
+
+ # make the jar
+- pushd $JARDIR > /dev/null
++ pushd "$JARDIR" > /dev/null
+
+ if [ -n "`find -not -name '.'`" ]; then
+ if [ -e META-INF/MANIFEST.MF ]; then
+- /usr/bin/zip -q -X -9 $j META-INF/MANIFEST.MF
++ /usr/bin/zip -q -X -9 "$j" META-INF/MANIFEST.MF
+ fi
+- find * -not -name '.' | LC_ALL=C sort | /usr/bin/zip -u -q -X -9 $j -@
++ find * -not -name '.' | LC_ALL=C sort | /usr/bin/zip -u -q -X -9 "$j" -@
+ else
+ # Put the empty jar back
+- touch $j
++ touch "$j"
+ fi
+ popd > /dev/null
+
+ # Cleanup.
+- rm -rf $JTMPDIR
+- rm -rf $JARDIR
+- rm -f $TIMEREF
++ rm -rf "$JTMPDIR"
++ rm -rf "$JARDIR"
++ rm -f "$TIMEREF"
+ done
++ IFS="$OLD_IFS"
+
+ # remove $RPM_BUILD_ROOT/tmp if we created it
+ if [ $rmtmp -eq 1 ]; then
diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec
index 85463f1..bf58062 100644
--- a/redhat-rpm-config.spec
+++ b/redhat-rpm-config.spec
@@ -1,7 +1,7 @@
Summary: Red Hat specific rpm configuration files
Name: redhat-rpm-config
Version: 9.1.0
-Release: 36%{?dist}
+Release: 37%{?dist}
# No version specified.
License: GPL+
Group: Development/System
@@ -43,6 +43,8 @@ Patch14: redhat-rpm-config-9.1.0-java-repack-order.patch
Patch15: 0001-Drop-un-setting-LANG-and-DISPLAY-in-various-build-st.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=783932
Patch16: redhat-rpm-config-9.1.0-filtering-spaces-in-filename.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=872737
+Patch17: redhat-rpm-config-9.1.0-java-repack-spaces-in-filenames.patch
BuildArch: noarch
Requires: coreutils
Requires: perl-srpm-macros
@@ -73,6 +75,7 @@ Red Hat specific rpm configuration files.
%patch14 -p1
%patch15 -p1
%patch16 -p1
+%patch17 -p1
%build
@@ -94,6 +97,10 @@ rm -rf ${RPM_BUILD_ROOT}
%{_sysconfdir}/rpm/*
%changelog
+* Fri Nov 9 2012 Toshio Kuratomi <toshio at fedoraproject.org> - 9.1.0-37
+- Patch to fix spaces in java jar files
+ https://bugzilla.redhat.com/show_bug.cgi?id=872737
+
* Fri Nov 9 2012 Toshio Kuratomi <toshio at fedoraproject.org> - 9.1.0-36
- Patch to fix spaces in files used in filtering macros
https://bugzilla.redhat.com/show_bug.cgi?id=783932
More information about the scm-commits
mailing list