Allow overriding sbin directory
This fixes the Koji build for Fedora 42+, where on an installed system, `/sbin` and `/usr/sbin` are symlinks to `/usr/bin`; see: https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin On a build root the symlink does not exist, so attempts in the spec to manipulate binaries in `%{_sbindir}/` fail as these binaries are installed to `%{buildroot}/usr/sbin` while the script is looking for `%{buildroot}/usr/bin` The default value is set to `/usr/sbin` so not passing `SBINDIR` when installing results in the current behavior being preserved. Signed-off-by: Michel Lind <salimma@fedoraproject.org>
This commit is contained in:
parent
b6c9ce7a59
commit
18528e563c
3 changed files with 9 additions and 6 deletions
|
|
@ -1,4 +1,5 @@
|
|||
BINFILES = kojira koji-gc koji-shadow koji-sweep-db koji-sidetag-cleanup
|
||||
SBINDIR ?= /usr/sbin
|
||||
SYSTEMDSYSTEMUNITDIR = $(shell pkg-config systemd --variable=systemdsystemunitdir)
|
||||
|
||||
_default:
|
||||
|
|
@ -15,8 +16,8 @@ _install:
|
|||
echo "ERROR: A destdir is required"; \
|
||||
exit 1; \
|
||||
fi
|
||||
mkdir -p $(DESTDIR)/usr/sbin
|
||||
install -p -m 755 $(BINFILES) $(DESTDIR)/usr/sbin
|
||||
mkdir -p $(DESTDIR)$(SBINDIR)
|
||||
install -p -m 755 $(BINFILES) $(DESTDIR)$(SBINDIR)
|
||||
|
||||
mkdir -p $(DESTDIR)/etc/kojira
|
||||
install -p -m 644 kojira.conf $(DESTDIR)/etc/kojira/kojira.conf
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue