diff --git a/makeself.sh b/makeself.sh index a2d37ef..3b49aad 100755 --- a/makeself.sh +++ b/makeself.sh @@ -499,7 +499,10 @@ fi case $COMPRESS in gzip) - GZIP_CMD="gzip -c$COMPRESS_LEVEL" + # --no-name: omit the filename/timestamp from the gzip member + # header. Without it, the compressed output differ on every run even + # when the input is byte-for-byte identical. + GZIP_CMD="gzip --no-name -c$COMPRESS_LEVEL" GUNZIP_CMD="gzip -cd" ;; pigz) diff --git a/test/datetest b/test/datetest index 8a83f2a..9c6f5df 100644 --- a/test/datetest +++ b/test/datetest @@ -94,10 +94,9 @@ testByteforbyte() { date='Sat Mar 3 19:35:21 EST 2016' - # bsdtar does not have option --mtime - # TODO: unstable test: first second differ: char 242, line 10 - - startSkipping + # GNU tar supports --tar-extra's --mtime option used below. + # bsdtar (Mac/BSD) does not. + tar --version 2>/dev/null | grep -q GNU || startSkipping # Exercise ${SUT} --packaging-date "${date}" --tar-extra "--mtime 20160303" \