From 4fc59478d1180fd7984003f5b1645fe40954299f Mon Sep 17 00:00:00 2001 From: root Date: Fri, 17 Feb 2012 19:20:30 +0000 Subject: Fri Feb 17 19:20:30 UTC 2012 --- community-testing/keepalived/PKGBUILD | 45 ++++++++++++++++++++++++++ community-testing/keepalived/ip_vs_moved.patch | 23 +++++++++++++ community-testing/keepalived/keepalived.conf | 16 +++++++++ community-testing/keepalived/keepalived.rc | 39 ++++++++++++++++++++++ 4 files changed, 123 insertions(+) create mode 100644 community-testing/keepalived/PKGBUILD create mode 100644 community-testing/keepalived/ip_vs_moved.patch create mode 100644 community-testing/keepalived/keepalived.conf create mode 100644 community-testing/keepalived/keepalived.rc (limited to 'community-testing/keepalived') diff --git a/community-testing/keepalived/PKGBUILD b/community-testing/keepalived/PKGBUILD new file mode 100644 index 000000000..ad7fa29f4 --- /dev/null +++ b/community-testing/keepalived/PKGBUILD @@ -0,0 +1,45 @@ +# $Id$ +# Maintainer: Sébastien Luttringer +# Contributor: Andrea Zucchelli + +pkgname=keepalived +pkgver=1.2.2 +pkgrel=3 +pkgdesc='Failover and monitoring daemon for LVS clusters' +arch=('i686' 'x86_64') +url='http://www.keepalived.org/' +license=('GPL2') +backup=('etc/keepalived/keepalived.conf' 'etc/conf.d/keepalived') +depends=('openssl' 'popt' 'libnl1') +source=("http://www.keepalived.org/software/$pkgname-$pkgver.tar.gz" + 'keepalived.rc' + 'keepalived.conf' + 'ip_vs_moved.patch') +md5sums=('f68327ca142616a8463d2d105db122cd' + 'baeb62a682c2b59d732cea84bf52cc87' + '9c8142da8730ad27a345587dea83ced7' + '87ee19c85adaedd3eb11bea8a5865d47') + +build() { + cd $pkgname-$pkgver + patch -p1 -i ../ip_vs_moved.patch + ./configure --prefix=/usr --sysconfdir=/etc + make +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + # clean pacakge init scripts + rm -r "$pkgdir/etc/rc.d/init.d" "$pkgdir/etc/sysconfig" + # move examples to /usr/share + install -d -m 755 "$pkgdir/usr/share/$pkgname" + mv "$pkgdir/etc/keepalived/samples" "$pkgdir/usr/share/$pkgname/samples" + + # add initscripts + install -D -m 755 ../$pkgname.rc "${pkgdir}/etc/rc.d/$pkgname" + install -D -m 644 ../$pkgname.conf "${pkgdir}/etc/conf.d/$pkgname" + +} + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/community-testing/keepalived/ip_vs_moved.patch b/community-testing/keepalived/ip_vs_moved.patch new file mode 100644 index 000000000..e27873810 --- /dev/null +++ b/community-testing/keepalived/ip_vs_moved.patch @@ -0,0 +1,23 @@ +--- keepalived-1.2.2/configure 2011-01-06 01:51:33.000000000 +0100 ++++ keepalived-1.2.2.orig/configure 2011-11-24 19:36:32.051486626 +0100 +@@ -3973,7 +3973,7 @@ + + IPVS_SUPPORT="_WITHOUT_LVS_" + if test "$enable_lvs" != "no"; then +- ac_fn_c_check_header_mongrel "$LINENO" "net/ip_vs.h" "ac_cv_header_net_ip_vs_h" "$ac_includes_default" ++ ac_fn_c_check_header_mongrel "$LINENO" "linux/ip_vs.h" "ac_cv_header_net_ip_vs_h" "$ac_includes_default" + if test "x$ac_cv_header_net_ip_vs_h" = x""yes; then : + IPVS_SUPPORT="_WITH_LVS_" + else +diff -ru keepalived-1.2.2/configure.in keepalived-1.2.2.orig/configure.in +--- keepalived-1.2.2/configure.in 2011-01-06 01:51:30.000000000 +0100 ++++ keepalived-1.2.2.orig/configure.in 2011-11-24 19:36:11.797860077 +0100 +@@ -124,7 +124,7 @@ + dnl ----[ Checks for LVS and VRRP support ]---- + IPVS_SUPPORT="_WITHOUT_LVS_" + if test "$enable_lvs" != "no"; then +- AC_CHECK_HEADER([net/ip_vs.h], ++ AC_CHECK_HEADER([linux/ip_vs.h], + [IPVS_SUPPORT="_WITH_LVS_"], + [ + IPVS_SUPPORT="_WITHOUT_LVS_" diff --git a/community-testing/keepalived/keepalived.conf b/community-testing/keepalived/keepalived.conf new file mode 100644 index 000000000..225f02bf9 --- /dev/null +++ b/community-testing/keepalived/keepalived.conf @@ -0,0 +1,16 @@ +# vim:set ts=2 sw=2 ft=sh et: +# Options for keepalived. See `keepalived --help' output and keepalived(8) and +# keepalived.conf(5) man pages for a list of all options. Here are the most +# common ones : +# +# --vrrp -P Only run with VRRP subsystem. +# --check -C Only run with Health-checker subsystem. +# --dont-release-vrrp -V Dont remove VRRP VIPs & VROUTEs on daemon stop. +# --dont-release-ipvs -I Dont remove IPVS topology on daemon stop. +# --dump-conf -d Dump the configuration data. +# --log-detail -D Detailed log messages. +# --log-facility -S 0-7 Set local syslog facility (default=LOG_DAEMON) +# + +DAEMON_OPTS='-D' + diff --git a/community-testing/keepalived/keepalived.rc b/community-testing/keepalived/keepalived.rc new file mode 100644 index 000000000..88bb90724 --- /dev/null +++ b/community-testing/keepalived/keepalived.rc @@ -0,0 +1,39 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/${0##*/} + +NAME=keepalived +DAEMON=/usr/sbin/keepalived +PID=$(pidof -o %PPID $DAEMON) + +case "$1" in + start) + stat_busy "Starting $NAME daemon" + [[ ! $PID ]] && $DAEMON $DAEMON_OPTS && add_daemon $NAME && stat_done && exit 0 + stat_fail + ;; + stop) + stat_busy "Stopping $NAME daemon" + [[ $PID ]] && kill $PID &> /dev/null && rm_daemon $NAME && stat_done && exit 0 + stat_fail + ;; + restart) + $0 stop + $0 start + exit 0 + ;; + reload) + stat_busy "Reloading $NAME daemon" + [[ $PID ]] && kill -HUP $PID &> /dev/null && stat_done && exit 0 + stat_fail + ;; + *) + echo "usage: ${0##*/} {start|stop|restart|reload}" >&2 + ;; +esac + +exit 1 + +# vim:set ts=2 sw=2 ft=sh noet: -- cgit v1.2.3-54-g00ecf