Compare commits

..

11 Commits
master ... el6

Author SHA1 Message Date
Nathan Scott af41e47aa9 Merge branch 'master' into el6 2017-09-27 09:10:33 +10:00
Nathan Scott 6d845630d5 Add backwards compatibility patch for 2.x config files
Resolves Red Hat BZ #1491728.
2017-09-27 08:46:16 +10:00
Nathan Scott d36789d62d Merge branch 'master' into el6 2017-09-26 17:46:05 +10:00
Nathan Scott 5eca1125f3 Merge branch 'master' into el6 2017-08-18 10:40:56 +10:00
Silas Sewell f7cdb67e42 Update to redis 2.4.13 2012-05-19 08:11:20 -04:00
Silas Sewell 4f19b945ff Update to version 2.4.10 2012-04-01 10:51:10 -04:00
Silas Sewell 64242f4507 Disable ppc64 for now 2012-02-24 23:03:51 -05:00
Silas Sewell 61d13182bf Update to redis 2.4.8 2012-02-24 22:13:18 -05:00
Silas Sewell ad07d15a1e Remove google-perftools-devel 2011-04-23 18:46:34 -04:00
Silas Sewell f67d326480 Update to redis 2.2.5 2011-04-23 18:38:08 -04:00
Silas Sewell 7dce15eb8d Initial commit 2010-10-19 11:55:18 -04:00
8 changed files with 127 additions and 185 deletions

10
.gitignore vendored
View File

@ -35,13 +35,3 @@ clog
/redis-3.2.9.tar.gz
/redis-3.2.10.tar.gz
/redis-3.2.11.tar.gz
/redis-4.0.2.tar.gz
/redis-doc-69a5512.tar.gz
/redis-4.0.4.tar.gz
/redis-doc-dc402c6.tar.gz
/redis-4.0.5.tar.gz
/redis-4.0.6.tar.gz
/redis-4.0.7.tar.gz
/redis-doc-38c2bd6.tar.gz
/redis-4.0.8.tar.gz
/redis-4.0.9.tar.gz

View File

@ -1,26 +1,25 @@
From 992c773e70462a6fbe1536e18e673c9ab55d5901 Mon Sep 17 00:00:00 2001
From: Remi Collet <fedora@famillecollet.com>
Date: Fri, 9 Sep 2016 17:23:27 +0200
Subject: [PATCH 2/2] install redis-check-rdb as a symlink instead of duplicating
the binary
Subject: [PATCH 2/2] install redis-check-rdb as a symlink instead of
duplicating the binary
---
src/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
src/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile b/src/Makefile
index fdbe36a..c3083f8 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -287,6 +287,6 @@ install: all
@@ -267,6 +267,6 @@ install: all
$(REDIS_INSTALL) $(REDIS_SERVER_NAME) $(INSTALL_BIN)
$(REDIS_INSTALL) $(REDIS_BENCHMARK_NAME) $(INSTALL_BIN)
$(REDIS_INSTALL) $(REDIS_CLI_NAME) $(INSTALL_BIN)
- $(REDIS_INSTALL) $(REDIS_CHECK_RDB_NAME) $(INSTALL_BIN)
- $(REDIS_INSTALL) $(REDIS_CHECK_AOF_NAME) $(INSTALL_BIN)
$(REDIS_INSTALL) $(REDIS_CHECK_AOF_NAME) $(INSTALL_BIN)
@ln -sf $(REDIS_SERVER_NAME) $(INSTALL_BIN)/$(REDIS_SENTINEL_NAME)
+ @ln -sf $(REDIS_SERVER_NAME) $(INSTALL_BIN)/$(REDIS_CHECK_RDB_NAME)
+ @ln -sf $(REDIS_SERVER_NAME) $(INSTALL_BIN)/$(REDIS_CHECK_AOF_NAME)
--
2.13.5

View File

