1 |
commit: 59e3ca6dd662210e3168d7d090a4cf03ff42e81d |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 22 04:36:51 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 22 05:47:50 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59e3ca6d |
7 |
|
8 |
dev-db/redis: add 7.0.5 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/872278 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
dev-db/redis/Manifest | 1 + |
14 |
dev-db/redis/redis-7.0.5.ebuild | 187 ++++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 188 insertions(+) |
16 |
|
17 |
diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest |
18 |
index 554246eb8a0e..a53a39f78f6d 100644 |
19 |
--- a/dev-db/redis/Manifest |
20 |
+++ b/dev-db/redis/Manifest |
21 |
@@ -2,3 +2,4 @@ DIST redis-6.0.16.tar.gz 2288647 BLAKE2B f3552cc0d27cbc5cf6556792da9a75d01ff70d3 |
22 |
DIST redis-6.2.6.tar.gz 2476542 BLAKE2B d139479432171294911d99e7e8c2327dbbc6682ea49de761c4bb4089a2efd814926f2f8823dca1826b4a61dd9ccf79abb22878c9463ac92870481b43d8a7fff7 SHA512 9b947d26fd9e208627ed22d318ab3d0775ab0be46d98db1c1d158feac671b984e75ce33e647d196face9643f80768af47e678be1b4e1ddd3eb56dff467c46022 |
23 |
DIST redis-6.2.7.tar.gz 2487287 BLAKE2B 06f1b1e16cdf06c38b67c1f1dcccc025da50cc3719688b8c2bf23077d77dd97ea546909043fb65e60478ac3661cc033fa6e8d7a38e361e69eb93ba3db07b7c66 SHA512 d113094b8e31754915db7f0317d9b7969e034af3a7bac2ae0cbfad6cc61ba3aae35e9709c435abc1024a96f914df7a760b3cd18d06c375b541cfa837d1c5b953 |
24 |
DIST redis-7.0.4.tar.gz 2963216 BLAKE2B 95ad18547b4be0b199fccc4b0f534b00d2f442609b604b02ef83f44cef4283048d1f8b89e383a14208a00842eb3d6655649d32169a2a6586ed6fac1792e19d5a SHA512 7edecfa667b30584666be0a2dbcb2ac25a6764fa5b8db49ab421602ad20272eeab99ccff0b7c2f789c30a0425d80b774515b03c849e517451cbe597d37eb0247 |
25 |
+DIST redis-7.0.5.tar.gz 2968205 BLAKE2B c319a2f656e4bd26637735ef73e58eecc306e202b57d6da3a38150a02d738a414c6696e261b8ab88033e117aee4f02308aab9ca4a5f382d66ec3a10f3e020580 SHA512 16ff920cb8df4d82e78ef34209285024aa98189be8acbca86b10fb3064dcc70eac60206aadece6af08406860ed01a004ce3aaa86be896ea36c7f486686646753 |
26 |
|
27 |
diff --git a/dev-db/redis/redis-7.0.5.ebuild b/dev-db/redis/redis-7.0.5.ebuild |
28 |
new file mode 100644 |
29 |
index 000000000000..d16e991e2f8b |
30 |
--- /dev/null |
31 |
+++ b/dev-db/redis/redis-7.0.5.ebuild |
32 |
@@ -0,0 +1,187 @@ |
33 |
+# Copyright 1999-2022 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=8 |
37 |
+ |
38 |
+# N.B.: It is no clue in porting to Lua eclasses, as upstream have deviated |
39 |
+# too far from vanilla Lua, adding their own APIs like lua_enablereadonlytable |
40 |
+ |
41 |
+inherit autotools edo flag-o-matic multiprocessing systemd tmpfiles toolchain-funcs |
42 |
+ |
43 |
+DESCRIPTION="A persistent caching system, key-value, and data structures database" |
44 |
+HOMEPAGE="https://redis.io" |
45 |
+SRC_URI="https://download.redis.io/releases/${P}.tar.gz" |
46 |
+ |
47 |
+LICENSE="BSD" |
48 |
+SLOT="0" |
49 |
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris" |
50 |
+IUSE="+jemalloc selinux ssl systemd tcmalloc test" |
51 |
+RESTRICT="!test? ( test )" |
52 |
+ |
53 |
+COMMON_DEPEND=" |
54 |
+ jemalloc? ( >=dev-libs/jemalloc-5.1:= ) |
55 |
+ ssl? ( dev-libs/openssl:0= ) |
56 |
+ systemd? ( sys-apps/systemd:= ) |
57 |
+ tcmalloc? ( dev-util/google-perftools ) |
58 |
+" |
59 |
+ |
60 |
+RDEPEND=" |
61 |
+ ${COMMON_DEPEND} |
62 |
+ acct-group/redis |
63 |
+ acct-user/redis |
64 |
+ selinux? ( sec-policy/selinux-redis ) |
65 |
+" |
66 |
+ |
67 |
+BDEPEND=" |
68 |
+ ${COMMON_DEPEND} |
69 |
+ virtual/pkgconfig |
70 |
+" |
71 |
+ |
72 |
+# Tcl is only needed in the CHOST test env |
73 |
+DEPEND=" |
74 |
+ ${COMMON_DEPEND} |
75 |
+ test? ( |
76 |
+ dev-lang/tcl:0= |
77 |
+ ssl? ( dev-tcltk/tls ) |
78 |
+ )" |
79 |
+ |
80 |
+REQUIRED_USE="?? ( jemalloc tcmalloc )" |
81 |
+ |
82 |
+PATCHES=( |
83 |
+ "${FILESDIR}"/${PN}-6.2.1-config.patch |
84 |
+ "${FILESDIR}"/${PN}-5.0-shared.patch |
85 |
+ "${FILESDIR}"/${PN}-6.2.3-ppc-atomic.patch |
86 |
+ "${FILESDIR}"/${PN}-sentinel-5.0-config.patch |
87 |
+ "${FILESDIR}"/${PN}-7.0.4-no-which.patch |
88 |
+) |
89 |
+ |
90 |
+src_prepare() { |
91 |
+ default |
92 |
+ |
93 |
+ # Append cflag for lua_cjson |
94 |
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61 |
95 |
+ append-cflags "-DENABLE_CJSON_GLOBAL" |
96 |
+ |
97 |
+ # now we will rewrite present Makefiles |
98 |
+ local makefiles="" MKF |
99 |
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do |
100 |
+ mv "${MKF}" "${MKF}.in" |
101 |
+ sed -i -e 's:$(CC):@CC@:g' \ |
102 |
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ |
103 |
+ -e 's: $(DEBUG)::g' \ |
104 |
+ -e 's:$(OBJARCH)::g' \ |
105 |
+ -e 's:ARCH:TARCH:g' \ |
106 |
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ |
107 |
+ "${MKF}.in" \ |
108 |
+ || die "Sed failed for ${MKF}" |
109 |
+ makefiles+=" ${MKF}" |
110 |
+ done |
111 |
+ # autodetection of compiler and settings; generates the modified Makefiles |
112 |
+ cp "${FILESDIR}"/configure.ac-7.0 configure.ac || die |
113 |
+ |
114 |
+ sed -i \ |
115 |
+ -e "/^AC_INIT/s|, __PV__, |, $PV, |" \ |
116 |
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ |
117 |
+ configure.ac || die "Sed failed for configure.ac" |
118 |
+ eautoreconf |
119 |
+} |
120 |
+ |
121 |
+src_configure() { |
122 |
+ econf |
123 |
+ |
124 |
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 |
125 |
+ # also, don't define ANSI/c99 for lua twice |
126 |
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die |
127 |
+} |
128 |
+ |
129 |
+src_compile() { |
130 |
+ local myconf="" |
131 |
+ |
132 |
+ if use jemalloc; then |
133 |
+ myconf+="MALLOC=jemalloc" |
134 |
+ elif use tcmalloc; then |
135 |
+ myconf+="MALLOC=tcmalloc" |
136 |
+ else |
137 |
+ myconf+="MALLOC=libc" |
138 |
+ fi |
139 |
+ |
140 |
+ if use ssl; then |
141 |
+ myconf+=" BUILD_TLS=yes" |
142 |
+ fi |
143 |
+ |
144 |
+ export USE_SYSTEMD=$(usex systemd) |
145 |
+ |
146 |
+ tc-export AR CC RANLIB |
147 |
+ emake V=1 ${myconf} AR="${AR}" CC="${CC}" RANLIB="${RANLIB}" |
148 |
+} |
149 |
+ |
150 |
+src_test() { |
151 |
+ local runtestargs=( |
152 |
+ --clients "$(makeopts_jobs)" # see bug #649868 |
153 |
+ |
154 |
+ --skiptest "Active defrag eval scripts" # see bug #851654 |
155 |
+ ) |
156 |
+ |
157 |
+ if has usersandbox ${FEATURES} || ! has userpriv ${FEATURES}; then |
158 |
+ ewarn "oom-score-adj related tests will be skipped." \ |
159 |
+ "They are known to fail with FEATURES usersandbox or -userpriv. See bug #756382." |
160 |
+ |
161 |
+ runtestargs+=( |
162 |
+ # unit/oom-score-adj was introduced in version 6.2.0 |
163 |
+ --skipunit unit/oom-score-adj # see bug #756382 |
164 |
+ |
165 |
+ # Following test was added in version 7.0.0 to unit/introspection. |
166 |
+ # It also tries to adjust OOM score. |
167 |
+ --skiptest "CONFIG SET rollback on apply error" |
168 |
+ ) |
169 |
+ fi |
170 |
+ |
171 |
+ if use ssl; then |
172 |
+ edo ./utils/gen-test-certs.sh |
173 |
+ runtestargs+=( --tls ) |
174 |
+ fi |
175 |
+ |
176 |
+ edo ./runtest "${runtestargs[@]}" |
177 |
+} |
178 |
+ |
179 |
+src_install() { |
180 |
+ insinto /etc/redis |
181 |
+ doins redis.conf sentinel.conf |
182 |
+ use prefix || fowners -R redis:redis /etc/redis /etc/redis/{redis,sentinel}.conf |
183 |
+ fperms 0750 /etc/redis |
184 |
+ fperms 0644 /etc/redis/{redis,sentinel}.conf |
185 |
+ |
186 |
+ newconfd "${FILESDIR}/redis.confd-r2" redis |
187 |
+ newinitd "${FILESDIR}/redis.initd-6" redis |
188 |
+ |
189 |
+ systemd_newunit "${FILESDIR}/redis.service-4" redis.service |
190 |
+ newtmpfiles "${FILESDIR}/redis.tmpfiles-2" redis.conf |
191 |
+ |
192 |
+ newconfd "${FILESDIR}/redis-sentinel.confd-r1" redis-sentinel |
193 |
+ newinitd "${FILESDIR}/redis-sentinel.initd-r1" redis-sentinel |
194 |
+ |
195 |
+ insinto /etc/logrotate.d/ |
196 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
197 |
+ |
198 |
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING.md MANIFESTO README.md |
199 |
+ |
200 |
+ dobin src/redis-cli |
201 |
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb |
202 |
+ fperms 0750 /usr/sbin/redis-benchmark |
203 |
+ dosym redis-server /usr/sbin/redis-sentinel |
204 |
+ |
205 |
+ if use prefix; then |
206 |
+ diropts -m0750 |
207 |
+ else |
208 |
+ diropts -m0750 -o redis -g redis |
209 |
+ fi |
210 |
+ keepdir /var/{log,lib}/redis |
211 |
+} |
212 |
+ |
213 |
+pkg_postinst() { |
214 |
+ tmpfiles_process redis.conf |
215 |
+ |
216 |
+ ewarn "The default redis configuration file location changed to:" |
217 |
+ ewarn " /etc/redis/{redis,sentinel}.conf" |
218 |
+ ewarn "Please apply your changes to the new configuration files." |
219 |
+} |