system/corosync: Added (plug-in for 3rd party cluster services)
This commit is contained in:
parent
947cf09994
commit
8e699975b5
|
@ -0,0 +1,14 @@
|
|||
corosync (Cluster plug-in engine for 3rd party cluster services)
|
||||
|
||||
The Corosync Cluster Engine provides a cluster plug-in engine
|
||||
for third party cluster service developers. Designers develop
|
||||
service engines for use with Corosync that can take advantage of
|
||||
its features including messaging, membership, IPC, a configuration
|
||||
object database, a handle database, automatic replication, and more.
|
||||
|
||||
In order to have a functioning High Availability software stack,
|
||||
before running this SlackBuild, build AND install, each in order,
|
||||
the following other SlackBuilds.
|
||||
|
||||
Requires: libnet, libesmtp, clusterglue, clusterresourceagents
|
||||
All available at SlackBuilds.org.
|
|
@ -0,0 +1,87 @@
|
|||
#!/bin/sh
|
||||
# Generated by Alien's SlackBuild Toolkit: http://slackware.com/~alien/AST
|
||||
# Copyright 2009 Eric Hameleers <alien@slackware.com>, Eindhoven, Netherlands
|
||||
|
||||
# Slackware build script for corosync
|
||||
|
||||
# Written by Zordrak <sbo@tpa.me.uk>
|
||||
|
||||
# Based on http://slackbuilds.org/template.SlackBuild
|
||||
# Modified by the SlackBuilds.org project
|
||||
|
||||
PRGNAM=corosync
|
||||
VERSION=${VERSION:-1.2.1}
|
||||
ARCH=${ARCH:-i486}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
CWD=$(pwd)
|
||||
TMP=${TMP:-/tmp/SBo}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
find . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--mandir=/usr/man \
|
||||
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
||||
--build=$ARCH-slackware-linux \
|
||||
--with-lcrso-dir=/usr/libexec/lcrso \
|
||||
--disable-nss
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
|
||||
( cd $PKG/usr/man
|
||||
find . -type f -exec gzip -9 {} \;
|
||||
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
||||
)
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a \
|
||||
AUTHORS INSTALL SECURITY CHANGELOG LICENSE README.devmap README.recovery TODO \
|
||||
$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
# Install .rc script
|
||||
install -D -m0755 -oroot -groot $CWD/rc.$PRGNAM.new $PKG/etc/rc.d/rc.$PRGNAM.new
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
|
@ -0,0 +1,10 @@
|
|||
PRGNAM="corosync"
|
||||
VERSION="1.2.1"
|
||||
HOMEPAGE="http://www.corosync.org/"
|
||||
DOWNLOAD="ftp://ftp:downloads@ftp.corosync.org/downloads/corosync-1.2.1/corosync-1.2.1.tar.gz"
|
||||
MD5SUM="cba5eb5da41630f53e54b90c449c056d"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
MAINTAINER="Zordrak"
|
||||
EMAIL="slackbuilds@tpa.me.uk"
|
||||
APPROVED="dsomero"
|
|
@ -0,0 +1,17 @@
|
|||
config() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
if [ ! -r $OLD ]; then
|
||||
mv $NEW $OLD
|
||||
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
|
||||
rm $NEW
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -e etc/rc.d/rc.corosync ]; then
|
||||
cp -a etc/rc.d/rc.corosync etc/rc.d/rc.corosync.new.incoming
|
||||
cat etc/rc.d/rc.corosync.new > etc/rc.d/rc.corosync.new.incoming
|
||||
mv etc/rc.d/rc.corosync.new.incoming etc/rc.d/rc.corosync.new
|
||||
fi
|
||||
|
||||
config etc/rc.d/rc.corosync.new
|
|
@ -0,0 +1,145 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# corosync Start the Corosync Cluster Engine
|
||||
#
|
||||
# Author: Andrew Beekhof <abeekhof@suse.de>
|
||||
# License: Revised BSD
|
||||
#
|
||||
# chkconfig: - 20 20
|
||||
# processname: corosync
|
||||
# description: Corosync Cluster Engine
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Description: corosync....
|
||||
#
|
||||
# Short-Description: Corosync Cluster Engine.
|
||||
# Provides: corosync
|
||||
# Required-Start: $network
|
||||
# Should-Start: $syslog
|
||||
# Required-Stop: $network
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 6
|
||||
### END INIT INFO
|
||||
|
||||
do_force=0
|
||||
prog="corosync"
|
||||
lockfile="/var/lock/subsys/$prog"
|
||||
|
||||
internal_status() {
|
||||
killall -0 corosync > /dev/null 2>&1
|
||||
return $?
|
||||
}
|
||||
|
||||
status() {
|
||||
if
|
||||
! internal_status
|
||||
then
|
||||
echo "Stopped"
|
||||
return 7
|
||||
fi
|
||||
|
||||
echo "Running"
|
||||
return 0
|
||||
}
|
||||
|
||||
start() {
|
||||
echo -n $"Starting Corosync Cluster Engine ($prog): "
|
||||
if
|
||||
! internal_status
|
||||
then
|
||||
echo -n "starting... "
|
||||
$prog 2>&1 > /dev/null 2>&1
|
||||
echo -n "rc=$?: "
|
||||
fi
|
||||
|
||||
sleep 2 # give it time to fail... $? isn't definitive
|
||||
|
||||
if
|
||||
internal_status
|
||||
then
|
||||
echo "OK"
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "Failed"
|
||||
return 1
|
||||
}
|
||||
|
||||
do_force=0
|
||||
do_forever=1
|
||||
|
||||
stop() {
|
||||
echo -n $"Stopping Corosync Cluster Engine ($prog): "
|
||||
|
||||
killall -QUIT corosync
|
||||
|
||||
if [ $do_forever = 0 ]; then
|
||||
for i in 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20; do
|
||||
if
|
||||
internal_status
|
||||
then
|
||||
sleep 2
|
||||
echo -n "."
|
||||
else
|
||||
rm -f "$lockfile"
|
||||
echo "OK"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $do_force = 1 ]; then
|
||||
echo -n "Escalating... "
|
||||
killall -KILL corosync
|
||||
sleep 5
|
||||
|
||||
if
|
||||
! internal_status
|
||||
then
|
||||
rm -f "$lockfile"
|
||||
echo "OK"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Failed"
|
||||
return 1
|
||||
fi
|
||||
|
||||
while
|
||||
internal_status
|
||||
do
|
||||
sleep 1
|
||||
echo -n "."
|
||||
done
|
||||
|
||||
rm -f "$lockfile"
|
||||
echo "OK"
|
||||
return 0
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart)
|
||||
$1
|
||||
;;
|
||||
force-stop)
|
||||
do_force=1
|
||||
stop
|
||||
;;
|
||||
reload|force-reload)
|
||||
restart
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
[ ! -f "$lockfile" ] || restart
|
||||
;;
|
||||
status)
|
||||
status $prog
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|restart|try-restart|condrestart|reload|force-reload|force-stop|status}"
|
||||
exit 2
|
||||
esac
|
|
@ -0,0 +1,20 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
corosync: corosync (Cluster plug-in engine for 3rd party cluster services)
|
||||
corosync:
|
||||
corosync: The Corosync Cluster Engine provides a cluster plug-in engine
|
||||
corosync: for third party cluster service developers. Designers develop
|
||||
corosync: service engines for use with Corosync that can take advantage of
|
||||
corosync: its features including messaging, membership, IPC, a configuration
|
||||
corosync: object database, a handle database, automatic replication, and more.
|
||||
corosync:
|
||||
corosync: Homepage: http://www.corosync.org/
|
||||
corosync:
|
||||
corosync:
|
||||
|
Loading…
Reference in New Issue