@ -0,0 +1,48 @@
From 2ef9dcc1ae28ace8966621a69c7a9342bde3c183 Mon Sep 17 00:00:00 2001
From: Nathan Scott <nathans@redhat.com>
Date: Tue, 26 Sep 2017 14:42:56 +1000
Subject: [PATCH 3/3] backward compatibility for 2.x series config file options
---
src/config.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/config.c b/src/config.c
index c1919f2..3bd4374 100644
--- a/src/config.c
+++ b/src/config.c
@@ -451,6 +451,10 @@ void loadServerConfigFromString(char *config) {
server.hash_max_ziplist_entries = memtoll(argv[1], NULL);
} else if (!strcasecmp(argv[0],"hash-max-ziplist-value") && argc == 2) {
server.hash_max_ziplist_value = memtoll(argv[1], NULL);
+ } else if (!strcasecmp(argv[0],"hash-max-zipmap-entries") && argc == 2) {
+ /* DEAD OPTION */
+ } else if (!strcasecmp(argv[0],"hash-max-zipmap-value") && argc == 2) {
+ /* DEAD OPTION */
} else if (!strcasecmp(argv[0],"list-max-ziplist-entries") && argc == 2){
/* DEAD OPTION */
} else if (!strcasecmp(argv[0],"list-max-ziplist-value") && argc == 2) {
@@ -619,6 +623,20 @@ void loadServerConfigFromString(char *config) {
err = sentinelHandleConfiguration(argv+1,argc-1);
if (err) goto loaderr;
}
+ } else if (!strcasecmp(argv[0],"vm-enabled") && argc == 2) {
+ /* DEAD OPTION */
+ } else if (!strcasecmp(argv[0],"really-use-vm") && argc == 2) {
+ /* DEAD OPTION */
+ } else if (!strcasecmp(argv[0],"vm-swap-file") && argc == 2) {
+ /* DEAD OPTION */
+ } else if (!strcasecmp(argv[0],"vm-max-memory") && argc == 2) {
+ /* DEAD OPTION */
+ } else if (!strcasecmp(argv[0],"vm-page-size") && argc == 2) {
+ /* DEAD OPTION */
+ } else if (!strcasecmp(argv[0],"vm-pages") && argc == 2) {
+ /* DEAD OPTION */
+ } else if (!strcasecmp(argv[0],"vm-max-threads") && argc == 2) {
+ /* DEAD OPTION */
} else {
err = "Bad directive or wrong number of arguments"; goto loaderr;
}
--
2.13.5

View File

@ -1,2 +0,0 @@
%redis_modules_abi 1
%redis_modules_dir %{_libdir}/redis/modules

View File

@ -0,0 +1,50 @@
diff -up redis-2.4.8/redis.conf.orig redis-2.4.8/redis.conf
--- redis-2.4.8/redis.conf.orig 2012-02-24 21:59:55.606998781 -0500
+++ redis-2.4.8/redis.conf 2012-02-24 22:02:32.598539907 -0500
@@ -14,11 +14,11 @@
# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
-daemonize no
+daemonize yes
# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
# default. You can specify a custom pid file location here.
-pidfile /var/run/redis.pid
+pidfile /var/run/redis/redis.pid
# Accept connections on the specified port, default is 6379.
# If port 0 is specified Redis will not listen on a TCP socket.
@@ -27,7 +27,7 @@ port 6379
# If you want you can bind a single interface, if the bind option is not
# specified all the interfaces will listen for incoming connections.
#
-# bind 127.0.0.1
+bind 127.0.0.1
# Specify the path for the unix socket that will be used to listen for
# incoming connections. There is no default, so Redis will not listen
@@ -45,12 +45,12 @@ timeout 0
# verbose (many rarely useful info, but not a mess like the debug level)
# notice (moderately verbose, what you want in production probably)
# warning (only very important / critical messages are logged)
-loglevel verbose
+loglevel notice
# Specify the log file name. Also 'stdout' can be used to force
# Redis to log on the standard output. Note that if you use standard
# output for logging but daemonize, logs will be sent to /dev/null
-logfile stdout
+logfile /var/log/redis/redis.log
# To enable logging to the system logger, just set 'syslog-enabled' to yes,
# and optionally update the other syslog parameters to suit your needs.
@@ -104,7 +104,7 @@ dbfilename dump.rdb
# Also the Append Only File will be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
-dir ./
+dir /var/lib/redis/
################################# REPLICATION #################################

View File

@ -80,6 +80,13 @@ case "$1" in
restart)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;

View File

