1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-05 06:45:13 +01:00

cli: Fix rhsm feature propagation and manpage build order

The rhsm feature was not being propagated from the CLI crate to the
lib crate, causing `bootc internals publish-rhsm-facts` to never be
compiled in even when building with CARGO_FEATURES=rhsm.

I think this was broken when I refactored the build recently.

Change things so we build the manpages before the production
binary, ensuring the production binary always ends up with
the right feature flags.

Fixes: https://issues.redhat.com/browse/RHEL-130799
Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
This commit is contained in:
Colin Walters
2025-11-25 09:40:02 -05:00
parent 535f1e771c
commit e747216980
3 changed files with 31 additions and 31 deletions

View File

@@ -29,16 +29,19 @@ prefix ?= /usr
# We may in the future also want to include Fedora+derivatives as
# the code is really tiny.
# (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)
CARGO_FEATURES_DEFAULT ?= $(shell . /usr/lib/os-release; if echo "$$ID_LIKE" |grep -qF rhel; then echo rhsm; fi)
# You can set this to override all cargo features, including the defaults
CARGO_FEATURES ?= $(CARGO_FEATURES_DEFAULT)
all: bin manpages
bin:
cargo build --release --features "$(CARGO_FEATURES)"
# Build all binaries
.PHONY: bin
bin: manpages
cargo build --release --features "$(CARGO_FEATURES)" --bins
# Note this cargo build is run without features (such as rhsm)
.PHONY: manpages
manpages:
cargo run --package xtask -- manpages
cargo run --release --package xtask -- manpages
STORAGE_RELATIVE_PATH ?= $(shell realpath -m -s --relative-to="$(prefix)/lib/bootc/storage" /sysroot/ostree/bootc/storage)
install: