summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorMárcio Alexandre Silva Delgado <coadde@lavabit.com>2013-06-29 01:06:59 -0300
committerMárcio Alexandre Silva Delgado <coadde@lavabit.com>2013-06-29 01:06:59 -0300
commitf29b6c6483196ad948582f789330a35726899925 (patch)
tree731847b81c8d8c9ef0bfd7f731236c30b6b0f3c4 /pcr
parentfe1e5b0c12de72e6ca27ad36b318603c1ad3ba28 (diff)
downloadabslibre-f29b6c6483196ad948582f789330a35726899925.tar.gz
abslibre-f29b6c6483196ad948582f789330a35726899925.tar.bz2
abslibre-f29b6c6483196ad948582f789330a35726899925.zip
cluster-glue: fixing pkg
Diffstat (limited to 'pcr')
-rw-r--r--pcr/cluster-glue/PKGBUILD191
-rw-r--r--pcr/cluster-glue/fixing-path.sed29
-rw-r--r--pcr/cluster-glue/ha-log.service12
-rw-r--r--pcr/cluster-glue/replace-linux_os-to-gnulinux_os-term.sed73
-rw-r--r--pcr/cluster-glue/replace-opensource-to-free-term.sed15
5 files changed, 188 insertions, 132 deletions
diff --git a/pcr/cluster-glue/PKGBUILD b/pcr/cluster-glue/PKGBUILD
index 1a81e15d4..ca85bb979 100644
--- a/pcr/cluster-glue/PKGBUILD
+++ b/pcr/cluster-glue/PKGBUILD
@@ -5,7 +5,7 @@ _pkgname1=${pkgname::7}
_pkgname2=${pkgname:8}
_pkgname=${_pkgname1^}_${_pkgname2^}
pkgver=1.0.11
-pkgrel=12
+pkgrel=13
pkgdesc='Set of libraries, tools and utilities suitable for the Heartbeat/Pacemaker cluster stack (Linux-HA)'
arch=(
i686
@@ -31,14 +31,13 @@ depends=(
openhpi
openipmi
openssh
- python
+ python2
util-linux
- #vacm !!Is VA-Cluster Manager abandonware? - http://vacm.sourceforge.net/ - ver 2.0.5a - 2001/10/03!!
)
optdepends=net-tools
makedepends=(
help2man
- #libxslt
+ libxslt
lynx
net-tools
openssh
@@ -50,8 +49,20 @@ provides=(ha-$_pkgname2)
conflicts=ha-$_pkgname2
replaces=ha-$_pkgname2
install=$pkgname.install
-source=http://hg.$group.org/$_pkgname2/archive/$_pkgname2-$pkgver.tar.bz2
-sha512sums=35ac8ac555c39f24c11e3a768cc50eba051fe617edf4cdc0429dac73f45a472f144cfe6ec5faff575606f2b04ff76a2f732556d848b61410c2683d93ba928413
+source=(
+ http://hg.$group.org/$_pkgname2/archive/$_pkgname2-$pkgver.tar.bz2
+ ha-log.service
+ fixing-path.sed
+ replace-linux_os-to-gnulinux_os-term.sed
+ replace-opensource-to-free-term.sed
+)
+sha512sums=(
+ 35ac8ac555c39f24c11e3a768cc50eba051fe617edf4cdc0429dac73f45a472f144cfe6ec5faff575606f2b04ff76a2f732556d848b61410c2683d93ba928413
+ bb5bc5c5a9347302be583c43b100c0c3760ec4dcc3348a9f9708d5b2c58ec02dd5782c5ac9dcb86223258493ad3fba8ddd8dc5670390f0f602c34869b26bee6d
+ ce58a2af9f32265f12cc4984e9ae7f285fdb7737813ecccc0780015d048938d9dd79278635eb1cc6833f12f37a8c43211fec17411780220cf38fc44b91ecc076
+ e59386aee4db5857fa131798327aa449a5efcd7d50c3ab45dadfa0becc31698a62367ce83b85ca739bdebaad4a9daf96d02c42673a4e26294ec0fa67323fdb5b
+ 8280babf96e3324ed9fb6e4412c4a587530be9e21835036a5e8abe5437eb7199962d9c10bf15db6f5fb62a86ce7fcab3e48f4fa8391b18920ab5af4b6ff843c2
+)
prepare() {
export _CLUSTER_USER=hacluster
@@ -85,131 +96,58 @@ prepare() {
' $(grep -rlI INCLUDES | grep Makefile.am)
# fixing path
- sed -i 's|bin/sh|usr/bin/bash|;
- ' $(grep -rlI bin/sh)
- sed -i 's| /bin| /usr/bin|;
- ' $(grep -rlI ' /bin')
- sed -i 's| /sbin| /usr/bin|;
- ' $(grep -rlI ' /sbin')
- sed -i 's|usr/sbin|usr/bin|;
- ' $(grep -rlI usr/sbin)
- #sed -i 's|/lib64|/lib|;
- # ' $(grep -rlI /lib64)
- #sed -i 's|usr/libexec|usr/lib|;
- # ' $(grep -rlI usr/libexec)
- sed -i 's|var/lock|run/lock|;
- ' $(grep -rlI var/lock)
- sed -i 's|var/run|run|;
- ' $(grep -rlI var/run)
+ sed -i -f $srcdir/fixing-path.sed\
+ $(grep -rlI /bin)\
+ $(grep -rlI /sbin)\
+ $(grep -rlI /lib)\
+ $(grep -rlI /var)
- # remove Open Source term
- sed -i 's|Open Source / ||;
- s|open source / ||;
- s|Open Source|Free|;
- s|open source|free|;
- s|Free Software Development Lab|Open Source Development Lab|;
- ' $(grep -rilI 'open source')
- sed -i 's|OpenSource / ||;
- s|opensource / ||;
- s|OpenSource|Free|;
- s|opensource|free|;
- s|freesoftware.org|opensource.org|;
- s|http://www.opensource.org/|http://www.gnu.org/philosophy/free-sw.html|;
- s|http://www.gnu.org/philosophy/free-sw.htmllicenses/osl-|http://opensource.org/licenses/osl-|;
- s|http://www.gnu.org/philosophy/free-sw.htmlosd|http://opensource.org/osd|;
- ' $(grep -rilI opensource)
+ # fixing python2 path
+ sed -i 's|bin/env python|bin/env python2|g;
+ s|bin/python|bin/python2|g;
+ ' $(grep -rlI 'bin/env python')\
+ $(grep -rlI bin/python)
- # remove Linux term
- sed -i 's|Linux,|GNU/Linux,|;
- s|Linux and|GNU/Linux and|;
- s|Linux distro|GNU/Linux distro|;
- s|Linux distribution|GNU/Linux distribution|;
- s|Linux machine|GNU/Linux machine|;
- s|Linux Only|GNU/Linux Only|;
- s|Linux only|GNU/Linux only|;
- s|Linux operating|GNU/Linux operating|;
- s|Linux OS|GNU/Linux OS|;
- s|Linux platform|GNU/Linux platform|;
- s|Linux software|GNU/Linux software|;
- s|Linux specific|GNU/Linux specific|;
- s|Linux system|GNU/Linux system|;
- s|Linux will|GNU/Linux will|;
- s|# Linux$|# GNU/Linux|;
- s|# Linux.$|# GNU/Linux.|;
- s|* Linux$|* GNU/Linux|;
- s|* Linux.$|* GNU/Linux.|;
- s|// Linux$|// GNU/Linux|;
- s|// Linux.$|// GNU/Linux.|;
- s|, Linux|, GNU/Linux|;
- s|As Linux|As GNU/Linux|;
- s|as Linux|as GNU/Linux|;
- s|And Linux|And GNU/Linux|;
- s|and Linux|and GNU/Linux|;
- s|Be Linux|Be GNU/Linux|;
- s|be Linux|be GNU/Linux|;
- s|Because Linux|Because GNU/Linux|;
- s|because Linux|because GNU/Linux|;
- s|e.g. Linux|e.g. GNU/Linux|;
- s|For Linux|For GNU/Linux|;
- s|for Linux|for GNU/Linux|;
- s|In Linux|In GNU/Linux|;
- s|in Linux|in GNU/Linux|;
- s|Like Linux|Like GNU/Linux|;
- s|like Linux|like GNU/Linux|;
- s|non-Linux|non GNU/Linux|;
- s|Of Linux|Of GNU/Linux|;
- s|of Linux|of GNU/Linux|;
- s|On Linux|On GNU/Linux|;
- s|on Linux|on GNU/Linux|;
- s|OS type: Linux|OS type: GNU/Linux|;
- s|Other Linux|Other GNU/Linux|;
- s|other Linux|other GNU/Linux|;
- s|The Linux|The GNU/Linux|;
- s|the Linux|the GNU/Linux|;
- s|Typically Linux|Typically GNU/Linux|;
- s|typically Linux|typically GNU/Linux|;
- s|To Linux|To GNU/Linux|;
- s|to Linux|to GNU/Linux|;
- s|Under Linux|Under GNU/Linux|;
- s|under Linux|under GNU/Linux|;
- s|ArchGNU/Linux|ArchLinux|;
- s|e2fsprogs, typically GNU/Linux|e2fsprogs, typically Linux|;
- s|GNU/GNU|GNU|;
- s|GNU/Linux device|Linux device|;
- s|GNU/Linux Director Daemon|Linux Director Daemon|;
- s|GNU/Linux is a registered trademark of Linus Torvalds|Linux is a registered trademark of Linus Torvalds|;
- s|GNU/Linux kernel|Linux kernel|;
- s|GNU/Linux specific kernel|Linux specific kernel|;
- s|GNU/Linux Standard Base|Linux Standard Base|;
- s|GNU/Linux sysfs|Linux sysfs|;
- s|GNU/Linux Virtual Server|Linux Virtual Server|;
- s|GNU/Linux Watchdog|Linux Watchdog|;
- s|GNU/Linux watchdog|Linux watchdog|;
- s|GNU/LinuxHA|LinuxHA|;
- s|GNU/Linux-HA|Linux-HA|;
- s|GNU/LinuxSCSI|LinuxSCSI|;
- s|HA GNU/Linux|HA Linux|;
- s|High-Availability GNU/Linux|High-Availability Linux|;
- s|MkGNU/Linux|MkLinux|;
- s|SEGNU/Linux|SELinux|;
- s|VA GNU/Linux Cluster|VA Linux Cluster|;
- ' $(grep -rlI Linux)
-}
+ # remove Linux (OS) term to GNU/Linux (OS) term
+ sed -i -f $srcdir/replace-linux_os-to-gnulinux_os-term.sed\
+ $(grep -rlI Linux)
+
+ # replace Open Source term to Free term
+ sed -i -f $srcdir/replace-opensource-to-free-term.sed\
+ $(grep -rilI 'open.\{0,1\}source')
+#}
-build() {
+#build() { # disabled, due that is needed internet for generating man pages with libxslt.
cd $srcdir/Reusable-${_pkgname1^}-Components-$_pkgname2--$_pkgname2-$pkgver
setarch $CARCH ./autogen.sh
- setarch $CARCH ./configure --prefix=/usr\
+ setarch $CARCH ./configure\
+ --sysconfdir=/etc\
+ --prefix=/usr\
+ --exec-prefix=/usr\
+ --bindir=/usr/bin\
+ --sbindir=/usr/bin\
+ --includedir=/usr/include\
+ --oldincludedir=/usr/include\
+ --libdir=/usr/lib\
+ --libexecdir=/usr/lib\
+ --datarootdir=/usr/share\
+ --datadir=/usr/share\
+ --docdir=/usr/share/doc/$pkgname\
+ --dvidir=/usr/share/doc/$pkgname\
+ --htmldir=/usr/share/doc/$pkgname\
+ --pdfdir=/usr/share/doc/$pkgname\
+ --psdir=/usr/share/doc/$pkgname\
+ --infodir=/usr/share/info\
+ --localedir=/usr/share/locale\
+ --mandir=/usr/share/man\
+ --localstatedir=/var\
--disable-ansi\
--disable-fatal-warnings\
--disable-static\
--enable-doc\
--enable-libnet\
+ --enable-shared\
--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
@@ -220,19 +158,8 @@ 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
+ install -m644 $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"
diff --git a/pcr/cluster-glue/fixing-path.sed b/pcr/cluster-glue/fixing-path.sed
new file mode 100644
index 000000000..43ef66253
--- /dev/null
+++ b/pcr/cluster-glue/fixing-path.sed
@@ -0,0 +1,29 @@
+s|/bin/sh|/bin/bash|g;
+s| /bin| /usr/bin|g;
+s|=/bin|=/usr/bin|g;
+s|!/bin|!/usr/bin|g;
+s|:/bin|:/usr/bin|g;
+s|#/bin|#/usr/bin|g;
+s| /sbin| /usr/bin|g;
+s|=/sbin|=/usr/bin|g;
+s|!/sbin|!/usr/bin|g;
+s|:/sbin|:/usr/bin|g;
+s|#/sbin|#/usr/bin|g;
+s| /usr/sbin| /usr/bin|g;
+s|=/usr/sbin|=/usr/bin|g;
+s|!/usr/sbin|!/usr/bin|g;
+s|:/usr/sbin|:/usr/bin|g;
+s|#/usr/sbin|#/usr/bin|g;
+s|:/usr/bin:/usr/bin|:/usr/bin|g;
+s|lib64|lib|g;
+s| /lib| /usr/lib|g;
+s|=/lib|=/usr/lib|g;
+s|#/lib|#/usr/lib|g;
+s| /usr/libexec| /usr/lib|g;
+s|=/usr/libexec|=/usr/lib|g;
+s|#/usr/libexec|#/usr/lib|g;
+s| /usr/var| /var|g;
+s|=/usr/var|=/var|g;
+s|#/usr/var|#/var|g;
+s|/var/lock|/run/lock|g;
+s|/var/run|/run|g;
diff --git a/pcr/cluster-glue/ha-log.service b/pcr/cluster-glue/ha-log.service
new file mode 100644
index 000000000..5115298d7
--- /dev/null
+++ b/pcr/cluster-glue/ha-log.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Non-blocking logging daemon.
+Requires=network.target remote-fs.target
+Before=heartbeat.service openais.service corosync.service
+
+[Service]
+Type=forking
+ExecStart=/usr/lib/heartbeat/ha_logd -d >/dev/null 2>&1
+ExecStop=/usr/lib/heartbeat/ha_logd -k >/dev/null 2>&1
+
+[Install]
+WantedBy=multi-user.target
diff --git a/pcr/cluster-glue/replace-linux_os-to-gnulinux_os-term.sed b/pcr/cluster-glue/replace-linux_os-to-gnulinux_os-term.sed
new file mode 100644
index 000000000..2c9801c11
--- /dev/null
+++ b/pcr/cluster-glue/replace-linux_os-to-gnulinux_os-term.sed
@@ -0,0 +1,73 @@
+s|Linux,|GNU/Linux,|g;
+s|Linux and|GNU/Linux and|g;
+s|Linux distro|GNU/Linux distro|g;
+s|Linux distribution|GNU/Linux distribution|g;
+s|Linux machine|GNU/Linux machine|g;
+s|Linux Only|GNU/Linux Only|g;
+s|Linux only|GNU/Linux only|g;
+s|Linux operating|GNU/Linux operating|g;
+s|Linux OS|GNU/Linux OS|g;
+s|Linux platform|GNU/Linux platform|g;
+s|Linux software|GNU/Linux software|g;
+s|Linux specific|GNU/Linux specific|g;
+s|Linux system|GNU/Linux system|g;
+s|Linux will|GNU/Linux will|g;
+s|# Linux$|# GNU/Linux|g;
+s|# Linux[.]$|# GNU/Linux.|g;
+s|* Linux$|* GNU/Linux|g;
+s|* Linux[.]$|* GNU/Linux.|g;
+s|// Linux$|// GNU/Linux|g;
+s|// Linux[.]$|// GNU/Linux.|g;
+s|, Linux|, GNU/Linux|g;
+s|As Linux|As GNU/Linux|g;
+s|as Linux|as GNU/Linux|g;
+s|And Linux|And GNU/Linux|g;
+s|and Linux|and GNU/Linux|g;
+s|Be Linux|Be GNU/Linux|g;
+s|be Linux|be GNU/Linux|g;
+s|Because Linux|Because GNU/Linux|g;
+s|because Linux|because GNU/Linux|g;
+s|e[.]g[.] Linux|e.g. GNU/Linux|g;
+s|For Linux|For GNU/Linux|g;
+s|for Linux|for GNU/Linux|g;
+s|In Linux|In GNU/Linux|g;
+s|in Linux|in GNU/Linux|g;
+s|Like Linux|Like GNU/Linux|g;
+s|like Linux|like GNU/Linux|g;
+s|non-Linux|non GNU/Linux|g;
+s|Of Linux|Of GNU/Linux|g;
+s|of Linux|of GNU/Linux|g;
+s|On Linux|On GNU/Linux|g;
+s|on Linux|on GNU/Linux|g;
+s|OS type: Linux|OS type: GNU/Linux|g;
+s|Other Linux|Other GNU/Linux|g;
+s|other Linux|other GNU/Linux|g;
+s|The Linux|The GNU/Linux|g;
+s|the Linux|the GNU/Linux|g;
+s|Typically Linux|Typically GNU/Linux|g;
+s|typically Linux|typically GNU/Linux|g;
+s|To Linux|To GNU/Linux|g;
+s|to Linux|to GNU/Linux|g;
+s|Under Linux|Under GNU/Linux|g;
+s|under Linux|under GNU/Linux|g;
+s|e2fsprogs, typically GNU/Linux|e2fsprogs, typically Linux|g;
+s|GNU/GNU|GNU|g;
+s|ArchGNU/Linux|ArchLinux|g;
+s|MkGNU/Linux|MkLinux|g;
+s|GNU/Linux device|Linux device|g;
+s|GNU/Linux Director Daemon|Linux Director Daemon|g;
+s|GNU/Linux is a registered trademark of Linus Torvalds|Linux is a registered trademark of Linus Torvalds|g;
+s|GNU/Linux kernel|Linux kernel|g;
+s|GNU/Linux specific kernel|Linux specific kernel|g;
+s|GNU/Linux Standard Base|Linux Standard Base|g;
+s|GNU/Linux sysfs|Linux sysfs|g;
+s|GNU/Linux Virtual Server|Linux Virtual Server|g;
+s|GNU/Linux Watchdog|Linux Watchdog|g;
+s|GNU/Linux watchdog|Linux watchdog|g;
+s|GNU/LinuxHA|LinuxHA|g;
+s|GNU/Linux-HA|Linux-HA|g;
+s|GNU/LinuxSCSI|LinuxSCSI|g;
+s|HA GNU/Linux|HA Linux|g;
+s|High-Availability GNU/Linux|High-Availability Linux|g;
+s|SEGNU/Linux|SELinux|g;
+s|VA GNU/Linux Cluster|VA Linux Cluster|g;
diff --git a/pcr/cluster-glue/replace-opensource-to-free-term.sed b/pcr/cluster-glue/replace-opensource-to-free-term.sed
new file mode 100644
index 000000000..e6ccc8c9c
--- /dev/null
+++ b/pcr/cluster-glue/replace-opensource-to-free-term.sed
@@ -0,0 +1,15 @@
+s|Open Source Initiative|Free Software Foundation|g;
+s|OSI Certifi|FSF Certif|g;
+s|OSI certifi|FSF certif|g;
+s|opensource[.]org/|gnu.org/philosophy/free-sw.html|g;
+s|[ _-].\{1,3\}[ _-][oO][pP][eE][nN].\{0,1\}[sS][oO][uU][rR][cC][eE]||g;
+s|[oO][pP][eE][nN].\{0,1\}[sS][oO][uU][rR][cC][eE][ _-].\{1,3\}[ _-]||g;
+s|OPEN.\{0,1\}SOURCE|FREE|g;
+s|Open.\{0,1\}[sS]ource|Free|g;
+s|open.\{0,1\}[sS]ource|free|g;
+s|Free Development Lab|Open Source Development Lab|g;
+s|free[.]org|opensource.org|g;
+s|gnu[.]org/philosophy/free-sw[.]htmllicenses|opensource.org/licenses|g;
+s|gnu[.]org/philosophy/free-sw[.]htmlosd|opensource.org/osd|g;
+s|oberhumer[.]com/free|oberhumer.com/opensource|g;
+s|free@google[.]com|opensource@google.com|g;