release: don't force devmode on LinuxMint "serena" #2815

Merged
merged 1 commit into from Feb 9, 2017
Jump to file or symbol
Failed to load files and symbols.
+13 −0
Split
View
@@ -52,6 +52,17 @@ func (os *OS) ForceDevMode() bool {
default:
return true
}
+ case "linuxmint":
+ // NOTE: mint uses "LinuxMint" (mixed capitalization) but this is
+ // normalized by readOSRelease.
+ switch os.VersionID {
+ case "18.1":
+ // Linux Mint 18.1 aka "serena" should use apparmor confinement
+ // given that it shares packages with Ubuntu 16.04.
+ return false
+ default:
+ return true
+ }
default:
// NOTE: Other distributions can move out of devmode by
// integrating with the interface security backends. This will
@@ -139,6 +139,8 @@ func (s *ReleaseTestSuite) TestForceDevMode(c *C) {
{id: "rhel", devmode: true},
{id: "ubuntu", devmode: false},
{id: "ubuntu-core", devmode: false},
+ {id: "linuxmint", devmode: true},
+ {id: "linuxmint", idVersion: "18.1", devmode: false},
}
for _, distro := range distros {
rel := &release.OS{ID: distro.id, VersionID: distro.idVersion}