Files
talos-builder/patches/siderolabs/talos/0002-Makefile.patch
T

67 lines
3.1 KiB
Diff

From 5a381d7f8a423133557c08ec4bd5e2cb7d57fd57 Mon Sep 17 00:00:00 2001
From: local-build <local@build>
Date: Wed, 8 Apr 2026 12:31:42 -0500
Subject: [PATCH] Makefile
---
Makefile | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index bcad98f2b..7ee6bdbfe 100644
--- a/Makefile
+++ b/Makefile
@@ -14,10 +14,12 @@ BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
REGISTRY_AND_USERNAME := $(IMAGE_REGISTRY)/$(USERNAME)
NAME = Talos
+SED ?= sed
+
CLOUD_IMAGES_EXTRA_ARGS ?= ""
ZSTD_COMPRESSION_LEVEL ?= 18
-CI_RELEASE_TAG := $(shell git log --oneline --format=%B -n 1 HEAD^2 -- 2>/dev/null | head -n 1 | sed -r "/^release\(.*\)/ s/^release\((.*)\):.*$$/\\1/; t; Q")
+CI_RELEASE_TAG := $(shell git log --oneline --format=%B -n 1 HEAD^2 -- 2>/dev/null | head -n 1 | $(SED) -r "/^release\(.*\)/ s/^release\((.*)\):.*$$/\\1/; t; Q")
ARTIFACTS := _out
@@ -94,7 +96,7 @@ GO_VERSION ?= 1.25
# renovate: datasource=npm depName=markdownlint-cli
MARKDOWNLINTCLI_VERSION ?= 0.45.0
OPERATING_SYSTEM := $(shell uname -s | tr "[:upper:]" "[:lower:]")
-ARCH := $(shell uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
+ARCH := $(shell uname -m | $(SED) 's/x86_64/amd64/' | $(SED) 's/aarch64/arm64/')
TALOSCTL_DEFAULT_TARGET := talosctl-$(OPERATING_SYSTEM)
TALOSCTL_EXECUTABLE := $(PWD)/$(ARTIFACTS)/$(TALOSCTL_DEFAULT_TARGET)-$(ARCH)
INTEGRATION_TEST := integration-test
@@ -331,7 +333,7 @@ docker-%: ## Builds the specified target defined in the Dockerfile using the doc
@$(MAKE) target-$* TARGET_ARGS="--output type=docker,dest=$(DEST)/$*.tar,name=$(REGISTRY_AND_USERNAME)/$*:$(IMAGE_TAG_OUT) $(TARGET_ARGS)"
registry-%: ## Builds the specified target defined in the Dockerfile using the image/registry output type. The build result will be pushed to the registry if PUSH=true.
- @$(MAKE) target-$* TARGET_ARGS="--output type=image,name=$(REGISTRY_AND_USERNAME)/$*:$(IMAGE_TAG_OUT),rewrite-timestamp=true $(TARGET_ARGS)"
+ @$(MAKE) target-$* TARGET_ARGS="--output type=image,name=$(REGISTRY_AND_USERNAME)/$*:$(IMAGE_TAG_OUT),rewrite-timestamp=false $(TARGET_ARGS)"
hack-test-%: ## Runs the specified script in ./hack/test with well known environment variables.
@./hack/test/$*.sh
@@ -695,7 +697,7 @@ reproducibility-test-docker-%: $(ARTIFACTS)
@mkdir -p _out1/ _out2/
@$(MAKE) docker-$* DEST=_out1/
@$(MAKE) docker-$* DEST=_out2/ TARGET_ARGS="--no-cache"
- @find _out1/ -type f | xargs -IFILE diffoscope FILE `echo FILE | sed 's/_out1/_out2/'`
+ @find _out1/ -type f | xargs -IFILE diffoscope FILE `echo FILE | $(SED) 's/_out1/_out2/'`
@rm -rf _out1/ _out2/
reproducibility-test-local-%: $(ARTIFACTS)
@@ -703,7 +705,7 @@ reproducibility-test-local-%: $(ARTIFACTS)
@mkdir -p _out1/ _out2/
@$(MAKE) local-$* DEST=_out1/
@$(MAKE) local-$* DEST=_out2/ TARGET_ARGS="--no-cache"
- @find _out1/ -type f | xargs -IFILE diffoscope FILE `echo FILE | sed 's/_out1/_out2/'`
+ @find _out1/ -type f | xargs -IFILE diffoscope FILE `echo FILE | $(SED) 's/_out1/_out2/'`
@rm -rf _out1/ _out2/
reproducibility-test-iso: $(ARTIFACTS)
--
2.50.1 (Apple Git-155)