diff options
-rw-r--r-- | pcr/corosync/PKGBUILD | 91 | ||||
-rwxr-xr-x | pcr/corosync/corosync.init | 126 | ||||
-rw-r--r-- | pcr/corosync/corosync.service | 13 |
3 files changed, 58 insertions, 172 deletions
diff --git a/pcr/corosync/PKGBUILD b/pcr/corosync/PKGBUILD index e7c019a66..0214f521e 100644 --- a/pcr/corosync/PKGBUILD +++ b/pcr/corosync/PKGBUILD @@ -1,38 +1,63 @@ -# Maintainer: Eric Renfro <erenfro@gmail.com> +# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com> pkgname=corosync -pkgver=2.1.0 -pkgrel=4 -pkgdesc="Cluster engine for nodal communication systems with additional features for implementing high availability within applications." -arch=('i686' 'x86_64') -url="http://www.corosync.org/" -license=('BSD') -makedepends=('nss' 'libstatgrab' 'net-snmp' 'libqb') -depends=('nss' 'libstatgrab' 'net-snmp' 'libqb') -provides=('corosync=2.1.0') -conflicts=('corosync1') -#source=(ftp://ftp:downloads@ftp.corosync.org/downloads/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz) -source=("https://github.com/downloads/corosync/corosync/corosync-${pkgver}.tar.gz" - "corosync.init" - "corosync.service") -md5sums=('dc5152e6dfdb4638ab544e587884483a' - 'fdc3b648f020e165eaa7c3283ce5b9ac' - 'abc267226faafc7dc8246634277705ea') - +_pkgflag=lts +pkgver=2.3.0 +pkgrel=1 +pkgdesc='Cluster engine for nodal communication systems with additional features for implementing high availability within applications' +arch=( + i686 + x86_64 + mips64el +) +url=http://www.$pkgname.org +license=BSD +depends=( + libqb + libstatgrab + net-snmp + nss +) +makedepends=doxygen +conflicts=$pkgname-$_pkgflag +options=(!libtool) +source=http://$pkgname.org/download/$pkgname-$pkgver.tar.gz +sha512sums=cd2ff5182f0d4827a10d50a211aa073e3d544bf7b98f9b0c834243c0d2cd5446d7950021cb1a21fc16f4951c8b2acf4b75c0b0c72d815b7d67dcba71623d2e51 + +prepare() { + cd $srcdir/$pkgname-$pkgver +} + build() { - cd "${srcdir}/${pkgname}-${pkgver}" - ./configure --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --enable-systemd \ - --enable-monitoring \ - --enable-snmp \ - --enable-dbus \ - --with-systemddir=/usr/lib/systemd/system - make || return 1 - make DESTDIR="${pkgdir}" install || return 1 - ## Updated and fixed up systemd service unit and associated start/stop script: - cp ${srcdir}/corosync.service ${pkgdir}/usr/lib/systemd/system/corosync.service || return 1 - cp ${srcdir}/corosync.init ${pkgdir}/usr/share/corosync/corosync || return 1 + cd $srcdir/$pkgname-$pkgver + ./configure --prefix=/usr\ + --datarootdir=/usr/share\ + --disable-coverage\ + --disable-fatal-warnings\ + --disable-rdma\ + --disable-static\ + --enable-augeas\ + --enable-dbus\ + --enable-monitoring\ + --enable-qdevices\ + --enable-secure-build\ + --enable-shared\ + --enable-snmp\ + --enable-systemd\ + --enable-testagents\ + --enable-watchdog\ + --enable-xmlconf\ + --libdir=/usr/lib\ + --localstatedir=/var\ + --sysconfdir=/etc\ + --with-initddir=/etc/rc.d\ + --with-systemddir=/usr/lib/systemd/system + setarch $CARCH make +} + +package () { + cd $srcdir/$pkgname-$pkgver + setarch $CARCH make DESTDIR=$pkgdir install } +# vim:set ts=2 sw=2 et: diff --git a/pcr/corosync/corosync.init b/pcr/corosync/corosync.init deleted file mode 100755 index b97186dee..000000000 --- a/pcr/corosync/corosync.init +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/bash - -# Authors: -# Eric Renfro <erenfro@gmail.com> - -desc="Corosync Cluster Engine" -prog="corosync" - -# set secure PATH -PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/sbin" - -status() -{ - pid=$(pidof $prog 2>/dev/null) - return $? -} - -if [ -d /etc/default ]; then - [ -f /etc/default/$prog ] && . /etc/default/$prog - [ -z "$LOCK_FILE" ] && LOCK_FILE="/var/lock/$prog" -fi - -cluster_disabled_at_boot() -{ - if grep -q nocluster /proc/cmdline && \ - [ "$(tty)" = "/dev/console" ]; then - return 1 - fi - return 0 -} - -wait_for_ipc() -{ - local try=0 - while [ "$try" -le "20" ]; do - if corosync-cfgtool -s > /dev/null 2>&1; then - return 0 - fi - sleep 0.5 - let try++ - done - - return 1 -} - -start() -{ - echo -n "Starting $desc ($prog): " - - ! cluster_disabled_at_boot && return - - # most recent distributions use tmpfs for /var/run - # to avoid to clean it up on every boot. - # they also assume that init scripts will create - # required subdirectories for proper operations - mkdir -p /var/run - - if status $prog > /dev/null 2>&1; then - rtrn=0 - else - $prog > /dev/null 2>&1 - - if ! wait_for_ipc; then - echo "FAILED" - rtrn=1 - fi - touch $LOCK_FILE - rtrn=0 - fi - echo "OK" -} - -stop() -{ - ! status $prog > /dev/null 2>&1 && return - - echo -n "Signaling $desc ($prog) to terminate: " - kill -TERM $(pidof $prog) > /dev/null 2>&1 - echo "OK" - - echo -n "Waiting for $prog services to unload:" - while status $prog > /dev/null 2>&1; do - sleep 1 - echo -n "." - done - - rm -f $LOCK_FILE - echo " OK" - rtrn=0 -} - -restart() -{ - stop - start -} - -rtrn=0 - -case "$1" in -start) - start - ;; -restart|reload|force-reload) - restart - ;; -condrestart|try-restart) - if status $prog > /dev/null 2>&1; then - restart - fi - ;; -status) - status $prog - rtrn=$? - ;; -stop) - stop - ;; -*) - echo "usage: $0 {start|stop|restart|reload|force-reload|condrestart|try-restart|status}" - rtrn=2 - ;; -esac - -exit $rtrn - diff --git a/pcr/corosync/corosync.service b/pcr/corosync/corosync.service deleted file mode 100644 index e601181ee..000000000 --- a/pcr/corosync/corosync.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Corosync Cluster Engine -ConditionKernelCommandLine=!nocluster -Requires=network.target -After=network.target - -[Service] -ExecStart=/usr/share/corosync/corosync start -ExecStop=/usr/share/corosync/corosync stop -Type=forking - -[Install] -WantedBy=multi-user.target |