public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Austin English" <wizardedit@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/redis/, dev-db/redis/files/
Date: Mon, 10 Apr 2017 17:29:00 +0000 (UTC)	[thread overview]
Message-ID: <1491845310.6f9cc73493d498749aadc4322ba0a8accda697b8.wizardedit@gentoo> (raw)

commit:     6f9cc73493d498749aadc4322ba0a8accda697b8
Author:     Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 10 17:25:06 2017 +0000
Commit:     Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Mon Apr 10 17:28:30 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f9cc734

dev-db/redis: fix pid handling

Redis manages its own pid. Trying to force SSD to handle it leads to
conflicts, and rc-status reporting redis as crashed.

Gentoo-Bug: https://bugs.gentoo.org/613252

 dev-db/redis/files/redis.initd-4   |   3 +-
 dev-db/redis/redis-3.0.7-r1.ebuild | 115 ++++++++++++++++++++++++++++++++++
 dev-db/redis/redis-3.2.5-r2.ebuild | 122 +++++++++++++++++++++++++++++++++++++
 dev-db/redis/redis-3.2.6-r2.ebuild | 122 +++++++++++++++++++++++++++++++++++++
 4 files changed, 360 insertions(+), 2 deletions(-)

diff --git a/dev-db/redis/files/redis.initd-4 b/dev-db/redis/files/redis.initd-4
index ed3b71cc2cd..2ede7fa1d4d 100644
--- a/dev-db/redis/files/redis.initd-4
+++ b/dev-db/redis/files/redis.initd-4
@@ -9,8 +9,7 @@ REDIS_TIMEOUT=${REDIS_TIMEOUT:-30}
 
 command=/usr/sbin/redis-server
 pidfile=${REDIS_PID:-/run/redis/redis.pid}
-start_stop_daemon_args="--background --make-pidfile --pidfile ${pidfile}
-	--chdir \"${REDIS_DIR}\" --user ${REDIS_USER} --group ${REDIS_GROUP}"
+start_stop_daemon_args="--chdir \"${REDIS_DIR}\" --user ${REDIS_USER} --group ${REDIS_GROUP}"
 command_args="${REDIS_OPTS}"
 
 depend() {

diff --git a/dev-db/redis/redis-3.0.7-r1.ebuild b/dev-db/redis/redis-3.0.7-r1.ebuild
new file mode 100644
index 00000000000..0a9c1e216a3
--- /dev/null
+++ b/dev-db/redis/redis-3.0.7-r1.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+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 hppa ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc test"
+SLOT="0"
+
+RDEPEND=">=dev-lang/lua-5.1:*
+	tcmalloc? ( dev-util/google-perftools )
+	jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND="virtual/pkgconfig
+	>=sys-devel/autoconf-2.63
+	test? ( dev-lang/tcl:0= )
+	${RDEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+	enewgroup redis 75
+	enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+	epatch "${FILESDIR}"/${PN}-2.8.3-shared.patch
+	epatch "${FILESDIR}"/${PN}-2.8.17-config.patch
+	epatch "${FILESDIR}"/${PN}-3.0.0-sharedlua.patch
+
+	# 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=""
+	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-2.2 configure.ac
+	sed -i	-e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+		configure.ac || die "Sed failed for configure.ac"
+	eautoconf
+}
+
+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 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" redis
+	newinitd "${FILESDIR}/redis.initd-4" redis
+
+	systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+	systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+	dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README
+
+	dobin src/redis-cli
+	dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump
+	fperms 0750 /usr/sbin/redis-benchmark
+	dosym /usr/sbin/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
+}

diff --git a/dev-db/redis/redis-3.2.5-r2.ebuild b/dev-db/redis/redis-3.2.5-r2.ebuild
new file mode 100644
index 00000000000..a637b9f2376
--- /dev/null
+++ b/dev-db/redis/redis-3.2.5-r2.ebuild
@@ -0,0 +1,122 @@
+# 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"
+
+RDEPEND="luajit? ( dev-lang/luajit:2 )
+	!luajit? ( dev-lang/lua:5.1 )
+	tcmalloc? ( dev-util/google-perftools )
+	jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND="virtual/pkgconfig
+	>=sys-devel/autoconf-2.63
+	test? ( dev-lang/tcl:0= )
+	${RDEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+	enewgroup redis 75
+	enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+	epatch \
+		"${FILESDIR}"/${PN}-3.2.5-shared.patch \
+		"${FILESDIR}"/${PN}-3.2.3-config.patch \
+		"${FILESDIR}"/${PN}-3.2.3-sharedlua.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=""
+	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
+	sed -i	\
+		-e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
+		-e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):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
+	# geohash-int can't be built with -std=c99 either
+	# also, don't define ANSI/c99 for lua twice
+	sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/geohash-int/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" redis
+	newinitd "${FILESDIR}/redis.initd-4" redis
+
+	systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+	systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+	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 /usr/sbin/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
+}

diff --git a/dev-db/redis/redis-3.2.6-r2.ebuild b/dev-db/redis/redis-3.2.6-r2.ebuild
new file mode 100644
index 00000000000..a637b9f2376
--- /dev/null
+++ b/dev-db/redis/redis-3.2.6-r2.ebuild
@@ -0,0 +1,122 @@
+# 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"
+
+RDEPEND="luajit? ( dev-lang/luajit:2 )
+	!luajit? ( dev-lang/lua:5.1 )
+	tcmalloc? ( dev-util/google-perftools )
+	jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND="virtual/pkgconfig
+	>=sys-devel/autoconf-2.63
+	test? ( dev-lang/tcl:0= )
+	${RDEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+	enewgroup redis 75
+	enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+	epatch \
+		"${FILESDIR}"/${PN}-3.2.5-shared.patch \
+		"${FILESDIR}"/${PN}-3.2.3-config.patch \
+		"${FILESDIR}"/${PN}-3.2.3-sharedlua.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=""
+	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
+	sed -i	\
+		-e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
+		-e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):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
+	# geohash-int can't be built with -std=c99 either
+	# also, don't define ANSI/c99 for lua twice
+	sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/geohash-int/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" redis
+	newinitd "${FILESDIR}/redis.initd-4" redis
+
+	systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+	systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+	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 /usr/sbin/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
+}


             reply	other threads:[~2017-04-10 17:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10 17:29 Austin English [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-10-08 23:24 [gentoo-commits] repo/gentoo:master commit in: dev-db/redis/, dev-db/redis/files/ Robin H. Johnson
2017-10-12 20:37 Robin H. Johnson
2018-08-15  3:09 Robin H. Johnson
2018-10-26 13:18 Thomas Deutschmann
2019-04-18  5:11 Robin H. Johnson
2021-02-04 22:27 Thomas Deutschmann
2021-03-04  4:19 Sam James
2022-04-28  2:18 Sam James
2022-04-28  2:38 Sam James
2022-06-01  2:08 Sam James
2022-07-02 14:55 Sam James
2022-09-25  1:21 Sam James
2023-08-17  6:22 Sam James
2024-01-10 12:28 Petr Vaněk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1491845310.6f9cc73493d498749aadc4322ba0a8accda697b8.wizardedit@gentoo \
    --to=wizardedit@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox