Bug#805357: cups-pdf: Print job with multiple input files doesn't work

2022-08-06 Thread наб
Control: found 805357 3.0.1-14

Got bit by this on bullseye cups + (backported) sid cups-pdf.

In this case i can only reproduce this with a postscript file,
I'm using the attached one: specifying it thrice hangs the PDF process
below cupsd -l; I managed to unstick it by removing the respective
/var/spool/cups/d$job-* files and restarting cups.service.

In the case of attached, the output (when using just one) is
horrifically mangled, as compared to using something like gv(1)
(or a plain gs -dSAFER -dBATCH -dNOPAUSE  -r600  -sDEVICE=pdfwrite),
but that's another issue, I'm assuming? Or is this some aspect of this
postscript that explodes it both ways? Please advise.

Best,
наб


p1-20.ps.Z
Description: Binary data


signature.asc
Description: PGP signature


Bug#992893: ps2ascii: odd option handling

2021-08-24 Thread наб
Package: ghostscript
Version: 9.53.3~dfsg-7
Severity: minor
Tags: patch

Dear Maintainer,

ps2ascii handles default arguments really oddly, including shelling out
for each test (note the "()") and doesn't quote GS_EXECUTABLE,
unlike the other scripts in lib/; please consider the attached patch,
which also uses symbolic names for the trap signals

Best,
наб

-- System Information:
Debian Release: 10.10
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable-debug'), (500, 
'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-17-amd64 (SMP w/24 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, 
TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ghostscript depends on:
ii  libc6   2.28-10
ii  libgs9  9.27~dfsg-2+deb10u4

Versions of packages ghostscript recommends:
ii  gsfonts  1:8.11+urwcyr1.0.7~pre44-4.4

Versions of packages ghostscript suggests:
ii  ghostscript-x  9.27~dfsg-2+deb10u4

-- no debconf information
--- ghostscript-9.53.3~dfsg.orig/lib/ps2ascii
+++ ghostscript-9.53.3~dfsg/lib/ps2ascii
@@ -9,13 +9,6 @@
 # executable name set in the makefile
 GS_EXECUTABLE=gs
 
-trap "rm -f _temp_.err _temp_.out" 0 1 2 15
+trap "rm -f _temp_.err _temp_.out" EXIT HUP INT TERM
 
-OPTIONS="-q -dSAFER -sDEVICE=txtwrite"
-if ( test $# -eq 0 ) then
-$GS_EXECUTABLE $OPTIONS -o - -
-elif ( test $# -eq 1 ) then
-$GS_EXECUTABLE $OPTIONS -o - "$1"
-else
-$GS_EXECUTABLE $OPTIONS -o "$2" "$1"
-fi
+"$GS_EXECUTABLE" -q -dSAFER -sDEVICE=txtwrite -o "${2:--}" "${1:--}"


signature.asc
Description: PGP signature


Bug#992889: /usr/sbin/update-gsfontmap: overly complicated

2021-08-24 Thread наб
Hi!

On Tue, Aug 24, 2021 at 07:30:31PM +0200, Jonas Smedegaard wrote:
> Quoting наб (2021-08-24 18:58:36)
> > The current approach that update-gsfontmap takes is very complicated, 
> > to no apparent end, since all it achieves is concatenating all the 
> > files; please consider the attached patch, which applies to every 
> > version since 7e78b19759ab1e47a3636ffd5c922c536e6cad37 (November of 
> > 2018)
> Your assesment is quite likely correct: that script hasn't been touched 
> since ancient times where more complex font registration scripts were 
> used in Debian (something called DeFoMa).
The DeFoMa page on the Debian Wiki and the corresponding manpage are an
interesting look down history lane (ancient history, I seem to've been
around 10 during the transition), thanks!

> Seems your patch is missing, however...
It's attachment 2, debbugs caught it:
https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=992889;msg=5

I've included it in this mail, too, for good measure.

Best,
наб
diff --git a/debian/update-gsfontmap.orig b/debian/update-gsfontmap
index 5367ff6..c105363 100644
--- a/debian/update-gsfontmap.orig
+++ b/debian/update-gsfontmap
@@ -8,15 +8,7 @@ FONTMAP=/var/lib/ghostscript/fonts/Fontmap
 CIDFDIR=/etc/ghostscript/cidfmap.d/
 FONTMDIR=/etc/ghostscript/fontmap.d/
 
-rm -f "$CIDFMAP" "$FONTMAP"
-touch "$CIDFMAP" "$FONTMAP"
-
-for i in "$CIDFDIR"/*.conf; do
-cat "$i" >> "$CIDFMAP"
-done 2>/dev/null
-
-for i in "$FONTMDIR"/*.conf; do
-cat "$i" >> "$FONTMAP"
-done 2>/dev/null
+cat "$CIDFDIR"/*.conf  > "$CIDFMAP" 2>/dev/null
+cat "$FONTMDIR"/*.conf > "$FONTMAP" 2>/dev/null
 
 exit 0


signature.asc
Description: PGP signature