diff options
author | Márcio Alexandre Silva Delgado <coadde@lavabit.com> | 2013-05-27 04:47:14 -0300 |
---|---|---|
committer | Márcio Alexandre Silva Delgado <coadde@lavabit.com> | 2013-05-27 04:47:14 -0300 |
commit | 03649cd046aa9f240dbd167956c9238f3c1554a8 (patch) | |
tree | 990829dba6f62595c3b998a8eca714ca02e027b5 /pcr | |
parent | a561ee416b272c16e8e18dc36d7aca7eed680c06 (diff) |
cluster-glue(ha-glue): fixing pkg
Diffstat (limited to 'pcr')
-rw-r--r-- | pcr/cluster-glue/PKGBUILD | 160 | ||||
-rw-r--r-- | pcr/cluster-glue/cluster-glue.install (renamed from pcr/ha-glue/ha-glue.install) | 0 | ||||
-rw-r--r-- | pcr/ha-glue/PKGBUILD | 115 | ||||
-rw-r--r-- | pcr/ha-glue/ha-logd.service | 10 |
4 files changed, 160 insertions, 125 deletions
diff --git a/pcr/cluster-glue/PKGBUILD b/pcr/cluster-glue/PKGBUILD new file mode 100644 index 000000000..89b0af8ee --- /dev/null +++ b/pcr/cluster-glue/PKGBUILD @@ -0,0 +1,160 @@ +# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com> + +pkgname=cluster-glue +_pkgname1=${pkgname::7} +_pkgname2=${pkgname:8} +_pkgname=${_pkgname1^}_${_pkgname2^} +_grpname=linux-ha +pkgver=1.0.11 +pkgrel=8 +pkgdesc='Set of libraries, tools and utilities suitable for the Heartbeat/Pacemaker cluster stack' +arch=( + i686 + x86_64 + mips64el +) +url=http://$_grpname.org/wiki/$_pkgname +license=( + GPL2 + LGPL2.1 +) +group=$_grpname +depends=( + curl + dbus-glib + glib2 + libaio + libesmtp + libltdl + libnet + libxml2 + net-snmp + openhpi + #openipmi + python + util-linux + #vacm +) +optdepends=( + net-tools + openssh +) +makedepends=( + help2man + libxslt + lynx + net-tools + openssh + valgrind + w3m +) +provides=ha-$_pkgname2 +conflicts=ha-$_pkgname2 +replaces=ha-$_pkgname2 +install=$pkgname.install +source=http://hg.$_grpname.org/$_pkgname2/archive/$_pkgname2-$pkgver.tar.bz2 +sha512sums=35ac8ac555c39f24c11e3a768cc50eba051fe617edf4cdc0429dac73f45a472f144cfe6ec5faff575606f2b04ff76a2f732556d848b61410c2683d93ba928413 + +prepare() { + export _CLUSTER_USER=hacluster + export _CLUSTER_GROUP=haclient + _DGID=666 + _DUID=666 + + #verify the cluster user and group + if ! getent group $_CLUSTER_GROUP >/dev/null;then + msg 'BEFORE COMPILE THIS SOFTWARE YOU MUST CREATE A CLUSTER GROUP, EXECUTE AS ROOT:' + echo -e "# groupadd -r -g $_DGID $_CLUSTER_GROUP\n" + _EXITCODE=1 + fi + if ! getent passwd $_CLUSTER_USER >/dev/null;then + msg 'BEFORE COMPILE THIS SOFTWARE YOU MUST CREATE A CLUSTER USER, EXECUTE AS ROOT:' + echo -e "# useradd -r -g $_CLUSTER_GROUP -u $_DUID -d /var/lib/heartbeat/cores/$_CLUSTER_USER -s /sbin/nologin -c \"cluster user\" $_CLUSTER_USER\n" + _EXITCODE=1 + fi + if [[ $_EXITCODE -eq 1 ]] ;then + return 1 + fi + + cd $srcdir/Reusable-${_pkgname1^}-Components-$_pkgname2--$_pkgname2-$pkgver + sed -i 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|; + s| -O0||; + s|AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION)|AM_INIT_AUTOMAKE|; + s|${localstatedir}/lock ${localstatedir}/spool/lock ${localstatedir}/spool/locks ${localstatedir}/lock|/run/lock|; + s|/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin|/usr/bin|; + ' configure.ac + sed -i 's|INCLUDES|AM_CPPFLAGS|; + ' $(grep -rl INCLUDES . | grep Makefile.am) + sed -i 's|bin/sh|usr/bin/bash|; + ' $(grep -rl bin/sh .) + sed -i 's|usr/sbin|usr/bin|; + ' $(grep -rl usr/bin .) + sed -i 's| /bin| /usr/bin|; + ' $(grep -rl ' /bin' .) + sed -i 's| /sbin| /usr/bin|; + ' $(grep -rl ' /sbin' .) + sed -i 's|/var/lock|/run/lock|; + ' $(grep -rl /var/lock .) + sed -i 's|var/run|run|; + ' $(grep -rl var/run) + sed -i 's|Open Source|Free Software|; + ' $(grep -rl 'Open Source' .) + sed -i 's|opensource|freesoftware|; + ' $(grep -rl 'opensource' .) + sed -i '/Solaris, FreeBSD and Linux/ s|Linux|GNU/Linux|; + /sysDescr.0 = STRING: Linux/ s|Linux|GNU/Linux|; + /works only on Linux./ s|Linux|GNU/Linux|; + /UNIX, Linux/ s|Linux|GNU/Linux|; + /Logging Daemon for High-Availability Linux/ s|Linux|GNU/Linux|; + /This is what the Linux/ s|Linux|GNU/Linux|; + /Compiling for Linux platform/ s|Linux|GNU/Linux|; + /Like Linux/ s|Linux|GNU/Linux|; + /(e.g. Linux)/ s|Linux|GNU/Linux|; + /Linux, Solaris/ s|Linux|GNU/Linux|; + /Linux and Compaq Tru64 Unix/ s|Linux|GNU/Linux|; + ' $(grep -rl Linux .) +} + +build() { + cd $srcdir/Reusable-${_pkgname1^}-Components-$_pkgname2--$_pkgname2-$pkgver + setarch $CARCH ./autogen.sh + setarch $CARCH ./configure --prefix=/usr\ + --disable-ansi\ + --disable-fatal-warnings\ + --enable-doc\ + --enable-libnet\ + --enable-upstart\ + --libdir=/usr/lib\ + --localstatedir=/var\ + --sbindir=/usr/bin\ + --sysconfdir=/etc\ + --with-daemon-group=haclient\ + --with-daemon-user=hacluster\ + --with-ocf-root=/usr/lib/ocf + setarch $CARCH make +} + +package() { + cd $srcdir/Reusable-${_pkgname1^}-Components-$_pkgname2--$_pkgname2-$pkgver + setarch $CARCH make DESTDIR=$pkgdir install + + rm $pkgdir/etc/rc.d/logd && rmdir $pkgdir/etc{/rc.d,} + + install -d $pkgdir/usr/lib/systemd/system + echo '[Unit]' > $pkgdir/usr/lib/systemd/system/ha_log.service + echo 'Description=Startup script logd service' >> $pkgdir/usr/lib/systemd/system/ha_log.service + echo 'Requires=network.target remote-fs.target' >> $pkgdir/usr/lib/systemd/system/ha_log.service + echo '' >> $pkgdir/usr/lib/systemd/system/ha_log.service + echo '[Service]' >> $pkgdir/usr/lib/systemd/system/ha_log.service + echo 'Type=forking' >> $pkgdir/usr/lib/systemd/system/ha_log.service + echo 'ExecStart=/usr/lib/heartbeat/ha_logd' >> $pkgdir/usr/lib/systemd/system/ha_log.service + echo '' >> $pkgdir/usr/lib/systemd/system/ha_log.service + echo '[Install]' >> $pkgdir/usr/lib/systemd/system/ha_log.service + echo 'WantedBy=multi-user.target' >> $pkgdir/usr/lib/systemd/system/ha_log.service + + msg 'AFTER COMPILE THIS SOFTWARE YOU MUST DELETE A CLUSTER USER AND A CLUSTER GROUP, EXECUTE AS ROOT:' + echo -e "# userdel $_CLUSTER_USER" + echo -e "# groupdel $_CLUSTER_GROUP" +} + +# vim:set ts=2 sw=2 et: diff --git a/pcr/ha-glue/ha-glue.install b/pcr/cluster-glue/cluster-glue.install index 05e2160d3..05e2160d3 100644 --- a/pcr/ha-glue/ha-glue.install +++ b/pcr/cluster-glue/cluster-glue.install diff --git a/pcr/ha-glue/PKGBUILD b/pcr/ha-glue/PKGBUILD deleted file mode 100644 index ab23a80d2..000000000 --- a/pcr/ha-glue/PKGBUILD +++ /dev/null @@ -1,115 +0,0 @@ -# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com> - -pkgname=ha-glue -_pkgname=${pkgname:3} -pkgver=1.0.11 -pkgrel=7 -pkgdesc='Set of libraries, tools and utilities suitable for the Heartbeat/Pacemaker cluster stack' -arch=( - i686 - x86_64 - mips64el -) -url=http://linux-ha.org/wiki/Cluster_${_pkgname^} -license=( - GPL2 - LGPL2.1 -) -depends=( - curl - dbus-glib - glib2 - libaio - libesmtp - libnet - libxml2 - net-snmp - python - util-linux -) -optdepends=( - lynx - net-tools - openssh - valgrind - w3m -) -makedepends=( - help2man - libxslt - lynx - net-tools - openssh - valgrind - w3m -) -options=!libtool -install=$pkgname.install -source=( - http://hg.linux-ha.org/$_pkgname/archive/$_pkgname-$pkgver.tar.bz2 - ha-log.service -) -sha512sums=( - 35ac8ac555c39f24c11e3a768cc50eba051fe617edf4cdc0429dac73f45a472f144cfe6ec5faff575606f2b04ff76a2f732556d848b61410c2683d93ba928413 - 9252472a6d7a1bbad765c63becdec4064d882b1eb98abdf27833a6e06d8750f06663b2460d32a4c72d04f10a7480ef0a2093b8a18b4d1fc62a989cde54ee056a -) - -prepare() { - export _CLUSTER_USER=hacluster - export _CLUSTER_GROUP=haclient - _DGID=666 - _DUID=666 - - #verify the cluster user and group - if ! getent group $_CLUSTER_GROUP >/dev/null;then - msg 'BEFORE COMPILE THIS SOFTWARE YOU MUST CREATE A CLUSTER GROUP, EXECUTE AS ROOT:' - echo -e "# groupadd -r -g $_DGID $_CLUSTER_GROUP\n" - _EXITCODE=1 - fi - if ! getent passwd $_CLUSTER_USER >/dev/null;then - msg 'BEFORE COMPILE THIS SOFTWARE YOU MUST CREATE A CLUSTER USER, EXECUTE AS ROOT:' - echo -e "# useradd -r -g $_CLUSTER_GROUP -u $_DUID -d /var/lib/heartbeat/cores/$_CLUSTER_USER -s /sbin/nologin -c \"cluster user\" $_CLUSTER_USER\n" - _EXITCODE=1 - fi - if [[ $_EXITCODE -eq 1 ]] ;then - return 1 - fi - - cd $srcdir/Reusable-Cluster-Components-$_pkgname--$_pkgname-$pkgver - sed -i 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|; - s| -O0||; - s|AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION)|AM_INIT_AUTOMAKE|; - ' configure.ac - sed -i 's|INCLUDES|AM_CPPFLAGS|; - ' {lib/{clplumbing,lrm,pils,plugins/{InterfaceMgr,compress,lrm,stonith},stonith},logd,lrm/{admin,lrmd,test},replace}/Makefile.am -} - -build() { - cd $srcdir/Reusable-Cluster-Components-$_pkgname--$_pkgname-$pkgver - setarch $CARCH ./autogen.sh - setarch $CARCH ./configure --prefix=/usr\ - --disable-fatal-warnings\ - --enable-static=no\ - --enable-upstart\ - --libdir=/usr/lib\ - --localstatedir=/var\ - --sysconfdir=/etc\ - --with-daemon-group=haclient\ - --with-daemon-user=hacluster\ - --with-ocf-root=/usr/lib/ocf - setarch $CARCH make -} - -package() { - cd $srcdir/Reusable-Cluster-Components-$_pkgname--$_pkgname-$pkgver - setarch $CARCH make DESTDIR=$pkgdir install - - install -d $pkgdir/usr/lib/systemd/system - install -Dm644 $srcdir/ha-log.service $pkgdir/usr/lib/systemd/system - - msg 'AFTER COMPILE THIS SOFTWARE YOU MUST DELETE A CLUSTER USER AND A CLUSTER GROUP, EXECUTE AS ROOT:' - echo -e "# userdel $_CLUSTER_USER" - echo -e "# groupdel $_CLUSTER_GROUP" -} - -# vim:set ts=2 sw=2 et: diff --git a/pcr/ha-glue/ha-logd.service b/pcr/ha-glue/ha-logd.service deleted file mode 100644 index 1847d8cdd..000000000 --- a/pcr/ha-glue/ha-logd.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Startup script logd service. -Requires=network.target remote-fs.target - -[Service] -Type=forking -ExecStart=/usr/lib/heartbeat/ha_logd - -[Install] -WantedBy=multi-user.target |