Skip to content

Commit

Permalink
Add selinux build tag
Browse files Browse the repository at this point in the history
We now add a new BUILDTAGS variable to the makefile and enable selinux by
default. This should have no influence on the release binaries and they
should be still statically linked.

Fixes kubernetes-sigs#585

Signed-off-by: Sascha Grunert <[email protected]>
  • Loading branch information
saschagrunert committed Apr 3, 2020
1 parent fad4c4e commit 0d97d93
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ BINDIR := /usr/local/bin
VERSION := $(shell git describe --tags --dirty --always)
VERSION := $(VERSION:v%=%)
GO_LDFLAGS := -X $(PROJECT)/pkg/version.Version=$(VERSION)
BUILDTAGS := selinux

BUILD_PATH := $(shell pwd)/build
BUILD_BIN_PATH := $(BUILD_PATH)/bin
Expand All @@ -57,12 +58,14 @@ help:

critest:
CGO_ENABLED=0 $(GO_TEST) -c -o $(CURDIR)/_output/critest$(BIN_EXT) \
-ldflags '$(GO_LDFLAGS)' \
-ldflags '$(GO_LDFLAGS)' \
-tags '$(BUILDTAGS)' \
$(PROJECT)/cmd/critest

crictl:
CGO_ENABLED=0 $(GO_BUILD) -o $(CURDIR)/_output/crictl$(BIN_EXT) \
-ldflags '$(GO_LDFLAGS)' \
-tags '$(BUILDTAGS)' \
$(PROJECT)/cmd/crictl

clean:
Expand Down

0 comments on commit 0d97d93

Please sign in to comment.