From be607b55f40dd7cd94cb656198ccc206d519fbcf Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 3 Oct 2012 17:30:10 -0700 Subject: [PATCH] Java jars need the MANIFEST.MF file to be first in the archive https://bugzilla.redhat.com/show_bug.cgi?id=465664 --- brp-java-repack-jars | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/brp-java-repack-jars b/brp-java-repack-jars index ec2b72a..df6935e 100755 --- a/brp-java-repack-jars +++ b/brp-java-repack-jars @@ -79,7 +79,10 @@ if [ ! -z "$JARS" ]; then pushd $JARDIR > /dev/null if [ -n "`find -not -name '.'`" ]; then - find * -not -name '.' | LC_ALL=C sort | /usr/bin/zip -q -X -9 $j -@ + if [ -e META-INF/MANIFEST.MF ]; then + /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 -@ else # Put the empty jar back touch $j