From 4d8fff3200d1f8be0ceadfc1aba24b5dfaeeeffb Mon Sep 17 00:00:00 2001 From: Patrick McLean Date: Wed, 8 Apr 2026 09:22:31 -0700 Subject: [PATCH] net-misc/exabgp: add 5.0.8 Signed-off-by: Patrick McLean --- net-misc/exabgp/Manifest | 1 + net-misc/exabgp/exabgp-5.0.8.ebuild | 74 +++++++++++++++++++ ...0.8-healthcheck-allow-disable-metric.patch | 22 ++++++ .../exabgp/files/exabgp-5.0.8-ip-path.patch | 13 ++++ .../exabgp-5.0.8-less-verbose-logging.patch | 33 +++++++++ .../exabgp/files/exabgp-5.0.8-paths.patch | 15 ++++ 6 files changed, 158 insertions(+) create mode 100644 net-misc/exabgp/exabgp-5.0.8.ebuild create mode 100644 net-misc/exabgp/files/exabgp-5.0.8-healthcheck-allow-disable-metric.patch create mode 100644 net-misc/exabgp/files/exabgp-5.0.8-ip-path.patch create mode 100644 net-misc/exabgp/files/exabgp-5.0.8-less-verbose-logging.patch create mode 100644 net-misc/exabgp/files/exabgp-5.0.8-paths.patch diff --git a/net-misc/exabgp/Manifest b/net-misc/exabgp/Manifest index 313b6fba23ea2..99bcd2e41ed5d 100644 --- a/net-misc/exabgp/Manifest +++ b/net-misc/exabgp/Manifest @@ -1,2 +1,3 @@ DIST exabgp-4.2.23.tar.gz 2935267 BLAKE2B 85b861e5ee318ecd6533386f8a298fdeabec161db9cba17f48957d1379ba0b30c3d9ea6c136e400c0ddf62595f7275d885d019bd6690fc7c58b65a112e6ce9e9 SHA512 03968997958dd1241c616b675bbea1e65d2660658205cf51f2bff6198c497a1379c949a61f9b93de4b91af2c0045eed54a94aa243fbca89c6d908bcb5811dc20 DIST exabgp-4.2.25.tar.gz 2881687 BLAKE2B 15addb7761a25ebbb090299925c249c30d0ffbbdb6a9b4ea4fb04f2aa3253dcf36abc705b23b83fc46e0dffe3a6c899f789968e145e3abf2bdce02746c911d06 SHA512 24211bbde4657edf17d36d0109353b37db641e5412f51c360e337651e0a210082329451fdeed3952f824751229ccdec6fe86da99e575686ee484147a2bdf42aa +DIST exabgp-5.0.8.tar.gz 3402753 BLAKE2B e8bd4144b62fc8000086207c9e59952ad973795077519fe20a5fce717e0d5597e595c350cf9024b09d45f10cee417f09bb3fb08d2a474cc2db4f03f9aee43423 SHA512 eeb7266509abec9ad365702036b4f5d9940f3e0bc192cc35b1a5daf4fe5fe176235cd910820f5b710c8c4b680ab422e9b2ce88ce19c2611732e12855ee678ffc diff --git a/net-misc/exabgp/exabgp-5.0.8.ebuild b/net-misc/exabgp/exabgp-5.0.8.ebuild new file mode 100644 index 0000000000000..0e93e13ebf652 --- /dev/null +++ b/net-misc/exabgp/exabgp-5.0.8.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{{11..14},{13..14}t} ) +DISTUTILS_USE_PEP517=setuptools +inherit tmpfiles systemd distutils-r1 + +DESCRIPTION="The BGP swiss army knife of networking" +HOMEPAGE="https://github.com/Exa-Networks/exabgp" +SRC_URI="https://github.com/Exa-Networks/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + acct-group/exabgp + acct-user/exabgp +" +BDEPEND=" + test? ( + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/pytest-asyncio[${PYTHON_USEDEP}] + dev-python/hypothesis[${PYTHON_USEDEP}] + dev-python/pytest-timeout[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + "${FILESDIR}/exabgp-5.0.8-paths.patch" + "${FILESDIR}/exabgp-5.0.8-ip-path.patch" + "${FILESDIR}/exabgp-5.0.8-healthcheck-allow-disable-metric.patch" + "${FILESDIR}/exabgp-5.0.8-less-verbose-logging.patch" +) + +EPYTEST_PLUGINS=( + hypothesis + pytest-asyncio + pytest-timeout +) + +distutils_enable_tests pytest + +python_prepare_all() { + # remove performance tests + rm -rf tests/performance || die + + distutils-r1_python_prepare_all +} + +python_install_all() { + distutils-r1_python_install_all + + newinitd "${FILESDIR}/${PN}.initd-r2" ${PN} + newconfd "${FILESDIR}/${PN}.confd" ${PN} + + newtmpfiles "${FILESDIR}/exabgp.tmpfiles" ${PN}.conf + systemd_dounit etc/systemd/* + + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + keepdir /etc/exabgp + + doman doc/man/*.? +} + +pkg_postinst() { + tmpfiles_process ${PN}.conf +} diff --git a/net-misc/exabgp/files/exabgp-5.0.8-healthcheck-allow-disable-metric.patch b/net-misc/exabgp/files/exabgp-5.0.8-healthcheck-allow-disable-metric.patch new file mode 100644 index 0000000000000..2769d99b4990d --- /dev/null +++ b/net-misc/exabgp/files/exabgp-5.0.8-healthcheck-allow-disable-metric.patch @@ -0,0 +1,22 @@ +diff --git a/src/exabgp/application/healthcheck.py b/src/exabgp/application/healthcheck.py +index 7a3a4d416..b14266688 100644 +--- a/src/exabgp/application/healthcheck.py ++++ b/src/exabgp/application/healthcheck.py +@@ -112,6 +112,7 @@ def setargs(parser): + g.add_argument('--label', default=None, help='use the provided label to match setup ip addresses') + g.add_argument('--label-exact-match', default=False, action='store_true', help='use the provided label to exactly match setup ip addresses, not a prefix match') + g.add_argument('--start-ip', metavar='N', type=int, default=0, help='index of the first IP in the list of IP addresses') ++ g.add_argument('--no-metric', type="store_true", default=False, help="don't send metrics when updating announcements") + g.add_argument('--up-metric', metavar='M', type=int, default=100, help='first IP get the metric M when the service is up') + g.add_argument('--down-metric', metavar='M', type=int, default=1000, help='first IP get the metric M when the service is down') + g.add_argument('--disabled-metric', metavar='M', type=int, default=500, help='first IP get the metric M when the service is disabled') +@@ -438,7 +439,8 @@ def loop(options): + announce = f'route {ip} next-hop {options.next_hop or "self"}' + + if action == 'announce': +- announce = f'{announce} med {metric}' ++ if not options.no_metric: ++ announce = f'{announce} med {metric}' + if options.local_preference >= 0: + announce = f'{announce} local-preference {options.local_preference}' + if options.community or options.disabled_community: diff --git a/net-misc/exabgp/files/exabgp-5.0.8-ip-path.patch b/net-misc/exabgp/files/exabgp-5.0.8-ip-path.patch new file mode 100644 index 0000000000000..1b05327e6afd9 --- /dev/null +++ b/net-misc/exabgp/files/exabgp-5.0.8-ip-path.patch @@ -0,0 +1,13 @@ +diff --git a/src/exabgp/application/healthcheck.py b/src/exabgp/application/healthcheck.py +index 66e5a252f..7a3a4d416 100644 +--- a/src/exabgp/application/healthcheck.py ++++ b/src/exabgp/application/healthcheck.py +@@ -231,7 +231,7 @@ def system_ips(ip_ifnames, label, label_only, label_exact_match): + labelre = re.compile(r'.*\s+(?:' + '|'.join(ifnames) + r'):(?P