diff options
Diffstat (limited to 'app-arch/gzip/files/gzip-1.3.5-debian.patch')
-rw-r--r-- | app-arch/gzip/files/gzip-1.3.5-debian.patch | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/app-arch/gzip/files/gzip-1.3.5-debian.patch b/app-arch/gzip/files/gzip-1.3.5-debian.patch new file mode 100644 index 000000000000..0e4908f1e1e7 --- /dev/null +++ b/app-arch/gzip/files/gzip-1.3.5-debian.patch @@ -0,0 +1,121 @@ +Hunks ripped from Debian's patchset. + +--- gzip-1.3.5.orig/gzexe.in ++++ gzip-1.3.5/gzexe.in +@@ -42,8 +42,10 @@ + exit 1 + fi + ++set -C + tmp=gz$$ +-trap "rm -f $tmp; exit 1" 1 2 3 5 10 13 15 ++trap "rm -f $tmp; exit 1" HUP INT QUIT TRAP USR1 PIPE TERM ++: > $tmp || exit 1 + + decomp=0 + res=0 +@@ -53,8 +55,8 @@ + shift + fi + +-echo hi > zfoo1$$ +-echo hi > zfoo2$$ ++echo hi > zfoo1$$ || exit 1 ++echo hi > zfoo2$$ || exit 1 + if test -z "`(${CPMOD-cpmod} zfoo1$$ zfoo2$$) 2>&1`"; then + cpmod=${CPMOD-cpmod} + fi +@@ -110,26 +112,28 @@ + writable=0 + chmod u+w $tmp 2>/dev/null + fi ++ : >| $tmp # truncate the file, ignoring set -C + fi + if test $decomp -eq 0; then +- sed 1q $0 > $tmp ++ sed 1q $0 >> $tmp + sed "s|^if tail|if $tail|" >> $tmp <<'EOF' +-skip=22 ++skip=23 + set -C + umask=`umask` + umask 77 +-if tail +$skip "$0" | "BINDIR"/gzip -cd > /tmp/gztmp$$; then ++tmpfile=`tempfile -p gztmp -d /tmp` || exit 1 ++if tail +$skip "$0" | /bin/gzip -cd >> $tmpfile; then + umask $umask +- /bin/chmod 700 /tmp/gztmp$$ ++ /bin/chmod 700 $tmpfile + prog="`echo $0 | /bin/sed 's|^.*/||'`" +- if /bin/ln /tmp/gztmp$$ "/tmp/$prog" 2>/dev/null; then +- trap '/bin/rm -f /tmp/gztmp$$ "/tmp/$prog"; exit $res' 0 +- (/bin/sleep 5; /bin/rm -f /tmp/gztmp$$ "/tmp/$prog") 2>/dev/null & ++ if /bin/ln $tmpfile "/tmp/$prog" 2>/dev/null; then ++ trap '/bin/rm -f $tmpfile "/tmp/$prog"; exit $res' 0 ++ (/bin/sleep 5; /bin/rm -f $tmpfile "/tmp/$prog") 2>/dev/null & + /tmp/"$prog" ${1+"$@"}; res=$? + else +- trap '/bin/rm -f /tmp/gztmp$$; exit $res' 0 +- (/bin/sleep 5; /bin/rm -f /tmp/gztmp$$) 2>/dev/null & +- /tmp/gztmp$$ ${1+"$@"}; res=$? ++ trap '/bin/rm -f $tmpfile; exit $res' 0 ++ (/bin/sleep 5; /bin/rm -f $tmpfile) 2>/dev/null & ++ $tmpfile ${1+"$@"}; res=$? + fi + else + echo Cannot decompress $0; exit 1 +@@ -144,8 +148,8 @@ + + else + # decompression +- skip=22 +- if sed -e 1d -e 2q "$i" | grep "^skip=[0-9][0-9]*$" >/dev/null; then ++ skip=23 ++ if sed -e 1d -e 2q "$i" | grep "^skip=[0-9]*$" >/dev/null; then + eval `sed -e 1d -e 2q "$i"` + fi + if tail +$skip "$i" | gzip -cd > $tmp; then +--- gzip-1.3.5.orig/zmore.in ++++ gzip-1.3.5/zmore.in +@@ -34,16 +34,16 @@ + cb='min 1 -icanon'; ncb='icanon eof ^d' + fi + if test $? -eq 0 && test -n "$oldtty"; then +- trap 'stty $oldtty 2>/dev/null; exit' 0 2 3 5 10 13 15 ++ trap 'stty $oldtty 2>/dev/null; exit' INT QUIT TRAP USR1 PIPE TERM + else +- trap 'stty $ncb echo 2>/dev/null; exit' 0 2 3 5 10 13 15 ++ trap 'stty $ncb echo 2>/dev/null; exit' INT QUIT TRAP USR1 PIPE TERM + fi + + if test $# = 0; then + if test -t 0; then + echo usage: ${ZMORE_PROGRAM_NAME-zmore} files... + else +- gzip -cdfq | eval ${PAGER-more} ++ gzip -cdfq | eval more + fi + else + FIRST=1 +@@ -62,7 +62,7 @@ + fi + if test "$ANS" != 's'; then + echo "------> $FILE <------" +- gzip -cdfq "$FILE" | eval ${PAGER-more} ++ gzip -cdfq "$FILE" | more + fi + if test -t 1; then + FIRST=0 +--- gzip-1.3.5.orig/znew.in ++++ gzip-1.3.5/znew.in +@@ -16,8 +16,8 @@ + warn="(does not preserve modes and timestamp)" + tmp=/tmp/zfoo.$$ + set -C +-echo hi > $tmp.1 +-echo hi > $tmp.2 ++echo hi > $tmp.1 || exit 1 ++echo hi > $tmp.2 || exit 1 + if test -z "`(${CPMOD-cpmod} $tmp.1 $tmp.2) 2>&1`"; then + cpmod=${CPMOD-cpmod} + warn="" |