[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#926800: unblock: cups-filters/1.21.6-5



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package cups-filters 1.21.6-5

It fixes a severity: important bug (#926576) in cups-filters; which is a
regression in the ghostscript support triggered by the version of Ghostscript
that will be shipped in Buster (9.27), quoting the upstream developer
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=926576#20):

> The old call used the undocumented internal "pdfdict" of Ghostscript 
> which from Ghostscript 9.27 on is not accessible any more for security 
> reasons. Now I use the call suggested in the Arch Linux bug report using
> "runpdfbegin".

The full (noisy) debdiff is attached, but here comes the real source diff:

--- a/filter/foomatic-rip/pdf.c
+++ b/filter/foomatic-rip/pdf.c
@@ -47,9 +47,8 @@ static int pdf_count_pages(const char *filename)
     size_t bytes;
 
     snprintf(gscommand, CMDLINE_MAX, "%s -dNODISPLAY -q -c "
-            "'/pdffile (%s) (r) file def pdfdict begin pdffile pdfopen begin "
-            "(PageCount: ) print pdfpagecount == flush currentdict pdfclose "
-            "end end quit'",
+            "'/pdffile (%s) (r) file runpdfbegin (PageCount: ) print "
+            "pdfpagecount = quit'",
             gspath, filename);
 
     FILE *pd = popen(gscommand, "r");


This patch was uploaded to experimental as 1.22.5-1 and to unstable as 1.21.6-5
today.

    unblock cups-filters/1.21.6-5

Cheers, and thanks for your time;
	OdyX
diff -Nru cups-filters-1.21.6/debian/changelog cups-filters-1.21.6/debian/changelog
--- cups-filters-1.21.6/debian/changelog	2019-02-16 14:31:17.000000000 +0100
+++ cups-filters-1.21.6/debian/changelog	2019-04-10 17:13:22.000000000 +0200
@@ -1,3 +1,11 @@
+cups-filters (1.21.6-5) unstable; urgency=medium
+
+  * Backport upstream patch:
+     - foomatic-rip: Changed Ghostscript call to count pages in a PDF file so
+       that it works with GS 9.27 (Closes: #926576)
+
+ -- Didier Raboud <odyx@debian.org>  Wed, 10 Apr 2019 17:13:22 +0200
+
 cups-filters (1.21.6-4) unstable; urgency=medium
 
   * Backport upstream patch:
diff -Nru cups-filters-1.21.6/debian/.git-dpm cups-filters-1.21.6/debian/.git-dpm
--- cups-filters-1.21.6/debian/.git-dpm	2019-02-16 14:31:17.000000000 +0100
+++ cups-filters-1.21.6/debian/.git-dpm	2019-04-10 17:13:22.000000000 +0200
@@ -1,6 +1,6 @@
 # see git-dpm(1) from git-dpm package
-c1ec6e6233f90f7944e796732bcb68b546e75512
-c1ec6e6233f90f7944e796732bcb68b546e75512
+ac421831bde36d391900eba263cb6215eacb4927
+ac421831bde36d391900eba263cb6215eacb4927
 ec41f03b4dc5def5a6d53ea1dbb856f4b1bba169
 ec41f03b4dc5def5a6d53ea1dbb856f4b1bba169
 cups-filters_1.21.6.orig.tar.xz
diff -Nru cups-filters-1.21.6/debian/patches/0005-foomatic-rip-Changed-Ghostscript-call-to-count-pages.patch cups-filters-1.21.6/debian/patches/0005-foomatic-rip-Changed-Ghostscript-call-to-count-pages.patch
--- cups-filters-1.21.6/debian/patches/0005-foomatic-rip-Changed-Ghostscript-call-to-count-pages.patch	1970-01-01 01:00:00.000000000 +0100
+++ cups-filters-1.21.6/debian/patches/0005-foomatic-rip-Changed-Ghostscript-call-to-count-pages.patch	2019-04-10 17:13:22.000000000 +0200
@@ -0,0 +1,26 @@
+From ac421831bde36d391900eba263cb6215eacb4927 Mon Sep 17 00:00:00 2001
+From: Till Kamppeter <till.kamppeter@gmail.com>
+Date: Sun, 7 Apr 2019 16:34:16 +0200
+Subject: foomatic-rip: Changed Ghostscript call to count pages in a PDF file
+ so that it works with GS 9.27.
+
+---
+ filter/foomatic-rip/pdf.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/filter/foomatic-rip/pdf.c b/filter/foomatic-rip/pdf.c
+index 9c3979bb2..bc739bd80 100644
+--- a/filter/foomatic-rip/pdf.c
++++ b/filter/foomatic-rip/pdf.c
+@@ -47,9 +47,8 @@ static int pdf_count_pages(const char *filename)
+     size_t bytes;
+ 
+     snprintf(gscommand, CMDLINE_MAX, "%s -dNODISPLAY -q -c "
+-	     "'/pdffile (%s) (r) file def pdfdict begin pdffile pdfopen begin "
+-	     "(PageCount: ) print pdfpagecount == flush currentdict pdfclose "
+-	     "end end quit'",
++	     "'/pdffile (%s) (r) file runpdfbegin (PageCount: ) print "
++	     "pdfpagecount = quit'",
+ 	     gspath, filename);
+ 
+     FILE *pd = popen(gscommand, "r");
diff -Nru cups-filters-1.21.6/debian/patches/auto-gitignore cups-filters-1.21.6/debian/patches/auto-gitignore
--- cups-filters-1.21.6/debian/patches/auto-gitignore	2019-02-16 14:31:17.000000000 +0100
+++ cups-filters-1.21.6/debian/patches/auto-gitignore	2019-04-10 17:13:22.000000000 +0200
@@ -4,7 +4,7 @@
 .gitignore file(s).  This patch is autogenerated, to provide these
 updates to users of the official Debian archive view of the package.
 
-[dgit (8.3) update-gitignore]
+[dgit (8.4) update-gitignore]
 ---
 diff --git a/.gitignore b/.gitignore
 new file mode 100644
diff -Nru cups-filters-1.21.6/debian/patches/series cups-filters-1.21.6/debian/patches/series
--- cups-filters-1.21.6/debian/patches/series	2019-02-16 14:31:17.000000000 +0100
+++ cups-filters-1.21.6/debian/patches/series	2019-04-10 17:13:22.000000000 +0200
@@ -2,4 +2,5 @@
 0002-cups-browsed-Fixed-crash-in-applying-the-BrowseFilte.patch
 0003-pdftopdf-Fixed-bug-of-closing-temporary-file-prematu.patch
 0004-cups-browsed-driverless-Correct-attributes-of-get-pr.patch
+0005-foomatic-rip-Changed-Ghostscript-call-to-count-pages.patch
 auto-gitignore

Reply to: