summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2011-11-03 15:02:42 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2011-11-03 15:02:42 +0000
commitefd20b4ba26de55485f2e8c15b1d61ce8501ecc2 (patch)
tree22296b0d71d6eb39ba506848e946931dcc0afe23 /testing
parentb758cfb575b2f9d7158040a9d72ec00086da0e7d (diff)
downloadaports-efd20b4ba26de55485f2e8c15b1d61ce8501ecc2.tar.bz2
aports-efd20b4ba26de55485f2e8c15b1d61ce8501ecc2.tar.xz
testing/cluster-glue: new aport
Diffstat (limited to 'testing')
-rw-r--r--testing/cluster-glue/1.0.7-fix_configure.patch13
-rw-r--r--testing/cluster-glue/APKBUILD67
-rw-r--r--testing/cluster-glue/cluster-glue.post-install7
-rw-r--r--testing/cluster-glue/cluster-glue.pre-install11
-rw-r--r--testing/cluster-glue/ha_logd.initd46
5 files changed, 144 insertions, 0 deletions
diff --git a/testing/cluster-glue/1.0.7-fix_configure.patch b/testing/cluster-glue/1.0.7-fix_configure.patch
new file mode 100644
index 000000000..fff85b003
--- /dev/null
+++ b/testing/cluster-glue/1.0.7-fix_configure.patch
@@ -0,0 +1,13 @@
+Fix enable/disable of libnet
+
+--- a/configure.ac 2010-12-06 18:17:03.000000000 +0100
++++ b/configure.ac 2011-01-11 13:22:16.271977100 +0100
+@@ -928,7 +928,7 @@
+
+ AC_ARG_ENABLE([libnet],
+ [ --enable-libnet Use libnet for ARP based funcationality, [default=try]],
+- [enable_libnet=$withval], [enable_libnet=try])
++ [], [enable_libnet=try])
+
+ libnet=""
+ libnet_version="none"
diff --git a/testing/cluster-glue/APKBUILD b/testing/cluster-glue/APKBUILD
new file mode 100644
index 000000000..68276bea1
--- /dev/null
+++ b/testing/cluster-glue/APKBUILD
@@ -0,0 +1,67 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=cluster-glue
+pkgver=1.0.8
+pkgrel=0
+pkgdesc="A set of libraries, tools and utilities suitable for the Heartbeat/Pacemaker cluster stack."
+url="http://linux-ha.org/wiki/Cluster_Glue"
+arch="all"
+license="GPL"
+depends=""
+depends_dev="net-snmp-dev libxml2-dev glib-dev bzip2-dev curl-dev e2fsprogs-dev"
+makedepends="$depends_dev libtool autoconf automake libltdl libuuid"
+install=""
+pkggroups="haclient"
+pkgusers="hacluster"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
+source="http://hg.linux-ha.org/glue/archive/glue-$pkgver.tar.bz2
+ 1.0.7-fix_configure.patch
+ ha_logd.initd
+ $pkgname.post-install
+ $pkgname.pre-install"
+
+_builddir="$srcdir"/Reusable-Cluster-Components-glue--glue-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./autogen.sh
+ ./configure --prefix=/usr \
+ --localstatedir=/var \
+ --enable-fatal-warnings=no \
+ --with-daemon-group="$pkggroups" \
+ --with-daemon-user="$pkgusers"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="${pkgdir}" install || return 1
+ find "$pkgdir"/usr/lib -name *.la -delete || return 1
+ rm -rf "$pkgdir"/etc/init.d
+ # initd file needs fixing
+ #install -m755 -D "$srcdir"/ha_logd.initd \
+ # "$pkgdir"/etc/init.d/ha_logd || return 1
+}
+
+libs() {
+ pkgdesc="A collection of libraries that are useful for writing cluster managers such as Pacemaker."
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/lib*.so.* \
+ "$subpkgdir"/usr/lib/ || return 1
+}
+
+md5sums="6cbeaed8b108cfac9ae693e8ab333283 glue-1.0.8.tar.bz2
+49cf61a00828bfc4590b308baabe429d 1.0.7-fix_configure.patch
+2702ce634ba869dbe59d70a23829a053 ha_logd.initd
+d63b0532d08e602d714e8cabaa628158 cluster-glue.post-install
+fb252beedb92eab87b07c3547f18a4c3 cluster-glue.pre-install"
diff --git a/testing/cluster-glue/cluster-glue.post-install b/testing/cluster-glue/cluster-glue.post-install
new file mode 100644
index 000000000..da7c4fe93
--- /dev/null
+++ b/testing/cluster-glue/cluster-glue.post-install
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+chown -R hacluster:haclient /var/lib/heartbeat/cores
+chown -R hacluster:haclient /var/lib/heartbeat/lrm
+
+exit 0
+
diff --git a/testing/cluster-glue/cluster-glue.pre-install b/testing/cluster-glue/cluster-glue.pre-install
new file mode 100644
index 000000000..4e7f2f5ba
--- /dev/null
+++ b/testing/cluster-glue/cluster-glue.pre-install
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+addgroup haclient 2>/dev/null
+adduser hacluster \
+ -h /var/lib/heartbeat/cores/hacluster \
+ -G haclient \
+ -s /sbin/nologin \
+ 2>/dev/null
+
+exit 0
+
diff --git a/testing/cluster-glue/ha_logd.initd b/testing/cluster-glue/ha_logd.initd
new file mode 100644
index 000000000..3d318e7ae
--- /dev/null
+++ b/testing/cluster-glue/ha_logd.initd
@@ -0,0 +1,46 @@
+#!/sbin/runscript
+
+PIDFILE=/var/run/heartbeat-logd.pid
+
+depend() {
+ need net
+}
+
+BINARY="/usr/%libdir%/heartbeat/ha_logd"
+USER="hacluster"
+GROUP="haclient"
+CONFIG="/etc/logd.cf"
+LOGFILE="/var/log/ha_logger.log"
+
+start() {
+ ebegin "Starting heartbeat non-blocking log service"
+
+ COMMAND_ARGS="-d"
+ [[ -f "${CONFIG}" ]] && COMMAND_ARGS+=" -c ${CONFIG}"
+
+ if [ -n "${RC_UNAME}" ]; then
+ PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' -- ${ARGS}"
+ else
+ PARAMS="-- ${ARGS} >> '${LOGFILE}' 2>&1 &"
+ fi
+ eval ${CHRT} start-stop-daemon \
+ --quiet --start --chdir "${RUNTIMEDIR}" \
+ --pidfile "${PIDFILE}" \
+ --make-pidfile \
+ --exec ${BINARY} ${COMMAND_ARGS} --chuid "${USER}:${GROUP}" \
+ ${PARAMS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping heartbeat non-blocking log service"
+ start-stop-daemon --stop --retry 3 --quiet --exec "${BINARY}"
+ rm -f "${PIDFILE}"
+ eend $?
+}
+
+restart() {
+ stop
+ sleep 3
+ start
+}