diff --git a/confd/Makefile b/confd/Makefile index 66c046c9a17..e547ad11953 100644 --- a/confd/Makefile +++ b/confd/Makefile @@ -27,18 +27,14 @@ clean: ############################################################################### # Building the binary ############################################################################### -build: bin/confd +build: bin/confd-$(ARCH) build-all: $(addprefix sub-build-,$(VALIDARCHES)) sub-build-%: $(MAKE) build ARCH=$* bin/confd-$(ARCH): $(SRC_FILES) $(call build_static_cgo_boring_binary, $(PACKAGE_NAME), $@) - -bin/confd: bin/confd-$(ARCH) -ifeq ($(ARCH),amd64) - ln -f bin/confd-$(ARCH) bin/confd -endif + ln -sf confd-$(ARCH) bin/confd ############################################################################### # Unit Tests @@ -49,7 +45,7 @@ UPDATE_EXPECTED_DATA?=false .PHONY: test-kdd ## Run template tests against KDD -test-kdd: bin/confd bin/kubectl bin/bird bin/bird6 bin/calico-node bin/calicoctl bin/typha run-k8s-apiserver +test-kdd: bin/confd-$(ARCH) bin/kubectl bin/bird bin/bird6 bin/calico-node bin/calicoctl bin/typha run-k8s-apiserver -git clean -fx etc/calico/confd mkdir -p tests/logs docker run --rm --net=host \ @@ -82,7 +78,7 @@ test-kdd: bin/confd bin/kubectl bin/bird bin/bird6 bin/calico-node bin/calicoctl .PHONY: test-etcd ## Run template tests against etcd -test-etcd: bin/confd bin/etcdctl bin/bird bin/bird6 bin/calico-node bin/kubectl bin/calicoctl run-etcd run-k8s-apiserver +test-etcd: bin/confd-$(ARCH) bin/etcdctl bin/bird bin/bird6 bin/calico-node bin/kubectl bin/calicoctl run-etcd run-k8s-apiserver -git clean -fx etc/calico/confd mkdir -p tests/logs docker run --rm --net=host \ diff --git a/felix/Makefile b/felix/Makefile index 5bb5fafc261..7b8f7545738 100644 --- a/felix/Makefile +++ b/felix/Makefile @@ -128,7 +128,7 @@ clean-generated: ############################################################################### # Building the binary ############################################################################### -BUILD_TARGETS:=bin/calico-felix +BUILD_TARGETS:=bin/calico-felix-$(ARCH) ifeq ($(ARCH), $(filter $(ARCH),amd64 arm64)) # Currently CGO can be enabled in ARM64 and AMD64 builds. @@ -155,9 +155,6 @@ build-all: $(addprefix sub-build-,$(VALIDARCHES)) sub-build-%: $(MAKE) build ARCH=$* -bin/calico-felix: bin/calico-felix-$(ARCH) - ln -f bin/calico-felix-$(ARCH) bin/calico-felix - libbpf: $(LIBBPF_A) $(LIBBPF_A): $(shell find bpf-gpl/include/libbpf -type f ! -name "*.a") mkdir -p bpf-gpl/include/libbpf/src/$(ARCH) @@ -569,9 +566,6 @@ cover-report: combined.coverprofile column -t | \ grep -v '100\.0%'" -bin/calico-felix.transfer-url: bin/calico-felix - $(DOCKER_GO_BUILD) sh -c 'curl --upload-file bin/calico-felix https://transfer.sh/calico-felix > $@' - # Cross-compile Felix for Windows bin/calico-felix.exe: $(SRC_FILES) @echo Building felix for Windows... @@ -581,10 +575,6 @@ bin/calico-felix.exe: $(SRC_FILES) ( ldd $@ 2>&1 | grep -q "Not a valid dynamic program\|not a dynamic executable" || \ ( echo "Error: $@ was not statically linked"; false ) )' -.PHONY: patch-script -patch-script: bin/calico-felix.transfer-url - $(DOCKER_GO_BUILD) bash -c 'utils/make-patch-script.sh $$(cat bin/calico-felix.transfer-url)' - ## Generate a diagram of Felix's internal calculation graph. docs/calc.pdf: docs/calc.dot cd docs/ && dot -Tpdf calc.dot -o calc.pdf diff --git a/felix/utils/make-patch-script.sh b/felix/utils/make-patch-script.sh deleted file mode 100755 index 0ad085b33fd..00000000000 --- a/felix/utils/make-patch-script.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -set -e - -url=$1 -echo "URL: $url" -sha_sum=$(cd bin; sha256sum calico-felix) - -echo -echo "Run the following script on the target server to patch the" -echo "/opt/calico-felix/calico-felix binary:" -echo -echo "curl -o calico-felix $url &&" -echo " if echo '$sha_sum' | sha256sum --status --check; then \\" -echo " sudo stop calico-felix || sudo systemctl stop calico-felix; " -echo " sudo cp calico-felix /opt/calico-felix/calico-felix && \\" -echo " sudo chmod +x /opt/calico-felix/calico-felix && \\" -echo " sudo start calico-felix || sudo systemctl start calico-felix;" -echo " else" -echo " echo 'Incorrect hash, file may have been tampered with!'" -echo " fi" diff --git a/typha/Makefile b/typha/Makefile index 35e96d40b2c..6c220d8f561 100644 --- a/typha/Makefile +++ b/typha/Makefile @@ -70,17 +70,11 @@ clean: ############################################################################### # Building the binary ############################################################################### -build: $(BINDIR)/calico-typha +build: $(BINDIR)/calico-typha-$(ARCH) build-all: $(addprefix sub-build-,$(VALIDARCHES)) sub-build-%: $(MAKE) build ARCH=$* -$(BINDIR)/calico-typha: $(BINDIR)/calico-typha-$(ARCH) - ln -f $(BINDIR)/calico-typha-$(ARCH) $(BINDIR)/calico-typha - -$(BINDIR)/wrapper: $(BINDIR)/wrapper-$(ARCH) - ln -f $(BINDIR)/wrapper-$(ARCH) $(BINDIR)/wrapper - $(BINDIR)/wrapper-$(ARCH): $(SRC_FILES) $(LOCAL_BUILD_DEP) ifeq ($(ARCH), amd64) ifeq ($(FIPS), true) @@ -281,9 +275,6 @@ cover-report: combined.coverprofile column -t | \ grep -v '100\.0%'" -$(BINDIR)/calico-typha.transfer-url: $(BINDIR)/calico-typha-$(ARCH) - $(DOCKER_RUN) $(CALICO_BUILD) sh -c 'curl --upload-file $(BINDIR)/calico-typha-$(ARCH) https://transfer.sh/calico-typha > $@' - # Install or update the tools used by the build .PHONY: update-tools update-tools: