1 |
commit: ae397e779e821f72550b8a0f91c9acc2033a583b |
2 |
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com> |
3 |
AuthorDate: Mon Nov 29 17:37:02 2021 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 29 17:37:02 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae397e77 |
7 |
|
8 |
net-misc/exabgp: Version bump |
9 |
|
10 |
Copyright: Sony Interactive Entertainment Inc. |
11 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
12 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
13 |
|
14 |
net-misc/exabgp/Manifest | 1 + |
15 |
net-misc/exabgp/exabgp-4.2.16.ebuild | 64 +++++++++++++++++++++++++++++++++++ |
16 |
net-misc/exabgp/files/exabgp.initd-r2 | 64 +++++++++++++++++++++++++++++++++++ |
17 |
3 files changed, 129 insertions(+) |
18 |
|
19 |
diff --git a/net-misc/exabgp/Manifest b/net-misc/exabgp/Manifest |
20 |
index 310718963b10..60dfd124da04 100644 |
21 |
--- a/net-misc/exabgp/Manifest |
22 |
+++ b/net-misc/exabgp/Manifest |
23 |
@@ -1 +1,2 @@ |
24 |
DIST exabgp-4.2.11.tar.gz 2931753 BLAKE2B e5241619db24e2e82dfb42bc613d6b2c28efac205d2bedf732a665a5a9eff1b384833cb1fec3e68a285fc01269c2eaca55b311650e59bcda13d8f024e5294dc3 SHA512 61c143e90fd81323b03682ad46f2861576ab0328e2030259eff15bb9ef965477c514fb355112cbaf3dc138fb9f5582b6e1e1efb8d0d4313a9b9924ced156a155 |
25 |
+DIST exabgp-4.2.16.tar.gz 2933071 BLAKE2B bc66ece537cb175811233d26f3445e1bb3f7d4f8950bf0839ced014430db17a4df614661448f275fb3a890bb2af6b2459f938f830c82f03a586829e7fe31caca SHA512 06731612df6f0f6623e8ad58c3b52fc4b5dee6b4bb3bb29cee272a4061ef087e2f98739a75cd07ae51e66fb633069926899882e6bab801010ad1db3333666471 |
26 |
|
27 |
diff --git a/net-misc/exabgp/exabgp-4.2.16.ebuild b/net-misc/exabgp/exabgp-4.2.16.ebuild |
28 |
new file mode 100644 |
29 |
index 000000000000..b04278316850 |
30 |
--- /dev/null |
31 |
+++ b/net-misc/exabgp/exabgp-4.2.16.ebuild |
32 |
@@ -0,0 +1,64 @@ |
33 |
+# Copyright 1999-2021 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python3_{8..10} ) |
39 |
+DISTUTILS_USE_SETUPTOOLS=rdepend |
40 |
+inherit tmpfiles systemd distutils-r1 |
41 |
+ |
42 |
+DESCRIPTION="The BGP swiss army knife of networking" |
43 |
+HOMEPAGE="https://github.com/Exa-Networks/exabgp" |
44 |
+SRC_URI="https://github.com/Exa-Networks/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
45 |
+ |
46 |
+LICENSE="BSD" |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~amd64" |
49 |
+IUSE="test" |
50 |
+RESTRICT="!test? ( test )" |
51 |
+ |
52 |
+RDEPEND=" |
53 |
+ acct-group/exabgp |
54 |
+ acct-user/exabgp |
55 |
+" |
56 |
+BDEPEND=" |
57 |
+ test? ( |
58 |
+ dev-python/psutil[${PYTHON_USEDEP}] |
59 |
+ dev-python/nose[${PYTHON_USEDEP}] |
60 |
+ dev-python/six[${PYTHON_USEDEP}] |
61 |
+ ) |
62 |
+" |
63 |
+ |
64 |
+PATCHES=( |
65 |
+ "${FILESDIR}/exabgp-4.2.7-paths.patch" |
66 |
+ "${FILESDIR}/exabgp-4.2.10-ip-path.patch" |
67 |
+ "${FILESDIR}/exabgp-4.2.11-healthcheck-allow-disable-metric.patch" |
68 |
+ "${FILESDIR}/exabgp-4.2.11-healthcheck-fix-log-crash.patch" |
69 |
+ "${FILESDIR}/exabgp-4.2.11-less-verbose-logging.patch" |
70 |
+) |
71 |
+ |
72 |
+python_test() { |
73 |
+ ./qa/bin/parsing || die "tests fail with ${EPYTHON}" |
74 |
+ nosetests -v ./qa/tests/*_test.py || die "tests fail with ${EPYTHON}" |
75 |
+} |
76 |
+ |
77 |
+python_install_all() { |
78 |
+ distutils-r1_python_install_all |
79 |
+ |
80 |
+ newinitd "${FILESDIR}/${PN}.initd-r2" ${PN} |
81 |
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} |
82 |
+ |
83 |
+ newtmpfiles "${FILESDIR}/exabgp.tmpfiles" ${PN}.conf |
84 |
+ systemd_dounit etc/systemd/* |
85 |
+ |
86 |
+ insinto /etc/logrotate.d |
87 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
88 |
+ |
89 |
+ keepdir /etc/exabgp |
90 |
+ |
91 |
+ doman doc/man/*.? |
92 |
+} |
93 |
+ |
94 |
+pkg_postinst() { |
95 |
+ tmpfiles_process ${PN}.conf |
96 |
+} |
97 |
|
98 |
diff --git a/net-misc/exabgp/files/exabgp.initd-r2 b/net-misc/exabgp/files/exabgp.initd-r2 |
99 |
new file mode 100644 |
100 |
index 000000000000..30280b9cfbf7 |
101 |
--- /dev/null |
102 |
+++ b/net-misc/exabgp/files/exabgp.initd-r2 |
103 |
@@ -0,0 +1,64 @@ |
104 |
+#!/sbin/openrc-run |
105 |
+# Copyright 1999-2021 Gentoo Authors |
106 |
+# Distributed under the terms of the GNU General Public License v2 |
107 |
+ |
108 |
+# default arguments |
109 |
+: "${EXABGP_ARGS:=--env=/etc/${RC_SVCNAME}/exabgp.env /etc/${RC_SVCNAME}/exabgp.conf}" |
110 |
+ |
111 |
+command="capsh" |
112 |
+command_args=" |
113 |
+ --groups=${EXABGP_GROUP:=exabgp} |
114 |
+ --user=${EXABGP_USER:=exabgp} |
115 |
+ --caps='cap_net_admin+epi cap_setuid+ep-i cap_setgid+ep-i' |
116 |
+ -- -c \"/usr/bin/exabgp ${EXABGP_ARGS}\"" |
117 |
+ |
118 |
+supervisor=supervise-daemon |
119 |
+ |
120 |
+: "${pidfile:=/run/exabgp/${RC_SVCNAME}-supervisor.pid}" |
121 |
+: "${output_log:=/var/log/${RC_SVCNAME}/exabgp.log}" |
122 |
+: "${error_log:=/var/log/${RC_SVCNAME}/exabgp.log}" |
123 |
+ |
124 |
+extra_started_commands="routes sessions" |
125 |
+extra_commands="checkconfig" |
126 |
+ |
127 |
+depend() { |
128 |
+ need net |
129 |
+} |
130 |
+ |
131 |
+start_pre() { |
132 |
+ checkpath -q -d -m 0755 -o "${EXABGP_USER}:${EXABGP_GROUP}" \ |
133 |
+ /run/exabgp || return |
134 |
+ |
135 |
+ checkpath -q -p -m 0600 -o "${EXABGP_USER}:${EXABGP_GROUP}" \ |
136 |
+ /run/exabgp/${RC_SVCNAME}.in /run/exabgp/${RC_SVCNAME}.out || return |
137 |
+ |
138 |
+ checkpath -q -d -m 0755 -o "${EXABGP_USER}:${EXABGP_GROUP}" \ |
139 |
+ "/var/log/${RC_SVCNAME}" || return |
140 |
+ |
141 |
+ checkconfig || return |
142 |
+} |
143 |
+ |
144 |
+stop_pre() { |
145 |
+ # don't restart if the configuration is bad |
146 |
+ if [ "${RC_CMD}" = restart ]; then |
147 |
+ checkconfig || return |
148 |
+ fi |
149 |
+} |
150 |
+ |
151 |
+checkconfig() { |
152 |
+ ebegin "Checking configuration for ${RC_SVCNAME}" |
153 |
+ exabgp -t ${EXABGP_ARGS} |
154 |
+ eend ${?} "Invalid configuration" |
155 |
+} |
156 |
+ |
157 |
+sessions() { |
158 |
+ ebegin "Querying sessions" |
159 |
+ exabgpcli --env /etc/${RC_SVCNAME}/exabgp.env show neighbor summary |
160 |
+ eend ${?} "exabgpcli failed" |
161 |
+} |
162 |
+ |
163 |
+routes() { |
164 |
+ ebegin "Querying routes" |
165 |
+ exabgpcli --env /etc/${RC_SVCNAME}/exabgp.env show adj-rib out |
166 |
+ eend ${?} "exabgpcli failed" |
167 |
+} |