diff options
author | Brian Bidulock | 2018-07-09 01:42:11 -0600 |
---|---|---|
committer | Brian Bidulock | 2018-07-09 01:42:11 -0600 |
commit | 82a00fa2057deae30ad9e5a440ca08aa400458bf (patch) | |
tree | 7987d1dd1dbb8149c2b7aba0bbc9b3610f21f306 | |
download | aur-82a00fa2057deae30ad9e5a440ca08aa400458bf.tar.gz |
initial version
-rw-r--r-- | .SRCINFO | 41 | ||||
-rw-r--r-- | PKGBUILD | 97 | ||||
-rw-r--r-- | crm_report.in | 24 | ||||
-rw-r--r-- | makefile-chown.patch | 36 | ||||
-rw-r--r-- | pacemaker.install | 14 |
5 files changed, 212 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2c04e2319896 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,41 @@ +pkgbase = pacemaker1.1-git + pkgdesc = advanced, scalable high-availability cluster resource manager (1.1 series) + pkgver = 1.1.19.rc1.r12.g15ea58519 + pkgrel = 1 + url = https://github.com/ClusterLabs/pacemaker/ + install = pacemaker.install + arch = i686 + arch = x86_64 + license = GPL2 + makedepends = git + makedepends = inkscape + makedepends = help2man + makedepends = asciidoc + depends = gnutls + depends = glib2 + depends = pam + depends = libtool + depends = python-lxml + depends = python-yaml + depends = libesmtp + depends = corosync + depends = libqb + depends = resource-agents + depends = fence-agents + depends = ha-glue + depends = net-snmp + optdepends = pssh: for use with some tools + optdepends = pdsh: for use with some tools + optdepends = crmsh: for use with crm_report + optdepends = booth: for geo-clustering + provides = pacemaker + conflicts = pacemaker + source = pacemaker1.1-git::git+https://github.com/ClusterLabs/pacemaker.git#branch=1.1 + source = crm_report.in + source = makefile-chown.patch + md5sums = SKIP + md5sums = 07f26ba3fff0749cc5bc5b4da154611d + md5sums = e621d388eb0521a7ef74205a5707508a + +pkgname = pacemaker1.1-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..73c5a104b54c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,97 @@ +# Maintainer: Brian Bidulock <bidulock@openss7.org> +# Contributor: gls <ghostlovescorebg at gmail dot com> +# Contributor: Thermi <noel at familie-kuntze dot de> +# Contributor: Tim Meusel <tim@bastelfreak.de> + +pkgname=pacemaker1.1-git +_pkgname=pacemaker +pkgver=1.1.19.rc1.r12.g15ea58519 +pkgrel=1 +pkgdesc="advanced, scalable high-availability cluster resource manager (1.1 series)" +arch=('i686' 'x86_64') +url="https://github.com/ClusterLabs/${_pkgname}/" +license=('GPL2') +makedepends=('git' 'inkscape' 'help2man' 'asciidoc') +depends=('gnutls' 'glib2' 'pam' 'libtool' 'python-lxml' 'python-yaml' 'libesmtp' + 'corosync' 'libqb' 'resource-agents' 'fence-agents' + 'ha-glue' 'net-snmp') +optdepends=('pssh: for use with some tools' + 'pdsh: for use with some tools' + 'crmsh: for use with crm_report' + 'booth: for geo-clustering') +provides=(${_pkgname}) +conflicts=(${_pkgname}) +install=${_pkgname}.install +source=("$pkgname::git+https://github.com/ClusterLabs/${_pkgname}.git#branch=1.1" + 'crm_report.in' + 'makefile-chown.patch') +md5sums=('SKIP' + '07f26ba3fff0749cc5bc5b4da154611d' + 'e621d388eb0521a7ef74205a5707508a') + +pkgver() { + cd $pkgname + git describe --long --tags | sed -E 's/^[^0-9]*//;s/([^-]*-g)/r\1/;s/-/./g' +} + +prepare() { + cd $pkgname + patch -Np2 -b -z .orig <../makefile-chown.patch + autoreconf -fiv +# ./autogen.sh +} + +build() { + cd $pkgname + ./configure \ + CPPFLAGS= \ + --sbindir=/usr/bin \ + --sysconfdir=/etc \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + --localstatedir=/var \ + --disable-static \ + --disable-fatal-warnings \ + --with-version=$pkgver-$pkgrel \ + --enable-systemd \ + --disable-upstart \ + --with-ais \ + --with-corosync \ + --without-heartbeat \ + --without-cman \ + --with-cs-quorum \ + --with-nagios \ + --with-snmp \ + --with-esmtp \ + --with-acl \ + --with-cibsecrets \ + --without-profiling \ + --without-coverage \ + --with-configdir=/etc/pacemaker +# --with-nagios-plugin-dir=DIR +# --with-nagios-metadata-dir=DIR + make V=0 +} + +package() { + cd $pkgname + make DESTDIR="${pkgdir}" install + cd "$srcdir" + install -Dm644 /dev/null "$pkgdir/usr/lib/tmpfiles.d/$_pkgname.conf" + cat>"$pkgdir/usr/lib/tmpfiles.d/$_pkgname.conf"<<-EOF + d /var/lib/pacemaker 0750 hacluster haclient + d /var/lib/pacemaker/blackbox 0750 hacluster haclient + d /var/lib/pacemaker/cib 0750 hacluster haclient + d /var/lib/pacemaker/cores 0750 hacluster haclient + d /var/lib/pacemaker/pengine 0750 hacluster haclient + EOF + rm -fr "$pkgdir/var" + chmod a+x "$pkgdir/usr/share/pacemaker/tests/cts/CTSlab.py" + find "$pkgdir" -name '*.xml' -type f -print0 | xargs -0 chmod a-x + rm -fr "$pkgdir/etc/init.d" + rm -f "$pkgdir/usr/bin/fence_pcmk" + mv "$pkgdir/usr/bin/crm_report" "$pkgdir/usr/bin/crm_report.pacemaker" + install -Dm755 crm_report.in "$pkgdir/usr/bin/crm_report" +} + +# vim: set sw=2 et ts=2: diff --git a/crm_report.in b/crm_report.in new file mode 100644 index 000000000000..c5dff3bdd4ae --- /dev/null +++ b/crm_report.in @@ -0,0 +1,24 @@ +#!/bin/sh +# +# Copyright (C) 2007 Dejan Muhamedagic <dmuhamedagic@suse.com> +# Copyright (C) 2015 Kristoffer Gronlund <kgronlund@suse.com> +# Copyright (C) 2015 Gao,Yan <ygao@suse.com> +# +# Replaced with crm report +PARENT_COMMAND="$(ps -o comm= $PPID)" +PROG="$(basename "$0")" + +die() { + echo "$PROG: $*" + exit 1 +} +[ "$(basename "$PARENT_COMMAND")" = "crm" ] && die "called itself in a loop, aborting" +if which crm > /dev/null 2>&1; then + crm report "$@" +elif [ -x /usr/sbin/crm ]; then + /usr/sbin/crm report "$@" +else + #die "crm_report has been deprecated: Please install crmsh, which replaces it" + /usr/sbin/crm_report.pacemaker "$@" +fi + diff --git a/makefile-chown.patch b/makefile-chown.patch new file mode 100644 index 000000000000..034091b19f0e --- /dev/null +++ b/makefile-chown.patch @@ -0,0 +1,36 @@ +diff -up src/pacemaker-Pacemaker-1.1.18/Makefile.am.orig src/pacemaker-Pacemaker-1.1.18/Makefile.am +--- src/pacemaker-Pacemaker-1.1.18/Makefile.am.orig 2018-04-19 23:26:43.000000000 -0600 ++++ src/pacemaker-Pacemaker-1.1.18/Makefile.am 2018-04-19 23:40:07.000000000 -0600 +@@ -67,13 +67,13 @@ install-exec-local: + $(INSTALL) -d -m 750 $(DESTDIR)/$(CRM_CONFIG_DIR) + $(INSTALL) -d -m 750 $(DESTDIR)/$(CRM_CORE_DIR) + $(INSTALL) -d -m 750 $(DESTDIR)/$(CRM_BLACKBOX_DIR) +- -chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_CONFIG_DIR) +- -chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_CORE_DIR) +- -chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_BLACKBOX_DIR) + if BUILD_CS_PLUGIN + rm -f $(DESTDIR)$(LCRSODIR)/pacemaker.lcrso $(DESTDIR)$(LCRSODIR)/service_crm.so + cp $(DESTDIR)$(libdir)/service_crm.so $(DESTDIR)$(LCRSODIR)/pacemaker.lcrso + endif ++# -chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_CONFIG_DIR) ++# -chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_CORE_DIR) ++# -chown $(CRM_DAEMON_USER):$(CRM_DAEMON_GROUP) $(DESTDIR)/$(CRM_BLACKBOX_DIR) + # Use chown because the user/group may not exist + + clean-generic: +diff -up src/pacemaker-Pacemaker-1.1.18/pengine/Makefile.am.orig src/pacemaker-Pacemaker-1.1.18/pengine/Makefile.am +--- src/pacemaker-Pacemaker-1.1.18/pengine/Makefile.am.orig 2018-04-19 23:26:29.000000000 -0600 ++++ src/pacemaker-Pacemaker-1.1.18/pengine/Makefile.am 2018-04-19 23:39:40.000000000 -0600 +@@ -80,9 +80,9 @@ pengine_SOURCES = main.c + + install-exec-local: + $(mkinstalldirs) $(DESTDIR)/$(PE_STATE_DIR) +- -chown $(CRM_DAEMON_USER) $(DESTDIR)/$(PE_STATE_DIR) +- -chgrp $(CRM_DAEMON_GROUP) $(DESTDIR)/$(PE_STATE_DIR) +- -chmod 750 $(DESTDIR)/$(PE_STATE_DIR) ++# -chown $(CRM_DAEMON_USER) $(DESTDIR)/$(PE_STATE_DIR) ++# -chgrp $(CRM_DAEMON_GROUP) $(DESTDIR)/$(PE_STATE_DIR) ++# -chmod 750 $(DESTDIR)/$(PE_STATE_DIR) + + uninstall-local: + diff --git a/pacemaker.install b/pacemaker.install new file mode 100644 index 000000000000..adf039e5698d --- /dev/null +++ b/pacemaker.install @@ -0,0 +1,14 @@ +post_install(){ : + usr/bin/getent group haclient >/dev/null || usr/bin/groupadd -r haclient -g 189 + usr/bin/getent passwd hacluster >/dev/null || usr/bin/useradd -r -g 189 -u 189 -s /sbin/nologin -c "cluster user" -d / hacluster +} + +post_upgrade(){ : +} + +post_remove(){ : + usr/bin/getent group haclient >/dev/null && usr/bin/groupdel -f haclient + usr/bin/getent passwd hacluster >/dev/null && usr/bin/userdel hacluster +# usr/bin/rm -fr var/lib/pacemaker +} + |