Skip to content

Commit 1537946

Browse files
authored
Merge pull request #1531 from cgwalters/rhsm-default
build-sys: Enable rhsm feature on rhel-like systems by default
2 parents f7c4bd1 + 722ab14 commit 1537946

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)