diff -u cups-pdf-2.5.0/debian/changelog cups-pdf-2.5.0/debian/changelog --- cups-pdf-2.5.0/debian/changelog +++ cups-pdf-2.5.0/debian/changelog @@ -1,3 +1,16 @@ +cups-pdf (2.5.0-1ubuntu1) jaunty; urgency=low + + * Merge from Debian unstable (LP: #324508). Remaining Ubuntu changes: + - debian/postinst, debian/prerm: Let PDF print queue being created + automatically when installing the package and being removed + automatically when uninstalling the package. + - debian/postinst: Updated PPD file name to the new one used by the + upstream package (LP: #241701). Updated the name of the CUPS startup + script to "cups". + * debian/postrm: Changed cups checking command from invoke-rc.d to lpstat -r + + -- Fabrice Coutadeur Tue, 27 Jan 2009 16:31:09 +0100 + cups-pdf (2.5.0-1) unstable; urgency=low * New upstream release: @@ -9,6 +22,18 @@ -- Martin-Éric Racine Mon, 26 Jan 2009 20:38:49 +0200 +cups-pdf (2.4.8-4ubuntu1) jaunty; urgency=low + + * Merge from debian unstable (LP: #310290), remaining changes: + - debian/postinst, debian/prerm: Let PDF print queue being created + automatically when installing the package and being removed + automatically when uninstalling the package. + - debian/postinst: Updated PPD file name to the new one used by the + upstream package (LP: #241701). Updated the name of the CUPS startup + script to "cups". + + -- Manny Vindiola Sun, 21 Dec 2008 14:46:56 -0500 + cups-pdf (2.4.8-4) unstable; urgency=low * Updated README.Debian to reflect the fact that CUPS-PDF.PPD is now @@ -31,6 +56,18 @@ -- Martin-Éric Racine Mon, 23 Jun 2008 18:32:20 +0300 +cups-pdf (2.4.8-1ubuntu1) intrepid; urgency=low + + * Merge from debian unstable, remaining changes: + - debian/postinst, debian/prerm: Let PDF print queue being created + automatically when installing the package and being removed + automatically when uninstalling the package. + * debian/postinst: Updated PPD file name to the new one used by the + upstream package (LP: #241701). Updated the name of t5he CUPS startup + script to "cups". + + -- Till Kamppeter Mon, 23 Jun 2008 15:42:30 +0200 + cups-pdf (2.4.8-1) unstable; urgency=low * New upstream release (Closes: #472631). @@ -44,6 +81,17 @@ -- Martin-Éric Racine Fri, 20 Jun 2008 20:14:08 +0300 +cups-pdf (2.4.7-3ubuntu1) intrepid; urgency=low + + * Merge from debian unstable, remaining changes: + - debian/postinst, debian/prerm: Let PDF print queue being created + automatically when installing the package and being removed + automatically when uninstalling the package. + * debian/patches/10_auto_assign_ppd.patch: Removed, applied upstream. + * debian/patches/01_mkdir_as_user.patch: Removed, applied upstream. + + -- Till Kamppeter Wed, 11 Jun 2008 9:49:55 +0200 + cups-pdf (2.4.7-3) unstable; urgency=low * Added alternatives for the upcoming Debian CUPS packages renaming. @@ -81,6 +129,44 @@ -- Martin-Éric Racine Sun, 23 Dec 2007 15:46:31 +0200 +cups-pdf (2.4.6-4ubuntu2) hardy; urgency=low + + * Suggest both frontends system-config-printer-gnome | + system-config-printer-kde + + -- Jonathan Riddell Thu, 24 Jan 2008 11:28:38 +0000 + +cups-pdf (2.4.6-4ubuntu1) hardy; urgency=low + + * Merge from debian unstable, remaining changes: + - debian/control: "Depends: ghostscript | gs-esp | gs-gpl, libpaper-utils, + cupsys, cupsys-client", "Suggests: system-config-printer" + - debian/patches/01_mkdir_as_user.patch: Postpone creation of per-user + output directory until we setuid()'ed to the user. This both avoids + nasty mistakes, and also avoids using CAP_DAC_OVERRIDE, so that we + can tighten cups' apparmor profile. + - debian/patches/10_auto_assign_ppd.patch: Make the PPD automatically + assigned to the PDF printer by CUPS/printer setup tools + - debian/patches/50_default_conf.patch, extra/cups-pdf.conf: Move the + default configuration changes into a patch 50_default_conf.patch, so + that the diff.gz is now free of upstream diffs. + - debian/rules: Enabled the package for applying patches by adding + "include /usr/share/cdbs/1/rules/simple-patchsys.mk" + - debian/postinst, debian/prerm: Let PDF print queue being created + automatically when installing the package and being removed + automatically when uninstalling the package. + * debian/postinst, debian/postrm: Restart of CUPS daemon not needed, + restarting only causes CUPS daemon not listening immediately after + restart and so the PDF queue not being created. So removed any + restart of the CUPS daemon from the maintainer script. We only start + the CUPS daemon if it is not actually running, because we need it + for having a PDF printer (LP: #152293). + * debian/postinst: Create CUPS queue by modifying config files in the + case that the CUPS daemon could not be started or if CUPS is not + installed. + + -- Till Kamppeter Mon, 19 Nov 2007 15:00:19 +0000 + cups-pdf (2.4.6-4) unstable; urgency=low [ Martin Pitt ] @@ -92,6 +178,110 @@ -- Martin-Éric Racine Sat, 11 Aug 2007 22:29:33 +0300 +cups-pdf (2.4.6-3ubuntu10) gutsy; urgency=low + + * debian/postinst: Before creating a CUPS queue wait 3 seconds to be sure + that the CUPS daemon is listening (LP: #152293). + + -- Till Kamppeter Sat, 13 Oct 2007 19:56:19 +0100 + +cups-pdf (2.4.6-3ubuntu9) gutsy; urgency=low + + * debian/patches/50_default_conf.patch: Withdrawn the chnage of the PDF + destination to ~/Desktop, returned to ~/PDF, also do not let cups-pdf + label documents with job numbers by default (see LP bugs 134682 and + 134671). + * debian/control: Removed the versioned require on cupsys, as we have + withdrawn the change of the PDF destination. + + -- Till Kamppeter Thu, 5 Oct 2007 12:56:19 +0100 + +cups-pdf (2.4.6-3ubuntu8) gutsy; urgency=low + + * debian/patches/50_default_conf.patch: Use ~/Desktop as default destination + for the PDF files so that users find them more easily (LP: #134682, + LP: #134671) + * debian/prerm, debian/postinst: Make any failure of CUPS command line tools + non-fatal, to not affect the setup of cups-pdf if CUPS crashes immediately + after being restarted by the cups-pdf setup (LP: #136449, LP: #147974). + * debian/control: Require cupsys 1.3.2-1ubuntu2 or newer, to have + AppArmor restrictions allowing to write into ~/Desktop. + + -- Till Kamppeter Wed, 4 Oct 2007 17:56:19 +0100 + +cups-pdf (2.4.6-3ubuntu7) gutsy; urgency=low + + * debian/control: Add explicit cupsys-client dependency, since the postinst + needs 'lpadmin' and cupsys itself only recommends -client. + (LP: #134453) + + -- Martin Pitt Tue, 02 Oct 2007 09:14:03 +0200 + +cups-pdf (2.4.6-3ubuntu6) gutsy; urgency=low + + * debian/postinst: Fix invocation of "lpstat -r" (remove backticks). This + makes the automatic setup of the PDF queue actually work again. + + -- Martin Pitt Mon, 01 Oct 2007 16:49:53 +0200 + +cups-pdf (2.4.6-3ubuntu5) gutsy; urgency=low + + * debian/postinst: force PDF queues on localhost only; systems configured + for remote CUPS servers are not expecting it. + + -- Kees Cook Thu, 23 Aug 2007 13:24:36 -0700 + +cups-pdf (2.4.6-3ubuntu4) gutsy; urgency=low + + * debian/postinst, debian/prerm: Check, create, or remove PDF queues only + if the CUPS daemon is running, otherwise go on silently (LP: #133743). + + -- Till Kamppeter Tue, 21 Aug 2007 10:56:19 +0100 + +cups-pdf (2.4.6-3ubuntu3) gutsy; urgency=low + + * debian/postinst: Only set up the PDF queue, do not make it the default. + Otherwise the PDF queue would stay the default when the first real printer + is detected after installation and as the installation of the packages + happens before the detection of the printers all systems will have the PDF + queue as default. + + -- Till Kamppeter Mon, 20 Aug 2007 10:55:19 +0100 + +cups-pdf (2.4.6-3ubuntu2) gutsy; urgency=low + + [ Till Kamppeter ] + * debian/control: Updated dependencies: ghostscript, paperconf. + * debian/postinst, debian/prerm: Create a PDF print queue when installing + and take it down when uninstalling (LF: #82674) + * debian/patches/10_auto_assign_ppd.patch: Make the PPD automatically + assigned to the PDF printer by CUPS/printer setup tools + * debian/rules: Enabled the package for applying patches by adding + "include /usr/share/cdbs/1/rules/simple-patchsys.mk" + + [ Martin Pitt ] + * Now that we use simple-patchsys.mk, make a proper patch + debian/patches/01_mkdir_as_user.patch from the src/cups-pdf.c change in + the last upload. Also move the default configuration changes into a patch + 50_default_conf.patch, so that the diff.gz is now free of upstream diffs. + * debian/postinst: If paperconf fails, fall back to paper size "a4". + + -- Martin Pitt Wed, 15 Aug 2007 08:55:19 +0200 + +cups-pdf (2.4.6-3ubuntu1) gutsy; urgency=low + + * Sync with latest Debian version. + * src/cups-pdf.c: Postpone creation of per-user output directory until we + setuid()'ed to the user. This both avoids nasty mistakes, and also avoids + using CAP_DAC_OVERRIDE, so that we can tighten cups' apparmor profile. + * debian/postinst: Change /usr/lib/cups/backend/cups-pdf permissions from + 4751 (which was still necessary for the non-root cups) to 0700 (in + accordance with upstream's requirements). + * debian/postinst: Make /var/spool/cups-pdf/ANONYMOUS sticky, since it is + world-writeable. + + -- Martin Pitt Sat, 11 Aug 2007 16:20:23 +0200 + cups-pdf (2.4.6-3) unstable; urgency=low * Implemented a basic reportbug script to remind people not to file diff -u cups-pdf-2.5.0/debian/postinst cups-pdf-2.5.0/debian/postinst --- cups-pdf-2.5.0/debian/postinst +++ cups-pdf-2.5.0/debian/postinst @@ -14,9 +14,81 @@ chown nobody:nogroup /var/spool/cups-pdf/ANONYMOUS chmod 1777 /var/spool/cups-pdf/ANONYMOUS chmod 0700 /usr/lib/cups/backend/cups-pdf + # This package needs the CUPS daemon running to actually work if [ -f /etc/init.d/cups ] then - invoke-rc.d cups force-reload || invoke-rc.d cups start || /bin/true + lpstat -r > /dev/null 2>&1 || invoke-rc.d cups start || /bin/true + fi + if lpstat -r > /dev/null 2>&1 + then + # Create a PDF CUPS queue if we have none yet (only + # if CUPS daemon is running) + if [ -z "`LC_ALL=C lpstat -v 2>/dev/null | grep 'cups-pdf:/'`" ] + then + # Find a name for the PDF queue + queue=PDF + number=0 + while LC_ALL=C lpstat -v 2>/dev/null | cut -d ':' -f 1 | cut -d ' ' -f 3 | grep -q ^$queue\$ + do + number=$(($number + 1)) + queue="PDF$number" + done + # Find system's default paper size + size="`LC_ALL=C paperconf 2>/dev/null`" || size=a4 + # Create the queue + lpadmin -h localhost -p $queue -E -v cups-pdf:/ -m lsb/usr/cups-pdf/CUPS-PDF.ppd -o printer-is-shared=no -o PageSize=$size 2>/dev/null || : + # Set the PDF printer as default when there is not + # already a default printer + #if [ -z "`LC_ALL=C lpstat -d 2>/dev/null | grep 'system default destination:'`" ] + #then + # lpadmin -d $queue 2>/dev/null || : + #fi + fi + else + # Create a PDF CUPS queue if we have none yet (for the + # case that CUPS is not running or even not installed) + if [ -z "`grep 'DeviceURI cups-pdf:/' /etc/cups/printers.conf 2> /dev/null`" ] + then + # Find a name for the PDF queue + queue=PDF + number=0 + while grep -q "Printer $queue>" /etc/cups/printers.conf + do + number=$(($number + 1)) + queue="PDF$number" + done + # Find system's default paper size + size="`LC_ALL=C paperconf 2>/dev/null`" || size=a4 + # Create the queue + time=`date +%s` + mkdir -p /etc/cups/ppd + cat << EOF >> /etc/cups/printers.conf + +Info Print into PDF file +DeviceURI cups-pdf:/ +State Idle +StateTime $time +Accepting Yes +Shared No +JobSheets none none +QuotaPeriod 0 +PageLimit 0 +KLimit 0 +OpPolicy default +ErrorPolicy retry-job + +EOF + cp /usr/share/ppd/cups-pdf/CUPS-PDF.ppd /etc/cups/ppd/$queue.ppd + ucsize=`echo $size | perl -p -e 's/^(\S)(\S*)/uc($1) . $2/e'` + perl -p -i -e 's/^(\*DefaultPageSize:\s*)\S+/$1'$ucsize'/' /etc/cups/ppd/$queue.ppd + perl -p -i -e 's/^(\*DefaultPageRegion:\s*)\S+/$1'$ucsize'/' /etc/cups/ppd/$queue.ppd + perl -p -i -e 's/^(\*DefaultImageableArea:\s*)\S+/$1'$ucsize'/' /etc/cups/ppd/$queue.ppd + perl -p -i -e 's/^(\*DefaultPaperDimension:\s*)\S+/$1'$ucsize'/' /etc/cups/ppd/$queue.ppd + if [ -f /etc/init.d/cups ] + then + lpstat -r > /dev/null 2>&1 || invoke-rc.d cups start || /bin/true + fi + fi fi ;; diff -u cups-pdf-2.5.0/debian/control cups-pdf-2.5.0/debian/control --- cups-pdf-2.5.0/debian/control +++ cups-pdf-2.5.0/debian/control @@ -1,7 +1,8 @@ Source: cups-pdf Section: graphics Priority: optional -Maintainer: Debian CUPS Maintainers +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Debian CUPS Maintainers Uploaders: Martin-Éric Racine Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5) Standards-Version: 3.7.3 diff -u cups-pdf-2.5.0/debian/postrm cups-pdf-2.5.0/debian/postrm --- cups-pdf-2.5.0/debian/postrm +++ cups-pdf-2.5.0/debian/postrm @@ -15,7 +15,7 @@ fi if [ -f /etc/init.d/cups ] then - invoke-rc.d cups force-reload || invoke-rc.d cups start || /bin/true + lpstat -r > /dev/null 2>&1 || invoke-rc.d cups start || /bin/true fi ;; only in patch2: unchanged: --- cups-pdf-2.5.0.orig/debian/prerm +++ cups-pdf-2.5.0/debian/prerm @@ -0,0 +1,29 @@ +#! /bin/sh +# prerm script for cups-pdf + +set -e + +case "$1" in + remove) + # Remove all PDF queues (only if CUPS daemon is running) + if `lpstat -r > /dev/null 2>&1` + then + for queue in `LC_ALL=C lpstat -v 2>/dev/null | grep 'cups-pdf:/' | cut -d ':' -f 1 | cut -d ' ' -f 3` + do + lpadmin -x $queue 2>/dev/null || : + done + fi + ;; + upgrade|deconfigure) + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0