summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--redis-oldglibc.patch17
-rw-r--r--redis.spec20
2 files changed, 34 insertions, 3 deletions
diff --git a/redis-oldglibc.patch b/redis-oldglibc.patch
new file mode 100644
index 0000000..7052f6d
--- /dev/null
+++ b/redis-oldglibc.patch
@@ -0,0 +1,17 @@
+diff -up redis-2.6.0/src/config.h.el5 redis-2.6.0/src/config.h
+--- redis-2.6.0/src/config.h.el5 2012-10-24 17:51:51.000000000 +0200
++++ redis-2.6.0/src/config.h 2012-10-24 17:52:35.000000000 +0200
+@@ -52,13 +52,7 @@
+ #define aof_fsync fsync
+ #endif
+
+-/* Define rdb_fsync_range to sync_file_range() on Linux, otherwise we use
+- * the plain fsync() call. */
+-#ifdef __linux__
+-#define rdb_fsync_range(fd,off,size) sync_file_range(fd,off,size,SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE)
+-#else
+ #define rdb_fsync_range(fd,off,size) fsync(fd)
+-#endif
+
+ /* Byte ordering detection */
+ #include <sys/types.h> /* This will likely define BYTE_ORDER */
diff --git a/redis.spec b/redis.spec
index b976416..2ac6364 100644
--- a/redis.spec
+++ b/redis.spec
@@ -12,11 +12,11 @@
%global with_systemd 0
%endif
-%global prever rc8
+#global prever rc8
Name: redis
Version: 2.6.0
-Release: %{?prever:0.}2%{?prever:.%{prever}}%{?dist}
+Release: %{?prever:0.}1%{?prever:.%{prever}}%{?dist}
Summary: A persistent key-value database
Group: Applications/Databases
@@ -28,8 +28,10 @@ Source2: %{name}.init
Source3: %{name}.service
# Update configuration for Fedora
Patch0: %{name}-2.6.0-redis.conf.patch
+# For old glibc
+Patch1: %{name}-oldglibc.patch
-BuildRequires: systemd-units
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if !0%{?el5}
BuildRequires: tcl >= 8.5
%if 0%{?with_perftools}
@@ -40,6 +42,7 @@ BuildRequires: google-perftools-devel
Requires: logrotate
Requires(pre): shadow-utils
%if %{with_systemd}
+BuildRequires: systemd-units
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
@@ -62,6 +65,10 @@ different kind of sorting abilities.
%prep
%setup -q -n %{name}-%{version}%{?prever:-%{prever}}
%patch0 -p1 -b .orig
+%if 0%{?rhel} == 5
+%patch1 -p1 -b .oldglibc
+%endif
+
%build
make %{?_smp_mflags} \
@@ -92,6 +99,8 @@ install -d -m 755 %{buildroot}%{_localstatedir}/run/%{name}
%if %{with_systemd}
install -p -D -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
%else
+sed -e '/^daemonize/s/no/yes/' \
+ -i %{buildroot}%{_sysconfdir}/%{name}.conf
install -p -D -m 755 %{SOURCE2} %{buildroot}%{_initrddir}/%{name}
%endif
@@ -172,7 +181,12 @@ fi
%{_initrddir}/%{name}
%endif
+
%changelog
+* Wed Oct 24 2012 Remi Collet <remi@fedoraproject.org> - 2.6.0-1
+- Redis 2.6.0 is the latest stable version
+- add patch for old glibc on RHEL-5
+
* Sat Oct 20 2012 Remi Collet <remi@fedoraproject.org> - 2.6.0-0.2.rc8
- Update to redis 2.6.0-rc8
- improve systemd integration