texlive/texlive-2007-badscript.patch
Jindrich Novy 860dd420bd - texlive-context requires texlive-texmf-context (#455163)
- fix lacheck to not to segfault (#451513)
- rediff some patchesto be applicable with zero fuzz
2008-08-27 13:45:49 +00:00

161 lines
5.7 KiB
Diff

diff -up texlive-2007/texk/dviljk/dvihp.badscript texlive-2007/texk/dviljk/dvihp
--- texlive-2007/texk/dviljk/dvihp.badscript 2006-01-17 22:41:51.000000000 +0100
+++ texlive-2007/texk/dviljk/dvihp 2008-08-27 13:30:02.000000000 +0200
@@ -7,9 +7,7 @@
: ${SPOOL=lpr} # used to print an LJ file
: ${TMPDIR=${TEMP-${TMP-/tmp}}} # for the dvicopy output
-tmpdir="${TMPDIR}"/dvihp$$
-(umask 077; mkdir "$tmpdir") \
- || { echo "cannot create directory \`$tmpdir'."; exit 1; }
+tmpdir=`mktemp -d ${TMPDIR}/dvihp.XXXXXX` || { echo "cannot create secure temporary directory."; exit 1; }
trap '
cd "${TMPDIR}"
diff -up texlive-2007/texk/dvipdfm/dvipdft.badscript texlive-2007/texk/dvipdfm/dvipdft
--- texlive-2007/texk/dvipdfm/dvipdft.badscript 2006-01-17 22:41:51.000000000 +0100
+++ texlive-2007/texk/dvipdfm/dvipdft 2008-08-27 13:30:02.000000000 +0200
@@ -31,7 +31,7 @@ help="Usage: $progname [options] dvifile
$progname --help
$progname --version"
-tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$
+tmpdir=`mktemp -d ${TMP-/tmp}/$progname.XXXXXX`
quoteit()
{
diff -up texlive-2007/texk/tetex/allcm.badscript texlive-2007/texk/tetex/allcm
--- texlive-2007/texk/tetex/allcm.badscript 2006-01-17 22:41:51.000000000 +0100
+++ texlive-2007/texk/tetex/allcm 2008-08-27 13:30:02.000000000 +0200
@@ -14,7 +14,7 @@ unset RUNNING_BSH
test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
progname=`basename $0`
-tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$
+tmpdir=`mktemp -d ${TMP-/tmp}/$progname.XXXXXX`
case "$progname" in
allec)
@@ -81,11 +81,6 @@ trap '
exit 1
' 1 2 3 7 13 15
-(umask 077; mkdir "$tmpdir") || {
- echo "$progname: failed to create temp directory." >&2
- exit 1
-}
-
cd $tmpdir || exit 1
echo >&2
echo "---------------------------------------------------------------------" >&2
diff -up texlive-2007/texk/tetex/fmtutil.badscript texlive-2007/texk/tetex/fmtutil
--- texlive-2007/texk/tetex/fmtutil.badscript 2007-01-14 18:46:37.000000000 +0100
+++ texlive-2007/texk/tetex/fmtutil 2008-08-27 13:30:02.000000000 +0200
@@ -112,8 +112,6 @@ setupTmpDir()
trap 'cleanup 1' 1 2 3 7 13 15
needsCleanup=true
- (umask 077; mkdir "$tmpdir") \
- || abort "could not create directory \`$tmpdir'"
}
###############################################################################
@@ -360,7 +358,7 @@ main()
need_find_hyphenfile=false
cfgparam=
cfgmaint=
- tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$
+ tmpdir=`mktemp -d ${TMP-/tmp}/$progname.XXXXXX`
verboseFlag=true
# mktexfmtMode: if called as mktexfmt, set to true. Will echo the
diff -up texlive-2007/texk/tetex/texconfig.badscript texlive-2007/texk/tetex/texconfig
--- texlive-2007/texk/tetex/texconfig.badscript 2007-01-16 01:33:36.000000000 +0100
+++ texlive-2007/texk/tetex/texconfig 2008-08-27 13:30:02.000000000 +0200
@@ -37,7 +37,7 @@ envVars="
TEXMFDBS TEXMFINI TEXMFSCRIPTS TEXPICTS TEXPKS TEXPOOL TEXPSHEADERS
TEXSOURCES TFMFONTS TRFONTS TTFONTS VFFONTS WEB2C WEBINPUTS
"
-tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/tctmp.$$
+tmpdir=`mktemp -d "${TMP-/tmp}/$progname.XXXXXX"` || exit 1
needsCleanup=false
lastUpdatedFile=
@@ -216,8 +216,6 @@ setupTmpDir()
trap 'cleanup 1' 1 2 3 7 13 15
needsCleanup=true
- (umask 077; mkdir "$tmpdir") \
- || abort "could not create directory \`$tmpdir'"
}
###############################################################################
diff -up texlive-2007/texk/tetex/texlinks.badscript texlive-2007/texk/tetex/texlinks
--- texlive-2007/texk/tetex/texlinks.badscript 2007-01-17 17:31:31.000000000 +0100
+++ texlive-2007/texk/tetex/texlinks 2008-08-27 13:30:02.000000000 +0200
@@ -100,8 +100,6 @@ setupTmpDir()
trap 'cleanup 1' 1 2 3 7 13 15
needsCleanup=true
- (umask 077; mkdir "$tmpdir") \
- || abort "could not create directory \`$tmpdir'"
}
@@ -199,7 +197,7 @@ search_symlinkdir()
upd_symlinkdir()
{
search_symlinkdir || return 0
- for i in `sed 's@ .*@@' cnf_file_ln.$$`; do
+ for i in `sed 's@ .*@@' $tmpdir/cnf_file_ln`; do
install_link "$selfautoloc/$i" "$symlinkdir/$i"
done
}
@@ -243,12 +241,12 @@ main()
test -f "$cnf_file" || abort "config file \`$cnf' not found"
- tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/texlinks.$$
+ tmpdir=`mktemp -d ${TMP-/tmp}/$progname.XXXXXX` || exit 1
setupTmpDir
cd "$tmpdir" || cleanup 1
sed '/^[ ]*#/d; /^[ ]*$/d' $cnf_file \
- | awk '{print $1, $2}' > cnf_file_ln.$$
+ | awk '{print $1, $2}' > $tmpdir/cnf_file_ln
if test -z "$dirs"; then
if test $multiplatform = true; then
@@ -266,8 +264,8 @@ main()
for d in $dirs; do
kpseaccess -w $d \
|| { errmsg "$d: no write permissions. Skipping..."; continue; }
- # cnf_file_ln.$$ has lines with "format engine" pairs
- set x `cat cnf_file_ln.$$`; shift
+ # $tmpdir/cnf_file_ln has lines with "format engine" pairs
+ set x `cat $tmpdir/cnf_file_ln`; shift
while test $# != 0; do
fmt=$1; engine=$2; shift; shift
diff -up texlive-2007/texk/tetex/updmap.badscript texlive-2007/texk/tetex/updmap
--- texlive-2007/texk/tetex/updmap.badscript 2006-12-25 19:43:31.000000000 +0100
+++ texlive-2007/texk/tetex/updmap 2008-08-27 13:30:02.000000000 +0200
@@ -769,7 +769,6 @@ setupTmpDir()
trap 'cleanup 1' 1 2 3 7 13 15
needsCleanup=true
- mkdir "$tmpdir" || abort "could not create directory \`$tmpdir'"
}
###############################################################################
@@ -1299,7 +1298,8 @@ main()
dvipsoutputdir=; pdftexoutputdir=; dvipdfmoutputdir=
: ${TEXMFMAIN=`kpsewhich -var-value=TEXMFMAIN`}
- tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$
+ tmpdir=`mktemp -d ${TMP-/tmp}/$progname.XXXXXX` || \
+ abort "could not create directory"
tmp1=$tmpdir/a
tmp2=$tmpdir/b
tmp3=$tmpdir/c