From 4d45502b4b749a5b631a7e7ab0e34226fce5239e Mon Sep 17 00:00:00 2001 From: John Eckersberg Date: Tue, 7 Oct 2025 09:46:17 -0400 Subject: [PATCH 1/2] Makefile: targeted workaround for s390x builds on c10s Signed-off-by: John Eckersberg --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 483a6b12d..c1b131acd 100644 --- a/Makefile +++ b/Makefile @@ -27,10 +27,18 @@ TAR_REPRODUCIBLE = tar --mtime="@${SOURCE_DATE_EPOCH}" --sort=name --owner=0 --g # (Note we should also make installation of the units conditional on the rhsm feature) CARGO_FEATURES ?= $(shell . /usr/lib/os-release; if echo "$$ID_LIKE" |grep -qF rhel; then echo rhsm; fi) +# https://issues.redhat.com/browse/RHEL-116881 +ARCH ?= $(shell uname -m) +ID ?= $(shell [ -f /etc/os-release ] && . /etc/os-release && echo $$ID) +VERSION_ID ?= $(shell [ -f /etc/os-release ] && . /etc/os-release && echo $$VERSION_ID) +ifeq ($(ARCH)-$(ID)-$(VERSION_ID),s390x-centos-10) +CARGO_BUILD_ENV ?= MALLOC_MMAP_MAX_=0 +endif + all: bin manpages bin: - cargo build --release --features "$(CARGO_FEATURES)" + $(CARGO_BUILD_ENV) cargo build --release --features "$(CARGO_FEATURES)" .PHONY: manpages manpages: From 64651dd3e8a356df3a1b258a61620d1505c19416 Mon Sep 17 00:00:00 2001 From: John Eckersberg Date: Tue, 7 Oct 2025 10:28:25 -0400 Subject: [PATCH 2/2] specfile: targeted workaround for s390x builds on c10s Signed-off-by: John Eckersberg --- contrib/packaging/bootc.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contrib/packaging/bootc.spec b/contrib/packaging/bootc.spec index 1e5c10ecd..245259692 100644 --- a/contrib/packaging/bootc.spec +++ b/contrib/packaging/bootc.spec @@ -95,6 +95,13 @@ cat vendor-config.toml >> .cargo/config.toml rm vendor-config.toml %build +# https://issues.redhat.com/browse/RHEL-116881 +%if 0%{?rhel} >= 10 +if test $(arch) = s390x; then + export MALLOC_MMAP_MAX_=0 +fi +%endif + # Build the main bootc binary %if %new_cargo_macros %cargo_build %{?with_rhsm:-f rhsm}