Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/openvswitch/
Date: Wed, 05 Oct 2016 16:56:57
Message-Id: 1475686604.f41d199cc9faa7b31dd2120d8aec40738df01144.soap@gentoo
1 commit: f41d199cc9faa7b31dd2120d8aec40738df01144
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 5 16:56:26 2016 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 5 16:56:44 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f41d199c
7
8 net-misc/openvswitch: Fix minor QA issues
9
10 Package-Manager: portage-2.3.1
11
12 net-misc/openvswitch/openvswitch-2.6.0.ebuild | 32 ++++++++++++++++-----------
13 1 file changed, 19 insertions(+), 13 deletions(-)
14
15 diff --git a/net-misc/openvswitch/openvswitch-2.6.0.ebuild b/net-misc/openvswitch/openvswitch-2.6.0.ebuild
16 index 721111b..915acb9 100644
17 --- a/net-misc/openvswitch/openvswitch-2.6.0.ebuild
18 +++ b/net-misc/openvswitch/openvswitch-2.6.0.ebuild
19 @@ -4,9 +4,9 @@
20
21 EAPI=6
22
23 -PYTHON_COMPAT=( python2_7 python3_4 python3_5 )
24 +PYTHON_COMPAT=( python{2_7,3_4,3_5} )
25
26 -inherit eutils linux-info linux-mod python-r1 systemd autotools
27 +inherit autotools eutils linux-info linux-mod python-r1 systemd
28
29 DESCRIPTION="Production quality, multilayer virtual switch"
30 HOMEPAGE="http://openvswitch.org"
31 @@ -22,7 +22,7 @@ RDEPEND="
32 >=sys-apps/openrc-0.10.5
33 sys-apps/systemd
34 )
35 - ssl? ( dev-libs/openssl:0 )
36 + ssl? ( dev-libs/openssl:0= )
37 monitor? (
38 ${PYTHON_DEPS}
39 dev-python/twisted-core
40 @@ -60,6 +60,7 @@ src_prepare() {
41 eautoreconf
42 default
43 }
44 +
45 src_configure() {
46 set_arch_to_kernel
47 use monitor || export ovs_cv_python="no"
48 @@ -86,32 +87,34 @@ src_compile() {
49
50 src_install() {
51 default
52 +
53 + local SCRIPT
54 for SCRIPT in ovs-{pcap,parse-backtrace,dpctl-top,l3ping,tcpundump,test,vlan-test} bugtool/ovs-bugtool; do
55 python_replicate_script utilities/"${SCRIPT}"
56 done
57
58 if use monitor ; then
59 python_install() {
60 - python_domodule "${ED}"usr/share/openvswitch/python/*
61 - python_optimize "${ED}usr/share/ovsdbmonitor"
62 + python_domodule "${ED%/}"/usr/share/openvswitch/python/*
63 + python_optimize "${ED%/}"/usr/share/ovsdbmonitor
64 }
65 python_foreach_impl python_install
66 - rm -r "${ED}usr/share/openvswitch/python" || die "rm failed"
67 + rm -r "${ED%/}"/usr/share/openvswitch/python || die
68 fi
69 # not working without the brcompat_mod kernel module which did not get
70 # included in the kernel and we can't build it anymore
71 - rm "${ED}usr/sbin/ovs-brcompatd" "${ED}usr/share/man/man8/ovs-brcompatd.8"
72 + rm "${ED%/}"/usr/sbin/ovs-brcompatd "${ED%/}"/usr/share/man/man8/ovs-brcompatd.8 || die
73
74 keepdir /var/{lib,log}/openvswitch
75 keepdir /etc/ssl/openvswitch
76 fperms 0750 /etc/ssl/openvswitch
77
78 - rm -rf "${ED}var/run" || die "rm failed"
79 + rm -rf "${ED%/}"/var/run || die
80 if ! use monitor ; then
81 - rmdir "${ED}usr/share/ovsdbmonitor" || die "rm failed"
82 + rm -r "${ED%/}"/usr/share/ovsdbmonitor || die
83 fi
84 if ! use debug ; then
85 - rm "${ED}usr/bin/ovs-parse-leaks" die "rm failed"
86 + rm "${ED%/}"/usr/bin/ovs-parse-leaks || die
87 fi
88
89 newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
90 @@ -132,6 +135,7 @@ src_install() {
91 pkg_postinst() {
92 use modules && linux-mod_pkg_postinst
93
94 + local pv
95 for pv in ${REPLACING_VERSIONS}; do
96 if ! version_is_at_least 1.9.0 ${pv} ; then
97 ewarn "The configuration database for Open vSwitch got moved in version 1.9.0 from"
98 @@ -150,13 +154,15 @@ pkg_postinst() {
99 }
100
101 pkg_config() {
102 - local db="${EPREFIX}/var/lib/openvswitch/conf.db"
103 + local db="${EROOT%/}"/var/lib/openvswitch/conf.db
104 if [[ -e "${db}" ]] ; then
105 einfo "Database '${db}' already exists, doing schema migration..."
106 einfo "(if the migration fails, make sure that ovsdb-server is not running)"
107 - "${EPREFIX}/usr/bin/ovsdb-tool" convert "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "converting database failed"
108 + ovsdb-tool convert "${db}" \
109 + "${EROOT%/}"/usr/share/openvswitch/vswitch.ovsschema || die "converting database failed"
110 else
111 einfo "Creating new database '${db}'..."
112 - "${EPREFIX}/usr/bin/ovsdb-tool" create "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "creating database failed"
113 + ovsdb-tool create "${db}" \
114 + "${EROOT%/}"/usr/share/openvswitch/vswitch.ovsschema || die "creating database failed"
115 fi
116 }