Bug#694345: ghostscript: diff for NMU version 9.05~dfsg-6.3
Package: ghostscript
Version: 9.05~dfsg-6.2
Severity: normal
Tags: patch pending
Dear maintainer,
I've prepared an NMU for ghostscript (versioned as 9.05~dfsg-6.3) and
uploaded it (again, sorry) to DELAYED/1. Please feel free to tell me
if I should delay it longer.
Regards.
diff -Nru ghostscript-9.05~dfsg/debian/changelog ghostscript-9.05~dfsg/debian/changelog
--- ghostscript-9.05~dfsg/debian/changelog 2012-10-27 12:08:23.000000000 +0200
+++ ghostscript-9.05~dfsg/debian/changelog 2012-11-25 17:53:28.000000000 +0100
@@ -1,3 +1,14 @@
+ghostscript (9.05~dfsg-6.3) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Replace the PPD-updater postinst by CUPS' trigger (Closes: #520753)
+ - Breaks against too old cups versions.
+ - Add a ppd-updater file, to trigger with parameters.
+ * Add patch from upstream bug #693208 to improve error feedback (when
+ we can). (Closes: #682407)
+
+ -- Didier Raboud <odyx@debian.org> Sun, 25 Nov 2012 14:39:30 +0100
+
ghostscript (9.05~dfsg-6.2) unstable; urgency=medium
* Check for the existence of /etc/cups/ppd in ghostscript-cups.postinst
diff -Nru ghostscript-9.05~dfsg/debian/control.in ghostscript-9.05~dfsg/debian/control.in
--- ghostscript-9.05~dfsg/debian/control.in 2012-10-27 12:09:27.000000000 +0200
+++ ghostscript-9.05~dfsg/debian/control.in 2012-11-25 18:07:50.000000000 +0100
@@ -42,6 +42,7 @@
Conflicts: ${cdbs:Conflicts}
Replaces: ${cdbs:Replaces}
Provides: ${cdbs:Provides}
+Breaks: cups (<< 1.5.0-2~)
Description: interpreter for the PostScript language and for PDF - CUPS filters
GPL Ghostscript is used for PostScript/PDF preview and printing.
Usually as a back-end to a program such as ghostview, it can display
diff -Nru ghostscript-9.05~dfsg/debian/control.in.in ghostscript-9.05~dfsg/debian/control.in.in
--- ghostscript-9.05~dfsg/debian/control.in.in 2012-05-24 18:57:49.000000000 +0200
+++ ghostscript-9.05~dfsg/debian/control.in.in 2012-11-25 14:37:00.000000000 +0100
@@ -42,6 +42,7 @@
Conflicts: ${cdbs:Conflicts}
Replaces: ${cdbs:Replaces}
Provides: ${cdbs:Provides}
+Breaks: cups (<< 1.5.0-2~)
Description: interpreter for the PostScript language and for PDF - CUPS filters
GPL Ghostscript is used for PostScript/PDF preview and printing.
Usually as a back-end to a program such as ghostview, it can display
diff -Nru ghostscript-9.05~dfsg/debian/ghostscript-cups.install ghostscript-9.05~dfsg/debian/ghostscript-cups.install
--- ghostscript-9.05~dfsg/debian/ghostscript-cups.install 2012-05-24 18:57:49.000000000 +0200
+++ ghostscript-9.05~dfsg/debian/ghostscript-cups.install 2012-11-25 14:37:00.000000000 +0100
@@ -5,3 +5,6 @@
usr/lib/cups/filter/
usr/share/ppd/
+
+# Cups triggering file
+debian/ghostscript-cups.ppd-updater usr/share/cups/ppd-updaters/
diff -Nru ghostscript-9.05~dfsg/debian/ghostscript-cups.postinst ghostscript-9.05~dfsg/debian/ghostscript-cups.postinst
--- ghostscript-9.05~dfsg/debian/ghostscript-cups.postinst 2012-10-27 12:09:20.000000000 +0200
+++ ghostscript-9.05~dfsg/debian/ghostscript-cups.postinst 1970-01-01 01:00:00.000000000 +0100
@@ -1,61 +0,0 @@
-#! /bin/bash
-
-set -e
-
-# Limit lp* commands to localhost to avoid hanging. See bug#543468
-lpopts='-h /var/run/cups/cups.sock'
-
-case "$1" in
- configure)
- # Do the following only if CUPS is running and the needed CUPS tools
- # are available
- if which lpstat > /dev/null 2>&1 \
- && which lpinfo > /dev/null 2>&1 \
- && which lpadmin > /dev/null 2>&1 \
- && test -d /etc/cups/ppd \
- && LC_ALL=C lpstat $lpopts -r > /dev/null 2>&1; then
- # Update the PPD files of all already installed print queues
- driverregexp='lsb/usr/ghostscript/'
- gennicknameregexp=''
- [ ! -z "$gennicknameregexp" ] \
- && gennicknameregexp="; $gennicknameregexp"
- gennicknameregexp='s/\s*\(recommended\)//'"$gennicknameregexp"
- tempfiles=
- trap 'rm -f $tempfiles; exit 0' 0 HUP INT QUIT ILL ABRT PIPE TERM
- tmpfile1=`mktemp -t updateppds.XXXXXX`
- tempfiles="$tempfiles $tmpfile1"
- lpinfo $lpopts -m | grep -E $driverregexp > $tmpfile1
- cd /etc/cups/ppd
- for ppd in *.ppd; do
- [ -r "$ppd" ] || continue
- queue=${ppd%.ppd}
- lpstat $lpopts -p "$queue" >/dev/null 2>&1 || continue
- nickname=`grep '\*NickName:' "$ppd" | cut -d '"' -f 2 | perl -p -e 's/\n$//' | perl -p -e "$gennicknameregexp" | perl -p -e 's/(\W)/\\\\$1/g'`
- lang=`grep '\*LanguageVersion:' "$ppd" | cut -d ' ' -f 2 | perl -e 'print lc(<>)' | perl -p -e 's/[\r\n]//gs'`
- ppdfound="0"
- englishppduri=""
- tmpfile2=`mktemp -t updateppds.XXXXXX`
- tempfiles="$tempfiles $tmpfile2"
- cat $tmpfile1 | perl -p -e "$gennicknameregexp" | grep -E '^\S+\s+.*'"$nickname"'$' | cut -d ' ' -f 1 > $tmpfile2
- while read newppduri; do
- [ "$ppdfound" = "0" ] && lpadmin $lpopts -p "$queue" -m $newppduri 2>/dev/null || continue
- newlang=`grep '\*LanguageVersion:' "$ppd" | cut -d ' ' -f 2 | perl -e 'print lc(<>)' | perl -p -e 's/[\r\n]//gs'`
- [ "$newlang" = "$lang" ] && ppdfound="1"
- [ "$newlang" = "english" ] && englishppduri="$newppduri"
- done < $tmpfile2
- [ "$ppdfound" = "0" ] && [ ! -z "$englishppduri" ] && lpadmin $lpopts -p "$queue" -m $englishppduri 2>/dev/null && ppdfound="1"
- [ "$ppdfound" = "1" ] && echo PPD for printer $queue updated >&2
- done
- fi
- ;;
- abort-upgrade|abort-remove|abort-deconfigure)
- ;;
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
diff -Nru ghostscript-9.05~dfsg/debian/ghostscript-cups.ppd-updater ghostscript-9.05~dfsg/debian/ghostscript-cups.ppd-updater
--- ghostscript-9.05~dfsg/debian/ghostscript-cups.ppd-updater 1970-01-01 01:00:00.000000000 +0100
+++ ghostscript-9.05~dfsg/debian/ghostscript-cups.ppd-updater 2012-11-25 14:37:00.000000000 +0100
@@ -0,0 +1,2 @@
+DRIVER_REGEXP='lsb/usr/ghostscript/'
+GENNICKNAME_REGEXP=''
diff -Nru ghostscript-9.05~dfsg/debian/patches/020120623~7dfac701.patch ghostscript-9.05~dfsg/debian/patches/020120623~7dfac701.patch
--- ghostscript-9.05~dfsg/debian/patches/020120623~7dfac701.patch 1970-01-01 01:00:00.000000000 +0100
+++ ghostscript-9.05~dfsg/debian/patches/020120623~7dfac701.patch 2012-11-25 17:53:35.000000000 +0100
@@ -0,0 +1,71 @@
+From 7dfac701b8a36395a88a69b3a1e9eeaaa70c6b0b Mon Sep 17 00:00:00 2001
+From: Chris Liddell <chris.liddell@artifex.com>
+Date: Mon, 23 Jul 2012 14:15:01 +0100
+Subject: [PATCH] Bug 693208: improve error feedback (when we can)
+
+Have configure check for the presence of strerror() and if it's available,
+have gp_strerror() call it.
+
+No cluster differences.
+
+Closes-Debian: #682407
+---
+ base/Makefile.in | 2 +-
+ base/configure.ac | 5 ++++-
+ base/gp_unix.c | 6 ++++--
+ 3 files changed, 9 insertions(+), 4 deletions(-)
+
+--- a/base/Makefile.in
++++ b/base/Makefile.in
+@@ -147,7 +147,7 @@
+ # -DHAVE_SSE2
+ # use sse2 intrinsics
+
+-CAPOPT= @HAVE_MKSTEMP@ @HAVE_FILE64@ @HAVE_MKSTEMP64@ @HAVE_FONTCONFIG@ @HAVE_LIBIDN@ @HAVE_SETLOCALE@ @HAVE_SSE2@ @HAVE_DBUS@ @HAVE_BSWAP32@ @HAVE_BYTESWAP_H@
++CAPOPT= @HAVE_MKSTEMP@ @HAVE_FILE64@ @HAVE_MKSTEMP64@ @HAVE_FONTCONFIG@ @HAVE_LIBIDN@ @HAVE_SETLOCALE@ @HAVE_SSE2@ @HAVE_DBUS@ @HAVE_BSWAP32@ @HAVE_BYTESWAP_H@ @HAVE_STRERROR@
+
+ # Define the name of the executable file.
+
+--- a/base/configure.ac
++++ b/base/configure.ac
+@@ -1723,6 +1723,9 @@
+ AC_CHECK_FUNCS([setlocale], [HAVE_SETLOCALE=-DHAVE_SETLOCALE])
+ AC_SUBST(HAVE_SETLOCALE)
+
++AC_CHECK_FUNCS([strerror], [HAVE_STRERROR=-DHAVE_STRERROR])
++AC_SUBST(HAVE_STRERROR)
++
+ AC_PROG_GCC_TRADITIONAL
+
+ dnl NB: We don't actually provide autoconf-switched fallbacks for any
+@@ -1733,7 +1736,7 @@
+ AC_TYPE_SIGNAL
+ AC_FUNC_STAT
+ AC_FUNC_VPRINTF
+-AC_CHECK_FUNCS([bzero dup2 floor gettimeofday memchr memmove memset mkdir mkfifo modf pow putenv rint setenv sqrt strchr strerror strrchr strspn strstr])
++AC_CHECK_FUNCS([bzero dup2 floor gettimeofday memchr memmove memset mkdir mkfifo modf pow putenv rint setenv sqrt strchr strrchr strspn strstr])
+
+ dnl --------------------------------------------------
+ dnl check for big/little endian for LCMS
+--- a/base/gp_unix.c
++++ b/base/gp_unix.c
+@@ -107,12 +107,14 @@
+ /* ------ Miscellaneous ------ */
+
+ /* Get the string corresponding to an OS error number. */
+-/* Unix systems support this so inconsistently that we don't attempt */
+-/* to figure out whether it's available. */
+ const char *
+ gp_strerror(int errnum)
+ {
++#ifdef HAVE_STRERROR
++ return strerror(errnum);
++#else
+ return NULL;
++#endif
+ }
+
+ /* We don't have a good way to get a serial number here, so just */
+--
+1.7.0.4
+
diff -Nru ghostscript-9.05~dfsg/debian/patches/series ghostscript-9.05~dfsg/debian/patches/series
--- ghostscript-9.05~dfsg/debian/patches/series 2012-09-22 01:13:15.000000000 +0200
+++ ghostscript-9.05~dfsg/debian/patches/series 2012-11-25 16:48:34.000000000 +0100
@@ -1,6 +1,7 @@
020120302~ceef323.patch
020120319~d6f83df.patch
020120420~67a924e.patch
+020120623~7dfac701.patch
1001_fix_manpage_typo.patch
1002_cms_typos.patch
2001_docdir_fix_for_debian.patch
Reply to: