I am maintaining the CUPS Snap. Formerly it had the name “printing-stack-snap” but now I have renamed it to “cups” after agreement on the OpenPrinting phone meeting and with Michael Sweet.
The former “printing-stack-snap” GitHub repository at OpenPrinting I have renamed to “cups-snap” (not to “cups” so that no one thinks I have a fork of CUPS in that repo):
I have also reserved the name “cups” in the Snap Store and activated the build service so that the Snap gets automatically built for several architectures whenever something gets committed.
As a next step I need some interfaces to get connected automatically.
First, there are the interfaces which are set to auto-connection in the former “printing-stack-snap”: avahi-control and raw-usb. As “cups” is simply a renamed “printing-stack-snap” they probably will not need a formal vote. The original voting for them happened in this thread.
With the further development of the CUPS Snap additional interfaces will be needed to get auto-connected:
This interface is to allow the command line utilities (
cancel, …) included in the CUPS Snap to do administrative operations (creating print queues, canceling other user’s jobs, …) on the CUPS daemon. See the thread where we have designed this interface.
CUPS needs to access some files in the host system to get full functionality. For this the
snapcraft.yaml defines two interfaces based on the “system-files” interfaces:
plugs: system-config: interface: system-files read: - /etc/passwd - /etc/group - /etc/shadow - /etc/shadow- - /var/lib/extrausers/passwd - /var/lib/extrausers/group - /var/lib/extrausers/shadow cups-domain-socket: interface: system-files write: - /run/cups - /var/run/cups
The “cups-domain-socket” plug allows the snapped CUPS daemon to use the standard CUPS domain socket
/var/run/cups/cups.sock. So clients, independent of classically installed or snapped can print via the standard domain socket. In Ubuntu the two versions are linked together (
/var/run is symlink to
/run), so either works, but I allow both to get universal compatibility with all distributions.
The “system-config” plug gives read-only access to user/group/password database files to authenticate users, especially to determine whether they are in an administrator group (“lpadmin” or “adm”) and therefore are allowed to do administrative tasks, via the command line utilities or the CUPS web interface (
So all in all, I need for the CUPS Snap “cups” the “avahi-control” and “usb-raw” interfaces which “printing-stack-snap” already automatically connects and in addition “cups-control” and the two plugs to “system-files” automatically connecting.
One additional question: If I want to add a migration script to migrate from classically installed CUPS to snapped CUPS, I need to access
/etc/cups. Which part(s) of my CUPS Snap actually have to access? Should I simply add read access to
/etc/cups to the “system-config” plug or do I need to create an additional plug based on “system-files”? This plug also needs automatically connected, so that migration goes smoothly when the distro update installed the CUPS Snap as replacement of the classically installed CUPS.