summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-03-31 19:03:18 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2007-03-31 19:03:18 +0000
commite69f3c55051370ef9252e8597a43d09d16beb325 (patch)
treebf09a26291f44d776c8ba1cab60c04acd433dac7 /net-misc
parentadded fix from bug #168446 (diff)
downloadgentoo-2-e69f3c55051370ef9252e8597a43d09d16beb325.tar.gz
gentoo-2-e69f3c55051370ef9252e8597a43d09d16beb325.tar.bz2
gentoo-2-e69f3c55051370ef9252e8597a43d09d16beb325.zip
Fix start-stop-daemon looking at the binary instead of the pidfile when using multiple instances of memcached.
(Portage version: 2.1.2.3)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/memcached/ChangeLog11
-rw-r--r--net-misc/memcached/files/1.1.13/conf28
-rw-r--r--net-misc/memcached/files/1.1.13/init48
-rw-r--r--net-misc/memcached/files/digest-memcached-1.1.13-r13
-rw-r--r--net-misc/memcached/files/digest-memcached-1.2.1-r13
-rw-r--r--net-misc/memcached/memcached-1.1.13-r1.ebuild52
-rw-r--r--net-misc/memcached/memcached-1.2.1-r1.ebuild50
7 files changed, 194 insertions, 1 deletions
diff --git a/net-misc/memcached/ChangeLog b/net-misc/memcached/ChangeLog
index 4fd94da77c35..2d13b3b9cfaf 100644
--- a/net-misc/memcached/ChangeLog
+++ b/net-misc/memcached/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-misc/memcached
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/ChangeLog,v 1.39 2007/03/22 18:32:06 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/ChangeLog,v 1.40 2007/03/31 19:03:18 robbat2 Exp $
+
+*memcached-1.2.1-r1 (31 Mar 2007)
+*memcached-1.1.13-r1 (31 Mar 2007)
+
+ 31 Mar 2007; Robin H. Johnson <robbat2@gentoo.org> +files/1.1.13/conf,
+ +files/1.1.13/init, +memcached-1.1.13-r1.ebuild,
+ +memcached-1.2.1-r1.ebuild:
+ Fix start-stop-daemon looking at the binary instead of the pidfile when
+ using multiple instances of memcached.
22 Mar 2007; Gustavo Zacarias <gustavoz@gentoo.org>
memcached-1.2.1.ebuild:
diff --git a/net-misc/memcached/files/1.1.13/conf b/net-misc/memcached/files/1.1.13/conf
new file mode 100644
index 000000000000..7b2229e53c50
--- /dev/null
+++ b/net-misc/memcached/files/1.1.13/conf
@@ -0,0 +1,28 @@
+# Copyright 2003 Gentoo Technologies, Inc
+# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/files/1.1.13/conf,v 1.1 2007/03/31 19:03:18 robbat2 Exp $
+# memcached config file
+
+MEMCACHED_BINARY="/usr/bin/memcached"
+
+#Specify memory usage in megabytes (do not use letters)
+#64MB is default
+MEMUSAGE="64"
+
+#User to run as
+MEMCACHED_RUNAS="memcached"
+
+#Specify maximum number of concurrent connections
+#1024 is default
+MAXCONN="1024"
+
+#Listen for connections on what address?
+LISTENON=""
+
+#Listen for connections on what port?
+PORT="11211"
+
+#PID file location
+PIDFILE="/var/run/memcached/memcached-${PORT}.pid"
+
+#Other Options
+MISC_OPTS=""
diff --git a/net-misc/memcached/files/1.1.13/init b/net-misc/memcached/files/1.1.13/init
new file mode 100644
index 000000000000..662d6488d284
--- /dev/null
+++ b/net-misc/memcached/files/1.1.13/init
@@ -0,0 +1,48 @@
+#!/sbin/runscript
+# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/files/1.1.13/init,v 1.1 2007/03/31 19:03:18 robbat2 Exp $
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ -z "${LISTENON}" ]; then
+ ewarn "You should edit /etc/conf.d/memcached and specify an address to listen on."
+ ewarn "Listening on any address (I hope your firewall is set up properly)"
+ fi
+
+}
+
+start() {
+ ebegin "Starting memcached"
+ checkconfig
+ local dir="$(dirname ${PIDFILE})"
+ if [ ! -d "${dir}" ]; then
+ einfo " Creating ${dir}"
+ mkdir -p "${dir}"
+ fi
+ chown ${MEMCACHED_RUNAS} "${dir}"
+ if [ -f ${PIDFILE} ]; then
+ einfo " Removing stale pidfile ${PIDFILE}"
+ rm -f ${PIDFILE} 1>/dev/null
+ fi
+
+ if [ -z "${LISTENON}" ]; then
+ c_LISTENON=""
+ else
+ c_LISTENON="-l ${LISTENON}"
+ fi
+
+ /sbin/start-stop-daemon --start --pidfile ${PIDFILE} \
+ --exec ${MEMCACHED_BINARY} --startas ${MEMCACHED_BINARY} -- \
+ -d -p ${PORT} ${c_LISTENON} -m ${MEMUSAGE} \
+ -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P ${PIDFILE} ${MISC_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping memcached"
+ start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+ rm -f ${PIDFILE}
+ eend $?
+}
diff --git a/net-misc/memcached/files/digest-memcached-1.1.13-r1 b/net-misc/memcached/files/digest-memcached-1.1.13-r1
new file mode 100644
index 000000000000..ce14edb8722e
--- /dev/null
+++ b/net-misc/memcached/files/digest-memcached-1.1.13-r1
@@ -0,0 +1,3 @@
+MD5 b1e7e2374698b59e3467262b56451312 memcached-1.1.13.tar.gz 133734
+RMD160 57b6da75e45af66f5d2a0c4a7a2a22a256cfb209 memcached-1.1.13.tar.gz 133734
+SHA256 cb46911afde64f627af277b46b879b4a66d0653c22b9e6ccd31392a9a4ebbe5f memcached-1.1.13.tar.gz 133734
diff --git a/net-misc/memcached/files/digest-memcached-1.2.1-r1 b/net-misc/memcached/files/digest-memcached-1.2.1-r1
new file mode 100644
index 000000000000..61fcae98edfe
--- /dev/null
+++ b/net-misc/memcached/files/digest-memcached-1.2.1-r1
@@ -0,0 +1,3 @@
+MD5 6ff64fb974d131fdb7f9d5fdf955dc9a memcached-1.2.1.tar.gz 148755
+RMD160 0b275591af74440f3de22946fb7ccc658f6578af memcached-1.2.1.tar.gz 148755
+SHA256 d489c1e8f9b149d7cde2bb1cb2c509ca6acedc32baed4e9b5f9e17d722c78c86 memcached-1.2.1.tar.gz 148755
diff --git a/net-misc/memcached/memcached-1.1.13-r1.ebuild b/net-misc/memcached/memcached-1.1.13-r1.ebuild
new file mode 100644
index 000000000000..01b50f769a3d
--- /dev/null
+++ b/net-misc/memcached/memcached-1.1.13-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/memcached-1.1.13-r1.ebuild,v 1.1 2007/03/31 19:03:18 robbat2 Exp $
+
+inherit eutils
+
+DESCRIPTION="memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load."
+
+HOMEPAGE="http://www.danga.com/memcached/"
+
+MY_PV="${PV/_pre/-pre}"
+MY_P="${PN}-${MY_PV}"
+SRC_URI="http://www.danga.com/memcached/dist/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="static perl doc"
+
+DEPEND=">=dev-libs/libevent-0.6
+ perl? ( dev-perl/Cache-Memcached )"
+S="${WORKDIR}/${MY_P}"
+
+src_compile() {
+ local myconf=""
+ use static || myconf="--disable-static ${myconf}"
+ econf ${myconf} || die "econf failed"
+ emake || die
+}
+
+src_install() {
+ dobin ${S}/memcached
+ dodoc ${S}/{AUTHORS,COPYING,ChangeLog,INSTALL,NEWS,README}
+
+ newconfd "${FILESDIR}/1.1.13/conf" memcached
+ newinitd "${FILESDIR}/1.1.13/init" memcached
+
+ doman ${S}/doc/memcached.1
+
+ if use doc; then
+ dodoc ${S}/doc/{memory_management.txt,protocol.txt}
+ fi
+}
+
+pkg_postinst() {
+ enewuser memcached -1 -1 /dev/null daemon
+ einfo "With this version of Memcached Gentoo now supporst multiple instances."
+ einfo "To enable this you must create a symlink in /etc/init.d/ for each instance"
+ einfo "to /etc/init.d/memcached and create the matching conf files in /etc/conf.d/"
+ einfo "Please see Gentoo bug #122246 for more info"
+}
diff --git a/net-misc/memcached/memcached-1.2.1-r1.ebuild b/net-misc/memcached/memcached-1.2.1-r1.ebuild
new file mode 100644
index 000000000000..72c9dcf57abb
--- /dev/null
+++ b/net-misc/memcached/memcached-1.2.1-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/memcached-1.2.1-r1.ebuild,v 1.1 2007/03/31 19:03:18 robbat2 Exp $
+
+inherit eutils
+
+MY_PV="${PV/_pre/-pre}"
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load"
+HOMEPAGE="http://www.danga.com/memcached/"
+SRC_URI="http://www.danga.com/memcached/dist/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="static perl doc"
+
+DEPEND=">=dev-libs/libevent-0.6
+ perl? ( dev-perl/Cache-Memcached )"
+
+S=${WORKDIR}/${MY_P}
+
+src_compile() {
+ local myconf=""
+ use static || myconf="--disable-static ${myconf}"
+ econf ${myconf} || die "econf failed"
+ emake || die
+}
+
+src_install() {
+ dobin ${S}/memcached
+ dodoc ${S}/{AUTHORS,COPYING,ChangeLog,INSTALL,NEWS,README}
+
+ newconfd "${FILESDIR}/1.1.13/conf" memcached
+ newinitd "${FILESDIR}/1.1.13/init" memcached
+
+ doman ${S}/doc/memcached.1
+
+ if use doc; then
+ dodoc ${S}/doc/{memory_management.txt,protocol.txt}
+ fi
+}
+
+pkg_postinst() {
+ enewuser memcached -1 -1 /dev/null daemon
+ einfo "With this version of Memcached Gentoo now supporst multiple instances."
+ einfo "To enable this you must create a symlink in /etc/init.d/ for each instance"
+ einfo "to /etc/init.d/memcached and create the matching conf files in /etc/conf.d/"
+ einfo "Please see Gentoo bug #122246 for more info"
+}