summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-05-13 08:10:05 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2007-05-13 08:10:05 +0000
commit90ab44c3efec78854dcd4fc28662153fddc241c8 (patch)
tree15bc8b6719c21755be38850b414bcb1313809db1 /dev-perl/Gearman-Server
parentadd herd to missing metadata.xml files in category app-admin (diff)
downloadgentoo-2-90ab44c3efec78854dcd4fc28662153fddc241c8.tar.gz
gentoo-2-90ab44c3efec78854dcd4fc28662153fddc241c8.tar.bz2
gentoo-2-90ab44c3efec78854dcd4fc28662153fddc241c8.zip
Patch gearmand to have a suitable cmdline in the process listing, and thus simplify the init script greatly.
(Portage version: 2.1.2.7)
Diffstat (limited to 'dev-perl/Gearman-Server')
-rw-r--r--dev-perl/Gearman-Server/ChangeLog11
-rw-r--r--dev-perl/Gearman-Server/Gearman-Server-1.09-r1.ebuild29
-rw-r--r--dev-perl/Gearman-Server/files/Gearman-Server-1.09-Use-saner-name-in-process-listing.patch33
-rw-r--r--dev-perl/Gearman-Server/files/digest-Gearman-Server-1.09-r13
-rw-r--r--dev-perl/Gearman-Server/files/gearmand-init.d-1.0916
5 files changed, 79 insertions, 13 deletions
diff --git a/dev-perl/Gearman-Server/ChangeLog b/dev-perl/Gearman-Server/ChangeLog
index 17bf4d8089e5..8ff9299dcf25 100644
--- a/dev-perl/Gearman-Server/ChangeLog
+++ b/dev-perl/Gearman-Server/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-perl/Gearman-Server
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-perl/Gearman-Server/ChangeLog,v 1.2 2007/05/13 02:18:42 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-perl/Gearman-Server/ChangeLog,v 1.3 2007/05/13 08:10:05 robbat2 Exp $
+
+*Gearman-Server-1.09-r1 (13 May 2007)
+
+ 13 May 2007; Robin H. Johnson <robbat2@gentoo.org>
+ files/gearmand-init.d-1.09,
+ +files/Gearman-Server-1.09-Use-saner-name-in-process-listing.patch,
+ +Gearman-Server-1.09-r1.ebuild:
+ Patch gearmand to have a suitable cmdline in the process listing, and thus
+ simplify the init script greatly.
*Gearman-Server-1.09 (13 May 2007)
diff --git a/dev-perl/Gearman-Server/Gearman-Server-1.09-r1.ebuild b/dev-perl/Gearman-Server/Gearman-Server-1.09-r1.ebuild
new file mode 100644
index 000000000000..b0d9bf4c0c9b
--- /dev/null
+++ b/dev-perl/Gearman-Server/Gearman-Server-1.09-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-perl/Gearman-Server/Gearman-Server-1.09-r1.ebuild,v 1.1 2007/05/13 08:10:05 robbat2 Exp $
+
+inherit perl-module
+
+DESCRIPTION="Gearman distributed job system - worker/client connector"
+HOMEPAGE="http://search.cpan.org/search?query=Gearman-Server&mode=dist"
+SRC_URI="mirror://cpan/authors/id/B/BR/BRADFITZ/${P}.tar.gz"
+
+IUSE=""
+
+SLOT="0"
+LICENSE="|| ( Artistic GPL-2 )"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND=">=dev-perl/Danga-Socket-1.57
+ >=dev-perl/Gearman-1.07
+ dev-lang/perl"
+
+mydoc="CHANGES"
+
+PATCHES="${FILESDIR}/$PN-1.09-Use-saner-name-in-process-listing.patch"
+
+src_install() {
+ perl-module_src_install
+ newinitd ${FILESDIR}/gearmand-init.d-1.09 gearmand
+ newconfd ${FILESDIR}/gearmand-conf.d-1.09 gearmand
+}
diff --git a/dev-perl/Gearman-Server/files/Gearman-Server-1.09-Use-saner-name-in-process-listing.patch b/dev-perl/Gearman-Server/files/Gearman-Server-1.09-Use-saner-name-in-process-listing.patch
new file mode 100644
index 000000000000..f57360673ca8
--- /dev/null
+++ b/dev-perl/Gearman-Server/files/Gearman-Server-1.09-Use-saner-name-in-process-listing.patch
@@ -0,0 +1,33 @@
+From 6d8055b1d44d745f194665458674c6e03f48f322 Mon Sep 17 00:00:00 2001
+From: Robin H. Johnson <robbat2@gentoo.org>
+Date: Sat, 12 May 2007 22:16:37 -0700
+Subject: [PATCH gearman] Use saner name in process listing.
+
+Normally the binary will turn up in the process list as:
+/usr/bin/perl $SCRIPTNAME
+
+By adding a single line, we can make it be simply '$SCRIPTNAME'.
+This makes writing init.d scripts signficently easier.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+---
+ server/gearmand | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/server/gearmand b/server/gearmand
+index 2d8bd6b..148b1f9 100755
+--- a/server/gearmand
++++ b/server/gearmand
+@@ -94,6 +94,9 @@ my (
+ );
+ my $conf_port = 7003;
+
++# Rename binary in process list to make init scripts saner
++$0 = $_ = $0;
++
+ Getopt::Long::GetOptions(
+ 'd|daemonize' => \$daemonize,
+ 'p|port=i' => \$conf_port,
+--
+1.5.1.4
+
diff --git a/dev-perl/Gearman-Server/files/digest-Gearman-Server-1.09-r1 b/dev-perl/Gearman-Server/files/digest-Gearman-Server-1.09-r1
new file mode 100644
index 000000000000..3ad5ab6b1b3b
--- /dev/null
+++ b/dev-perl/Gearman-Server/files/digest-Gearman-Server-1.09-r1
@@ -0,0 +1,3 @@
+MD5 3d107089f7266ab91d66d9a7bd90430f Gearman-Server-1.09.tar.gz 11282
+RMD160 aab3786eec7a550f08ae4e521b207c555a9fa671 Gearman-Server-1.09.tar.gz 11282
+SHA256 472c47d154a7168c627aad97fe04abdb3010275315e26382e13982ec4062a8cd Gearman-Server-1.09.tar.gz 11282
diff --git a/dev-perl/Gearman-Server/files/gearmand-init.d-1.09 b/dev-perl/Gearman-Server/files/gearmand-init.d-1.09
index ef445e5dbd9d..5b8c053089c9 100644
--- a/dev-perl/Gearman-Server/files/gearmand-init.d-1.09
+++ b/dev-perl/Gearman-Server/files/gearmand-init.d-1.09
@@ -1,5 +1,5 @@
#!/sbin/runscript
-# $Header: /var/cvsroot/gentoo-x86/dev-perl/Gearman-Server/files/gearmand-init.d-1.09,v 1.1 2007/05/13 02:18:42 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-perl/Gearman-Server/files/gearmand-init.d-1.09,v 1.2 2007/05/13 08:10:05 robbat2 Exp $
NAME="gearmand"
BINARY="/usr/bin/gearmand"
@@ -12,23 +12,15 @@ start() {
# start-stop-daemon does not work properly in certain cases
# this hack should go away when bug #178274 is resolved.
ebegin "Starting $NAME"
- ${BINARY} ${GEARMAND_OPTS}
- rc=$?
- [ $rc -ne 0 ] && eend $rc
- local i=0
- # wait 4*500ms
- while [ $i -lt 4 ] && ! [ -s $PIDFILE ]; do
- sleep 0.5
- i=$(($i+1))
- done
- # final check
- start-stop-daemon --oknodo --start --pidfile="${PIDFILE}" \
+ start-stop-daemon --start --pidfile="${PIDFILE}" \
--exec ${BINARY} -- ${GEARMAND_OPTS}
eend $?
}
+
stop() {
ebegin "Stopping $NAME"
start-stop-daemon --stop --pidfile="${PIDFILE}"
eend $?
}
+
# vim: ft=gentoo-init-d: