Initial commit. Partially based on the submission in the upstream bugtracker by Geoff...
authorRobin H. Johnson <robbat2@gentoo.org>
Thu, 25 Mar 2010 07:36:05 +0000 (07:36 +0000)
committerRobin H. Johnson <robbat2@gentoo.org>
Thu, 25 Mar 2010 07:36:05 +0000 (07:36 +0000)
Package-Manager: portage-2.2_rc63/cvs/Linux x86_64

dev-db/redis/ChangeLog [new file with mode: 0644]
dev-db/redis/Manifest [new file with mode: 0644]
dev-db/redis/files/01-dont-print-pid-on-startup.diff [new file with mode: 0644]
dev-db/redis/files/configure.ac-1.02 [new file with mode: 0644]
dev-db/redis/files/redis.confd [new file with mode: 0644]
dev-db/redis/files/redis.initd [new file with mode: 0644]
dev-db/redis/metadata.xml [new file with mode: 0644]
dev-db/redis/redis-1.2.5.ebuild [new file with mode: 0644]

diff --git a/dev-db/redis/ChangeLog b/dev-db/redis/ChangeLog
new file mode 100644 (file)
index 0000000..5b2d592
--- /dev/null
@@ -0,0 +1,14 @@
+# ChangeLog for dev-db/redis
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v 1.1 2010/03/25 07:36:05 robbat2 Exp $
+
+*redis-1.2.5 (25 Mar 2010)
+
+  25 Mar 2010; Robin H. Johnson <robbat2@gentoo.org>
+  +files/01-dont-print-pid-on-startup.diff, +files/configure.ac-1.02,
+  +redis-1.2.5.ebuild, +files/redis.confd, +files/redis.initd,
+  +metadata.xml:
+  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.
+
diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest
new file mode 100644 (file)
index 0000000..4b06d88
--- /dev/null
@@ -0,0 +1,8 @@
+AUX 01-dont-print-pid-on-startup.diff 647 RMD160 ad9fcf603a37ebe6fe1c6028b64cd40bb7ed748c SHA1 630e3c656a9e0dfa507272716a24e5ed86a33947 SHA256 d0a048cf4cd0d342404cfe7af23aecb7b04975eb7336052d645303b09b30b758
+AUX configure.ac-1.02 1496 RMD160 41e3f453f993020ce6477392fed18261c199a9a5 SHA1 bbf22e3d8aff6cb9745d6316c6ba6c64bca96865 SHA256 16d546fc036e2ef8a020e3b042ff2c49b13a0dcddc6de1046c9dac039af0e877
+AUX redis.confd 450 RMD160 237a72f30b3ba5c77e7dd31d2dfebc2db2cea2ad SHA1 4c298810900f0e627cd3f7bf480feb639b6cc2d5 SHA256 8c68e29dc88c8ad99b9212a448d313d1406ef02c7638398b2e48ea1ca8aa937b
+AUX redis.initd 859 RMD160 a5718f3b4eab11450223c21bc98ab75d408e932e SHA1 ba3237364dba1da920ec4f14c13ff2cd45062144 SHA256 8b25b60bca695a8393e381078b2a42330c1b6cc2953bbe3c1b7cbd41ca36fe5d
+DIST redis-1.2.5.tar.gz 204039 RMD160 c2c6606a4d4607f897f673cf0e32f76e51794571 SHA1 f28d840d8100586796cab02ccd8e91545a92179d SHA256 43bbb937b530cf736c19110dae8cd71d3369b2a6129654396956e62683902025
+EBUILD redis-1.2.5.ebuild 2207 RMD160 5acf411286f32f7030744a04b2167d6d490cbc45 SHA1 870323de75fcaefd1a3a49789d30fd6ebf20cc88 SHA256 8421091871067ee991732dafdc74dc483149db26f7b309ff3c97e3f05aedbf8d
+MISC ChangeLog 636 RMD160 6dfbe04b2353690c284a21f73bb5d69f2c7a4cf8 SHA1 9d0316b13928ae23ee904f21e872d087c15045e1 SHA256 5bdf2847b2a4a8461015a16611d505e2e8576608b9b9989a458742c8fa79d963
+MISC metadata.xml 223 RMD160 ffa99612cf27469c417944deed0e0c9155e64331 SHA1 607c637402dd253406aa6ee684471a702c5d1a99 SHA256 d6bb9ba68629616062b4433ab3b8fb01dfcafae5bb47804d9e06cdd6c66daa44
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 (file)
index 0000000..1e42fe1
--- /dev/null
@@ -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 (file)
index 0000000..64070ab
--- /dev/null
@@ -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 (file)
index 0000000..07585fa
--- /dev/null
@@ -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 (file)
index 0000000..a7942a8
--- /dev/null
@@ -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}
+}
diff --git a/dev-db/redis/metadata.xml b/dev-db/redis/metadata.xml
new file mode 100644 (file)
index 0000000..5d9f5be
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+  <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-db/redis/redis-1.2.5.ebuild b/dev-db/redis/redis-1.2.5.ebuild
new file mode 100644 (file)
index 0000000..821ce8c
--- /dev/null
@@ -0,0 +1,82 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/redis-1.2.5.ebuild,v 1.1 2010/03/25 07:36:05 robbat2 Exp $
+
+EAPI=2
+WANT_AUTOCONF="latest"
+
+inherit autotools eutils
+
+DESCRIPTION="Persistent distributed key-value data caching system."
+HOMEPAGE="http://code.google.com/p/redis/"
+SRC_URI="http://redis.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+SLOT="0"
+
+RDEPEND=""
+DEPEND=""
+       
+REDIS_PIDDIR=/var/run/redis/
+REDIS_PIDFILE=${REDIS_PIDDIR}/redis.pid
+REDIS_DATAPATH=/var/lib/redis
+REDIS_LOGPATH=/var/log/redis
+REDIS_LOGFILE=${LOGPATH}/redis.log
+
+pkg_setup() {
+       enewgroup redis 75 || die "problem adding 'redis' group"
+       enewuser redis 75 -1 ${REDIS_DATAPATH} redis || die "problem adding 'redis' user"
+}
+
+src_prepare() {
+       # Borrowed from debian
+       epatch "${FILESDIR}"/01-dont-print-pid-on-startup.diff
+       # Now autotoolize this
+       cp "${FILESDIR}"/configure.ac-1.02 configure.ac
+       mv Makefile Makefile.in
+       sed -i \
+               -e 's:$(CC):@CC@:g' \
+               -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+               -e 's: $(DEBUG)::g' \
+               -e 's:ARCH:GCC_ARCH_FLAG:g' \
+               -e 's:PROF:GCC_PROF_FLAG:g' \
+               Makefile.in \
+       || die "sed failed!"
+
+       eautoreconf
+}
+
+src_install() {
+       # configuration file rewrites
+       insinto /etc/
+       sed -r \
+               -e "/^pidfile\>/s,/var.*,${REDIS_PIDFILE}," \
+               -e '/^daemonize\>/s,no,yes,' \
+               -e '/^# bind/s,^# ,,' \
+               -e '/^# maxmemory\>/s,^# ,,' \
+               -e '/^maxmemory\>/s,<bytes>,67108864,' \
+               -e "/^dbfilename\>/s,dump.rdb,${REDIS_DATAPATH}/dump.rdb," \
+               -e "/^dir\>/s, .*, ${REDIS_DATAPATH}/," \
+               -e '/^loglevel\>/s:debug:notice:' \
+               -e "/^logfile\>/s:stdout:${REDIS_LOGFILE}:" \
+               <redis.conf \
+               >redis.conf.gentoo
+       newins redis.conf.gentoo redis.conf
+       fowners root:redis /etc/redis.conf
+       fperms 0640 /etc/redis.conf
+
+       newconfd "${FILESDIR}/redis.confd" redis
+       newinitd "${FILESDIR}/redis.initd" redis
+
+       dodoc 00-RELEASENOTES BETATESTING.txt BUGS Changelog README TODO
+       newdoc client-libraries/README README.client-libraries
+       dohtml doc/*
+
+       dobin redis-benchmark redis-cli
+       dosbin redis-server
+
+       diropts -m0750 -o redis -g redis
+       keepdir ${REDIS_DATAPATH} ${REDIS_LOGFILE} ${REDIS_PIDDIR}
+}