diff --git a/cmd/prebuild/main.go b/cmd/prebuild/main.go index 6b2b2422..629b37ed 100644 --- a/cmd/prebuild/main.go +++ b/cmd/prebuild/main.go @@ -13,7 +13,11 @@ import ( "github.com/roddhjav/apparmor.d/pkg/prebuild/prepare" ) +// Cli arguments have priority over the settings entered here func init() { + // Define the default ABI + prebuild.ABI = 4 + // Define the tasks applied by default prepare.Register( "synchronise", diff --git a/pkg/prebuild/cli/cli.go b/pkg/prebuild/cli/cli.go index 6fd0a36f..b82d918a 100644 --- a/pkg/prebuild/cli/cli.go +++ b/pkg/prebuild/cli/cli.go @@ -72,7 +72,6 @@ func Prebuild() { flag.Usage() return } - logging.Step("Building apparmor.d profiles for %s.", prebuild.Distribution) if full { prepare.Register("fsp") @@ -111,6 +110,7 @@ func Prebuild() { configure.OneFile = true } + logging.Step("Building apparmor.d profiles for %s on ABI%d.", prebuild.Distribution, prebuild.ABI) if err := Prepare(); err != nil { logging.Fatal("%s", err.Error()) } diff --git a/pkg/prebuild/directive/core.go b/pkg/prebuild/directive/core.go index 2568cb09..aadf9294 100644 --- a/pkg/prebuild/directive/core.go +++ b/pkg/prebuild/directive/core.go @@ -30,7 +30,7 @@ type Directive interface { } func Usage() string { - res := fmt.Sprintf("Directive:\n") + res := "Directive:\n" for _, d := range Directives { for _, h := range d.Usage() { res += fmt.Sprintf(" %s%s %s\n", Keyword, d.Name(), h)