Source: doxygen
Version: 1.8.16-1
Severity: important
Tags: patch upstream

Hello,

doxygen incorrectly invokes ghostscript which breaks e.g. building
libvigraimpex:
-----------------------
Transcript written on _formulas.log.
Error: /undefinedfilename in (_form0.ps)
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--   
--nostringval--   false   1   %stopped_push
Dictionary stack:
   --dict:730/1123(ro)(G)--   --dict:0/20(G)--   --dict:76/200(L)--
Current allocation mode is local
Last OS error: Permission denied
GPL Ghostscript 9.50: Unrecoverable error, exit code 1
error: Problem running ghostscript gs -q -g130x104 -r614x614x -sDEVICE=ppmraw 
-sOutputFile=_form0.pnm -dNOPAUSE -dBATCH -- _form0.ps. Check your installation!
-----------------------

This is fixed in upstream GIT, see 
https://github.com/doxygen/doxygen/issues/7290

cu Andreas
diff -Nru doxygen-1.8.16/debian/changelog doxygen-1.8.16/debian/changelog
--- doxygen-1.8.16/debian/changelog	2019-12-10 23:48:20.000000000 +0100
+++ doxygen-1.8.16/debian/changelog	2019-12-21 10:41:35.000000000 +0100
@@ -1,3 +1,11 @@
+doxygen (1.8.16-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Pull fix for https://github.com/doxygen/doxygen/issues/7290 from upstream
+    GIT.
+
+ -- Andreas Metzler <ametz...@debian.org>  Sat, 21 Dec 2019 10:41:35 +0100
+
 doxygen (1.8.16-1) unstable; urgency=medium
 
   [ Steve Langasek ]
diff -Nru doxygen-1.8.16/debian/patches/0001-issue-7290-error-Problem-running-ghostscript-gs-q-g5.patch doxygen-1.8.16/debian/patches/0001-issue-7290-error-Problem-running-ghostscript-gs-q-g5.patch
--- doxygen-1.8.16/debian/patches/0001-issue-7290-error-Problem-running-ghostscript-gs-q-g5.patch	1970-01-01 01:00:00.000000000 +0100
+++ doxygen-1.8.16/debian/patches/0001-issue-7290-error-Problem-running-ghostscript-gs-q-g5.patch	2019-12-21 10:41:35.000000000 +0100
@@ -0,0 +1,39 @@
+From f08e87623368134c6541af12995b811ef9aff069 Mon Sep 17 00:00:00 2001
+From: albert-github <albert.te...@gmail.com>
+Date: Tue, 12 Nov 2019 11:42:22 +0100
+Subject: [PATCH] issue #7290 error: Problem running ghostscript gs -q -g562x56
+ -r384x384x -sDEVICE=ppmraw -sOutputFile=_form0.pnm -dNOPAUSE -dBATCH --
+ _form0.ps. Check your installation!
+
+@maehr had a talk with Robin Watts and Ken Sharp at IRC and there seem to be basically 3 different problems:
+* `-r%dx%d` (the dimension for `r` shouldn't be `-r384x384x`, but `-r384x384`),
+* misuse / unnecessary use of `--` and
+* since 9.50 the command needs more control access (that might be worked around by either whitelisting the file via `--permit-file-read=_form0.eps` (only works from 9.50 and upwards) or generally accepting any file with `-dNOSAFER` (works since quite some time). The second option is considered to be unsafe if we would process any file, but in this case we process self produced / controlled files. I don't know if doxygen has any threat model that it assumes. ).
+
+> Ken Sharp: Yeah the %dx is wrong, as Robin says its sheer luck that works
+the -- isn't needed and is what's causing the first problem
+and file control is the new bugbear
+
+The suggestions have been implemented and test / docs works now with old and new version.
+---
+ src/formula.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/formula.cpp b/src/formula.cpp
+index 534f56ac..3d8e6ce1 100644
+--- a/src/formula.cpp
++++ b/src/formula.cpp
+@@ -193,8 +193,8 @@ void FormulaList::generateBitmaps(const char *path)
+       // used.  
+ 
+       char gsArgs[4096];
+-      sprintf(gsArgs,"-q -g%dx%d -r%dx%dx -sDEVICE=ppmraw "
+-                    "-sOutputFile=%s.pnm -dNOPAUSE -dBATCH -- %s.ps",
++      sprintf(gsArgs,"-q -g%dx%d -r%dx%d -sDEVICE=ppmraw "
++                    "-sOutputFile=%s.pnm -dNOPAUSE -dBATCH -dNOSAFER %s.ps",
+                     gx,gy,(int)(scaleFactor*72),(int)(scaleFactor*72),
+                     formBase.data(),formBase.data()
+              );
+-- 
+2.24.0
+
diff -Nru doxygen-1.8.16/debian/patches/series doxygen-1.8.16/debian/patches/series
--- doxygen-1.8.16/debian/patches/series	2019-12-10 19:12:28.000000000 +0100
+++ doxygen-1.8.16/debian/patches/series	2019-12-21 10:41:35.000000000 +0100
@@ -13,3 +13,4 @@
 faketime_pdflatex.diff
 libatomic.diff
 blank-file-patterns.diff
+0001-issue-7290-error-Problem-running-ghostscript-gs-q-g5.patch

Reply via email to