diff --git a/Makefile b/Makefile index 7576261f3..92839234c 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null) GIT_BRANCH_CLEAN := $(shell echo $(GIT_BRANCH) | sed -e "s/[^[:alnum:]]/-/g") RUNC_IMAGE := runc_dev$(if $(GIT_BRANCH_CLEAN),:$(GIT_BRANCH_CLEAN)) PROJECT := github.com/opencontainers/runc -BUILDTAGS ?= seccomp selinux apparmor +BUILDTAGS ?= seccomp selinux COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true) COMMIT ?= $(if $(shell git status --porcelain --untracked-files=no),"$(COMMIT_NO)-dirty","$(COMMIT_NO)") VERSION := $(shell cat ./VERSION) diff --git a/README.md b/README.md index ec37e9ead..0f84f1de0 100644 --- a/README.md +++ b/README.md @@ -63,16 +63,17 @@ To change build tags from the default, set the `BUILDTAGS` variable for make, e.g. ```bash -make BUILDTAGS='seccomp apparmor' +make BUILDTAGS='seccomp' ``` | Build Tag | Feature | Enabled by default | Dependency | |-----------|------------------------------------|--------------------|------------| | seccomp | Syscall filtering | yes | libseccomp | | selinux | selinux process and mount labeling | yes | | -| apparmor | apparmor profile support | yes | | | nokmem | disable kernel memory accounting | no | | +The following build tags were used earlier, but are now obsoleted: + - **apparmor** (since runc v1.0.0-rc93 the feature is always enabled) ### Running the test suite diff --git a/libcontainer/apparmor/apparmor.go b/libcontainer/apparmor/apparmor_linux.go similarity index 98% rename from libcontainer/apparmor/apparmor.go rename to libcontainer/apparmor/apparmor_linux.go index 7ae9cf802..73965f12d 100644 --- a/libcontainer/apparmor/apparmor.go +++ b/libcontainer/apparmor/apparmor_linux.go @@ -1,5 +1,3 @@ -// +build apparmor,linux - package apparmor import ( diff --git a/libcontainer/apparmor/apparmor_disabled.go b/libcontainer/apparmor/apparmor_unsupported.go similarity index 91% rename from libcontainer/apparmor/apparmor_disabled.go rename to libcontainer/apparmor/apparmor_unsupported.go index d4110cf0b..0bc473f81 100644 --- a/libcontainer/apparmor/apparmor_disabled.go +++ b/libcontainer/apparmor/apparmor_unsupported.go @@ -1,4 +1,4 @@ -// +build !apparmor !linux +// +build !linux package apparmor diff --git a/script/release.sh b/script/release.sh index 17dd577b8..407051360 100755 --- a/script/release.sh +++ b/script/release.sh @@ -27,7 +27,7 @@ function build_project() { builddir="$(dirname "$1")" # Build with all tags enabled. - make -C "$root" COMMIT_NO= BUILDTAGS="seccomp selinux apparmor" static + make -C "$root" COMMIT_NO= BUILDTAGS="seccomp selinux" static mv "$root/$project" "$1" }