source: trunk/dports/tex/pTeX/files/patch-2extract-src.sh.diff @ 71968

Last change on this file since 71968 was 71968, checked in by takanori@…, 9 years ago

pTeX: fixes CVE-2010-0829 (array index error in dvipng/set.c), CVE-2010-1440 (integer overflow in dvipsk/dospecial.c)

File size: 4.2 KB
RevLine 
[53401]1--- ./2extract-src.sh.orig      2008-06-16 13:50:47.000000000 +0900
[63931]2+++ ./2extract-src.sh   2010-02-18 22:41:43.000000000 +0900
[50428]3@@ -14,7 +14,6 @@
4 fi
[47284]5 
[50428]6 PTEXENC=$SRC/texk/ptexenc/patches
7-GSNOEMBED="-dNOKANJI -c '.setpdfwrite << /NeverEmbed [/Courier /Courier-Bold /Courier-Oblique /Courier-BoldOblique /Helvetica /Helvetica-Bold /Helvetica-Oblique /Helvetica-BoldOblique /Times-Roman /Times-Bold /Times-Italic /Times-BoldItalic /Symbol /ZapfDingbats /Ryumin-Light /GothicBBB-Medium] >> setdistillerparams'"
[47284]8 
[50428]9 ## start
10 test -z "$TEXSRC_EXTRACTED" \
11@@ -46,11 +45,6 @@
12     || perlprint 's/LRa/LRat/' $SRC/texk/kpathsea/mktexlsr
13 rm $PTETEX_TMP
14 
15-# epstopdf no embed fonts
16-perlprint "s/OutputFilename -/OutputFilename \\\$GSNOEMBED -/;
17-       print \"### no embed fonts\nmy \\\$GSNOEMBED=\\\"$GSNOEMBED\\\";\n\n\"
18-       if /option BoundingBox types/" \
19-    $SRC/texk/tetex/epstopdf
20 # add --nostop option: don't stop even if a map file is not found
21 cpatch archive/updmap-nostop.patch     0 $SRC/texk/tetex
22 # ebb patch (+ArtBox)
[67935]23@@ -99,6 +93,11 @@
[53401]24 tarx archive/ptex-src-3.1.10.tar.gz $SRC/texk/web2c
25 mv $SRC/texk/web2c/ptex-src-* $SRC/texk/web2c/ptex || exit
26 cpatch $PTEXENC/ptex-src-3.1.10-ptexenc.patch     1 $SRC/texk/web2c/ptex
27+cpatch archive/ptex-src-3.1.10-forum327.patch     0 $SRC/texk/web2c/ptex
[67935]28+cpatch archive/ptex-src-3.1.10-forum407.patch     0 $SRC/texk/web2c/ptex
29+cpatch archive/ptex-src-3.1.10-forum416.patch     0 $SRC/texk/web2c/ptex
30+cpatch archive/ptex-src-3.1.10-forum422.patch     0 $SRC/texk/web2c/ptex
31+cpatch archive/ptex-src-3.1.10-forum431.patch     0 $SRC/texk/web2c/ptex
[53401]32 # comment out TEXINPUTS.platex (not to be erased by mkconf)
33 perlprint 's/^(TEXINPUTS.platex)/% \1/g' $SRC/texk/kpathsea/texmf.in
34 # rewrite 'platex2e_inputs' macro
35@@ -133,12 +128,10 @@
[50428]36 cpatch $PTEXENC/makejvf-1.1a-ptexenc.patch 1 $SRC/texk/makejvf
37 
38 ## for dvipdfmx
39-tarx archive/dvipdfmx-20070409.tar.gz $SRC/texk
[65644]40+tarx archive/dvipdfmx-20100328.tar.gz $SRC/texk
[50428]41 mv $SRC/texk/dvipdfmx-* $SRC/texk/dvipdfmx || exit
42-perlprint "s/ cid-x.map\$/ kanjix.map/g;
43-       s|^%(D  \"gs .*%o) (%i .*\")|\1 $GSNOEMBED -f \2|" \
44-    $SRC/texk/dvipdfmx/data/config/dvipdfmx.cfg
45-$RM $SRC/texk/dvipdfmx/data/config/cid-x.map
46+perlprint "s/ cid-x.map\$/ kanjix.map/g" $SRC/texk/dvipdfmx/data/dvipdfmx.cfg
47+$RM $SRC/texk/dvipdfmx/data/cid-x.map
48 perlnoprint "print unless /cid-x/" $SRC/texk/dvipdfmx/data/Makefile.in
49 
50 
[53401]51@@ -152,8 +145,8 @@
[50428]52 #tarx archive/dvipsk-jpatch-p1.7a.tar.gz          $SRC/texk/${P}dvipsk
53 #cpatch $SRC/texk/${P}dvipsk/dvipsk-p1.7a.patch 1 $SRC/texk/${P}dvipsk
54 $CP $SRC/texk/${P}dvipsk/Makefile.in $SRC/texk/${P}dvipsk/Makefile.in.tetex
55-tarx archive/dvipsk-5.96-p1.7b.tar.gz                $SRC/texk/${P}dvipsk
56-cpatch $SRC/texk/${P}dvipsk/dvipsk-5.96-p1.7b.diff 1 $SRC/texk/${P}dvipsk
[50820]57+tarx archive/dvipsk-5.97-p1.7b-20090509.tar.gz       $SRC/texk/${P}dvipsk
[50428]58+cpatch $SRC/texk/${P}dvipsk/dvipsk-5.97-p1.7b.diff 1 $SRC/texk/${P}dvipsk
59 ## disable installing 'config.ps'
60 $CP $SRC/texk/${P}dvipsk/Makefile.in       $SRC/texk/${P}dvipsk/Makefile.in.jp
61 $CP $SRC/texk/${P}dvipsk/Makefile.in.tetex $SRC/texk/${P}dvipsk/Makefile.in
[71968]62@@ -255,6 +248,13 @@
[63931]63 # Fix xpdf integer overflow CVE-2007-3387 (impoted from tetex-3.0-35.fc6)
64 cpatch security/tetex-3.0-CVE-2007-3387.patch      1 $SRC
[50428]65 
[63931]66+cpatch security/bibtex-CVE-2009-1284.diff          1 $SRC
67+cpatch security/jbibtex-CVE-2009-1284.diff         1 $SRC
[71968]68+#cpatch security/dvipsk-CVE-2010-0739.diff         1 $SRC
[65573]69+cpatch security/dvipsk-CVE-2010-0827.diff          1 $SRC
[71968]70+cpatch security/dvipsk-CVE-2010-1440.diff          1 $SRC
71+cpatch security/dvipng-CVE-2010-0829.diff          1 $SRC
[63931]72+
73 #exit # uncomment if 'mktemp' command doesn't exist
74 # Don't use PID for temporary file names in scripts. (impoted from FC4)
75 cpatch security/tetex-3.0-badscript.patch          1 $SRC
[67935]76@@ -263,7 +258,13 @@
[50428]77 
[63931]78 
[47284]79 ## check
80-cat md5sum/texsrc.$JAPANESE | (cd $SRC; md5check) && exit
81+if cat md5sum/texsrc.$JAPANESE | (cd $SRC; md5check); then
82+    cpatch archive/dvipng-tiger-#18254.diff        1 $SRC
83+    cpatch archive/xdvik-tiger-#18254.diff         1 $SRC
[67935]84+    cpatch archive/xdvi-jisb.diff                  1 $SRC
[65644]85+    cpatch archive/dvipdfm-png14.diff              1 $SRC
[47284]86+    exit
87+fi
88 cat <<EOF
89 
90 $0: Some processes were performed improperly.
Note: See TracBrowser for help on using the repository browser.