Bug 1498091 - Cannot browse CUPS servers in GNOME Control Panel Printers
Summary: Cannot browse CUPS servers in GNOME Control Panel Printers
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: 27
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Zdenek Dohnal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F27FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2017-10-03 13:26 UTC by Stephen Gallagher
Modified: 2017-10-09 19:59 UTC (History)
11 users (show)

Fixed In Version: cups-2.2.4-6.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-09 19:59:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
proposed patch (16.02 KB, patch)
2017-10-04 14:31 UTC, Zdenek Dohnal
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1498818 0 unspecified CLOSED [abrt] control-center: mem_error(): gnome-control-center killed by SIGABRT 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1498823 0 unspecified CLOSED control-center assigns bad ppd for new printer 2021-02-22 00:41:40 UTC

Internal Links: 1498818 1498823

Description Stephen Gallagher 2017-10-03 13:26:23 UTC
Description of problem:
When attempting to add a printer in GNOME Control Panels, there is a text field labeled "Enter network address or search for a printer..." In previous releases of Fedora, 

Version-Release number of selected component (if applicable):
cups-2.2.4-5.fc27.x86_64
gnome-shell-3.26.0-1.fc27.x86_64


How reproducible:
Every time

Steps to Reproduce:
1) Open "Printers" in GNOME control panel
2) Click on "Unlock", enter password
3) Click on "Add..."
4) type "cups.example.com" (replace with a real CUPS server) into the "Enter a network address..." field

Actual results:
No results found


Expected results:
Any and all available printers at that address should be available to be enabled.

Additional info:

Comment 1 Fedora Blocker Bugs Application 2017-10-03 13:29:15 UTC
Proposed as a Blocker for 27-final by Fedora user sgallagh using the blocker tracking app because:

 This violates "All applications that can be launched using the standard graphical mechanism of a release-blocking desktop after a default installation of that desktop must start successfully and withstand a basic functionality test" for control center app and adding printers.

Comment 2 Zdenek Dohnal 2017-10-04 12:07:47 UTC
Issue is indeed in CUPS, I proposed patch for upstream, which solves it, but if it will be accepted, there would be needed rebuild of any component, which uses cupsEnumDests() and cupsEnumDestsBlock(), because it changes its API. I'll send email to devel list about it, if patch will get into upstream.

There is scratch build of solution: https://koji.fedoraproject.org/koji/taskinfo?taskID=22251746

Comment 3 Stephen Gallagher 2017-10-04 12:51:14 UTC
(In reply to Zdenek Dohnal from comment #2)
> Issue is indeed in CUPS, I proposed patch for upstream, which solves it, but
> if it will be accepted, there would be needed rebuild of any component,
> which uses cupsEnumDests() and cupsEnumDestsBlock(), because it changes its
> API. I'll send email to devel list about it, if patch will get into upstream.
> 
> There is scratch build of solution:
> https://koji.fedoraproject.org/koji/taskinfo?taskID=22251746

Zdenek and I discussed this on IRC. I recommended that instead of breaking ABI, he should create two new functions that add the http parameter. Most consuming software will use cupsGetDests() instead of cupsEnumDests() directly, so we can just switch between the routines based on the presence or absence of the http parameter.

This way, we won't break API/ABI. It does mean that any software using cupsEnumDest() directly will want to evaluate its usage and consider switching to the remote-capable routine if it needs that functionality.

Comment 4 Zdenek Dohnal 2017-10-04 13:01:16 UTC
(In reply to Stephen Gallagher from comment #3)
> (In reply to Zdenek Dohnal from comment #2)
> > Issue is indeed in CUPS, I proposed patch for upstream, which solves it, but
> > if it will be accepted, there would be needed rebuild of any component,
> > which uses cupsEnumDests() and cupsEnumDestsBlock(), because it changes its
> > API. I'll send email to devel list about it, if patch will get into upstream.
> > 
> > There is scratch build of solution:
> > https://koji.fedoraproject.org/koji/taskinfo?taskID=22251746
> 
> Zdenek and I discussed this on IRC. I recommended that instead of breaking
> ABI, he should create two new functions that add the http parameter. Most
> consuming software will use cupsGetDests()

Software use cupsGetDests() now, but it calls cupsEnumDests() since cups-2.2.4. It doesn't change anything for packages which use cupsGetDests(). Change is that in cupsGetDests2() will be if statement, which will decide, if new function or old cupsEnumDests() will be used according http pointer. cupsEnumDests() will not change - it was in cups before, but it wasn't used for getting printers - so its behavior (it finds only local printers) stays same for ones which use it.

> instead of cupsEnumDests()
> directly, so we can just switch between the routines based on the presence
> or absence of the http parameter.
> 
> This way, we won't break API/ABI. It does mean that any software using
> cupsEnumDest() directly will want to evaluate its usage and consider
> switching to the remote-capable routine if it needs that functionality.

Comment 5 František Zatloukal 2017-10-04 14:23:35 UTC
I was able to reproduce this issue. This is "partial" workaround as it won't allow you to type cups server address in GNOME, but you'll have to do so by adding following lines "/etc/cups/cups-browsed.conf":

BrowsePoll cups.example.com (replace with real CUPS server)
LocalQueueNamingRemoteCUPS RemoteName

Comment 6 Fedora Update System 2017-10-04 14:31:07 UTC
cups-2.2.4-6.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-28c315886a

Comment 7 Zdenek Dohnal 2017-10-04 14:31:55 UTC
Created attachment 1334308 [details]
proposed patch

Comment 8 Zdenek Dohnal 2017-10-04 14:41:36 UTC
(In reply to František Zatloukal from comment #5)
> I was able to reproduce this issue. This is "partial" workaround as it won't
> allow you to type cups server address in GNOME, but you'll have to do so by
> adding following lines "/etc/cups/cups-browsed.conf":
> 
> BrowsePoll cups.example.com (replace with real CUPS server)
> LocalQueueNamingRemoteCUPS RemoteName

Yes, it works this way, but I don't know if this workaround is acceptable for users (LocalQueueNamingRemoteCUPS option isn't needed, if local printer queue represent actual printer, not remote printer queue).

Comment 9 Kamil Páral 2017-10-05 10:48:10 UTC
(In reply to Fedora Update System from comment #6)
> cups-2.2.4-6.fc27 has been submitted as an update to Fedora 27.
> https://bodhi.fedoraproject.org/updates/FEDORA-2017-28c315886a

This fixes the problem with gnome control center for me. With this update I can write a cups address into the search field and printers pop up and I can add them.

I still can't print on a clean F27 install due to probably a different error (bug 1498823), but that's probably unrelated to this change. Also, gnome-control-center crashes after printing a page (bug 1498818), again not sure whether it's related.

Comment 10 Fedora Update System 2017-10-06 04:28:00 UTC
cups-2.2.4-6.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-28c315886a

Comment 11 Fedora Update System 2017-10-09 19:59:22 UTC
cups-2.2.4-6.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.