commit: 8144aa900b7850994c53b73dfa0b745d4ce02c5e Author: Rahil Bhimjiani <me <AT> rahil <DOT> rocks> AuthorDate: Wed Mar 27 09:24:43 2024 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Sun Mar 31 00:06:36 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8144aa90
app-containers/buildah: dont call `as` directly Closes: https://bugs.gentoo.org/927934 Signed-off-by: Rahil Bhimjiani <me <AT> rahil.rocks> Closes: https://github.com/gentoo/gentoo/pull/35943 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> app-containers/buildah/buildah-1.33.7.ebuild | 26 ++++++++++++++++++ app-containers/buildah/buildah-1.34.3.ebuild | 25 +++++++++++++++++ app-containers/buildah/buildah-1.35.1.ebuild | 4 +++ app-containers/buildah/buildah-1.35.3.ebuild | 4 +++ app-containers/buildah/buildah-9999.ebuild | 4 +++ .../dont-call-as-directly-upstream-pr-5436.patch | 32 ++++++++++++++++++++++ 6 files changed, 95 insertions(+) diff --git a/app-containers/buildah/buildah-1.33.7.ebuild b/app-containers/buildah/buildah-1.33.7.ebuild index 6a223369f6ba..60b99c3a6057 100644 --- a/app-containers/buildah/buildah-1.33.7.ebuild +++ b/app-containers/buildah/buildah-1.33.7.ebuild @@ -44,6 +44,10 @@ RDEPEND=" DEPEND="${RDEPEND}" BDEPEND="dev-go/go-md2man" +PATCHES=( + "${T}"/dont-call-as-directly-upstream-pr-5436.patch +) + pkg_pretend() { local CONFIG_CHECK="" use btrfs && CONFIG_CHECK+=" ~BTRFS_FS" @@ -53,6 +57,28 @@ pkg_pretend() { } src_prepare() { + cat <<'EOF' > "${T}/dont-call-as-directly-upstream-pr-5436.patch" +--- a/Makefile ++++ b/Makefile +@@ -10,6 +10,7 @@ + BASHINSTALLDIR = $(PREFIX)/share/bash-completion/completions + BUILDFLAGS := -tags "$(BUILDTAGS)" + BUILDAH := buildah ++AS ?= as + + GO := go + GO_LDFLAGS := $(shell if $(GO) version|grep -q gccgo; then echo "-gccgoflags"; else echo "-ldflags"; fi) +@@ -72,7 +73,7 @@ + bin/buildah: $(SOURCES) cmd/buildah/*.go internal/mkcw/embed/entrypoint.gz + $(GO_BUILD) $(BUILDAH_LDFLAGS) $(GO_GCFLAGS) "$(GOGCFLAGS)" -o $@ $(BUILDFLAGS) ./cmd/buildah + +-ifneq ($(shell as --version | grep x86_64),) ++ifneq ($(shell $(AS) --version | grep x86_64),) + internal/mkcw/embed/entrypoint: internal/mkcw/embed/entrypoint.s + $(AS) -o $(patsubst %.s,%.o,$^) $^ + $(LD) -o $@ $(patsubst %.s,%.o,$^) +EOF + default # ensure all necessary files are there diff --git a/app-containers/buildah/buildah-1.34.3.ebuild b/app-containers/buildah/buildah-1.34.3.ebuild index 6a223369f6ba..4b82e782d4f3 100644 --- a/app-containers/buildah/buildah-1.34.3.ebuild +++ b/app-containers/buildah/buildah-1.34.3.ebuild @@ -44,6 +44,10 @@ RDEPEND=" DEPEND="${RDEPEND}" BDEPEND="dev-go/go-md2man" +PATCHES=( + "${T}"/dont-call-as-directly-upstream-pr-5436.patch +) + pkg_pretend() { local CONFIG_CHECK="" use btrfs && CONFIG_CHECK+=" ~BTRFS_FS" @@ -53,6 +57,27 @@ pkg_pretend() { } src_prepare() { + cat <<'EOF' > "${T}/dont-call-as-directly-upstream-pr-5436.patch" +--- a/Makefile ++++ b/Makefile +@@ -10,6 +10,7 @@ + BASHINSTALLDIR = $(PREFIX)/share/bash-completion/completions + BUILDFLAGS := -tags "$(BUILDTAGS)" + BUILDAH := buildah ++AS ?= as + + GO := go + GO_LDFLAGS := $(shell if $(GO) version|grep -q gccgo; then echo "-gccgoflags"; else echo "-ldflags"; fi) +@@ -77,7 +77,7 @@ + bin/buildah: $(SOURCES) cmd/buildah/*.go internal/mkcw/embed/entrypoint_amd64.gz + $(GO_BUILD) $(BUILDAH_LDFLAGS) $(GO_GCFLAGS) "$(GOGCFLAGS)" -o $@ $(BUILDFLAGS) ./cmd/buildah + +-ifneq ($(shell as --version | grep x86_64),) ++ifneq ($(shell $(AS) --version | grep x86_64),) + internal/mkcw/embed/entrypoint_amd64.gz: internal/mkcw/embed/entrypoint_amd64 + gzip -k9nf $^ +EOF + default # ensure all necessary files are there diff --git a/app-containers/buildah/buildah-1.35.1.ebuild b/app-containers/buildah/buildah-1.35.1.ebuild index ecf84e28950c..b0b39faf03cb 100644 --- a/app-containers/buildah/buildah-1.35.1.ebuild +++ b/app-containers/buildah/buildah-1.35.1.ebuild @@ -44,6 +44,10 @@ RDEPEND=" DEPEND="${RDEPEND}" BDEPEND="dev-go/go-md2man" +PATCHES=( + "${FILESDIR}"/dont-call-as-directly-upstream-pr-5436.patch +) + pkg_pretend() { local CONFIG_CHECK="" use btrfs && CONFIG_CHECK+=" ~BTRFS_FS" diff --git a/app-containers/buildah/buildah-1.35.3.ebuild b/app-containers/buildah/buildah-1.35.3.ebuild index ecf84e28950c..b0b39faf03cb 100644 --- a/app-containers/buildah/buildah-1.35.3.ebuild +++ b/app-containers/buildah/buildah-1.35.3.ebuild @@ -44,6 +44,10 @@ RDEPEND=" DEPEND="${RDEPEND}" BDEPEND="dev-go/go-md2man" +PATCHES=( + "${FILESDIR}"/dont-call-as-directly-upstream-pr-5436.patch +) + pkg_pretend() { local CONFIG_CHECK="" use btrfs && CONFIG_CHECK+=" ~BTRFS_FS" diff --git a/app-containers/buildah/buildah-9999.ebuild b/app-containers/buildah/buildah-9999.ebuild index ecf84e28950c..b0b39faf03cb 100644 --- a/app-containers/buildah/buildah-9999.ebuild +++ b/app-containers/buildah/buildah-9999.ebuild @@ -44,6 +44,10 @@ RDEPEND=" DEPEND="${RDEPEND}" BDEPEND="dev-go/go-md2man" +PATCHES=( + "${FILESDIR}"/dont-call-as-directly-upstream-pr-5436.patch +) + pkg_pretend() { local CONFIG_CHECK="" use btrfs && CONFIG_CHECK+=" ~BTRFS_FS" diff --git a/app-containers/buildah/files/dont-call-as-directly-upstream-pr-5436.patch b/app-containers/buildah/files/dont-call-as-directly-upstream-pr-5436.patch new file mode 100644 index 000000000000..0fc376b1d68b --- /dev/null +++ b/app-containers/buildah/files/dont-call-as-directly-upstream-pr-5436.patch @@ -0,0 +1,32 @@ +From c1b43b57bb20f8796002e1d6f93bbdbc02e28f20 Mon Sep 17 00:00:00 2001 +From: Rahil Bhimjiani <me@rahil.rocks> +Date: Wed, 27 Mar 2024 14:27:09 +0530 +Subject: [PATCH] Makefile - instead of calling `as` directly, use it from env + var + +Signed-off-by: Rahil Bhimjiani <me@rahil.rocks> +--- + Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index f1ab6b8bf4..7d27a41530 100644 +--- a/Makefile ++++ b/Makefile +@@ -16,6 +16,7 @@ BUILDFLAGS := -tags "$(BUILDTAGS)" + BUILDAH := buildah + SELINUXOPT ?= $(shell test -x /usr/sbin/selinuxenabled && selinuxenabled && echo -Z) + SELINUXTYPE=container_runtime_exec_t ++AS ?= as + + GO := go + GO_LDFLAGS := $(shell if $(GO) version|grep -q gccgo; then echo "-gccgoflags"; else echo "-ldflags"; fi) +@@ -79,7 +80,7 @@ bin/buildah: $(SOURCES) cmd/buildah/*.go internal/mkcw/embed/entrypoint_amd64.gz + $(GO_BUILD) $(BUILDAH_LDFLAGS) $(GO_GCFLAGS) "$(GOGCFLAGS)" -o $@ $(BUILDFLAGS) ./cmd/buildah + test -z "${SELINUXOPT}" || chcon --verbose -t $(SELINUXTYPE) $@ + +-ifneq ($(shell as --version | grep x86_64),) ++ifneq ($(shell $(AS) --version | grep x86_64),) + internal/mkcw/embed/entrypoint_amd64.gz: internal/mkcw/embed/entrypoint_amd64 + gzip -k9nf $^ +