summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-db/redis/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-db/redis/files')
-rw-r--r--dev-db/redis/files/configure.ac-2.258
-rw-r--r--dev-db/redis/files/redis-2.4.17-shared.patch22
-rw-r--r--dev-db/redis/files/redis-2.4.3-shared.patch22
-rw-r--r--dev-db/redis/files/redis-2.4.4-tcmalloc.patch21
-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/files/redis-2.6.9-tclsh86.patch57
-rw-r--r--dev-db/redis/files/redis-2.8.13-sharedlua.patch44
-rw-r--r--dev-db/redis/files/redis-2.8.17-config.patch46
-rw-r--r--dev-db/redis/files/redis-2.8.19-sharedlua.patch44
-rw-r--r--dev-db/redis/files/redis-2.8.3-config.patch59
-rw-r--r--dev-db/redis/files/redis-2.8.3-shared.patch36
-rw-r--r--dev-db/redis/files/redis-3.0.0-sharedlua.patch44
-rw-r--r--dev-db/redis/files/redis.confd20
-rw-r--r--dev-db/redis/files/redis.initd41
-rw-r--r--dev-db/redis/files/redis.initd-223
-rw-r--r--dev-db/redis/files/redis.initd-332
-rw-r--r--dev-db/redis/files/redis.initd-433
-rw-r--r--dev-db/redis/files/redis.service14
-rw-r--r--dev-db/redis/files/redis.service-214
-rw-r--r--dev-db/redis/files/redis.tmpfiles2
21 files changed, 737 insertions, 0 deletions
diff --git a/dev-db/redis/files/configure.ac-2.2 b/dev-db/redis/files/configure.ac-2.2
new file mode 100644
index 000000000000..3ff6650407ca
--- /dev/null
+++ b/dev-db/redis/files/configure.ac-2.2
@@ -0,0 +1,58 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.63)
+AC_INIT(redis, 2.0.0, antirez@gmail.com)
+AM_CFLAGS="-std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6"
+if test x"$CFLAGS" = x""; then
+ AM_CFLAGS="$AM_CFLAGS -O2"
+else
+ AM_CFLAGS="$AM_CFLAGS $CFLAGS"
+fi
+
+# options
+AC_MSG_CHECKING([whether to build with debug information])
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug],
+ [enable debug data generation (def=no)])],
+ [debugit="$enableval"],
+ [debugit=no])
+AC_MSG_RESULT([$debugit])
+
+if test x"$debugit" = x"yes"; then
+ AC_DEFINE([DEBUG],[],[Debug Mode])
+ AM_CFLAGS="$AM_CFLAGS -g -rdynamic -ggdb"
+else
+ AC_DEFINE([NDEBUG],[],[No-debug Mode])
+fi
+AC_SUBST([AM_CFLAGS])
+
+# Checks for programs.
+AC_PROG_CC
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_INLINE
+AC_TYPE_INT16_T
+AC_TYPE_INT32_T
+AC_TYPE_OFF_T
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+
+# Checks for library functions.
+AC_FUNC_ERROR_AT_LINE
+AC_FUNC_FORK
+AC_FUNC_STRCOLL
+AC_FUNC_STRTOD
+AC_CHECK_FUNCS([dup2 gethostbyname gettimeofday inet_ntoa memchr memmove memset select socket strcasecmp strchr strerror strstr strtol])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/dev-db/redis/files/redis-2.4.17-shared.patch b/dev-db/redis/files/redis-2.4.17-shared.patch
new file mode 100644
index 000000000000..9c607145d38f
--- /dev/null
+++ b/dev-db/redis/files/redis-2.4.17-shared.patch
@@ -0,0 +1,22 @@
+See https://github.com/antirez/redis/pull/137
+
+--- src/Makefile 2011-10-17 10:46:00.000000000 +0200
++++ src/Makefile.2 2011-10-17 13:47:53.000000000 +0200
+@@ -49,7 +49,16 @@
+ ifeq ($(USE_JEMALLOC),yes)
+ ALLOC_DEP=../deps/jemalloc/lib/libjemalloc.a
+ ALLOC_LINK=$(ALLOC_DEP) -ldl
+- ALLOC_FLAGS=-DUSE_JEMALLOC -I../deps/jemalloc/include
++ ALLOC_FLAGS=-DUSE_JEMALLOC
++ ifdef JEMALLOC_SHARED
++ ALLOC_DEP=
++ ALLOC_LINK=-ljemalloc
++ ALLOC_FLAGS=-DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE -I/usr/include
++ else
++ ALLOC_DEP=../deps/jemalloc/lib/libjemalloc.a
++ ALLOC_LINK=$(ALLOC_DEP) -ldl
++ ALLOC_FLAGS=-DUSE_JEMALLOC -I../deps/jemalloc/include
++ endif
+ endif
+
+ CCOPT= $(CFLAGS) $(ARCH) $(PROF) \ No newline at end of file
diff --git a/dev-db/redis/files/redis-2.4.3-shared.patch b/dev-db/redis/files/redis-2.4.3-shared.patch
new file mode 100644
index 000000000000..20cdebe41b47
--- /dev/null
+++ b/dev-db/redis/files/redis-2.4.3-shared.patch
@@ -0,0 +1,22 @@
+See https://github.com/antirez/redis/pull/137
+
+--- src/Makefile 2011-10-17 10:46:00.000000000 +0200
++++ src/Makefile.2 2011-10-17 13:47:53.000000000 +0200
+@@ -49,7 +49,16 @@
+ ifeq ($(USE_JEMALLOC),yes)
+ ALLOC_DEP=../deps/jemalloc/lib/libjemalloc.a
+ ALLOC_LINK=$(ALLOC_DEP) -ldl
+- ALLOC_FLAGS=-DUSE_JEMALLOC -I../deps/jemalloc/include
++ ALLOC_FLAGS=-DUSE_JEMALLOC
++ ifdef JEMALLOC_SHARED
++ ALLOC_DEP=
++ ALLOC_LINK=-ljemalloc
++ ALLOC_FLAGS=-DUSE_JEMALLOC -I/usr/include
++ else
++ ALLOC_DEP=../deps/jemalloc/lib/libjemalloc.a
++ ALLOC_LINK=$(ALLOC_DEP) -ldl
++ ALLOC_FLAGS=-DUSE_JEMALLOC -I../deps/jemalloc/include
++ endif
+ endif
+
+ CCOPT= $(CFLAGS) $(ARCH) $(PROF)
diff --git a/dev-db/redis/files/redis-2.4.4-tcmalloc.patch b/dev-db/redis/files/redis-2.4.4-tcmalloc.patch
new file mode 100644
index 000000000000..964ce71d5f78
--- /dev/null
+++ b/dev-db/redis/files/redis-2.4.4-tcmalloc.patch
@@ -0,0 +1,21 @@
+https://github.com/antirez/redis/pull/218
+
+diff --git a/src/Makefile b/src/Makefile
+index 72edcad..3e43990 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -35,12 +35,14 @@ else
+ endif
+
+ ifeq ($(USE_TCMALLOC),yes)
++ USE_JEMALLOC=no
+ ALLOC_DEP=
+ ALLOC_LINK=-ltcmalloc
+ ALLOC_FLAGS=-DUSE_TCMALLOC
+ endif
+
+ ifeq ($(USE_TCMALLOC_MINIMAL),yes)
++ USE_JEMALLOC=no
+ ALLOC_DEP=
+ ALLOC_LINK=-ltcmalloc_minimal
+ ALLOC_FLAGS=-DUSE_TCMALLOC \ No newline at end of file
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/files/redis-2.6.9-tclsh86.patch b/dev-db/redis/files/redis-2.6.9-tclsh86.patch
new file mode 100644
index 000000000000..00d81dfafcc7
--- /dev/null
+++ b/dev-db/redis/files/redis-2.6.9-tclsh86.patch
@@ -0,0 +1,57 @@
+diff --git a/runtest b/runtest
+index 0eb384c..fadc283 100755
+--- a/runtest
++++ b/runtest
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+-TCL=tclsh8.5
++TCL=tclsh
+ which $TCL
+ if [ "$?" != "0" ]
+ then
+diff --git a/tests/integration/replication-4.tcl b/tests/integration/replication-4.tcl
+index 69fcab3..58a70fa 100644
+--- a/tests/integration/replication-4.tcl
++++ b/tests/integration/replication-4.tcl
+@@ -1,5 +1,5 @@
+ proc start_bg_complex_data {host port db ops} {
+- exec tclsh8.5 tests/helpers/bg_complex_data.tcl $host $port $db $ops &
++ exec tclsh tests/helpers/bg_complex_data.tcl $host $port $db $ops &
+ }
+
+ proc stop_bg_complex_data {handle} {
+diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl
+index da94b08..30baf6a 100644
+--- a/tests/integration/replication.tcl
++++ b/tests/integration/replication.tcl
+@@ -78,7 +78,7 @@ start_server {tags {"repl"}} {
+ }
+
+ proc start_write_load {host port seconds} {
+- exec tclsh8.5 tests/helpers/gen_write_load.tcl $host $port $seconds &
++ exec tclsh tests/helpers/gen_write_load.tcl $host $port $seconds &
+ }
+
+ proc stop_write_load {handle} {
+diff --git a/tests/test_helper.tcl b/tests/test_helper.tcl
+index b2e58b4..253e955 100644
+--- a/tests/test_helper.tcl
++++ b/tests/test_helper.tcl
+@@ -2,6 +2,8 @@
+ # This softare is released under the BSD License. See the COPYING file for
+ # more information.
+
++package require Tcl 8.5
++
+ set tcl_precision 17
+ source tests/support/redis.tcl
+ source tests/support/server.tcl
+@@ -189,7 +191,7 @@ proc test_server_main {} {
+ set start_port [expr {$::port+100}]
+ for {set j 0} {$j < $::numclients} {incr j} {
+ set start_port [find_available_port $start_port]
+- set p [exec tclsh8.5 [info script] {*}$::argv \
++ set p [exec tclsh [info script] {*}$::argv \
+ --client $port --port $start_port &]
+ lappend ::clients_pids $p
+ incr start_port 10 \ No newline at end of file
diff --git a/dev-db/redis/files/redis-2.8.13-sharedlua.patch b/dev-db/redis/files/redis-2.8.13-sharedlua.patch
new file mode 100644
index 000000000000..e13c62f07a11
--- /dev/null
+++ b/dev-db/redis/files/redis-2.8.13-sharedlua.patch
@@ -0,0 +1,44 @@
+commit de0d4973ddb629dcc80f0724769a0e997fe644ba
+Author: Johan Bergström <bugs@bergstroem.nu>
+Date: Wed Jul 16 09:47:44 2014 +1000
+
+ Use a shared lua
+
+diff --git src/Makefile src/Makefile
+index 134694c..a09832e 100644
+--- src/Makefile
++++ src/Makefile
+@@ -15,7 +15,7 @@
+ release_hdr := $(shell sh -c './mkreleasehdr.sh')
+ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+ OPTIMIZATION?=-O2
+-DEPENDENCY_TARGETS=hiredis linenoise lua
++DEPENDENCY_TARGETS=hiredis linenoise
+
+ # Default settings
+ STD=-std=c99 -pedantic
+@@ -52,6 +52,7 @@ endif
+ FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
+ FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
+ FINAL_LIBS=-lm
++FINAL_LIBS+=$(shell pkg-config --libs lua)
+ DEBUG=-g -ggdb
+
+ ifeq ($(uname_S),SunOS)
+@@ -108,6 +109,7 @@ endif
+ REDIS_SERVER_NAME=redis-server
+ REDIS_SENTINEL_NAME=redis-sentinel
+ REDIS_SERVER_OBJ=adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o migrate.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o hyperloglog.o latency.o sparkline.o
++REDIS_SERVER_OBJ+=lua_cjson.o lua_cmsgpack.o lua_struct.o strbuf.o
+ REDIS_CLI_NAME=redis-cli
+ REDIS_CLI_OBJ=anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o
+ REDIS_BENCHMARK_NAME=redis-benchmark
+@@ -162,7 +164,7 @@ endif
+
+ # redis-server
+ $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
+- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS)
++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS)
+
+ # redis-sentinel
+ $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
diff --git a/dev-db/redis/files/redis-2.8.17-config.patch b/dev-db/redis/files/redis-2.8.17-config.patch
new file mode 100644
index 000000000000..c9f6b2af172b
--- /dev/null
+++ b/dev-db/redis/files/redis-2.8.17-config.patch
@@ -0,0 +1,46 @@
+--- a/redis.conf 2014-12-02 16:22:38.722433643 +0100
++++ b/redis.conf 2014-12-02 16:22:16.252249350 +0100
+@@ -38,7 +38,7 @@
+
+ # 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 /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.
+@@ -61,7 +61,7 @@
+ # Examples:
+ #
+ # bind 192.168.1.100 10.0.0.1
+-# 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
+@@ -100,7 +100,7 @@
+ # Specify the log file name. Also the empty string 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 ""
++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.
+@@ -184,7 +184,7 @@
+ # The Append Only File will also be created inside this directory.
+ #
+ # Note that you must specify a directory here, not a file name.
+-dir ./
++dir /var/lib/redis/
+
+ ################################# REPLICATION #################################
+
+@@ -403,6 +403,7 @@
+ # 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 behaviors:
diff --git a/dev-db/redis/files/redis-2.8.19-sharedlua.patch b/dev-db/redis/files/redis-2.8.19-sharedlua.patch
new file mode 100644
index 000000000000..2e45cf2b31fa
--- /dev/null
+++ b/dev-db/redis/files/redis-2.8.19-sharedlua.patch
@@ -0,0 +1,44 @@
+commit de0d4973ddb629dcc80f0724769a0e997fe644ba
+Author: Johan Bergström <bugs@bergstroem.nu>
+Date: Wed Jul 16 09:47:44 2014 +1000
+
+ Use a shared lua
+
+diff --git src/Makefile src/Makefile
+index 134694c..a09832e 100644
+--- src/Makefile
++++ src/Makefile
+@@ -15,7 +15,7 @@
+ release_hdr := $(shell sh -c './mkreleasehdr.sh')
+ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+ OPTIMIZATION?=-O2
+-DEPENDENCY_TARGETS=hiredis linenoise lua
++DEPENDENCY_TARGETS=hiredis linenoise
+
+ # Default settings
+ STD=-std=c99 -pedantic
+@@ -52,6 +52,7 @@ endif
+ FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
+ FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
+ FINAL_LIBS=-lm
++FINAL_LIBS+=$(shell pkg-config --libs lua)
+ DEBUG=-g -ggdb
+
+ ifeq ($(uname_S),SunOS)
+@@ -108,6 +109,7 @@ endif
+ REDIS_SERVER_NAME=redis-server
+ REDIS_SENTINEL_NAME=redis-sentinel
+ REDIS_SERVER_OBJ=adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o migrate.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o hyperloglog.o latency.o sparkline.o
++REDIS_SERVER_OBJ+=fpconv.o strbuf.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o
+ REDIS_CLI_NAME=redis-cli
+ REDIS_CLI_OBJ=anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o
+ REDIS_BENCHMARK_NAME=redis-benchmark
+@@ -162,7 +164,7 @@ endif
+
+ # redis-server
+ $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
+- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS)
++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS)
+
+ # redis-sentinel
+ $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
diff --git a/dev-db/redis/files/redis-2.8.3-config.patch b/dev-db/redis/files/redis-2.8.3-config.patch
new file mode 100644
index 000000000000..3f5d95b847ad
--- /dev/null
+++ b/dev-db/redis/files/redis-2.8.3-config.patch
@@ -0,0 +1,59 @@
+commit 66f26c12faaeb8ed85a715d2dfd6a41c978a4bd1
+Author: Johan Bergström <bugs@bergstroem.nu>
+Date: Mon Nov 25 09:23:10 2013 +1100
+
+ Modify config to gentoo defaults
+
+diff --git redis.conf redis.conf
+index 2e3239c..6c7ef4a 100644
+--- redis.conf
++++ 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 /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.
+@@ -32,7 +32,7 @@ port 6379
+ # Examples:
+ #
+ # bind 192.168.1.100 10.0.0.1
+-# 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
+@@ -71,7 +71,7 @@ loglevel notice
+ # Specify the log file name. Also the emptry string 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 ""
++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.
+@@ -155,7 +155,7 @@ dbfilename dump.rdb
+ # The Append Only File will also be created inside this directory.
+ #
+ # Note that you must specify a directory here, not a file name.
+-dir ./
++dir /var/lib/redis/
+
+ ################################# REPLICATION #################################
+
+@@ -365,6 +365,7 @@ slave-priority 100
+ # 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 behaviors:
diff --git a/dev-db/redis/files/redis-2.8.3-shared.patch b/dev-db/redis/files/redis-2.8.3-shared.patch
new file mode 100644
index 000000000000..d32484f0cd18
--- /dev/null
+++ b/dev-db/redis/files/redis-2.8.3-shared.patch
@@ -0,0 +1,36 @@
+commit 388a76f24c96767c831ee7682234fd9f2bc5b9ac
+Author: Johan Bergström <bugs@bergstroem.nu>
+Date: Mon Nov 25 09:17:14 2013 +1100
+
+ Use shared jemalloc
+
+diff --git src/Makefile src/Makefile
+index c37549d..77e6255 100644
+--- src/Makefile
++++ src/Makefile
+@@ -26,12 +26,7 @@ PREFIX?=/usr/local
+ INSTALL_BIN=$(PREFIX)/bin
+ INSTALL=install
+
+-# Default allocator
+-ifeq ($(uname_S),Linux)
+- MALLOC=jemalloc
+-else
+- MALLOC=libc
+-endif
++MALLOC?=jemalloc
+
+ # Backwards compatibility for selecting an allocator
+ ifeq ($(USE_TCMALLOC),yes)
+@@ -79,9 +74,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)
diff --git a/dev-db/redis/files/redis-3.0.0-sharedlua.patch b/dev-db/redis/files/redis-3.0.0-sharedlua.patch
new file mode 100644
index 000000000000..ba983efafc7c
--- /dev/null
+++ b/dev-db/redis/files/redis-3.0.0-sharedlua.patch
@@ -0,0 +1,44 @@
+commit fd0fc43f6e0ea45bce0e1a68c1f736e481fc4429
+Author: Johan Bergström <bugs@bergstroem.nu>
+Date: Thu Apr 2 14:33:51 2015 +1100
+
+ Use shared LUA
+
+diff --git src/Makefile src/Makefile
+index a88f1d2..f71e7b5 100644
+--- src/Makefile
++++ src/Makefile
+@@ -15,7 +15,7 @@
+ release_hdr := $(shell sh -c './mkreleasehdr.sh')
+ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+ OPTIMIZATION?=-O2
+-DEPENDENCY_TARGETS=hiredis linenoise lua
++DEPENDENCY_TARGETS=hiredis linenoise
+
+ # Default settings
+ STD=-std=c99 -pedantic
+@@ -47,6 +47,7 @@ endif
+ FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
+ FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
+ FINAL_LIBS=-lm
++FINAL_LIBS+=$(shell pkg-config --libs lua)
+ DEBUG=-g -ggdb
+
+ ifeq ($(uname_S),SunOS)
+@@ -108,6 +109,7 @@ endif
+ REDIS_SERVER_NAME=redis-server
+ REDIS_SENTINEL_NAME=redis-sentinel
+ REDIS_SERVER_OBJ=adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o
++REDIS_SERVER_OBJ+=fpconv.o strbuf.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o
+ REDIS_CLI_NAME=redis-cli
+ REDIS_CLI_OBJ=anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o
+ REDIS_BENCHMARK_NAME=redis-benchmark
+@@ -162,7 +164,7 @@ endif
+
+ # redis-server
+ $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
+- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS)
++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS)
+
+ # redis-sentinel
+ $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
diff --git a/dev-db/redis/files/redis.confd b/dev-db/redis/files/redis.confd
new file mode 100644
index 000000000000..07585fa7a116
--- /dev/null
+++ b/dev-db/redis/files/redis.confd
@@ -0,0 +1,20 @@
+# Redis user.
+REDIS_USER="redis"
+
+# Redis group.
+REDIS_GROUP="redis"
+
+# Redis configuration file.
+REDIS_CONF="/etc/redis.conf"
+
+# Redis dump directory.
+REDIS_DIR="/var/lib/redis"
+
+# Redis pid file.
+# (Be sure to change the main redis configuration file as well if you change
+# this from the default.)
+REDIS_PID="/var/run/redis/redis.pid"
+
+# Redis options.
+# (Redis expects the first argument to be the configuration file.)
+REDIS_OPTS="${REDIS_CONF}"
diff --git a/dev-db/redis/files/redis.initd b/dev-db/redis/files/redis.initd
new file mode 100644
index 000000000000..eca645edff94
--- /dev/null
+++ b/dev-db/redis/files/redis.initd
@@ -0,0 +1,41 @@
+#!/sbin/runscript
+# $Id$
+
+REDIS_EXEC=/usr/sbin/redis-server
+REDIS_PID=${REDIS_PID:-/var/run/redis/redis.pid}
+REDIS_DIR=${REDIS_DIR:-/var/lib/redis}
+REDIS_CONF=${REDIS_CONF:-/etc/redis.conf}
+REDIS_OPTS=${REDIS_OPTS:-"${REDIS_CONF}"}
+REDIS_USER=${REDIS_USER:-redis}
+REDIS_GROUP=${REDIS_GROUP:-redis}
+
+depend() {
+ use net localmount logger
+ after keepalived
+}
+
+start() {
+
+ local PID_DIR=$(dirname ${REDIS_PID})
+ mkdir -p ${PID_DIR}
+ chown ${REDIS_USER}:${REDIS_GROUP} ${PID_DIR}
+
+ ebegin "Starting Redis server"
+ start-stop-daemon --start \
+ --chdir "${REDIS_DIR}" \
+ --user ${REDIS_USER}:${REDIS_GROUP} \
+ --pidfile "${REDIS_PID}" \
+ --exec "${REDIS_EXEC}" \
+ -- ${REDIS_OPTS}
+ ret=$?
+ eend ${ret}
+
+}
+
+stop() {
+ ebegin "Stopping Redis server"
+ start-stop-daemon --stop --quiet --pidfile "${REDIS_PID}"
+ ret=$?
+ rm -f "${REDIS_PID}"
+ eend ${ret}
+}
diff --git a/dev-db/redis/files/redis.initd-2 b/dev-db/redis/files/redis.initd-2
new file mode 100644
index 000000000000..c910f53ed1a9
--- /dev/null
+++ b/dev-db/redis/files/redis.initd-2
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# $Id$
+
+REDIS_DIR=${REDIS_DIR:-/var/lib/redis}
+REDIS_CONF=${REDIS_CONF:-/etc/redis.conf}
+REDIS_OPTS=${REDIS_OPTS:-"${REDIS_CONF}"}
+REDIS_USER=${REDIS_USER:-redis}
+REDIS_GROUP=${REDIS_GROUP:-redis}
+
+command=/usr/sbin/redis-server
+start_stop_daemon_args="--chdir \"${REDIS_DIR}\"
+ --user ${REDIS_USER} --group ${REDIS_GROUP}"
+command_args="${REDIS_OPTS}"
+pidfile=${REDIS_PID:-/var/run/redis/redis.pid}
+
+depend() {
+ use net localmount logger
+ after keepalived
+}
+
+start_pre() {
+ checkpath -d -m 0775 -o ${REDIS_USER}:${REDIS_GROUP} $(dirname ${REDIS_PID})
+}
diff --git a/dev-db/redis/files/redis.initd-3 b/dev-db/redis/files/redis.initd-3
new file mode 100644
index 000000000000..56bb59376f78
--- /dev/null
+++ b/dev-db/redis/files/redis.initd-3
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# $Id$
+
+REDIS_DIR=${REDIS_DIR:-/var/lib/redis}
+REDIS_CONF=${REDIS_CONF:-/etc/redis.conf}
+REDIS_OPTS=${REDIS_OPTS:-"${REDIS_CONF}"}
+REDIS_USER=${REDIS_USER:-redis}
+REDIS_GROUP=${REDIS_GROUP:-redis}
+
+command=/usr/sbin/redis-server
+start_stop_daemon_args="--chdir \"${REDIS_DIR}\"
+ --user ${REDIS_USER} --group ${REDIS_GROUP}"
+command_args="${REDIS_OPTS}"
+pidfile=${REDIS_PID:-/run/redis/redis.pid}
+
+depend() {
+ use net localmount logger
+ after keepalived
+}
+
+start_pre() {
+ checkpath -d -m 0775 -o ${REDIS_USER}:${REDIS_GROUP} $(dirname ${REDIS_PID})
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop \
+ --exec ${retries} \
+ --retry 30 \
+ --pidfile ${pidfile}
+ eend
+}
diff --git a/dev-db/redis/files/redis.initd-4 b/dev-db/redis/files/redis.initd-4
new file mode 100644
index 000000000000..4a765d038b82
--- /dev/null
+++ b/dev-db/redis/files/redis.initd-4
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# $Id$
+
+REDIS_DIR=${REDIS_DIR:-/var/lib/redis}
+REDIS_CONF=${REDIS_CONF:-/etc/redis.conf}
+REDIS_OPTS=${REDIS_OPTS:-"${REDIS_CONF}"}
+REDIS_USER=${REDIS_USER:-redis}
+REDIS_GROUP=${REDIS_GROUP:-redis}
+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}"
+command_args="${REDIS_OPTS}"
+
+depend() {
+ use net localmount logger
+ after keepalived
+}
+
+start_pre() {
+ checkpath -d -m 0775 -o ${REDIS_USER}:${REDIS_GROUP} $(dirname ${REDIS_PID})
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop \
+ --exec ${command} \
+ --retry ${REDIS_TIMEOUT} \
+ --pidfile ${pidfile}
+ eend
+}
diff --git a/dev-db/redis/files/redis.service b/dev-db/redis/files/redis.service
new file mode 100644
index 000000000000..f1322f69f11e
--- /dev/null
+++ b/dev-db/redis/files/redis.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=A persistent key-value database
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/redis/redis.pid
+ExecStart=/usr/sbin/redis-server /etc/redis.conf
+User=redis
+Group=redis
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/dev-db/redis/files/redis.service-2 b/dev-db/redis/files/redis.service-2
new file mode 100644
index 000000000000..c36d7960ef71
--- /dev/null
+++ b/dev-db/redis/files/redis.service-2
@@ -0,0 +1,14 @@
+[Unit]
+Description=A persistent key-value database
+After=syslog.target network.target
+
+[Service]
+Type=simple
+PIDFile=/var/run/redis/redis.pid
+ExecStart=/usr/sbin/redis-server /etc/redis.conf
+User=redis
+Group=redis
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/dev-db/redis/files/redis.tmpfiles b/dev-db/redis/files/redis.tmpfiles
new file mode 100644
index 000000000000..657d8a551d4b
--- /dev/null
+++ b/dev-db/redis/files/redis.tmpfiles
@@ -0,0 +1,2 @@
+# redis runtime directory
+d /var/run/redis 0755 redis root -