diff options
author | Remi Collet <remi@remirepo.net> | 2025-07-28 16:30:58 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2025-07-28 16:30:58 +0200 |
commit | f0c4a552c4cc38a53970e5076f3255d0030108f5 (patch) | |
tree | 1841b184e17e26e832253e49f3fff0b92d6c545b | |
parent | 975c2ffeff0d4bd7b7ef18a426812d1705110e89 (diff) |
use sysusers everywhere
-rw-r--r-- | memcached.spec | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/memcached.spec b/memcached.spec index a78cc16..90a2b5e 100644 --- a/memcached.spec +++ b/memcached.spec @@ -19,11 +19,6 @@ %bcond_without proxy %bcond_without tls %bcond_without selinux -%if 0%{?fedora} >= 35 || 0%{?rhel} >= 9 -%bcond_without sysusers -%else -%bcond_with sysusers -%endif # disable testing as it is unreliable on build systems %bcond_with tests @@ -68,12 +63,8 @@ BuildRequires: libseccomp-devel %if %{with tls} BuildRequires: openssl-devel >= 1.1 %endif -%if %{with sysusers} %sysusers_requires_compat BuildRequires: systemd-rpm-macros -%else -Requires(pre): shadow-utils -%endif %{?systemd_requires} %if %{with selinux} @@ -205,9 +196,8 @@ popd # Default configs install -Dp -m0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/sysconfig/%{name} -%if %{with sysusers} +# Systemd users install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/memcached.conf -%endif %if %{with selinux} @@ -228,14 +218,7 @@ fi %endif %pre -%if %{with sysusers} %sysusers_create_compat %{SOURCE3} -%else -getent group %{groupname} >/dev/null || groupadd -r %{groupname} -getent passwd %{username} >/dev/null || \ -useradd -r -g %{groupname} -d /run/memcached \ - -s /sbin/nologin -c "Memcached daemon" %{username} -%endif exit 0 @@ -261,9 +244,7 @@ exit 0 %{_mandir}/man1/memcached.1* %{_unitdir}/memcached.service %{_unitdir}/memcached@.service -%if %{with sysusers} %{_sysusersdir}/memcached.conf -%endif %files devel |