From 0a9147f3aa926ba1e1928c4c54ae4d4540769008 Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Tue, 8 Dec 2020 19:22:39 +0900 Subject: [PATCH] remove "apparmor" build tag The "apparmor" build tag does not have any cgo dependency and can be removed safely. Related: https://github.com/opencontainers/runc/issues/2704 Signed-off-by: Akihiro Suda --- BUILDING.md | 1 - Makefile | 4 ++-- pkg/apparmor/apparmor.go | 2 +- pkg/apparmor/apparmor_unsupported.go | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 4d90762f5..e9da1a6db 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -107,7 +107,6 @@ make generate > * `no_cri`: A build tag disables building Kubernetes [CRI](http://blog.kubernetes.io/2016/12/container-runtime-interface-cri-in-kubernetes.html) support into containerd. > See [here](https://github.com/containerd/cri-containerd#build-tags) for build tags of CRI plugin. > * `no_devmapper`: A build tag disables building the device mapper snapshot driver. -> * `apparmor`: Enables apparmor support in the cri plugin > * `selinux`: Enables selinux support in the cri plugin > > For example, adding `BUILDTAGS=no_btrfs` to your environment before calling the **binaries** diff --git a/Makefile b/Makefile index dea76637c..3c3dc15e8 100644 --- a/Makefile +++ b/Makefile @@ -77,8 +77,8 @@ MANPAGES=ctr.8 containerd.8 containerd-config.8 containerd-config.toml.5 ifdef BUILDTAGS GO_BUILDTAGS = ${BUILDTAGS} endif -# Build tags apparmor and selinux are needed by CRI plugin. -GO_BUILDTAGS ?= apparmor selinux +# Build tag "selinux" is needed by CRI plugin. +GO_BUILDTAGS ?= selinux GO_BUILDTAGS += ${DEBUG_TAGS} GO_TAGS=$(if $(GO_BUILDTAGS),-tags "$(GO_BUILDTAGS)",) GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) $(EXTRA_LDFLAGS)' diff --git a/pkg/apparmor/apparmor.go b/pkg/apparmor/apparmor.go index 484bccf7e..20354f7de 100644 --- a/pkg/apparmor/apparmor.go +++ b/pkg/apparmor/apparmor.go @@ -1,4 +1,4 @@ -// +build apparmor,linux +// +build linux /* Copyright The containerd Authors. diff --git a/pkg/apparmor/apparmor_unsupported.go b/pkg/apparmor/apparmor_unsupported.go index 68e410d22..9b98f2578 100644 --- a/pkg/apparmor/apparmor_unsupported.go +++ b/pkg/apparmor/apparmor_unsupported.go @@ -1,4 +1,4 @@ -// +build !apparmor !linux +// +build !linux /* Copyright The containerd Authors.