summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Bidulock2017-05-19 16:16:08 -0600
committerBrian Bidulock2017-05-19 16:16:08 -0600
commit8d2b220b162204c1be908e19b55c4ccdf2030f74 (patch)
tree387dbe3f41c3edd7795a9531b364acd0d1c4aefb
parent216df021aae3fa39913cfcbade0e0f0c24740f09 (diff)
downloadaur-8d2b220b162204c1be908e19b55c4ccdf2030f74.tar.gz
user handling to work around bug
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD30
-rw-r--r--pacemaker.install14
-rw-r--r--pacemaker.sysusers3
-rw-r--r--pacemaker.tmpfiles5
5 files changed, 40 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5c8ccd5ac0f..c44d9bb22e7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,32 +1,32 @@
pkgbase = pacemaker-git
pkgdesc = advanced, scalable high-availability cluster resource manager
pkgver = 1.1.17.rc1.r20.g49eb595ab
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/ClusterLabs/pacemaker/
+ install = pacemaker.install
arch = i686
arch = x86_64
license = GPL2
makedepends = git
makedepends = libxml2
makedepends = inkscape
+ makedepends = help2man
+ makedepends = asciidoc
depends = gnutls
depends = glib2
depends = pam
depends = libtool
depends = python
depends = libxslt
- depends = corosync-git
depends = libesmtp
+ depends = corosync-git
depends = libqb-git
+ depends = resource-agents-git
provides = pacemaker
conflicts = pacemaker
source = pacemaker-git::git+https://github.com/ClusterLabs/pacemaker.git
- source = pacemaker.sysusers
- source = pacemaker.tmpfiles
source = crm_report.in
md5sums = SKIP
- md5sums = f21b93a2bb62d54b69b9bd4427201707
- md5sums = 3339ef9d5124e722800b0aeda16f464c
md5sums = 07f26ba3fff0749cc5bc5b4da154611d
pkgname = pacemaker-git
diff --git a/PKGBUILD b/PKGBUILD
index 45f1da69422..ba926e3927a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,22 +6,20 @@
pkgname=pacemaker-git
_pkgname=pacemaker
pkgver=1.1.17.rc1.r20.g49eb595ab
-pkgrel=2
+pkgrel=3
pkgdesc="advanced, scalable high-availability cluster resource manager"
arch=('i686' 'x86_64')
url="https://github.com/ClusterLabs/${_pkgname}/"
license=('GPL2')
-makedepends=('git' 'libxml2' 'inkscape')
-depends=('gnutls' 'glib2' 'pam' 'libtool' 'python' 'libxslt' 'corosync-git' 'libesmtp' 'libqb-git')
+makedepends=('git' 'libxml2' 'inkscape' 'help2man' 'asciidoc')
+depends=('gnutls' 'glib2' 'pam' 'libtool' 'python' 'libxslt' 'libesmtp'
+ 'corosync-git' 'libqb-git' 'resource-agents-git')
provides=(${_pkgname})
conflicts=(${_pkgname})
+install=${_pkgname}.install
source=("$pkgname::git+https://github.com/ClusterLabs/${_pkgname}.git"
- 'pacemaker.sysusers'
- 'pacemaker.tmpfiles'
'crm_report.in')
md5sums=('SKIP'
- 'f21b93a2bb62d54b69b9bd4427201707'
- '3339ef9d5124e722800b0aeda16f464c'
'07f26ba3fff0749cc5bc5b4da154611d')
pkgver() {
@@ -72,8 +70,20 @@ package() {
make DESTDIR="${pkgdir}" install
cd "$srcdir"
install -dm755 "$pkgdir"/usr/lib/{tmpfiles.d,sysusers.d}
- install -Dm644 $_pkgname.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/$_pkgname.conf"
- install -Dm644 $_pkgname.sysusers "$pkgdir/usr/lib/sysusers.d/$_pkgname.conf"
+ install -Dm644 /dev/null "$pkgdir/usr/lib/tmpfiles.d/$_pkgname.conf"
+ cat>"$pkgdir/usr/lib/tmpfiles.d/$_pkgname.conf"<<-EOF
+ D /var/lib/pacemaker 0770 hacluster haclient
+ d /var/lib/pacemaker/blackbox 0770 hacluster haclient
+ d /var/lib/pacemaker/cib 0770 hacluster haclient
+ d /var/lib/pacemaker/cores 0770 hacluster haclient
+ d /var/lib/pacemaker/pengine 0770 hacluster haclient
+ EOF
+# install -Dm644 /dev/null "$pkgdir/usr/lib/sysusers.d/$_pkgname.conf"
+# cat>"$pkgdir/usr/lib/sysusers.d/$_pkgname.conf"<<-EOF
+# u hacluster 189 "Cluster User"
+# g haclient 189 -
+# m 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
@@ -84,4 +94,4 @@ package() {
install -Dm755 crm_report.in "$pkgdir/usr/bin/crm_report"
}
-# vim: set sw=2 et:
+# vim: set sw=2 et ts=2:
diff --git a/pacemaker.install b/pacemaker.install
new file mode 100644
index 00000000000..ce537fb2fa1
--- /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
+}
+
diff --git a/pacemaker.sysusers b/pacemaker.sysusers
deleted file mode 100644
index 7ef9892f430..00000000000
--- a/pacemaker.sysusers
+++ /dev/null
@@ -1,3 +0,0 @@
-u hacluster - "Cluster User"
-g haclient - -
-m hacluster haclient
diff --git a/pacemaker.tmpfiles b/pacemaker.tmpfiles
deleted file mode 100644
index d3c062831b2..00000000000
--- a/pacemaker.tmpfiles
+++ /dev/null
@@ -1,5 +0,0 @@
-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