build: generalise the use of apparmor version during the build.
This commit is contained in:
parent
d3e9a7ec70
commit
baa3f8f639
5 changed files with 39 additions and 15 deletions
|
|
@ -35,7 +35,7 @@ func (p Configure) Apply() ([]string, error) {
|
|||
return res, err
|
||||
}
|
||||
|
||||
if prebuild.ABI == 3 {
|
||||
if prebuild.Version < 3.0 {
|
||||
if err := paths.CopyTo(prebuild.DistDir.Join("ubuntu"), prebuild.RootApparmord); err != nil {
|
||||
return res, err
|
||||
}
|
||||
|
|
@ -46,9 +46,11 @@ func (p Configure) Apply() ([]string, error) {
|
|||
return res, err
|
||||
}
|
||||
|
||||
// Copy Debian specific abstractions
|
||||
if err := paths.CopyTo(prebuild.DistDir.Join("ubuntu"), prebuild.RootApparmord); err != nil {
|
||||
return res, err
|
||||
if prebuild.Version < 4.1 {
|
||||
// Copy Debian specific abstractions
|
||||
if err := paths.CopyTo(prebuild.DistDir.Join("ubuntu"), prebuild.RootApparmord); err != nil {
|
||||
return res, err
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
|
|
@ -56,7 +58,7 @@ func (p Configure) Apply() ([]string, error) {
|
|||
|
||||
}
|
||||
|
||||
if prebuild.Version == "4.1" {
|
||||
if prebuild.Version == 4.1 {
|
||||
// Remove files upstreamed in 4.1
|
||||
remove := []string{
|
||||
"abstractions/devices-usb-read",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue