fix(fsp): fix conflicting x modifiers in abstractions
This commit is contained in:
parent
e3545cc3bb
commit
df21886965
3 changed files with 20 additions and 5 deletions
|
|
@ -12,6 +12,7 @@ import (
|
|||
|
||||
"github.com/arduino/go-paths-helper"
|
||||
"github.com/roddhjav/apparmor.d/pkg/logging"
|
||||
"github.com/roddhjav/apparmor.d/pkg/util"
|
||||
)
|
||||
|
||||
// Prepare the build directory with the following tasks
|
||||
|
|
@ -223,6 +224,19 @@ func SetFullSystemPolicy() ([]string, error) {
|
|||
return res, err
|
||||
}
|
||||
|
||||
// Fix conflicting x modifiers in abstractions - FIXME: Temporary solution
|
||||
path = RootApparmord.Join("abstractions/gstreamer")
|
||||
content, err = path.ReadFile()
|
||||
if err != nil {
|
||||
return res, err
|
||||
}
|
||||
out = string(content)
|
||||
regFixConflictX := util.ToRegexRepl([]string{`.*gst-plugin-scanner.*`, ``})
|
||||
out = regFixConflictX.Replace(out)
|
||||
if err := path.WriteFile([]byte(out)); err != nil {
|
||||
return res, err
|
||||
}
|
||||
|
||||
// Set systemd unit drop-in files
|
||||
return res, copyTo(paths.New("systemd/full/"), Root.Join("systemd"))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func RemoveDuplicate[T comparable](inlist []T) []T {
|
|||
}
|
||||
|
||||
// ToRegexRepl convert slice of regex into a slice of RegexRepl
|
||||
func ToRegexRepl(in []string) []RegexRepl {
|
||||
func ToRegexRepl(in []string) RegexReplList {
|
||||
out := make([]RegexRepl, 0)
|
||||
idx := 0
|
||||
for idx < len(in)-1 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue