CUPS 1.5.3 and custom Mime types - arbitrarily seems to honor or not.

Paul Conklin paul.conklin at cerner.com
Fri May 18 16:05:12 PDT 2012


I'll preface this by saying this morning it worked fine and since cycling the daemon it's broke.

Background.
I have a custom mime type
*.types
application/paul
*.convs
{everything under the sun} application/paul 0 -

so that basically forces all types to go to my custom filter as i have this line in my PPD
*cupsFilter:    "application/paul 0 coffee"

so i'm essentially by-passing the mime types, but still letting users click through the WI (coffee is pretty much just a systemV interface, but i flex based on incoming content type)

This has worked just fine for about as long as 1.4.6 has been out in my 1.4.x environment.  it even was working this morning, but somewhere along the way (and i swear i didn't change anything) it broke.  I'm now seeing this in the log (on debug 2)

I [18/May/2012:17:48:16 -0500] Loaded MIME database from "/usr/share/cups/mime" and "/etc/cups": 36 types, 67 filters...

d [18/May/2012:17:48:16 -0500] cupsdReadConfiguration: type application/pa

Whole lotta lines like this
d [18/May/2012:17:48:16 -0500] cupsdReadConfiguration: filter application/octet-stream to application/paul 0 -


D [18/May/2012:17:48:16 -0500] Loading printer mytest...
d [18/May/2012:17:48:16 -0500] cupsdAddPrinter("mytest")
d [18/May/2012:17:48:16 -0500] cupsdAddPrinter: Adding mytest to Printers
d [18/May/2012:17:48:16 -0500] cupsdSetPrinterReasons(p=0x2ba8b3243850(mytest),s="-cups-insecure-filter-warning,cups-missing-filter-warning"
d [18/May/2012:17:48:16 -0500] cupsdFindBest: uri = "/printers/mytest"...
d [18/May/2012:17:48:16 -0500] cupsdFindBest: Location CUPS_INTERNAL_BROWSE_ACL Limit 0
d [18/May/2012:17:48:16 -0500] cupsdFindBest: Location /admin/conf Limit 7f
d [18/May/2012:17:48:16 -0500] cupsdFindBest: Location /admin Limit 7f
d [18/May/2012:17:48:16 -0500] cupsdFindBest: Location / Limit 7f
d [18/May/2012:17:48:16 -0500] cupsdFindBest: best = /
d [18/May/2012:17:48:16 -0500] cupsdFindPolicyOp(p=0x2ba8b3226520, op=2(Print-Job))
d [18/May/2012:17:48:16 -0500] cupsdFindPolicyOp: Found wildcard match...
D [18/May/2012:17:48:16 -0500] cupsdMarkDirty(P-----)
D [18/May/2012:17:48:16 -0500] cupsdSetBusyState: newbusy="Dirty files", busy="Not busy"
D [18/May/2012:17:48:16 -0500] load_ppd: Loading /etc/cups/ppd/mytest.ppd...
C [18/May/2012:17:48:16 -0500] The PPD file for printer mytest contains no media options and is therefore invalid! <-- I've always received this since its a stub
d [18/May/2012:17:48:16 -0500] cupsdSetPrinterReasons(p=0x2ba8b3243850(mytest),s="-cups-missing-filter-warning,cups-insecure-filter-warning"
d [18/May/2012:17:48:16 -0500] add_printer_filter(p=0x2ba8b3243850(mytest), filtertype=0x2ba8b3243290(printer/mytest), filter="application/vnd.cups-raw 0 -")
d [18/May/2012:17:48:16 -0500] add_printer_filter: mytest: adding filter application/vnd.cups-raw printer/mytest 0 -
d [18/May/2012:17:48:16 -0500] add_printer_filter(p=0x2ba8b3243850(mytest), filtertype=0x2ba8b3243290(printer/mytest), filter="application/vnd.cups-postscript 0 -")
d [18/May/2012:17:48:16 -0500] add_printer_filter: mytest: adding filter application/vnd.cups-postscript printer/mytest 0 -
d [18/May/2012:17:48:16 -0500] add_printer_formats: 37 types, 69 filters
d [18/May/2012:17:48:16 -0500] add_printer_formats: mytest: application/octet-stream needs 1 filters
d [18/May/2012:17:48:16 -0500] add_printer_formats: mytest: application/paul not supported
And then the rest of the filter


 D [18/May/2012:17:48:22 -0500] [Job 2] Auto-typing file...
D [18/May/2012:17:48:22 -0500] [Job 2] Request file type is application/pdf.
d [18/May/2012:17:48:22 -0500] add_file(con=0x2ba8b3275b40[14], job=2, filetype=application/pdf, compression=0)
D [18/May/2012:17:48:22 -0500] cupsdMarkDirty(----J-)
D [18/May/2012:17:48:22 -0500] cupsdSetBusyState: newbusy="Active clients and dirty files", busy="Active clients"
I [18/May/2012:17:48:22 -0500] [Job 2] File of type application/pdf queued by "root".

D [18/May/2012:17:48:22 -0500] [Job 2] envp[29]="FINAL_CONTENT_TYPE=application/vnd.cups-postscript"


I have no idea how it made it's way to postscript in the mime chain.  I do know that when it works, the FINAL_CONTENT_TYPE is application/mytest (which actually looked to be a recurrance of bug STR #1795, but it worked)  I would have expected the FINAL_CONTENT_TYPE to be application/paul

so 2 questions,
1) how do i get the thing to work and go through my filter
2) why on earth is it arbitrarily picking vnd.cups-postscript as the type as the printer doesn't even like postscript and my stubby PPD doesn't have that as a type.





More information about the cups mailing list