Gentoo Archives: gentoo-commits

From: Matthew Thode <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/openvswitch/
Date: Sun, 02 Jun 2019 17:22:12
Message-Id: 1559495692.0d74f18fa38281b3391a535b0b8d1d44eab260a6.prometheanfire@gentoo
1 commit: 0d74f18fa38281b3391a535b0b8d1d44eab260a6
2 Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 2 17:14:52 2019 +0000
4 Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 2 17:14:52 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d74f18f
7
8 net-misc/openvswitch: 2.10.2 and 2.11.1 bump
9
10 Bug: https://bugs.gentoo.org/687186
11 Package-Manager: Portage-2.3.66, Repoman-2.3.13
12 Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>
13
14 net-misc/openvswitch/Manifest | 2 +
15 net-misc/openvswitch/openvswitch-2.10.2.ebuild | 147 +++++++++++++++++++++++++
16 net-misc/openvswitch/openvswitch-2.11.1.ebuild | 147 +++++++++++++++++++++++++
17 3 files changed, 296 insertions(+)
18
19 diff --git a/net-misc/openvswitch/Manifest b/net-misc/openvswitch/Manifest
20 index 3df07d1580f..67563a392ef 100644
21 --- a/net-misc/openvswitch/Manifest
22 +++ b/net-misc/openvswitch/Manifest
23 @@ -1,3 +1,5 @@
24 DIST openvswitch-2.10.0.tar.gz 7528705 BLAKE2B a04e6e823a40e9a3a2d2ffd79a881b1f1e2063333a911b9b213eb1ae10d35c4716778e9897f264216889fd7db75b4f89c3e05b34040ce01ab29f0844b4b0cbb2 SHA512 f118c1c4ab4e126c3343023b03007ca9819c3c5a5ea42eaffaabdc7c50ecddede3e258574dbe0de95ed3be2e3d101612f5bdb423a7adb679987f4e501183a216
25 DIST openvswitch-2.10.1.tar.gz 7522058 BLAKE2B 0f4eef6bf376cc23de4061c04787663f31458d98ac9ffb76627d5a7bb9422ee5f1d99e5c6024ad078c1b6128fb1b9ac99ea9e7107803fd2fdf6cb09bff6b0ef3 SHA512 3634bd3e978110cb9e11191a88e4232a7af152a6ddf46e8a32e50e07de866be782b7e753d26b81183ec107816e5af4109badf8f2067a61fd9506ccf81e748e44
26 +DIST openvswitch-2.10.2.tar.gz 7561889 BLAKE2B a53dd7db7dcab5098af81671cb265861d3af79cce53436d75e0c3d8a38ce408a142f99b936a66c8bf0f3b317970ad8c1ef84bacc2e573e9b8c21b70aab1de485 SHA512 fd64ae814d85d3002d655a330268cfd6be79db6f954c132d3bfafc7dac23533918b642d0ed454e760f5820804bdff64f73ee8c36afc25a6810ef4c7aab748ba1
27 +DIST openvswitch-2.11.1.tar.gz 7682693 BLAKE2B f25a537d9ad4051db0049f7ba8442564fdc890035ce3984e1754b9dd916e0b78bea133331b5f4bc3a85d8b8a902ab210703feb0b7cce279803f642f9ee9f87bf SHA512 de016a1acfbae34d2062f4ac23b9b0782016fef4c0575b2714435380439f19613881173fb2c876afe86317a5c0327908704e540322d80f9f7da9f59bea7b1789
28 DIST openvswitch-2.8.1.tar.gz 6746474 BLAKE2B b41c77e7653a621c4954a8d752d569971f67db7e09a586da5e57ca4b6882ba3c478437ba8ac47b151c08068fa9c1cdb0f74f8630821e5d721ceb2accef75a3a1 SHA512 b9e90b49bb91aef80942b146e7e324b74f8961342dcc7836f2551ea976a69d66506a3a739bcb01a926b3b3874c7e4312de02965738a1536a342ab95f935d92f7
29
30 diff --git a/net-misc/openvswitch/openvswitch-2.10.2.ebuild b/net-misc/openvswitch/openvswitch-2.10.2.ebuild
31 new file mode 100644
32 index 00000000000..9fa8277073f
33 --- /dev/null
34 +++ b/net-misc/openvswitch/openvswitch-2.10.2.ebuild
35 @@ -0,0 +1,147 @@
36 +# Copyright 1999-2019 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=6
40 +
41 +PYTHON_COMPAT=( python{2_7,3_5,3_6} )
42 +
43 +inherit autotools eutils linux-info linux-mod python-r1 systemd
44 +
45 +DESCRIPTION="Production quality, multilayer virtual switch"
46 +HOMEPAGE="https://www.openvswitch.org"
47 +SRC_URI="https://www.openvswitch.org/releases/${P}.tar.gz"
48 +
49 +LICENSE="Apache-2.0 GPL-2"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~arm64 ~x86"
52 +IUSE="debug modules monitor +ssl"
53 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
54 +
55 +RDEPEND="
56 + ssl? ( dev-libs/openssl:0= )
57 + ${PYTHON_DEPS}
58 + ~dev-python/ovs-2.10.0[${PYTHON_USEDEP}]
59 + || (
60 + dev-python/twisted[conch,${PYTHON_USEDEP}]
61 + dev-python/twisted-web[${PYTHON_USEDEP}]
62 + )
63 + dev-python/zope-interface[${PYTHON_USEDEP}]
64 + debug? ( dev-lang/perl )"
65 +DEPEND="${RDEPEND}
66 + sys-apps/util-linux[caps]
67 + virtual/pkgconfig"
68 +
69 +PATCHES="${FILESDIR}/xcp-interface-reconfigure-2.3.2.patch"
70 +
71 +CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
72 +MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
73 +BUILD_TARGETS="all"
74 +
75 +pkg_setup() {
76 + if use modules ; then
77 + CONFIG_CHECK+=" ~!OPENVSWITCH"
78 + kernel_is ge 3 10 0 || die "Linux >= 3.10.0 and <= 4.8 required for userspace modules"
79 + # docs state 4.17.x code states 4.15.x
80 + kernel_is le 4 17 999 || die "Linux >= 3.10.0 and <= 4.12 required for userspace modules"
81 + linux-mod_pkg_setup
82 + else
83 + CONFIG_CHECK+=" ~OPENVSWITCH"
84 + linux-info_pkg_setup
85 + fi
86 +}
87 +
88 +src_prepare() {
89 + # Never build kernelmodules, doing this manually
90 + sed -i \
91 + -e '/^SUBDIRS/d' \
92 + datapath/Makefile.in || die "sed failed"
93 + eautoreconf
94 + default
95 +}
96 +
97 +src_configure() {
98 + set_arch_to_kernel
99 + # monitor is statically enabled for bug 596206
100 + # use monitor || export ovs_cv_python="no"
101 + # pyside is staticly disabled
102 + export ovs_cv_pyuic4="no"
103 +
104 + # flake8 is primarily a style guide tool, running it as part of the tests
105 + # in Gentoo does not make much sense, only breaks them: bug 607280
106 + export ovs_cv_flake8="no"
107 +
108 + local linux_config
109 + use modules && linux_config="--with-linux=${KV_OUT_DIR}"
110 +
111 + econf ${linux_config} \
112 + --with-rundir=/var/run/openvswitch \
113 + --with-logdir=/var/log/openvswitch \
114 + --with-pkidir=/etc/ssl/openvswitch \
115 + --with-dbdir=/var/lib/openvswitch \
116 + $(use_enable ssl) \
117 + $(use_enable !debug ndebug)
118 +}
119 +
120 +src_compile() {
121 + default
122 +
123 + use modules && linux-mod_src_compile
124 +}
125 +
126 +src_install() {
127 + default
128 +
129 + local SCRIPT
130 + if use monitor; then
131 + for SCRIPT in ovs-{pcap,parse-backtrace,dpctl-top,l3ping,tcpdump,tcpundump,test,vlan-test} bugtool/ovs-bugtool; do
132 + sed -e '1s|^.*$|#!/usr/bin/python|' -i utilities/"${SCRIPT}"
133 + python_foreach_impl python_doscript utilities/"${SCRIPT}"
134 + done
135 + rm -r "${ED%/}"/usr/share/openvswitch/python || die
136 + fi
137 +
138 + keepdir /var/{lib,log}/openvswitch
139 + keepdir /etc/ssl/openvswitch
140 + fperms 0750 /etc/ssl/openvswitch
141 +
142 + rm -rf "${ED%/}"/var/run || die
143 +
144 + newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
145 + newconfd "${FILESDIR}/ovs-vswitchd.confd-r2" ovs-vswitchd
146 + newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
147 + newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
148 +
149 + systemd_newunit "${FILESDIR}/ovsdb-server-r3.service" ovsdb-server.service
150 + systemd_newunit "${FILESDIR}/ovs-vswitchd-r3.service" ovs-vswitchd.service
151 + systemd_newunit rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service ovs-delete-transient-ports.service
152 + systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf
153 +
154 + insinto /etc/logrotate.d
155 + newins rhel/etc_logrotate.d_openvswitch openvswitch
156 +
157 + use modules && linux-mod_src_install
158 +}
159 +
160 +pkg_postinst() {
161 + use modules && linux-mod_pkg_postinst
162 +
163 + # only needed on non-systemd, but helps anyway
164 + elog "Use the following command to create an initial database for ovsdb-server:"
165 + elog " emerge --config =${CATEGORY}/${PF}"
166 + elog "(will create a database in /var/lib/openvswitch/conf.db)"
167 + elog "or to convert the database to the current schema after upgrading."
168 +}
169 +
170 +pkg_config() {
171 + local db="${EROOT%/}"/var/lib/openvswitch/conf.db
172 + if [[ -e "${db}" ]] ; then
173 + einfo "Database '${db}' already exists, doing schema migration..."
174 + einfo "(if the migration fails, make sure that ovsdb-server is not running)"
175 + ovsdb-tool convert "${db}" \
176 + "${EROOT%/}"/usr/share/openvswitch/vswitch.ovsschema || die "converting database failed"
177 + else
178 + einfo "Creating new database '${db}'..."
179 + ovsdb-tool create "${db}" \
180 + "${EROOT%/}"/usr/share/openvswitch/vswitch.ovsschema || die "creating database failed"
181 + fi
182 +}
183
184 diff --git a/net-misc/openvswitch/openvswitch-2.11.1.ebuild b/net-misc/openvswitch/openvswitch-2.11.1.ebuild
185 new file mode 100644
186 index 00000000000..a36bb2cdaa1
187 --- /dev/null
188 +++ b/net-misc/openvswitch/openvswitch-2.11.1.ebuild
189 @@ -0,0 +1,147 @@
190 +# Copyright 1999-2019 Gentoo Authors
191 +# Distributed under the terms of the GNU General Public License v2
192 +
193 +EAPI=6
194 +
195 +PYTHON_COMPAT=( python{2_7,3_5,3_6} )
196 +
197 +inherit autotools eutils linux-info linux-mod python-r1 systemd
198 +
199 +DESCRIPTION="Production quality, multilayer virtual switch"
200 +HOMEPAGE="https://www.openvswitch.org"
201 +SRC_URI="https://www.openvswitch.org/releases/${P}.tar.gz"
202 +
203 +LICENSE="Apache-2.0 GPL-2"
204 +SLOT="0"
205 +KEYWORDS="~amd64 ~arm64 ~x86"
206 +IUSE="debug modules monitor +ssl"
207 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
208 +
209 +RDEPEND="
210 + ssl? ( dev-libs/openssl:0= )
211 + ${PYTHON_DEPS}
212 + ~dev-python/ovs-2.10.0[${PYTHON_USEDEP}]
213 + || (
214 + dev-python/twisted[conch,${PYTHON_USEDEP}]
215 + dev-python/twisted-web[${PYTHON_USEDEP}]
216 + )
217 + dev-python/zope-interface[${PYTHON_USEDEP}]
218 + debug? ( dev-lang/perl )"
219 +DEPEND="${RDEPEND}
220 + sys-apps/util-linux[caps]
221 + virtual/pkgconfig"
222 +
223 +PATCHES="${FILESDIR}/xcp-interface-reconfigure-2.3.2.patch"
224 +
225 +CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
226 +MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
227 +BUILD_TARGETS="all"
228 +
229 +pkg_setup() {
230 + if use modules ; then
231 + CONFIG_CHECK+=" ~!OPENVSWITCH"
232 + kernel_is ge 3 10 0 || die "Linux >= 3.10.0 and <= 4.8 required for userspace modules"
233 + # docs state 4.17.x code states 4.15.x
234 + kernel_is le 4 18 999 || die "Linux >= 3.10.0 and <= 4.18 required for userspace modules"
235 + linux-mod_pkg_setup
236 + else
237 + CONFIG_CHECK+=" ~OPENVSWITCH"
238 + linux-info_pkg_setup
239 + fi
240 +}
241 +
242 +src_prepare() {
243 + # Never build kernelmodules, doing this manually
244 + sed -i \
245 + -e '/^SUBDIRS/d' \
246 + datapath/Makefile.in || die "sed failed"
247 + eautoreconf
248 + default
249 +}
250 +
251 +src_configure() {
252 + set_arch_to_kernel
253 + # monitor is statically enabled for bug 596206
254 + # use monitor || export ovs_cv_python="no"
255 + # pyside is staticly disabled
256 + export ovs_cv_pyuic4="no"
257 +
258 + # flake8 is primarily a style guide tool, running it as part of the tests
259 + # in Gentoo does not make much sense, only breaks them: bug 607280
260 + export ovs_cv_flake8="no"
261 +
262 + local linux_config
263 + use modules && linux_config="--with-linux=${KV_OUT_DIR}"
264 +
265 + econf ${linux_config} \
266 + --with-rundir=/var/run/openvswitch \
267 + --with-logdir=/var/log/openvswitch \
268 + --with-pkidir=/etc/ssl/openvswitch \
269 + --with-dbdir=/var/lib/openvswitch \
270 + $(use_enable ssl) \
271 + $(use_enable !debug ndebug)
272 +}
273 +
274 +src_compile() {
275 + default
276 +
277 + use modules && linux-mod_src_compile
278 +}
279 +
280 +src_install() {
281 + default
282 +
283 + local SCRIPT
284 + if use monitor; then
285 + for SCRIPT in ovs-{pcap,parse-backtrace,dpctl-top,l3ping,tcpdump,tcpundump,test,vlan-test} bugtool/ovs-bugtool; do
286 + sed -e '1s|^.*$|#!/usr/bin/python|' -i utilities/"${SCRIPT}"
287 + python_foreach_impl python_doscript utilities/"${SCRIPT}"
288 + done
289 + rm -r "${ED%/}"/usr/share/openvswitch/python || die
290 + fi
291 +
292 + keepdir /var/{lib,log}/openvswitch
293 + keepdir /etc/ssl/openvswitch
294 + fperms 0750 /etc/ssl/openvswitch
295 +
296 + rm -rf "${ED%/}"/var/run || die
297 +
298 + newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
299 + newconfd "${FILESDIR}/ovs-vswitchd.confd-r2" ovs-vswitchd
300 + newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
301 + newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
302 +
303 + systemd_newunit "${FILESDIR}/ovsdb-server-r3.service" ovsdb-server.service
304 + systemd_newunit "${FILESDIR}/ovs-vswitchd-r3.service" ovs-vswitchd.service
305 + systemd_newunit rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service ovs-delete-transient-ports.service
306 + systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf
307 +
308 + insinto /etc/logrotate.d
309 + newins rhel/etc_logrotate.d_openvswitch openvswitch
310 +
311 + use modules && linux-mod_src_install
312 +}
313 +
314 +pkg_postinst() {
315 + use modules && linux-mod_pkg_postinst
316 +
317 + # only needed on non-systemd, but helps anyway
318 + elog "Use the following command to create an initial database for ovsdb-server:"
319 + elog " emerge --config =${CATEGORY}/${PF}"
320 + elog "(will create a database in /var/lib/openvswitch/conf.db)"
321 + elog "or to convert the database to the current schema after upgrading."
322 +}
323 +
324 +pkg_config() {
325 + local db="${EROOT%/}"/var/lib/openvswitch/conf.db
326 + if [[ -e "${db}" ]] ; then
327 + einfo "Database '${db}' already exists, doing schema migration..."
328 + einfo "(if the migration fails, make sure that ovsdb-server is not running)"
329 + ovsdb-tool convert "${db}" \
330 + "${EROOT%/}"/usr/share/openvswitch/vswitch.ovsschema || die "converting database failed"
331 + else
332 + einfo "Creating new database '${db}'..."
333 + ovsdb-tool create "${db}" \
334 + "${EROOT%/}"/usr/share/openvswitch/vswitch.ovsschema || die "creating database failed"
335 + fi
336 +}