aboutsummaryrefslogtreecommitdiff
path: root/testing/cluster-glue
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/cluster-glue
parentb758cfb575b2f9d7158040a9d72ec00086da0e7d (diff)
downloadalpine_aports-efd20b4ba26de55485f2e8c15b1d61ce8501ecc2.tar.bz2
alpine_aports-efd20b4ba26de55485f2e8c15b1d61ce8501ecc2.tar.xz
alpine_aports-efd20b4ba26de55485f2e8c15b1d61ce8501ecc2.zip
testing/cluster-glue: new aport
Diffstat (limited to 'testing/cluster-glue')
-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 0000000000..fff85b0033
--- /dev/null
+++ b/testing/cluster-glue/1.0.7-fix_configure.patch
@@ -0,0 +1,13 @@
1Fix enable/disable of libnet
2
3--- a/configure.ac 2010-12-06 18:17:03.000000000 +0100
4+++ b/configure.ac 2011-01-11 13:22:16.271977100 +0100
5@@ -928,7 +928,7 @@
6
7 AC_ARG_ENABLE([libnet],
8 [ --enable-libnet Use libnet for ARP based funcationality, [default=try]],
9- [enable_libnet=$withval], [enable_libnet=try])
10+ [], [enable_libnet=try])
11
12 libnet=""
13 libnet_version="none"
diff --git a/testing/cluster-glue/APKBUILD b/testing/cluster-glue/APKBUILD
new file mode 100644
index 0000000000..68276bea15
--- /dev/null
+++ b/testing/cluster-glue/APKBUILD
@@ -0,0 +1,67 @@
1# Contributor: Carlo Landmeter <clandmeter@gmail.com>
2# Maintainer:
3pkgname=cluster-glue
4pkgver=1.0.8
5pkgrel=0
6pkgdesc="A set of libraries, tools and utilities suitable for the Heartbeat/Pacemaker cluster stack."
7url="http://linux-ha.org/wiki/Cluster_Glue"
8arch="all"
9license="GPL"
10depends=""
11depends_dev="net-snmp-dev libxml2-dev glib-dev bzip2-dev curl-dev e2fsprogs-dev"
12makedepends="$depends_dev libtool autoconf automake libltdl libuuid"
13install=""
14pkggroups="haclient"
15pkgusers="hacluster"
16subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
17source="http://hg.linux-ha.org/glue/archive/glue-$pkgver.tar.bz2
18 1.0.7-fix_configure.patch
19 ha_logd.initd
20 $pkgname.post-install
21 $pkgname.pre-install"
22
23_builddir="$srcdir"/Reusable-Cluster-Components-glue--glue-$pkgver
24
25prepare() {
26 local i
27 cd "$_builddir"
28 for i in $source; do
29 case $i in
30 *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
31 esac
32 done
33}
34
35build() {
36 cd "$_builddir"
37 ./autogen.sh
38 ./configure --prefix=/usr \
39 --localstatedir=/var \
40 --enable-fatal-warnings=no \
41 --with-daemon-group="$pkggroups" \
42 --with-daemon-user="$pkgusers"
43 make || return 1
44}
45
46package() {
47 cd "$_builddir"
48 make DESTDIR="${pkgdir}" install || return 1
49 find "$pkgdir"/usr/lib -name *.la -delete || return 1
50 rm -rf "$pkgdir"/etc/init.d
51 # initd file needs fixing
52 #install -m755 -D "$srcdir"/ha_logd.initd \
53 # "$pkgdir"/etc/init.d/ha_logd || return 1
54}
55
56libs() {
57 pkgdesc="A collection of libraries that are useful for writing cluster managers such as Pacemaker."
58 mkdir -p "$subpkgdir"/usr/lib
59 mv "$pkgdir"/usr/lib/lib*.so.* \
60 "$subpkgdir"/usr/lib/ || return 1
61}
62
63md5sums="6cbeaed8b108cfac9ae693e8ab333283 glue-1.0.8.tar.bz2
6449cf61a00828bfc4590b308baabe429d 1.0.7-fix_configure.patch
652702ce634ba869dbe59d70a23829a053 ha_logd.initd
66d63b0532d08e602d714e8cabaa628158 cluster-glue.post-install
67fb252beedb92eab87b07c3547f18a4c3 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 0000000000..da7c4fe93e
--- /dev/null
+++ b/testing/cluster-glue/cluster-glue.post-install
@@ -0,0 +1,7 @@
1#!/bin/sh
2
3chown -R hacluster:haclient /var/lib/heartbeat/cores
4chown -R hacluster:haclient /var/lib/heartbeat/lrm
5
6exit 0
7
diff --git a/testing/cluster-glue/cluster-glue.pre-install b/testing/cluster-glue/cluster-glue.pre-install
new file mode 100644
index 0000000000..4e7f2f5ba0
--- /dev/null
+++ b/testing/cluster-glue/cluster-glue.pre-install
@@ -0,0 +1,11 @@
1#!/bin/sh
2
3addgroup haclient 2>/dev/null
4adduser hacluster \
5 -h /var/lib/heartbeat/cores/hacluster \
6 -G haclient \
7 -s /sbin/nologin \
8 2>/dev/null
9
10exit 0
11
diff --git a/testing/cluster-glue/ha_logd.initd b/testing/cluster-glue/ha_logd.initd
new file mode 100644
index 0000000000..3d318e7ae5
--- /dev/null
+++ b/testing/cluster-glue/ha_logd.initd
@@ -0,0 +1,46 @@
1#!/sbin/runscript
2
3PIDFILE=/var/run/heartbeat-logd.pid
4
5depend() {
6 need net
7}
8
9BINARY="/usr/%libdir%/heartbeat/ha_logd"
10USER="hacluster"
11GROUP="haclient"
12CONFIG="/etc/logd.cf"
13LOGFILE="/var/log/ha_logger.log"
14
15start() {
16 ebegin "Starting heartbeat non-blocking log service"
17
18 COMMAND_ARGS="-d"
19 [[ -f "${CONFIG}" ]] && COMMAND_ARGS+=" -c ${CONFIG}"
20
21 if [ -n "${RC_UNAME}" ]; then
22 PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' -- ${ARGS}"
23 else
24 PARAMS="-- ${ARGS} >> '${LOGFILE}' 2>&1 &"
25 fi
26 eval ${CHRT} start-stop-daemon \
27 --quiet --start --chdir "${RUNTIMEDIR}" \
28 --pidfile "${PIDFILE}" \
29 --make-pidfile \
30 --exec ${BINARY} ${COMMAND_ARGS} --chuid "${USER}:${GROUP}" \
31 ${PARAMS}
32 eend $?
33}
34
35stop() {
36 ebegin "Stopping heartbeat non-blocking log service"
37 start-stop-daemon --stop --retry 3 --quiet --exec "${BINARY}"
38 rm -f "${PIDFILE}"
39 eend $?
40}
41
42restart() {
43 stop
44 sleep 3
45 start
46}