build: add support for apparmor 4.1
Enabled when prebuild is run with the --version 4.1 argument
This commit is contained in:
parent
ebc8b29b1d
commit
e4a7e16ec0
5 changed files with 37 additions and 3 deletions
|
|
@ -55,5 +55,21 @@ func (p Configure) Apply() ([]string, error) {
|
|||
return []string{}, fmt.Errorf("%s is not a supported distribution", prebuild.Distribution)
|
||||
|
||||
}
|
||||
|
||||
if prebuild.Version == "4.1" {
|
||||
// Remove files upstreamed in 4.1
|
||||
remove := []string{
|
||||
"abstractions/devices-usb-read",
|
||||
"abstractions/devices-usb",
|
||||
"abstractions/nameservice-strict",
|
||||
"tunables/multiarch.d/base",
|
||||
"wg", // Upstream version is identical
|
||||
}
|
||||
for _, name := range remove {
|
||||
if err := prebuild.RootApparmord.Join(name).RemoveAll(); err != nil {
|
||||
return res, err
|
||||
}
|
||||
}
|
||||
}
|
||||
return res, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue