CUPs 1.6.x server does not send PPD/option info to CUPS 1.6.x client #4178

Closed
michaelrsweet opened this Issue Aug 31, 2012 · 10 comments

Comments

Projects
None yet
1 participant
Collaborator

michaelrsweet commented Aug 31, 2012

Version: 1.6.1
CUPS.org User: till.kamppeter

Both server and client are CUPS 1.6.1 on Ubuntu Quantal 12.10 (with Avahi) and the patches of STR #4155, STR #4156, STR #4157, STR #4158, and especially the patch of STR #4159.

Like in STR #4159 I have a raw queue on the client which points to a queue with PPD/driver on the server. In contrary to the 1.5.3 server of STR #4159 I use a CUPS 1.6.1 server now and with this the options of the server's PPD do not show in print dialogs of the client. The client recognizes the queue correctly as one pointing to a remote CUPS server but the PPD/option data is not transferred from the server to the client.

Collaborator

michaelrsweet commented Sep 5, 2012

CUPS.org User: mike

Till,

Can you provide a debug error_log from the server?

Collaborator

michaelrsweet commented Sep 6, 2012

CUPS.org User: till.kamppeter

I have taken two virtual machines, both running Quantal with CUPS 1.6.1, with the patches as mentioned in the initial posting. Both machines have avahi-daemon running. I have removed all print queues and PPD files in /etc/cups/ppd and have reset cupsd.conf to the Ubuntu default. I have also removed all backup files from /etc/cups/.

On both I have set debug mode:

cupsctl LogLevel=debug

On the server (till-quantal2) I create a queue:

cupsctl FileDevice=yes
lpadmin -p lj3390 -E -v file:/tmp/printout -m postscript-hp:0/ppd/hplip/HP/hp-laserjet_3390-ps.ppd

The PPD is a PostScript PPD which comes with HPLIP. It does not use any filter. The queue prints into a file.

I have activated printer sharing via

cupsctl --share-printers

I go to the client (till-quantal) and run

avahi-discover

The printer gets advertised three times in IPv4 and three times in IPv6, in both cases as "UNIX Printer" (LPD), "Internet Printer" (IPP), and "_ipps._tcp".

The printer set up on the server does not appear in the "lpinfo -v" output of the client:

till@till-quantal:$ lpinfo -v
network socket
network ipp
network https
network ipp14
network ipps
network http
network lpd
network beh
network smb
file cups-pdf:/
direct hp
direct hpfax
till@till-quantal:
$

The "dnssd" backend on the client has no output at all:

till@till-quantal:$ sudo /usr/lib/cups/backend/dnssd
DEBUG: sent=0, count=0
till@till-quantal:
$

I created a queue on the client:

lpadmin -p lj3390-quantal2 -E -v ipp://192.168.122.104:631/printers/lj3390

Printing on this queue works, after

lp -d lj3390-quantal2 ~/.bashrc

I get the client's ~/.bashrc as a PostScript file in /tmp/printout on the server. Ghostscript is able to display the file.

I am not able to access the PPD file options of the server's queue from the client:

till@till-quantal:$ lpoptions -p lj3390-quantal2 -l
lpoptions: Unable to get PPD file for lj3390-quantal2: Not Found
till@till-quantal:
$

I am attaching all possibly interesting files from server and client.

Collaborator

michaelrsweet commented Sep 19, 2012

CUPS.org User: till.kamppeter

This problem turned out to be similar to STR #4159, only that here on the client a static queue with IPP URI is created and not with DNS-SD URI. Similar to the fix of STR #4159 the attached patch handles IPP URIs to remote CUPS servers and makes sure that the PPD gets polled from the remote server.

Collaborator

michaelrsweet commented Feb 20, 2013

CUPS.org User: mike

Fixed in Subversion repository.

Collaborator

michaelrsweet commented Feb 20, 2013

"client-till-quantal-cupsd.conf":

LogLevel debug
MaxLogSize 0
SystemGroup lpadmin
Listen localhost:631
Listen /var/run/cups/cups.sock
Browsing Off
BrowseLocalProtocols dnssd
DefaultAuthType Basic
WebInterface Yes

Order allow,deny

<Location /admin>
Order allow,deny

<Location /admin/conf>
AuthType Default
Require user @System
Order allow,deny


JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default

Order deny,allow


Require user @owner @System
Order deny,allow


AuthType Default
Require user @System
Order deny,allow


AuthType Default
Require user @System
Order deny,allow


Require user @owner @System
Order deny,allow


Order deny,allow



JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default

AuthType Default
Order deny,allow


