mirror of
https://github.com/opencontainers/runc.git
synced 2025-09-27 20:02:22 +08:00
Makefile: rm go 1.13 workaround
Since go 1.14, mod=vendor is used automatically. Since go 1.16 is now
released, and minimally supported go version is 1.15.
As per commit fbeed5228
, remove the go 1.13 workaround.
Fix README to require go 1.14.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
10
Makefile
10
Makefile
@@ -14,18 +14,14 @@ 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)")
|
COMMIT ?= $(if $(shell git status --porcelain --untracked-files=no),"$(COMMIT_NO)-dirty","$(COMMIT_NO)")
|
||||||
VERSION := $(shell cat ./VERSION)
|
VERSION := $(shell cat ./VERSION)
|
||||||
|
|
||||||
# TODO: rm -mod=vendor once go 1.13 is unsupported
|
|
||||||
ifneq ($(GO111MODULE),off)
|
|
||||||
MOD_VENDOR := "-mod=vendor"
|
|
||||||
endif
|
|
||||||
ifeq ($(shell $(GO) env GOOS),linux)
|
ifeq ($(shell $(GO) env GOOS),linux)
|
||||||
ifeq (,$(filter $(shell $(GO) env GOARCH),mips mipsle mips64 mips64le ppc64))
|
ifeq (,$(filter $(shell $(GO) env GOARCH),mips mipsle mips64 mips64le ppc64))
|
||||||
GO_BUILDMODE := "-buildmode=pie"
|
GO_BUILDMODE := "-buildmode=pie"
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
GO_BUILD := $(GO) build -trimpath $(MOD_VENDOR) $(GO_BUILDMODE) $(EXTRA_FLAGS) -tags "$(BUILDTAGS)" \
|
GO_BUILD := $(GO) build -trimpath $(GO_BUILDMODE) $(EXTRA_FLAGS) -tags "$(BUILDTAGS)" \
|
||||||
-ldflags "-X main.gitCommit=$(COMMIT) -X main.version=$(VERSION) $(EXTRA_LDFLAGS)"
|
-ldflags "-X main.gitCommit=$(COMMIT) -X main.version=$(VERSION) $(EXTRA_LDFLAGS)"
|
||||||
GO_BUILD_STATIC := CGO_ENABLED=1 $(GO) build -trimpath $(MOD_VENDOR) $(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo osusergo" \
|
GO_BUILD_STATIC := CGO_ENABLED=1 $(GO) build -trimpath $(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo osusergo" \
|
||||||
-ldflags "-w -extldflags -static -X main.gitCommit=$(COMMIT) -X main.version=$(VERSION) $(EXTRA_LDFLAGS)"
|
-ldflags "-w -extldflags -static -X main.gitCommit=$(COMMIT) -X main.version=$(VERSION) $(EXTRA_LDFLAGS)"
|
||||||
|
|
||||||
.DEFAULT: runc
|
.DEFAULT: runc
|
||||||
@@ -72,7 +68,7 @@ unittest: runcimage
|
|||||||
$(RUNC_IMAGE) make localunittest TESTFLAGS=$(TESTFLAGS)
|
$(RUNC_IMAGE) make localunittest TESTFLAGS=$(TESTFLAGS)
|
||||||
|
|
||||||
localunittest: all
|
localunittest: all
|
||||||
$(GO) test $(MOD_VENDOR) -timeout 3m -tags "$(BUILDTAGS)" $(TESTFLAGS) -v ./...
|
$(GO) test -timeout 3m -tags "$(BUILDTAGS)" $(TESTFLAGS) -v ./...
|
||||||
|
|
||||||
integration: runcimage
|
integration: runcimage
|
||||||
$(CONTAINER_ENGINE) run $(CONTAINER_ENGINE_RUN_FLAGS) \
|
$(CONTAINER_ENGINE) run $(CONTAINER_ENGINE_RUN_FLAGS) \
|
||||||
|
@@ -28,7 +28,7 @@ A third party security audit was performed by Cure53, you can see the full repor
|
|||||||
## Building
|
## Building
|
||||||
|
|
||||||
`runc` currently supports the Linux platform with various architecture support.
|
`runc` currently supports the Linux platform with various architecture support.
|
||||||
It must be built with Go version 1.13 or higher.
|
It must be built with Go version 1.14 or higher.
|
||||||
|
|
||||||
In order to enable seccomp support you will need to install `libseccomp` on your platform.
|
In order to enable seccomp support you will need to install `libseccomp` on your platform.
|
||||||
> e.g. `libseccomp-devel` for CentOS, or `libseccomp-dev` for Ubuntu
|
> e.g. `libseccomp-devel` for CentOS, or `libseccomp-dev` for Ubuntu
|
||||||
|
Reference in New Issue
Block a user