Move apparmor profile for snap-confine to src/ #98

Merged
merged 2 commits into from Aug 11, 2016

Conversation

Projects
None yet
2 participants
Collaborator

zyga commented Aug 11, 2016

This patch takes the apparmor profile for snap-confine itself out of the
debian/ directory and into the src/ directory.

In addition, the profile is now generated to understand build-time
configuration as it has to match the final location of the installed
snap-confine executable.

Lastly the name of the profile in the tree is snap-confine.apparmor.in
which is changed on install time to the apparmor-style
usr.lib.snapd.snap-confine (the actual name depends on libexecdir).

This patch paves the way for the upcoming removal of debian/ from the
upstream repository and integration of downstream packaging into spread
tests.

Signed-off-by: Zygmunt Krynicki zygmunt.krynicki@canonical.com

Move apparmor profile for snap-confine to src/
This patch takes the apparmor profile for snap-confine itself out of the
debian/ directory and into the src/ directory.

In addition, the profile is now generated to understand build-time
configuration as it has to match the final location of the installed
snap-confine executable.

Lastly the name of the profile in the tree is snap-confine.apparmor.in
which is changed on install time to the apparmor-style
usr.lib.snapd.snap-confine (the actual name depends on libexecdir).

This patch paves the way for the upcoming removal of debian/ from the
upstream repository and integration of downstream packaging into spread
tests.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Contributor

jdstrand commented Aug 11, 2016

These changes are correctly generating src/snap-confine.apparmor. I verified using:

Eg:

$ sudo cp /etc/apparmor.d/usr.lib.snapd.snap-confine /etc/apparmor.d/usr.lib.snapd.snap-confine.deb
$ sudo apt-get remove --purge snap-confine
$ dh_autoreconf
$ ./configure --prefix=/usr --libexecdir=/usr/lib/snapd --enable-nvidia-ubuntu
$ make
$ sudo make install
$ diff -Naur /etc/apparmor.d/usr.lib.snapd.snap-confine.deb /etc/apparmor.d/usr.lib.snapd.snap-confine
$ make clean
$ ./configure --prefix=/usr/local --libexecdir=/usr/local/lib/snapd --enable-nvidia-ubuntu
$ make
$ sudo make install
$ diff -Naur /etc/apparmor.d/usr.lib.snapd.snap-confine.deb /etc/apparmor.d/usr.local.lib.snapd.snap-confine # saw expected changes for /usr/local

+1

Collaborator

zyga commented Aug 11, 2016

Thanks, I'll merge this after #97 lands to ensure those changes are not lost

@zyga zyga merged commit 3377b8e into master Aug 11, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@zyga zyga deleted the apparmor-profile-src branch Aug 12, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment