[Pkg-cups-devel] Bug#544172: Fwd: Bug#544172: cups: please remove useless composite filter cpdftocps

Martin Pitt mpitt at debian.org
Sat Sep 5 12:20:38 UTC 2009


Hello Till,

cpdftocps is a local filter, is this obsolete?

Thanks,

Martin
----- Forwarded message from Tanguy Ortolo <tanguy+debian at ortolo.eu> -----

Date: Sat, 29 Aug 2009 13:19:33 +0200
From: Tanguy Ortolo <tanguy+debian at ortolo.eu>
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: [Pkg-cups-devel] Bug#544172: cups: please remove useless composite
	filter cpdftocps
X-Spam-Status: No, score=0.0 required=4.0 tests=BAYES_50 autolearn=no
	version=3.2.5
Reply-To: Tanguy Ortolo <tanguy+debian at ortolo.eu>, 544172 at bugs.debian.org

Package: cups
Version: 1.3.11-1+b1
Severity: wishlist


Investigating for bug #524201, I found that /usr/lib/cups/filter/cpdftocps,
used for application/vnd.cups-pdf -> application/vnd.cups-postscript (cost 22)
is not a single filter, but the aggregation of two:
/usr/lib/cups/filter/pdftops and /usr/lib/cups/filter/pstops.

Indeed, at the end of it:
cat "$infile" | \
  /usr/lib/cups/filter/pdftops "$@" | \
  /usr/lib/cups/filter/pstops "$1" "$2" "$3" "$copies" "$collate $MASKED_OPTS"

This has two drawbacks:
1. declaring a cost of 22 is a lie, and makes CUPS use this filter preferently,
   even if it costs in reality twice that;
2. this filter uses a temporary file, that could have been avoided by other
   cleaner filters.

For instance, to transform an application/postscript into
application/vnd.cups-postscript, this is what CUPS does:
- application/postscript     application/pdf                 pstopdf    22
- application/pdf            application/vnd.cups-pdf        pdftopdf   22
- application/vnd.cups-pdf   application/vnd.cups-postscript cpdftocps “22”
  which, in reality, does:
  - application/vnd.cups-pdf application/postscript (!)      pdftops    22
  - application/postscript   application/vnd.cups-postscript pstops     66
Yes, this looks crazy, transforming regular PostScript into regular PDF, then
filtered PDF, then again regular PostScript, and finally filtered PostScript,
just to be able to claim we are using PDF, which is a modern format. In
addition, as stated in bug #524201, that workflow just does not work, and makes
cupsd kill itself. And, finally, this cpdftocps does not respect the CUPS
filter(7) convention, as it is unable to handle files that are passed as
command line arguments instead of stdin (I shall make another report for that).

For comparison, here is what CUPS used to do for the same result before pushing
PDF at any cost:
- application/postscript     application/vnd.cups-postscript pstops     66

So, te restablish a sane filtering workflow, I suggest either:
1. to remove this strange cpdftocps filter: aggregating filters is CUPS
   scheduler's job, and should not be done inside filters themselves;
2. to keep it if it is really necessary to claim there is a “full PDF” workflow,
   but to declare its actual cost, 88 (or 122, as pstops is now marked as
   costing 100);
3. to write a real application/vnd.cups-pdf -> application/vnd.cups-postscript
   filter. :-)

Regards,

-- 
Tanguy Ortolo

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-1-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages cups depends on:
ii  adduser                3.110             add and remove users and groups
ii  bc                     1.06.94-3.1       The GNU bc arbitrary precision cal
ii  cups-client            1.3.11-1+b1       Common UNIX Printing System(tm) - 
ii  cups-common            1.3.11-1          Common UNIX Printing System(tm) - 
ii  debconf [debconf-2.0]  1.5.27            Debian configuration management sy
ii  ghostscript            8.70~dfsg-2       The GPL Ghostscript PostScript/PDF
ii  libavahi-compat-libdns 0.6.25-1          Avahi Apple Bonjour compatibility 
ii  libc6                  2.9-25            GNU C Library: Shared libraries
ii  libcups2               1.3.11-1+b1       Common UNIX Printing System(tm) - 
ii  libcupsimage2          1.3.11-1+b1       Common UNIX Printing System(tm) - 
ii  libdbus-1-3            1.2.16-2          simple interprocess messaging syst
ii  libgcc1                1:4.4.1-1         GCC support library
ii  libgnutls26            2.8.3-1           the GNU TLS library - runtime libr
ii  libgssapi-krb5-2       1.7dfsg~beta3-1   MIT Kerberos runtime libraries - k
ii  libijs-0.35            0.35-7            IJS raster image transport protoco
ii  libkrb5-3              1.7dfsg~beta3-1   MIT Kerberos runtime libraries
ii  libldap-2.4-2          2.4.17-1          OpenLDAP libraries
ii  libpam0g               1.0.1-10          Pluggable Authentication Modules l
ii  libpaper1              1.1.23+nmu1       library for handling paper charact
ii  libpoppler4            0.10.6-1          PDF rendering library
ii  libslp1                1.2.1-7.6         OpenSLP libraries
ii  libstdc++6             4.4.1-1           The GNU Standard C++ Library v3
ii  lsb-base               3.2-23            Linux Standard Base 3.2 init scrip
ii  perl-modules           5.10.0-25         Core Perl modules
ii  poppler-utils [xpdf-ut 0.10.6-1          PDF utilitites (based on libpopple
ii  procps                 1:3.2.8-1         /proc file system utilities
ii  ssl-cert               1.0.23            simple debconf wrapper for OpenSSL
ii  ttf-freefont           20080323-3        Freefont Serif, Sans and Mono True
ii  zlib1g                 1:1.2.3.3.dfsg-15 compression library - runtime

Versions of packages cups recommends:
ii  avahi-utils               0.6.25-1       Avahi browsing, publishing and dis
ii  cups-driver-gutenprint    5.2.4-1        printer drivers for CUPS
ii  foomatic-filters          4.0-20090509-1 OpenPrinting printer support - fil
ii  ghostscript-cups          8.70~dfsg-2    The GPL Ghostscript PostScript/PDF
ii  smbclient                 2:3.3.4-1      command-line SMB/CIFS clients for 

Versions of packages cups suggests:
ii  cups-bsd                  1.3.11-1+b1    Common UNIX Printing System(tm) - 
pn  cups-pdf                  <none>         (no description available)
ii  foomatic-db               20090616-1     OpenPrinting printer support - dat
ii  foomatic-db-engine        4.0-20090509-1 OpenPrinting printer support - pro
pn  hplip                     <none>         (no description available)
pn  xpdf-korean | xpdf-japane <none>         (no description available)

-- debconf information:
  cupsys/raw-print: true
  cupsys/backend: ipp, lpd, parallel, socket, usb



_______________________________________________
Pkg-cups-devel mailing list
Pkg-cups-devel at lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-cups-devel

----- End forwarded message -----

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)





More information about the Pkg-cups-devel mailing list