leoarnold / puppet-cups

Puppet module for the Common Unix Printing System (CUPS)
https://forge.puppetlabs.com/leoarnold/cups
MIT License
9 stars 34 forks source link

Deprecation message prevents creation of queue #182

Closed immae closed 4 years ago

immae commented 4 years ago

Given Archlinux with Puppet 6.8.1 and CUPS 2.3.0.

When I apply the manifest

include '::cups'
  cups_queue { "Home_Brother_test":                                                                                     
    ensure      => "printer",                                                                                           
    accepting   => true,                                                                                                
    description => "Brother Home Test",                                                                                 
    enabled     => true,                                                                                                
    shared      => false,                                                                                               
    uri         => "ipp://172.20.0.20:80/",                                                                             
    model       => "drv:///cupsfilters.drv/pwgrast.ppd",                                                                
  }                                                                                                                     
# Your manifest here

In order to create a new queue

Then I get the error message:

Error: Execution of '/usr/bin/lpadmin -p Home_Brother_test -m drv:///cupsfilters.drv/pwgrast.ppd' returned 1: lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.
lpadmin: Unable to open PPD "/tmp/a1cf35d836ea5": Missing asterisk in column 1 on line 1.
Error: /Stage[main]/Workstation::Flony/Cups_queue[Home_Brother_test]/ensure: change from absent to printer failed: Execution of '/usr/bin/lpadmin -p Home_Brother_test -m drv:///cupsfilters.drv/pwgrast.ppd' returned 1: lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.
lpadmin: Unable to open PPD "/tmp/a1cf35d836ea5": Missing asterisk in column 1 on line 1.

NB: it used to work (last use was in october 2018), so an upgrade of cups broke the module. Also, creating the queue manually and then running the module correctly detects it as "done"

leoarnold commented 4 years ago

The error message says that - with or without the module - the command

/usr/bin/lpadmin -p Home_Brother_test -m drv:///cupsfilters.drv/pwgrast.ppd

will not execute successfully because pwgrast.ppd is malformed. Not an issue of this module.

immae commented 4 years ago

@leoarnold : the pwgrast.ppd doesn’t play any role here, if I remove the model line it’s the same:

Error: Execution of '/usr/bin/lpadmin -p Home_Brother_test -v ipp://192.168.1.2:80/' returned 1: lpadmin: Unable to open PPD "/tmp/a47725d8ff071": Missing asterisk in column 1 on line 1.
Error: /Stage[main]/Workstation::Flony/Cups_queue[Home_Brother_test]/ensure: change from absent to printer failed: Execution of '/usr/bin/lpadmin -p Home_Brother_test -v ipp://192.168.1.2:80/' returned 1: lpadmin: Unable to open PPD "/tmp/a47725d8ff071": Missing asterisk in column 1 on line 1.
leoarnold commented 4 years ago

This module only composes the CLI command. If you can prove that the underlying call to lpadmin uses wrong or incomplete command line arguments, then we will consider this a bug of the module. Otherwise it's a misconfiguration of your system or a bug in CUPS.

immae commented 4 years ago

Ref: https://github.com/apple/cups/issues/5652