[arch-commits] Commit in ghostscript/trunk (3 files)

Andreas Radke andyrtr at archlinux.org
Fri Sep 7 15:46:27 UTC 2018


    Date: Friday, September 7, 2018 @ 15:46:27
  Author: andyrtr
Revision: 333828

upgpkg: ghostscript 9.24-5

apply more upstream fixes for various crashes;  FS#59952;FS#59959

Added:
  ghostscript/trunk/0004_Add_the_ICCProfilesDir_to_the_PermitReading_list.patch
  ghostscript/trunk/0005_add_wildcards_to_the_permissions_paths.patch
Modified:
  ghostscript/trunk/PKGBUILD

-------------------------------------------------------------+
 0004_Add_the_ICCProfilesDir_to_the_PermitReading_list.patch |   43 +++++++
 0005_add_wildcards_to_the_permissions_paths.patch           |   55 ++++++++++
 PKGBUILD                                                    |   15 ++
 3 files changed, 110 insertions(+), 3 deletions(-)

Added: 0004_Add_the_ICCProfilesDir_to_the_PermitReading_list.patch
===================================================================
--- 0004_Add_the_ICCProfilesDir_to_the_PermitReading_list.patch	                        (rev 0)
+++ 0004_Add_the_ICCProfilesDir_to_the_PermitReading_list.patch	2018-09-07 15:46:27 UTC (rev 333828)
@@ -0,0 +1,43 @@
+From c8c01f8c4164bc10281d9e8f87cf96314d93104b Mon Sep 17 00:00:00 2001
+From: Chris Liddell <chris.liddell at artifex.com>
+Date: Thu, 6 Sep 2018 14:08:41 +0100
+Subject: [PATCH] Bug 699722: Add the ICCProfilesDir to the PermitReading list
+
+There was also an issue that the string being returned from the graphics
+library was null terminated, and Postscript strings are not (and Ghostscript
+strings are not necessarily). We leave the null termination in place, but
+reduce the length returned by 1.
+---
+ Resource/Init/gs_init.ps | 1 +
+ base/gsicc_manage.c      | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps
+index bc8b795..83918a9 100644
+--- a/Resource/Init/gs_init.ps
++++ b/Resource/Init/gs_init.ps
+@@ -2049,6 +2049,7 @@ readonly def
+           [ currentsystemparams /GenericResourceDir get] (*) .file_name_separator (*)
+             concatstrings concatstrings .generate_dir_list_templates
+         } if
++        currentuserparams /ICCProfilesDir known {currentuserparams /ICCProfilesDir get} if
+       ]
+       /PermitFileWriting [
+           currentuserparams /PermitFileWriting get aload pop
+diff --git a/base/gsicc_manage.c b/base/gsicc_manage.c
+index 69f05c4..ff685e7 100644
+--- a/base/gsicc_manage.c
++++ b/base/gsicc_manage.c
+@@ -2972,7 +2972,7 @@ gs_currenticcdirectory(const gs_gstate * pgs, gs_param_string * pval)
+         pval->persistent = true;
+     } else {
+         pval->data = (const byte *)(lib_ctx->profiledir);
+-        pval->size = lib_ctx->profiledir_len;
++        pval->size = lib_ctx->profiledir_len - 1;
+         pval->persistent = false;
+     }
+ }
+-- 
+2.9.1
+
+