AuthType Default
Require user @owner @System
Order deny,allow


AuthType Default
Require user @System
Order deny,allow


AuthType Default
Require user @System
Order deny,allow


AuthType Default
Require user @owner @System
Order deny,allow


Order deny,allow


FileDevice yes

Collaborator

michaelrsweet commented Feb 20, 2013

"client-till-quantal-printers.conf":

Printer configuration file for CUPS v1.6.1

Written by cupsd

DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING

UUID urn:uuid:a7d185d8-cc9a-3bb0-5dd4-ef1a3dad1959 AuthInfoRequired none Info lj3390 Location DeviceURI ipp://192.168.122.104:631/printers/lj3390 State Idle StateTime 1346932945 Type 6 Accepting Yes Shared No JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy retry-job
Collaborator

michaelrsweet commented Feb 20, 2013

"server-till-quantal2-cupsd.conf":

LogLevel debug
MaxLogSize 0
SystemGroup lpadmin

Allow remote access

Port 631
Listen /var/run/cups/cups.sock
Browsing On
BrowseLocalProtocols dnssd
DefaultAuthType Basic
WebInterface Yes

Allow remote access...

Order allow,deny
Allow all

<Location /admin>

<Location /admin/conf>
AuthType Default
Require user @System


JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default

Order deny,allow


Require user @owner @System
Order deny,allow


AuthType Default
Require user @System
Order deny,allow


AuthType Default
Require user @System
Order deny,allow


Require user @owner @System
Order deny,allow


Order deny,allow



JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default

AuthType Default
Order deny,allow


AuthType Default
Require user @owner @System
Order deny,allow


AuthType Default
Require user @System
Order deny,allow


AuthType Default
Require user @System
Order deny,allow


AuthType Default
Require user @owner @System
Order deny,allow


Order deny,allow


FileDevice yes

Collaborator

michaelrsweet commented Feb 20, 2013

"server-till-quantal2-printers.conf":

Printer configuration file for CUPS v1.6.1

Written by cupsd

DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING

UUID urn:uuid:29461f5c-3277-3ecd-5749-726e9305e6c9 Info lj3390 MakeModel HP LaserJet 3390 Postscript (recommended) DeviceURI file:/tmp/printout State Idle StateTime 1346930352 Type 8425556 Accepting Yes Shared Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy retry-job
Collaborator

michaelrsweet commented Feb 20, 2013

"lpoptions-poll-ppd-of-remote-ipp-printer.patch":

--- cups/util.c~ 2012-09-17 19:17:49.304894301 +0200
+++ cups/util.c 2012-09-19 00:31:01.097492267 +0200
@@ -1723,6 +1723,22 @@

   return (1);
 }
  • else if (device_uri &&
  •    (!strncmp(device_uri, "ipp:", 4) != NULL ||
    
  •     !strncmp(device_uri, "ipps:", 5) != NULL))
    
  • {
  • /*
    
  •  \* Statically-configured IPP shared printer.
    
  •  */
    
  •  httpSeparateURI(HTTP_URI_CODING_ALL,
    
  •                  device_uri,
    
  •                  scheme, sizeof(scheme), username, sizeof(username),
    
  •         host, hostsize, port, resource, resourcesize);
    
  •  ippDelete(response);
    
  •  return (1);
    
  • }
    else if ((attr = ippFindAttribute(response, "member-uris",
    IPP_TAG_URI)) != NULL)
    {
Collaborator

michaelrsweet commented Feb 20, 2013

"str4178.patch":

Index: cups/util.c

--- cups/util.c (revision 10871)
+++ cups/util.c (working copy)
@@ -1713,12 +1713,14 @@
device_uri = attr->values[0].string.text;

 if (device_uri &&
  •    ((strstr(device_uri, "._ipp.") != NULL ||
    
  •      strstr(device_uri, "._ipps.") != NULL) &&
    
  •     !strcmp(device_uri + strlen(device_uri) - 5, "/cups")))
    
  •    (!strncmp(device_uri, "ipp://", 6) ||
    
  •     !strncmp(device_uri, "ipps://", 7) ||
    
  •     ((strstr(device_uri, "._ipp.") != NULL ||
    
  •       strstr(device_uri, "._ipps.") != NULL) &&
    
  •      !strcmp(device_uri + strlen(device_uri) - 5, "/cups"))))
    

    {
    /*

  •  \* Statically-configured Bonjour shared printer.
    
  •  * Statically-configured shared printer.
    

    */

    httpSeparateURI(HTTP_URI_CODING_ALL,

michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment