commit: a279dcf6a4f66dafab10abd264da57b9ac7d13bd Author: Rahil Bhimjiani <me <AT> rahil <DOT> rocks> AuthorDate: Mon Apr 1 04:38:18 2024 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Mon Apr 1 05:57:57 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a279dcf6
app-containers/buildah: stoppeg calling strip directly Closes: https://bugs.gentoo.org/928309 Signed-off-by: Rahil Bhimjiani <me <AT> rahil.rocks> Closes: https://github.com/gentoo/gentoo/pull/36031 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> app-containers/buildah/buildah-1.33.7.ebuild | 12 ++++++--- app-containers/buildah/buildah-1.34.3.ebuild | 14 ++++++++--- app-containers/buildah/buildah-1.35.3.ebuild | 3 ++- app-containers/buildah/buildah-9999.ebuild | 4 +-- .../files/softcode-strip-upstream-pr-5446.patch | 29 ++++++++++++++++++++++ 5 files changed, 53 insertions(+), 9 deletions(-) diff --git a/app-containers/buildah/buildah-1.33.7.ebuild b/app-containers/buildah/buildah-1.33.7.ebuild index 60b99c3a6057..a24bd18a767c 100644 --- a/app-containers/buildah/buildah-1.33.7.ebuild +++ b/app-containers/buildah/buildah-1.33.7.ebuild @@ -60,15 +60,16 @@ src_prepare() { cat <<'EOF' > "${T}/dont-call-as-directly-upstream-pr-5436.patch" --- a/Makefile +++ b/Makefile -@@ -10,6 +10,7 @@ +@@ -10,6 +10,8 @@ BASHINSTALLDIR = $(PREFIX)/share/bash-completion/completions BUILDFLAGS := -tags "$(BUILDTAGS)" BUILDAH := buildah +AS ?= as ++STRIP ?= strip GO := go GO_LDFLAGS := $(shell if $(GO) version|grep -q gccgo; then echo "-gccgoflags"; else echo "-ldflags"; fi) -@@ -72,7 +73,7 @@ +@@ -72,11 +74,11 @@ bin/buildah: $(SOURCES) cmd/buildah/*.go internal/mkcw/embed/entrypoint.gz $(GO_BUILD) $(BUILDAH_LDFLAGS) $(GO_GCFLAGS) "$(GOGCFLAGS)" -o $@ $(BUILDFLAGS) ./cmd/buildah @@ -77,6 +78,11 @@ src_prepare() { internal/mkcw/embed/entrypoint: internal/mkcw/embed/entrypoint.s $(AS) -o $(patsubst %.s,%.o,$^) $^ $(LD) -o $@ $(patsubst %.s,%.o,$^) +- strip $@ ++ $(STRIP) $@ + else + .PHONY: internal/mkcw/embed/entrypoint + endif EOF default @@ -139,7 +145,7 @@ src_compile() { # https://github.com/gentoo/gentoo/pull/33531#issuecomment-1786107493 [[ ${PV} != 9999* ]] && export COMMIT_NO="" GIT_COMMIT="" - tc-export AS LD + tc-export AS LD STRIP export GOMD2MAN="$(command -v go-md2man)" default } diff --git a/app-containers/buildah/buildah-1.34.3.ebuild b/app-containers/buildah/buildah-1.34.3.ebuild index 4b82e782d4f3..cc06bf2ff42d 100644 --- a/app-containers/buildah/buildah-1.34.3.ebuild +++ b/app-containers/buildah/buildah-1.34.3.ebuild @@ -60,15 +60,16 @@ src_prepare() { cat <<'EOF' > "${T}/dont-call-as-directly-upstream-pr-5436.patch" --- a/Makefile +++ b/Makefile -@@ -10,6 +10,7 @@ +@@ -14,6 +14,8 @@ BASHINSTALLDIR = $(PREFIX)/share/bash-completion/completions BUILDFLAGS := -tags "$(BUILDTAGS)" BUILDAH := buildah +AS ?= as ++STRIP ?= strip GO := go GO_LDFLAGS := $(shell if $(GO) version|grep -q gccgo; then echo "-gccgoflags"; else echo "-ldflags"; fi) -@@ -77,7 +77,7 @@ +@@ -76,14 +78,14 @@ bin/buildah: $(SOURCES) cmd/buildah/*.go internal/mkcw/embed/entrypoint_amd64.gz $(GO_BUILD) $(BUILDAH_LDFLAGS) $(GO_GCFLAGS) "$(GOGCFLAGS)" -o $@ $(BUILDFLAGS) ./cmd/buildah @@ -76,6 +77,13 @@ src_prepare() { +ifneq ($(shell $(AS) --version | grep x86_64),) internal/mkcw/embed/entrypoint_amd64.gz: internal/mkcw/embed/entrypoint_amd64 gzip -k9nf $^ + + internal/mkcw/embed/entrypoint_amd64: internal/mkcw/embed/entrypoint_amd64.s + $(AS) -o $(patsubst %.s,%.o,$^) $^ + $(LD) -o $@ $(patsubst %.s,%.o,$^) +- strip $@ ++ $(STRIP) $@ + endif EOF default @@ -138,7 +146,7 @@ src_compile() { # https://github.com/gentoo/gentoo/pull/33531#issuecomment-1786107493 [[ ${PV} != 9999* ]] && export COMMIT_NO="" GIT_COMMIT="" - tc-export AS LD + tc-export AS LD STRIP export GOMD2MAN="$(command -v go-md2man)" default } diff --git a/app-containers/buildah/buildah-1.35.3.ebuild b/app-containers/buildah/buildah-1.35.3.ebuild index b0b39faf03cb..e1c7e23390e5 100644 --- a/app-containers/buildah/buildah-1.35.3.ebuild +++ b/app-containers/buildah/buildah-1.35.3.ebuild @@ -46,6 +46,7 @@ BDEPEND="dev-go/go-md2man" PATCHES=( "${FILESDIR}"/dont-call-as-directly-upstream-pr-5436.patch + "${FILESDIR}"/softcode-strip-upstream-pr-5446.patch ) pkg_pretend() { @@ -117,7 +118,7 @@ src_compile() { # https://github.com/gentoo/gentoo/pull/33531#issuecomment-1786107493 [[ ${PV} != 9999* ]] && export COMMIT_NO="" GIT_COMMIT="" - tc-export AS LD + tc-export AS LD STRIP export GOMD2MAN="$(command -v go-md2man)" default } diff --git a/app-containers/buildah/buildah-9999.ebuild b/app-containers/buildah/buildah-9999.ebuild index b0b39faf03cb..987715de5560 100644 --- a/app-containers/buildah/buildah-9999.ebuild +++ b/app-containers/buildah/buildah-9999.ebuild @@ -45,7 +45,7 @@ DEPEND="${RDEPEND}" BDEPEND="dev-go/go-md2man" PATCHES=( - "${FILESDIR}"/dont-call-as-directly-upstream-pr-5436.patch + "${FILESDIR}"/softcode-strip-upstream-pr-5446.patch ) pkg_pretend() { @@ -117,7 +117,7 @@ src_compile() { # https://github.com/gentoo/gentoo/pull/33531#issuecomment-1786107493 [[ ${PV} != 9999* ]] && export COMMIT_NO="" GIT_COMMIT="" - tc-export AS LD + tc-export AS LD STRIP export GOMD2MAN="$(command -v go-md2man)" default } diff --git a/app-containers/buildah/files/softcode-strip-upstream-pr-5446.patch b/app-containers/buildah/files/softcode-strip-upstream-pr-5446.patch new file mode 100644 index 000000000000..0ca0a6602a7d --- /dev/null +++ b/app-containers/buildah/files/softcode-strip-upstream-pr-5446.patch @@ -0,0 +1,29 @@ +commit 2cd31a0698bea846366e8e153619a108484a1a2a +Author: Rahil Bhimjiani <me@rahil.rocks> +Date: Mon Apr 1 09:25:21 2024 +0530 + + Makefile: softcode `strip`, use it from env var + + Signed-off-by: Rahil Bhimjiani <me@rahil.rocks> + +diff --git a/Makefile b/Makefile +index 7d27a4153..3a955c85a 100644 +--- a/Makefile ++++ b/Makefile +@@ -17,6 +17,7 @@ BUILDAH := buildah + SELINUXOPT ?= $(shell test -x /usr/sbin/selinuxenabled && selinuxenabled && echo -Z) + SELINUXTYPE=container_runtime_exec_t + AS ?= as ++STRIP ?= strip + + GO := go + GO_LDFLAGS := $(shell if $(GO) version|grep -q gccgo; then echo "-gccgoflags"; else echo "-ldflags"; fi) +@@ -87,7 +88,7 @@ internal/mkcw/embed/entrypoint_amd64.gz: internal/mkcw/embed/entrypoint_amd64 + internal/mkcw/embed/entrypoint_amd64: internal/mkcw/embed/entrypoint_amd64.s + $(AS) -o $(patsubst %.s,%.o,$^) $^ + $(LD) -o $@ $(patsubst %.s,%.o,$^) +- strip $@ ++ $(STRIP) $@ + endif + +