diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-12-20 19:19:34 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-12-20 19:19:34 +0000 |
commit | db991c4ce5268caab75ea260044402c91bb6fb00 (patch) | |
tree | a44028174b1b7fb8c12b769579f5dc9fdee017b5 /sys-cluster/gearmand | |
parent | Drop net-analyzer/cacti-cactid mask since package was removed from the tree. (diff) | |
download | historical-db991c4ce5268caab75ea260044402c91bb6fb00.tar.gz historical-db991c4ce5268caab75ea260044402c91bb6fb00.tar.bz2 historical-db991c4ce5268caab75ea260044402c91bb6fb00.zip |
Initial import of gearmand, thanks to Pavel Stratil (who's co-maintaining the package) who wrote the basic ebuild and init script. Closes bug #279413, reported by Rob Peck (who also wrote an alternative ebuild).
Package-Manager: portage-2.2_rc60/cvs/Linux x86_64
Diffstat (limited to 'sys-cluster/gearmand')
-rw-r--r-- | sys-cluster/gearmand/ChangeLog | 13 | ||||
-rw-r--r-- | sys-cluster/gearmand/Manifest | 16 | ||||
-rw-r--r-- | sys-cluster/gearmand/files/gearmand.conf.d | 38 | ||||
-rw-r--r-- | sys-cluster/gearmand/files/gearmand.init.d | 76 | ||||
-rw-r--r-- | sys-cluster/gearmand/gearmand-0.11-r1.ebuild | 75 | ||||
-rw-r--r-- | sys-cluster/gearmand/metadata.xml | 24 |
6 files changed, 242 insertions, 0 deletions
diff --git a/sys-cluster/gearmand/ChangeLog b/sys-cluster/gearmand/ChangeLog new file mode 100644 index 000000000000..1f770ada606c --- /dev/null +++ b/sys-cluster/gearmand/ChangeLog @@ -0,0 +1,13 @@ +# ChangeLog for sys-cluster/gearmand +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gearmand/ChangeLog,v 1.1 2009/12/20 19:19:34 flameeyes Exp $ + +*gearmand-0.11-r1 (20 Dec 2009) + + 20 Dec 2009; Diego E. Pettenò <flameeyes@gentoo.org> + +gearmand-0.11-r1.ebuild, +files/gearmand.conf.d, +files/gearmand.init.d, + +metadata.xml: + Initial import of gearmand, thanks to Pavel Stratil (who's co-maintaining + the package) who wrote the basic ebuild and init script. Closes bug + #279413, reported by Rob Peck (who also wrote an alternative ebuild). + diff --git a/sys-cluster/gearmand/Manifest b/sys-cluster/gearmand/Manifest new file mode 100644 index 000000000000..9943e9143216 --- /dev/null +++ b/sys-cluster/gearmand/Manifest @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX gearmand.conf.d 1527 RMD160 8ac71a123edaea9d072e98beaaea0fb120fb1f82 SHA1 1f07a9ce72dc3837b8016eba2ad86bc5989f368c SHA256 8bbc8d9f3fa064de1ed44f5678b89d18b681a4f1602d37f5019fcd8b0032ffd8 +AUX gearmand.init.d 3091 RMD160 0ea13278e1a78b9f9b30059bc885ebbadc761e6a SHA1 465d613cc5913ca2e5954d65c462025debc94395 SHA256 34ad4ff0bc8fd6c7c5af38998dbe7a21840e95c91bacaf4f170bd2f90397dc6e +DIST gearmand-0.11.tar.gz 593324 RMD160 d5d79c9153fa496f690875b8572c825c826ba7cd SHA1 6b3d7fdb3d2d19a1cafa82efa0a443df190fb5db SHA256 25848a11bc4ba91329e8992c5a3ccbb82afe104ef558e67cf3ca9669d3044a92 +EBUILD gearmand-0.11-r1.ebuild 2186 RMD160 b607b51d218eb231256945d4a2f3f08971485bea SHA1 f4b38a8ae79464fbf18e193034e5f47747229c4d SHA256 ab1ad858a64f3b1891e3a485fca33b344efe3bb894706c4315cc0ee09a8455c7 +MISC ChangeLog 617 RMD160 389823a86480324ec3add6e6b2476b0bc1dad3a0 SHA1 64e6fcea3cf7319eac0ee7f7a8f3487fa8800041 SHA256 6d41aea6ad373927a482da1aefefdbb224c62a6cb2abec984563fd39f4953827 +MISC metadata.xml 708 RMD160 eec720201599f96f243ec2243393c9ccaef96d43 SHA1 eb913c491eff074b15220972612615c76292e857 SHA256 30926d93ad0e6f652cf6dd5766416e8f2a206e6b4d2a8d9bd47babb60f3c1502 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.13 (GNU/Linux) + +iEYEARECAAYFAksueM0ACgkQAiZjviIA2XigSQCg11g/aeTz5YOQbGsdEhulw1UA +WEkAnRhceMTqWKCc6RkazaMWKB07fwIm +=/Ua0 +-----END PGP SIGNATURE----- diff --git a/sys-cluster/gearmand/files/gearmand.conf.d b/sys-cluster/gearmand/files/gearmand.conf.d new file mode 100644 index 000000000000..9786d2c517c4 --- /dev/null +++ b/sys-cluster/gearmand/files/gearmand.conf.d @@ -0,0 +1,38 @@ +# /etc/conf.d/gearmand: config file for /etc/init.d/gearmand + +# Persistent queue store +# The following queue stores are available: drizzle|memcache|mysql|postgre|sqlite|none +# If you do not wish to use persistent queues, leave this option commented out. +# Note that persistent queue mechanisms are mutally exclusive. +#PERSISTENT="" + +# Persistent queue settings for drizzle, mysql and postgre +#PERSISTENT_SOCKET="" +#PERSISTENT_HOST="" +#PERSISTENT_PORT="" +#PERSISTENT_USER="" +#PERSISTENT_PASS="" +#PERSISTENT_DB="" +#PERSISTENT_TABLE="" + +# Persistent queue settings for sqlite +#PERSISTENT_FILE="" + +# Persistent queue settings for memcache +#PERSISTENT_SERVERLIST="" + +# General settings +# +# -j, --job-retries=RETRIES Number of attempts to run the job before the job +# server removes it. Thisis helpful to ensure a bad +# job does not crash all available workers. Default +# is no limit. +# -L, --listen=ADDRESS Address the server should listen on. Default is +# INADDR_ANY. +# -p, --port=PORT Port the server should listen on. Default=4730. +# -r, --protocol=PROTOCOL Load protocol module. +# -t, --threads=THREADS Number of I/O threads to use. Default=0. +# -v, --verbose Increase verbosity level by one. +# -w, --worker-wakeup=WORKERS Number of workers to wakeup for each job received. +# The default is to wakeup all available workers. +GEARMAND_PARAMS="" diff --git a/sys-cluster/gearmand/files/gearmand.init.d b/sys-cluster/gearmand/files/gearmand.init.d new file mode 100644 index 000000000000..895021e11f4c --- /dev/null +++ b/sys-cluster/gearmand/files/gearmand.init.d @@ -0,0 +1,76 @@ +#!/sbin/runscript +# Copyright 2009 Pavel Stratil, senbonzakura.eu +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use localmount + + case $PERSISTENT in + drizzle) + use drizzle + ;; + memcache) + use memcache + ;; + mysql) + use mysql + ;; + postgre) + use postgresql + ;; + *) + ;; + esac +} + +start() { + case ${PERSISTENT:-none} in + drizzle|mysql) + GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libdrizzle" + [ ${PERSISTENT_HOST} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-host=${PERSISTENT_HOST}" + [ ${PERSISTENT_USER} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-user=${PERSISTENT_USER}" + [ ${PERSISTENT_PASS} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-password=${PERSISTENT_PASS}" + [ ${PERSISTENT_DB} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-db=${PERSISTENT_DB}" + [ ${PERSISTENT_TABLE} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-table=${PERSISTENT_TABLE}" + [ ${PERSISTENT_PORT} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-port=${PERSISTENT_PORT}" + [ ${PERSISTENT_SOCKET} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-uds=${PERSISTENT_SOCKET}" + [ ${PERSISTENT} == "mysql" ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-mysql" + ;; + memcache) + [ ${PERSISTENT_SERVERLIST} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libmemcached --libmemcached-servers=${PERSISTENT_SERVERLIST}" + ;; + postgre) + GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libpq" + [ ${PERSISTENT_HOST} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-host=${PERSISTENT_HOST}" + [ ${PERSISTENT_USER} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-user=${PERSISTENT_USER}" + [ ${PERSISTENT_PASS} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-password=${PERSISTENT_PASS}" + [ ${PERSISTENT_DB} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-dbname=${PERSISTENT_DB}" + [ ${PERSISTENT_PORT} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-port=${PERSISTENT_PORT}" + [ ${PERSISTENT_TABLE} ] && ewarn "Libpq doesn't recognise 'table' parameter." + [ ${PERSISTENT_SOCKET} ] && ewarn "Libpq doesn't recognise 'socket' parameter. If no host is set, it automatically falls back to a socket." + ;; + sqlite) + GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libsqlite3 --libsqlite3-db=${PERSISTENT_FILE}" + ;; + none) + ;; + *) + eerror "Wrong persistent queue store setting in /etc/conf.d/gearmand." + return 1 + ;; + esac + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --pidfile /var/run/gearmand/gearmand.pid --start \ + --exec /usr/sbin/gearmand -- --pid-file=/var/run/gearmand/gearmand.pid \ + --user=gearmand --daemon \ + --log-file=/var/log/gearmand/gearmand.log ${GEARMAND_PARAMS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --pidfile /var/run/gearmand/gearmand.pid --stop \ + --exec /usr/sbin/gearmand + eend $? +} diff --git a/sys-cluster/gearmand/gearmand-0.11-r1.ebuild b/sys-cluster/gearmand/gearmand-0.11-r1.ebuild new file mode 100644 index 000000000000..d87329b9e686 --- /dev/null +++ b/sys-cluster/gearmand/gearmand-0.11-r1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gearmand/gearmand-0.11-r1.ebuild,v 1.1 2009/12/20 19:19:34 flameeyes Exp $ + +EAPI=2 + +inherit flag-o-matic + +DESCRIPTION="Generic framework to farm out work to other machines" +HOMEPAGE="http://www.gearman.org/" +SRC_URI="http://launchpad.net/gearmand/trunk/${PV}/+download/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="debug tcmalloc +memcache" + +RDEPEND="dev-libs/libevent + || ( >=sys-apps/util-linux-2.16 <sys-libs/e2fsprogs-libs-1.41.8 ) + tcmalloc? ( dev-util/google-perftools ) + memcache? ( dev-libs/libmemcached )" +DEPEND="${RDEPEND}" + +pkg_setup() { + enewuser gearmand -1 -1 /dev/null nogroup +} + +src_configure() { + local myconf= + + # Don't ever use --enable-assert since configure.ac is broken, and + # only does --disable-assert correctly. + if use debug; then + # Since --with-debug would turn off optimisations as well as + # enabling debug, we just enable debug through the + # preprocessor then. + append-flags -DDEBUG + + # Right now disabling asserts break the code, so never disable + # them as it is. + #else + # myconf="${myconf} --disable-assert" + fi + + # TODO once there's a drizzle/librizzle ebuild, add drizzle to iuse + # TODO new compile options for queue storage: libsqlite,libpq,libdrizzle + # TODO mtmalloc, umem, dtrace - all of this solaris stuff only? + # TODO libmemcached pulls memcached. Is this correct? + econf \ + --disable-dependency-tracking \ + $(use_enable tcmalloc) \ + $(use_enable memcache libmemcached) \ + --disable-mtmalloc \ + --disable-libsqlite3 \ + --disable-libdrizzle \ + --disable-libpq \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install || die "install failed" + + dodoc README AUTHORS ChangeLog || die "dodoc failed" + + newinitd "${FILESDIR}"/gearmand.init.d gearmand || die + newconfd "${FILESDIR}"/gearmand.conf.d gearmand || die + + keepdir /var/run/gearmand || die + fperms 0755 /var/run/gearmand || die + fowners gearmand:nogroup /var/run/gearmand || die + + keepdir /var/log/gearmand || die + fperms 0755 /var/log/gearmand || die + fowners gearmand /var/log/gearmand || die +} diff --git a/sys-cluster/gearmand/metadata.xml b/sys-cluster/gearmand/metadata.xml new file mode 100644 index 000000000000..898d240b8d4c --- /dev/null +++ b/sys-cluster/gearmand/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>no-herd</herd> + <maintainer> + <email>flameeyes@gentoo.org</email> + </maintainer> + <maintainer> + <email>pavel.stratil-jun@fenix.cz</email> + <description>Proxied co-maintainer, CC on all bugs</description> + </maintainer> + + <use> + <flag name="tcmalloc"> + Use the <pkg>dev-util/google-perftools</pkg> libraries to + replace the malloc() implementation with a possibly faster one. + </flag> + + <flag name="memcache"> + Support memcache daemon (via <pkg>dev-libs/libmemcached</pkg>) + for the queue storage. + </flag> + </use> +</pkgmetadata> |