--- cups-pdf-2.5.0.orig/debian/copyright +++ cups-pdf-2.5.0/debian/copyright @@ -0,0 +1,21 @@ +This package was debianized by Martin-Eric Racine on +Mon, 22 Sep 2003 16:27:44 +0300. + +It was downloaded from + +Copyright (C) 2003-2008, Volker C. Behr + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + +On Debian systems, the complete text of the GNU General Public License +can be found in . --- cups-pdf-2.5.0.orig/debian/postinst +++ cups-pdf-2.5.0/debian/postinst @@ -0,0 +1,72 @@ +#!/bin/sh +# postinst script for cups-pdf + +set -e + +case "$1" in + configure) + # Remove lint from possible upgrades. + rm -rf /var/spool/cups-pdf/SPOOL + # Sanitize ownerships and permissions. + chmod 0700 /usr/lib/cups/backend/cups-pdf + if ! [ -f /var/log/cups/cups-pdf_log ] + then + touch /var/log/cups/cups-pdf_log + fi + chown -R root:lpadmin /var/log/cups + chmod 0640 /var/log/cups/cups-pdf_log* + chown root:lpadmin /var/spool/cups-pdf/ANONYMOUS + chmod 1777 /var/spool/cups-pdf/ANONYMOUS + # We need CUPS to reload its configuration before the backend is available. + if [ -f /etc/init.d/cups ] + then + invoke-rc.d cups force-reload || invoke-rc.d cups start || : + fi + # Wait until CUPS has reloaded its configuration. + if lpstat -h localhost -r 2> /dev/null | grep -q not; then + t=0 + while lpstat -h localhost -r 2> /dev/null | grep -q not; do + t=$(($t + 1)) + if [ $t = 10 ]; then + echo "CUPS failed to reload its configuration!" + break + fi + sleep 1 + done + fi + # Create a PDF queue if we have none yet. + if [ -z "$(LC_ALL=C lpstat -h localhost -v 2>/dev/null | grep 'cups-pdf:/')" ] + then + # 1) Find a name for the PDF queue. + queue=PDF + number=0 + while $(LC_ALL=C lpstat -h localhost -v 2>/dev/null | cut -d ':' -f 1 | cut -d ' ' -f 3 | grep -q ^$queue\$) + do + number=$(($number + 1)) + queue="PDF$number" + done + # 2) Find the default paper size. + size="$(LC_ALL=C paperconf 2>/dev/null)" || size=a4 + # 3) Create the queue. + echo | lpadmin -h localhost -p $queue -v cups-pdf:/ -m lsb/usr/cups-pdf/CUPS-PDF.ppd -o printer-is-shared=no -o PageSize=$size 2>/dev/null || : + # 4) Enable the queue. + echo | cupsenable -h localhost $queue 2>/dev/null || : + echo | cupsaccept -h localhost $queue 2>/dev/null || : + # 5) Set the PDF queue as default if there is no default printer yet. + if [ -z "$(LC_ALL=C lpstat -h localhost -d 2>/dev/null | grep 'system default destination:')" ] + then + echo | lpadmin -h localhost -d $queue 2>/dev/null || : + fi + fi + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 --- cups-pdf-2.5.0.orig/debian/watch +++ cups-pdf-2.5.0/debian/watch @@ -0,0 +1,3 @@ +version=3 +http://www.cups-pdf.de/src/cups-pdf_(.*)\.tar\.gz \ + debian uupdate --no-symlink --- cups-pdf-2.5.0.orig/debian/NEWS +++ cups-pdf-2.5.0/debian/NEWS @@ -0,0 +1,15 @@ +cups-pdf (2.4.6-3) unstable; urgency=low + + Please note that CUPS-PDF is never affected by Poppler or XPDF bugs; + only external tools that it uses to generate the PDF are. Therefore, + avoid filing bugs related to those codebases against CUPS-PDF. + + -- Martin-Éric Racine Wed, 08 Aug 2007 00:42:44 +0300 + +cups-pdf (1.7.3-6) unstable; urgency=low + + The Sarge release of CUPS-PDF sent PDF printouts to ~/cups-pdf. + Starting with Etch release 1.7.3-6 this location moves to ~/PDF. + Anonymous Samba output goes to /var/spool/cups-pdf/ANONYMOUS/. + + -- Martin-Éric Racine Mon, 3 Oct 2005 11:34:56 +0300 --- cups-pdf-2.5.0.orig/debian/dirs +++ cups-pdf-2.5.0/debian/dirs @@ -0,0 +1,2 @@ +var/spool/cups-pdf/ANONYMOUS +var/log/cups --- cups-pdf-2.5.0.orig/debian/changelog +++ cups-pdf-2.5.0/debian/changelog @@ -0,0 +1,733 @@ +cups-pdf (2.5.0-17ubuntu1~lucid1) lucid-proposed; urgency=low + + * Maintenance release to the 2.5.0 branch for Ubuntu Lucid and Maverick. + Backports many maintainer script features to foolproof the installation + and removal processes, per feedback from Martin Pitt and Till Kamppeter. + * Hand-picked fixes from 2.5.1-5 and 2.5.1-7 packaging: + + Modified the force-reload loop in [postinst|prerm|postrm] to end with ||: + rather than with ||true for consistency with other maintainer commands. + + Added a wait loop in [postinst|prerm|postrm] to ensure that CUPS reloaded. + + Added 'cupsenable' and 'cupsaccept' steps in [postinst] to ensure that + the PDF queue is up and running before we can manipulate it. (LP: #805947) + + Added 'cupsdisable' and 'cupsreject' steps in [prerm|postrm] to match. + * Hand-picked fixes from 2.5.1-3 packaging: + + Remove the superfluous -E option to the queue creation loop in [postinst]. + This was unnecessary to access localhost plus it sometimes makes automated + installs fail. (Closes: #614713,#539156). + + Implemented a CUPS queue purging loop in [postrm] to remove all traces of + CUPS-PDF in the CUPS configuration after a package purge. (LP: #573667) + + Enforced -h localhost usage in [prerm] for [postinst/postrm] consistency. + + Bumped Standards-Version to 3.9.2 (no change required). + * Reverted LFS support from 2.5.0-17 in [debian/rules] since it never made it + to any stable distro. It remains in the 2.5.1 branch for those who need it. + + -- Martin-Éric Racine Sun, 25 Sep 2011 13:58:30 +0300 + +cups-pdf (2.5.0-17) unstable; urgency=low + + * Updated my contact info in [debian/control|debian/copyright] files. + * Fixed "please compile with large file support" (Closes: #604930). + * Bumped Standards-Version to 3.9.1 (no change required). + + -- Martin-Éric Racine Tue, 04 Jan 2011 12:10:35 +0200 + +cups-pdf (2.5.0-16) unstable; urgency=low + + * Revert permission fix from 2.5.0-15. Let CUPS handle this by itself. + + -- Martin-Éric Racine Fri, 18 Jun 2010 14:17:30 +0300 + +cups-pdf (2.5.0-15) unstable; urgency=low + + * Changed ownership of /var/spool/cups-pdf/ANONYMOUS from nobody:nogroup + to root:lpadmin (Closes: #582441). + * Fix the permissions of /usr/lib/cups/backend to 0700 (LP: #580837). + FIXME: this directory's permissions really should be fixed by CUPS. + + -- Martin-Éric Racine Thu, 27 May 2010 07:57:15 +0300 + +cups-pdf (2.5.0-14) unstable; urgency=low + + * Removed all obsolete build-dependency and dependency versioning. + + We don't depend upon specific CDBS features, plus we barely quote + debhelper >= 5 to quiet the incitation to upgrade debian/compat. + + Debian Lenny implemented migration from CUPSYS to CUPS namespace + and Ubuntu implemented it in Intrepid too, so we basically have + an artificial versioning as a result of the namespace change. + + -- Martin-Éric Racine Sun, 18 Apr 2010 13:36:42 +0300 + +cups-pdf (2.5.0-13) unstable; urgency=low + + * Precised the exact path to the GPL-2 text as suggested by Lintian. + * Touched debian/copyright_hints and responded to the hints. + * Bumped Standards-Version to 3.8.4 (no change required). + * Created debian/source/format. + + -- Martin-Éric Racine Thu, 15 Apr 2010 13:07:36 +0300 + +cups-pdf (2.5.0-12) unstable; urgency=low + + * Sanitized ownerships and permissions of all our files via postinst. + * Added cruft removal to postinst script. + + -- Martin-Éric Racine Sun, 15 Nov 2009 11:38:11 +0000 + +cups-pdf (2.5.0-11) unstable; urgency=low + + * Reverted Pre-Depends:cups change from 1.6.3-3 (LP: #356781). + + -- Martin-Éric Racine Tue, 27 Oct 2009 11:59:22 +0000 + +cups-pdf (2.5.0-10) unstable; urgency=low + + * Removed 'removing' case from postinst (Closes: #552389). + + -- Martin-Éric Racine Mon, 26 Oct 2009 08:55:28 +0000 + +cups-pdf (2.5.0-9) unstable; urgency=low + + * Added explicit creation of /var/log/cups/ to debian/dirs (LP: #441123). + + -- Martin-Éric Racine Fri, 23 Oct 2009 14:47:32 +0000 + +cups-pdf (2.5.0-8) unstable; urgency=low + + * Bumped Standards-Version to 3.8.3 (no change required). + * Inserted explicit "-h localhost" option to every lpadmin and lpstat + invocation in postinst (Closes: #539156). + + -- Martin-Éric Racine Thu, 03 Sep 2009 22:53:33 +0000 + +cups-pdf (2.5.0-7) unstable; urgency=low + + * The "Houston, we have a piuparts problem" release: + + Reinsterted missing Depends on ghostscript. + + -- Martin-Éric Racine Wed, 19 Aug 2009 14:23:37 +0300 + +cups-pdf (2.5.0-6) unstable; urgency=low + + * Inserted lpadmin "enter" in maintainer scripts (Closes: #539156). + + -- Martin-Éric Racine Sat, 15 Aug 2009 00:07:52 +0300 + +cups-pdf (2.5.0-5) unstable; urgency=low + + * Dropped explicit Depends on ghostscript since CUPS already does. + + -- Martin-Éric Racine Fri, 14 Aug 2009 21:51:56 +0300 + +cups-pdf (2.5.0-4) unstable; urgency=low + + * Merged changes from Ubuntu (Closes: #509518, #510882): + + Apport hooks. + + Pass PDF files without modification (LP: #385709). + + Automatic PDF queue addition (postinst) and removal (prerm). + NOT merged: upgrading of existing PDF queues; Depends: perl. + * Bumped Standards-Version to 3.8.2 (no change required). + + -- Martin-Éric Racine Sun, 28 Jun 2009 13:35:39 +0300 + +cups-pdf (2.5.0-3) unstable; urgency=low + + * The "inching towards automated queue addition/removal" release: + + Moved cups/cups-client/libpaper-utils to Pre-Depends since we need + those to be preconfigured for CUPS-PDF maintainer scripts to work. + + Added a prerm maintainer script. + + -- Martin-Éric Racine Thu, 04 Jun 2009 09:06:05 +0300 + +cups-pdf (2.5.0-2) unstable; urgency=low + + * Bumped Standards-Version to 3.8.0: + + Moved the upstream URL from Description to Homepage field. + * Fixed [debian/copyright] to match GNU boilerplate text. + + -- Martin-Éric Racine Mon, 20 Apr 2009 01:27:46 +0300 + +cups-pdf (2.5.0-1) unstable; urgency=low + + * New upstream release: + + new option to truncate long filenames (Fixes Ubuntu #237224) + + spoolfile is purged on errors (Re: OpenSuSE complaint) + + failed chmod() on output is treated as non-fatal (Closes: #496317) + + updates and additions to the documentation (Closes: #501719, #502555) + + removed additional changelog from source code. + + -- Martin-Éric Racine Mon, 26 Jan 2009 20:38:49 +0200 + +cups-pdf (2.4.8-4) unstable; urgency=low + + * Updated README.Debian to reflect the fact that CUPS-PDF.PPD is now + the only recognized backend for CUPS-PDF. + * Added a warning about AppArmor to README.Debian for Ubuntu users. + + -- Martin-Éric Racine Sun, 14 Sep 2008 12:18:20 +0300 + +cups-pdf (2.4.8-3) unstable; urgency=low + + * Added patch to remove Bashisms from contributed third-party SELinux + sample scripts (Closes: #489554). + + -- Martin-Éric Racine Wed, 13 Aug 2008 13:06:13 +0300 + +cups-pdf (2.4.8-2) unstable; urgency=low + + * The "Brown Bag" release: + Migrating to cupsys also requires updating maintainer scripts. + + -- Martin-Éric Racine Mon, 23 Jun 2008 18:32:20 +0300 + +cups-pdf (2.4.8-1) unstable; urgency=low + + * New upstream release (Closes: #472631). + + -- Martin-Éric Racine Sun, 22 Jun 2008 17:13:33 +0300 + +cups-pdf (2.4.7-4) unstable; urgency=low + + * Dropped references to gs-esp and cupsys in Depends and Recommends, + now that the CUPS renaming is done, on time for Lenny. + + -- Martin-Éric Racine Fri, 20 Jun 2008 20:14:08 +0300 + +cups-pdf (2.4.7-3) unstable; urgency=low + + * Added alternatives for the upcoming Debian CUPS packages renaming. + + -- Martin-Éric Racine Sun, 25 May 2008 20:20:27 +0300 + +cups-pdf (2.4.7-2) unstable; urgency=low + + [ Martin-Éric Racine ] + * Merged useful changes from Ubuntu: + + [ Jonathan Riddell ] + + Suggests: system-config-printer-gnome | system-config-printer-kde + + [ Till Kamppeter ] + + Depends: ghostscript | gs-esp, libpaper-utils, cupsys, cupsys-client + + debian/rules: enabled the CDBS simple patching system. + + debian/patches/50_default_conf.patch on extra/cups-pdf.conf: + Move the default configuration changes into 50_default_conf.patch, + so that the diff.gz is now free of upstream diffs. + + -- Martin-Éric Racine Sun, 06 Apr 2008 12:08:05 +0300 + +cups-pdf (2.4.7-1) unstable; urgency=low + + * New upstream release: + + Implemented IEEE-1284 device ID to make the PPD auto-selectable. + + -- Martin-Éric Racine Mon, 24 Mar 2008 14:20:04 +0200 + +cups-pdf (2.4.6-5) unstable; urgency=low + + * Changed homepage and debian/watch to http://www.cups-pdf.de site. + * Upgraded Depends to ghostscript | gs-esp (Closes: #455647). + + -- Martin-Éric Racine Sun, 23 Dec 2007 15:46:31 +0200 + +cups-pdf (2.4.6-4) unstable; urgency=low + + [ Martin Pitt ] + * debian/postinst: Changed /usr/lib/cups/backend/cups-pdf permissions + from 4751 (which was still necessary for the non-root CUPS) to 0700 + (in accordance with upstream requirements). + * debian/postinst: Made /var/spool/cups-pdf/ANONYMOUS sticky, since it + is world-writeable. + + -- Martin-Éric Racine Sat, 11 Aug 2007 22:29:33 +0300 + +cups-pdf (2.4.6-3) unstable; urgency=low + + * Implemented a basic reportbug script to remind people not to file + pointless CVE bugs concerning Poppler or XPDF, since we don't use + that code; we simply pass the document to external tools that do. + * Added the same warning to NEWS.Debian. + + -- Martin-Éric Racine Wed, 8 Aug 2007 01:10:19 +0300 + +cups-pdf (2.4.6-2) unstable; urgency=low + + * Bumped debhelper Build-Depends to (>= 5). + + -- Martin-Éric Racine Sun, 15 Jul 2007 18:13:45 +0300 + +cups-pdf (2.4.6-1) unstable; urgency=low + + * New upstream release: + - Changed GS options to save memory on some files (Closes: #421868). + - Changed CUPS printer description to CUPS-PDF (Closes: #411620). + * Made Debian CUPS Maintainers the Maintainer and myself Uploaders. + TODO: automagic installation of PDF printer for granny-friendliness. + + -- Martin-Éric Racine Thu, 24 May 2007 12:28:22 +0300 + +cups-pdf (2.4.2-3) unstable; urgency=high + + * Reversed order of chmod and chown in postinst (Closes: #411580). + + -- Martin-Éric Racine Tue, 20 Feb 2007 02:48:36 +0200 + +cups-pdf (2.4.2-2) unstable; urgency=high + + * Upgraded backend permissions to match Policy 10.9 (Closes: #409356). + + -- Martin-Éric Racine Mon, 12 Feb 2007 17:45:57 +0200 + +cups-pdf (2.4.2-1) unstable; urgency=low + + * New upstream maintenance release: + - Removed extraneous COPYRIGHT files (make Lintian happy). + - Cleaned up over 200 warnings issued by 'splint'. + - Renamed PPD v4 to match the single PPD file from the 1.7 codebase. + - Removed PPD v3. + - Shipped the PPD uncompressed. + * Migrated PPD to /usr/share/ppd/cups-pdf directory (Closes: #390141). + * Added missing invoke-rc.d reload loop in postrm. + Thanks to Roger Leigh for spotting this. + + -- Martin-Éric Racine Sat, 30 Sep 2006 22:51:33 +0300 + +cups-pdf (2.4.1-3) unstable; urgency=low + + * Changed the backend permissions to 6755 for Ubuntu compatibility. + + -- Martin-Éric Racine Fri, 29 Sep 2006 02:26:39 +0300 + +cups-pdf (2.4.1-2) unstable; urgency=low + + * Changed the backend permissions to 6700 for Ubuntu compatibility. + (Launchpad #36093, #42147) + + -- Martin-Éric Racine Tue, 19 Sep 2006 21:04:58 +0300 + +cups-pdf (2.4.1-1) unstable; urgency=low + + * New upstream release. + * Upgraded Standards-Version to 3.7.2; no change required. + * Upgraded debian/install to anticipate PPD revision numbers. + * Added debian/links to always track the latest PPD revision. + + -- Martin-Éric Racine Wed, 21 Jun 2006 15:47:26 +0300 + +cups-pdf (2.4.0-2) unstable; urgency=low + + * Fixed: restarting CUPS fails if it's not running (Closes: #372691). + + -- Martin-Éric Racine Sun, 11 Jun 2006 18:15:41 +0300 + +cups-pdf (2.4.0-1) unstable; urgency=medium + + * New upstream release. + * Installed contributed documentation as examples. + * Fixed backend permissions for CUPS 1.2 (Closes: #371143). + + -- Martin-Éric Racine Fri, 9 Jun 2006 13:46:44 +0300 + +cups-pdf (2.2.0-1) unstable; urgency=low + + * New upstream release. + * Document the fact that PPD drivers other than PostscriptColor are + not guaranteed to work with CUPS-PDF (Closes: #344872). + + -- Martin-Éric Racine Fri, 21 Apr 2006 14:18:32 +0300 + +cups-pdf (2.1.1-1) unstable; urgency=medium + + * New upstream release: + (Closes: #361062) thanks to Nickolay Kondrashov for the patch. + + -- Martin-Éric Racine Fri, 7 Apr 2006 06:25:32 +0300 + +cups-pdf (2.1.0-1) unstable; urgency=low + + * New upstream release. + * Rewrote long description to reflect configurable output path. + * Removed no longer needed preinst maintenance script. + * Dropped no longer needed Depends on adduser. + + -- Martin-Éric Racine Sun, 26 Mar 2006 07:27:01 +0300 + +cups-pdf (2.0.5-1) unstable; urgency=low + + * New upstream release. + + -- Martin-Éric Racine Sat, 4 Mar 2006 13:50:18 +0200 + +cups-pdf (2.0.4-1) unstable; urgency=low + + * New upstream release. + + -- Martin-Éric Racine Sun, 5 Feb 2006 00:23:06 +0200 + +cups-pdf (2.0.3-1) unstable; urgency=low + + * New upstream release. + + -- Martin-Éric Racine Sat, 7 Jan 2006 18:15:32 +0200 + +cups-pdf (2.0.2-1) unstable; urgency=low + + * New upstream release. + * Uploading to unstable (Closes: #329751). + + -- Martin-Éric Racine Wed, 4 Jan 2006 19:55:40 +0200 + +cups-pdf (2.0.1-1) experimental; urgency=low + + * New upstream release. + + -- Martin-Éric Racine Wed, 4 Jan 2006 02:01:26 +0200 + +cups-pdf (2.0.0-1) experimental; urgency=low + + * New upstream release (Closes: #329751): + - Improved PostscriptColor PPD now fully conforms with Adobe specs. + - Settings are now fully configurable via /etc/cups/cups-pdf.conf + using the administrator's favorite text editor. + * Updated README.Debian content to document the new features. + + -- Martin-Éric Racine Sat, 31 Dec 2005 18:18:43 +0200 + +cups-pdf (1.7.3-9) unstable; urgency=low + + * Added uupdate action to debian/watch. + + -- Martin-Éric Racine Thu, 22 Dec 2005 12:55:35 +0200 + +cups-pdf (1.7.3-8) unstable; urgency=low + + * Added call to list-missing target of utils.mk CDBS include. + * Replaced compiler options with langcore.mk CDBS include. + + -- Martin-Éric Racine Mon, 19 Dec 2005 20:26:07 +0200 + +cups-pdf (1.7.3-7) unstable; urgency=high + + * The "Making all changes really obvious" release (Closes: #331378): + - Corrected package description to match current output directory. + - Added a debian/NEWS that describes all changes since Sarge. + + -- Martin-Éric Racine Mon, 3 Oct 2005 11:30:08 +0300 + +cups-pdf (1.7.3-6) unstable; urgency=low + + * Fixed maintainer scripts to correctly shuffle the directories. + + -- Martin-Éric Racine Fri, 23 Sep 2005 14:42:30 +0300 + +cups-pdf (1.7.3-5) unstable; urgency=high + + * Changed output directory to $HOME/PDF/ to prevent file clobbering. + * Created a "cups-pdf" system user for anonymous Samba printing jobs: + - Printouts go to /var/spool/cups-pdf/ANONYMOUS/ + (Closes: #319353, #325584, #326001, #326034). + + -- Martin-Éric Racine Fri, 23 Sep 2005 13:36:22 +0300 + +cups-pdf (1.7.3-4) unstable; urgency=low + + * Changed anonymous output directory to upstream default "ANONYMOUS". + * Rewrote README.Debian for better clarity. + + -- Martin-Éric Racine Sat, 27 Aug 2005 14:25:43 +0300 + +cups-pdf (1.7.3-3) unstable; urgency=low + + * Corrected 'gs' dependency to non-virtual package 'gs-esp'. + + -- Martin-Éric Racine Thu, 18 Aug 2005 19:31:12 +0300 + +cups-pdf (1.7.3-2) unstable; urgency=low + + * Added explicit dependency on virtual package 'gs' (Closes: #323012). + + -- Martin-Éric Racine Sun, 14 Aug 2005 19:59:06 +0300 + +cups-pdf (1.7.3-1) unstable; urgency=low + + * New upstream release. + + -- Martin-Éric Racine Thu, 11 Aug 2005 18:52:00 +0300 + +cups-pdf (1.7.1-1) unstable; urgency=low + + * New upstream release. + - Note about CUPS options to operate under Ubuntu (Closes: #300320). + - Note about mounting options for NFS directories (Closes: #307872). + See author's README for details. + * Changed output path from ~/cups-pdf/ to ~/ as per Ubuntu suggestion. + * Updated debian/watch URL. + + -- Martin-Éric Racine Fri, 1 Jul 2005 10:13:31 +0300 + +cups-pdf (1.7.0a-3) unstable; urgency=low + + * Converted debian/control to debian/control.in for CDBS auto-updating. + * Upgraded to Debian Policy 3.6.2 standards; no change required. + + -- Martin-Éric Racine Sun, 19 Jun 2005 12:19:16 +0300 + +cups-pdf (1.7.0a-2) unstable; urgency=low + + * Moved file installation process from debian/rules to debian/install. + * Rewrote the preinst script to handle creation of /var/spool/cups-pdf. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Wed, 4 May 2005 03:47:43 +0300 + +cups-pdf (1.7.0a-1) unstable; urgency=low + + * New upstream release. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Tue, 8 Mar 2005 01:00:36 +0200 + +cups-pdf (1.7.0-1) unstable; urgency=low + + * New upstream release. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Sun, 6 Mar 2005 15:35:50 +0200 + +cups-pdf (1.6.6-1) unstable; urgency=low + + * New upstream release. + * The "We sing the Postscript electric" release (Closes: #293428): + + - additional PA4 (mixes A4 and Letter) paper description from me. + - additional A0-A3 paper descriptions from Sebastian Hegler. + - additional A6-A10 paper descriptions from me. + - changed PC filename to POSTSCRIPTCOLOR.PPD. + - really made A4 the default paper size. + + More paper descriptions could eventually be supported. Please check + and file "wishlist" + items into the Debian BTS for package "cups-pdf". + + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Thu, 10 Feb 2005 10:27:37 +0200 + +cups-pdf (1.6.5-1) unstable; urgency=medium + + * New upstream release. + Definitely closes #286024 with a macro to define the group of new files. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Wed, 5 Jan 2005 07:24:00 +0200 + +cups-pdf (1.6.4-1) unstable; urgency=low + + * New upstream release. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Tue, 4 Jan 2005 03:22:14 +0200 + +cups-pdf (1.6.3-3) unstable; urgency=medium + + * Moved cupsys to Pre-Depends, to ensure that group lpadmin is created + before the installation of cups-pdf (Closes: #286024). + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Fri, 17 Dec 2004 16:13:37 +0200 + +cups-pdf (1.6.3-2) unstable; urgency=medium + + * Changed preinst script to fix ownership of /var/log/cups/cups-pdf_log + to root:lpadmin and permissions to 0600. (Closes: #279251). + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Sat, 27 Nov 2004 10:47:34 +0200 + +cups-pdf (1.6.3-1) unstable; urgency=high + + * New upstream release. + Really fixes Ghostscript call to ensure compatibility with complex + user directory paths. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Fri, 8 Oct 2004 12:44:27 +0300 + +cups-pdf (1.6.2-1) unstable; urgency=high + + * New upstream release. + Fixes user directory case-sensitivity bug. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Tue, 5 Oct 2004 20:17:42 +0300 + +cups-pdf (1.6.1-1) unstable; urgency=low + + * New upstream release (Closes: #267950). + No longer requires users to have a valid shell defined in /etc/passwd. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Sun, 3 Oct 2004 14:10:50 +0300 + +cups-pdf (1.5.2-4) unstable; urgency=high + + * urgency=high because CUPS doesn't update its backend list after cups-pdf + is installed, which required adding a postinstall script to restart it. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Wed, 25 Aug 2004 14:04:38 +0300 + +cups-pdf (1.5.2-3) unstable; urgency=high + + * urgency=high because /var/spool/cups-pdf wasn't automatically created, + which completely prevented normal operation for some people. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Wed, 25 Aug 2004 11:52:38 +0300 + +cups-pdf (1.5.2-2) unstable; urgency=high + + * urgency=high to provoke a build on architectures that remained jamed + during the GCC RC bug this week, which prevented all previous security + fixes from the 1.5.x releases from reaching Testing. + * Changed preinst script to check if /var/log/cups/cups-pdf_log exists, + before trying to secure its permissions (Closes: #265672). + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Sat, 14 Aug 2004 20:39:34 +0300 + +cups-pdf (1.5.2-1) unstable; urgency=high + + * New upstream release. + * urgency=high; fixes vulnerability: + - insecure creation of spoolfile. + Thanks to Florian Zumbiehl for additional auditing. + * Added preinst script that secures /var/log/cups/cups-pdf_log* files. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Wed, 11 Aug 2004 01:06:27 +0300 + +cups-pdf (1.5.1-1) unstable; urgency=high + + * New upstream release. + * urgency=high; fixes several vulnerabilities: + - dangerous access to array element (Closes: #262403). + - format string vulnerability (#262762) patch merged by upstream. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Mon, 9 Aug 2004 13:36:22 +0300 + +cups-pdf (1.5.0-1) unstable; urgency=high + + * New upstream release. + * urgency=high; fixes vulnerability: + - race condition (Closes: #259993). + * Added debian/watch file. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Tue, 3 Aug 2004 20:25:55 +0300 + +cups-pdf (1.4.3-3) unstable; urgency=high + + * urgency=high; fixes vulnerability: + - format string vulnerability (Closes: #262762). + Thanks to Florian Zumbiehl for the patch. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Mon, 2 Aug 2004 13:13:25 +0300 + +cups-pdf (1.4.3-2) unstable; urgency=low + + * Changed file creation mask to 0027. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Sun, 1 Aug 2004 21:07:10 +0300 + +cups-pdf (1.4.3-1) unstable; urgency=high + + * New upstream release. + * urgency=high; fixes several vulnerabilities: + - insecure Ghostscript invocation (Closes: #262402). + - insecure file creation mask (Closes: #262404). + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Sun, 1 Aug 2004 13:03:46 +0300 + +cups-pdf (1.3.1-6) unstable; urgency=low + + * Updated my contact info. No other change. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Sat, 26 Jun 2004 14:17:54 +0300 + +cups-pdf (1.3.1-5) unstable; urgency=low + + * Added NEWS file explaining the situation regarding newer CUPS-PDF releases. + * Sanitized the control file into policy compliance. + * Added missing shlibs:Depends to control file. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Sun, 4 Apr 2004 20:17:15 +0300 + +cups-pdf (1.3.1-4) unstable; urgency=low + + * Upgraded all Debian packaging files to UTF-8 compliance. + * Sponsored by Kenshi Muto. + + -- Martin-Éric Racine Fri, 2 Apr 2004 11:46:45 +0300 + +cups-pdf (1.3.1-3) unstable; urgency=low + + * First Debian upload - sponsored by Kenshi Muto. Thanks! (Closes: #237028) + * Tidied up the documentation and control file. + + -- Martin-Éric Racine Mon, 22 Mar 2004 13:51:28 +0200 + +cups-pdf (1.3.1-2) unstable; urgency=low + + * Upgraded to CDBS. + * Replaced Makefile with debian/rules additions. + + -- Martin-Éric Racine Thu, 4 Dec 2003 20:13:07 +0200 + +cups-pdf (1.3.1-1) unstable; urgency=low + + * New upstream release. + + -- Martin-Éric Racine Sat, 29 Nov 2003 19:20:33 +0200 + +cups-pdf (1.3-1) unstable; urgency=low + + * New upstream release. + * Changelog copied verbatim from cups-pdf.c comments instead of web site. + * README.Debian updated to reflect current default settings. + + -- Martin-Éric Racine Sun, 2 Nov 2003 03:50:03 +0200 + +cups-pdf (1.2-1) unstable; urgency=low + + * New upstream release. + * Created changelog from + + -- Martin-Éric Racine Sun, 26 Oct 2003 13:11:18 +0200 + +cups-pdf (1.1-3) unstable; urgency=low + + * Cleaned up the debian/control file with even more stringent Lintian rules. + * Upgraded Makefile to use debuild. + + -- Martin-Éric Racine Wed, 15 Oct 2003 12:29:18 +0300 + +cups-pdf (1.1-2) unstable; urgency=low + + * Cleaned up the Makefile. + * Cleaned up debian directory with Lintian and Linda. + + -- Martin-Éric Racine Mon, 22 Sep 2003 22:47:47 +0300 + +cups-pdf (1.1-1) unstable; urgency=low + + * First Debian release. + * Created Makefile from scratch. + * Created README from + + -- Martin-Éric Racine Mon, 22 Sep 2003 16:27:44 +0300 --- cups-pdf-2.5.0.orig/debian/prerm +++ cups-pdf-2.5.0/debian/prerm @@ -0,0 +1,45 @@ +#!/bin/sh +# prerm script for cups-pdf + +set -e + +case "$1" in + remove) + # We need CUPS to be running to be able to remove the PDF queue. + if [ -f /etc/init.d/cups ] + then + invoke-rc.d cups force-reload || invoke-rc.d cups start || : + fi + # Wait until CUPS has reloaded its configuration. + if lpstat -h localhost -r 2> /dev/null | grep -q not; then + t=0 + while lpstat -h localhost -r 2> /dev/null | grep -q not; do + t=$(($t + 1)) + if [ $t = 10 ]; then + echo "CUPS failed to reload its configuration!" + break + fi + sleep 1 + done + fi + # Purge all remaining PDF queues. + for queue in $(LC_ALL=C lpstat -h localhost -v 2>/dev/null | grep 'cups-pdf:/' | cut -d ':' -f 1 | cut -d ' ' -f 3) + do + echo | cupsreject -h localhost $queue 2>/dev/null || : + echo | cupsdisable -h localhost $queue 2>/dev/null || : + echo | lpadmin -h localhost -x $queue 2>/dev/null || : + done + ;; + upgrade|deconfigure) + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 --- cups-pdf-2.5.0.orig/debian/README.Debian +++ cups-pdf-2.5.0/debian/README.Debian @@ -0,0 +1,30 @@ +CUPS-PDF for Debian +------------------- +This Debian package of CUPS-PDF is configured as follow: + + * Logging option set to minimum (level 1: errors only). + * Log files created by group "lpadmin" to match CUPS permissions. + * Anonymous Samba output to /var/spool/cups-pdf/ANONYMOUS/ directory. + * Standard output to ${HOME}/PDF/ directory. + +These settings are fully configurable by editing /etc/cups/cups-pdf.conf +using the system administrator's favorite text editor. + +NOTES + + * The optional GNOME package gnome-cups-manager is capable of detecting + this CUPS backend as a suitable ready-to-use printer. + + * CUPS-PDF.PPD is the only recognized backend since 2.4.7 and this is a + feature intended to reduce confusion for the end-user. If you require + paper sizes not supported by CUPS-PDF.PPD, please file a bug report. + + * Ubuntu users should be aware that AppArmor prevents outputing PDF to + non-default locations. AppArmor configurations must be modified also; + editing /etc/cups/cups-pdf.conf isn't enough. + + Executing "sudo aa-complain cupsd" might provide a temporary fix, but + CUPS-PDF maintainers offer no guarantee as to how this might affect a + system's overall security. + + -- Martin-Éric Racine Sun, 14 Sep 2008 12:07:33 +0300 --- cups-pdf-2.5.0.orig/debian/rules +++ cups-pdf-2.5.0/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f +# +# CDBS debian/rules for cups-pdf 1.7 +# Martin-Eric Racine +# +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/utils.mk +include /usr/share/cdbs/1/class/langcore.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk +CC=gcc + +clean:: + rm -f src/*.o src/cups-pdf + +build-arch: + $(CC) $(CFLAGS) $(LDFLAGS) src/cups-pdf.c -o src/cups-pdf + +common-binary-post-install-arch:: list-missing +#EOF --- cups-pdf-2.5.0.orig/debian/postrm +++ cups-pdf-2.5.0/debian/postrm @@ -0,0 +1,56 @@ +#!/bin/sh +# postrm script for cups-pdf + +set -e + +case "$1" in + purge|abort-install) + if [ -f /var/log/cups/cups-pdf_log ] + then + rm /var/log/cups/cups-pdf_log* + fi + if [ -d /var/spool/cups-pdf ] + then + rm -rf /var/spool/cups-pdf + fi + # We need CUPS to be running to be able to remove the PDF queue. + if [ -f /etc/init.d/cups ] + then + invoke-rc.d cups force-reload || invoke-rc.d cups start || : + fi + # Wait until CUPS has reloaded its configuration. + if lpstat -h localhost -r 2> /dev/null | grep -q not; then + t=0 + while lpstat -h localhost -r 2> /dev/null | grep -q not; do + t=$(($t + 1)) + if [ $t = 10 ]; then + echo "CUPS failed to reload its configuration!" + break + fi + sleep 1 + done + fi + # Purge all remaining PDF queues. + for queue in $(LC_ALL=C lpstat -h localhost -v 2>/dev/null | grep 'cups-pdf:/' | cut -d ':' -f 1 | cut -d ' ' -f 3) + do + echo | cupsreject -h localhost $queue 2>/dev/null || : + echo | cupsdisable -h localhost $queue 2>/dev/null || : + echo | lpadmin -h localhost -x $queue 2>/dev/null || : + done + # We need CUPS to reload its configuration to make the backend unavailable. + if [ -f /etc/init.d/cups ] + then + invoke-rc.d cups force-reload || invoke-rc.d cups start || true + fi + ;; + abort-upgrade|upgrade|failed-upgrade|remove|disappear) + ;; + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 --- cups-pdf-2.5.0.orig/debian/install +++ cups-pdf-2.5.0/debian/install @@ -0,0 +1,5 @@ +debian/ubuntu/source_cups-pdf.py usr/share/apport/package-hooks +debian/presubj usr/share/bug/cups-pdf +src/cups-pdf usr/lib/cups/backend +extra/*.ppd* usr/share/ppd/cups-pdf +extra/*.conf etc/cups --- cups-pdf-2.5.0.orig/debian/presubj +++ cups-pdf-2.5.0/debian/presubj @@ -0,0 +1,3 @@ +Please note that CUPS-PDF is never affected by Poppler or XPDF bugs; +only external tools that it uses to generate the PDF are. Therefore, +avoid filing bugs related to those codebases against CUPS-PDF. --- cups-pdf-2.5.0.orig/debian/examples +++ cups-pdf-2.5.0/debian/examples @@ -0,0 +1 @@ +contrib/* --- cups-pdf-2.5.0.orig/debian/control +++ cups-pdf-2.5.0/debian/control @@ -0,0 +1,20 @@ +Homepage: http://www.cups-pdf.de +Source: cups-pdf +Section: graphics +Priority: optional +Maintainer: Ubuntu Developers +Original-Maintainer: Debian CUPS Maintainers +Uploaders: Martin-Éric Racine +Build-Depends: cdbs, debhelper (>= 5) +Standards-Version: 3.9.2 + +Package: cups-pdf +Architecture: any +Depends: cups, cups-client, ghostscript, libpaper-utils, ${shlibs:Depends}, ${misc:Depends} +Suggests: system-config-printer-gnome | system-config-printer-kde | system-config-printer +Description: PDF printer for CUPS + CUPS-PDF provides a PDF Writer backend to CUPS. This can be used as a + virtual printer in a paperless network or to perform testing on CUPS. + . + Documents are written to a configurable directory (by default to ~/PDF) + or can be further manipulated by a post-processing command. --- cups-pdf-2.5.0.orig/debian/compat +++ cups-pdf-2.5.0/debian/compat @@ -0,0 +1 @@ +5 --- cups-pdf-2.5.0.orig/debian/ubuntu/source_cups-pdf.py +++ cups-pdf-2.5.0/debian/ubuntu/source_cups-pdf.py @@ -0,0 +1,14 @@ +# coding: utf-8 +'''apport package hook for cups-pdf + Copyright (C) 2004-2010, Martin-Éric Racine + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. +''' + +from apport.hookutils import * + +def add_info(report): + attach_printing(report) --- cups-pdf-2.5.0.orig/debian/patches/50_cups-pdf_default-debian-conf.patch +++ cups-pdf-2.5.0/debian/patches/50_cups-pdf_default-debian-conf.patch @@ -0,0 +1,40 @@ +diff -Nur cups-pdf-2.4.7/extra/cups-pdf.conf cups-pdf-2.4.7.new/extra/cups-pdf.conf +--- cups-pdf-2.4.7/extra/cups-pdf.conf 2007-05-04 12:54:49.000000000 +0100 ++++ cups-pdf-2.4.7.new/extra/cups-pdf.conf 2007-10-03 19:12:33.000000000 +0100 +@@ -40,7 +40,7 @@ + ## root_squash! + ### Default: /var/spool/cups-pdf/${USER} + +-#Out /var/spool/cups-pdf/${USER} ++Out ${HOME}/PDF + + ### Key: AnonDirName + ## ABSOLUTE path for anonymously created PDF files +@@ -82,7 +82,7 @@ + ## 0: label untitled documents only, 1: label all documents + ### Default: 0 + +-#Label 0 ++Label 0 + + ### Key: TitlePref + ## where to look first for a title when creating the output filename +@@ -170,8 +170,7 @@ + ## created directories and log files + ### Default: lp + +-#Grp lp +- ++Grp lpadmin + + ########################################################################### + # # +@@ -195,7 +194,7 @@ + ## if logging is disabled these setting have no effect + ### Default: 3 + +-#LogType 3 ++LogType 1 + + + ########################################################################### --- cups-pdf-2.5.0.orig/debian/patches/70_cups-pdf_support-pdf-workflow.patch +++ cups-pdf-2.5.0/debian/patches/70_cups-pdf_support-pdf-workflow.patch @@ -0,0 +1,161 @@ +diff -Nur -x '*.orig' -x '*~' cups-pdf-2.5.0/extra/CUPS-PDF.ppd cups-pdf-2.5.0.new/extra/CUPS-PDF.ppd +--- cups-pdf-2.5.0/extra/CUPS-PDF.ppd 2008-03-23 22:43:58.000000000 +0100 ++++ cups-pdf-2.5.0.new/extra/CUPS-PDF.ppd 2009-06-16 11:28:28.000000000 +0200 +@@ -32,7 +32,9 @@ + *ShortNickName: "Generic CUPS-PDF Printer" + *NickName: "Generic CUPS-PDF Printer" + *1284DeviceID: "MFG:Generic;MDL:CUPS-PDF Printer;DES:Generic CUPS-PDF Printer;CLS:PRINTER;CMD:POSTSCRIPT;" +-*% cupsFilter: "application/vnd.cups-postscript 0 pstitleiconv" ++*cupsFilter: "application/vnd.cups-pdf 0 -" ++*cupsFilter: "application/vnd.cups-postscript 100 -" ++*% cupsFilter: "application/vnd.cups-postscript 100 pstitleiconv" + *PSVersion: "(2017.000) 0" + *LanguageLevel: "2" + *ColorDevice: True +diff -Nur -x '*.orig' -x '*~' cups-pdf-2.5.0/src/cups-pdf.c cups-pdf-2.5.0.new/src/cups-pdf.c +--- cups-pdf-2.5.0/src/cups-pdf.c 2009-01-26 12:56:20.000000000 +0100 ++++ cups-pdf-2.5.0.new/src/cups-pdf.c 2009-06-16 11:28:28.000000000 +0200 +@@ -421,11 +421,11 @@ + } + + static int preparespoolfile(FILE *fpsrc, char *spoolfile, char *title, char *cmdtitle, +- int job, struct passwd *passwd) { ++ int job, struct passwd *passwd, int *alreadypdf) { + cp_string buffer; +- int rec_depth,is_title=0; ++ int rec_depth,is_title,size=0; + FILE *fpdest; +- ++ + if (fpsrc == NULL) { + log_event(CPERROR, "failed to open source stream", NULL); + return 1; +@@ -443,36 +443,49 @@ + return 1; + } + log_event(CPDEBUG, "owner set for spoolfile", spoolfile); ++ *alreadypdf=0; + rec_depth=0; + while (fgets(buffer, BUFSIZE, fpsrc) != NULL) { + if (!strncmp(buffer, "%!", 2)) { + log_event(CPDEBUG, "found beginning of postscript code", buffer); + break; ++ } else if (!strncmp(buffer, "%PDF", 2)) { ++ log_event(CPDEBUG, "found beginning of pdf code", buffer); ++ *alreadypdf=1; ++ break; + } + } +- log_event(CPDEBUG, "now extracting postscript code", NULL); +- (void) fputs(buffer, fpdest); +- while (fgets(buffer, BUFSIZE, fpsrc) != NULL) { ++ if (*alreadypdf == 0) { ++ log_event(CPDEBUG, "now extracting postscript code", NULL); + (void) fputs(buffer, fpdest); +- if (!is_title && !rec_depth) +- if (sscanf(buffer, "%%%%Title: %"TBUFSIZE"c", title)==1) { +- log_event(CPDEBUG, "found title in ps code", title); +- is_title=1; ++ while (fgets(buffer, BUFSIZE, fpsrc) != NULL) { ++ (void) fputs(buffer, fpdest); ++ if (!is_title && !rec_depth) ++ if (sscanf(buffer, "%%%%Title: %"TBUFSIZE"c", title)==1) { ++ log_event(CPDEBUG, "found title in ps code", title); ++ is_title=1; ++ } ++ if (!strncmp(buffer, "%!", 2)) { ++ log_event(CPDEBUG, "found embedded (e)ps code", buffer); ++ rec_depth++; + } +- if (!strncmp(buffer, "%!", 2)) { +- log_event(CPDEBUG, "found embedded (e)ps code", buffer); +- rec_depth++; +- } +- else if (!strncmp(buffer, "%%EOF", 5)) { +- if (!rec_depth) { +- log_event(CPDEBUG, "found end of postscript code", buffer); +- break; +- } +- else { +- log_event(CPDEBUG, "found end of embedded (e)ps code", buffer); +- rec_depth--; ++ else if (!strncmp(buffer, "%%EOF", 5)) { ++ if (!rec_depth) { ++ log_event(CPDEBUG, "found end of postscript code", buffer); ++ break; ++ } ++ else { ++ log_event(CPDEBUG, "found end of embedded (e)ps code", buffer); ++ rec_depth--; ++ } + } + } ++ } else { ++ log_event(CPDEBUG, "now passing through pdf code", NULL); ++ (void) fputs(buffer, fpdest); ++ while ((size = fread(buffer, 1, BUFSIZE, fpsrc)) != 0) { ++ (void) fwrite(buffer, 1, size, fpdest); ++ } + } + (void) fclose(fpdest); + (void) fclose(fpsrc); +@@ -522,6 +535,7 @@ + mode_t mode; + struct passwd *passwd; + pid_t pid; ++ int alreadypdf=0; + + if (setuid(0)) { + (void) fputs("cups-pdf cannot be called without root privileges!\n", stderr); +@@ -632,7 +646,7 @@ + log_event(CPDEBUG, "spoolfile name created", spoolfile); + + if (argc == 6) { +- if (preparespoolfile(stdin, spoolfile, title, argv[3], atoi(argv[1]), passwd)) { ++ if (preparespoolfile(stdin, spoolfile, title, argv[3], atoi(argv[1]), passwd, &alreadypdf)) { + free(dirname); + free(spoolfile); + if (logfp!=NULL) +@@ -642,7 +656,7 @@ + log_event(CPDEBUG, "input data read from stdin", NULL); + } + else { +- if (preparespoolfile(fopen(argv[6], "r"), spoolfile, title, argv[3], atoi(argv[1]), passwd)) { ++ if (preparespoolfile(fopen(argv[6], "r"), spoolfile, title, argv[3], atoi(argv[1]), passwd, &alreadypdf)) { + free(dirname); + free(spoolfile); + if (logfp!=NULL) +@@ -680,8 +694,13 @@ + (void) fclose(logfp); + return 5; + } +- snprintf(gscall, size, conf.gscall, conf.ghostscript, conf.pdfver, outfile, spoolfile); +- log_event(CPDEBUG, "ghostscript commandline built", gscall); ++ if (alreadypdf == 0) { ++ snprintf(gscall, size, conf.gscall, conf.ghostscript, conf.pdfver, outfile, spoolfile); ++ log_event(CPDEBUG, "ghostscript commandline built", gscall); ++ } else { ++ snprintf(gscall, size, "cp %s %s", spoolfile, outfile); ++ log_event(CPDEBUG, "file already pdf, simply copying it", gscall); ++ } + + (void) unlink(outfile); + log_event(CPDEBUG, "output file unlinked", outfile); +@@ -698,7 +717,7 @@ + (void) fclose(logfp); + return 5; + } +- log_event(CPDEBUG, "TMPDIR set for GhostScript", getenv("TMPDIR")); ++ log_event(CPDEBUG, "TMPDIR set for subprocess", getenv("TMPDIR")); + + if (logfp!=NULL) + (void) fflush(logfp); +@@ -719,7 +738,7 @@ + (void) umask(0077); + size=system(gscall); + snprintf(title,BUFSIZE,"%d",size); +- log_event(CPDEBUG, "ghostscript has finished", title); ++ log_event(CPDEBUG, "subprocess has finished", title); + if (chmod(outfile, mode)) + log_event(CPERROR, "failed to set file mode for PDF file (non fatal)", outfile); + else --- cups-pdf-2.5.0.orig/debian/patches/60_cups-pdf_remove-contrib-SELinux-HOWTO-bashisms.patch +++ cups-pdf-2.5.0/debian/patches/60_cups-pdf_remove-contrib-SELinux-HOWTO-bashisms.patch @@ -0,0 +1,57 @@ +--- contrib/SELinux-HOWTO/update-module.orig 2007-05-04 14:47:43.000000000 +0300 ++++ contrib/SELinux-HOWTO/update-module 2008-08-13 12:44:21.000000000 +0300 +@@ -16,25 +16,25 @@ SEMODULE=`which semodule` + + echo "" + +-if [ "x$SELINUXENABLED" == "x" ]; then ++if [ "x$SELINUXENABLED" = "x" ]; then + echo "Cannot locate executable 'selinuxenabled' (via 'which' command)." + echo "Script '$0' terminated (exit code 1)." + exit 1 + fi + +-if [ x"$GETENFORCE" == "x" ]; then ++if [ x"$GETENFORCE" = "x" ]; then + echo "Cannot locate executable 'getenforce' (via 'which' command)." + echo "Script '$0' terminated (exit code 2)." + exit 2 + fi + +-if [ x"$GETSEBOOL" == "x" ]; then ++if [ x"$GETSEBOOL" = "x" ]; then + echo "Cannot locate executable 'getsebool' (via 'which' command)." + echo "Script '$0' terminated (exit code 3)." + exit 3 + fi + +-if [ x"$CHECKMODULE" == "x" ]; then ++if [ x"$CHECKMODULE" = "x" ]; then + echo "Cannot locate executable 'checkmodule' (via 'which' command)." + echo "The following command will correct this (re-run this script afterward):" + echo "$ sudo yum install checkpolicy" +@@ -42,13 +42,13 @@ if [ x"$CHECKMODULE" == "x" ]; then + exit 4 + fi + +-if [ x"$SEMODULE_PACKAGE" == "x" ]; then ++if [ x"$SEMODULE_PACKAGE" = "x" ]; then + echo "Cannot locate executable 'semodule_package' (via 'which' command)." + echo "Script '$0' terminated (exit code 5)." + exit 5 + fi + +-if [ x"$SEMODULE" == "x" ]; then ++if [ x"$SEMODULE" = "x" ]; then + echo "Cannot locate executable 'semodule' (via 'which' command)." + echo "Script '$0' terminated (exit code 6)." + exit 6 +@@ -68,7 +68,7 @@ if [ `$GETENFORCE` != "Enforcing" ]; the + exit 12 + fi + +-if [ "`$GETSEBOOL cupsd_disable_trans`" == "cupsd_disable_trans --> on" ]; then ++if [ "`$GETSEBOOL cupsd_disable_trans`" = "cupsd_disable_trans --> on" ]; then + echo "Security policy ignored for cupsd transactions; this script is unnecessary." + echo "The following command will correct this (re-run this script afterward):" + echo "$ sudo setsebool -P cupsd_disable_trans 0" --- cups-pdf-2.5.0.orig/debian/source/format +++ cups-pdf-2.5.0/debian/source/format @@ -0,0 +1 @@ +1.0