[SPECfile cleanup] start using %{unitdir} macro

Related: RHEL-31421
This commit is contained in:
Michal Schorm 2024-06-09 05:38:23 +02:00
parent e2664502af
commit 51a41a0520

View File

@ -70,13 +70,13 @@ cmake -B %_vpath_builddir -LAH
# Fedora downstream packaging historically used "garbd" name for the service.
#
# Let's stick with the Fedora legacy naming, AND provide an alias to the Galera upstream name
mv %{buildroot}/usr/lib/systemd/system/garb.service %{buildroot}/usr/lib/systemd/system/garbd.service
sed -i 's/Alias=garbd.service/Alias=garb.service/g' %{buildroot}/usr/lib/systemd/system/garbd.service
mv %{buildroot}%{_unitdir}/garb.service %{buildroot}%{_unitdir}/garbd.service
sed -i 's/Alias=garbd.service/Alias=garb.service/g' %{buildroot}%{_unitdir}/garbd.service
# PATCH 2:
# Fix the hardcoded paths
# In the Systemd service file:
sed -i 's;/usr/bin/garb-systemd;/usr/sbin/garb-systemd;g' %{buildroot}/usr/lib/systemd/system/garbd.service
sed -i 's;/usr/bin/garb-systemd;/usr/sbin/garb-systemd;g' %{buildroot}%{_unitdir}/garbd.service
# In the wrapper script:
sed -i 's;/usr/bin/garbd;/usr/sbin/garbd;g' %{buildroot}/usr/sbin/garb-systemd
@ -103,7 +103,7 @@ sed -i 's;/usr/bin/garbd;/usr/sbin/garbd;g' %{buildroot}/usr/sbin/garb-systemd
## in particular on systems using NFS or running containers. Allocate a user ID
## specific to this service, either statically via systemd-sysusers or dynamically
## via the DynamicUser= service setting.
sed -i 's/User=nobody/User=garb/g' %{buildroot}/usr/lib/systemd/system/garbd.service
sed -i 's/User=nobody/User=garb/g' %{buildroot}%{_unitdir}/garbd.service
%check