build: configure sbin value according to the target distribution.

This commit is contained in:
Alexandre Pujol 2025-05-01 14:36:57 +02:00
parent d162032af9
commit 48a37bbf34
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
2 changed files with 11 additions and 2 deletions

View file

@ -40,6 +40,16 @@ func (b Userspace) Apply(opt *Option, profile string) (string, error) {
}
f := aa.DefaultTunables()
if prebuild.Distribution == "arch" {
f.Preamble = append(f.Preamble, &aa.Variable{
Name: "sbin", Values: []string{"/{,usr/}{,s}bin"}, Define: true,
})
} else {
f.Preamble = append(f.Preamble, &aa.Variable{
Name: "sbin", Values: []string{"/{,usr/}sbin"}, Define: true,
})
}
if _, err := f.Parse(profile); err != nil {
return "", err
}