From fa275aeb316ed5e68498ca0057b27a1e9c887e26 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 4 Oct 2024 04:27:18 +0100 Subject: gentoo auto-resync : 04:10:2024 - 04:27:17 --- dev-db/Manifest.gz | Bin 16740 -> 16747 bytes dev-db/pg_top/Manifest | 2 +- dev-db/pg_top/pg_top-4.1.1.ebuild | 2 +- dev-db/redis/Manifest | 6 ++ dev-db/redis/redis-6.2.16.ebuild | 192 +++++++++++++++++++++++++++++++++++++ dev-db/redis/redis-7.2.6.ebuild | 197 ++++++++++++++++++++++++++++++++++++++ dev-db/redis/redis-7.4.1.ebuild | 193 +++++++++++++++++++++++++++++++++++++ 7 files changed, 590 insertions(+), 2 deletions(-) create mode 100644 dev-db/redis/redis-6.2.16.ebuild create mode 100644 dev-db/redis/redis-7.2.6.ebuild create mode 100644 dev-db/redis/redis-7.4.1.ebuild (limited to 'dev-db') diff --git a/dev-db/Manifest.gz b/dev-db/Manifest.gz index 9ddc35de56d5..1a87af667223 100644 Binary files a/dev-db/Manifest.gz and b/dev-db/Manifest.gz differ diff --git a/dev-db/pg_top/Manifest b/dev-db/pg_top/Manifest index e0b86368e79b..4a63616845f0 100644 --- a/dev-db/pg_top/Manifest +++ b/dev-db/pg_top/Manifest @@ -1,5 +1,5 @@ DIST pg_top-4.0.0.tar.xz 117920 BLAKE2B 5c13fd868804492ccce3b660875602df958f065126f9dc17f45ebcac7961384cd1d3d3313da49832a1219ea7e86ae78cbbdb975467b13b32d5f836f5cd33a443 SHA512 b7a016137495ceecdcf0ac0e95c73b7eca20b57264f7b63b0a38c3f31db742c704ed0094e07f6df051bce9bc26214f5a8f66ced1e923bb66e0c86fff1e2ffc19 DIST pg_top-4.1.1.tar.xz 103128 BLAKE2B 6899b3e4963880aff9e4b3d94441903ea6a2141fb2cac56821c9ca3a5333cca4ed6a80c83f6feef34c9fe634c7c7b2d9ab1fbaba844b0485d7a5edb2e5bc9598 SHA512 bc58b0aaf02326d90cd7e6ed894021edf20dd6f7b67125d856bec474afe16cb6f096506c73becbde4a104c61fe62e5281df02f16c7bdbdd74478faa1e91ed9ae EBUILD pg_top-4.0.0-r3.ebuild 556 BLAKE2B 18fc9add528f0a74cf5d1f1b82e6ff79c962f19f617bc65a549c9adedaefe5cbfaeb1b82101bc72c134915aa7612b94dd48b66164d600200076cd499d5ddb855 SHA512 d73fe03ee28c23b72bc64bc376d144936b69442db71731b2dd945249232ffd02b87dc176642ffc5e8de1588d1b29100c2b1a586da88fc4c9c5d0c6b348275fc3 -EBUILD pg_top-4.1.1.ebuild 557 BLAKE2B 2ffe72ae798b7bd4c99a3e8609acac674e09f5353fdea23fd27a5549dbd797bb58b3681e637345aa78f416c98806820439d29535aaef6247ab8500b906e3ba20 SHA512 7c581dbdbc3210694ad95c854f04fda1ce0612691f68dd21779213c4c5b1a2d5f2d1b6be35cec61373871cef879847ffbf44fdbc1f86ff1ff6aaedef2026b74f +EBUILD pg_top-4.1.1.ebuild 556 BLAKE2B 6a1eb41db0cb3ed48c1bee27a45955de7f2d7ca304fe6d26f3888ff91d0c9beb62c8b6c5cd32ae90df44f9218966b301423d36f1d159ab649f936ea64ef8cf53 SHA512 0391e7e6fbc3e604ad05fdc3c641787bc228721f3009f592f55710635b1761a3c538ff6eed395ed3e5f65ac022144b97be7f5159d4d175135f961850c58da6b2 MISC metadata.xml 540 BLAKE2B 1788f81c174a420261812980f74c0726b8b51fc0fdac8ff254f1ce21fb43340493d0b645ae92bc1fab15cebced7d96946c5933a30ab8fb62c06ba54b69333e14 SHA512 6d6bbdeb2680a7dbb84f237b38d58f0966ae39963fee7136800e4c426b0bf109d2ddba64f94c519fb226f4bd90fbe166d716a6d907f6fc6fc1a1419de27c5653 diff --git a/dev-db/pg_top/pg_top-4.1.1.ebuild b/dev-db/pg_top/pg_top-4.1.1.ebuild index 90feeaabced0..afcc5c0fc912 100644 --- a/dev-db/pg_top/pg_top-4.1.1.ebuild +++ b/dev-db/pg_top/pg_top-4.1.1.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://pg_top.gitlab.io/source/${P}.tar.xz" LICENSE="BSD" SLOT="0" -KEYWORDS="~amd64 x86" +KEYWORDS="amd64 x86" IUSE="" RDEPEND="dev-db/postgresql:= diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest index 513d5b045287..9a61ea7f6d5f 100644 --- a/dev-db/redis/Manifest +++ b/dev-db/redis/Manifest @@ -15,11 +15,17 @@ AUX redis.logrotate 105 BLAKE2B 1281fd86d399b40aaaa69d1fe170b2c49523c074e14b1290 AUX redis.service-4 255 BLAKE2B e51cfbb7ce6586e7c16003e3b470be036e9c28b408c4ad71e90d084f5ee843eb2b0b60552735099564f99fc4b4c318980f2e1dde7ac69b32a54a636e663a7cd5 SHA512 786fb60e628146d5024fbee2c17bee26276f58b8d2f15c8eb0a416b1b2e870a1d82e7a1ef7155b7a489da8c89d6feae5b1207597bf6fcb929d7bcfddcae25937 AUX redis.tmpfiles-2 57 BLAKE2B 1e0577c1828bb693cf820f3ba5e77d7d748adf4df2d1910d465ce097765308c7b7ea729526404120d04a79b547e865df93f7bfce1e63341c73563496f1dce691 SHA512 3de050ce044b7daf71219ec61dee2bc31acef161319b87ec2963b23c72e8a4807f1302c4932897664a63ef94507449f6ab75ce18d59f5e1a4558c330a7042e43 DIST redis-6.2.14.tar.gz 2496149 BLAKE2B 689a0c3b558e07f43f8b1480fbf7a083184bbc0ccde0b184dc8a1d89ed22bec9694b7c8605ff729c9e9d582e8cf47c8f9cd9ee0794ea15e07cdb0b886e93c116 SHA512 140d4b23c20d459b65be8c61996e281222f978b51c52cb048039d741801e4027775ad89ed354dc0dce3d47703a08610adafaf6253fea2f973d5b9d20bc1e59ce +DIST redis-6.2.16.tar.gz 2496391 BLAKE2B e00eac16fbebc54bbd24dc6622cb1add7c0511df419a84d5f9a4aae28b2a5ec4d9a4b865999fe4ab1bfeff582dce8f7c01c5352c7389c3a2ebbffc728246033b SHA512 486bb949c5adce9d2ad176c2638d2425a6a03910098e6adf1bdaecd3459d148c2899e4827ed39cbe8d7300ffcffe99b475575bb87ab93a330549077284fd8fd7 DIST redis-7.0.15.tar.gz 2994329 BLAKE2B fa1bc85c89cb6a6fb18710a4d29c20db44a80ce445d217f39a234a2aad1d79031e9d1fc45415af7b0eb1c169bd88f45f1fe60cab35de38c6fadc839e2a27676d SHA512 83d58f98085f91754f6d87810e7da0d6cf11ffbe11a0f5d3581d5b2c63d2a752ba6b4eda921a04031aedc56ecebe349cd468ab5ad837493f55d2cac0ab3d015a DIST redis-7.2.5.tar.gz 3386454 BLAKE2B 5a0e5b0162f684ecd6db4a782a18a3c7bf272ec1ce38e2d2a4b5bc3966d968170f5b968e7f9946fd50d2b942c52298430eeccb386bbb443201eda6ac180c7f2b SHA512 e064a0f380e3a00ab8eb2f10ed7317fd6aa27d64cf00792fab80465036f92d17b166050e71b8a779fdf024528ac736cb54722316811f99951c4e386f4ab2245d +DIST redis-7.2.6.tar.gz 3391023 BLAKE2B 8dae8c370a905ff8622f1458387eea4cc61e451d827de8a4b61a65aff0517ff2ec714eadcd03e1b683c0940cc98390ce7c2eb451bd25c3ecaeaf21ac1fb2230a SHA512 758a1cbf77eee6222b3490757c58b9a1065b727b65d9bd6332cb41a816b6ab2827924eaca003fb5b818f847f7a00d9ce2f46365969ce946110119872368cc938 DIST redis-7.4.0.tar.gz 3525325 BLAKE2B 232e5d8db368e1a6c13e044ea40b4f4cd2b1f8f8d02319e408c8b0cfdbc6e4630ca2d38af080c5ccd1a4564da06f8cc761b54b00362f515edb11dc13c4853f78 SHA512 f5cd7566664f41a038f1078cd746b0a143ae543e035c363ae1ba60639830cc244d1536c84a95ce897b277bd0c4aad91a569e209dbb7917b7a2319805901a49d1 +DIST redis-7.4.1.tar.gz 3529512 BLAKE2B 097c9ff0356a86909898e8defe9394c88bc2de7194477905c12c08cc5ffabd2180ffefd5b17d9454af1b7ef8ab059cbcb61bd42b86ee50d98e73208fa1da796d SHA512 d764b5c3a4a6fb73192b92e92e90abedf46c2dee6e0840326c95b848910186e52f973020563fc89781c144340f652b5d39c997acff7c9d4b751ddc3300140e45 EBUILD redis-6.2.14-r1.ebuild 5480 BLAKE2B 03ab7cacdd2720e6b70e177f83814f5ebc4f5ccf010efca90b01fdabb9d553ce40f7e80c241cc90f9cf1f9d11746e3565a549fad345b93863277fa599026834b SHA512 7822951152271e852494c8500d17eeefe4e749cd0178b0a4ddf54810e063765d0cc0574bb448b815b4f15de5aa125f96926a5cf0f06a4d4eb07a4ff122cf8a5c +EBUILD redis-6.2.16.ebuild 5415 BLAKE2B 3ecb2866bea6df072f88c4089aeedafbbfc6d9f211531c140c24cb4654f8d3d209f8dec89d27e93f46a647d5766c2c14c353714f4cdc82b764bdae7d5cc1755a SHA512 9f618386140e62add19c5d2aa3f1a26659b342256cf5ee39d95f474aa6bf092962712bb32566612dcd8b8b469ddbcc65eba3b54f0aff6c1022a0b9607439203f EBUILD redis-7.0.15-r1.ebuild 4940 BLAKE2B 9a3479bddd9566f08a9d7bca3aeb5be6ef5b1b9b06b6d0b27073983a4114ff087b3db05399e5f178c06d349c67cc8d695430fa6563a59c9b5944057601938bbe SHA512 93cd8775146b02b7b6a4296fc03f4802b5f7d8b6c12bf602d0bdd15d511cc8a6e022640a5ef8ceb241ece8083a3145ec6a4ef34fc879e72f0510c627145934be EBUILD redis-7.2.5.ebuild 5024 BLAKE2B 54dfdbc184b04c83b20667bf5db958cb2a689c67051b3cab78ecf9bc968110bc5e886ca4d5f87713dce638f91826a210f9e73a846183af0e57f4da3ea34824b3 SHA512 f9e99196b5ccbec2dc7cbd4fc6d11b73c1fce0e56588e19147b0bd5ba6c9f15fe4f9bf69244e77b20797af7209ed4713938a9669012a2af5ba51b53cd1b1aa9e +EBUILD redis-7.2.6.ebuild 5029 BLAKE2B 2b8e0b87b26b9d933437e5194eacedc2c40da0e7f4748f847c5e3669db1559298b4a43a47a1d2fe4ddff74a5205cf25c0a3b8cea7346e086d21c134419562acd SHA512 974767292b75b2c13da0f433ec304960b4b7ac956a6bb17aa95bf68038dccb7064bea946e9bf39caa691dd422b70aa5d8440156452cb4015ced594646ea69705 EBUILD redis-7.4.0.ebuild 4858 BLAKE2B 71ffa087a193e274467ea3e52edb8090166bcb5179d8d10a558b0a333c9d42097c8851a00913a62c2e4804326e8dcf498c609e68f55c1f4d8e8cb5fc57888907 SHA512 c4588b8bca359c617ffb0ccf4eca79ee59095169e9ff74260af2926e0178ac1384ca1ba6777d1dbf721e916eb233ad87d9c308e87195dd58294b8f97e1cf864b +EBUILD redis-7.4.1.ebuild 4860 BLAKE2B 1bae3712b3f54b5ccd373b0e53ed0fbe306fa03c41dde9910c5e71cc5b55acde590c8f03bc985a305ae3006a8c78ca24fa3db6d343c116177f880d2dee403a02 SHA512 6c8614e6a8538476835b49f8c7f0848b520aa82395c72a49f7c9b2853367d1b504747270f5f660154ad15239bc47c62498d8cb2a1f642832410ba72b24f8e41e MISC metadata.xml 547 BLAKE2B 43d462a2c301c4431aa233467563140076269fec170063a9b5501fad2bad3afb9602aab971a5ef16997dd24cc5cfd27c9a9e194059b8db8784250cdae0fd5db3 SHA512 6b4549d4c296c19bc054175c7cf2d1af785d9217b4f298460be5ed08c0197ad8d6fdc29c998c85a5c6926947d99665265a008163e2dc15def2e1230ca6b561eb diff --git a/dev-db/redis/redis-6.2.16.ebuild b/dev-db/redis/redis-6.2.16.ebuild new file mode 100644 index 000000000000..09d489d803f8 --- /dev/null +++ b/dev-db/redis/redis-6.2.16.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Redis does NOT build with Lua 5.2 or newer at this time: +# - 5.3 and 5.4 give: +# lua_bit.c:83:2: error: #error "Unknown number type, check LUA_NUMBER_* in luaconf.h" +# - 5.2 fails with: +# scripting.c:(.text+0x1f9b): undefined reference to `lua_open' +# because lua_open became lua_newstate in 5.2 +LUA_COMPAT=( lua5-1 luajit ) + +# Upstream have deviated too far from vanilla Lua, adding their own APIs +# like lua_enablereadonlytable, but we still need the eclass and such +# for bug #841422. +inherit autotools edo flag-o-matic lua-single multiprocessing systemd tmpfiles toolchain-funcs + +DESCRIPTION="A persistent caching system, key-value, and data structures database" +HOMEPAGE="https://redis.io" +SRC_URI="https://download.redis.io/releases/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="+jemalloc selinux ssl systemd tcmalloc test" +RESTRICT="!test? ( test )" + +DEPEND=" + ${LUA_DEPS} + jemalloc? ( >=dev-libs/jemalloc-5.1:= ) + ssl? ( dev-libs/openssl:0= ) + systemd? ( sys-apps/systemd:= ) + tcmalloc? ( dev-util/google-perftools ) +" + +RDEPEND=" + ${DEPEND} + acct-group/redis + acct-user/redis + selinux? ( sec-policy/selinux-redis ) +" + +BDEPEND=" + acct-group/redis + acct-user/redis + virtual/pkgconfig + test? ( + dev-lang/tcl:0= + ssl? ( dev-tcltk/tls ) + ) +" + +REQUIRED_USE="?? ( jemalloc tcmalloc ) + ${LUA_REQUIRED_USE}" + +PATCHES=( + "${FILESDIR}"/${PN}-6.2.1-config.patch + "${FILESDIR}"/${PN}-5.0-shared.patch + "${FILESDIR}"/${PN}-6.2.3-ppc-atomic.patch + "${FILESDIR}"/${PN}-sentinel-5.0-config.patch +) + +src_prepare() { + default + + # Copy lua modules into build dir + #cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die + #cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die + # Append cflag for lua_cjson + # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61 + append-cflags "-DENABLE_CJSON_GLOBAL" + + # now we will rewrite present Makefiles + local makefiles="" MKF + for MKF in $(find -name 'Makefile' | cut -b 3-); do + mv "${MKF}" "${MKF}.in" + sed -i -e 's:$(CC):@CC@:g' \ + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ + -e 's: $(DEBUG)::g' \ + -e 's:$(OBJARCH)::g' \ + -e 's:ARCH:TARCH:g' \ + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ + "${MKF}.in" \ + || die "Sed failed for ${MKF}" + makefiles+=" ${MKF}" + done + # autodetection of compiler and settings; generates the modified Makefiles + cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die + + # Use the correct pkgconfig name for Lua. + # The upstream configure script handles luajit specially, and is not + # affected by these changes. + sed -i \ + -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \ + -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + -e "/PKG_CHECK_MODULES.*\/s,lua5.1,${ELUA},g" \ + configure.ac || die "Sed failed for configure.ac" + eautoreconf +} + +src_configure() { + econf #$(use_with lua_single_target_luajit luajit) + + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 + # also, don't define ANSI/c99 for lua twice + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die +} + +src_compile() { + local myconf="" + + if use jemalloc; then + myconf+="MALLOC=jemalloc" + elif use tcmalloc; then + myconf+="MALLOC=tcmalloc" + else + myconf+="MALLOC=libc" + fi + + if use ssl; then + myconf+=" BUILD_TLS=yes" + fi + + export USE_SYSTEMD=$(usex systemd) + + tc-export AR CC RANLIB + emake V=1 ${myconf} AR="${AR}" CC="${CC}" RANLIB="${RANLIB}" +} + +src_test() { + local runtestargs=( + --clients "$(makeopts_jobs)" # see bug #649868 + ) + + if has usersandbox ${FEATURES} || ! has userpriv ${FEATURES}; then + ewarn "unit/oom-score-adj test will be skipped." \ + "It is known to fail with FEATURES usersandbox or -userpriv. See bug #756382." + + # unit/oom-score-adj was introduced in version 6.2.0 + runtestargs+=( --skipunit unit/oom-score-adj ) # see bug #756382 + fi + + if use ssl; then + edo ./utils/gen-test-certs.sh + runtestargs+=( --tls ) + fi + + edo ./runtest "${runtestargs[@]}" +} + +src_install() { + insinto /etc/redis + doins redis.conf sentinel.conf + use prefix || fowners -R redis:redis /etc/redis /etc/redis/{redis,sentinel}.conf + fperms 0750 /etc/redis + fperms 0644 /etc/redis/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd-r2" redis + newinitd "${FILESDIR}/redis.initd-6" redis + + systemd_newunit "${FILESDIR}/redis.service-4" redis.service + newtmpfiles "${FILESDIR}/redis.tmpfiles-2" redis.conf + + newconfd "${FILESDIR}/redis-sentinel.confd-r1" redis-sentinel + newinitd "${FILESDIR}/redis-sentinel.initd-r1" redis-sentinel + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md + + dobin src/redis-cli + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb + fperms 0750 /usr/sbin/redis-benchmark + dosym redis-server /usr/sbin/redis-sentinel + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir /var/{log,lib}/redis +} + +pkg_postinst() { + tmpfiles_process redis.conf + + ewarn "The default redis configuration file location changed to:" + ewarn " /etc/redis/{redis,sentinel}.conf" + ewarn "Please apply your changes to the new configuration files." +} diff --git a/dev-db/redis/redis-7.2.6.ebuild b/dev-db/redis/redis-7.2.6.ebuild new file mode 100644 index 000000000000..b82b9e409b2f --- /dev/null +++ b/dev-db/redis/redis-7.2.6.ebuild @@ -0,0 +1,197 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# N.B.: It is no clue in porting to Lua eclasses, as upstream have deviated +# too far from vanilla Lua, adding their own APIs like lua_enablereadonlytable + +inherit autotools edo multiprocessing systemd tmpfiles toolchain-funcs + +DESCRIPTION="A persistent caching system, key-value, and data structures database" +HOMEPAGE=" + https://redis.io + https://github.com/redis/redis +" +SRC_URI="https://download.redis.io/releases/${P}.tar.gz" + +LICENSE="BSD Boost-1.0" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="+jemalloc selinux ssl systemd tcmalloc test" +RESTRICT="!test? ( test )" + +DEPEND=" + jemalloc? ( >=dev-libs/jemalloc-5.1:= ) + ssl? ( dev-libs/openssl:0= ) + systemd? ( sys-apps/systemd:= ) + tcmalloc? ( dev-util/google-perftools ) +" + +RDEPEND=" + ${DEPEND} + acct-group/redis + acct-user/redis + selinux? ( sec-policy/selinux-redis ) +" + +BDEPEND=" + acct-group/redis + acct-user/redis + virtual/pkgconfig + test? ( + dev-lang/tcl:0= + ssl? ( dev-tcltk/tls ) + ) +" + +REQUIRED_USE="?? ( jemalloc tcmalloc )" + +PATCHES=( + "${FILESDIR}"/${PN}-6.2.1-config.patch + "${FILESDIR}"/${PN}-7.2.0-system-jemalloc.patch + "${FILESDIR}"/${PN}-6.2.3-ppc-atomic.patch + "${FILESDIR}"/${PN}-sentinel-7.2.0-config.patch + "${FILESDIR}"/${PN}-7.0.4-no-which.patch +) + +src_prepare() { + default + + # Respect user CFLAGS in bundled lua + sed -i '/LUA_CFLAGS/s: -O2::g' deps/Makefile || die + + # now we will rewrite present Makefiles + local makefiles="" MKF + local mysedconf=( + -e 's:$(CC):@CC@:g' + -e 's:$(CFLAGS):@AM_CFLAGS@:g' + -e 's: $(DEBUG)::g' + + -e 's:-Werror ::g' + -e 's:-Werror=deprecated-declarations ::g' + ) + for MKF in $(find -name 'Makefile' | cut -b 3-); do + mv "${MKF}" "${MKF}.in" + sed -i "${mysedconf[@]}" "${MKF}.in" || die "Sed failed for ${MKF}" + makefiles+=" ${MKF}" + done + # autodetection of compiler and settings; generates the modified Makefiles + cp "${FILESDIR}"/configure.ac-7.0 configure.ac || die + + sed -i \ + -e "/^AC_INIT/s|, __PV__, |, $PV, |" \ + -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + configure.ac || die "Sed failed for configure.ac" + eautoreconf +} + +src_configure() { + econf + + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 + # also, don't define ANSI/c99 for lua twice + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die +} + +src_compile() { + tc-export AR CC RANLIB + + local myconf=( + AR="${AR}" + CC="${CC}" + RANLIB="${RANLIB}" + + V=1 # verbose + + # OPTIMIZATION defaults to -O3. Let's respect user CFLAGS by setting it + # to empty value. + OPTIMIZATION='' + # Disable debug flags in bundled hiredis + DEBUG_FLAGS='' + + BUILD_TLS=$(usex ssl) + USE_SYSTEMD=$(usex systemd) + ) + + if use jemalloc; then + myconf+=( MALLOC=jemalloc ) + elif use tcmalloc; then + myconf+=( MALLOC=tcmalloc ) + else + myconf+=( MALLOC=libc ) + fi + + emake "${myconf[@]}" +} + +src_test() { + local runtestargs=( + --clients "$(makeopts_jobs)" # see bug #649868 + + --skiptest "Active defrag eval scripts" # see bug #851654 + ) + + if has usersandbox ${FEATURES} || ! has userpriv ${FEATURES}; then + ewarn "oom-score-adj related tests will be skipped." \ + "They are known to fail with FEATURES usersandbox or -userpriv. See bug #756382." + + runtestargs+=( + # unit/oom-score-adj was introduced in version 6.2.0 + --skipunit unit/oom-score-adj # see bug #756382 + + # Following test was added in version 7.0.0 to unit/introspection. + # It also tries to adjust OOM score. + --skiptest "CONFIG SET rollback on apply error" + ) + fi + + if use ssl; then + edo ./utils/gen-test-certs.sh + runtestargs+=( --tls ) + fi + + edo ./runtest "${runtestargs[@]}" +} + +src_install() { + insinto /etc/redis + doins redis.conf sentinel.conf + use prefix || fowners -R redis:redis /etc/redis /etc/redis/{redis,sentinel}.conf + fperms 0750 /etc/redis + fperms 0644 /etc/redis/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd-r2" redis + newinitd "${FILESDIR}/redis.initd-6" redis + + systemd_newunit "${FILESDIR}/redis.service-4" redis.service + newtmpfiles "${FILESDIR}/redis.tmpfiles-2" redis.conf + + newconfd "${FILESDIR}/redis-sentinel.confd-r1" redis-sentinel + newinitd "${FILESDIR}/redis-sentinel.initd-r1" redis-sentinel + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + dodoc 00-RELEASENOTES BUGS CONTRIBUTING.md MANIFESTO README.md + + dobin src/redis-cli + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb + fperms 0750 /usr/sbin/redis-benchmark + dosym redis-server /usr/sbin/redis-sentinel + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir /var/{log,lib}/redis +} + +pkg_postinst() { + tmpfiles_process redis.conf + + ewarn "The default redis configuration file location changed to:" + ewarn " /etc/redis/{redis,sentinel}.conf" + ewarn "Please apply your changes to the new configuration files." +} diff --git a/dev-db/redis/redis-7.4.1.ebuild b/dev-db/redis/redis-7.4.1.ebuild new file mode 100644 index 000000000000..8d583a5f437c --- /dev/null +++ b/dev-db/redis/redis-7.4.1.ebuild @@ -0,0 +1,193 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# N.B.: It is no clue in porting to Lua eclasses, as upstream have deviated +# too far from vanilla Lua, adding their own APIs like lua_enablereadonlytable + +inherit autotools edo multiprocessing systemd tmpfiles toolchain-funcs + +DESCRIPTION="A persistent caching system, key-value, and data structures database" +HOMEPAGE=" + https://redis.io + https://github.com/redis/redis +" +SRC_URI="https://download.redis.io/releases/${P}.tar.gz" + +LICENSE="Boost-1.0 SSPL-1" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="+jemalloc selinux ssl systemd tcmalloc test" +RESTRICT="!test? ( test )" + +DEPEND=" + jemalloc? ( >=dev-libs/jemalloc-5.1:=[stats] ) + ssl? ( dev-libs/openssl:0= ) + systemd? ( sys-apps/systemd:= ) + tcmalloc? ( dev-util/google-perftools ) +" + +RDEPEND=" + ${DEPEND} + acct-group/redis + acct-user/redis + selinux? ( sec-policy/selinux-redis ) +" + +BDEPEND=" + acct-group/redis + acct-user/redis + virtual/pkgconfig + test? ( + dev-lang/tcl:0= + ssl? ( dev-tcltk/tls ) + ) +" + +REQUIRED_USE="?? ( jemalloc tcmalloc )" + +PATCHES=( + "${FILESDIR}"/${PN}-6.2.1-config.patch + "${FILESDIR}"/${PN}-7.2.0-system-jemalloc.patch + "${FILESDIR}"/${PN}-6.2.3-ppc-atomic.patch + "${FILESDIR}"/${PN}-sentinel-7.2.0-config.patch + "${FILESDIR}"/${PN}-7.0.4-no-which.patch +) + +src_prepare() { + default + + # Respect user CFLAGS in bundled lua + sed -i '/LUA_CFLAGS/s: -O2::g' deps/Makefile || die + + # now we will rewrite present Makefiles + local makefiles="" MKF + local mysedconf=( + -e 's:$(CC):@CC@:g' + -e 's:$(CFLAGS):@AM_CFLAGS@:g' + -e 's: $(DEBUG)::g' + + -e 's:-Werror ::g' + -e 's:-Werror=deprecated-declarations ::g' + ) + for MKF in $(find -name 'Makefile' | cut -b 3-); do + mv "${MKF}" "${MKF}.in" + sed -i "${mysedconf[@]}" "${MKF}.in" || die "Sed failed for ${MKF}" + makefiles+=" ${MKF}" + done + # autodetection of compiler and settings; generates the modified Makefiles + cp "${FILESDIR}"/configure.ac-7.0 configure.ac || die + + sed -i \ + -e "/^AC_INIT/s|, __PV__, |, $PV, |" \ + -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + configure.ac || die "Sed failed for configure.ac" + eautoreconf +} + +src_configure() { + econf + + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 + # also, don't define ANSI/c99 for lua twice + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die +} + +src_compile() { + tc-export AR CC RANLIB + + local myconf=( + AR="${AR}" + CC="${CC}" + RANLIB="${RANLIB}" + + V=1 # verbose + + # OPTIMIZATION defaults to -O3. Let's respect user CFLAGS by setting it + # to empty value. + OPTIMIZATION='' + # Disable debug flags in bundled hiredis + DEBUG_FLAGS='' + + BUILD_TLS=$(usex ssl) + USE_SYSTEMD=$(usex systemd) + ) + + if use jemalloc; then + myconf+=( MALLOC=jemalloc ) + elif use tcmalloc; then + myconf+=( MALLOC=tcmalloc ) + else + myconf+=( MALLOC=libc ) + fi + + emake "${myconf[@]}" +} + +src_test() { + local runtestargs=( + --clients "$(makeopts_jobs)" # see bug #649868 + + --skiptest "Active defrag eval scripts" # see bug #851654 + ) + + if has usersandbox ${FEATURES} || ! has userpriv ${FEATURES}; then + ewarn "oom-score-adj related tests will be skipped." \ + "They are known to fail with FEATURES usersandbox or -userpriv. See bug #756382." + + runtestargs+=( + # unit/oom-score-adj was introduced in version 6.2.0 + --skipunit unit/oom-score-adj # see bug #756382 + + # Following test was added in version 7.0.0 to unit/introspection. + # It also tries to adjust OOM score. + --skiptest "CONFIG SET rollback on apply error" + ) + fi + + if use ssl; then + edo ./utils/gen-test-certs.sh + runtestargs+=( --tls ) + fi + + edo ./runtest "${runtestargs[@]}" +} + +src_install() { + insinto /etc/redis + doins redis.conf sentinel.conf + use prefix || fowners -R redis:redis /etc/redis /etc/redis/{redis,sentinel}.conf + fperms 0750 /etc/redis + fperms 0644 /etc/redis/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd-r2" redis + newinitd "${FILESDIR}/redis.initd-6" redis + + systemd_newunit "${FILESDIR}/redis.service-4" redis.service + newtmpfiles "${FILESDIR}/redis.tmpfiles-2" redis.conf + + newconfd "${FILESDIR}/redis-sentinel.confd-r1" redis-sentinel + newinitd "${FILESDIR}/redis-sentinel.initd-r1" redis-sentinel + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + dodoc 00-RELEASENOTES BUGS CONTRIBUTING.md MANIFESTO README.md + + dobin src/redis-cli + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb + fperms 0750 /usr/sbin/redis-benchmark + dosym redis-server /usr/sbin/redis-sentinel + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir /var/{log,lib}/redis +} + +pkg_postinst() { + tmpfiles_process redis.conf +} -- cgit v1.2.3