From d05c1432b5c2bb405c8d6a6c9d2f66135236ca0b Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 24 Jan 2025 12:56:12 -0500 Subject: [PATCH] Switch systemd generator to be a dispatcher shell script rpm can't handle hardlinked binaries with distinct labels today gracefully; ostree (and bootc) always break the hardlink which I think is generally right. Anyways, switch to a dispatcher shell script to fix this. To fix https://issues.redhat.com/browse/RHEL-76188 Signed-off-by: Colin Walters --- Makefile | 3 +-- cli/bootc-generator-stub | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100755 cli/bootc-generator-stub diff --git a/Makefile b/Makefile index dbb1d7d7..8ecf8b04 100644 --- a/Makefile +++ b/Makefile @@ -12,8 +12,7 @@ install: 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 - install -d -m 0755 $(DESTDIR)$(prefix)/lib/systemd/system-generators/ - ln -f $(DESTDIR)$(prefix)/bin/bootc $(DESTDIR)$(prefix)/lib/systemd/system-generators/bootc-systemd-generator + install -D -m 0755 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 # a dependency on pandoc downstream. But in local builds these end up in target/man, diff --git a/cli/bootc-generator-stub b/cli/bootc-generator-stub new file mode 100755 index 00000000..71328341 --- /dev/null +++ b/cli/bootc-generator-stub @@ -0,0 +1,5 @@ +#!/bin/bash +# We can't actually hardlink because in Fedora (+derivatives) +# these have different SELinux labels. xref +# https://issues.redhat.com/browse/RHEL-76188 +exec bootc internals systemd-generator "$@"