Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions contrib/packaging/bootc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't this happening on c9s too? I suspect it has to do with the rust version, not the host OS version.

It seems simpler to just unconditionally do it on s390x anyways.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henrywang mentioned it happening on c9s but I haven't seen it happen yet in our CI, I figured I would be more conservative at first and if we start to see it showing up on 9 we can add it.

If it's not broken on Fedora for example I'd rather not enable the workaround there.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OH, sorry, my bad @jeckersb. It's CS10, not CS9. CS9 is empty my brain. Sorry about that!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Less broken things = better!

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}
Expand Down