diff --git a/redis.changes b/redis.changes index 31bc75f..4635ac7 100644 --- a/redis.changes +++ b/redis.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Jul 30 12:30:02 UTC 2016 - jengelh@inai.de + +- Test for user/group existence before creating them. + Request shadow to be present for the scriptlet. + ------------------------------------------------------------------- Sat Jul 30 10:06:22 UTC 2016 - astieger@suse.com diff --git a/redis.spec b/redis.spec index 0007479..7897870 100644 --- a/redis.spec +++ b/redis.spec @@ -46,6 +46,7 @@ Patch3: CVE-2013-7458.patch BuildRequires: pkgconfig BuildRequires: procps BuildRequires: tcl +Requires(pre): shadow Requires: logrotate Requires: sudo BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -128,8 +129,10 @@ make %{?_smp_mflags} test && true %endif %pre -%{_sbindir}/groupadd -r %{name} >/dev/null 2>&1 || : -%{_sbindir}/useradd -g %{name} -s /bin/false -r -c "User for Redis key-value store" -d %{_data_dir} %{name} >/dev/null 2>&1 || : +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 Redis key-value store" -d %{_data_dir} %{name} || : %if %{with systemd} %service_add_pre %{name}.target %endif