Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/redis/, dev-db/redis/files/
Date: Thu, 18 Apr 2019 05:12:04
Message-Id: 1555564232.92082e3e00062ad5ba88d5b8e09327283acd6a7c.robbat2@gentoo
1 commit: 92082e3e00062ad5ba88d5b8e09327283acd6a7c
2 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Fri Mar 22 05:57:02 2019 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 18 05:10:32 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92082e3e
7
8 dev-db/redis: bump to 4.0.14
9
10 Closes: https://bugs.gentoo.org/676046
11 Package-Manager: Portage-2.3.62, Repoman-2.3.12
12 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
13 Closes: https://github.com/gentoo/gentoo/pull/11456
14 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
15
16 dev-db/redis/Manifest | 1 +
17 dev-db/redis/files/redis.service-3 | 14 ++++
18 dev-db/redis/files/redis.tmpfiles-2 | 2 +
19 dev-db/redis/redis-4.0.14.ebuild | 141 ++++++++++++++++++++++++++++++++++++
20 4 files changed, 158 insertions(+)
21
22 diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest
23 index 1b06f135e3e..d3fcf0e33fc 100644
24 --- a/dev-db/redis/Manifest
25 +++ b/dev-db/redis/Manifest
26 @@ -2,5 +2,6 @@ DIST redis-4.0.10.tar.gz 1738465 BLAKE2B 572cbb3d2d5d7209f81ebd53ee68f40b404d0e4
27 DIST redis-4.0.11.tar.gz 1739656 BLAKE2B d94f380ad1600e58942cc5b27b512984396cdbb06ea6e947c7d7ce5b8ecdb8a2a56c6356af2caa82a96887a610716c9575b78eb2f46da89efb940febc1c30f22 SHA512 f0054af9ca2143731a397b2b21285387707b7f40d9326ba15225feb1a2ff470fab5194308342f63bbe1081f84c7e9ef19543c5a8e3eae49e17bfc515c64201f0
28 DIST redis-4.0.12.tar.gz 1740544 BLAKE2B 620dba8b81fc76a46880c3a4a7ee9d9835e7b19e6d321598a717892f6f03fa805db79847442744a2af8f77ae403b6e1df02299da9a0835f6092a74e3804dde48 SHA512 d19020f7ebed9ad5d04c6e1cb7e2a49dd1e226fe17d86e860df11bcb798c61c09f6f9fc3572a7ee32232ac34ec5eb1d6189f8139b5991bd87297c5243c3b54d2
29 DIST redis-4.0.13.tar.gz 1740715 BLAKE2B 73d129906b2a2ceb91d1144f8c8aeb970221f7ef4d1d0f0bac0aada6976ba6b2b4fdbe7cca29e350e8258986ee2607526896fcfb90536596a5fd556c6186faa6 SHA512 c220420bf6cb2781a3fb9e002188b1663743c89c262fd5aff02e585c969b56e7691fe1073e7427e6d38cf7b5a096f86b83af84cfa6b01a5bdf56048789e0bb70
30 +DIST redis-4.0.14.tar.gz 1740967 BLAKE2B d9122565ba890416d8936db936bc1410af840cc7617b485b94428891806d5889f5f02c2e722a7e68fe6c0b2690c1ef3479cc8837c55fb154f2b43af9986647a4 SHA512 7730a4083962046f8fee674a8ce95e1d3e8c8dcc2d64a65491dc3b851413b2d745942be7a94ee77074aa530da5f3d458c4e7388d7950a8495d8ee9f4862b7e06
31 DIST redis-4.0.2.tar.gz 1713990 BLAKE2B 307ab76b336f7520e14a23a1577c46e1b63cc5a5a5b6afb725cb87934fbcb62107085671fd1072d1142ce8e92f069e6b6064c9f4468335bc6997897c8f494471 SHA512 1458909c6fc16cff8ca5e6dddff23b988ee1e447f2d0bccf5941553b22bab6abb851732b3fe53dafb8a69d6c0939c3ce7e0686d51e03be720fb018c038d3b1b4
32 DIST redis-5.0.3.tar.gz 1959445 BLAKE2B d1c3247d77aa3b1076d0e1a0dcce74dcfb14a0ad3776603ef8154d7868f9f3efcf2138cb08581eee1974e9d76658d07456d6e9795391321b1f1f8bca7f9d40f5 SHA512 5915b14502438bf7c3f56e38640dda54b095bd87501aefa6e386c9cef48e8d1e625e980643d128d91b8cab26dd51d5d99ca66fa638dc04e5ba315fe43f11f58b
33
34 diff --git a/dev-db/redis/files/redis.service-3 b/dev-db/redis/files/redis.service-3
35 new file mode 100644
36 index 00000000000..1c733fcec17
37 --- /dev/null
38 +++ b/dev-db/redis/files/redis.service-3
39 @@ -0,0 +1,14 @@
40 +[Unit]
41 +Description=A persistent key-value database
42 +After=syslog.target network.target
43 +
44 +[Service]
45 +Type=simple
46 +PIDFile=/run/redis/redis.pid
47 +ExecStart=/usr/sbin/redis-server /etc/redis.conf
48 +User=redis
49 +Group=redis
50 +
51 +[Install]
52 +WantedBy=multi-user.target
53 +
54
55 diff --git a/dev-db/redis/files/redis.tmpfiles-2 b/dev-db/redis/files/redis.tmpfiles-2
56 new file mode 100644
57 index 00000000000..87087d2b773
58 --- /dev/null
59 +++ b/dev-db/redis/files/redis.tmpfiles-2
60 @@ -0,0 +1,2 @@
61 +# redis runtime directory
62 +d /run/redis 0755 redis root -
63
64 diff --git a/dev-db/redis/redis-4.0.14.ebuild b/dev-db/redis/redis-4.0.14.ebuild
65 new file mode 100644
66 index 00000000000..1f0ac4ef03d
67 --- /dev/null
68 +++ b/dev-db/redis/redis-4.0.14.ebuild
69 @@ -0,0 +1,141 @@
70 +# Copyright 1999-2019 Gentoo Authors
71 +# Distributed under the terms of the GNU General Public License v2
72 +
73 +EAPI=7
74 +
75 +inherit autotools flag-o-matic systemd toolchain-funcs user
76 +
77 +DESCRIPTION="A persistent caching system, key-value and data structures database"
78 +HOMEPAGE="https://redis.io"
79 +SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
80 +
81 +LICENSE="BSD"
82 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
83 +IUSE="+jemalloc tcmalloc luajit test"
84 +SLOT="0"
85 +
86 +# Redis does NOT build with Lua 5.2 or newer at this time.
87 +# This should link correctly with both unslotted & slotted Lua, without
88 +# changes.
89 +RDEPEND="
90 + luajit? ( dev-lang/luajit:2 )
91 + !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) )
92 + tcmalloc? ( dev-util/google-perftools )
93 + jemalloc? ( >=dev-libs/jemalloc-3.2 )"
94 +
95 +DEPEND="
96 + ${RDEPEND}
97 + test? ( dev-lang/tcl:0= )"
98 +
99 +BDEPEND="
100 + virtual/pkgconfig"
101 +
102 +REQUIRED_USE="?? ( tcmalloc jemalloc )"
103 +
104 +pkg_setup() {
105 + enewgroup redis 75
106 + enewuser redis 75 -1 /var/lib/redis redis
107 +}
108 +
109 +src_prepare() {
110 + eapply \
111 + "${FILESDIR}"/${PN}-3.2.3-config.patch \
112 + "${FILESDIR}"/${PN}-4.0.1-shared.patch \
113 + "${FILESDIR}"/${PN}-4.0.1-sharedlua.patch \
114 + "${FILESDIR}"/${PN}-sentinel-4.0.6-config.patch
115 + eapply_user
116 +
117 + # Copy lua modules into build dir
118 + cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
119 + cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
120 + # Append cflag for lua_cjson
121 + # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
122 + append-cflags "-DENABLE_CJSON_GLOBAL"
123 +
124 + # now we will rewrite present Makefiles
125 + local makefiles="" MKF
126 + for MKF in $(find -name 'Makefile' | cut -b 3-); do
127 + mv "${MKF}" "${MKF}.in"
128 + sed -i -e 's:$(CC):@CC@:g' \
129 + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
130 + -e 's: $(DEBUG)::g' \
131 + -e 's:$(OBJARCH)::g' \
132 + -e 's:ARCH:TARCH:g' \
133 + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
134 + "${MKF}.in" \
135 + || die "Sed failed for ${MKF}"
136 + makefiles+=" ${MKF}"
137 + done
138 + # autodetection of compiler and settings; generates the modified Makefiles
139 + cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die
140 +
141 + # Use the correct pkgconfig name for Lua
142 + has_version 'dev-lang/lua:5.1' \
143 + && LUAPKGCONFIG=lua5.1 \
144 + || LUAPKGCONFIG=lua
145 + sed -i \
146 + -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
147 + -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
148 + -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \
149 + configure.ac || die "Sed failed for configure.ac"
150 +
151 + eautoreconf
152 +}
153 +
154 +src_configure() {
155 + econf \
156 + $(use_with luajit)
157 +
158 + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
159 + # also, don't define ANSI/c99 for lua twice
160 + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
161 +}
162 +
163 +src_compile() {
164 + tc-export CC AR RANLIB
165 +
166 + local myconf=""
167 +
168 + if use tcmalloc; then
169 + myconf="${myconf} USE_TCMALLOC=yes"
170 + elif use jemalloc; then
171 + myconf="${myconf} JEMALLOC_SHARED=yes"
172 + else
173 + myconf="${myconf} MALLOC=yes"
174 + fi
175 +
176 + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
177 +}
178 +
179 +src_install() {
180 + insinto /etc/
181 + doins redis.conf sentinel.conf
182 + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
183 + fperms 0644 /etc/{redis,sentinel}.conf
184 +
185 + newconfd "${FILESDIR}/redis.confd-r1" redis
186 + newinitd "${FILESDIR}/redis.initd-5" redis
187 +
188 + systemd_newunit "${FILESDIR}/redis.service-3" redis.service
189 + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles-2" redis.conf
190 +
191 + newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel
192 + newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel
193 +
194 + insinto /etc/logrotate.d/
195 + newins "${FILESDIR}/${PN}.logrotate" ${PN}
196 +
197 + dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
198 +
199 + dobin src/redis-cli
200 + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
201 + fperms 0750 /usr/sbin/redis-benchmark
202 + dosym redis-server /usr/sbin/redis-sentinel
203 +
204 + if use prefix; then
205 + diropts -m0750
206 + else
207 + diropts -m0750 -o redis -g redis
208 + fi
209 + keepdir /var/{log,lib}/redis
210 +}