Added: 0005_add_wildcards_to_the_permissions_paths.patch
===================================================================
--- 0005_add_wildcards_to_the_permissions_paths.patch	                        (rev 0)
+++ 0005_add_wildcards_to_the_permissions_paths.patch	2018-09-07 15:46:27 UTC (rev 333828)
@@ -0,0 +1,55 @@
+From 13418541a5ae19b15f51cbb87faf344902f5af98 Mon Sep 17 00:00:00 2001
+From: Chris Liddell <chris.liddell at artifex.com>
+Date: Thu, 6 Sep 2018 18:40:05 +0100
+Subject: [PATCH] Bug 699722 (2): add wildcards to the permissions paths.
+
+The temp and ICC profile paths need to finish with wildcards to work correctly.
+---
+ Resource/Init/gs_init.ps | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps
+index 83918a9..5ff9f63 100644
+--- a/Resource/Init/gs_init.ps
++++ b/Resource/Init/gs_init.ps
+@@ -2034,7 +2034,7 @@ readonly def
+     <<
+       /PermitFileReading [
+         currentuserparams /PermitFileReading get aload pop
+-        //tempfilepaths aload pop
++        [//tempfilepaths aload pop] (*) .generate_dir_list_templates
+         /FONTPATH .systemvar (*) .generate_dir_list_templates
+           % Library files :
+         /LIBPATH  .systemvar (*) .generate_dir_list_templates
+@@ -2049,15 +2049,15 @@ readonly def
+           [ currentsystemparams /GenericResourceDir get] (*) .file_name_separator (*)
+             concatstrings concatstrings .generate_dir_list_templates
+         } if
+-        currentuserparams /ICCProfilesDir known {currentuserparams /ICCProfilesDir get} if
++        currentuserparams /ICCProfilesDir known {[currentuserparams /ICCProfilesDir get] (*) .generate_dir_list_templates} if
+       ]
+       /PermitFileWriting [
+           currentuserparams /PermitFileWriting get aload pop
+-          //tempfilepaths aload pop
++          [//tempfilepaths aload pop] (*) .generate_dir_list_templates
+       ]
+       /PermitFileControl [
+           currentuserparams /PermitFileControl get aload pop
+-          //tempfilepaths aload pop
++          [//tempfilepaths aload pop] (*) .generate_dir_list_templates
+       ]
+       /LockFilePermissions //true
+     >> setuserparams
+@@ -2140,7 +2140,7 @@ SAFER { .setsafeglobal } if
+   /.setshapealpha            % transparency-example.ps
+   /.endtransparencygroup     % transparency-example.ps
+   /.setdotlength             % Bug687720.ps
+-  /.sort /.setdebug /.mementolistnewblocks /getenv
++  /.sort /.mementolistnewblocks /getenv
+ 
+   /.makeoperator /.setCPSImode              % gs_cet.ps, this won't work on cluster with -dSAFER
+ 
+-- 
+2.9.1
+
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-09-07 11:35:33 UTC (rev 333827)
+++ PKGBUILD	2018-09-07 15:46:27 UTC (rev 333828)
@@ -4,7 +4,7 @@
 pkgbase=ghostscript
 pkgname=(ghostscript ghostxps ghostpcl)
 pkgver=9.24
-pkgrel=4
+pkgrel=5
 pkgdesc="An interpreter for the PostScript language"
 url="https://www.ghostscript.com/"
 arch=('x86_64')
@@ -16,11 +16,15 @@
 source=(https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${pkgver/./}/ghostpdl-${pkgver}.tar.gz
        0001_ICC_profile_validation.patch
        0002_retain_LockSafetyParams_through_failed_installpagedevice.patch
-       0003_Fix_SEGV_seen_in_all-devices_test.patch)
+       0003_Fix_SEGV_seen_in_all-devices_test.patch
+       0004_Add_the_ICCProfilesDir_to_the_PermitReading_list.patch
+       0005_add_wildcards_to_the_permissions_paths.patch)
 sha512sums=('a0ed7235808ed79ad88ddf0808ef3eb667ffd1b0300ceda78eac3d0ad69d4a963821fa05319ed822db51911210c4fd7d8dbd4d73951e330fbc7b99e4f00a45fa'
             '6cfdd351e8e84968c20cf8f15e01a09a215b6132af89ca0e392716638d925a0f750dab3dbcbdf44f200fb9cc419be5dadccffc226c9a405e888f3580f98cf4ea'
             '670ccf36927904fc2e918847baf082753d3b4b81fd0ee2347feb6de5a0ab77eb9c00cb640fcb3c7a0f395694112f3921775a6f614bec08e3d4452155b030951e'
-            '45be77dc890d9d251541d44fe0ad860a7d83d969ce697bbb32cb469d8837417020f1a017ae7aecbb8fbb45647ad9c3e6f92d321c2adfe6c8b3412c580f4058c5')
+            '45be77dc890d9d251541d44fe0ad860a7d83d969ce697bbb32cb469d8837417020f1a017ae7aecbb8fbb45647ad9c3e6f92d321c2adfe6c8b3412c580f4058c5'
+            'e64bcf8e5b5f229ca14463477be21555e66a0f3c76e3c01eb9b4d8cbeebba683b9b33a624ac4617af715c281f93106ae5d8425a29ed35416fbd580242a1a27e0'
+            '52088ef6ca47c5ed6f34ccac2b5234bcd6561175ef35de90ede7322a98e617b37036bf8a092733bec11fea211c7e3806b98c4019b1a806f6616387ee48002ef3')
 
 prepare() {
   cd ghostpdl-${pkgver}
@@ -35,6 +39,9 @@
   # apply more upstream fixes to solve various crashes
   patch -Np1 -i ../0002_retain_LockSafetyParams_through_failed_installpagedevice.patch
   patch -Np1 -i ../0003_Fix_SEGV_seen_in_all-devices_test.patch
+  # FS#59952;FS#59959
+  patch -Np1 -i ../0004_Add_the_ICCProfilesDir_to_the_PermitReading_list.patch
+  patch -Np1 -i ../0005_add_wildcards_to_the_permissions_paths.patch
 }
 
 build() {
@@ -77,6 +84,8 @@
   rm -r "${pkgdir}"/usr/share/man/de
 
   install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 LICENSE
+
+  rm "${pkgdir}"/usr/share/ghostscript/9.24/Resource/Init/gs_init.ps.orig
 }
 
 package_ghostxps() {



More information about the arch-commits mailing list