Commit 0a88a5c3 authored by boklm's avatar boklm Committed by Georg Koppen
Browse files

Bug 18845: generate reproducible archives without relying on libfaketime

parent e785c29e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -11,6 +11,9 @@ shift
find $@ -executable -exec chmod 750 {} \;
find $@ ! -executable -exec chmod 640 {} \;

[ -n "$REFERENCE_DATETIME" ] && \
        find $@ -exec touch --date="$REFERENCE_DATETIME" {} \;

cd $@
find . -type f | sed -e 's/^\.\///' | sort | xargs -i echo "{}={}" > ~/build/filelist.txt
find . -type l | sed -e 's/^\.\///' | sort | xargs -i echo "{}={}" >> ~/build/filelist.txt
+3 −0
Original line number Diff line number Diff line
@@ -5,6 +5,9 @@ export LC_ALL=C
TARFILE=$1
shift

[ -n "$REFERENCE_DATETIME" ] && \
	find $@ -exec touch --date="$REFERENCE_DATETIME" {} \;

# No need to execute chmod on (possibly) dangling symlinks.
find $@ ! -type l -executable -exec chmod 700 {} \;
find $@ ! -type l ! -executable -exec chmod 600 {} \;
+3 −0
Original line number Diff line number Diff line
@@ -5,6 +5,9 @@ export LC_ALL=C
ZIPFILE=$1
shift

[ -n "$REFERENCE_DATETIME" ] && \
	find $@ -exec touch --date="$REFERENCE_DATETIME" {} \;

find $@ -executable -exec chmod 700 {} \;
find $@ ! -executable -exec chmod 600 {} \;

+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@ ZIPFILE=`basename $1`
mkdir tmp_dzip
cd tmp_dzip
unzip ../$1
[ -n "$REFERENCE_DATETIME" ] && \
	find . -exec touch --date="$REFERENCE_DATETIME" {} \;
find . -executable -exec chmod 700 {} \;
find . ! -executable -exec chmod 600 {} \;
find . | sort | zip $ZIPOPTS -X -@ $ZIPFILE