summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirkjan Ochtman <djc@gentoo.org>2012-12-26 11:15:46 +0000
committerDirkjan Ochtman <djc@gentoo.org>2012-12-26 11:15:46 +0000
commit2381aa605efcfe2147d5c23ae073320f81b469ff (patch)
tree5f863baa80cf35fdac17fd649c848e876367f272 /dev-db/redis
parentFix HOMEPAGE wrt #448582 by "Szymluk" (diff)
downloadgentoo-2-2381aa605efcfe2147d5c23ae073320f81b469ff.tar.gz
gentoo-2-2381aa605efcfe2147d5c23ae073320f81b469ff.tar.bz2
gentoo-2-2381aa605efcfe2147d5c23ae073320f81b469ff.zip
Version bump redis to 2.6.7 (bug 439354), fix up 2.4.18 patch name.
(Portage version: 2.1.11.27/cvs/Linux x86_64, signed Manifest commit with key 6B065BFB)
Diffstat (limited to 'dev-db/redis')
-rw-r--r--dev-db/redis/ChangeLog9
-rw-r--r--dev-db/redis/files/redis-2.6.7-config.patch69
-rw-r--r--dev-db/redis/files/redis-2.6.7-shared.patch36
-rw-r--r--dev-db/redis/redis-2.4.18.ebuild4
-rw-r--r--dev-db/redis/redis-2.6.7.ebuild92
5 files changed, 207 insertions, 3 deletions
diff --git a/dev-db/redis/ChangeLog b/dev-db/redis/ChangeLog
index eb69f36d3ba2..cb26c153a5b0 100644
--- a/dev-db/redis/ChangeLog
+++ b/dev-db/redis/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-db/redis
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v 1.54 2012/12/26 11:05:46 djc Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v 1.55 2012/12/26 11:15:46 djc Exp $
+
+*redis-2.6.7 (26 Dec 2012)
+
+ 26 Dec 2012; Dirkjan Ochtman <djc@gentoo.org> redis-2.4.18.ebuild,
+ +redis-2.6.7.ebuild, +files/redis-2.6.7-config.patch,
+ +files/redis-2.6.7-shared.patch:
+ Version bump to 2.6.7 (bug 439354), fix up 2.4.18 patch name.
*redis-2.4.18 (26 Dec 2012)
diff --git a/dev-db/redis/files/redis-2.6.7-config.patch b/dev-db/redis/files/redis-2.6.7-config.patch
new file mode 100644
index 000000000000..0aea1c760ef2
--- /dev/null
+++ b/dev-db/redis/files/redis-2.6.7-config.patch
@@ -0,0 +1,69 @@
+commit 7f05e59a052941fd070be1825d0623a054c66e2d
+Author: jbergstroem <bugs@bergstroem.nu>
+Date: Tue Oct 30 13:11:23 2012 +1100
+
+ Adapt config based on Gentoo defaults
+
+diff --git a/redis.conf b/redis.conf
+index 751a3eb..1a36b12 100644
+--- a/redis.conf
++++ b/redis.conf
+@@ -14,11 +14,11 @@
+
+ # By default Redis does not run as a daemon. Use 'yes' if you need it.
+ # Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
+-daemonize no
++daemonize yes
+
+ # When running daemonized, Redis writes a pid file in /var/run/redis.pid by
+ # default. You can specify a custom pid file location here.
+-pidfile /var/run/redis.pid
++pidfile /var/run/redis/redis.pid
+
+ # Accept connections on the specified port, default is 6379.
+ # If port 0 is specified Redis will not listen on a TCP socket.
+@@ -27,7 +27,7 @@ port 6379
+ # If you want you can bind a single interface, if the bind option is not
+ # specified all the interfaces will listen for incoming connections.
+ #
+-# bind 127.0.0.1
++bind 127.0.0.1
+
+ # Specify the path for the unix socket that will be used to listen for
+ # incoming connections. There is no default, so Redis will not listen
+@@ -50,7 +50,7 @@ loglevel notice
+ # Specify the log file name. Also 'stdout' can be used to force
+ # Redis to log on the standard output. Note that if you use standard
+ # output for logging but daemonize, logs will be sent to /dev/null
+-logfile stdout
++logfile /var/log/redis/redis.log
+
+ # To enable logging to the system logger, just set 'syslog-enabled' to yes,
+ # and optionally update the other syslog parameters to suit your needs.
+@@ -124,7 +124,7 @@ rdbcompression yes
+ rdbchecksum yes
+
+ # The filename where to dump the DB
+-dbfilename dump.rdb
++dbfilename /var/lib/redis/dump.rdb
+
+ # The working directory.
+ #
+@@ -134,7 +134,7 @@ dbfilename dump.rdb
+ # Also the Append Only File will be created inside this directory.
+ #
+ # Note that you must specify a directory here, not a file name.
+-dir ./
++dir /var/lib/redis/
+
+ ################################# REPLICATION #################################
+
+@@ -278,7 +278,7 @@ slave-priority 100
+ # limit for maxmemory so that there is some free RAM on the system for slave
+ # output buffers (but this is not needed if the policy is 'noeviction').
+ #
+-# maxmemory <bytes>
++maxmemory 67108864
+
+ # MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
+ # is reached? You can select among five behavior: \ No newline at end of file
diff --git a/dev-db/redis/files/redis-2.6.7-shared.patch b/dev-db/redis/files/redis-2.6.7-shared.patch
new file mode 100644
index 000000000000..992af6c490b6
--- /dev/null
+++ b/dev-db/redis/files/redis-2.6.7-shared.patch
@@ -0,0 +1,36 @@
+commit 6931bf1d81de597b3abc2a36adf081a24c114567
+Author: jbergstroem <bugs@bergstroem.nu>
+Date: Tue Oct 23 12:26:04 2012 +1100
+
+ Build against shared jemalloc
+
+diff --git a/src/Makefile b/src/Makefile
+index 358b4cb..41390f4 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -22,12 +22,7 @@ STD= -std=c99 -pedantic
+ WARN= -Wall
+ OPT= $(OPTIMIZATION)
+
+-# Default allocator
+-ifeq ($(uname_S),Linux)
+- MALLOC=jemalloc
+-else
+- MALLOC=libc
+-endif
++MALLOC?=jemalloc
+
+ # Backwards compatibility for selecting an allocator
+ ifeq ($(USE_TCMALLOC),yes)
+@@ -71,9 +66,8 @@ ifeq ($(MALLOC),tcmalloc_minimal)
+ endif
+
+ ifeq ($(MALLOC),jemalloc)
+- DEPENDENCY_TARGETS+= jemalloc
+- FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
+- FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a -ldl
++ FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
++ FINAL_LIBS+= -ljemalloc -ldl
+ endif
+
+ REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) \ No newline at end of file
diff --git a/dev-db/redis/redis-2.4.18.ebuild b/dev-db/redis/redis-2.4.18.ebuild
index e595a24eff30..9eaa21c972f2 100644
--- a/dev-db/redis/redis-2.4.18.ebuild
+++ b/dev-db/redis/redis-2.4.18.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/redis-2.4.18.ebuild,v 1.1 2012/12/26 11:05:46 djc Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/redis-2.4.18.ebuild,v 1.2 2012/12/26 11:15:46 djc Exp $
EAPI="4"
@@ -37,7 +37,7 @@ pkg_setup() {
}
src_prepare() {
- epatch "${FILESDIR}/${P}-shared.patch"
+ epatch "${FILESDIR}/redis-2.4.17-shared.patch"
epatch "${FILESDIR}/redis-2.4.4-tcmalloc.patch"
# now we will rewrite present Makefiles
diff --git a/dev-db/redis/redis-2.6.7.ebuild b/dev-db/redis/redis-2.6.7.ebuild
new file mode 100644
index 000000000000..7aea156cbdb6
--- /dev/null
+++ b/dev-db/redis/redis-2.6.7.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/redis-2.6.7.ebuild,v 1.1 2012/12/26 11:15:46 djc Exp $
+
+EAPI=4
+
+inherit autotools eutils flag-o-matic user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database."
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://redis.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~x86 ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc test"
+SLOT="0"
+
+RDEPEND="tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND=">=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl )
+ ${RDEPEND}"
+REQUIRED_USE="tcmalloc? ( !jemalloc )
+ jemalloc? ( !tcmalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}"-{shared,config}.patch
+ # 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_compile() {
+ 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}
+}
+
+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" redis
+
+ nonfatal 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
+}