From be607b55f40dd7cd94cb656198ccc206d519fbcf Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Jan 24 2014 22:35:48 +0000 Subject: Java jars need the MANIFEST.MF file to be first in the archive https://bugzilla.redhat.com/show_bug.cgi?id=465664 --- 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