Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
cmd/snap-confine,packaging: import snapd-generated policy #3807
Conversation
jdstrand
commented on b027ce5
Aug 24, 2017
|
This looks fine. |
|
Ubuntu core tests fail with:
I assume this is because this dir is missing on the core-image? |
|
@mvo5 - yes, this is because adding a subdirectory under /var/lib/snapd/apparmor/snap-confine.d is actually harder than it should be. I'm considering what I can do to avoid that. Unfortunately apparmor_parser will abort if the directory is not present, I didn't anticipate it would be hard to add a new directory to that structure. |
ogra1
reviewed
Aug 25, 2017
•
the problem here is that /var/lib/snapd in writable-paths is set to "transition" mode which by definition will not add new directories or files from the readonly rootfs when they appear, we could switch to "synced" mode but this needs testing if/how existing files in the rw path are handled properly (theoretically this should all "just work" but the dir is to important to blindly do that switch).
zyga
added
the
Blocked
label
Aug 30, 2017
|
I'm marking this as blocked because we have no clear path to adding that directory early at system startup on existing core devices. At the same time this PR is a prerequisite for a priority Canonical commercial project. @mvo5 please advice on suggested action. |
ogra1
referenced this pull request
in snapcore/core-build
Sep 1, 2017
Merged
switch /etc/systemd/system to "synced" mode #17
added a commit
to snapcore/core-build
that referenced
this pull request
Sep 7, 2017
added a commit
to snapcore/core-build
that referenced
this pull request
Sep 7, 2017
|
@zyga I believe this should now be unblocked |
codecov-io
commented
Sep 12, 2017
Codecov Report
@@ Coverage Diff @@
## master #3807 +/- ##
=========================================
Coverage ? 76.78%
=========================================
Files ? 416
Lines ? 36978
Branches ? 0
=========================================
Hits ? 28395
Misses ? 6672
Partials ? 1911Continue to review full report at Codecov.
|
|
This should be ok to merge now |
|
The test failure in https://travis-ci.org/snapcore/snapd/builds/277188381#L2440 looks real: |
zyga
removed
the
Blocked
label
Sep 20, 2017
|
The failure, whatever it was, got resolved after merging master. |
zyga commentedAug 25, 2017
•
Edited 1 time
-
zyga
Aug 28, 2017
This patch allows snap-confine's apparmor profile to be extended with
additional site policy that is generated by snapd. The purpose of the
site policy is so that it can be used to generate some workarounds for
things like $HOME on NFS (the fact of which is not transparent to
confinement, sadly) or encrypted home filesystem. as well as other
quirks that need it specifically in snap-confine's profile (snapd can
already influence profiles of specific snap applications).
It is important to note that the packaging must ensure the directory
/var/lib/snapd/apparmor/snap-confine.d must exist or the profile will
fail to compile. I did this for Ubuntu and openSUSE and will coordinate
to make sure this happens in Debian. Other distributions are not
affected as they don't enable AppArmor yet.
Signed-off-by: Zygmunt Krynicki me@zygoon.pl