Add a patch to exabgp-4.2.21: Allow "neighbor *" in route announce command, to match "all configured neighbors". Ref. https://github.com/Exa-Networks/exabgp/issues/1179 Adapt the healthcheck module to allow this argument. Bump PKGREVISION.diff -r1.41 -r1.42 pkgsrc/net/exabgp/Makefile
(he)
@@ -1,50 +1,50 @@ | @@ -1,50 +1,50 @@ | |||
1 | # $NetBSD: Makefile,v 1.41 2023/08/14 05:24:58 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.42 2024/02/19 12:54:09 he Exp $ | |
2 | 2 | |||
3 | DISTNAME= exabgp-4.2.21 | 3 | DISTNAME= exabgp-4.2.21 | |
4 | PKGREVISION= 1 | 4 | PKGREVISION= 2 | |
5 | CATEGORIES= net | 5 | CATEGORIES= net | |
6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=Exa-Networks/} | 6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=Exa-Networks/} | |
7 | 7 | |||
8 | MAINTAINER= he@NetBSD.org | 8 | MAINTAINER= he@NetBSD.org | |
9 | HOMEPAGE= https://github.com/Exa-Networks/exabgp/ | 9 | HOMEPAGE= https://github.com/Exa-Networks/exabgp/ | |
10 | COMMENT= BGP swiss army knife | 10 | COMMENT= BGP swiss army knife | |
11 | LICENSE= modified-bsd | 11 | LICENSE= modified-bsd | |
12 | 12 | |||
13 | TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test | 13 | TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test | |
14 | 14 | |||
15 | USE_PKG_RESOURCES= yes | 15 | USE_PKG_RESOURCES= yes | |
16 | 16 | |||
17 | USE_TOOLS+= perl:run | 17 | USE_TOOLS+= perl:run | |
18 | 18 | |||
19 | REPLACE_PERL+= etc/exabgp/run/dynamic-1.pl | 19 | REPLACE_PERL+= etc/exabgp/run/dynamic-1.pl | |
20 | REPLACE_PERL+= etc/exabgp/run/watchdog-1.pl | 20 | REPLACE_PERL+= etc/exabgp/run/watchdog-1.pl | |
21 | 21 | |||
22 | REPLACE_PYTHON+= etc/exabgp/run/*.run | 22 | REPLACE_PYTHON+= etc/exabgp/run/*.run | |
23 | REPLACE_PYTHON+= etc/exabgp/run/*.py | 23 | REPLACE_PYTHON+= etc/exabgp/run/*.py | |
24 | 24 | |||
25 | CHECK_PORTABILITY_SKIP+= dev/release/google | 25 | CHECK_PORTABILITY_SKIP+= dev/release/google | |
26 | 26 | |||
27 | PYTHON_VERSIONS_INCOMPATIBLE= 27 | 27 | PYTHON_VERSIONS_INCOMPATIBLE= 27 | |
28 | 28 | |||
29 | USE_LANGUAGES= # none | 29 | USE_LANGUAGES= # none | |
30 | 30 | |||
31 | INSTALLATION_DIRS+= share/exabgp bin | 31 | INSTALLATION_DIRS+= share/exabgp bin | |
32 | INSTALLATION_DIRS+= ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 | 32 | INSTALLATION_DIRS+= ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 | |
33 | 33 | |||
34 | pre-install: | 34 | pre-install: | |
35 | find ${WRKDIR} -name "*.orig" | xargs rm -f | 35 | find ${WRKDIR} -name "*.orig" | xargs rm -f | |
36 | 36 | |||
37 | post-install: | 37 | post-install: | |
38 | ${INSTALL_MAN} ${WRKSRC}/doc/man/exabgp.1 \ | 38 | ${INSTALL_MAN} ${WRKSRC}/doc/man/exabgp.1 \ | |
39 | ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 | 39 | ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 | |
40 | ${INSTALL_MAN} ${WRKSRC}/doc/man/exabgp.conf.5 \ | 40 | ${INSTALL_MAN} ${WRKSRC}/doc/man/exabgp.conf.5 \ | |
41 | ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5 | 41 | ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5 | |
42 | 42 | |||
43 | TEST_ENV+= PYTHONPATH=${WRKSRC}/build/lib | 43 | TEST_ENV+= PYTHONPATH=${WRKSRC}/build/lib | |
44 | do-test: | 44 | do-test: | |
45 | cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX} | 45 | cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX} | |
46 | 46 | |||
47 | .include "../../lang/python/egg.mk" | 47 | .include "../../lang/python/egg.mk" | |
48 | .include "../../lang/python/application.mk" | 48 | .include "../../lang/python/application.mk" | |
49 | .include "../../lang/python/pyversion.mk" | 49 | .include "../../lang/python/pyversion.mk" | |
50 | .include "../../mk/bsd.pkg.mk" | 50 | .include "../../mk/bsd.pkg.mk" |
@@ -1,5 +1,7 @@ | @@ -1,5 +1,7 @@ | |||
1 | $NetBSD: distinfo,v 1.19 2022/09/18 12:02:00 he Exp $ | 1 | $NetBSD: distinfo,v 1.20 2024/02/19 12:54:09 he Exp $ | |
2 | 2 | |||
3 | BLAKE2s (exabgp-4.2.21.tar.gz) = 16efdd84722201dc7dac7297a9367535c1b5184f952728123a856a93ec4e302a | 3 | BLAKE2s (exabgp-4.2.21.tar.gz) = 16efdd84722201dc7dac7297a9367535c1b5184f952728123a856a93ec4e302a | |
4 | SHA512 (exabgp-4.2.21.tar.gz) = 0efc7143191e8b557297e9329354c01e2418e0c4c45753941eba3a1f063e77d17a0efa7a14a3062764e45e709f0598f491c10e2c02e751590bb7c0943b61932b | 4 | SHA512 (exabgp-4.2.21.tar.gz) = 0efc7143191e8b557297e9329354c01e2418e0c4c45753941eba3a1f063e77d17a0efa7a14a3062764e45e709f0598f491c10e2c02e751590bb7c0943b61932b | |
5 | Size (exabgp-4.2.21.tar.gz) = 2933721 bytes | 5 | Size (exabgp-4.2.21.tar.gz) = 2933721 bytes | |
6 | SHA1 (patch-lib_exabgp_application_healthcheck.py) = af35c59feb16bcf79abbf615d9ed13205127c534 | |||
7 | SHA1 (patch-lib_exabgp_reactor_api_command_limit.py) = 322747424f646d1e1e22bde6baa6e057ace51805 |
$NetBSD: patch-lib_exabgp_application_healthcheck.py,v 1.3 2024/02/19 12:54:09 he Exp $
Change type of `--neighbor` argument from ip_address to str
so that it can support '*' as a value.
--- lib/exabgp/application/healthcheck.py.orig 2024-02-19 12:45:30.545761963 +0000
+++ lib/exabgp/application/healthcheck.py
@@ -222,7 +222,7 @@ def parse():
help=("Instead of increasing the metric on health failure, " "withdraw the route"),
)
g.add_argument("--path-id", metavar='PATHID', type=int, default=None, help="path ID to advertise for the route")
- g.add_argument("--neighbor", metavar='NEIGHBOR', type=ip_address, dest="neighbors", action="append", help="advertise the route to the selected neigbors")
+ g.add_argument("--neighbor", metavar='NEIGHBOR', type=str, dest="neighbors", action="append", help="advertise the route to the selected neigbors")
g = parser.add_argument_group("reporting")
g.add_argument("--execute", metavar='CMD', type=str, action="append", help="execute CMD on state change")
$NetBSD: patch-lib_exabgp_reactor_api_command_limit.py,v 1.1 2024/02/19 12:54:09 he Exp $
Allow "neighbor *" in route announce command, to match
"all configured neighbors".
Ref. https://github.com/Exa-Networks/exabgp/issues/1179
--- lib/exabgp/reactor/api/command/limit.py.orig 2024-02-19 12:41:58.477150474 +0000
+++ lib/exabgp/reactor/api/command/limit.py
@@ -63,6 +63,8 @@ def extract_neighbors(command):
def match_neighbor(description, name):
for string in description:
+ if string.strip() == 'neighbor *':
+ return True
if re.search(r'(^|\s)%s($|\s|,)' % re.escape(string), name) is None:
return False
return True