Update spec to use bundled jemalloc for active defrag
This commit is contained in:
parent
3f346c42e9
commit
244dcfee36
20
redis.spec
20
redis.spec
@ -20,13 +20,13 @@
|
|||||||
|
|
||||||
Name: redis
|
Name: redis
|
||||||
Version: 5.0.5
|
Version: 5.0.5
|
||||||
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
|
||||||
License: BSD and MIT
|
License: BSD and MIT
|
||||||
URL: http://redis.io
|
URL: https://redis.io
|
||||||
Source0: http://download.redis.io/releases/%{name}-%{version}.tar.gz
|
Source0: https://download.redis.io/releases/%{name}-%{version}.tar.gz
|
||||||
Source1: %{name}.logrotate
|
Source1: %{name}.logrotate
|
||||||
Source2: %{name}-sentinel.service
|
Source2: %{name}-sentinel.service
|
||||||
Source3: %{name}.service
|
Source3: %{name}.service
|
||||||
@ -49,7 +49,6 @@ Patch0001: 0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.pat
|
|||||||
# https://github.com/antirez/redis/pull/3494 - symlink
|
# https://github.com/antirez/redis/pull/3494 - symlink
|
||||||
Patch0002: 0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch
|
Patch0002: 0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: jemalloc-devel
|
|
||||||
%if 0%{?with_tests}
|
%if 0%{?with_tests}
|
||||||
BuildRequires: procps-ng
|
BuildRequires: procps-ng
|
||||||
BuildRequires: tcl
|
BuildRequires: tcl
|
||||||
@ -65,6 +64,7 @@ Requires(post): systemd
|
|||||||
Requires(preun): systemd
|
Requires(preun): systemd
|
||||||
Requires(postun): systemd
|
Requires(postun): systemd
|
||||||
Provides: bundled(hiredis)
|
Provides: bundled(hiredis)
|
||||||
|
Provides: bundled(jemalloc)
|
||||||
Provides: bundled(lua-libs)
|
Provides: bundled(lua-libs)
|
||||||
Provides: bundled(linenoise)
|
Provides: bundled(linenoise)
|
||||||
Provides: bundled(lzf)
|
Provides: bundled(lzf)
|
||||||
@ -123,18 +123,12 @@ administration and development.
|
|||||||
%setup -q -b 10
|
%setup -q -b 10
|
||||||
%setup -q
|
%setup -q
|
||||||
mv ../%{name}-doc-%{doc_commit} doc
|
mv ../%{name}-doc-%{doc_commit} doc
|
||||||
rm -frv deps/jemalloc
|
|
||||||
%patch0001 -p1
|
%patch0001 -p1
|
||||||
%patch0002 -p1
|
%patch0002 -p1
|
||||||
|
|
||||||
mv deps/lua/COPYRIGHT COPYRIGHT-lua
|
mv deps/lua/COPYRIGHT COPYRIGHT-lua
|
||||||
mv deps/hiredis/COPYING COPYING-hiredis
|
mv deps/hiredis/COPYING COPYING-hiredis
|
||||||
|
|
||||||
# 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
|
# Configuration file changes
|
||||||
sed -i -e 's|^logfile .*$|logfile /var/log/redis/redis.log|g' redis.conf
|
sed -i -e 's|^logfile .*$|logfile /var/log/redis/redis.log|g' redis.conf
|
||||||
sed -i -e 's|^logfile .*$|logfile /var/log/redis/sentinel.log|g' sentinel.conf
|
sed -i -e 's|^logfile .*$|logfile /var/log/redis/sentinel.log|g' sentinel.conf
|
||||||
@ -148,8 +142,7 @@ if test "$api" != "%{redis_modules_abi}"; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%global malloc_flags MALLOC=jemalloc
|
%global make_flags DEBUG="" V="echo" LDFLAGS="%{?__global_ldflags}" CFLAGS+="%{optflags} -fPIC" INSTALL="install -p" PREFIX=%{buildroot}%{_prefix}
|
||||||
%global make_flags DEBUG="" V="echo" LDFLAGS="%{?__global_ldflags}" CFLAGS+="%{optflags} -fPIC" %{malloc_flags} INSTALL="install -p" PREFIX=%{buildroot}%{_prefix}
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} %{make_flags} all
|
make %{?_smp_mflags} %{make_flags} all
|
||||||
@ -279,6 +272,9 @@ exit 0
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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
|
* Thu May 16 2019 Nathan Scott <nathans@redhat.com> - 5.0.5-1
|
||||||
- Upstream 5.0.5 release and redis-doc updates.
|
- Upstream 5.0.5 release and redis-doc updates.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user