[arch-commits] Commit in ghostscript/repos (3 files)
Andreas Radke
andyrtr at archlinux.org
Fri Nov 15 09:52:31 UTC 2019
Date: Friday, November 15, 2019 @ 09:52:30
Author: andyrtr
Revision: 368916
archrelease: copy trunk to testing-x86_64
Added:
ghostscript/repos/testing-x86_64/
ghostscript/repos/testing-x86_64/CVE-2019-14869.patch
(from rev 368915, ghostscript/trunk/CVE-2019-14869.patch)
ghostscript/repos/testing-x86_64/PKGBUILD
(from rev 368915, ghostscript/trunk/PKGBUILD)
----------------------+
CVE-2019-14869.patch | 66 ++++++++++++++++++++++++++++++
PKGBUILD | 105 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 171 insertions(+)
Copied: ghostscript/repos/testing-x86_64/CVE-2019-14869.patch (from rev 368915, ghostscript/trunk/CVE-2019-14869.patch)
===================================================================
--- testing-x86_64/CVE-2019-14869.patch (rev 0)
+++ testing-x86_64/CVE-2019-14869.patch 2019-11-15 09:52:30 UTC (rev 368916)
@@ -0,0 +1,66 @@
+From 485904772c5f0aa1140032746e5a0abfc40f4cef Mon Sep 17 00:00:00 2001
+From: Chris Liddell <chris.liddell at artifex.com>
+Date: Tue, 5 Nov 2019 09:45:27 +0000
+Subject: [PATCH] Bug 701841: remove .forceput from /.charkeys
+
+When loading Type 1 or Truetype fonts from disk, we attempt to extend the glyph
+name table to include all identifiable glyph names from the Adobe Glyph List.
+
+In the case of Type 1 fonts, the font itself (almost always) marks the
+CharStrings dictionary as read-only, hence we have to use .forceput for that
+case.
+
+But for Truetype fonts, the CharStrings dictionary is created internally and is
+not read-only until *after* we have fully populated it (including the extended
+glyph names from the AGL), hence there is no need for .forceput, and no need to
+carry the security risk of using it.
+
+Replace with regular put.
+---
+ Resource/Init/gs_ttf.ps | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Resource/Init/gs_ttf.ps b/Resource/Init/gs_ttf.ps
+index 74043d1..6be8fe9 100644
+--- a/Resource/Init/gs_ttf.ps
++++ b/Resource/Init/gs_ttf.ps
+@@ -1304,7 +1304,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef
+ TTFDEBUG { (\n1 setting alias: ) print dup ==only
+ ( to be the same as ) print 2 index //== exec } if
+
+- 7 index 2 index 3 -1 roll exch .forceput
++ 7 index 2 index 3 -1 roll exch put
+ } forall
+ pop pop pop
+ }
+@@ -1322,7 +1322,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef
+ exch pop
+ TTFDEBUG { (\n2 setting alias: ) print 1 index ==only
+ ( to use glyph index: ) print dup //== exec } if
+- 5 index 3 1 roll .forceput
++ 5 index 3 1 roll put
+ //false
+ }
+ {
+@@ -1339,7 +1339,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef
+ { % CharStrings(dict) isunicode(boolean) cmap(dict) RAGL(dict) gname(name) codep(integer) gindex(integer)
+ TTFDEBUG { (\3 nsetting alias: ) print 1 index ==only
+ ( to be index: ) print dup //== exec } if
+- exch pop 5 index 3 1 roll .forceput
++ exch pop 5 index 3 1 roll put
+ }
+ {
+ pop pop
+@@ -1369,7 +1369,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef
+ } ifelse
+ ]
+ TTFDEBUG { (Encoding: ) print dup === flush } if
+-} .bind executeonly odef % hides .forceput
++} .bind odef
+
+ % ---------------- CIDFontType 2 font loading ---------------- %
+
+--
+2.9.1
+
+
Copied: ghostscript/repos/testing-x86_64/PKGBUILD (from rev 368915, ghostscript/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2019-11-15 09:52:30 UTC (rev 368916)
@@ -0,0 +1,105 @@
+# Maintainer: AndyRTR <andyrtr at archlinux.org>
+
+pkgbase=ghostscript
+pkgname=(ghostscript ghostxps ghostpcl)
+pkgver=9.50
+pkgrel=2
+pkgdesc="An interpreter for the PostScript language"
+url="https://www.ghostscript.com/"
+arch=('x86_64')
+license=('AGPL3' 'custom')
+depends=('libxt' 'libcups' 'fontconfig' 'zlib' 'libpng' 'libjpeg' 'jbig2dec'
+ 'libtiff' 'lcms2' 'dbus' 'libpaper' 'ijs' 'openjpeg2' 'libidn')
+makedepends=('gtk3' 'gnutls' 'glu' 'freeglut')
+# https://github.com/ArtifexSoftware/ghostpdl-downloads/releases
+source=(https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${pkgver/./}/ghostpdl-${pkgver}.tar.xz
+ CVE-2019-14869.patch)
+sha512sums=('d6add852f2cb3b2fc7b5d40c42c5d5450f16a057a585f2011b675906b6e3cbf519278e80075459a51c1b78f737146b8a8fe78791a09ca521559f80b41d9ad3eb'
+ '5fdeed2eac83e98c6451070c9142d8e1c836476653b7cf1a6335fca0c2edd1188a967d96499e4278f93385c91c60b4e088540a10d2f83667d585b2651a9bafc8')
+
+prepare() {
+ cd ghostpdl-${pkgver}
+
+ # CVE-2019-14869.patch
+ patch -Np1 -i ../CVE-2019-14869.patch
+
+ # force it to use system-libs
+ rm -r cups/libs expat ijs jbig2dec jpeg lcms2mt libpng openjpeg tiff zlib
+ # using tree freetype because of https://bugs.archlinux.org/task/56849
+ # lcms2mt is the new lcms2 fork aimed to replace lcms2 in a thread safe way
+
+ # http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=40dc5b409c6262b18b4bf5386b5482ead4c511e3
+ # libs link unwanted to libgpdl that isn't installed
+ rm -rf gpdl
+}
+
+build() {
+ cd ghostpdl-${pkgver}
+ ./configure --prefix=/usr \
+ --enable-dynamic \
+ --with-ijs \
+ --with-jbig2dec \
+ --with-x \
+ --with-drivers=ALL \
+ --with-fontpath=/usr/share/fonts/gsfonts \
+ --enable-fontconfig \
+ --enable-freetype \
+ --enable-openjpeg \
+ --without-luratech \
+ --with-system-libtiff \
+ --with-libpaper \
+ --disable-compile-inits #--help # needed for linking with system-zlib
+
+ make so-only
+}
+
+package_ghostscript() {
+ optdepends=('texlive-core: needed for dvipdf'
+ 'gtk3: needed for gsx')
+
+ cd ghostpdl-${pkgver}
+
+ make DESTDIR="${pkgdir}" \
+ CUPSSERVERROOT="${pkgdir}$(cups-config --serverroot)" \
+ CUPSSERVERBIN="${pkgdir}$(cups-config --serverbin)" \
+ soinstall
+ ln -s gsc "${pkgdir}"/usr/bin/gs
+
+ # remove useless broken doc/ symlink - FS#59507
+ rm -f "${pkgdir}"/usr/share/ghostscript/${pkgver}/doc
+
+ # remove unwanted localized manpages
+ rm -r "${pkgdir}"/usr/share/man/de
+
+ install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 LICENSE
+}
+
+package_ghostxps() {
+ pkgdesc="${pkgdesc/PostScript/XPS document}"
+ depends=("ghostscript=${pkgver}-${pkgrel}")
+
+ cd ghostpdl-${pkgver}
+
+ install -Dt "${pkgdir}"/usr/bin sobin/gxpsc
+ ln -s gxpsc "${pkgdir}"/usr/bin/gxps
+
+ install -Dt "${pkgdir}"/usr/lib sobin/libgxps.so.${pkgver%.*}
+ ln -s libgxps.so.${pkgver%.*} "${pkgdir}"/usr/lib/libgxps.so.${pkgver%rc*}
+
+ install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 LICENSE
+}
+
+package_ghostpcl() {
+ pkgdesc="${pkgdesc/PostScript/PCL 6}"
+ depends=("ghostscript=${pkgver}-${pkgrel}")
+
+ cd ghostpdl-${pkgver}
+
+ install -Dt "${pkgdir}"/usr/bin sobin/gpcl6c
+ ln -sf gpcl6c "${pkgdir}"/usr/bin/gpcl6
+
+ install -Dt "${pkgdir}"/usr/lib sobin/libgpcl6.so.${pkgver%.*}
+ ln -s libgpcl6.so.${pkgver%.*} "${pkgdir}"/usr/lib/libgpcl6.so.${pkgver%rc*}
+
+ install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 LICENSE
+}
More information about the arch-commits
mailing list