From f0c4a552c4cc38a53970e5076f3255d0030108f5 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 28 Jul 2025 16:30:58 +0200 Subject: use sysusers everywhere --- memcached.spec | 21 +-------------------- 1 file changed, 1 insertion(+), 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 -- cgit