Accepting request 899808 from home:gmbr3:Active
- Change to using systemd-sysusers OBS-URL: https://build.opensuse.org/request/show/899808 OBS-URL: https://build.opensuse.org/package/show/network:utilities/memcached?expand=0&rev=85
This commit is contained in:
parent
801005e1eb
commit
b7f4d01d9c
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 4 13:18:29 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
|
||||
|
||||
- Change to using systemd-sysusers
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 26 18:44:34 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
|
@ -39,6 +39,7 @@ Source1: %{name}.init
|
||||
Source2: %{name}.sysconfig
|
||||
Source3: memcached-rpmlintrc
|
||||
Source4: memcached.service
|
||||
Source5: system-user-memcached.conf
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: cyrus-sasl-devel
|
||||
@ -52,8 +53,13 @@ BuildRequires: perl-Net-SSLeay
|
||||
%endif
|
||||
BuildRequires: pkgconfig
|
||||
Requires(pre): %fillup_prereq
|
||||
%if 0%{?suse_version} >= 1500
|
||||
BuildRequires: sysuser-tools
|
||||
%sysusers_requires
|
||||
%else
|
||||
Requires(pre): %{_sbindir}/groupadd
|
||||
Requires(pre): %{_sbindir}/useradd
|
||||
%endif
|
||||
Conflicts: memcached-unstable
|
||||
%if 0%{?suse_version} > 1210
|
||||
BuildRequires: systemd-rpm-macros
|
||||
@ -98,6 +104,9 @@ autoreconf -fi
|
||||
--bindir=%{_sbindir}
|
||||
|
||||
make %{?_smp_mflags}
|
||||
%if 0%{?suse_version} >= 1500
|
||||
%sysusers_generate_pre %{SOURCE5} memcached system-user-memcached.conf
|
||||
%endif
|
||||
|
||||
%install
|
||||
%make_install
|
||||
@ -111,16 +120,24 @@ install -D -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}.service
|
||||
install -D -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/%{name}
|
||||
ln -s ../..%{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1500
|
||||
mkdir -p %{buildroot}%{_sysusersdir}
|
||||
install -m 0644 %{SOURCE5} %{buildroot}%{_sysusersdir}/
|
||||
%endif
|
||||
|
||||
%check
|
||||
make %{?_smp_mflags} test
|
||||
|
||||
%if 0%{?suse_version} >= 1500
|
||||
%pre -f memcached.pre
|
||||
%else
|
||||
%pre
|
||||
getent group %{name} >/dev/null || \
|
||||
%{_sbindir}/groupadd -r %{name}
|
||||
getent passwd %{name} >/dev/null || \
|
||||
%{_sbindir}/useradd -g %{name} -s /bin/false -r \
|
||||
-c "user for %{name}" -d %{_localstatedir}/lib/%{name} %{name}
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1210
|
||||
%service_add_pre %{name}.service
|
||||
%endif
|
||||
@ -162,6 +179,9 @@ getent passwd %{name} >/dev/null || \
|
||||
%endif
|
||||
%{_fillupdir}/sysconfig.%{name}
|
||||
%dir %attr(751,root,root) %{_localstatedir}/lib/%{name}
|
||||
%if 0%{?suse_version} >= 1500
|
||||
%{_sysusersdir}/system-user-memcached.conf
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%doc AUTHORS ChangeLog NEWS doc/*.txt
|
||||
|
2
system-user-memcached.conf
Normal file
2
system-user-memcached.conf
Normal file
@ -0,0 +1,2 @@
|
||||
#Type Name ID GECOS Home directory Shell
|
||||
u memcached - "user for memcached" /var/lib/memcached -
|
Loading…
Reference in New Issue
Block a user