From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B7BF1139083 for ; Tue, 19 Dec 2017 10:13:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D3AD7E1076; Tue, 19 Dec 2017 10:13:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A2591E1076 for ; Tue, 19 Dec 2017 10:13:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A5A3533BF55 for ; Tue, 19 Dec 2017 10:13:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 38D759C2F for ; Tue, 19 Dec 2017 10:13:41 +0000 (UTC) From: "Patrice Clement" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrice Clement" Message-ID: <1513678409.8f4e968d986f3d551178ca19d78a42c579afceb0.monsieurp@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/redis/files/, dev-db/redis/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-db/redis/Manifest dev-db/redis/files/redis-sentinel-4.0.6-config.patch dev-db/redis/files/redis-sentinel.confd dev-db/redis/files/redis-sentinel.initd dev-db/redis/files/redis.logrotate dev-db/redis/redis-4.0.6.ebuild X-VCS-Directories: dev-db/redis/files/ dev-db/redis/ X-VCS-Committer: monsieurp X-VCS-Committer-Name: Patrice Clement X-VCS-Revision: 8f4e968d986f3d551178ca19d78a42c579afceb0 X-VCS-Branch: master Date: Tue, 19 Dec 2017 10:13:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 6706edb0-6197-4da0-ae7e-95bedfc3f571 X-Archives-Hash: 18f3523af69c57b92e97c79bba8f4c42 commit: 8f4e968d986f3d551178ca19d78a42c579afceb0 Author: Tomas Mozes gmail com> AuthorDate: Fri Dec 8 08:26:50 2017 +0000 Commit: Patrice Clement gentoo org> CommitDate: Tue Dec 19 10:13:29 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f4e968d dev-db/redis: version bump to 4.0.6. Closes: https://bugs.gentoo.org/574856 Closes: https://bugs.gentoo.org/599974 Closes: https://bugs.gentoo.org/639924 Closes: https://github.com/gentoo/gentoo/pull/6480 Package-Manager: Portage-2.3.16, Repoman-2.3.6 dev-db/redis/Manifest | 1 + .../redis/files/redis-sentinel-4.0.6-config.patch | 9 ++ dev-db/redis/files/redis-sentinel.confd | 16 +++ dev-db/redis/files/redis-sentinel.initd | 22 ++++ dev-db/redis/files/redis.logrotate | 6 + dev-db/redis/redis-4.0.6.ebuild | 141 +++++++++++++++++++++ 6 files changed, 195 insertions(+) diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest index eeb83e7ebb0..46426aee5f1 100644 --- a/dev-db/redis/Manifest +++ b/dev-db/redis/Manifest @@ -3,3 +3,4 @@ DIST redis-3.2.5.tar.gz 1544040 BLAKE2B a67b46feacddcc7e4cafd91fb5d295a972f3a09d DIST redis-3.2.8.tar.gz 1547237 BLAKE2B fb03e263ad7b135dff38e018d9b830c4992cf331efc7c23c10b087c47e597abedb52f259d4dd9a9ee1d661685157fc29a2022d74bc21d406bb10c9b7dfab8b7e SHA512 7334faf73af3644f7f9dcaddd322955d5df1e88a1640b509ae623f322615a20f6dc143eb57dd89ff3a278557df309ac4215c3fb458235682ce28e16c817068ba DIST redis-4.0.1.tar.gz 1711660 BLAKE2B 0b8881baa78908df4adcc1aabfa0ea9554900f8b54d204ffa054752ba4355da2b56408501ede81a69cc1f34ebbb9fc984335738ea9f343ddcd4e9fb9a0d64c8e SHA512 62dec537aebd12340b9642f5f8b07fd98757c9e648dcd539a0411f207db3495923c5a6a9941036c56b2d574ee38b46d08558668111e322345ef549f93fada26f DIST redis-4.0.2.tar.gz 1713990 BLAKE2B 307ab76b336f7520e14a23a1577c46e1b63cc5a5a5b6afb725cb87934fbcb62107085671fd1072d1142ce8e92f069e6b6064c9f4468335bc6997897c8f494471 SHA512 1458909c6fc16cff8ca5e6dddff23b988ee1e447f2d0bccf5941553b22bab6abb851732b3fe53dafb8a69d6c0939c3ce7e0686d51e03be720fb018c038d3b1b4 +DIST redis-4.0.6.tar.gz 1723533 BLAKE2B 94c2a9b7eeaa676efaac75cd5c143b0f4b02440b5a21ecc9b2a68cc27ad4abc1fc4d7dbc903dea5d956ce737ca434ea5b5bdde4a35df3a3689da60c5fb0bddf1 SHA512 784aad612664df666c36f969cb6a9ab794f004abcf9aa761bd1f5f0f8fdb248d5b38f48a59b68c2de7d2a344755f1537efc9d5847de0d662302699ed94d40813 diff --git a/dev-db/redis/files/redis-sentinel-4.0.6-config.patch b/dev-db/redis/files/redis-sentinel-4.0.6-config.patch new file mode 100644 index 00000000000..f2a75814951 --- /dev/null +++ b/dev-db/redis/files/redis-sentinel-4.0.6-config.patch @@ -0,0 +1,9 @@ +diff --git a/sentinel.conf b/sentinel.conf +index 0e1b266..869a4b9 100644 +--- a/sentinel.conf ++++ b/sentinel.conf +@@ -194,3 +194,4 @@ sentinel failover-timeout mymaster 180000 + # + # sentinel client-reconfig-script mymaster /var/redis/reconfig.sh + ++logfile "/var/log/redis/sentinel.log" diff --git a/dev-db/redis/files/redis-sentinel.confd b/dev-db/redis/files/redis-sentinel.confd new file mode 100644 index 00000000000..f465a5c3e91 --- /dev/null +++ b/dev-db/redis/files/redis-sentinel.confd @@ -0,0 +1,16 @@ +# Redis-sentinel user. +REDIS_SENTINEL_USER="redis" + +# Redis-sentinel group. +REDIS_SENTINEL_GROUP="redis" + +# Redis-sentinel configuration file. +REDIS_SENTINEL_CONF="/etc/sentinel.conf" + +# Redis-sentinel working directory. +REDIS_SENTINEL_DIR="/tmp" + +# Specify the network service that corresponds to the "bind" setting +# in your sentinel.conf. For example, if you bind to 127.0.0.1, this should +# be set to "net.lo" which provides the loopback interface. +rc_need="net.lo" diff --git a/dev-db/redis/files/redis-sentinel.initd b/dev-db/redis/files/redis-sentinel.initd new file mode 100644 index 00000000000..6a22d08db69 --- /dev/null +++ b/dev-db/redis/files/redis-sentinel.initd @@ -0,0 +1,22 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +: ${REDIS_SENTINEL_DIR:=/tmp} +: ${REDIS_SENTINEL_CONF:=/etc/sentinel.conf} +: ${REDIS_SENTINEL_USER:=redis} +: ${REDIS_SENTINEL_GROUP:=redis} +: ${REDIS_SENTINEL_TIMEOUT:=30} + +command="/usr/sbin/redis-sentinel" +command_args="${REDIS_SENTINEL_CONF}" +command_background="true" +command_user="${REDIS_SENTINEL_USER}:${REDIS_SENTINEL_GROUP}" +pidfile="/run/${RC_SVCNAME}.pid" +retry="${REDIS_SENTINEL_TIMEOUT}" +start_stop_daemon_args="--chdir \"${REDIS_SENTINEL_DIR}\"" + +depend() { + use localmount logger + after keepalived redis +} diff --git a/dev-db/redis/files/redis.logrotate b/dev-db/redis/files/redis.logrotate new file mode 100644 index 00000000000..2df390c2d1b --- /dev/null +++ b/dev-db/redis/files/redis.logrotate @@ -0,0 +1,6 @@ +/var/log/redis/redis.log /var/log/redis/sentinel.log { + compress + delaycompress + notifempty + missingok +} diff --git a/dev-db/redis/redis-4.0.6.ebuild b/dev-db/redis/redis-4.0.6.ebuild new file mode 100644 index 00000000000..92f1b4d63f3 --- /dev/null +++ b/dev-db/redis/redis-4.0.6.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools eutils flag-o-matic systemd toolchain-funcs user + +DESCRIPTION="A persistent caching system, key-value and data structures database" +HOMEPAGE="http://redis.io/" +SRC_URI="http://download.redis.io/releases/${P}.tar.gz" + +LICENSE="BSD" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris" +IUSE="+jemalloc tcmalloc luajit test" +SLOT="0" + +# Redis does NOT build with Lua 5.2 or newer at this time. +# This should link correctly with both unslotted & slotted Lua, without +# changes. +RDEPEND=" + luajit? ( dev-lang/luajit:2 ) + !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) + tcmalloc? ( dev-util/google-perftools ) + jemalloc? ( >=dev-libs/jemalloc-3.2 )" + +DEPEND=" + ${RDEPEND} + virtual/pkgconfig + >=sys-devel/autoconf-2.63 + test? ( dev-lang/tcl:0= )" + +REQUIRED_USE="?? ( tcmalloc jemalloc )" + +S="${WORKDIR}/${PN}-${PV/_/-}" + +pkg_setup() { + enewgroup redis 75 + enewuser redis 75 -1 /var/lib/redis redis +} + +src_prepare() { + eapply \ + "${FILESDIR}"/${PN}-3.2.3-config.patch \ + "${FILESDIR}"/${PN}-4.0.1-shared.patch \ + "${FILESDIR}"/${PN}-4.0.1-sharedlua.patch \ + "${FILESDIR}"/${PN}-sentinel-4.0.6-config.patch + eapply_user + + # 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 + has_version 'dev-lang/lua:5.1' \ + && LUAPKGCONFIG=lua5.1 \ + || LUAPKGCONFIG=lua + 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,${LUAPKGCONFIG},g" \ + configure.ac || die "Sed failed for configure.ac" + eautoreconf +} + +src_configure() { + econf \ + $(use_with 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() { + tc-export CC AR RANLIB + + local myconf="" + + if use tcmalloc; then + myconf="${myconf} USE_TCMALLOC=yes" + elif use jemalloc; then + myconf="${myconf} JEMALLOC_SHARED=yes" + else + myconf="${myconf} MALLOC=yes" + fi + + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}" +} + +src_install() { + insinto /etc/ + doins redis.conf sentinel.conf + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf + fperms 0644 /etc/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd-r1" redis + newinitd "${FILESDIR}/redis.initd-5" redis + + systemd_newunit "${FILESDIR}/redis.service-2" redis.service + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf + + newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel + newinitd "${FILESDIR}/redis-sentinel.initd" 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 +}