From 70b043cdae21066fab877d01f75de020d50c4ca7 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Sun, 10 Mar 2024 14:48:05 +0000 Subject: [PATCH] build: improve build tests --- pkg/prebuild/build.go | 2 ++ pkg/prebuild/prebuild_test.go | 1 + 2 files changed, 3 insertions(+) diff --git a/pkg/prebuild/build.go b/pkg/prebuild/build.go index 73c76b47..b6820e7f 100644 --- a/pkg/prebuild/build.go +++ b/pkg/prebuild/build.go @@ -98,6 +98,7 @@ func BuildUserspace(profile string) string { return profile } +// Convert all profiles to abi 3.0 compatibility func BuildABI3(profile string) string { for _, abi4t3 := range regAbi4To3 { profile = abi4t3.Regex.ReplaceAllLiteralString(profile, abi4t3.Repl) @@ -105,6 +106,7 @@ func BuildABI3(profile string) string { return profile } +// Prevent unconfined transitions in profile rules func BuildFullSystemPolicy(profile string) string { for _, full := range regFullSystemPolicy { profile = full.Regex.ReplaceAllString(profile, full.Repl) diff --git a/pkg/prebuild/prebuild_test.go b/pkg/prebuild/prebuild_test.go index 6601370f..079a2bac 100644 --- a/pkg/prebuild/prebuild_test.go +++ b/pkg/prebuild/prebuild_test.go @@ -77,6 +77,7 @@ func Test_PreBuild(t *testing.T) { Distribution = tt.dist if tt.full { Prepares = append(Prepares, SetFullSystemPolicy) + Builds = append(Builds, BuildFullSystemPolicy) } if tt.complain { Builds = append(Builds, BuildComplain)