OpenPrinting / pappl-retrofit

PPD/Classic CUPS driver retro-fit Printer Application Library
Apache License 2.0
7 stars 10 forks source link

`/usr/lib/legacy-printer-app/backend` : No such file or directory #11

Open dkosovic opened 1 year ago

dkosovic commented 1 year ago

legacy-printer-app 1.0b2 built on Fedora 38 beta.

Clicking on Add Printer button in the web interface results in the following error:

E [2023-03-20T09:46:10.157Z] [Device] Unable to open backend directory '/usr/lib/legacy-printer-app/backend': No such file or directory

Relevant code :

https://github.com/OpenPrinting/pappl-retrofit/blob/77233b62059773cf93ce1fd0eeeae6fe488f2d45/Makefile.am#L93

https://github.com/OpenPrinting/pappl-retrofit/blob/77233b62059773cf93ce1fd0eeeae6fe488f2d45/pappl-retrofit/pappl-retrofit.c#L4698-L4699

On 64bit Fedora, legacy_printer_app_serverbin gets set to /usr/lib64/legacy-printer-app and I imagine on x86-64 Ubuntu/Debian it would get set to /usr/lib/x86_64-linux-gnu/legacy-printer-app

As /usr/lib/legacy-printer-app is a symlink to /usr/lib/cups when $CUPS_SERVERBIN is set and historically that CUPS directory is more akin to a libexecdir rather than a libdir that contains libraries. I'm thinking an appropriate solution might be to set legacy_printer_app_serverbin to the following in Makefile.am and match what is used in pappl-retrofit.c:

legacy_printer_app_serverbin=$(prefix)/lib/legacy-printer-app

which would resolve to /usr/lib/legacy-printer-app on majority of Linux distros, although $(exec_prefix)/lib/legacy-printer-app is probably more appropriate semantically, exec_prefix might be set to the not so useful NONE on some Linux distros.