Blame SOURCES/repackReproduciblePolycies.sh

404409
#!/bin/sh
404409
# https://bugzilla.redhat.com/show_bug.cgi?id=1142153
404409
M=META-INF/MANIFEST.MF
404409
#P=/usr/lib/jvm/java/jre/lib/security
404409
P=$1/lib/security
404409
for f in local_policy.jar US_export_policy.jar ; do
404409
ORIG=$P/$f
404409
echo "processing $f ($ORIG)"
404409
if [ ! -f  $ORIG ]; then
404409
  echo "File not found! $ORIG"
404409
  continue
404409
fi
404409
d=`mktemp -d`
404409
NW=$d/$f
404409
  pushd $d
404409
    jar  xf   $ORIG
404409
    cat $M
404409
#    sed -i "s/Created-By.*/Created-By: 1.7.0/g"  $M
404409
    sed -i "s/Created-By.*/Created-By: $2/g"  $M
404409
    cat $M
404409
    find . -exec touch -t 201401010000 {} +
404409
    zip -rX  $f *
404409
  popd
404409
  echo "replacing  $ORIG"
404409
  touch -t 201401010000 $ORIG
404409
  md5sum    $ORIG
404409
  sha256sum $ORIG
404409
  echo "by $NW"
404409
  md5sum    $NW
404409
  sha256sum $NW
404409
  touch -t 201401010000 $NW
404409
  cp $NW $ORIG
404409
  md5sum    $ORIG
404409
  sha256sum $ORIG
404409
  touch -t 201401010000 $ORIG
404409
  rm -rfv $d
404409
done