diff options
author | Heinrich Wendel <lanius@gentoo.org> | 2004-10-18 18:11:06 +0000 |
---|---|---|
committer | Heinrich Wendel <lanius@gentoo.org> | 2004-10-18 18:11:06 +0000 |
commit | 00cd25a5032d8c6cc9c402144a24cecd743811f8 (patch) | |
tree | 132202fc7ac6280450a1f40f3a39a8a18ad07049 /app-text/ghostscript | |
parent | repoman: whitespace cleanup (Manifest recommit) (diff) | |
download | gentoo-2-00cd25a5032d8c6cc9c402144a24cecd743811f8.tar.gz gentoo-2-00cd25a5032d8c6cc9c402144a24cecd743811f8.tar.bz2 gentoo-2-00cd25a5032d8c6cc9c402144a24cecd743811f8.zip |
ix insecure tempfile handling in ppc version
Diffstat (limited to 'app-text/ghostscript')
-rw-r--r-- | app-text/ghostscript/ChangeLog | 8 | ||||
-rw-r--r-- | app-text/ghostscript/Manifest | 3 | ||||
-rw-r--r-- | app-text/ghostscript/files/digest-ghostscript-7.05.6-r2 | 3 | ||||
-rw-r--r-- | app-text/ghostscript/files/gs7.05.6-tempfile.patch | 99 | ||||
-rw-r--r-- | app-text/ghostscript/ghostscript-7.05.6-r2.ebuild | 93 |
5 files changed, 205 insertions, 1 deletions
diff --git a/app-text/ghostscript/ChangeLog b/app-text/ghostscript/ChangeLog index ad1d338efaf8..b2474e3dac90 100644 --- a/app-text/ghostscript/ChangeLog +++ b/app-text/ghostscript/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-text/ghostscript # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript/ChangeLog,v 1.83 2004/10/17 04:38:14 hardave Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript/ChangeLog,v 1.84 2004/10/18 18:11:06 lanius Exp $ + +*ghostscript-7.05.6-r2 (18 Oct 2004) + + 18 Oct 2004; Heinrich Wendel <lanius@gentoo.org> + +files/gs7.05.6-tempfile.patch, +ghostscript-7.05.6-r2.ebuild: + fix insecure tempfile handling in ppc version 16 Oct 2004; Hardave Riar <hardave@gentoo.org> ghostscript-7.07.1-r7.ebuild: Stable on mips, bug #66357. diff --git a/app-text/ghostscript/Manifest b/app-text/ghostscript/Manifest index 66a81d31fd2b..bdb849e9ff6e 100644 --- a/app-text/ghostscript/Manifest +++ b/app-text/ghostscript/Manifest @@ -2,6 +2,7 @@ MD5 40cb9de588f9d7b84c71b45be2ff8d69 ghostscript-7.07.1-r5.ebuild 4028 MD5 b69b18ea6f5ebab4245ac00cd33a45c7 ghostscript-7.07.1-r7.ebuild 4003 MD5 2db7df35be7d9e0921a6ab5c72c02f67 ghostscript-7.07.1-r2.ebuild 3295 MD5 4c43a0cacba1f4a15e9578ed603257fd ghostscript-7.05.6.ebuild 2739 +MD5 17c3008bb579caaeeb00124cbe333bd3 ghostscript-7.05.6-r2.ebuild 2827 MD5 6319ff45453f1d6fb8e71caa8f40556a ghostscript-7.07.1-r4.ebuild 4028 MD5 1f0374fe43952ae741d0cf174588a5fb ghostscript-7.07.1-r6.ebuild 4076 MD5 e5f37353cc211a2f71cc8841bb8cc1ba ghostscript-7.07.1-r1.ebuild 3187 @@ -13,6 +14,7 @@ MD5 8c6a3d7e8897b4297ef853dbd89e408b files/gs-fix-gc.patch 5627 MD5 343b6a60e15e35d0c5f825b4f361fd29 files/gs7.05.6-cjk.diff.bz2 3287 MD5 5f1b04ca58928a339b749703e067e2ba files/gs7.05.6-kochi-substitute.patch 3774 MD5 6807c3b6025d5b09e8eb6349769162d1 files/digest-ghostscript-7.05.6-r1 212 +MD5 6807c3b6025d5b09e8eb6349769162d1 files/digest-ghostscript-7.05.6-r2 212 MD5 acda8ddfde1efeaf451cb28a67dcc773 files/gs7.07.1-krgb.patch.gz 5569 MD5 291c8895063b8ecee12b68d45a705ab4 files/gs7.05-gdevhl12.c.bz2 7406 MD5 71a93bd09748f37be38b726b0530e497 files/digest-ghostscript-7.07.1-r1 291 @@ -24,6 +26,7 @@ MD5 b7ca313a24a8adf4c527c0a097354f60 files/digest-ghostscript-7.07.1-r6 212 MD5 b7ca313a24a8adf4c527c0a097354f60 files/digest-ghostscript-7.07.1-r7 212 MD5 370d4bcd16d8acd03190ba84e2f61a41 files/gs7.07.1-ijsdestdir.patch 1418 MD5 c63f6d71a403dbc72265831386b84eb0 files/digest-ghostscript-7.05.6 359 +MD5 f68773ea75d4c7a6d74b5f980121a4b5 files/gs7.05.6-tempfile.patch 2747 MD5 7208aacbb4aa234ce1a6126e8f682c06 files/gs7.07.1-ps2epsi.patch 372 MD5 1d5618d793799f7247d624ced0dea493 files/gs7.07.1-tempfile.patch 3123 MD5 fd34b2b7a029f19eab4ba3f69afe295e files/ghostscript-7.05.6.man.patch 1231 diff --git a/app-text/ghostscript/files/digest-ghostscript-7.05.6-r2 b/app-text/ghostscript/files/digest-ghostscript-7.05.6-r2 new file mode 100644 index 000000000000..641ffce1b288 --- /dev/null +++ b/app-text/ghostscript/files/digest-ghostscript-7.05.6-r2 @@ -0,0 +1,3 @@ +MD5 991cbd7bafc6917a19abf9df3ecad58e espgs-7.05.6-source.tar.bz2 5410541 +MD5 a3bf430a7e21cd82401258a2ec3b8afb adobe-cmaps-200204.tar.gz 4360486 +MD5 2fbae60417d42779f6488ab897dcaaf6 acro5-cmaps-2001.tar.gz 631653 diff --git a/app-text/ghostscript/files/gs7.05.6-tempfile.patch b/app-text/ghostscript/files/gs7.05.6-tempfile.patch new file mode 100644 index 000000000000..918f8b2d9015 --- /dev/null +++ b/app-text/ghostscript/files/gs7.05.6-tempfile.patch @@ -0,0 +1,99 @@ +--- espgs-7.05.6/lib/pj-gs.sh.orig 2004-10-08 18:48:15.125586200 -0400 ++++ espgs-7.05.6/lib/pj-gs.sh 2004-10-08 18:51:29.086099720 -0400 +@@ -241,6 +241,7 @@ + then + /usr/lib/lprcat $Nofilter $Nolabel $file PCL1 $user $dev + else ++ TEMPFILE=`mktemp -t pjXXXXXX` || exit 1 + type=`file $file | sed 's/^[^:]*..//'` + case "$type" in + postscript*) +@@ -251,22 +252,22 @@ + # + # gs -q -sDEVICE=paintjet -r180 -sOutputFile=- -dDISKFONTS -dNOPAUSE - < $file 2>/tmp/sh$$ + +- gs -q -sDEVICE=paintjet -r180 -sOutputFile=/tmp/pj$$ -dDISKFONTS -dNOPAUSE - < $file 1>2 +- cat /tmp/pj$$ +- rm /tmp/pj$$ ++ gs -q -sDEVICE=paintjet -r180 -sOutputFile=$TEMPFILE -dDISKFONTS -dNOPAUSE - < $file 1>2 ++ cat $TEMPFILE ++ rm $TEMPFILE + needff= + ;; +- *) cat "$file" 2>/tmp/sh$$ ++ *) cat "$file" 2>$TEMPFILE + needff=1 + ;; + esac + +- if [ -s /tmp/sh$$ ] ++ if [ -s $TEMPFILE ] + then + # cat /tmp/sh$$ # output any errors +- cat /tmp/sh$$ 1>2 # output any errors ++ cat $TEMPFILE 1>2 # output any errors + fi +- rm -f /tmp/sh$$ ++ rm -f $TEMPFILE + if [ $needff ]; then echo "\014\r\c"; fi + fi + +--- espgs-7.05.6/lib/ps2epsi.orig 2004-10-08 22:16:37.194982760 -0400 ++++ espgs-7.05.6/lib/ps2epsi 2004-10-08 23:03:25.320082856 -0400 +@@ -1,7 +1,8 @@ + #!/bin/sh + # $Id: gs7.05.6-tempfile.patch,v 1.1 2004/10/18 18:11:06 lanius Exp $ + +-tmpfile=/tmp/ps2epsi$$ ++tmpfile=`mktemp -t ps2epsiXXXXXX` || exit 1 ++trap "rm -rf $tmpfile" 0 1 2 3 7 13 15 + + export outfile + +--- espgs-7.05.6/lib/pv.sh.orig 2004-10-08 18:52:13.227389224 -0400 ++++ espgs-7.05.6/lib/pv.sh 2004-10-08 18:53:05.459448744 -0400 +@@ -27,11 +27,12 @@ + # + TEMPDIR=. + PAGE=$1 ++TEMPFILE=`mktemp -t ${FILE}XXXXXX` || exit 1 + shift + FILE=$1 + shift +-trap "rm -rf $TEMPDIR/$FILE.$$.pv" 0 1 2 15 ++trap "rm -rf $TEMPFILE" 0 1 2 15 + #dvips -D$RESOLUTION -p $PAGE -n 1 $FILE $* -o $FILE.$$.pv +-dvips -p $PAGE -n 1 $FILE $* -o $FILE.$$.pv +-gs $FILE.$$.pv ++dvips -p $PAGE -n 1 $FILE $* -o $TEMPFILE ++gs $TEMPFILE + exit 0 +--- espgs-7.05.6/lib/sysvlp.sh.orig 2004-10-08 18:53:10.521679168 -0400 ++++ espgs-7.05.6/lib/sysvlp.sh 2004-10-08 18:54:10.512559168 -0400 +@@ -27,20 +27,23 @@ + # Brother HL-4: switch to HP laserjet II+ emulation + # echo "\033\015H\c" + ++TEMPDIR=`mktemp -td sysvlp.XXXXXX` || exit 1 ++ + i=1 + while [ $i -le $copies ] + do + for file in $files + do + $GSHOME/gs \ +- -sOUTPUTFILE=/tmp/psp$$.%02d \ ++ -sOUTPUTFILE=$TEMPDIR/psp$$.%02d \ + -sDEVICE=$DEVICE \ + $EHANDLER $file \ + < /dev/null >> /usr/tmp/ps_log 2>&1 + +- cat /tmp/psp$$.* 2>> /usr/tmp/ps_log +- rm -f /tmp/psp$$.* ++ cat $TEMPDIR/psp$$.* 2>> /usr/tmp/ps_log ++ rm -f $TEMPDIR/psp$$.* + done + i=`expr $i + 1` + done ++rmdir $TEMPDIR + exit 0 diff --git a/app-text/ghostscript/ghostscript-7.05.6-r2.ebuild b/app-text/ghostscript/ghostscript-7.05.6-r2.ebuild new file mode 100644 index 000000000000..2a29db02d19f --- /dev/null +++ b/app-text/ghostscript/ghostscript-7.05.6-r2.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript/ghostscript-7.05.6-r2.ebuild,v 1.9 2004/10/18 18:11:06 lanius Exp $ + +inherit eutils + +DESCRIPTION="ESP Ghostscript -- an enhanced version of GNU Ghostscript with better printer support" +SRC_URI="ftp://ftp.easysw.com/pub/ghostscript/espgs-${PV}-source.tar.bz2 + cjk? ( ftp://ftp.gyve.org/pub/gs-cjk/adobe-cmaps-200204.tar.gz + ftp://ftp.gyve.org/pub/gs-cjk/acro5-cmaps-2001.tar.gz)" +HOMEPAGE="http://www.easysw.com/" + +SLOT="0" +LICENSE="GPL-2 LGPL-2" +KEYWORDS="~ppc" +IUSE="X cups cjk" + +DEPEND="virtual/libc + >=media-libs/jpeg-6b + >=media-libs/libpng-1.2.1 + >=sys-libs/zlib-1.1.4 + X? ( virtual/x11 ) + cjk? ( <=media-fonts/arphicfonts-0.1-r1 + <=media-fonts/kochi-substitute-20030809-r2 + <=media-fonts/baekmuk-fonts-2.1-r1 ) + cups? ( net-print/cups ) + !virtual/ghostscript + media-fonts/gnu-gs-fonts-std" + +PROVIDE="virtual/ghostscript" + +S=${WORKDIR}/espgs-${PV} + +src_unpack() { + unpack espgs-${PV}-source.tar.bz2 + + # Brother HL-12XX support + cp ${FILESDIR}/gs7.05-gdevhl12.c.bz2 ${S}/src/gdevhl12.c.bz2 || die + bzip2 -df ${S}/src/gdevhl12.c.bz2 || die + mv ${S}/src/Makefile.in ${S}/src/Makefile.in.orig + sed 's#^\(DEVICE_DEVS6=.*\)$#\1 $(DD)hl1240.dev $(DD)hl1250.dev#' \ + ${S}/src/Makefile.in.orig > ${S}/src/Makefile.in || die + +## patch -p0 < ${FILESDIR}/png.diff || die "patch failed" + + use cjk && epatch ${FILESDIR}/gs${PV}-cjk.diff.bz2 + + # man page patch from absinthe@pobox.com (Dylan Carlson) bug #14150 + patch -p0 ${S}/man/gs.1 < ${FILESDIR}/${P}.man.patch || die + + # search path fix + sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/7.05/$(get_libdir):"\ + ${S}/src/Makefile.in || die "sed failed" + sed -i -e 's:$(gsdir)/fonts:/usr/share/fonts/default/ghostscript/:' \ + ${S}/src/Makefile.in || die "sed failed" + + # fix insecure tempfile handling + epatch ${FILESDIR}/gs${PV}-tempfile.patch + +} + +src_compile() { + local myconf + myconf="--with-ijs --with-omni" + + use X && myconf="${myconf} --with-x" \ + || myconf="${myconf} --without-x" + + use cups && myconf="${myconf} --enable-cups --with-gimp-print" \ + || myconf="${myconf} --disable-cups --without-gimp-print" + + econf ${myconf} || die "econf failed" + make || die "make failed" +} + +src_install() { + einstall install_prefix=${D} + + rm -fr ${D}/usr/share/ghostscript/7.05/doc || die + dodoc doc/README doc/COPYING doc/COPYING.LGPL + dohtml doc/*.html doc/*.htm + insinto /usr/share/emacs/site-lisp + doins doc/gsdoc.el || die + + if use cjk ; then + dodir /usr/share/ghostscript/Resource + dodir /usr/share/ghostscript/Resource/Font + dodir /usr/share/ghostscript/Resource/CIDFont + cd ${D}/usr/share/ghostscript/Resource + unpack adobe-cmaps-200204.tar.gz + unpack acro5-cmaps-2001.tar.gz + fi +} |