Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/redis/
Date: Thu, 27 Aug 2020 18:12:21
Message-Id: 1598551900.d93fc026adfcd8e9e46fd290fca412431554d01e.bman@gentoo
1 commit: d93fc026adfcd8e9e46fd290fca412431554d01e
2 Author: Aaron Bauman <bman <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 27 18:11:40 2020 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 27 18:11:40 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d93fc026
7
8 dev-db/redis: drop vulnerable 5.0.8
9
10 Bug: https://bugs.gentoo.org/633824
11 Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
12
13 dev-db/redis/Manifest | 1 -
14 dev-db/redis/redis-5.0.8.ebuild | 160 ----------------------------------------
15 2 files changed, 161 deletions(-)
16
17 diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest
18 index 579b3aaee97..7d3e23dd97d 100644
19 --- a/dev-db/redis/Manifest
20 +++ b/dev-db/redis/Manifest
21 @@ -1,3 +1,2 @@
22 -DIST redis-5.0.8.tar.gz 1985757 BLAKE2B e46af2133e066ccb91a8eb2c2fbfefe3747e1cfa71efa78dd50830e1bc1d83261f78ed6ff75b789b238709d9f72d5d401be2f2dd698bd19c41c091d10e0baf47 SHA512 106a74ab910267472fb418fdeb4f39e29efe9d73ed5af78b7847c91eaabd473dd729a63078e72d8e87c842169502946e9a0a97c42dea415db82732864c7c46dc
23 DIST redis-5.0.9.tar.gz 1986574 BLAKE2B 7802d0556d11c9be8577b9bb3f4dbad8c2419b38659001421f96040e8a64a4a304e9dc1f06d82802ce1c92515d166cfd37c2f347df4c4cda0c2c4c2bb10d27c5 SHA512 d2c7bc1f769bc5d179bfe6e71954962813b50597eafc752a9b1edf2fd87e84707b7daf0910db56dd0e89cb3bdb3e551da7f111ae4899f505bac5f77f99744c13
24 DIST redis-6.0.6.tar.gz 2228781 BLAKE2B 42396f464611cd5d83a79a97d2e4f74c0adabf9338802ec748c24f6ea46d42c6e51fedecc5cd26c7cff6b2a3c7a26bbbf79db7a54a6cbeff388587d186268796 SHA512 bb60aff6e495b201fed814eb134e6ce2825429ef6bd52215c7369eec941318ba460d60ad7b0cef3684b3f992823d465869177dc1d0eb16886bfed598dff74f65
25
26 diff --git a/dev-db/redis/redis-5.0.8.ebuild b/dev-db/redis/redis-5.0.8.ebuild
27 deleted file mode 100644
28 index 17942c1e4f6..00000000000
29 --- a/dev-db/redis/redis-5.0.8.ebuild
30 +++ /dev/null
31 @@ -1,160 +0,0 @@
32 -# Copyright 1999-2020 Gentoo Authors
33 -# Distributed under the terms of the GNU General Public License v2
34 -
35 -EAPI=7
36 -
37 -inherit autotools flag-o-matic systemd toolchain-funcs
38 -
39 -DESCRIPTION="A persistent caching system, key-value and data structures database"
40 -HOMEPAGE="https://redis.io"
41 -SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
42 -
43 -LICENSE="BSD"
44 -KEYWORDS="amd64 arm arm64 hppa ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
45 -IUSE="+jemalloc tcmalloc luajit test"
46 -RESTRICT="!test? ( test )"
47 -SLOT="0"
48 -
49 -# Redis does NOT build with Lua 5.2 or newer at this time.
50 -# This should link correctly with both unslotted & slotted Lua, without
51 -# changes.
52 -COMMON_DEPEND="
53 - luajit? ( dev-lang/luajit:2 )
54 - !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) )
55 - tcmalloc? ( dev-util/google-perftools )
56 - jemalloc? ( >=dev-libs/jemalloc-5.1:= )"
57 -
58 -RDEPEND="
59 - ${COMMON_DEPEND}
60 - acct-group/redis
61 - acct-user/redis"
62 -
63 -BDEPEND="
64 - ${COMMON_DEPEND}
65 - virtual/pkgconfig"
66 -
67 -# Tcl is only needed in the CHOST test env
68 -DEPEND="
69 - ${COMMON_DEPEND}
70 - test? ( dev-lang/tcl:0= )"
71 -
72 -REQUIRED_USE="?? ( tcmalloc jemalloc )"
73 -
74 -PATCHES=(
75 - "${FILESDIR}"/${PN}-3.2.3-config.patch
76 - "${FILESDIR}"/${PN}-5.0-shared.patch
77 - "${FILESDIR}"/${PN}-5.0-sharedlua.patch
78 - "${FILESDIR}"/${PN}-5.0.8-ppc-atomic.patch
79 - "${FILESDIR}"/${PN}-sentinel-5.0-config.patch
80 -)
81 -
82 -src_prepare() {
83 - default
84 -
85 - # Copy lua modules into build dir
86 - cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
87 - cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
88 - # Append cflag for lua_cjson
89 - # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
90 - append-cflags "-DENABLE_CJSON_GLOBAL"
91 -
92 - # now we will rewrite present Makefiles
93 - local makefiles="" MKF
94 - for MKF in $(find -name 'Makefile' | cut -b 3-); do
95 - mv "${MKF}" "${MKF}.in"
96 - sed -i -e 's:$(CC):@CC@:g' \
97 - -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
98 - -e 's: $(DEBUG)::g' \
99 - -e 's:$(OBJARCH)::g' \
100 - -e 's:ARCH:TARCH:g' \
101 - -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
102 - "${MKF}.in" \
103 - || die "Sed failed for ${MKF}"
104 - makefiles+=" ${MKF}"
105 - done
106 - # autodetection of compiler and settings; generates the modified Makefiles
107 - cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die
108 -
109 - # Use the correct pkgconfig name for Lua
110 - if false && has_version 'dev-lang/lua:5.3'; then
111 - # Lua5.3 gives:
112 - #lua_bit.c:83:2: error: #error "Unknown number type, check LUA_NUMBER_* in luaconf.h"
113 - LUAPKGCONFIG=lua5.3
114 - elif false && has_version 'dev-lang/lua:5.2'; then
115 - # Lua5.2 fails with:
116 - # scripting.c:(.text+0x1f9b): undefined reference to `lua_open'
117 - # Because lua_open because lua_newstate in 5.2
118 - LUAPKGCONFIG=lua5.2
119 - elif has_version 'dev-lang/lua:5.1'; then
120 - LUAPKGCONFIG=lua5.1
121 - else
122 - LUAPKGCONFIG=lua
123 - fi
124 - # The upstream configure script handles luajit specially, and is not
125 - # effected by these changes.
126 - einfo "Selected LUAPKGCONFIG=${LUAPKGCONFIG}"
127 - sed -i \
128 - -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
129 - -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
130 - -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \
131 - configure.ac || die "Sed failed for configure.ac"
132 - eautoreconf
133 -}
134 -
135 -src_configure() {
136 - econf \
137 - $(use_with luajit)
138 -
139 - # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
140 - # also, don't define ANSI/c99 for lua twice
141 - sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
142 -}
143 -
144 -src_compile() {
145 - tc-export CC AR RANLIB
146 -
147 - local myconf=""
148 -
149 - if use tcmalloc; then
150 - myconf="${myconf} USE_TCMALLOC=yes"
151 - elif use jemalloc; then
152 - myconf="${myconf} JEMALLOC_SHARED=yes"
153 - else
154 - myconf="${myconf} MALLOC=yes"
155 - fi
156 -
157 - emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
158 -}
159 -
160 -src_install() {
161 - insinto /etc/
162 - doins redis.conf sentinel.conf
163 - use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
164 - fperms 0644 /etc/{redis,sentinel}.conf
165 -
166 - newconfd "${FILESDIR}/redis.confd-r1" redis
167 - newinitd "${FILESDIR}/redis.initd-5" redis
168 -
169 - systemd_newunit "${FILESDIR}/redis.service-3" redis.service
170 - systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles-2" redis.conf
171 -
172 - newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel
173 - newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel
174 -
175 - insinto /etc/logrotate.d/
176 - newins "${FILESDIR}/${PN}.logrotate" ${PN}
177 -
178 - dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
179 -
180 - dobin src/redis-cli
181 - dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
182 - fperms 0750 /usr/sbin/redis-benchmark
183 - dosym redis-server /usr/sbin/redis-sentinel
184 -
185 - if use prefix; then
186 - diropts -m0750
187 - else
188 - diropts -m0750 -o redis -g redis
189 - fi
190 - keepdir /var/{log,lib}/redis
191 -}