Options in /etc/cups/printers.conf
Hi,
I have a problem with non-PPD options set in /etc/cups/printers.conf.
For filters and cups-browsed I have defined some options foor being stored in /etc/cups/printers.conf which are not options of CUPS itself.
I set these options via
lpadmin -p <printer> -o <option>-default=<value>
getting a line
Option <option> <value>
in the entry of <printer>. What works is that these options get supplied with every job, so I can use such options to configure filters or to get filters into a debug mode. I am using this successfully for example with the "usb" CUPS backend to find quirk rules for broken USB printers.
Now I also want to use this simply to mark print queues (setting an option which is ignored by all filters). For example all queues created by cups-browsed get the cups-browsed boolean option set by doing the IPP equivalent of:
lpadmin -p <printer> -o cups-browsed-default
resulting in a line
Option cups-browsed true
in /etc/cups/printers.conf. This way I want that if cups-browsed not closed cleanly (system crash) and so did not remove the queues it created in the next session finds these queues and treats them correctly, so that crashes do not lead to ghost queues.
Now it seems that I cannot read out this option setting (without sending a job and checking error_log), as
lpoptions -p <printer>
does not list the option (as "cups-browsed" or "cups-browsed=true") and
val = cupsGetOption("cups-browsed", dest->num_options, dest->options)
in a C program (with dest being the record of the printer in question) gives val = NULL as one gets when requesting the value of a non-existing option.
In CUPS 1.5.x (Ubuntu Precise, 12.04 LTS) this still worked. both cups-browsed was able to read out the "cups-browsed" marker option from its queues via the C line shown above and
lpoptions -p <printer>
contains "cups-browsed=true" in its output.
I would consider this a bug in CUPS 1.6.x. Mike can you have a look? Thanks.
Till
Filed as Apple bug:
<rdar://problem/14401795> cups.org: xxx-default options set from lpadmin are not returned by Get-Printer-Attributes
I was able to reproduce both with lpoptions and ipptool. I'll let you know when I have a fix...
Quoted 53 lines · Till Kamppeter
Hi,
I have a problem with non-PPD options set in
/etc/cups/printers.conf.For filters and cups-browsed I have defined some options foor being stored in
/etc/cups/printers.confwhich are not options of CUPS itself.I set these options via
lpadmin -p <printer> -o <option>-default=<value>
getting a line
Option <option> <value>
in the entry of <printer>. What works is that these options get supplied with every job, so I can use such options to configure filters or to get filters into a debug mode. I am using this successfully for example with the "usb" CUPS backend to find quirk rules for broken USB printers.
Now I also want to use this simply to mark print queues (setting an option which is ignored by all filters). For example all queues created by cups-browsed get the cups-browsed boolean option set by doing the IPP equivalent of:
lpadmin -p <printer> -o cups-browsed-default
resulting in a line
Option cups-browsed true
in
/etc/cups/printers.conf. This way I want that if cups-browsed not closed cleanly (system crash) and so did not remove the queues it created in the next session finds these queues and treats them correctly, so that crashes do not lead to ghost queues.Now it seems that I cannot read out this option setting (without sending a job and checking
error_log), aslpoptions -p <printer>
does not list the option (as "cups-browsed" or "cups-browsed=true") and
val =
cupsGetOption("cups-browsed", dest->num_options, dest->options)in a C program (with dest being the record of the printer in question) gives val = NULL as one gets when requesting the value of a non-existing option.
In CUPS 1.5.x (Ubuntu Precise, 12.04 LTS) this still worked. both cups-browsed was able to read out the "cups-browsed" marker option from its queues via the C line shown above and
Quoted 7 lines
lpoptions -p <printer>
contains "cups-browsed=true" in its output.
I would consider this a bug in CUPS 1.6.x. Mike can you have a look? Thanks.
Till
_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair
Till,
Here is the patch for 1.7 (1.7rc1 to be released soon):
usersys.c +2 -0
@@ -365,6 +365,8 @@else if (!strcmp (options,"version=2.2" )) cg->server_version =22 ; } +else + cg->server_version =20 ;if (cg->server[0 ] !='/' && (port =strrchr (cg->server,':' )) !=NULL && !strchr (port,']' ) &&isdigit (port[1 ] &255 ))
globals.c +0 -1
@@ -215,7 +215,6 @@ cg->any_root =1 ; cg->expired_certs =1 ; cg->expired_root =1 ; - cg->server_version =20 ;/* * Then set directories as appropriate...
ipp.c +3 -0
@@ -2340,6 +2340,9 @@* Set default version - usually 2.0... */ +if (cg->server_version ==0 ) +_cupsSetDefaults (); + temp->request.any.version[0 ] = cg->server_version /10 ; temp->request.any.version[1 ] = cg->server_version %10 ; temp->use =1 ;
However, when I went back to test on 1.6 TOT I was unable to reproduce there. Either I had already fixed the problem for 1.6.3 or it wasn't already broken. The changes in 1.7 (to filter encoded attributes based on operation code) were responsible for the breakage there, but 1.6 doesn't include that code...
Quoted 70 lines · Michael Sweet
Filed as Apple bug:
<rdar://problem/14401795> cups.org: xxx-default options set from lpadmin are not returned by Get-Printer-Attributes
I was able to reproduce both with lpoptions and ipptool. I'll let you know when I have a fix...
Quoted 53 lines · Till Kamppeter
Hi,
I have a problem with non-PPD options set in
/etc/cups/printers.conf.For filters and cups-browsed I have defined some options foor being stored in
/etc/cups/printers.confwhich are not options of CUPS itself.I set these options via
lpadmin -p <printer> -o <option>-default=<value>
getting a line
Option <option> <value>
in the entry of <printer>. What works is that these options get supplied with every job, so I can use such options to configure filters or to get filters into a debug mode. I am using this successfully for example with the "usb" CUPS backend to find quirk rules for broken USB printers.
Now I also want to use this simply to mark print queues (setting an option which is ignored by all filters). For example all queues created by cups-browsed get the cups-browsed boolean option set by doing the IPP equivalent of:
lpadmin -p <printer> -o cups-browsed-default
resulting in a line
Option cups-browsed true
in
/etc/cups/printers.conf. This way I want that if cups-browsed not closed cleanly (system crash) and so did not remove the queues it created in the next session finds these queues and treats them correctly, so that crashes do not lead to ghost queues.Now it seems that I cannot read out this option setting (without sending a job and checking
error_log), aslpoptions -p <printer>
does not list the option (as "cups-browsed" or "cups-browsed=true") and
val =
cupsGetOption("cups-browsed", dest->num_options, dest->options)in a C program (with dest being the record of the printer in question) gives val = NULL as one gets when requesting the value of a non-existing option.
In CUPS 1.5.x (Ubuntu Precise, 12.04 LTS) this still worked. both cups-browsed was able to read out the "cups-browsed" marker option from its queues via the C line shown above and
Quoted 7 lines
lpoptions -p <printer>
contains "cups-browsed=true" in its output.
I would consider this a bug in CUPS 1.6.x. Mike can you have a look? Thanks.
Till
Quoted 7 lines
_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair_______________________________________________
Printing-architecture mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture
_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair
Thank you for the patch, but the patch you have attached is wrong. The attached patch is for the IPP version probl;em in client.conf (Apple bug #14401718, Debian bug #711848).
My problem is Apple bug #14401795.
Till
Quoted 94 lines · Michael Sweet
Till,
Here is the patch for 1.7 (1.7rc1 to be released soon):
However, when I went back to test on 1.6 TOT I was unable to reproduce there. Either I had already fixed the problem for 1.6.3 or it wasn't already broken. The changes in 1.7 (to filter encoded attributes based on operation code) were responsible for the breakage there, but 1.6 doesn't include that code...
Quoted 70 lines · Michael Sweet
Filed as Apple bug:
<rdar://problem/14401795> cups.org: xxx-default options set from lpadmin are not returned by Get-Printer-Attributes
I was able to reproduce both with lpoptions and ipptool. I'll let you know when I have a fix...
Quoted 53 lines · Till Kamppeter
Hi,
I have a problem with non-PPD options set in
/etc/cups/printers.conf.For filters and cups-browsed I have defined some options foor being stored in
/etc/cups/printers.confwhich are not options of CUPS itself.I set these options via
lpadmin -p <printer> -o <option>-default=<value>
getting a line
Option <option> <value>
in the entry of <printer>. What works is that these options get supplied with every job, so I can use such options to configure filters or to get filters into a debug mode. I am using this successfully for example with the "usb" CUPS backend to find quirk rules for broken USB printers.
Now I also want to use this simply to mark print queues (setting an option which is ignored by all filters). For example all queues created by cups-browsed get the cups-browsed boolean option set by doing the IPP equivalent of:
lpadmin -p <printer> -o cups-browsed-default
resulting in a line
Option cups-browsed true
in
/etc/cups/printers.conf. This way I want that if cups-browsed not closed cleanly (system crash) and so did not remove the queues it created in the next session finds these queues and treats them correctly, so that crashes do not lead to ghost queues.Now it seems that I cannot read out this option setting (without sending a job and checking
error_log), aslpoptions -p <printer>
does not list the option (as "cups-browsed" or "cups-browsed=true") and
val =
cupsGetOption("cups-browsed", dest->num_options, dest->options)in a C program (with dest being the record of the printer in question) gives val = NULL as one gets when requesting the value of a non-existing option.
In CUPS 1.5.x (Ubuntu Precise, 12.04 LTS) this still worked. both cups-browsed was able to read out the "cups-browsed" marker option from its queues via the C line shown above and
Quoted 7 lines
lpoptions -p <printer>
contains "cups-browsed=true" in its output.
I would consider this a bug in CUPS 1.6.x. Mike can you have a look? Thanks.
Till
Quoted 7 lines
_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair_______________________________________________
Printing-architecture mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair
Till,
Whoops, sorry:
encode.c +1 -1
@@ -534,7 +534,7 @@else ops ++; -if (*ops ==IPP_OP_CUPS_NONE ) +if (*ops ==IPP_OP_CUPS_NONE && op !=IPP_OP_CUPS_NONE ) {DEBUG_printf (("2cupsEncodeOptions2: Skipping \"%s\"." , option->name));continue ;
Also, I now have an official GIT mirror of live SVN up at:
I will be posting information on the download page shortly...
Quoted 4 lines · Till Kamppeter
Thank you for the patch, but the patch you have attached is wrong. The attached patch is for the IPP version probl;em in client.conf (Apple bug #14401718, Debian bug #711848).
Quoted 101 lines
My problem is Apple bug #14401795.
Till
Quoted 94 lines · Michael Sweet
Till,
Here is the patch for 1.7 (1.7rc1 to be released soon):
However, when I went back to test on 1.6 TOT I was unable to reproduce there. Either I had already fixed the problem for 1.6.3 or it wasn't already broken. The changes in 1.7 (to filter encoded attributes based on operation code) were responsible for the breakage there, but 1.6 doesn't include that code...
Quoted 70 lines · Michael Sweet
Filed as Apple bug:
<rdar://problem/14401795> cups.org: xxx-default options set from lpadmin are not returned by Get-Printer-Attributes
I was able to reproduce both with lpoptions and ipptool. I'll let you know when I have a fix...
Quoted 53 lines · Till Kamppeter
Hi,
I have a problem with non-PPD options set in
/etc/cups/printers.conf.For filters and cups-browsed I have defined some options foor being stored in
/etc/cups/printers.confwhich are not options of CUPS itself.I set these options via
lpadmin -p <printer> -o <option>-default=<value>
getting a line
Option <option> <value>
in the entry of <printer>. What works is that these options get supplied with every job, so I can use such options to configure filters or to get filters into a debug mode. I am using this successfully for example with the "usb" CUPS backend to find quirk rules for broken USB printers.
Now I also want to use this simply to mark print queues (setting an option which is ignored by all filters). For example all queues created by cups-browsed get the cups-browsed boolean option set by doing the IPP equivalent of:
lpadmin -p <printer> -o cups-browsed-default
resulting in a line
Option cups-browsed true
in
/etc/cups/printers.conf. This way I want that if cups-browsed not closed cleanly (system crash) and so did not remove the queues it created in the next session finds these queues and treats them correctly, so that crashes do not lead to ghost queues.Now it seems that I cannot read out this option setting (without sending a job and checking
error_log), aslpoptions -p <printer>
does not list the option (as "cups-browsed" or "cups-browsed=true") and
val =
cupsGetOption("cups-browsed", dest->num_options, dest->options)in a C program (with dest being the record of the printer in question) gives val = NULL as one gets when requesting the value of a non-existing option.
In CUPS 1.5.x (Ubuntu Precise, 12.04 LTS) this still worked. both cups-browsed was able to read out the "cups-browsed" marker option from its queues via the C line shown above and
Quoted 7 lines
lpoptions -p <printer>
contains "cups-browsed=true" in its output.
I would consider this a bug in CUPS 1.6.x. Mike can you have a look? Thanks.
Till
Quoted 7 lines
_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair_______________________________________________
Printing-architecture mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair
_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair
Works perfectly, thank you very much for the quick fix.
Till
Quoted 10 lines · Michael Sweet
Till,
Whoops, sorry:
Also, I now have an official GIT mirror of live SVN up at:
I will be posting information on the download page shortly...
Quoted 5 lines · Michael Sweet
Also, I now have an official GIT mirror of live SVN up at:
I will be posting information on the download page shortly...
This only has history starting from May this year. Is there any plan to have a single git repository containing all of the SVN history, like the one I have at http://twaugh.fedorapeople.org/cups-avahi.git?
Tim.
*/
Tim,
Quoted 10 lines · Tim Waugh
Quoted 5 lines · Michael Sweet
Also, I now have an official GIT mirror of live SVN up at:
I will be posting information on the download page shortly...
This only has history starting from May this year. Is there any plan to have a single git repository containing all of the SVN history, like the one I have at http://twaugh.fedorapeople.org/cups-avahi.git?
Unfortunately, I was unable to coerce GIT-SVN into pulling from a single repository. The CUPS SVN repository has been split since 2002 (easysw.com and apple.com), and so what I ended up doing is pulling all of the snapshots and releases from easysw.com and the commits from apple.com since late April/early May.
If you know of some GIT-fu that will allow me to push the SVN history from the old repository onto the new one (or start with easysw.com's SVN repo and then overlay and track new changes from the apple.com SVN repo) then I'll be happy to rebuild the GIT mirror. But going forward everything is setup to mirror changes from the internal apple.com SVN repository to the GIT repository on cups.org...
_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair
Quoted 5 lines · Michael Sweet
Unfortunately, I was unable to coerce GIT-SVN into pulling from a single repository. The CUPS SVN repository has been split since 2002 (easysw.com and apple.com), and so what I ended up doing is pulling all of the snapshots and releases from easysw.com and the commits from apple.com since late April/early May.
I haven't tried that. I would have probably done two git-svn clones, one for each SVN repository, then tried to merge the newer into the older... but the merge point would have to be *exactly* the same and I guess that's where you had problems with it.
Tim.
*/
Tim,
Quoted 11 lines · Tim Waugh
Quoted 5 lines · Michael Sweet
Unfortunately, I was unable to coerce GIT-SVN into pulling from a single repository. The CUPS SVN repository has been split since 2002 (easysw.com and apple.com), and so what I ended up doing is pulling all of the snapshots and releases from easysw.com and the commits from apple.com since late April/early May.
I haven't tried that. I would have probably done two git-svn clones, one for each SVN repository, then tried to merge the newer into the older... but the merge point would have to be *exactly* the same and I guess that's where you had problems with it.
Actually, I was able to synchronize the SVN revisions between the two repositories (cups.org had a lot more commits than the internal Apple repo), but the issue is that the directory structure of the internal Apple repo is different than the cups.org repo.
To make matters worse, it doesn't look like GIT-SVN is properly mirroring things with the current GIT repository and I think I need to redo the whole thing again to make GIT happy...
I am going to try doing some SVN hackery to backup and restore the cups.org repository to match the Apple SVN repo structure, in case that allows me to provide a fuller history of things... And then see if I can provide a stable GIT-SVN mirror...
(If that doesn't work then I'll just have to pull the GIT mirror for now; I can't provide a SVN mirror of the internal SVN repository...)
_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair
Quoted 3 lines · Michael Sweet
To make matters worse, it doesn't look like GIT-SVN is properly mirroring things with the current GIT repository and I think I need to redo the whole thing again to make GIT happy...
I've found that '--stdlayout' is the magic option to make things work right, every time I've used git-svn to date. *shrug*
Tim.
*/
Tim,
Quoted 7 lines · Tim Waugh
Quoted 3 lines · Michael Sweet
To make matters worse, it doesn't look like GIT-SVN is properly mirroring things with the current GIT repository and I think I need to redo the whole thing again to make GIT happy...
I've found that '--stdlayout' is the magic option to make things work right, every time I've used git-svn to date. *shrug*
That only works if you have a standard layout... :/ The internal Apple repo doesn't have a standard layout due to it having more than just cups.org content, so my next attempt will be to try to convert the old repo into the new layout, convert to GIT, and then try to merge changes from the internal repo...
_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"MS" == Michael Sweet <[email protected]> writes:
MS> If you know of some GIT-fu that will allow me to push the SVN history MS> from the old repository onto the new one (or start with easysw.com's MS> SVN repo and then overlay and track new changes from the apple.com SVN MS> repo) then I'll be happy to rebuild the GIT mirror.
It is probably doable. Publishing a git repo with the the old data in parallel with the current repo would help get the surgery planned.
Also, it is possible to update www.cups.org to support git's smart git/http protocol? (Cf the man page for git-http-backend. It runs as a CGI.) It would improve clones and pulls, as well as provide users with progress info akin to that seem when using git:// URIs.
-JimC
--
James Cloos <[email protected]> OpenPGP: 1024D/ED7DAEA6
James,
I did end up discovering how to combine the history of both repositories.
Now I am just resolving some issues with the two active SVN branches not updating their corresponding Git branches - I can get one to update but not the other (so trunk is tracking properly but the 1.7 branch isn't...)
Quoted 10 lines · James Cloos
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"MS" == Michael Sweet <[email protected]> writes:
MS> If you know of some GIT-fu that will allow me to push the SVN history MS> from the old repository onto the new one (or start with easysw.com's MS> SVN repo and then overlay and track new changes from the apple.com SVN MS> repo) then I'll be happy to rebuild the GIT mirror.
It is probably doable. Publishing a git repo with the the old data in parallel with the current repo would help get the surgery planned.
Quoted 8 lines
Also, it is possible to update www.cups.org to support git's smart git/http protocol? (Cf the man page for git-http-backend. It runs as a CGI.) It would improve clones and pulls, as well as provide users with progress info akin to that seem when using
git://URIs.-JimC
--
James Cloos <[email protected]> OpenPGP: 1024D/ED7DAEA6
_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair
Unfortunately, this patch applies to a completely new concept of CUPS 1.7.x which did not exist in 1.6.x. Can you also supply a fix for CUPS 1.6.x, so that I can do a patch release of CUPS for Ubuntu 13.04? Thanks.
Till
Quoted 4 lines · Michael Sweet
Till,
Here is the patch for 1.7 (1.7rc1 to be released soon):
Till,
I don't know if you saw my followup message or not - I was unable to reproduce on TOT 1.6. You can test TOT 1.6 from the GIT repository with:
git clone -b branch-1.6 http://www.cups.org/cups.git cups-1.6
Quoted 11 lines · Till Kamppeter
Unfortunately, this patch applies to a completely new concept of CUPS 1.7.x which did not exist in 1.6.x. Can you also supply a fix for CUPS 1.6.x, so that I can do a patch release of CUPS for Ubuntu 13.04? Thanks.
Till
Quoted 4 lines · Michael Sweet
Till,
Here is the patch for 1.7 (1.7rc1 to be released soon):
_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair
Sorry, on both machines where I observed the bug I was already on CUPS 1.7.x. I have downgraded to the official Ubuntu package (1.6.2) on my Saucy (13.10) machine and there the bug indeed did not show. So the problem got introduced in 1.7.x and I will apply your patch to my 1.7.x packages on my PPA.
Thank you for the patch anyway, as now the bug will not appear when distros switch over to 1.7.x.
Till
Quoted 24 lines · Michael Sweet
Till,
I don't know if you saw my followup message or not - I was unable to reproduce on TOT 1.6. You can test TOT 1.6 from the GIT repository with:
git clone -b branch-1.6 http://www.cups.org/cups.git cups-1.6Quoted 11 lines · Till Kamppeter
Unfortunately, this patch applies to a completely new concept of CUPS 1.7.x which did not exist in 1.6.x. Can you also supply a fix for CUPS 1.6.x, so that I can do a patch release of CUPS for Ubuntu 13.04? Thanks.
Till
Quoted 4 lines · Michael Sweet
Till,
Here is the patch for 1.7 (1.7rc1 to be released soon):
_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair