|
|
|
@ -1,23 +1,32 @@
@@ -1,23 +1,32 @@
|
|
|
|
|
%global with_perftools 1 |
|
|
|
|
%global with_redistrib 1 |
|
|
|
|
%global with_pandoc 0 |
|
|
|
|
%global with_systemd 1 |
|
|
|
|
# |
|
|
|
|
# Fedora spec file for redis |
|
|
|
|
# |
|
|
|
|
# License: MIT |
|
|
|
|
# http://opensource.org/licenses/MIT |
|
|
|
|
# |
|
|
|
|
# Please preserve changelog entries |
|
|
|
|
# |
|
|
|
|
|
|
|
|
|
# Tests fail in mock, not in local build. |
|
|
|
|
%global with_tests %{?_with_tests:1}%{!?_with_tests:0} |
|
|
|
|
|
|
|
|
|
# Commit IDs for the (unversioned) redis-doc repository |
|
|
|
|
# https://fedoraproject.org/wiki/Packaging:SourceURL "Commit Revision" |
|
|
|
|
%global doc_commit 38c2bd6f5331aad382494b3c7833b0cc2b92222a |
|
|
|
|
%global doc_commit 685cc5a4d323203d8e1eb85de3adc47830687207 |
|
|
|
|
%global short_doc_commit %(c=%{doc_commit}; echo ${c:0:7}) |
|
|
|
|
|
|
|
|
|
# %%{rpmmacrodir} not usable on EL-6 |
|
|
|
|
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) |
|
|
|
|
|
|
|
|
|
Name: redis |
|
|
|
|
Version: 5.0.4 |
|
|
|
|
Version: 5.0.6 |
|
|
|
|
Release: 1%{?dist} |
|
|
|
|
Summary: A persistent key-value database |
|
|
|
|
License: BSD |
|
|
|
|
URL: http://redis.io |
|
|
|
|
Source0: http://download.redis.io/releases/%{name}-%{version}.tar.gz |
|
|
|
|
# redis, linenoise, lzf, hiredis are BSD |
|
|
|
|
# lua is MIT |
|
|
|
|
License: BSD and MIT |
|
|
|
|
URL: https://redis.io |
|
|
|
|
Source0: https://download.redis.io/releases/%{name}-%{version}.tar.gz |
|
|
|
|
Source1: %{name}.logrotate |
|
|
|
|
Source2: %{name}-sentinel.service |
|
|
|
|
Source3: %{name}.service |
|
|
|
@ -39,38 +48,26 @@ Source10: https://github.com/antirez/%{name}-doc/archive/%{doc_commit}/
@@ -39,38 +48,26 @@ Source10: https://github.com/antirez/%{name}-doc/archive/%{doc_commit}/
|
|
|
|
|
Patch0001: 0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch |
|
|
|
|
# https://github.com/antirez/redis/pull/3494 - symlink |
|
|
|
|
Patch0002: 0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch |
|
|
|
|
%if 0%{?with_perftools} |
|
|
|
|
BuildRequires: gperftools-devel |
|
|
|
|
%else |
|
|
|
|
BuildRequires: jemalloc-devel |
|
|
|
|
%endif |
|
|
|
|
BuildRequires: gcc |
|
|
|
|
%if 0%{?with_tests} |
|
|
|
|
BuildRequires: procps-ng |
|
|
|
|
BuildRequires: tcl |
|
|
|
|
%endif |
|
|
|
|
%if 0%{?with_pandoc} |
|
|
|
|
BuildRequires: pandoc |
|
|
|
|
%endif |
|
|
|
|
%if 0%{?with_systemd} |
|
|
|
|
BuildRequires: systemd |
|
|
|
|
%endif |
|
|
|
|
# redis-trib functionality migrated to redis-cli |
|
|
|
|
Obsoletes: redis-trib |
|
|
|
|
# Required for redis-shutdown |
|
|
|
|
Requires: /bin/awk |
|
|
|
|
Requires: logrotate |
|
|
|
|
Requires(pre): shadow-utils |
|
|
|
|
%if 0%{?with_systemd} |
|
|
|
|
Requires(post): systemd |
|
|
|
|
Requires(preun): systemd |
|
|
|
|
Requires(postun): systemd |
|
|
|
|
%else |
|
|
|
|
Requires(post): chkconfig |
|
|
|
|
Requires(preun): chkconfig |
|
|
|
|
Requires(preun): initscripts |
|
|
|
|
Requires(postun): initscripts |
|
|
|
|
%endif |
|
|
|
|
Provides: bundled(hiredis) |
|
|
|
|
Provides: bundled(jemalloc) |
|
|
|
|
Provides: bundled(lua-libs) |
|
|
|
|
Provides: bundled(linenoise) |
|
|
|
|
Provides: bundled(lzf) |
|
|
|
|
|
|
|
|
|
%global redis_modules_abi 1 |
|
|
|
|
%global redis_modules_dir %{_libdir}/%{name}/modules |
|
|
|
@ -122,34 +119,19 @@ Conflicts: redis < 4.0
@@ -122,34 +119,19 @@ Conflicts: redis < 4.0
|
|
|
|
|
Manual pages and detailed documentation for many aspects of Redis use, |
|
|
|
|
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 |
|
|
|
|
%setup -q -b 10 |
|
|
|
|
%setup -q |
|
|
|
|
mv ../%{name}-doc-%{doc_commit} doc |
|
|
|
|
rm -frv deps/jemalloc |
|
|
|
|
%patch0001 -p1 |
|
|
|
|
%patch0002 -p1 |
|
|
|
|
|
|
|
|
|
# Use system jemalloc library |
|
|
|
|
sed -i -e '/cd jemalloc && /d' deps/Makefile |
|
|
|
|
sed -i -e 's|../deps/jemalloc/lib/libjemalloc.a|-ljemalloc -ldl|g' src/Makefile |
|
|
|
|
sed -i -e 's|-I../deps/jemalloc.*|-DJEMALLOC_NO_DEMANGLE -I/usr/include/jemalloc|g' src/Makefile |
|
|
|
|
mv deps/lua/COPYRIGHT COPYRIGHT-lua |
|
|
|
|
mv deps/hiredis/COPYING COPYING-hiredis |
|
|
|
|
|
|
|
|
|
# Configuration file changes and additions |
|
|
|
|
# Configuration file changes |
|
|
|
|
sed -i -e 's|^logfile .*$|logfile /var/log/redis/redis.log|g' redis.conf |
|
|
|
|
sed -i -e '$ alogfile /var/log/redis/sentinel.log' sentinel.conf |
|
|
|
|
sed -i -e 's|^logfile .*$|logfile /var/log/redis/sentinel.log|g' sentinel.conf |
|
|
|
|
sed -i -e 's|^dir .*$|dir /var/lib/redis|g' redis.conf |
|
|
|
|
|
|
|
|
|
# Module API version safety check |
|
|
|
@ -160,19 +142,7 @@ if test "$api" != "%{redis_modules_abi}"; then
@@ -160,19 +142,7 @@ if test "$api" != "%{redis_modules_abi}"; then
|
|
|
|
|
exit 1 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
%if 0%{?with_pandoc} |
|
|
|
|
docs=`find doc -name \*.md | sed -e 's|.md$||g'` |
|
|
|
|
for doc in $docs; do |
|
|
|
|
pandoc --standalone --from markdown --to html --output $doc.html $doc.md |
|
|
|
|
done |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
%if 0%{?with_perftools} |
|
|
|
|
%global malloc_flags MALLOC=tcmalloc |
|
|
|
|
%else |
|
|
|
|
%global malloc_flags MALLOC=jemalloc |
|
|
|
|
%endif |
|
|
|
|
%global make_flags DEBUG="" V="echo" LDFLAGS="%{?__global_ldflags}" CFLAGS+="%{optflags} -fPIC" %{malloc_flags} INSTALL="install -p" PREFIX=%{buildroot}%{_prefix} |
|
|
|
|
%global make_flags DEBUG="" V="echo" LDFLAGS="%{?__global_ldflags}" CFLAGS+="%{optflags} -fPIC" INSTALL="install -p" PREFIX=%{buildroot}%{_prefix} |
|
|
|
|
|
|
|
|
|
%build |
|
|
|
|
make %{?_smp_mflags} %{make_flags} all |
|
|
|
@ -194,7 +164,6 @@ install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
@@ -194,7 +164,6 @@ install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
|
|
|
|
|
install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}-sentinel.conf |
|
|
|
|
|
|
|
|
|
# Install systemd unit files. |
|
|
|
|
%if 0%{?with_systemd} |
|
|
|
|
mkdir -p %{buildroot}%{_unitdir} |
|
|
|
|
install -pm644 %{S:3} %{buildroot}%{_unitdir} |
|
|
|
|
install -pm644 %{S:2} %{buildroot}%{_unitdir} |
|
|
|
@ -202,11 +171,6 @@ install -pm644 %{S:2} %{buildroot}%{_unitdir}
@@ -202,11 +171,6 @@ install -pm644 %{S:2} %{buildroot}%{_unitdir}
|
|
|
|
|
# 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}-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. |
|
|
|
|
chmod 755 %{buildroot}%{_bindir}/%{name}-* |
|
|
|
@ -217,11 +181,6 @@ install -pDm755 %{S:6} %{buildroot}%{_libexecdir}/%{name}-shutdown
@@ -217,11 +181,6 @@ install -pDm755 %{S:6} %{buildroot}%{_libexecdir}/%{name}-shutdown
|
|
|
|
|
# Install redis module header |
|
|
|
|
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 |
|
|
|
|
man=$(dirname %{buildroot}%{_mandir}) |
|
|
|
|
for page in man/man?/*; do |
|
|
|
@ -238,9 +197,6 @@ done
@@ -238,9 +197,6 @@ done
|
|
|
|
|
for page in $(find doc -name \*.md | sed -e 's|.md$||g'); do |
|
|
|
|
base=$(echo $page | sed -e 's|doc/||g') |
|
|
|
|
install -Dpm644 $page.md $doc/$base.md |
|
|
|
|
%if 0%{?with_pandoc} |
|
|
|
|
install -Dpm644 $page.html $doc/$base.html |
|
|
|
|
%endif |
|
|
|
|
done |
|
|
|
|
|
|
|
|
|
# Install rpm macros for redis modules |
|
|
|
@ -267,37 +223,16 @@ useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \
@@ -267,37 +223,16 @@ useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \
|
|
|
|
|
exit 0 |
|
|
|
|
|
|
|
|
|
%post |
|
|
|
|
%if 0%{?with_systemd} |
|
|
|
|
%systemd_post %{name}.service |
|
|
|
|
%systemd_post %{name}-sentinel.service |
|
|
|
|
%else |
|
|
|
|
chkconfig --add %{name} |
|
|
|
|
chkconfig --add %{name}-sentinel |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
%preun |
|
|
|
|
%if 0%{?with_systemd} |
|
|
|
|
%systemd_preun %{name}.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 |
|
|
|
|
%if 0%{?with_systemd} |
|
|
|
|
%systemd_postun_with_restart %{name}.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 |
|
|
|
|
%{!?_licensedir:%global license %%doc} |
|
|
|
@ -309,9 +244,6 @@ fi
@@ -309,9 +244,6 @@ fi
|
|
|
|
|
%dir %attr(0750, redis, redis) %{redis_modules_dir} |
|
|
|
|
%dir %attr(0750, redis, redis) %{_sharedstatedir}/%{name} |
|
|
|
|
%dir %attr(0750, redis, redis) %{_localstatedir}/log/%{name} |
|
|
|
|
%if 0%{?with_redistrib} |
|
|
|
|
%exclude %{_bindir}/%{name}-trib |
|
|
|
|
%endif |
|
|
|
|
%exclude %{macrosdir} |
|
|
|
|
%exclude %{_includedir} |
|
|
|
|
%exclude %{_docdir}/%{name}/* |
|
|
|
@ -319,7 +251,6 @@ fi
@@ -319,7 +251,6 @@ fi
|
|
|
|
|
%{_libexecdir}/%{name}-* |
|
|
|
|
%{_mandir}/man1/%{name}* |
|
|
|
|
%{_mandir}/man5/%{name}* |
|
|
|
|
%if 0%{?with_systemd} |
|
|
|
|
%{_unitdir}/%{name}.service |
|
|
|
|
%{_unitdir}/%{name}-sentinel.service |
|
|
|
|
%dir %{_sysconfdir}/systemd/system/%{name}.service.d |
|
|
|
@ -327,15 +258,11 @@ fi
@@ -327,15 +258,11 @@ fi
|
|
|
|
|
%dir %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d |
|
|
|
|
%config(noreplace) %{_sysconfdir}/systemd/system/%{name}-sentinel.service.d/limit.conf |
|
|
|
|
%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 |
|
|
|
|
%license COPYING |
|
|
|
|
%license COPYRIGHT-lua |
|
|
|
|
%license COPYING-hiredis |
|
|
|
|
%{_includedir}/%{name}module.h |
|
|
|
|
%{macrosdir}/* |
|
|
|
|
|
|
|
|
@ -343,14 +270,65 @@ fi
@@ -343,14 +270,65 @@ fi
|
|
|
|
|
%docdir %{_docdir}/%{name} |
|
|
|
|
%{_docdir}/%{name} |
|
|
|
|
|
|
|
|
|
%if 0%{?with_redistrib} |
|
|
|
|
%files trib |
|
|
|
|
%license COPYING |
|
|
|
|
%{_bindir}/%{name}-trib |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog |
|
|
|
|
* Thu Sep 26 2019 Nathan Scott <nathans@redhat.com> - 5.0.6-1 |
|
|
|
|
- Upstream 5.0.6 release and redis-doc updates. |
|
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.5-3 |
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild |
|
|
|
|
|
|
|
|
|
* Mon Jul 15 2019 Nathan Scott <nathans@redhat.com> - 5.0.5-2 |
|
|
|
|
- Use the (modified) bundled jemalloc for defrag (RHBZ #1725852) |
|
|
|
|
|
|
|
|
|
* Thu May 16 2019 Nathan Scott <nathans@redhat.com> - 5.0.5-1 |
|
|
|
|
- Upstream 5.0.5 release and redis-doc updates. |
|
|
|
|
|
|
|
|
|
* 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 |
|
|
|
|
- Upstream 5.0.4 release and redis-doc updates. |
|
|
|
|
- Fix sentinel.conf logfile line addition. |
|
|
|
|
|
|
|
|
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-2 |
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild |
|
|
|
|
|
|
|
|
|
* Thu Dec 13 2018 Nathan Scott <nathans@redhat.com> - 5.0.3-1 |
|
|
|
|
- Upstream 5.0.3 release and redis-doc updates. |
|
|
|
|
|
|
|
|
|
* Fri Nov 23 2018 Nathan Scott <nathans@redhat.com> - 5.0.2-1 |
|
|
|
|
- Upstream 5.0.2 release and redis-doc updates. |
|
|
|
|
|
|
|
|
|
* Thu Nov 08 2018 Nathan Scott <nathans@redhat.com> - 5.0.1-1 |
|
|
|
|
- Upstream 5.0.1 release. |
|
|
|
|
|
|
|
|
|
* Thu Oct 18 2018 Nathan Scott <nathans@redhat.com> - 5.0.0-1 |
|
|
|
|
- Update systemd service files for network-online requirement |
|
|
|
|
- Upstream 5.0.0 release. |
|
|
|
|
|
|
|
|
|
* Thu Aug 09 2018 Nathan Scott <nathans@redhat.com> - 4.0.11-1 |
|
|
|
|
- Drop the pandoc build dependency, install only markdown. |
|
|
|
|
- Upstream 4.0.11 release. |
|
|
|
|
|
|
|
|
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.10-3 |
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |
|
|
|
|
|
|
|
|
|
* Mon Jun 25 2018 Remi Collet <rcollet@redhat.com> - 4.0.10-2 |
|
|
|
|
- fix License (BSD and MIT) |
|
|
|
|
- add bundled libraries licences |
|
|
|
|
- add information about bundled lzf |
|
|
|
|
|
|
|
|
|
* Thu Jun 14 2018 Nathan Scott <nathans@redhat.com> - 4.0.10-1 |
|
|
|
|
- Upstream 4.0.10 release. |
|
|
|
|
|
|
|
|
|
* Tue Mar 27 2018 Nathan Scott <nathans@redhat.com> - 4.0.9-1 |
|
|
|
|
- Upstream 4.0.9 release. |
|
|
|
|
|
|
|
|
|
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.0.8-2 |
|
|
|
|
- Escape macros in %%changelog |
|
|
|
|
|
|
|
|
|
* Wed Feb 7 2018 Nathan Scott <nathans@redhat.com> - 4.0.8-1 |
|
|
|
|
- Upstream 4.0.8 release. |
|
|
|
|
|
|
|
|
@ -412,7 +390,7 @@ fi
@@ -412,7 +390,7 @@ fi
|
|
|
|
|
* Mon May 29 2017 Nathan Scott <nathans@redhat.com> - 3.2.9-1 |
|
|
|
|
- Upstream 3.2.9 |
|
|
|
|
- Add RuntimeDirectory=redis to systemd unit file (RHBZ #1454700) |
|
|
|
|
- Mark rundir as %ghost since it may disappear (tmpfs - #1454700) |
|
|
|
|
- Mark rundir as %%ghost since it may disappear (tmpfs - #1454700) |
|
|
|
|
- Fix a shutdown failure with Unix domain sockets (RHBZ #1444988) |
|
|
|
|
|
|
|
|
|
* Mon Feb 20 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 3.2.8-1 |
|
|
|
|