summaryrefslogtreecommitdiff
path: root/sys-cluster/gearmand
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-cluster/gearmand
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-cluster/gearmand')
-rw-r--r--sys-cluster/gearmand/Manifest8
-rw-r--r--sys-cluster/gearmand/files/gearmand-0.34-stdbool-h.patch26
-rw-r--r--sys-cluster/gearmand/files/gearmand.conf.d39
-rw-r--r--sys-cluster/gearmand/files/gearmand.init.d.278
-rw-r--r--sys-cluster/gearmand/gearmand-0.34-r1.ebuild96
-rw-r--r--sys-cluster/gearmand/metadata.xml17
6 files changed, 264 insertions, 0 deletions
diff --git a/sys-cluster/gearmand/Manifest b/sys-cluster/gearmand/Manifest
new file mode 100644
index 000000000000..8e600a273d50
--- /dev/null
+++ b/sys-cluster/gearmand/Manifest
@@ -0,0 +1,8 @@
+AUX gearmand-0.34-stdbool-h.patch 568 SHA256 2122d7b8cedf64af25102217453e747cd15d479d50f3a01375cb89caaec7fa23 SHA512 bff5ae044cbf7bd08911ff29699a6f6065320c888f3f3f27ffc655dbbb283914c7aaa6474902f3644940a9698921d60622e4eeada653183c6fa90bb08e423930 WHIRLPOOL fb2fd2704eb797d5f1cc3ae823cd0546183f846e39e19a1051c11f47bc06ee244dea963bb56086d50db9ac065b923cf51e04d30dcbc649aa108fade6b4716501
+AUX gearmand.conf.d 1542 SHA256 a99bd1672091da3d4c2776225dacc497a5a9fb36ff8b34a464cd984cf584a29e SHA512 850cf6bd13475d30879bd49c9650e1f01e52c1bd8ed580d6dda09c83f74e424a17c04e9d8203c2b3555a69cf5cf3f00ede3fbcc7d005f90844e4494041c9168f WHIRLPOOL 1a07ee704aa646cfbeeb0cd590e494c86090077668288e0c217ddc6e21041987db498607f682b1de44a638f7e80201c95f318aaaf44b0704580b8b9fe6b45f87
+AUX gearmand.init.d.2 3206 SHA256 339352e70ef502c88024849396f0475314c276ef6bf1393e02e847f685f10fc3 SHA512 33d2208e668d060948715faa193b021603679ef6e870a80fbd666256a1d2a49ad709bf7efd94bd00fc8b96373feb34ea12c1212ac42b0d2f99fbbe369fa34175 WHIRLPOOL 8fa84e4ef802f8e9de81170eaacf5aaab0e8ca84118883f5e67237aef1ad815bb94ceed179562f02bf67a2ca6d931611624aa4856a34196b9ebe4edda1a39827
+DIST gearmand-0.34.tar.gz 842579 SHA256 968d701233f2376060274a69fa7c1b8e99f34b454a401805a2bd62067c13bca1 SHA512 8263cd19337f56cb692209efb4867b54954081a907c109b4828c1a7dfd8e1dec803f9c06e0f09e1ec6cc4271299bf77bcd5069b765647b31559480b4e7e756ba WHIRLPOOL 19e3c8b6e5f5c4edb15413901fb9c250a3d85a4ad0f9a13a7e3165732733c6e8e1072be593ba0820cd34e837e83638464b079dd9c840ffb336d67aee13a6bd86
+EBUILD gearmand-0.34-r1.ebuild 2604 SHA256 429bd02fd13307ba70f89072ff8d396ce541d216c7e849a6fa0938b98af65f7f SHA512 02ddf427124ca3ee407854c10e53555c0ad5347f5eb12a8f0d66e4da96028e387972d07e8aaa2b27499d8f29ec492186032e08f96193c55beb3b5bc3afa47d14 WHIRLPOOL 394cf2e22af3bd1798322288cc51cca5bb8c808ea457cabae5e5a3212232fe74994b96d5a2c6fee8c130c304ba1ebc00856340b434ba35423e5bf416691d92a1
+MISC ChangeLog 3367 SHA256 b48873f9d77c5dd09f6b5b4a2e0ec680b5b3426d00c471e3fdd433698c21d859 SHA512 6658519e1c16cf6526599e04938ac285abf5d62a562d45c49f600ea49abf9e457c493df02f7d0bdc19139c85df2d9e660dc8df9c0bf8e5408074f04b09011c69 WHIRLPOOL 61665bab745f8866c2037143d14927ad174ae0d9c7f53c46557306f2b04bbddc31bad11db7cc6165877207d35615e32971d5a8570b50f34c7f5629e1974e48eb
+MISC ChangeLog-2015 4641 SHA256 9694e863de408970bef7561099c4ab2b11c3b04bad9b56dba25409f90f2eb606 SHA512 5c55b6cacad1db3879a857c0409b493f0d335d150ba333de69510038084a3b195ea6c36da3e594e9b93ed7ef0d05116e17601f3a611d71f76f0bbda0cd1b1293 WHIRLPOOL 2fd708c5797491ed1ace35f5bca86777e409710c092d14b23ddef76544a20b243e8b362bf7205933b51462cd49da788340ce7d8c574041c0554e6ac9b5f5df46
+MISC metadata.xml 513 SHA256 d7ede013c4b13941d7f92eab71b253b77846ca922a8431704b7ba2d9b5498932 SHA512 ed6ea7bdac5ed5e46e2f620881681807d9096299a0fe702abe11093cbddb70e3660b29a5bac30b003dcf4003ad455d431ba4e88eb7d5e939273a8049d74705e6 WHIRLPOOL 4dc854f6f6b9277771510bcd8300083fde7821c4f789c8283e6c88e6fc8b2ce54dbf544a11d032521b2135445f2977920b512fd958a4ffd3b468c5edaaccf9e5
diff --git a/sys-cluster/gearmand/files/gearmand-0.34-stdbool-h.patch b/sys-cluster/gearmand/files/gearmand-0.34-stdbool-h.patch
new file mode 100644
index 000000000000..37d2db62741d
--- /dev/null
+++ b/sys-cluster/gearmand/files/gearmand-0.34-stdbool-h.patch
@@ -0,0 +1,26 @@
+Ignore configure checks and include stdbool.h
+unconditionally, we're in 2016.
+
+--- gearmand-0.34/libhostile/called.c
++++ gearmand-0.34/libhostile/called.c
+@@ -41,6 +41,7 @@
+ #include <assert.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <stdbool.h>
+
+ __thread bool is_called_= false;
+ static __thread char** unique_ptr= NULL;
+--- gearmand-0.34/libhostile/called.h
++++ gearmand-0.34/libhostile/called.h
+@@ -36,9 +36,7 @@
+
+ #pragma once
+
+-#ifdef HAVE_STDBOOL_H
+-# include <stdbool.h>
+-#endif
++#include <stdbool.h>
+
+ bool is_called(void);
+ void set_called();
diff --git a/sys-cluster/gearmand/files/gearmand.conf.d b/sys-cluster/gearmand/files/gearmand.conf.d
new file mode 100644
index 000000000000..aeb49d5c6b9e
--- /dev/null
+++ b/sys-cluster/gearmand/files/gearmand.conf.d
@@ -0,0 +1,39 @@
+# /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|tokyocabinet|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.2 b/sys-cluster/gearmand/files/gearmand.init.d.2
new file mode 100644
index 000000000000..48d19bd1dc8b
--- /dev/null
+++ b/sys-cluster/gearmand/files/gearmand.init.d.2
@@ -0,0 +1,78 @@
+#!/sbin/openrc-run
+# Copyright 2009-2012 Pavel Stratil, senbonzakura.eu
+# Distributed under the terms of the MIT license
+
+pidfile=/var/run/gearmand/gearmand.pid
+command=/usr/sbin/gearmand
+
+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."
+ ;;
+ tokyocabinet)
+ GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libtokyocabinet --libtokyocabinet-file=${PERSISTENT_FILE}"
+ ;;
+ 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
+
+
+ checkpath -d -m 0755 -o gearmand:nogroup /var/run/gearmand /var/log/gearmand
+
+ 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 $?
+}
diff --git a/sys-cluster/gearmand/gearmand-0.34-r1.ebuild b/sys-cluster/gearmand/gearmand-0.34-r1.ebuild
new file mode 100644
index 000000000000..846d47261961
--- /dev/null
+++ b/sys-cluster/gearmand/gearmand-0.34-r1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-utils eutils flag-o-matic libtool user
+
+DESCRIPTION="Generic framework to farm out work to other machines"
+HOMEPAGE="http://www.gearman.org/"
+SRC_URI="https://launchpad.net/gearmand/trunk/${PV}/+download/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug tcmalloc +memcache sqlite tokyocabinet postgres"
+
+RDEPEND="dev-libs/libevent
+ >=dev-libs/boost-1.39:=[threads(+)]
+ || ( >=sys-apps/util-linux-2.16 <sys-libs/e2fsprogs-libs-1.41.8 )
+ tcmalloc? ( dev-util/google-perftools )
+ memcache? ( >=dev-libs/libmemcached-0.47 )
+ sqlite? ( dev-db/sqlite:3 )
+ tokyocabinet? ( dev-db/tokyocabinet )
+ postgres? ( >=dev-db/postgresql-9.0:* )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/boost-m4-0.4_p20160328"
+
+pkg_setup() {
+ enewuser gearmand -1 -1 /dev/null nogroup
+}
+
+src_prepare() {
+ # fixes bug 574558, which is due to an outdated bundled boost.m4
+ rm m4/boost.m4 || die
+ sed -i -e 's/AM_INIT_AUTOMAKE.*//g' m4/pandora_canonical.m4 || die
+ epatch -p1 "${FILESDIR}/${P}-stdbool-h.patch"
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable memcache libmemcached)
+ $(use_enable tcmalloc)
+ $(use_enable tokyocabinet libtokyocabinet)
+ $(use_with postgres postgresql)
+ $(use_with sqlite sqlite3)
+ --disable-mtmalloc
+ --disable-static
+ )
+
+ # 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-cppflags -DDEBUG
+ fi
+
+ # Explicitly enable c++11 mode
+ append-cxxflags -std=c++11
+
+ autotools-utils_src_configure
+}
+
+src_test() {
+ # Since libtool is stupid and doesn't discard /usr/lib64 from the
+ # load path, we'd end up testing against the installed copy of
+ # gearmand (bad).
+ #
+ # We thus cheat and "fix" the scripts by hand.
+ sed -i -e '/LD_LIBRARY_PATH=/s|/usr/lib64:||' "${BUILD_DIR}"/tests/*_test \
+ || die "test fixing failed"
+
+ autotools-utils_src_test
+}
+
+DOCS=( README AUTHORS ChangeLog )
+
+src_install() {
+ autotools-utils_src_install
+
+ newinitd "${FILESDIR}"/gearmand.init.d.2 gearmand
+ newconfd "${FILESDIR}"/gearmand.conf.d gearmand
+}
+
+pkg_postinst() {
+ elog ""
+ elog "Unless you set the PERSISTENT_TABLE option in"
+ elog "/etc/conf.d/gearmand, Gearmand will use table 'queue'."
+ elog "If such table doesn't exist, Gearmand will create it for you"
+ elog ""
+}
diff --git a/sys-cluster/gearmand/metadata.xml b/sys-cluster/gearmand/metadata.xml
new file mode 100644
index 000000000000..d08fb72aef86
--- /dev/null
+++ b/sys-cluster/gearmand/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+ <use>
+ <flag name="memcache">
+ Support memcache daemon (via <pkg>dev-libs/libmemcached</pkg>)
+ for the queue storage.
+ </flag>
+ <flag name="tokyocabinet">
+ Support <pkg>dev-db/tokyocabinet</pkg> for the queue storage.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="launchpad">gearmand</remote-id>
+ </upstream>
+</pkgmetadata>