Add sysusers.d config file to allow rpm to create users/groups automatically
See https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers.
This commit is contained in:
parent
6f637162b6
commit
c3d7430998
17
galera.spec
17
galera.spec
@ -3,7 +3,7 @@ ExcludeArch: %{ix86}
|
||||
|
||||
Name: galera
|
||||
Version: 26.4.21
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Synchronous multi-master wsrep provider (replication engine)
|
||||
|
||||
License: GPLv2
|
||||
@ -19,7 +19,6 @@ Patch0: cmake_paths.patch
|
||||
Patch1: docs.patch
|
||||
|
||||
BuildRequires: boost-devel check-devel openssl-devel cmake systemd gcc-c++ asio-devel
|
||||
Requires(pre): /usr/sbin/useradd
|
||||
Requires: nmap-ncat
|
||||
Requires: procps-ng
|
||||
|
||||
@ -38,6 +37,11 @@ description of Galera replication engine see https://www.galeracluster.com web.
|
||||
%patch -P0 -p1
|
||||
%patch -P1 -p1
|
||||
|
||||
# Create a sysusers.d config file
|
||||
cat >galera.sysusers.conf <<EOF
|
||||
u garb - 'Galera Arbitrator Daemon' /dev/null -
|
||||
EOF
|
||||
|
||||
%build
|
||||
%{set_build_flags}
|
||||
|
||||
@ -109,13 +113,16 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}%{_unitdir}/garbd.service
|
||||
# Maintainers from other distributions also tries to resolve it on the upstream:
|
||||
# https://github.com/codership/galera/pull/633
|
||||
|
||||
install -m0644 -D galera.sysusers.conf %{buildroot}%{_sysusersdir}/galera.conf
|
||||
|
||||
|
||||
%check
|
||||
%ctest
|
||||
|
||||
|
||||
%pre
|
||||
/usr/sbin/useradd -M -r -d /dev/null -s /sbin/nologin -c "Galera Arbitrator Daemon" garb >/dev/null 2>&1 || :
|
||||
# Fixup after upgrading on system before systemd unit rename
|
||||
unlink /etc/systemd/system/garb.service || :
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
@ -150,9 +157,13 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}%{_unitdir}/garbd.service
|
||||
%doc %{_docdir}/galera/COPYING
|
||||
%doc %{_docdir}/galera/LICENSE.asio
|
||||
%doc %{_docdir}/galera/README-MySQL
|
||||
%{_sysusersdir}/galera.conf
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 26.4.21-2
|
||||
- Add sysusers.d config file to allow rpm to create users/groups automatically
|
||||
|
||||
* Wed Feb 05 2025 Michal Schorm <mschorm@redhat.com> - 26.4.21-1
|
||||
- Rebase to 26.4.21
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user