From 5d49775ca346744a039cf38a38813dedbe87ab75 Mon Sep 17 00:00:00 2001 From: John Eckersberg Date: Tue, 2 Sep 2025 12:01:51 -0400 Subject: [PATCH] Makefile: Create storage symlink as relative Resolves: #1575 Signed-off-by: John Eckersberg --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b1cadb3ee..43c53fd8d 100644 --- a/Makefile +++ b/Makefile @@ -13,12 +13,13 @@ CARGO_FEATURES ?= $(shell . /usr/lib/os-release; if echo "$$ID_LIKE" |grep -qF r all: cargo build --release --features "$(CARGO_FEATURES)" +STORAGE_RELATIVE_PATH ?= $(shell realpath -m -s --relative-to="$(prefix)/lib/bootc/storage" /sysroot/ostree/bootc/storage) install: install -D -m 0755 -t $(DESTDIR)$(prefix)/bin target/release/bootc install -D -m 0755 -t $(DESTDIR)$(prefix)/bin target/release/system-reinstall-bootc install -d -m 0755 $(DESTDIR)$(prefix)/lib/bootc/bound-images.d install -d -m 0755 $(DESTDIR)$(prefix)/lib/bootc/kargs.d - ln -s /sysroot/ostree/bootc/storage $(DESTDIR)$(prefix)/lib/bootc/storage + ln -s "$(STORAGE_RELATIVE_PATH)" "$(DESTDIR)$(prefix)/lib/bootc/storage" install -D -m 0755 crates/cli/bootc-generator-stub $(DESTDIR)$(prefix)/lib/systemd/system-generators/bootc-systemd-generator install -d $(DESTDIR)$(prefix)/lib/bootc/install # Support installing pre-generated man pages shipped in source tarball, to avoid