diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-07-24 08:01:31 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-07-24 08:01:31 +0000 |
commit | b70981b68efcce5256eb11c6cd26ae123b10b6ea (patch) | |
tree | a38be6efae5e2ba15c2e839504632f9b7bfd5f91 /main/opennhrp | |
parent | 2b4df81538b8398442d5296650905c70341dd8d3 (diff) | |
download | aports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.bz2 aports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.xz |
moved extra/* to main/
and fixed misc build issues
Diffstat (limited to 'main/opennhrp')
-rw-r--r-- | main/opennhrp/APKBUILD | 33 | ||||
-rw-r--r-- | main/opennhrp/opennhrp-0.9.2-fix-false-assert.patch | 13 | ||||
-rw-r--r-- | main/opennhrp/opennhrp-0.9.3-peer-up-bgp.patch | 11 | ||||
-rw-r--r-- | main/opennhrp/opennhrp.confd | 2 | ||||
-rwxr-xr-x | main/opennhrp/opennhrp.initd | 32 |
5 files changed, 91 insertions, 0 deletions
diff --git a/main/opennhrp/APKBUILD b/main/opennhrp/APKBUILD new file mode 100644 index 0000000000..c72d0d269c --- /dev/null +++ b/main/opennhrp/APKBUILD @@ -0,0 +1,33 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=opennhrp +pkgver=0.11 +pkgrel=0 +pkgdesc="NBMA Next Hop Resolution Protocol daemon" +url="http://sourceforge.net/projects/opennhrp" +license="GPL-3" +depends= +makedepends="c-ares-dev" +subpackages="$pkgname-doc" +source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2 + opennhrp-0.9.3-peer-up-bgp.patch + $pkgname.initd + $pkgname.confd + " + +build() { + cd "$srcdir"/$pkgname-$pkgver + for i in ../*.patch; do + msg "Applying $i" + patch -p1 < $i || return 1 + done + + sed -i -e 's/-Werror//' Make.rules + make || return 1 + make DESTDIR="$pkgdir" install + install -Dm755 "$srcdir"/opennhrp.initd "$pkgdir"/etc/init.d/opennhrp + install -Dm644 "$srcdir"/opennhrp.confd "$pkgdir"/etc/cond.d/opennhrp +} +md5sums="473dace79e7eefe0a0b79159a2c61cb5 opennhrp-0.11.tar.bz2 +f81539fc92800bb79668dda119a97d1d opennhrp-0.9.3-peer-up-bgp.patch +85821b61c02427146b866b7582157cfd opennhrp.initd +8eee86233728dc0d156bbfee6d98f338 opennhrp.confd" diff --git a/main/opennhrp/opennhrp-0.9.2-fix-false-assert.patch b/main/opennhrp/opennhrp-0.9.2-fix-false-assert.patch new file mode 100644 index 0000000000..67b44ab5d2 --- /dev/null +++ b/main/opennhrp/opennhrp-0.9.2-fix-false-assert.patch @@ -0,0 +1,13 @@ +diff -ru opennhrp-0.9.2.orig/nhrp/nhrp_peer.c opennhrp-0.9.2/nhrp/nhrp_peer.c +--- opennhrp-0.9.2.orig/nhrp/nhrp_peer.c 2009-02-02 13:12:46 +0000 ++++ opennhrp-0.9.2/nhrp/nhrp_peer.c 2009-02-02 13:36:51 +0000 +@@ -1260,7 +1260,8 @@ + { + char tmp[NHRP_PEER_FORMAT_LEN]; + +- NHRP_BUG_ON(peer->flags & NHRP_PEER_FLAG_REMOVED); ++ if (peer->flags & NHRP_PEER_FLAG_REMOVED) ++ return; + + nhrp_debug("Removing %s %s", + nhrp_peer_type[peer->type], diff --git a/main/opennhrp/opennhrp-0.9.3-peer-up-bgp.patch b/main/opennhrp/opennhrp-0.9.3-peer-up-bgp.patch new file mode 100644 index 0000000000..60e4827d6f --- /dev/null +++ b/main/opennhrp/opennhrp-0.9.3-peer-up-bgp.patch @@ -0,0 +1,11 @@ +diff -ru opennhrp-0.9.3.orig/etc/opennhrp-script opennhrp-0.9.3/etc/opennhrp-script +--- opennhrp-0.9.3.orig/etc/opennhrp-script 2009-02-26 10:35:38 +0000 ++++ opennhrp-0.9.3/etc/opennhrp-script 2009-02-26 10:52:26 +0000 +@@ -15,6 +15,7 @@ + echo "Create link from $NHRP_SRCADDR ($NHRP_SRCNBMA) to $NHRP_DESTADDR ($NHRP_DESTNBMA)" + racoonctl establish-sa -w isakmp inet $NHRP_SRCNBMA $NHRP_DESTNBMA || exit 1 + racoonctl establish-sa -w esp inet $NHRP_SRCNBMA $NHRP_DESTNBMA gre || exit 1 ++ vtysh -d bgpd -c "clear bgp $NHRP_DESTADDR" 2>/dev/null || true + ;; + peer-down) + echo "Delete link from $NHRP_SRCADDR ($NHRP_SRCNBMA) to $NHRP_DESTADDR ($NHRP_DESTNBMA)" diff --git a/main/opennhrp/opennhrp.confd b/main/opennhrp/opennhrp.confd new file mode 100644 index 0000000000..c3bece169e --- /dev/null +++ b/main/opennhrp/opennhrp.confd @@ -0,0 +1,2 @@ +# Uncomment the row below to enable verbose logging. +#OPENNHRP_OPTS=-v diff --git a/main/opennhrp/opennhrp.initd b/main/opennhrp/opennhrp.initd new file mode 100755 index 0000000000..ac7ea6a572 --- /dev/null +++ b/main/opennhrp/opennhrp.initd @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmpd.rc7,v 1.1 2006/11/26 21:37:22 cedk Exp $ + +PIDFILE=/var/run/opennhrp.pid + +depend() { + use logger + need net +} + +checkconfig() { + if [ ! -e /etc/opennhrp/opennhrp.conf ] ; then + eerror "You need an /etc/opennhrp/opennhrp.conf config file to run opennhrp" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting opennhrp" + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --exec /usr/sbin/opennhrp -- -d -p $PIDFILE 2> /dev/null + eend $? +} + +stop() { + ebegin "Stopping opennhrp" + start-stop-daemon --stop --quiet --pidfile $PIDFILE + eend $? +} |