diff --git a/redis.spec b/redis.spec index 5048868e996d70dcc090870ddee43003cb1ae807..45d0a3390c37ab042cdd53e6dbee6353a15d65c6 100644 --- a/redis.spec +++ b/redis.spec @@ -1,6 +1,6 @@ Name: redis Version: 4.0.11 -Release: 6 +Release: 8 Summary: A persistent key-value database License: BSD and MIT URL: https://redis.io @@ -14,6 +14,14 @@ Patch0001: CVE-2019-10192-1.patch #Optimization of the above problem Patch0002: CVE-2019-10192-2.patch +BuildRequires: systemd +Requires: /bin/awk +Requires: logrotate +Requires(pre): shadow-utils +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + %description Redis is an advanced key-value store. It is often referred to as a dattructure server since keys can contain strings, hashes ,lists, sets anorted sets. @@ -40,6 +48,14 @@ install -pm644 %{SOURCE3} %{buildroot}%{_unitdir} install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}-sentinel.conf +%pre +getent group %{name} &> /dev/null || \ +groupadd -r %{name} &> /dev/null +getent passwd %{name} &> /dev/null || \ +useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \ +-c 'Redis Database Server' %{name} &> /dev/null +exit 0 + %post %systemd_post %{name}.service %systemd_post %{name}-sentinel.service @@ -68,6 +84,15 @@ install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}-sentinel.conf %{_unitdir}/%{name}-sentinel.service %changelog +* Fri Jun 19 2020 Captain Wei - 4.0.11-8 +- Add some dependency package in building and running phase + +* Fri Jun 12 2020 panchenbo - 4.0.11-7 +- Type:bugfix +- ID: NA +- SUG: restart +- DESC: Resolve service startup failure whthout no %pre + * Mon Jun 01 2020 huanghaitao - 4.0.11-6 - Resolve service startup failure