Rename the systemd service from 'garbd.service' to 'garb.service'
Move to the upstream naming of the systemd service. The Galera upstream uses name "garb" for the service while providing "garbd" alias Fedora downstream packaging historically used "garbd" name for the service.
This commit is contained in:
parent
a2790244f4
commit
910ddf71b4
22
galera.spec
22
galera.spec
@ -65,20 +65,10 @@ cmake -B %_vpath_builddir -LAH
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
# PATCH 1:
|
||||
# Change the Systemd service name from "garb" to "garbd"
|
||||
#
|
||||
# The Galera upstream uses name "garb" for the service while providing "garbd" alias
|
||||
# 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}%{_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}%{_unitdir}/garbd.service
|
||||
sed -i 's;/usr/bin/garb-systemd;/usr/sbin/garb-systemd;g' %{buildroot}%{_unitdir}/garb.service
|
||||
# In the wrapper script:
|
||||
sed -i 's;/usr/bin/garbd;/usr/sbin/garbd;g' %{buildroot}/usr/sbin/garb-systemd
|
||||
|
||||
@ -105,7 +95,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}%{_unitdir}/garbd.service
|
||||
sed -i 's/User=nobody/User=garb/g' %{buildroot}%{_unitdir}/garb.service
|
||||
|
||||
|
||||
%check
|
||||
@ -117,14 +107,14 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}%{_unitdir}/garbd.service
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%systemd_post garbd.service
|
||||
%systemd_post garb.service
|
||||
|
||||
%preun
|
||||
%systemd_preun garbd.service
|
||||
%systemd_preun garb.service
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
%systemd_postun_with_restart garbd.service
|
||||
%systemd_postun_with_restart garb.service
|
||||
|
||||
|
||||
%files
|
||||
@ -141,7 +131,7 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}%{_unitdir}/garbd.service
|
||||
|
||||
%{_mandir}/man8/garbd.8*
|
||||
|
||||
%{_unitdir}/garbd.service
|
||||
%{_unitdir}/garb.service
|
||||
|
||||
%{_libdir}/galera/libgalera_smm.so
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user