Skip to content

Commit 722ab14

Browse files
committed
build-sys: Enable rhsm feature on rhel-like systems by default
The Dockerfile right now doesn't build an RPM, so this ensures the two build systems match. We should probably also change the RPM to use this Makefile. Motivated by accidentally merging a change that breaks with the feature on. Signed-off-by: Colin Walters <[email protected]>
1 parent 147f16c commit 722ab14

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ SOURCE_DATE_EPOCH ?= $(shell git log -1 --pretty=%ct)
44
# https://reproducible-builds.org/docs/archives/
55
TAR_REPRODUCIBLE = tar --mtime="@${SOURCE_DATE_EPOCH}" --sort=name --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime
66

7+
# Enable rhsm if we detect the build environment is RHEL-like.
8+
# We may in the future also want to include Fedora+derivatives as
9+
# the code is really tiny.
10+
# (Note we should also make installation of the units conditional on the rhsm feature)
11+
CARGO_FEATURES ?= $(shell . /usr/lib/os-release; if echo "$$ID_LIKE" |grep -qF rhel; then echo rhsm; fi)
12+
713
all:
8-
cargo build --release
14+
cargo build --release --features "$(CARGO_FEATURES)"
915

1016
install:
1117
install -D -m 0755 -t $(DESTDIR)$(prefix)/bin target/release/bootc

0 commit comments

Comments
 (0)