build: add initial build support for ubuntu 24.04

This commit is contained in:
Alexandre Pujol 2024-02-28 17:35:14 +00:00
parent 431e93c9df
commit ae9f7e7442
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
4 changed files with 106 additions and 19 deletions

View file

@ -130,8 +130,22 @@ func Configure() ([]string, error) {
switch Distribution {
case "arch", "opensuse":
case "debian", "ubuntu", "whonix":
// Copy Ubuntu specific profiles
case "ubuntu":
if needDisplace {
if _, err := paths.New("debian/apparmor.d.displace").Create(); err != nil {
return res, err
}
filesToDisplace := overwriteProfile(DistDir.Join("displace"))
if err := displaceFiles(filesToDisplace); err != nil {
return res, err
}
} else {
if err := copyTo(DistDir.Join("ubuntu"), RootApparmord); err != nil {
return res, err
}
}
case "debian", "whonix":
// Copy Debian specific abstractions
if err := copyTo(DistDir.Join("ubuntu"), RootApparmord); err != nil {
return res, err
}