diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-10-28 13:16:31 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-10-28 13:18:51 +0000 |
commit | 4902259939de4d1ac9885cb639af4e6d77f4faa3 (patch) | |
tree | d3542cf3357d7bc8c8a0f8569b1499ba473d4407 /testing/pacemaker | |
parent | 707f516c1fba27617f069093c96b245d291cee1c (diff) | |
download | aports-4902259939de4d1ac9885cb639af4e6d77f4faa3.tar.bz2 aports-4902259939de4d1ac9885cb639af4e6d77f4faa3.tar.xz |
testing/pacemacer: upgrade to 1.1.12 and fix build with musl
Diffstat (limited to 'testing/pacemaker')
-rw-r--r-- | testing/pacemaker/APKBUILD | 70 | ||||
-rw-r--r-- | testing/pacemaker/fix-SIGCHLD.patch | 11 | ||||
-rw-r--r-- | testing/pacemaker/fix-headers.patch | 11 | ||||
-rw-r--r-- | testing/pacemaker/pacemaker.initd | 39 |
4 files changed, 131 insertions, 0 deletions
diff --git a/testing/pacemaker/APKBUILD b/testing/pacemaker/APKBUILD new file mode 100644 index 0000000000..e784c79016 --- /dev/null +++ b/testing/pacemaker/APKBUILD @@ -0,0 +1,70 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: +pkgname=pacemaker +pkgver=1.1.12 +pkgrel=0 +pkgdesc="Scalable High-Availability cluster resource manager" +url="http://www.clusterlabs.org" +arch="all" +license="GPL2" +depends="" +depends_dev="glib-dev libxml2-dev libxslt-dev bzip2-dev gnutls-dev + cluster-glue-dev resource-agents-dev corosync-dev" +makedepends="$depends_dev automake autoconf libtool libltdl wget docbook-xsl" +install="" +subpackages="$pkgname-doc $pkgname-dev" +source="$pkgname-$pkgver.tar.gz::https://github.com/ClusterLabs/pacemaker/archive/Pacemaker-$pkgver.tar.gz + fix-headers.patch + fix-SIGCHLD.patch + $pkgname.initd" + +_builddir="$srcdir"/pacemaker-Pacemaker-$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 + libtoolize --force && aclocal -I m4 && autoheader && autoconf \ + && automake --add-missing || return 1 +} + +build() { + cd "$_builddir" + ./configure \ + --enable-fatal-warnings=no \ + --with-corosync + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install || return 1 + rm -f "$pkgdir"/usr/lib*/*.la + rm -f "$pkgdir"/usr/lib*/heartbeat/plugins/RAExec/*.la + install -m755 -D "$srcdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/$pkgname || return 1 + +} + +libs() { + pkgdesc="$pkgname libraries" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/lib*.so.* \ + "$subpkgdir"/usr/lib/ +} + +md5sums="c5c28013efb08441ab74a12034d9e9b4 pacemaker-1.1.12.tar.gz +fad579ccd7adf446c2037329961772ab fix-headers.patch +6af4189cd1c2dbd23f5e9e13a330de86 fix-SIGCHLD.patch +aca8b793c4a977294121615ed3ce6398 pacemaker.initd" +sha256sums="f5c72b609fac18d362880d120f08f990e8afd9388e6ff86c55cd93900ba54d9c pacemaker-1.1.12.tar.gz +48e2fb2432175eeceebfa77f00506d5175f2eaa88206d3efe92e0c8dc0a60b91 fix-headers.patch +d0118f3ce94dcc9fbccda9777a0ea864a01a08b7dfc400ea48e85795890a7603 fix-SIGCHLD.patch +0253da4a3a91d8c3aa7badd30062cbba32a0626b77f1a27db1d731d1bbe133af pacemaker.initd" +sha512sums="cf88a313f5e91f445a159a5d800d27fd891f63c082c92d3f09bfd2aff856325e8ef6e0ebab8c0b2b9cd6eb15cc593c58c8e23e888e17d5286ebc651dd096f9c1 pacemaker-1.1.12.tar.gz +fbd60b0f7117b1dd645494db12bb5730cd8aeb7b3424affe7141bf7e6bd74ab5bab65ebe7ebf718788002c413bbe003bab7d0f8424f11265fdb0515b44d1a4e6 fix-headers.patch +289a8ee8d3def43d672f321643eb7c9ab7c1c46f0a05d9532d130ca06057949cc4528defa7d564751b49aeda7a008d438750fab0050e35388277e2c593b95903 fix-SIGCHLD.patch +ccd15fb4401863e51cf7639f3f143e35a969b11a53e0fcff49f70f33e78975051c7b879a299c082951e0b10db32eb9f53a52aaadfaab27cd27cc85be742e264a pacemaker.initd" diff --git a/testing/pacemaker/fix-SIGCHLD.patch b/testing/pacemaker/fix-SIGCHLD.patch new file mode 100644 index 0000000000..b221600284 --- /dev/null +++ b/testing/pacemaker/fix-SIGCHLD.patch @@ -0,0 +1,11 @@ +--- ./tools/crm_mon.c.orig ++++ ./tools/crm_mon.c +@@ -518,7 +518,7 @@ + + #if !defined (ON_DARWIN) && !defined (ON_BSD) + /* prevent zombies */ +- signal(SIGCLD, SIG_IGN); ++ signal(SIGCHLD, SIG_IGN); + #endif + + if (strcmp(crm_system_name, "crm_mon.cgi") == 0) { diff --git a/testing/pacemaker/fix-headers.patch b/testing/pacemaker/fix-headers.patch new file mode 100644 index 0000000000..c343ecfcb5 --- /dev/null +++ b/testing/pacemaker/fix-headers.patch @@ -0,0 +1,11 @@ +--- ./lib/cib/cib_remote.c.orig ++++ ./lib/cib/cib_remote.c +@@ -53,7 +53,7 @@ + #endif + + #include <arpa/inet.h> +-#ifndef ON_BSD ++#ifdef HAVE_SGTTY_H + # include <sgtty.h> + #endif + diff --git a/testing/pacemaker/pacemaker.initd b/testing/pacemaker/pacemaker.initd new file mode 100644 index 0000000000..4231425f88 --- /dev/null +++ b/testing/pacemaker/pacemaker.initd @@ -0,0 +1,39 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pacemaker/files/pacemaker.initd,v 1.1 2011/02/21 14:39:28 ultrabug Exp $ + +PIDFILE=/var/run/pacemaker.pid + +depend() { + need net corosync + use syslog +} + +start() { + nc=0 + ebegin "Starting Pacemaker Cluster Manager" + einfon "Waiting for Corosync startup ." + while true; do + /usr/sbin/corosync-cfgtool -s &>/dev/null && break + nc=$(expr $nc + 1) + if [ $nc -gt 30 ]; then + echo + eend 1 "Failed to detect Corosync startup, is it really running ?" + exit 1 + fi + sleep 1 + echo -n "." + done + echo + start-stop-daemon --start -q --exec /usr/sbin/pacemakerd \ + --pidfile "${PIDFILE}" --make-pidfile --background \ + -- -f + eend $? +} + +stop() { + ebegin "Stopping Pacemaker Cluster Manager" + start-stop-daemon --stop -q --pidfile "${PIDFILE}" + eend $? +} |