-
-
Notifications
You must be signed in to change notification settings - Fork 48
Packaging with Snapcraft
The following comes from Till Kamppeter (OpenPrinting and Canonical)
Snapcraft is a software distribution and containment solution, primarily for Linux. See the example snapcraft.yaml file from the GSoC 2019 OpenPrinting printer application project.
In order for the Printer Application to be started automatically, it must be declared as a daemon using the "daemon" directive:
apps:
run-server:
command: bin/server
daemon: simple
plugs: [ avahi-control, home, network-bind, network-observe, ... ]
The Printer Application specifies any of several interfaces using the "plugs" directive:
- "avahi-control" to register DNS-SD services
- "avahi-observe" to discover DNS-SD services
- "hardware-observe" to be notified via UDEV when printers are connected and disconnected
- "hardware-random-observe" to have access to entropy data (for TLS and other cryptographic needs)
- "home" to access the home directory
- "network" to access network services/devices
- "network-bind" to listen for network connections
- "network-observed" to monitor for network configuration changes
- "raw-usb" to access USB printers via libusb
- "serial-port" to access serial ports
Avahi 0.8.0 or later is needed for localhost support.
Snaps run with some level of confinement on the system. Snap servers run as the root user within the confined environment, but can drop privileges if desired, e.g., to the "lp" user.
PAPPL is Copyright © 2019-2022 by Michael R Sweet.
This software is licensed under the Apache License Version 2.0 with an exception to allow linking against GPL2/LGPL2 software (like older versions of CUPS). See the files "LICENSE" and "NOTICE" for more information.