1 |
commit: 772fa4eaf2816bdeef6c2affe66814075b11bbe4 |
2 |
Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Aug 23 00:09:41 2018 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 23 00:22:22 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=772fa4ea |
7 |
|
8 |
dev-db/redis: bump to 5.0-rc4 |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/9472 |
11 |
Package-Manager: Portage-2.3.44, Repoman-2.3.10 |
12 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
13 |
|
14 |
dev-db/redis/Manifest | 1 + |
15 |
dev-db/redis/files/redis-5.0-shared.patch | 32 +++++ |
16 |
dev-db/redis/files/redis-5.0-sharedlua.patch | 61 +++++++++ |
17 |
dev-db/redis/files/redis-sentinel-5.0-config.patch | 10 ++ |
18 |
dev-db/redis/redis-5.0_rc4.ebuild | 144 +++++++++++++++++++++ |
19 |
5 files changed, 248 insertions(+) |
20 |
|
21 |
diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest |
22 |
index eae411b86c7..15ebee3a76e 100644 |
23 |
--- a/dev-db/redis/Manifest |
24 |
+++ b/dev-db/redis/Manifest |
25 |
@@ -7,3 +7,4 @@ DIST redis-4.0.6.tar.gz 1723533 BLAKE2B 94c2a9b7eeaa676efaac75cd5c143b0f4b02440b |
26 |
DIST redis-4.0.7.tar.gz 1729488 BLAKE2B 7a5337b868e4da4a7387b31bc9d6bd4c86abd701b9ba999f64296ed5188cbba7208ced466973a500730ca03e70a9a85fbab2fb4700fdc977e58defc0126487d1 SHA512 6f317d9e76224b2a2b047dc8f56b126ea85ee5c6112c4c6238cb5cdfa3a83756bff3a82b106b00d1124a93d210a900d836587b8d9563916f19274de0e84c4c6b |
27 |
DIST redis-4.0.8.tar.gz 1729973 BLAKE2B 32d82a07beba9ea8f0b08a8fc69da548a1974e5839f052a9803ffb0f52ef920df9b128092e061b5e693581a50efef4a1212c1f6310dc8492eff5ca841ff3b03a SHA512 11c126ddef3bedbceb02ee7a80a61374e081da8087055d77970b0097066a6f1c5e0c4f0d246c9851f8c3beca22f185c184669a9dc4f1c7c229f8cd2c34196ab6 |
28 |
DIST redis-4.0.9.tar.gz 1737022 BLAKE2B 35a83d146062f5b14c023d7fd9f28d743ba6bec3e0e4bf9ce8e065a706bbd7508ffbcb8b1b4d18f6b6774589b5456540ba8717b9f449fcbd758c0f57dbd505a3 SHA512 a6cf63cb361f0a87da3955ba628190dc04cad342f7a664d18e44416ee67dd86ed6e3a46b9701e994f1417e56b819b3c6fc595f363c10bb4b83d5033919d29598 |
29 |
+DIST redis-5.0_rc4.tar.gz 1937238 BLAKE2B b8f768b83e27476bc038fc554193680f4873eb2405f238e0a6f2053cf68c4a9e6c45546730a263463b805d6811334c1ba056be0230676f19d0562d488a3d4c97 SHA512 75b308bca026fe3b7cff1a92df3990bab5bb7ffe24cdfbc263f4d522ebe7ec8d86a9ed66da1778fe67c08a39b6f0c83cb10c5a332818c6ad04621d01c4aa6add |
30 |
|
31 |
diff --git a/dev-db/redis/files/redis-5.0-shared.patch b/dev-db/redis/files/redis-5.0-shared.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..32245079ab4 |
34 |
--- /dev/null |
35 |
+++ b/dev-db/redis/files/redis-5.0-shared.patch |
36 |
@@ -0,0 +1,32 @@ |
37 |
+diff --git a/src/Makefile b/src/Makefile |
38 |
+index f5525bd..6f12a20 100644 |
39 |
+--- a/src/Makefile |
40 |
++++ b/src/Makefile |
41 |
+@@ -29,14 +29,7 @@ INSTALL_BIN=$(PREFIX)/bin |
42 |
+ INSTALL=install |
43 |
+ |
44 |
+ # Default allocator defaults to Jemalloc if it's not an ARM |
45 |
+-MALLOC=libc |
46 |
+-ifneq ($(uname_M),armv6l) |
47 |
+-ifneq ($(uname_M),armv7l) |
48 |
+-ifeq ($(uname_S),Linux) |
49 |
+- MALLOC=jemalloc |
50 |
+-endif |
51 |
+-endif |
52 |
+-endif |
53 |
++MALLOC?=jemalloc |
54 |
+ |
55 |
+ # To get ARM stack traces if Redis crashes we need a special C flag. |
56 |
+ ifneq (,$(filter aarch64 armv,$(uname_M))) |
57 |
+@@ -120,9 +113,8 @@ ifeq ($(MALLOC),tcmalloc_minimal) |
58 |
+ endif |
59 |
+ |
60 |
+ ifeq ($(MALLOC),jemalloc) |
61 |
+- DEPENDENCY_TARGETS+= jemalloc |
62 |
+- FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include |
63 |
+- FINAL_LIBS := ../deps/jemalloc/lib/libjemalloc.a $(FINAL_LIBS) |
64 |
++ FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE |
65 |
++ FINAL_LIBS+= -ljemalloc -ldl |
66 |
+ endif |
67 |
+ |
68 |
+ REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) |
69 |
|
70 |
diff --git a/dev-db/redis/files/redis-5.0-sharedlua.patch b/dev-db/redis/files/redis-5.0-sharedlua.patch |
71 |
new file mode 100644 |
72 |
index 00000000000..3b97f913c60 |
73 |
--- /dev/null |
74 |
+++ b/dev-db/redis/files/redis-5.0-sharedlua.patch |
75 |
@@ -0,0 +1,61 @@ |
76 |
+diff --git a/deps/lua/src/lua_cjson.c b/deps/lua/src/lua_cjson.c |
77 |
+index c26c0d7..fa50c41 100644 |
78 |
+--- a/deps/lua/src/lua_cjson.c |
79 |
++++ b/deps/lua/src/lua_cjson.c |
80 |
+@@ -46,7 +46,7 @@ |
81 |
+ #include "strbuf.h" |
82 |
+ #include "fpconv.h" |
83 |
+ |
84 |
+-#include "../../../src/solarisfixes.h" |
85 |
++#include "solarisfixes.h" |
86 |
+ |
87 |
+ #ifndef CJSON_MODNAME |
88 |
+ #define CJSON_MODNAME "cjson" |
89 |
+diff --git a/src/Makefile b/src/Makefile |
90 |
+index 6f12a20..205cd59 100644 |
91 |
+--- a/src/Makefile |
92 |
++++ b/src/Makefile |
93 |
+@@ -16,7 +16,7 @@ release_hdr := $(shell sh -c './mkreleasehdr.sh') |
94 |
+ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') |
95 |
+ uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') |
96 |
+ OPTIMIZATION?=-O2 |
97 |
+-DEPENDENCY_TARGETS=hiredis linenoise lua |
98 |
++DEPENDENCY_TARGETS=hiredis linenoise |
99 |
+ NODEPS:=clean distclean |
100 |
+ |
101 |
+ # Default settings |
102 |
+@@ -58,7 +58,7 @@ endif |
103 |
+ |
104 |
+ FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) |
105 |
+ FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) |
106 |
+-FINAL_LIBS=-lm |
107 |
++FINAL_LIBS=@LUA_LIBS@ |
108 |
+ DEBUG=-g -ggdb |
109 |
+ |
110 |
+ ifeq ($(uname_S),SunOS) |
111 |
+@@ -100,7 +100,7 @@ endif |
112 |
+ endif |
113 |
+ endif |
114 |
+ # Include paths to dependencies |
115 |
+-FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src |
116 |
++FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise @LUA_CFLAGS@ |
117 |
+ |
118 |
+ ifeq ($(MALLOC),tcmalloc) |
119 |
+ FINAL_CFLAGS+= -DUSE_TCMALLOC |
120 |
+@@ -137,6 +137,7 @@ endif |
121 |
+ REDIS_SERVER_NAME=redis-server |
122 |
+ REDIS_SENTINEL_NAME=redis-sentinel |
123 |
+ REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o localtime.o |
124 |
++REDIS_SERVER_OBJ+=fpconv.o strbuf.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o |
125 |
+ REDIS_CLI_NAME=redis-cli |
126 |
+ REDIS_CLI_OBJ=anet.o adlist.o dict.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o siphash.o crc16.o |
127 |
+ REDIS_BENCHMARK_NAME=redis-benchmark |
128 |
+@@ -188,7 +189,7 @@ endif |
129 |
+ |
130 |
+ # redis-server |
131 |
+ $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ) |
132 |
+- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS) |
133 |
++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS) |
134 |
+ |
135 |
+ # redis-sentinel |
136 |
+ $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) |
137 |
|
138 |
diff --git a/dev-db/redis/files/redis-sentinel-5.0-config.patch b/dev-db/redis/files/redis-sentinel-5.0-config.patch |
139 |
new file mode 100644 |
140 |
index 00000000000..53299f11840 |
141 |
--- /dev/null |
142 |
+++ b/dev-db/redis/files/redis-sentinel-5.0-config.patch |
143 |
@@ -0,0 +1,10 @@ |
144 |
+diff --git a/sentinel.conf b/sentinel.conf |
145 |
+index 3703c73..964ffa3 100644 |
146 |
+--- a/sentinel.conf |
147 |
++++ b/sentinel.conf |
148 |
+@@ -222,3 +222,5 @@ sentinel deny-scripts-reconfig yes |
149 |
+ # case, so writing "config guessme" is the same in the example above. |
150 |
+ # |
151 |
+ # SENTINEL SET can also be used in order to perform this configuration at runtime. |
152 |
++ |
153 |
++logfile "/var/log/redis/sentinel.log" |
154 |
|
155 |
diff --git a/dev-db/redis/redis-5.0_rc4.ebuild b/dev-db/redis/redis-5.0_rc4.ebuild |
156 |
new file mode 100644 |
157 |
index 00000000000..1b2b1a57ecf |
158 |
--- /dev/null |
159 |
+++ b/dev-db/redis/redis-5.0_rc4.ebuild |
160 |
@@ -0,0 +1,144 @@ |
161 |
+# Copyright 1999-2018 Gentoo Foundation |
162 |
+# Distributed under the terms of the GNU General Public License v2 |
163 |
+ |
164 |
+EAPI=6 |
165 |
+ |
166 |
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user |
167 |
+ |
168 |
+MY_PV="${PV/_/-}" |
169 |
+MY_P="${PN}-${MY_PV}" |
170 |
+ |
171 |
+DESCRIPTION="A persistent caching system, key-value and data structures database" |
172 |
+HOMEPAGE="https://redis.io" |
173 |
+SRC_URI="https://github.com/antirez/redis/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" |
174 |
+ |
175 |
+LICENSE="BSD" |
176 |
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris" |
177 |
+IUSE="+jemalloc tcmalloc luajit test" |
178 |
+SLOT="0" |
179 |
+ |
180 |
+# Redis does NOT build with Lua 5.2 or newer at this time. |
181 |
+# This should link correctly with both unslotted & slotted Lua, without |
182 |
+# changes. |
183 |
+RDEPEND=" |
184 |
+ luajit? ( dev-lang/luajit:2 ) |
185 |
+ !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) |
186 |
+ tcmalloc? ( dev-util/google-perftools ) |
187 |
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )" |
188 |
+ |
189 |
+DEPEND=" |
190 |
+ ${RDEPEND} |
191 |
+ virtual/pkgconfig |
192 |
+ >=sys-devel/autoconf-2.63 |
193 |
+ test? ( dev-lang/tcl:0= )" |
194 |
+ |
195 |
+REQUIRED_USE="?? ( tcmalloc jemalloc )" |
196 |
+ |
197 |
+S="${WORKDIR}/${MY_P}" |
198 |
+ |
199 |
+pkg_setup() { |
200 |
+ enewgroup redis 75 |
201 |
+ enewuser redis 75 -1 /var/lib/redis redis |
202 |
+} |
203 |
+ |
204 |
+src_prepare() { |
205 |
+ eapply \ |
206 |
+ "${FILESDIR}"/${PN}-3.2.3-config.patch \ |
207 |
+ "${FILESDIR}"/${PN}-5.0-shared.patch \ |
208 |
+ "${FILESDIR}"/${PN}-5.0-sharedlua.patch \ |
209 |
+ "${FILESDIR}"/${PN}-sentinel-5.0-config.patch |
210 |
+ eapply_user |
211 |
+ |
212 |
+ # Copy lua modules into build dir |
213 |
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die |
214 |
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die |
215 |
+ # Append cflag for lua_cjson |
216 |
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61 |
217 |
+ append-cflags "-DENABLE_CJSON_GLOBAL" |
218 |
+ |
219 |
+ # now we will rewrite present Makefiles |
220 |
+ local makefiles="" MKF |
221 |
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do |
222 |
+ mv "${MKF}" "${MKF}.in" |
223 |
+ sed -i -e 's:$(CC):@CC@:g' \ |
224 |
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ |
225 |
+ -e 's: $(DEBUG)::g' \ |
226 |
+ -e 's:$(OBJARCH)::g' \ |
227 |
+ -e 's:ARCH:TARCH:g' \ |
228 |
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ |
229 |
+ "${MKF}.in" \ |
230 |
+ || die "Sed failed for ${MKF}" |
231 |
+ makefiles+=" ${MKF}" |
232 |
+ done |
233 |
+ # autodetection of compiler and settings; generates the modified Makefiles |
234 |
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die |
235 |
+ |
236 |
+ # Use the correct pkgconfig name for Lua |
237 |
+ has_version 'dev-lang/lua:5.1' \ |
238 |
+ && LUAPKGCONFIG=lua5.1 \ |
239 |
+ || LUAPKGCONFIG=lua |
240 |
+ sed -i \ |
241 |
+ -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \ |
242 |
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ |
243 |
+ -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \ |
244 |
+ configure.ac || die "Sed failed for configure.ac" |
245 |
+ eautoreconf |
246 |
+} |
247 |
+ |
248 |
+src_configure() { |
249 |
+ econf \ |
250 |
+ $(use_with luajit) |
251 |
+ |
252 |
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 |
253 |
+ # also, don't define ANSI/c99 for lua twice |
254 |
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die |
255 |
+} |
256 |
+ |
257 |
+src_compile() { |
258 |
+ tc-export CC AR RANLIB |
259 |
+ |
260 |
+ local myconf="" |
261 |
+ |
262 |
+ if use tcmalloc; then |
263 |
+ myconf="${myconf} USE_TCMALLOC=yes" |
264 |
+ elif use jemalloc; then |
265 |
+ myconf="${myconf} JEMALLOC_SHARED=yes" |
266 |
+ else |
267 |
+ myconf="${myconf} MALLOC=yes" |
268 |
+ fi |
269 |
+ |
270 |
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}" |
271 |
+} |
272 |
+ |
273 |
+src_install() { |
274 |
+ insinto /etc/ |
275 |
+ doins redis.conf sentinel.conf |
276 |
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf |
277 |
+ fperms 0644 /etc/{redis,sentinel}.conf |
278 |
+ |
279 |
+ newconfd "${FILESDIR}/redis.confd-r1" redis |
280 |
+ newinitd "${FILESDIR}/redis.initd-5" redis |
281 |
+ |
282 |
+ systemd_newunit "${FILESDIR}/redis.service-2" redis.service |
283 |
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf |
284 |
+ |
285 |
+ newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel |
286 |
+ newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel |
287 |
+ |
288 |
+ insinto /etc/logrotate.d/ |
289 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
290 |
+ |
291 |
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md |
292 |
+ |
293 |
+ dobin src/redis-cli |
294 |
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb |
295 |
+ fperms 0750 /usr/sbin/redis-benchmark |
296 |
+ dosym redis-server /usr/sbin/redis-sentinel |
297 |
+ |
298 |
+ if use prefix; then |
299 |
+ diropts -m0750 |
300 |
+ else |
301 |
+ diropts -m0750 -o redis -g redis |
302 |
+ fi |
303 |
+ keepdir /var/{log,lib}/redis |
304 |
+} |