Commit e900f51a authored by Nathan Scott's avatar Nathan Scott

Drop redis-trib sub-package and pre-systemd functionality

parent bea1cbef
...@@ -7,18 +7,6 @@ ...@@ -7,18 +7,6 @@
# Please preserve changelog entries # Please preserve changelog entries
# #
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
%global with_redistrib 1
%else
%global with_redistrib 0
%endif
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
%global with_systemd 1
%else
%global with_systemd 0
%endif
# Tests fail in mock, not in local build. # Tests fail in mock, not in local build.
%global with_tests %{?_with_tests:1}%{!?_with_tests:0} %global with_tests %{?_with_tests:1}%{!?_with_tests:0}
...@@ -32,7 +20,7 @@ ...@@ -32,7 +20,7 @@
Name: redis Name: redis
Version: 5.0.4 Version: 5.0.4
Release: 1%{?dist} Release: 2%{?dist}
Summary: A persistent key-value database Summary: A persistent key-value database
# redis, linenoise, lzf, hiredis are BSD # redis, linenoise, lzf, hiredis are BSD
# lua is MIT # lua is MIT
...@@ -66,23 +54,16 @@ BuildRequires: jemalloc-devel ...@@ -66,23 +54,16 @@ BuildRequires: jemalloc-devel
BuildRequires: procps-ng BuildRequires: procps-ng
BuildRequires: tcl BuildRequires: tcl
%endif %endif
%if 0%{?with_systemd}
BuildRequires: systemd BuildRequires: systemd
%endif # redis-trib functionality migrated to redis-cli
Obsoletes: redis-trib
# Required for redis-shutdown # Required for redis-shutdown
Requires: /bin/awk Requires: /bin/awk
Requires: logrotate Requires: logrotate
Requires(pre): shadow-utils Requires(pre): shadow-utils
%if 0%{?with_systemd}
Requires(post): systemd Requires(post): systemd
Requires(preun): systemd Requires(preun): systemd
Requires(postun): systemd Requires(postun): systemd
%else
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
Requires(postun): initscripts
%endif
Provides: bundled(hiredis) Provides: bundled(hiredis)
Provides: bundled(lua-libs) Provides: bundled(lua-libs)
Provides: bundled(linenoise) Provides: bundled(linenoise)
...@@ -138,18 +119,6 @@ Conflicts: redis < 4.0 ...@@ -138,18 +119,6 @@ Conflicts: redis < 4.0
Manual pages and detailed documentation for many aspects of Redis use, Manual pages and detailed documentation for many aspects of Redis use,
administration and development. administration and development.
%if 0%{?with_redistrib}
%package trib
Summary: Cluster management script for Redis
BuildArch: noarch
Requires: ruby
Requires: rubygem-redis
%description trib
Redis cluster management utility providing cluster creation, node addition
and removal, status checks, resharding, rebalancing, and other operations.
%endif
%prep %prep
%setup -q -b 10 %setup -q -b 10
%setup -q %setup -q
...@@ -202,7 +171,6 @@ install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf ...@@ -202,7 +171,6 @@ install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}-sentinel.conf install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}-sentinel.conf
# Install systemd unit files. # Install systemd unit files.
%if 0%{?with_systemd}
mkdir -p %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_unitdir}
install -pm644 %{S:3} %{buildroot}%{_unitdir} install -pm644 %{S:3} %{buildroot}%{_unitdir}
install -pm644 %{S:2} %{buildroot}%{_unitdir} install -pm644 %{S:2} %{buildroot}%{_unitdir}
...@@ -210,11 +178,6 @@ install -pm644 %{S:2} %{buildroot}%{_unitdir} ...@@ -210,11 +178,6 @@ install -pm644 %{S:2} %{buildroot}%{_unitdir}
# Install systemd limit files (requires systemd >= 204) # Install systemd limit files (requires systemd >= 204)
install -p -D -m 644 %{S:7} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/limit.conf install -p -D -m 644 %{S:7} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/limit.conf
install -p -D -m 644 %{S:7} %{buildroot}%{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf install -p -D -m 644 %{S:7} %{buildroot}%{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf
%else # install SysV service files
install -pDm755 %{S:4} %{buildroot}%{_initrddir}/%{name}-sentinel
install -pDm755 %{S:5} %{buildroot}%{_initrddir}/%{name}
install -p -D -m 644 %{S:8} %{buildroot}%{_sysconfdir}/security/limits.d/95-%{name}.conf
%endif
# Fix non-standard-executable-perm error. # Fix non-standard-executable-perm error.
chmod 755 %{buildroot}%{_bindir}/%{name}-* chmod 755 %{buildroot}%{_bindir}/%{name}-*
...@@ -225,11 +188,6 @@ install -pDm755 %{S:6} %{buildroot}%{_libexecdir}/%{name}-shutdown ...@@ -225,11 +188,6 @@ install -pDm755 %{S:6} %{buildroot}%{_libexecdir}/%{name}-shutdown
# Install redis module header # Install redis module header
install -pDm644 src/%{name}module.h %{buildroot}%{_includedir}/%{name}module.h install -pDm644 src/%{name}module.h %{buildroot}%{_includedir}/%{name}module.h
%if 0%{?with_redistrib}
# Install redis-trib
install -pDm755 src/%{name}-trib.rb %{buildroot}%{_bindir}/%{name}-trib
%endif
# Install man pages # Install man pages
man=$(dirname %{buildroot}%{_mandir}) man=$(dirname %{buildroot}%{_mandir})
for page in man/man?/*; do for page in man/man?/*; do
...@@ -272,37 +230,16 @@ useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \ ...@@ -272,37 +230,16 @@ useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \
exit 0 exit 0
%post %post
%if 0%{?with_systemd}
%systemd_post %{name}.service %systemd_post %{name}.service
%systemd_post %{name}-sentinel.service %systemd_post %{name}-sentinel.service
%else
chkconfig --add %{name}
chkconfig --add %{name}-sentinel
%endif
%preun %preun
%if 0%{?with_systemd}
%systemd_preun %{name}.service %systemd_preun %{name}.service
%systemd_preun %{name}-sentinel.service %systemd_preun %{name}-sentinel.service
%else
if [ $1 -eq 0 ] ; then
service %{name} stop &> /dev/null
chkconfig --del %{name} &> /dev/null
service %{name}-sentinel stop &> /dev/null
chkconfig --del %{name}-sentinel &> /dev/null
fi
%endif
%postun %postun
%if 0%{?with_systemd}
%systemd_postun_with_restart %{name}.service %systemd_postun_with_restart %{name}.service
%systemd_postun_with_restart %{name}-sentinel.service %systemd_postun_with_restart %{name}-sentinel.service
%else
if [ "$1" -ge "1" ] ; then
service %{name} condrestart >/dev/null 2>&1 || :
service %{name}-sentinel condrestart >/dev/null 2>&1 || :
fi
%endif
%files %files
%{!?_licensedir:%global license %%doc} %{!?_licensedir:%global license %%doc}
...@@ -314,9 +251,6 @@ fi ...@@ -314,9 +251,6 @@ fi
%dir %attr(0750, redis, redis) %{redis_modules_dir} %dir %attr(0750, redis, redis) %{redis_modules_dir}
%dir %attr(0750, redis, redis) %{_sharedstatedir}/%{name} %dir %attr(0750, redis, redis) %{_sharedstatedir}/%{name}
%dir %attr(0750, redis, redis) %{_localstatedir}/log/%{name} %dir %attr(0750, redis, redis) %{_localstatedir}/log/%{name}
%if 0%{?with_redistrib}
%exclude %{_bindir}/%{name}-trib
%endif
%exclude %{macrosdir} %exclude %{macrosdir}
%exclude %{_includedir} %exclude %{_includedir}
%exclude %{_docdir}/%{name}/* %exclude %{_docdir}/%{name}/*
...@@ -324,7 +258,6 @@ fi ...@@ -324,7 +258,6 @@ fi
%{_libexecdir}/%{name}-* %{_libexecdir}/%{name}-*
%{_mandir}/man1/%{name}* %{_mandir}/man1/%{name}*
%{_mandir}/man5/%{name}* %{_mandir}/man5/%{name}*
%if 0%{?with_systemd}
%{_unitdir}/%{name}.service %{_unitdir}/%{name}.service
%{_unitdir}/%{name}-sentinel.service %{_unitdir}/%{name}-sentinel.service
%dir %{_sysconfdir}/systemd/system/%{name}.service.d %dir %{_sysconfdir}/systemd/system/%{name}.service.d
...@@ -332,12 +265,6 @@ fi ...@@ -332,12 +265,6 @@ fi
%dir %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d %dir %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d
%config(noreplace) %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf %config(noreplace) %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf
%dir %attr(0755, redis, redis) %ghost %{_localstatedir}/run/%{name} %dir %attr(0755, redis, redis) %ghost %{_localstatedir}/run/%{name}
%else
%{_initrddir}/%{name}
%{_initrddir}/%{name}-sentinel
%config(noreplace) %{_sysconfdir}/security/limits.d/95-%{name}.conf
%dir %attr(0755, redis, redis) %{_localstatedir}/run/%{name}
%endif
%files devel %files devel
%license COPYING %license COPYING
...@@ -350,14 +277,12 @@ fi ...@@ -350,14 +277,12 @@ fi
%docdir %{_docdir}/%{name} %docdir %{_docdir}/%{name}
%{_docdir}/%{name} %{_docdir}/%{name}
%if 0%{?with_redistrib}
%files trib
%license COPYING
%{_bindir}/%{name}-trib
%endif
%changelog %changelog
* Sat May 11 2019 Nathan Scott <nathans@redhat.com> - 5.0.4-2
- Obsolete redis-trib - functionality now in redis-cli(1)
- Remove old chkconfig support, all systemd platforms now
* Tue Mar 19 2019 Nathan Scott <nathans@redhat.com> - 5.0.4-1 * Tue Mar 19 2019 Nathan Scott <nathans@redhat.com> - 5.0.4-1
- Upstream 5.0.4 release and redis-doc updates. - Upstream 5.0.4 release and redis-doc updates.
- Fix sentinel.conf logfile line addition. - Fix sentinel.conf logfile line addition.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment