pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Cups and Ghostscript



Since I updated CUPS to the version in the current stable pkgsrc branch,
I've had some problems with it. I think I just found out what's going on
(for some of it, anyway).

First, where I'm still puzzling: when I use the web-interface, the cups
webserver on port 631 serves http://localhost:631/cups.css with the
wrong mime-type. It sends application/x-csource, and then Firefox won't
use it.

This is apparently triggered by this bit in
/usr/pkg/share/cups/mime/mime.types:

application/x-csource           c cxx cpp cc C h hpp \
                                printable(0,1024) + ! css + \
                                (string(0,/*) string(0,//) \
                                 string(0,#include) contains(0,1024,<0a>#include) \
                                 string(0,#define) contains(0,1024,<0a>#define))


Despite the "! css", it still somehow matches. I had to remove these lines
to get the css to work.

Also, CUPS now pretty much requires cups-filters. Which in turn depends
on both ghostscript and poppler. That is rather a waste, two big
dependencies for the same thing. And I was under the impression that
poppler was used as a replacement for ghostscript anyway.

That impression is strengthened by the fact that you cannot install
cups-filters and ghostscript-gpl together, if the latter has the cups
option enabled. Both packages install libexec/cups/filter/gstopxl and
libexec/cups/filter/gstoraster.

So, when I wanted to print, it didn't work! And no useful error message
(there was one about a PPD not having a color profile, but that turned
out to be a red herring).

If you crank up the logging enough, you see this (amongst other things)
in /var/log/cups/error_log:

D [11/Dec/2017:22:28:51 +0100] [Job 287] Ghostscript command line: /usr/pkg/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -dNOMEDIAATTRS -sstdout=%stderr -sOutputFile=%stdout -sDEVICE=cups -r600x600 -dMediaPosition=1 -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -dcupsBitsPerColor=1 -dcupsColorOrder=0 -dcupsColorSpace=3 -dcupsCompression=17 -scupsPageSizeName=A4 -I/usr/pkg/share/cups/fonts -c \'<</.HWMargins[10.750000 15.000000 10.750000 15.000000] /Margins[0 0]>>setpagedevice\' -f -_

D [11/Dec/2017:22:28:51 +0100] [Job 287] Unknown device: cups

Soo.... CUPS does use Ghostscript, and it presumes that it has the cups
option! What is going on here...

And now I discover there in /usr/pkg/share/cups/mime:

-rw-r--r--   1 root  wheel   748 Oct 24 22:05 cupsfilters-ghostscript.convs
-rw-r--r--   1 root  wheel   621 Oct 24 22:05 cupsfilters-poppler.convs

Ahhhh! There we see probably where it gets its ideas about Ghostscript
from! The one config file wants to run gstoraster, the other one
pdftoraster...

So... I think the solution is this: cups-filters should get an option to
choose between poppler and ghostscript. Its dependency should be
accordingly, and not both. And it should install only one of the above
config files. Possibly that is all there is to it...

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- Wayland: Those who don't understand X
\X/ rhialto/at/falu.nl      -- are condemned to reinvent it. Poorly.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index