"cups" interface merged into snapd - Additional steps to complete

As the editability of the original TODO list has expired (after 1 month) I am re-posting it here to document the further development:

TODO List

What still needs to be done is the following:

  • snapd 2.55 release: The new snapd with the included cups interface needs to get released to the stable channel of the Snap Store. This will happen in 2-3 weeks from now.
  • Snap Store permissions: [DONE] Request permissions from the Snap Store team for the CUPS Snap to use the cups-socket-directory attribute and for auto-connection of any Snap’s cups plug to the cups slot of the CUPS Snap. I have already posted the request here on the forum.
  • /var/snap in base Snaps: [DONE] @ijohnson will post PRs (Update: has posted, see below, and they got all merged) on the base Snaps to create the /var/snap directory. @ijohnson: There are some other PR’s I will file to the base snaps which will behind the scenes make using the cups interface more efficient, but that will not change how it’s used at all (it will just change the mount namespace setup by creating the /var/cups directory there so we don’t have to do lots of mount tricks)
  • CUPS Snap auto-installation: [DONE via placeholder content interface] When an application Snap plugging cups gets installed from the Snap Store and the CUPS Snap is not installed (or a too old version), the CUPS Snap gets automatically installed in addition to the application Snap, like a package dependency. @ijohnson plans to adapt the default-provider setting to also work for the cups interface here: We have to either manually enable this using a transitional placeholder content interface or adapt the default-provider setting to also work for the cups interface. I plan on doing the latter at some point soon so I don’t think that the former needs to be implemented.
  • Snapcraft extension to auto-set CUPS_SERVER environment variable: [NOT NEEDED ANY MORE] Currently in the snapcraft.yaml of an application Snap using the cups interface we have to set the CUPS_SERVER environment variable to /var/cups/cups.sock via environment: entry. This can be made automatic by a snapcraft extension. @ijohnson: That environment variable setting could probably be done with a snapcraft extension, which is not added to snapd, but rather to snapcraft itself. The extension could look like this and also cover the CUPS Snap auto-install. Update: The automatic setting of the CUPS_SERVER environment variable is already done by snapd.
  • Changes in CUPS Snap: [IN PROGRESS] The CUPS Snap needs to have the correct cups slot definition, as shown in my earlier post, with the “cups-socket-directory: $SNAP_COMMON/run” line added (Update: This line is added now, was needed by Snap Store’s review-tools to accept the CUPS Snap) and also in the beginning of the snapcraft.yaml a line “assumes: [snapd2.55]” added (Update: This line is commented out now, as snapd 2.55.2 got withdrawn from the stable channel) as then the Snap will perhaps not work with older snapd versions any more. The latter I only will do when snapd 2.55 gets actually released to the stable channel, to make sure that the CUPS Snap can always be downloaded and used.

With all this done we will be able to launch the new cups interface and tell all the snappers out there to use it for their printing applications, like LibreOffice, Darktable, evince, gedit, … And we are really close, only the release of snapd 2.55 is missing and probably the next landing of the core Snaps.

Update: snapd 2.55.2 is NOT yet in the stable channel, seems that it got put and withdrawn right after.

1 Like