chuckcharlie / cups-avahi-airprint

Docker image for CUPS intended as an AirPrint relay
GNU General Public License v3.0
118 stars 66 forks source link

Adding drivers on alpine not that easy #26

Open theyo-tester opened 6 months ago

theyo-tester commented 6 months ago

Hi @chuckcharlie !

great job with your repo. The auto discovery (mDNS, avahi) of printers finally works with your image. Thanks! However, because this is based on alpine, it is very hard, (or it takes too much time), to add vendor specific drivers for printers. Most of the vendors offer drivers for debian or rhel based linuxes, but not for alpine.

My printer, for instance, has its driver available as .rpm or .deb and an helper install.sh script (which chooses automatically what fits best the os, and makes sure, that the dependencies are met), but neither installing over the script nor the deb package worked. When trying to install the deb package (after installing the dpkg) I got following error:

dpkg -i *.deb
dpkg: error processing archive cnrdrvcups-ufr2-uk_5.70-1.18_amd64.deb (--install):
 package architecture (amd64) does not match system (musl-linux-amd64)
Errors were encountered while processing:
 cnrdrvcups-ufr2-uk_5.70-1.18_amd64.deb

I tried to circumvent this by changing the architecture with "dpkg --add-architecture amd64" and had only a small success. Because then a whole list dependency issues appeared:

ERROR: unable to select packages:
  libcups2 (no such package):
    required by: world[libcups2]
/extras/linux-UFRII-drv-v570-m17n/x64/Debian # apk add libcupsys2
ERROR: unable to select packages:
  libcupsys2 (no such package):
    required by: world[libcupsys2]
/extras/linux-UFRII-drv-v570-m17n/x64/Debian # apk add cups-bsd.
ERROR: unable to select packages:
  cups-bsd. (no such package):
    required by: world[cups-bsd.]
/extras/linux-UFRII-drv-v570-m17n/x64/Debian # apk add cups-bsd*
ERROR: unable to select packages:
  cups-bsd* (no such package):
    required by: world[cups-bsd*]

and it makes sense, because the package was build for debian, and on alpine, even if the deps, are met, they have other names.

Do you have an alternative solution to that? Or should I look for another image in the www?

BR