Bug 1726383

Summary: "lpadmin -p <queue> -o cupsSNMPSupplies:false" doesn't work
Product: Red Hat Enterprise Linux 8 Reporter: Bryan Mason <bmason>
Component: cupsAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED ERRATA QA Contact: Petr Dancak <pdancak>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: byodlows, pdancak, psklenar, thozza
Target Milestone: rcKeywords: AutoVerified, Patch, TestCaseProvided, Triaged
Target Release: 8.1Flags: pdancak: needinfo+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cups-2.2.6-41.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 15:21:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Proposed patch none

Description Bryan Mason 2019-07-02 17:47:24 UTC
Description of problem:

  running

    lpadmin -p printq -o cupsSNMPSupplies=false

  and

    lpadmin -p printq -o cupsIPPSupplies=false    

  doesn't work

Version-Release number of selected component (if applicable):

  cups-2.2.6-21.el8.x86_64

How reproducible:

  100%

Steps to Reproduce:

  lpadmin -p printq -o cupsSNMPSupplies=false
  grep SNMP /etc/cups/ppd/printq.ppd

Actual results:

  grep should find "*cupsSNMPSupplies: False" in the PPD file

Expected results:

  The expected line isn't written to the PPD file

Additional info:

  The lpadmin command creates a new PPD file, but when it sends
  the CUPS-Add-Modify-Printer request to the CUPS server, it doesn't
  include the "ppd-name" attribute in the request, so the server
  never uses the new PPD.

  (At least I think that's what's going on)

  I'll do further investigation to determine the root cause, work on a patch,
  and then submit the patch upstream.

Comment 1 Bryan Mason 2019-07-02 17:48:44 UTC
This issue also exists in RHEL 7.

Comment 2 Zdenek Dohnal 2019-07-09 06:39:41 UTC
Hi Bryan,

thank you for reporting the issue and investigation so far! I tried it on my Fedora 29 and it does not work too - I'll try to dig a little deeper before I clone bugzilla though.

Comment 3 Zdenek Dohnal 2019-07-09 11:11:44 UTC
Adding 'ppdchanged = 1;' line into 'if' statements where program checks if *cupsSNMPSupplies is on the line and if boolean value is used for cupsSNMPSupplies in 'options' variable does the trick.

I'll check it with upstream if it is correct way for fixing the issue.

Comment 4 Zdenek Dohnal 2019-07-11 13:08:42 UTC
Pull request https://github.com/apple/cups/pull/5610
Issue https://github.com/apple/cups/issues/5609

Comment 5 Zdenek Dohnal 2019-07-11 14:43:01 UTC
Created attachment 1589569 [details]
Proposed patch

Comment 29 errata-xmlrpc 2022-05-10 15:21:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (cups bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2032