1
1
export GOPROXY=https ://proxy.golang.org
2
2
3
3
APPARMORTAG := $(shell hack/apparmor_tag.sh)
4
- STORAGETAGS := exclude_graphdriver_devicemapper $(shell ./btrfs_tag.sh) $(shell ./btrfs_installed_tag.sh) $(shell ./hack/libsubid_tag.sh)
4
+ STORAGETAGS := $(shell ./btrfs_tag.sh) $(shell ./btrfs_installed_tag.sh) $(shell ./hack/libsubid_tag.sh)
5
5
SECURITYTAGS ?= seccomp $(APPARMORTAG )
6
6
TAGS ?= $(SECURITYTAGS ) $(STORAGETAGS ) $(shell ./hack/systemd_tag.sh)
7
7
ifeq ($(shell uname -s) ,FreeBSD)
@@ -29,15 +29,12 @@ RACEFLAGS := $(shell $(GO_TEST) -race ./pkg/dummy > /dev/null 2>&1 && echo -race
29
29
COMMIT_NO ?= $(shell git rev-parse HEAD 2> /dev/null || true)
30
30
GIT_COMMIT ?= $(if $(shell git status --porcelain --untracked-files=no) ,${COMMIT_NO}-dirty,${COMMIT_NO})
31
31
SOURCE_DATE_EPOCH ?= $(if $(shell date +% s) ,$(shell date +% s) ,$(error "date failed") )
32
- STATIC_STORAGETAGS = "containers_image_openpgp $(STORAGE_TAGS ) "
33
32
34
33
# we get GNU make 3.x in MacOS build envs, which wants # to be escaped in
35
34
# strings, while the 4.x we have on Linux doesn't. this is the documented
36
35
# workaround
37
36
COMMENT := \#
38
37
CNI_COMMIT := $(shell sed -n 's;^$(COMMENT ) github.com/containernetworking/cni \([^ \n]* \) .*$$;\1;p' vendor/modules.txt)
39
- RUNC_COMMIT := $(shell sed -n 's;^$(COMMENT ) github.com/opencontainers/runc \([^ \n]* \) .*$$;\1;p' vendor/modules.txt)
40
- LIBSECCOMP_COMMIT := release-2.3
41
38
42
39
EXTRA_LDFLAGS ?=
43
40
BUILDAH_LDFLAGS := $(GO_LDFLAGS ) '-X main.GitCommit=$(GIT_COMMIT ) -X main.buildInfo=$(SOURCE_DATE_EPOCH ) -X main.cniVersion=$(CNI_COMMIT ) $(EXTRA_LDFLAGS ) '
@@ -122,14 +119,8 @@ clean:
122
119
docs : install.tools # # build the docs on the host
123
120
$(MAKE ) -C docs
124
121
125
- # For vendoring to work right, the checkout directory must be such that our top
126
- # level is at $GOPATH/src/github.com/containers/buildah.
127
- .PHONY : gopath
128
- gopath :
129
- test $(shell pwd) = $(shell cd ../../../../src/github.com/containers/buildah ; pwd)
130
-
131
122
codespell :
132
- codespell -S Makefile,buildah.spec.rpkg,AUTHORS,bin,vendor,.git,go.mod,go.sum,CHANGELOG.md,changelog.txt,seccomp.json,.cirrus.yml, " *.xz,*.gz,*.tar,*.tgz,*ico,*.png,*.1,*.5,*.orig,*.rej " -L secon,passt,bu,uint,iff,od,erro - w
123
+ codespell -w
133
124
134
125
.PHONY : validate
135
126
validate : install.tools
@@ -142,25 +133,6 @@ validate: install.tools
142
133
install.tools :
143
134
$(MAKE ) -C tests/tools
144
135
145
- .PHONY : runc
146
- runc : gopath
147
- rm -rf ../../opencontainers/runc
148
- git clone https://github.com/opencontainers/runc ../../opencontainers/runc
149
- cd ../../opencontainers/runc && git checkout $(RUNC_COMMIT ) && $(GO ) build -tags " $( STORAGETAGS) $( SECURITYTAGS) "
150
- ln -sf ../../opencontainers/runc/runc
151
-
152
- .PHONY : install.libseccomp.sudo
153
- install.libseccomp.sudo : gopath
154
- rm -rf ../../seccomp/libseccomp
155
- git clone https://github.com/seccomp/libseccomp ../../seccomp/libseccomp
156
- cd ../../seccomp/libseccomp && git checkout $(LIBSECCOMP_COMMIT ) && ./autogen.sh && ./configure --prefix=/usr && make all && sudo make install
157
-
158
- .PHONY : install.cni.sudo
159
- install.cni.sudo : gopath
160
- rm -rf ../../containernetworking/plugins
161
- git clone https://github.com/containernetworking/plugins ../../containernetworking/plugins
162
- cd ../../containernetworking/plugins && ./build_linux.sh && sudo install -D -v -m755 -t /opt/cni/bin/ bin/*
163
-
164
136
.PHONY : install
165
137
install :
166
138
install -d -m 755 $(DESTDIR ) /$(BINDIR )
@@ -178,10 +150,6 @@ install.completions:
178
150
install -m 755 -d $(DESTDIR ) /$(BASHINSTALLDIR )
179
151
install -m 644 contrib/completions/bash/buildah $(DESTDIR ) /$(BASHINSTALLDIR ) /buildah
180
152
181
- .PHONY : install.runc
182
- install.runc :
183
- install -m 755 ../../opencontainers/runc/runc $(DESTDIR ) /$(BINDIR ) /
184
-
185
153
.PHONY : test-conformance
186
154
test-conformance :
187
155
$(GO_TEST ) -v -tags " $( STORAGETAGS) $( SECURITYTAGS) " -cover -timeout 60m ./tests/conformance
0 commit comments