Skip to content

Commit d05c143

Browse files
committed
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 <[email protected]>
1 parent 2f90eff commit d05c143

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ install:
1212
install -d -m 0755 $(DESTDIR)$(prefix)/lib/bootc/bound-images.d
1313
install -d -m 0755 $(DESTDIR)$(prefix)/lib/bootc/kargs.d
1414
ln -s /sysroot/ostree/bootc/storage $(DESTDIR)$(prefix)/lib/bootc/storage
15-
install -d -m 0755 $(DESTDIR)$(prefix)/lib/systemd/system-generators/
16-
ln -f $(DESTDIR)$(prefix)/bin/bootc $(DESTDIR)$(prefix)/lib/systemd/system-generators/bootc-systemd-generator
15+
install -D -m 0755 cli/bootc-generator-stub $(DESTDIR)$(prefix)/lib/systemd/system-generators/bootc-systemd-generator
1716
install -d $(DESTDIR)$(prefix)/lib/bootc/install
1817
# Support installing pre-generated man pages shipped in source tarball, to avoid
1918
# a dependency on pandoc downstream. But in local builds these end up in target/man,

cli/bootc-generator-stub

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
# We can't actually hardlink because in Fedora (+derivatives)
3+
# these have different SELinux labels. xref
4+
# https://issues.redhat.com/browse/RHEL-76188
5+
exec bootc internals systemd-generator "$@"

0 commit comments

Comments
 (0)