@ -1,11 +1,4 @@
#
# Fedora spec file for redis
#
# License: MIT
# http://opensource.org/licenses/MIT
#
# Please preserve changelog entries
#
%global _hardened_build 1
%global with_perftools 0
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
@ -14,12 +7,6 @@
%global with_redistrib 0
%endif
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 6
%global with_pandoc 1
%else
%global with_pandoc 0
%endif
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
%global with_systemd 1
%else
@ -27,18 +14,10 @@
%endif
# 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 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)
%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
Name: redis
Version: 4.0.9
Version: 3.2.11
Release: 1%{?dist}
Summary: A persistent key-value database
License: BSD
@ -52,9 +31,6 @@ Source5: %{name}.init
Source6: %{name}-shutdown
Source7: %{name}-limit-systemd
Source8: %{name}-limit-init
Source9: macros.%{name}
Source10: https://github.com/antirez/%{name}-doc/archive/%{doc_commit}/%{name}-doc-%{short_doc_commit}.tar.gz
# To refresh patches:
# tar xf redis-xxx.tar.gz && cd redis-xxx && git init && git add . && git commit -m "%%{version} baseline"
# git am %%{patches}
@ -65,6 +41,8 @@ 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
# Backwards compatibility for deprecated configuration file options
Patch0003: 0003-backward-compatibility-for-2.x-series-config-file-op.patch
%if 0%{?with_perftools}
BuildRequires: gperftools-devel
%else
@ -72,14 +50,13 @@ BuildRequires: jemalloc-devel
%endif
%if 0%{?with_tests}
BuildRequires: procps-ng
BuildRequires: tcl
%endif
%if 0%{?with_pandoc}
BuildRequires: pandoc
%endif
%if 0%{?with_systemd}
BuildRequires: systemd
%endif
%if 0%{?with_tests}
BuildRequires: tcl
%endif
# Required for redis-shutdown
Requires: /bin/awk
Requires: logrotate
@ -98,10 +75,6 @@ Provides: bundled(hiredis)
Provides: bundled(lua-libs)
Provides: bundled(linenoise)
%global redis_modules_abi 1
%global redis_modules_dir %{_libdir}/%{name}/modules
Provides: redis(modules_abi)%{?_isa} = %{redis_modules_abi}
%description
Redis is an advanced key-value store. It is often referred to as a data
structure server since keys can contain strings, hashes, lists, sets and
@ -127,27 +100,6 @@ a cache.
You can use Redis from most programming languages also.
%package devel
Summary: Development header for Redis module development
# Header-Only Library (https://fedoraproject.org/wiki/Packaging:Guidelines)
Provides: %{name}-static = %{version}-%{release}
%description devel
Header file required for building loadable Redis modules. Detailed
API documentation is available in the redis-doc package.
%package doc
Summary: Documentation for Redis including man pages
License: CC-BY-SA
BuildArch: noarch
# http://fedoraproject.org/wiki/Packaging:Conflicts "Splitting Packages"
Conflicts: redis < 4.0
%description doc
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
@ -161,38 +113,21 @@ 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
%patch0003 -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
# Configuration file changes and additions
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|^dir .*$|dir /var/lib/redis|g' redis.conf
# Module API version safety check
api=`sed -n -e 's/#define REDISMODULE_APIVER_[0-9][0-9]* //p' src/redismodule.h`
if test "$api" != "%{redis_modules_abi}"; then
: Error: Upstream API version is now ${api}, expecting %%{redis_modules_abi}.
: Update the redis_modules_abi macro, the rpmmacros file, and rebuild.
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
@ -210,7 +145,6 @@ make %{make_flags} install
install -d %{buildroot}%{_sharedstatedir}/%{name}
install -d %{buildroot}%{_localstatedir}/log/%{name}
install -d %{buildroot}%{_localstatedir}/run/%{name}
install -d %{buildroot}%{redis_modules_dir}
# Install logrotate file.
install -pDm644 %{S:1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
@ -240,9 +174,6 @@ chmod 755 %{buildroot}%{_bindir}/%{name}-*
# Install redis-shutdown
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
@ -256,32 +187,11 @@ done
ln -s redis-server.1 %{buildroot}%{_mandir}/man1/redis-sentinel.1
ln -s redis.conf.5 %{buildroot}%{_mandir}/man5/redis-sentinel.conf.5
# Install documentation and html pages
doc=$(echo %{buildroot}/%{_docdir}/%{name})
for page in 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO; do
install -Dpm644 $page $doc/$page
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
mkdir -p %{buildroot}%{macrosdir}
install -pDm644 %{S:9} %{buildroot}%{macrosdir}/macros.%{name}
%check
%if 0%{?with_tests}
# ERR Active defragmentation cannot be enabled: it requires a Redis server compiled
# with a modified Jemalloc like the one shipped by default with the Redis source distribution
sed -e '/memefficiency/d' -i tests/test_helper.tcl
# https://github.com/antirez/redis/issues/1417 (for "taskset -c 1")
taskset -c 1 make %{make_flags} test
make %{make_flags} test-sentinel
taskset -c 1 make test ||:
make test-sentinel ||:
%endif
%pre
@ -328,19 +238,16 @@ fi
%files
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}.conf
%attr(0640, redis, root) %config(noreplace) %{_sysconfdir}/%{name}-sentinel.conf
%dir %attr(0750, redis, redis) %{_libdir}/%{name}
%dir %attr(0750, redis, redis) %{redis_modules_dir}
%dir %attr(0750, redis, redis) %{_sharedstatedir}/%{name}
%dir %attr(0750, redis, redis) %{_localstatedir}/log/%{name}
%dir %attr(0750, redis, redis) %ghost %{_localstatedir}/run/%{name}
%if 0%{?with_redistrib}
%exclude %{_bindir}/%{name}-trib
%endif
%exclude %{macrosdir}
%exclude %{_includedir}
%exclude %{_docdir}/%{name}/*
%{_bindir}/%{name}-*
%{_libexecdir}/%{name}-*
%{_mandir}/man1/%{name}*
@ -352,23 +259,12 @@ fi
%config(noreplace) %{_sysconfdir}/systemd/system/%{name}.service.d/limit.conf
%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
%{_includedir}/%{name}module.h
%{macrosdir}/*
%files doc
%docdir %{_docdir}/%{name}
%{_docdir}/%{name}
%if 0%{?with_redistrib}
%files trib
%license COPYING
@ -377,54 +273,9 @@ fi
%changelog
* 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.
* Wed Jan 31 2018 Nathan Scott <nathans@redhat.com> - 4.0.7-1
- Upstream 4.0.7 release.
* Thu Dec 7 2017 Nathan Scott <nathans@redhat.com> - 4.0.6-1
- Upstream 4.0.6 release.
* Fri Dec 1 2017 Remi Collet <remi@remirepo.net> - 4.0.5-1
- Redis 4.0.5 - Released Thu Dec 1 16:03:32 CET 2017
- Upgrade urgency CRITICAL: Redis 4.0.4 fix for PSYNC2 was broken,
causing the slave to crash when receiving an RDB file from the
master that contained a duplicated Lua script.
* Fri Dec 01 2017 Nathan Scott <nathans@redhat.com> - 4.0.4-1
- Upstream 4.0.4 release.
- Update to current upstream redis-doc also.
- Fix man page issues (RHBZ #1513594 and RHBZ #1515417).
* Thu Nov 30 2017 Remi Collet <remi@remirepo.net> - 4.0.3-1
- Redis 4.0.3
- fix ownership of /usr/share/doc/redis
- use make_flags for test to avoid rebuild and failure
- fix rpm macro location on EL-6
- add /var/run/redis on EL-6
- add spec file license header
- drop duplicated documentation from main package
- keep man in main page
* Fri Nov 17 2017 Nathan Scott <nathans@redhat.com> - 4.0.2-2
- Install the base modules directories, owned by the main package.
* Tue Oct 31 2017 Nathan Scott <nathans@redhat.com> - 4.0.2-1
- Upstream 4.0.2 release. (RHBZ #1389592)
- Add redis-devel for loadable module development.
- Add redis-doc for man pages and detailed documentation.
- Provide redis-check-aof as a symlink to redis-server also now.
* Tue Sep 26 2017 Nathan Scott <nathans@redhat.com> - 3.2.11-1
- Upstream 3.2.11 bug-fix-only release
- Switch to using Type=notify for Redis systemd services (RHBZ #1172841)
- Back-compatibility for deprecated configuration options (RHBZ #1491728)
- Add Provides:bundled hiredis, linenoise, lua-libs clauses (RHBZ #788500)
* Mon Aug 14 2017 Nathan Scott <nathans@redhat.com> - 3.2.10-2
@ -444,7 +295,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

View File

@ -1,2 +1 @@
SHA512 (redis-4.0.9.tar.gz) = a6cf63cb361f0a87da3955ba628190dc04cad342f7a664d18e44416ee67dd86ed6e3a46b9701e994f1417e56b819b3c6fc595f363c10bb4b83d5033919d29598
SHA512 (redis-doc-38c2bd6.tar.gz) = b878e43e942c24b0bb195d36f50e0f7f3efc1aab339c8a7f9bd9c04318a13bfad41334a9f08e4e865c5708221b421a3e7a0f343a9fe728f3f9b4eb1404ef8517
SHA512 (redis-3.2.11.tar.gz) = 3eab216350828ef78e7e9e28ac2fff3ea89d9eb7f86a66c4788667cde7c966bce7dda03470c2baacf2dce63496685e11ca2ef0a82b5fbbd20fb8e449146a20ee