This is an automated email from the ASF dual-hosted git repository.
HuangTing-Yao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-k8shim.git
The following commit(s) were added to refs/heads/master by this push:
new 6a50bcfd [YUNIKORN-3466] Fix reproducible builds under podman and
rootful docker (#1100)
6a50bcfd is described below
commit 6a50bcfd20b8415c842502ddb84a69d459cf9f5f
Author: PoiBlackTea <[email protected]>
AuthorDate: Tue Sep 22 00:51:24 2026 +0800
[YUNIKORN-3466] Fix reproducible builds under podman and rootful docker
(#1100)
Closes: #1100
Signed-off-by: HuangTing-Yao <[email protected]>
---
Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index a1998e43..00e94338 100644
--- a/Makefile
+++ b/Makefile
@@ -420,11 +420,12 @@ $(RELEASE_BIN_DIR)/$(SCHEDULER_BINARY): go.mod go.sum
$(shell find pkg)
@echo "building binary for scheduler docker image"
@mkdir -p "$(RELEASE_BIN_DIR)"
ifeq ($(REPRO),1)
- $(DOCKER) run -t --rm=true --volume "$(DOCKER_BUILDROOT):/buildroot"
"golang:$(GO_REPRO_VERSION)" sh -c "cd $(DOCKER_SRCROOT) && \
+ $(DOCKER) run -t --rm=true --volume "$(DOCKER_BUILDROOT):/buildroot"
"docker.io/library/golang:$(GO_REPRO_VERSION)" sh -c "cd $(DOCKER_SRCROOT) && \
CGO_ENABLED=0 GOOS=linux GOARCH=\"${EXEC_ARCH}\" go build \
-a \
-o=${RELEASE_BIN_DIR}/${SCHEDULER_BINARY} \
-trimpath \
+ -buildvcs=false \
-ldflags '-buildid= -extldflags \"-static\" -X
${FLAG_PREFIX}.buildVersion=${VERSION} -X ${FLAG_PREFIX}.buildDate=${DATE} -X
${FLAG_PREFIX}.goVersion=${GO_REPRO_VERSION} -X
${FLAG_PREFIX}.arch=${EXEC_ARCH} -X ${FLAG_PREFIX}.coreSHA=${CORE_SHA} -X
${FLAG_PREFIX}.siSHA=${SI_SHA} -X ${FLAG_PREFIX}.shimSHA=${SHIM_SHA}' \
-tags netgo \
./pkg/cmd/shim/"
@@ -513,11 +514,12 @@ $(RELEASE_BIN_DIR)/$(ADMISSION_CONTROLLER_BINARY): go.mod
go.sum $(shell find pk
@echo "building admission controller binary"
@mkdir -p "$(RELEASE_BIN_DIR)"
ifeq ($(REPRO),1)
- $(DOCKER) run -t --rm=true --volume "$(DOCKER_BUILDROOT):/buildroot"
"golang:$(GO_REPRO_VERSION)" sh -c "cd $(DOCKER_SRCROOT) && \
+ $(DOCKER) run -t --rm=true --volume "$(DOCKER_BUILDROOT):/buildroot"
"docker.io/library/golang:$(GO_REPRO_VERSION)" sh -c "cd $(DOCKER_SRCROOT) && \
CGO_ENABLED=0 GOOS=linux GOARCH=\"${EXEC_ARCH}\" go build \
-a \
-o=$(RELEASE_BIN_DIR)/$(ADMISSION_CONTROLLER_BINARY) \
-trimpath \
+ -buildvcs=false \
-ldflags '-buildid= -extldflags \"-static\" -X
${FLAG_PREFIX}.buildVersion=${VERSION} -X ${FLAG_PREFIX}.buildDate=${DATE} -X
${FLAG_PREFIX}.goVersion=${GO_REPRO_VERSION} -X
${FLAG_PREFIX}.arch=${EXEC_ARCH}' \
-tags netgo \
./pkg/cmd/admissioncontroller"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]