Hello community, here is the log from the commit of package redis for openSUSE:Factory checked in at 2020-01-02 14:40:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/redis (Old) and /work/SRC/openSUSE:Factory/.redis.new.6675 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "redis" Thu Jan 2 14:40:34 2020 rev:49 rq:760139 version:5.0.7 Changes: -------- --- /work/SRC/openSUSE:Factory/redis/redis.changes 2019-12-07 15:12:23.427821314 +0100 +++ /work/SRC/openSUSE:Factory/.redis.new.6675/redis.changes 2020-01-02 14:40:46.588898399 +0100 @@ -1,0 +2,9 @@ +Mon Dec 30 17:59:52 UTC 2019 - Thorsten Kukuk <[email protected]> + +- Make redis useable in a container (drop size from 100MB to 20MB): + - Change user generation from shadow to sysusers + - Drop redis-initscript.patch and sudo requires, we use systemd + - Drop BuildRequires for procps and tcl, they are not needed + - Make logrotate recommend, it's not required for redis to work + +------------------------------------------------------------------- Old: ---- redis-initscript.patch New: ---- redis-user.conf ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ redis.spec ++++++ --- /var/tmp/diff_new_pack.F5J97C/_old 2020-01-02 14:40:47.400898720 +0100 +++ /var/tmp/diff_new_pack.F5J97C/_new 2020-01-02 14:40:47.404898722 +0100 @@ -35,20 +35,18 @@ Source6: %{name}.sysctl Source7: %{name}[email protected] Source8: %{name}-sentinel.target -# PATCH-FIX-OPENSUSE -- openSUSE-style init script -Patch0: %{name}-initscript.patch +Source9: %{name}-user.conf # PATCH-MISSING-TAG -- See https://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines -Patch1: %{name}-conf.patch -Patch2: %{name}-enable-bactrace-on-x86-ia64-and_arm32_only.patch -Patch3: %{name}-disable_integration_logging.patch -Patch4: reproducible.patch +Patch0: %{name}-conf.patch +Patch1: %{name}-enable-bactrace-on-x86-ia64-and_arm32_only.patch +Patch2: %{name}-disable_integration_logging.patch +Patch3: reproducible.patch BuildRequires: pkgconfig -BuildRequires: procps -BuildRequires: tcl +BuildRequires: sysuser-shadow +BuildRequires: sysuser-tools BuildRequires: pkgconfig(systemd) -Requires: logrotate -Requires: sudo -Requires(pre): shadow +Recommends: logrotate +%sysusers_requires %description %{name} is an advanced key-value store. It is similar to memcached but the dataset @@ -62,16 +60,16 @@ %setup -q %patch0 %patch1 -%patch2 %ifnarch %{ix86} x86_64 ia64 %{arm} # We have no backtrace, so disable logging test -%patch3 +%patch2 %endif -%patch4 -p1 +%patch3 -p1 %build export HOST=OBS # for reproducible builds make %{?_smp_mflags} CFLAGS="%{optflags}" V=1 +%sysusers_generate_pre %{SOURCE9} redis %install install -m 0750 -d \ @@ -110,6 +108,9 @@ ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} cp %{SOURCE5} README.SUSE +mkdir -p %{buildroot}%{_sysusersdir} +install -m 644 %{SOURCE9} %{buildroot}%{_sysusersdir}/ + %check %ifnarch ppc ppc64 cat <<EOF @@ -121,11 +122,7 @@ make %{?_smp_mflags} test || true %endif -%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} key-value store" -d %{_data_dir} %{name} || : +%pre -f redis.pre %service_add_pre redis.target [email protected] redis-sentinel.target [email protected] %post @@ -148,6 +145,7 @@ %{_sbindir}/%{name}-* %{_sbindir}/rc%{name} %{_libexecdir}/tmpfiles.d/%{name}.conf +%{_sysusersdir}/redis-user.conf %{_unitdir}/%{name}@.service %{_unitdir}/%{name}.target %{_unitdir}/%{name}[email protected] ++++++ redis-user.conf ++++++ # Type Name ID GECOS [HOME] u redis - "User for redis key-value store" /var/lib/redis
