Bug 51530 - Update PPD files / printer driver list in UCS 5.0
Update PPD files / printer driver list in UCS 5.0
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Printserver
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: Florian Best
Felix Botner
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-06-19 08:00 CEST by Florian Best
Modified: 2021-05-25 15:58 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2020-06-19 08:00:02 CEST
We need to update the list of printers / PPD files in UCS 5.0.

The test case 64_udm-printers/41_check_ppd shows a lot of differences:

https://jenkins.knut.univention.de:8181/job/UCS-5.0/job/UCS-5.0-0/job/AutotestJoin/22/SambaVersion=no-samba,Systemrolle=master/testReport/64_udm-printers/41_check_ppd/master090/
Comment 1 Florian Best univentionstaff 2020-06-19 12:09:43 CEST
Is there a tool to update those? Or do I need to do this manually?
Comment 2 Philipp Hahn univentionstaff 2020-06-19 15:05:11 CEST
See git:5b4e2f93127bc0f3e1a42604b0bb1c666a5d3f3b

(In reply to Florian Best from comment #1)
> Is there a tool to update those? Or do I need to do this manually?

Hint: ls services/univention-printserver/
Comment 3 Florian Best univentionstaff 2020-06-19 15:32:54 CEST
(In reply to Philipp Hahn from comment #2)
> See git:5b4e2f93127bc0f3e1a42604b0bb1c666a5d3f3b
> 
> (In reply to Florian Best from comment #1)
> > Is there a tool to update those? Or do I need to do this manually?
> 
> Hint: ls services/univention-printserver/

I was aware of ppds.py but didn't see that it prints UDM commands and wondered if I had to do it on my own. But it seems it does that.

Upgraded the PPDs in feature/ucs5. It seems a lot of drivers are removed (all *-ppds packages are installed).
Comment 4 Philipp Hahn univentionstaff 2020-06-19 16:22:20 CEST
(In reply to Florian Best from comment #3)
> (In reply to Philipp Hahn from comment #2)
> > See git:5b4e2f93127bc0f3e1a42604b0bb1c666a5d3f3b
> > 
> > (In reply to Florian Best from comment #1)
> > > Is there a tool to update those? Or do I need to do this manually?
> > 
> > Hint: ls services/univention-printserver/
> 
> I was aware of ppds.py but didn't see that it prints UDM commands and
> wondered if I had to do it on my own. But it seems it does that.
> 
> Upgraded the PPDs in feature/ucs5. It seems a lot of drivers are removed
> (all *-ppds packages are installed).

Summary for your convenience:
- Gutenprint (foomatic-db-gutenprint) no longer exists in Debian
- `univention-foormatic-ppds` had the annoying behavior to compile every PPD on earth: 5 CPUs are for >1h to build the PPD from their XML description. Most of those printer models are dead for a long time, but UCS still includes them.
- CUPS seems to have some build-in functionality to compile those PPDs on demand and/or there exists `foomatic-db-compressed-ppds` which already contains all compiled PPDs in compressed format.
- UCS plays some very dirty tricks on /usr/share/cups/model/ vs. /usr/share/ppd/, which requires patching alll Debian packages including the later. This does not look right (for current CUPS).
- Someone should take a deep look and "make it right" instead of continuing the path of sins from the fast before blindly updating the package.
- Especially take a look at the above mentioned GIT commit to understand the changes already done.
Comment 5 Florian Best univentionstaff 2021-03-12 21:15:22 CET
The joinscript has been adjusted again.
In the last version the dependency on printer-drivers-all and the PPD's from foomatic-db-compressed-ppds were missing.

univention-printserver (13.0.2-4)
e7d75e512c23 | Bug #51530: update printer driver list
Comment 6 Florian Best univentionstaff 2021-03-16 16:37:30 CET
A few more attempts.
I installed univention-printserver on a UCS 4.4 system, ran the joinscript, purged the package, upgraded to UCS 5.0 and used the adjusted ppd.py script to create the entries after installing the new dependencies manually.

univention-printserver (13.0.2-5)
c65ea9607285 | fixup! Bug #51530: don't mark existing models as deprecated
3fa6d38319ba | Bug #51530: don't mark existing models as deprecated
6633ef358007 | Bug #51530: mark_models_as_deprecated.py: update obsoleting version
cb2f37798c94 | fixup! Bug #51530: add missing HP printers
194c569f950a | Bug #51530: add missing HP printers
Comment 7 Felix Botner univentionstaff 2021-03-29 10:02:23 CEST
OK - univention-foomatic-ppds removed during the upgrade (and is a dummy package in UCS 5)
OK - ppd dependencies (printer-driver-all, hp..., openprinting, foomatic-db-compressed-ppds, ...)
OK - old ppds are set obsolete ppds during update

OK - creating printer wit compressed ppd

DN: cn=printer1,cn=printers,dc=five,dc=test
  ACLtype: allow all
  model: foomatic-db-compressed-ppds:0/ppd/foomatic-ppd/Epson-AL-C1900-eplaser.ppd
  name: printer1
  pagePrice: None
  producer: cn=Epson,cn=cups,cn=univention,dc=five,dc=test


  spoolHost: master.five.test
  uri: socket:// 10.200.7.188:12000

grep C1900 /etc/cups/ppd/printer1.ppd 
*% You may save this file as 'Epson-AL-C1900-eplaser.ppd'
*Product:	"(AL-C1900)"
*ModelName:     "Epson AL-C1900"
*ShortNickName: "Epson AL-C1900 eplaser"
*NickName:      "Epson AL-C1900 Foomatic/eplaser (recommended)"
*FoomaticIDs: Epson-AL-C1900 eplaser

OK - printing with new and old printer
OK - univention-printserver-pdf
OK - update
OK - new installation
Comment 8 Florian Best univentionstaff 2021-05-25 15:58:42 CEST
UCS 5.0 has been released:
 https://docs.software-univention.de/release-notes-5.0-0-en.html
 https://docs.software-univention.de/release-notes-5.0-0-de.html

If this error occurs again, please use "Clone This Bug".