build: reorganise build: abi4, fallback, prebuild cli

- ABI4 by default, fallback to abi 3.
- aa-prebuild cli that can be used by other project shipping profiles.
- --file option to cli to only build one dev profile.
- add abi version filter to only & exclude directives.
This commit is contained in:
Alexandre Pujol 2024-10-02 16:22:46 +01:00
parent d6b7bef89e
commit 59ac54e2fc
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
39 changed files with 473 additions and 440 deletions

View file

@ -14,7 +14,7 @@ import (
"github.com/roddhjav/apparmor.d/pkg/aa"
"github.com/roddhjav/apparmor.d/pkg/logging"
"github.com/roddhjav/apparmor.d/pkg/paths"
bcfg "github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
"github.com/roddhjav/apparmor.d/pkg/prebuild"
"github.com/roddhjav/apparmor.d/tests/integration"
)
@ -28,8 +28,8 @@ Options:
-r, --run Run a predefined list of tests.
-l, --list List the configured tests.
-f, --file FILE Set a tests file. Default: tests/tests.yml
-d, --deps Install tests dependencies.
-D, --dryrun Do not do the action, list it.
-d, --deps Install tests dependencies.
-D, --dryrun Do not do the action, list it.
`
@ -123,7 +123,7 @@ func testDeps(dryRun bool) error {
}
deps := tSuite.GetDependencies()
switch bcfg.Distribution {
switch prebuild.Distribution {
case "arch":
arg := []string{"pacman", "-Sy", "--noconfirm"}
arg = append(arg, deps...)