Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snap redux #269

Merged
merged 9 commits into from
Oct 6, 2021
Merged

Snap redux #269

merged 9 commits into from
Oct 6, 2021

Conversation

michaelrsweet
Copy link
Member

This PR greatly simplifies snap/AppArmor support. The configure options have been limited to "--with-container=..." where currently we support "none" (the default) and "snap" (for snapcraft.io). The config.h defines have been normalized (HAVE_LIBxxx and CUPS_SNAP) and we always support snapped clients if libsnapd-glib and libapparmor are available.

One small change I might want to make is to add header checks for those libraries...

cupsd now only supports the libsnapd-glib API to snapctl and not the external program - seems to me like we've gone past the "supporting old snapd" phase and executing external programs has both performance and security implications. I did a bunch of cleanup/simplification of the snap check logic as well, fixed the logging (errors should be errors, don't include the function name in the message, normalized the messaging), and made sure the code conforms to our style guide...

…Issue #266)

All this does is add HTTP_FIELD_xxx enumerations and the corresponding strings
to allow libcups implementations of HTTP clients/servers that send/receive them.

For the subject bug we'll still need to do a bunch of work in cupsd (later).
@michaelrsweet michaelrsweet self-assigned this Oct 6, 2021
@michaelrsweet michaelrsweet added enhancement New feature or request platform issue Issue is specific to an OS or desktop priority-high labels Oct 6, 2021
@michaelrsweet michaelrsweet added this to the v2.4 milestone Oct 6, 2021
@michaelrsweet michaelrsweet linked an issue Oct 6, 2021 that may be closed by this pull request
Copy link
Member

@tillkamppeter tillkamppeter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all OK for me.

@michaelrsweet michaelrsweet merged commit da1daa8 into master Oct 6, 2021
@michaelrsweet michaelrsweet deleted the snap-redux branch October 6, 2021 19:11
tillkamppeter added a commit that referenced this pull request Oct 9, 2021
Some variable declarations got lost by the changes which made the code
not building.
tillkamppeter added a commit to OpenPrinting/cups-snap that referenced this pull request Oct 9, 2021
CUPS' Support for running in a Snap and for Snap mediation (allowing
administrative requests from fully confined Snaps only if they plug
"cups-control") got cleaned up and simplified, as it had some options
we do not need any more. With this also the ./configure option to
build CUPS for use in this Snap has changed from
"--enable-snapped-cupsd" to "--with-container=snap".

Also any other ./configure options to fine-tune the Snap support got
removed as the alternatives do not actually make sense.

This commit changes the ./configure command line appropriately.

See OpenPrinting/cups#269
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request platform issue Issue is specific to an OS or desktop priority-high
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code review: snap support laundry list
2 participants