tests: copy .real profile as .real #3227

Merged
merged 1 commit into from Apr 24, 2017

Conversation

Projects
None yet
2 participants
Contributor

zyga commented Apr 24, 2017

The snap-confine apparmor profile comes in two flavours, one plain one and one
with the .real suffix appended. The one suffixed .real takes precedence at
runtime. During preparation of the test execution environment we copy one or
the other into the unpacked core snap. At runtime snap uses the profile present
in the core snap as a template for creating a new profile that is specific to
the revision of the core.

There was a bug where we would copy one or the other flavour of the file into
the unpacked core snap but without the .real suffix. The core snap always
contains the file with the .real suffix so this didn't have any effect.

This patch corrects this.

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

tests: copy .real profile as .real
The snap-confine apparmor profile comes in two flavours. One is suffixed
contained the .real file it would take precedence and such modifications
copy the .real file without the suffix. If the base snap already
test execution environment in spread we need to copy one or the other so
that snapd sees the updated apparmor profile. There was a bug where we'd
with .real to avoid dpkg bugs, the other is not. When setting up the
would not be used in practice. This patch corrects this.

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

@zyga zyga added this to the 2.25 milestone Apr 24, 2017

@zyga zyga added the Critical label Apr 24, 2017

mvo5 approved these changes Apr 24, 2017

nice catch!

@zyga zyga merged commit 9108a15 into snapcore:master Apr 24, 2017

6 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
xenial-amd64 autopkgtest finished (success)
Details
xenial-i386 autopkgtest finished (success)
Details
xenial-ppc64el autopkgtest finished (success)
Details
yakkety-amd64 autopkgtest finished (success)
Details
zesty-amd64 autopkgtest finished (success)
Details

@zyga zyga deleted the zyga:fix/snap-confine-profile-for-testing branch Apr 24, 2017

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