summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2010-03-25 07:36:05 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2010-03-25 07:36:05 +0000
commit3756c36c04a7d7c2039c6cfeb78c6e6091e74a90 (patch)
treeca10c273e56312690870a5265d9566981d9a45d9 /dev-db/redis/files
parentClean up file and dir ownership. (diff)
downloadhistorical-3756c36c04a7d7c2039c6cfeb78c6e6091e74a90.tar.gz
historical-3756c36c04a7d7c2039c6cfeb78c6e6091e74a90.tar.bz2
historical-3756c36c04a7d7c2039c6cfeb78c6e6091e74a90.zip
Initial commit. Partially based on the submission in the upstream bugtracker by Geoff Kassel <gkassel@users.sourceforge.net> and W-Mark Kubacki <wmark.gentoo@hurrikane.de>. Proxy maintainers welcome.
Package-Manager: portage-2.2_rc63/cvs/Linux x86_64
Diffstat (limited to 'dev-db/redis/files')
-rw-r--r--dev-db/redis/files/01-dont-print-pid-on-startup.diff17
-rw-r--r--dev-db/redis/files/configure.ac-1.0258
-rw-r--r--dev-db/redis/files/redis.confd20
-rw-r--r--dev-db/redis/files/redis.initd37
4 files changed, 132 insertions, 0 deletions
diff --git a/dev-db/redis/files/01-dont-print-pid-on-startup.diff b/dev-db/redis/files/01-dont-print-pid-on-startup.diff
new file mode 100644
index 000000000000..1e42fe1688a6
--- /dev/null
+++ b/dev-db/redis/files/01-dont-print-pid-on-startup.diff
@@ -0,0 +1,17 @@
+
+Don't print pid of forked process on startup. This change was also made
+upstream in 20f5b3886761a0ba963fee435bba90dd09bd5bd5.
+
+ -- Chris Lamb <lamby@debian.org> Thu, 14 Jan 2010 15:48:04 +0000
+
+diff -urNad /tmp/bp-build/redis-1.2.0.orig/redis.c /tmp/bp-build/redis-1.2.0/redis.c
+--- redis-1.2.0.orig/redis.c 2010-01-14 15:46:33.000000000 +0000
++++ redis-1.2.0/redis.c 2010-01-14 15:46:51.000000000 +0000
+@@ -6215,7 +6215,6 @@
+ FILE *fp;
+
+ if (fork() != 0) exit(0); /* parent exits */
+- printf("New pid: %d\n", getpid());
+ setsid(); /* create a new session */
+
+ /* Every output goes to /dev/null. If Redis is daemonized but
diff --git a/dev-db/redis/files/configure.ac-1.02 b/dev-db/redis/files/configure.ac-1.02
new file mode 100644
index 000000000000..64070ab2f78f
--- /dev/null
+++ b/dev-db/redis/files/configure.ac-1.02
@@ -0,0 +1,58 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.63)
+AC_INIT(redis, 1.02, antirez@gmail.com)
+AM_CFLAGS="-std=c99 -pedantic -Wall -W"
+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.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..a7942a8e9340
--- /dev/null
+++ b/dev-db/redis/files/redis.initd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/files/redis.initd,v 1.1 2010/03/25 07:36:04 robbat2 Exp $
+
+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}
+
+opts="start stop restart"
+
+depend() {
+ use net localmount logger
+ after keepalived
+}
+
+start() {
+ ebegin "Starting Redis server"
+ cd "${REDIS_DIR}"
+ start-stop-daemon --start \
+ --chuid ${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}
+}