Compare commits

...

19 Commits
el6 ... master

Author SHA1 Message Date
Nathan Scott eb2f5b7b3a Update to latest community sources 2018-03-28 07:15:59 +11:00
Igor Gnatenko 24658f1b66
Escape macros in %changelog
Reference: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y2ZUKK2B7T2IKXPMODNF6HB2O5T5TS6H/
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-09 09:05:56 +01:00
Nathan Scott 6cae3b1023 Update to latest community sources 2018-02-07 17:00:58 +11:00
Nathan Scott a5ee299285 Update to latest community sources 2018-01-31 17:29:02 +11:00
Nathan Scott 6c3bdb0b63 Update to upstream redis-4.0.6 release 2017-12-07 20:27:54 +11:00
Nathan Scott d75d3d4930 Update to latest community sources 2017-12-03 09:46:01 +11:00
Nathan Scott 6314fdc7a6 v4.0.4 and latest redis-doc 2017-12-01 10:44:30 +11:00
Remi Collet abd5379420 v4.0.3 2017-11-30 15:22:36 +01:00
Remi Collet 72f15713c3 drop duplicated documentation from main package
keep man in main page
2017-11-30 15:21:36 +01:00
Remi Collet d23b1d4535 avoid duplicate file in redis and redis-doc 2017-11-21 12:59:30 +01:00
Remi Collet fefcedab2c fix ownership of /usr/share/doc/redis (when redis-doc installed without redis) 2017-11-21 12:44:52 +01:00
Remi Collet c5eb5af918 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
2017-11-21 12:09:54 +01:00
Nathan Scott d924812920 Add ownership of modules directory into the redis package. 2017-11-17 17:02:19 +11:00
Nathan Scott 91318c4827 Merge branch 'private-nathans-redis4' 2017-11-06 18:09:22 +11:00
Nathan Scott 0500a44e92 Addition of a redis-doc subpackage for Redis v4 onward
This adds a redis-doc subpackage, containing the upstream
docs (https://github.com/antirez/redis-doc/), as well as
the existing man page content we've added.  Care is taken
to handle the movement of man page files between packages
and the naming convention of the redis-doc source is also
careful to follow the prefered Fedora conventions.

Optional conversion of markdown to html is done by pandoc
if available.

In the future, it would be to modify the redis build to
generate the redis src/help.h file using the content from
redis-doc now that we have it.  It's often out of date, I
am noticing - seems to be updated in an ad-hoc fashion in
upstream releases.
2017-11-01 13:57:39 +11:00
Nathan Scott da65cc3c98 Redis v4 modules packaging preparation
Add spec file macros to create a default location for
Redis modules, and to allow module packages to depend
on a specific redis module ABI.  A build time test is
added to ensure the upstream sources API version does
not differ to one the redis package Provides:.

The devel package now provides an rpm macros file for
the %{redis_modules_abi} and %{redis_modules_dir}.

Much of this is ideas from Haikel and Remi - thanks!

Small cleanup - the _hardened_build macro is dropped
as this has been the default since f22.
2017-10-02 11:05:08 +11:00
Nathan Scott 25bfce9ab8 Undo noarch setting for devel package after all
Its explicitly forbidden in ...
https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Header_Only_Libraries
2017-09-27 16:02:32 +10:00
Nathan Scott ac2422ae25 Update to redis 4.0.2 upstream release.
Make redis-devel a noarch package as Remi suggests,
first of many changes to come before 4.x builds are
ready to go.
2017-09-27 12:17:46 +10:00
Nathan Scott 74836e8db5 Redis package builds for the 4.0 series
Upstream redis-4.0.1 release packages, including
a devel header-only package for module support.
2017-09-12 17:28:06 +10:00
5 changed files with 184 additions and 18 deletions

10
.gitignore vendored
View File

@ -35,3 +35,13 @@ 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,25 +1,26 @@
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
src/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Makefile b/src/Makefile
index fdbe36a..c3083f8 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -267,6 +267,6 @@ install: all
@@ -287,6 +287,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

2
macros.redis Normal file
View File

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

View File

@ -1,4 +1,11 @@
%global _hardened_build 1
#
# Fedora spec file for redis
#
# License: MIT
# http://opensource.org/licenses/MIT
#
# Please preserve changelog entries
#
%global with_perftools 0
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
@ -7,6 +14,12 @@
%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
@ -14,10 +27,18 @@
%endif
# 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}
# 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)
Name: redis
Version: 3.2.11
Version: 4.0.9
Release: 1%{?dist}
Summary: A persistent key-value database
License: BSD
@ -31,6 +52,9 @@ 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}
@ -48,13 +72,14 @@ 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
@ -73,6 +98,10 @@ 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
@ -98,6 +127,27 @@ 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
@ -111,7 +161,9 @@ 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
@ -120,11 +172,27 @@ rm -frv deps/jemalloc
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
@ -142,6 +210,7 @@ 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}
@ -171,6 +240,9 @@ 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
@ -184,11 +256,32 @@ 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 test ||:
make test-sentinel ||:
taskset -c 1 make %{make_flags} test
make %{make_flags} test-sentinel
%endif
%pre
@ -235,16 +328,19 @@ 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}*
@ -256,12 +352,23 @@ 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
@ -270,6 +377,51 @@ 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)
@ -292,7 +444,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 +1,2 @@
SHA512 (redis-3.2.11.tar.gz) = 3eab216350828ef78e7e9e28ac2fff3ea89d9eb7f86a66c4788667cde7c966bce7dda03470c2baacf2dce63496685e11ca2ef0a82b5fbbd20fb8e449146a20ee
SHA512 (redis-4.0.9.tar.gz) = a6cf63cb361f0a87da3955ba628190dc04cad342f7a664d18e44416ee67dd86ed6e3a46b9701e994f1417e56b819b3c6fc595f363c10bb4b83d5033919d29598
SHA512 (redis-doc-38c2bd6.tar.gz) = b878e43e942c24b0bb195d36f50e0f7f3efc1aab339c8a7f9bd9c04318a13bfad41334a9f08e4e865c5708221b421a3e7a0f343a9fe728f3f9b4eb1404ef8517