diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2016-01-09 22:13:21 +0100 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2016-01-09 22:22:02 +0100 |
commit | 3e795e3cccb4f24cd76673faafea26e92de9b3d1 (patch) | |
tree | f0066d6fd349061eb3981c9fdb47a99c62a83717 /testing/keepalived | |
parent | 4828bf93bc15c9c2e47f09534ceee9f80c65bbb2 (diff) | |
download | aports-3e795e3cccb4f24cd76673faafea26e92de9b3d1.tar.bz2 aports-3e795e3cccb4f24cd76673faafea26e92de9b3d1.tar.xz |
testing/keepalived: upgrade to 1.2.19
Also use new OpenRC services from Gentoo Linux.
Diffstat (limited to 'testing/keepalived')
-rw-r--r-- | testing/keepalived/APKBUILD | 46 | ||||
-rw-r--r-- | testing/keepalived/keepalived.confd | 11 | ||||
-rwxr-xr-x | testing/keepalived/keepalived.initd | 38 | ||||
-rw-r--r-- | testing/keepalived/musl-fix-stdint.patch | 21 |
4 files changed, 55 insertions, 61 deletions
diff --git a/testing/keepalived/APKBUILD b/testing/keepalived/APKBUILD index b75e0e6e0d..86876e6f13 100644 --- a/testing/keepalived/APKBUILD +++ b/testing/keepalived/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Pablo Castorino <pcastorino@mendoza-conicet.gob.ar> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=keepalived -pkgver=1.2.12 +pkgver=1.2.19 pkgrel=0 pkgdesc="Health Checking for Linux Virtual Server & High-Availability" url="http://www.keepalived.org/" @@ -9,10 +9,9 @@ arch="all" license="GPL" depends= makedepends="openssl-dev popt-dev linux-headers net-snmp-dev libnl-dev" -install= +install="" subpackages="$pkgname-doc $pkgname-sample-config:samples" source="http://www.keepalived.org/software/$pkgname-$pkgver.tar.gz - musl-fix-stdint.patch $pkgname.initd $pkgname.confd " @@ -34,12 +33,17 @@ prepare() { build() { cd "$_builddir" - ./configure --prefix=/usr \ + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var \ --with-kernel-dir=/usr/include/linux \ + --enable-vrrp \ --enable-snmp \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info + || return 1 make || return 1 } @@ -47,10 +51,17 @@ package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 + mkdir -p "$pkgdir"/usr/share/doc/$pkgname/genhash + for f in AUTHOR CONTRIBUTORS ChangeLog README INSTALL TODO \ + genhash/README genhash/AUTHOR genhash/ChangeLog; do + install -m644 $f "$pkgdir"/usr/share/doc/$pkgname/$f || return 1 + done + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname - rm -r "$pkgdir"/etc/rc.d "$pkgdir"/etc/sysconfig + # Clean up sysvinit files + rm -rf "$pkgdir"/etc/rc.d "$pkgdir"/etc/sysconfig } samples() { @@ -59,15 +70,12 @@ samples() { mv "$pkgdir"/etc/keepalived/samples "$subpkgdir"/etc/keepalived/ } -md5sums="60f2564acc1e1faa0237b53cf4392d1f keepalived-1.2.12.tar.gz -04834e595d2ec407830237ad014c173a musl-fix-stdint.patch -d20faa8d55b8a41b8ddb71bb00a6bead keepalived.initd -56ff68ad19e973826c2dbc42c892939f keepalived.confd" -sha256sums="7cd5b1c44b9ec805bb70d208db5962f2c2ff42798c2efd10c6f92e263cf549ab keepalived-1.2.12.tar.gz -2d8ca0ea51bff4c7f04e4171edc2423f0068a3d972e95e84aabcbb6fb47cb8ee musl-fix-stdint.patch -a4925cfdbefbee4de59391e320d86538e6ed17a82edc5970fc4b7ea9f42f0787 keepalived.initd -36a6d3345d0ecfd5ca38c2459762f594ff969096e56fa04d8b5b4ee78575d78a keepalived.confd" -sha512sums="816d5a4e8aa65bd9509f68290b762e67feac235678e0960d8c80ee81cb1b3f16311c17ca5e885f87d5d4698df8cb6c42b19ebdc9f43be125dffaf31e68ef67be keepalived-1.2.12.tar.gz -3f51c193ac3a80ed7d3b384eb2d7d671b8e41f4985e2d3c23bb6372459fecc77f882247cebd9efb590f2431426ae0fbc7acf5828eae620c86db3eb1a3a6b8d95 musl-fix-stdint.patch -e0928b230743438285cb530341a69b6406b31ead8fcdfed05739770e3ea11ca8162a55479eabfa90d636ad9d2d6c5b1f38946b1e9fcf494ffce87d77db957db3 keepalived.initd -2aec829602c694ae8a4ec669843734f0fb2c9ae2cc6d032d2d724bbcf5da35ad597e7b45df985a2cb6102ed96d60c4d8d9a54da4b734bf1354bb522c4fc705e0 keepalived.confd" +md5sums="5c98b06639dd50a6bff76901b53febb6 keepalived-1.2.19.tar.gz +965cb4d5deca2d00112cb82ed798edb9 keepalived.initd +a714b2a54e4f9bfea41f1476d36c22eb keepalived.confd" +sha256sums="32fbae732c1cd854cacd7a930d4a26f5bad6372cdecb5e3139f0c17e87493853 keepalived-1.2.19.tar.gz +0567d2b8cfeb78951e6c9e9d8ae5ed018e9eb116dd9d3d92779cfb823700c9b9 keepalived.initd +dcc2d9b209a9836d861612547537df8f06bb08153482920dd4b927730ba6ae8d keepalived.confd" +sha512sums="d2848726aa97bbd5a3be3e667314a453d26572ef6d14f5f606395a203ceab7bce8a6c63e3b5ebb05c83d75a5491b77f1fa4e3042cd919d7d673c3595ec829974 keepalived-1.2.19.tar.gz +240201b81bcca7b213bd3ec45fc286f0305d72a6952a3baf485d717df413df3a2da0f4b018eaa050b0b12cda78767f5c4ae60ec75e5802cfe57cb29951e86ba0 keepalived.initd +468d176d22f1ce308871829f24624b33e6ba3b234a413395599a67a865f3cf815cc24a10c244dffd1421a0acf5352fe51027a2d3b282cd3822dfeadc8a1d4df0 keepalived.confd" diff --git a/testing/keepalived/keepalived.confd b/testing/keepalived/keepalived.confd index 87094b3553..5f56cb23b0 100644 --- a/testing/keepalived/keepalived.confd +++ b/testing/keepalived/keepalived.confd @@ -1,7 +1,6 @@ -# keepalived config file -# default: /etc/keepalived/keepalived.conf -#KEEPALIVED_CFG=/etc/keepalived - -# extra options for keepalived -#KEEPALIVED_OPTS="" # you must NOT use -f here! +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# Keepalived options +# Increase logging: +#KEEPALIVED_OPTS="-D" diff --git a/testing/keepalived/keepalived.initd b/testing/keepalived/keepalived.initd index a5b2bb9f98..c290c9dbc5 100755 --- a/testing/keepalived/keepalived.initd +++ b/testing/keepalived/keepalived.initd @@ -1,25 +1,33 @@ -#!/sbin/runscript -# Copyright 1999-2008 Gentoo Foundation +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -KEEPALIVED_BIN="/usr/sbin/keepalived" -KEEPALIVED_CFG=${KEEPALIVED_CFG:-/etc/keepalived/keepalived.conf} - depend() { use logger - need net - after firewall + # The interfaces do not actually need to exist to start, it handles them gracefully. + use net } -start() { - ebegin "Starting keepalived" - start-stop-daemon --start --exec "${KEEPALIVED_BIN}" \ - -- -f "${KEEPALIVED_CFG}" ${KEEPALIVED_OPTS} - eend $? +command="/usr/sbin/keepalived" +command_args="${KEEPALIVED_OPTS}" +pidfile="/var/run/keepalived.pid" + +extra_commands="checkconfig reload" + +checkconfig() { + # keepalived has a config check command, but it does not work while the daemon is running! + if [ ! -e /etc/keepalived/keepalived.conf ] ; then + eerror "You need an /etc/keepalived/keepalived.conf file to run keepalived" + return 1 + fi +} + +start_pre() { + checkconfig || return 1 } -stop() { - ebegin "Stopping keepalived" - start-stop-daemon --stop --exec "${KEEPALIVED_BIN}" +reload() { + ebegin "Reloading keepalived.conf" + start-stop-daemon --pidfile $pidfile --signal HUP eend $? } diff --git a/testing/keepalived/musl-fix-stdint.patch b/testing/keepalived/musl-fix-stdint.patch deleted file mode 100644 index 73080f1390..0000000000 --- a/testing/keepalived/musl-fix-stdint.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/keepalived/vrrp/vrrp_if.c b/keepalived/vrrp/vrrp_if.c -index 7360369..12dda84 100644 ---- a/keepalived/vrrp/vrrp_if.c -+++ b/keepalived/vrrp/vrrp_if.c -@@ -23,11 +23,11 @@ - /* global include */ - #include <unistd.h> - #include <string.h> --#include <sys/types.h> --typedef __uint64_t u64; --typedef __uint32_t u32; --typedef __uint16_t u16; --typedef __uint8_t u8; -+#include <stdint.h> -+typedef uint64_t u64; -+typedef uint32_t u32; -+typedef uint16_t u16; -+typedef uint8_t u8; - #include <sys/socket.h> - #include <sys/ioctl.h> - #include <netinet/in.h> |