remove old ovs

This commit is contained in:
ace 2021-06-29 13:11:15 +03:00
parent c9bab470b0
commit a2551efcd1
No known key found for this signature in database
GPG Key ID: 32989872B72276A0
16 changed files with 0 additions and 661 deletions

View File

@ -1,18 +0,0 @@
AUX openvswitch.tmpfiles 40 BLAKE2B df482f24d2c48d54b6cabb1f0a37fcb193c9da71d9ae2eab0dd9a15209462e118a7160411d6d0cdb10f1721f0a86b689dd9c286325ed965ac1a510ae0af791a1 SHA512 020aaa9599b853d75a612f7bbd4ef8ea024908f283afe5c727f5d2a1f3a5a98634f82d840b3ebf886b9a82e9c60c237ced2fb13057bc7bb9ab5c449e11b51997
AUX ovs-delete-transient-ports.service 272 BLAKE2B 4ee3767f84b4f47fe0d01aa9aaff35c9ca2be5afa6ba0f595d37ab0cdb4ccbdd7abcfb2a9c91a04d7820d1819f7757c7de569dd62cdc6c76cf533c27908f3471 SHA512 045f9c59275c555eb83c15e7cc0af4db3e9cd834385b4bbca35f5863e8432a0cf2038d10b8a55ad90a180b386a4bd0962ddcc401b4f3cf55b7e398e0683cc0f8
AUX ovs-vswitchd-r1 436 BLAKE2B 3660edee0906e3bd7fb1715601eb08567fba2ccb20a9b25b7ef250f130737d903acd187b35cb487a4141396ef3b7746d296ab613477b7fe907f1c6bb4c3da85d SHA512 7a98f85251a7b60d93a28ade482669537585fc05265cc51eb61e283739537df980230bd5f9dccfdb60772afe3f0bf2493eed9a25b289c7ef37d998e8ca5ec4df
AUX ovs-vswitchd-r3.service 904 BLAKE2B 1a9880154a7628c57838a7d0fcf60d3734f35bef36fcaf6e396da92a35fa80a056bb1122d218f0331cc3382c13433672471dba7d7e711fd4f2ced4803b5623fa SHA512 408b52e74dab747bf83c66e43515868eaddb24de6e914c7ed201425cdc24c731b3d705cf9abf2cfc30c2499b77f2795b72d11f31bcfc3237cca0ad13ca17fc63
AUX ovs-vswitchd.confd-r2 188 BLAKE2B b38ed709f5d59caed9146df078c26b08d85178e7dd783ecc1f431721a23732fdacad77886ab4387ab94121eebca267b1d628f5a3e2f8c95e11f90b8a260a80c6 SHA512 b1afe4a4095ea78e7a58c69a26c0eac6e944594702364d81766944f7470cdbac09922286b8a8f926aad8ff2e14ee6b5311188d2dc22ea2d8bb9cf28034157135
AUX ovs-vswitchd.service 393 BLAKE2B 6ca53819e5bda787eeefcf94f76749621da3462f2f92ccd70de35ba407b4dd74b29552b609871d77f85ccca764640555167b40b97d6585b80bf3bbfcb1ae242c SHA512 74d2ba9b76ad29dbb75e9b3321e1e714140a1c9bf9f5176c8418b025ffdb9c14d9f532709835c163c7256b4c81d69b522fcbc12d6bd9399283c8bd45b94cd7f2
AUX ovsdb-server-r1 855 BLAKE2B 894b2bd417ad1e8113a0288db59af133e5b705deac982b01fcc9266c7c0387423a1897d55cd70651c3a0407461c641455869ceefe330cc1880abc2cf79516de6 SHA512 fa51b2a661c1bdd345adf58c2b0e4c4c68bb4ed4ce78dc6e195ba9fe662fa451753664c72f56d755cfa682d0c9accd283dc501aee3c4ba58238f44df1ddaf5a5
AUX ovsdb-server-r3.service 813 BLAKE2B ba16534aaf407121f56e1ffc711dcc87b4c5ee07cc12f74e1d8ca2b7e85fefede4100154ef2031470b68fe5085539984b6b38b8c518fa38a8eb19d8af3a24c1c SHA512 ed3137fb0b26be82f311aa9a56855d91bb113a64fd43ecde8d97979354edffe26ee7712eac91c96b19e56c35a5b4ef2c68acfe5c3c0c0cd21e35745fde41574e
AUX ovsdb-server.service 480 BLAKE2B 5192dfe98551bbd81eead18a7eaba70ff0901bf2cab42fa1c93b079901777bc0e7fca0847427affc5a069e9041297369364f9aa28869f63a463e3646f70f47fd SHA512 cb9196ebdb7f16eca4182172a079027dc2c28f366d0a4f9251480b20172758cb581cd91b9a0f2a3dde95742455bec9ef96aa584305f17bdc97b3de7d4c99aa19
AUX ovsdb-server_conf 492 BLAKE2B e82cd92a1ac46023d63a70093e0f9cf78b72eed20a70d2599f5a405f6f7e30e1d550090b9debc2262da674b9d04d3be16aadf375ca2031e74056433c1ce20818 SHA512 a9aab68cf5188ebdff520e8ae1bc90018fab13fea5cf7c36dda42a4acdeb842de8344191f2f52213ea173a73e647fe48e7bd29ce6974c9bf3880d0f91a3713aa
AUX ovsdb-server_conf2 584 BLAKE2B ac54fe7f3b593dce07f051874e4ebc59ab2872fcc994e55464f8ab74135498613f9a3bb38366babeae909ae8179be87c1168a069f427d4310f220afbb58d12da SHA512 0878963eef09a3933fcdb66e7ce1ab66131ce3ee1af5d403456e0f44d763e96ff90460d9013cea9a3eb0630d60a6b8aed04aeee6789882842975df2e86bc0b9e
AUX xcp-interface-reconfigure-2.3.2.patch 920 BLAKE2B a0cf230e9793484309ec38a6faf7ba386ae4e1ba7b8c77e3a3f0cbdef63d128dd765362e4ab8077da04a60444718283cc68d0a402ed12fa168c2ca983c1064a6 SHA512 7f2dd6fbd3f734abe2cf8e23a0aa49d81a8acb26ac5c28004a95ec0fe4630f7792aabdaeb8825a62ff96fcf1c3a871eea10b11c6b92ddf7965aa1f73150f7ec7
DIST openvswitch-2.13.0.tar.gz 7233892 BLAKE2B 66dfeb8a5dd61538360b319cfccbe49273298d6cb20df2105d1db7eb4d01f40d54ec8792a7f80d9ffc767f9b28ae09fee6aa76ac3d97be6fc43f3e7f3b2a63bd SHA512 3fcd15d07925273e0c45e6b1e70b2cd9998f753e8d1a11fd0de1d1511ad56dfddedbba436bb1c347b4afb84eb9cd6fc52c3d445b710a89d599d2ff47ed46f17c
DIST openvswitch-2.13.1.tar.gz 7112071 BLAKE2B 38a3016d45d9a5e8e8b6fdc68d24c1a21f76f5d908d8dd8b4ddaf1af6a8ac55e9abf9ec6e3df4f0371e6f6a9e54d418035b3183337f604423babcabbfc0f2794 SHA512 e8d27a9f7c4b504ac5bbdede8f9501fd11602417e69c401b6adbcc02b326363e52fa60ffd68ca32ba4e8d6066123f7ffa552d88ab964e3d5cd0596d61fd1dc29
DIST openvswitch-2.14.0.tar.gz 7359886 BLAKE2B e7633578e9db395b534e2aca84f08919d06d14b68cdf78b04de25b887bcb4eb0e476c7d6c54ae23b72f797a3b083e09d23d8eb142da1e1463b2fbcde76069108 SHA512 5fe377f9b2857e238e3d40e4452e8b36c80283230f1d0f4b983324532beba725913da817e545c8d7630762f170bb5b0dfe810fd1b8b559994d5eae828beb8ec1
EBUILD openvswitch-2.13.0-r2.ebuild 4403 BLAKE2B 6da017c71efd2756299b5b019af8ec8b393f8582a15b2c654edf4219a6cee91122e5ba9578504b9e91d230e50078d8d5b024843a4b5678687db584b1606ea4c0 SHA512 63e01858fbd24a8efc0677e580da93b73d069056488ee0580af53250173134d6ed366b96a33b24b62f4ec786ffb5fc0d76efc6bb34f8d5e519b897df345b6f13
EBUILD openvswitch-2.13.1.ebuild 4403 BLAKE2B 6da017c71efd2756299b5b019af8ec8b393f8582a15b2c654edf4219a6cee91122e5ba9578504b9e91d230e50078d8d5b024843a4b5678687db584b1606ea4c0 SHA512 63e01858fbd24a8efc0677e580da93b73d069056488ee0580af53250173134d6ed366b96a33b24b62f4ec786ffb5fc0d76efc6bb34f8d5e519b897df345b6f13
EBUILD openvswitch-2.14.0.ebuild 4403 BLAKE2B 6da017c71efd2756299b5b019af8ec8b393f8582a15b2c654edf4219a6cee91122e5ba9578504b9e91d230e50078d8d5b024843a4b5678687db584b1606ea4c0 SHA512 63e01858fbd24a8efc0677e580da93b73d069056488ee0580af53250173134d6ed366b96a33b24b62f4ec786ffb5fc0d76efc6bb34f8d5e519b897df345b6f13

View File

@ -1 +0,0 @@
d /var/run/openvswitch 0770 root root -

View File

@ -1,10 +0,0 @@
[Unit]
Description=Open vSwitch Delete Transient Ports
After=ovsdb-server.service
Before=ovs-vswitchd.service
AssertPathExists=/var/run/openvswitch/db.sock
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/share/openvswitch/scripts/ovs-ctl delete-transient-ports

View File

@ -1,21 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
description="Open vSwitch virtual switch"
command="/usr/sbin/ovs-vswitchd"
command_args="
--pidfile
--detach
--monitor
${OPTIONS} ${DATABASE}"
pidfile="/var/run/openvswitch/ovs-vswitchd.pid"
depend() {
use ovsdb-server logger
}
start_pre() {
checkpath -d "/var/run/openvswitch" -m 0750
}

View File

@ -1,26 +0,0 @@
[Unit]
Description=Open vSwitch Daemon
Documentation=man:ovs-vswitchd
Wants=network.target
Before=network.target network.service
Requires=ovsdb-server.service
After=ovsdb-server.service network-pre.target systemd-udev-settle.service
ReloadPropagatedFrom=ovsdb-server.service
AssertPathIsReadWrite=/var/run/openvswitch/db.sock
[Service]
Type=forking
Restart=on-failure
Environment=HOME=/var/run/openvswitch
EnvironmentFile=-/etc/conf.d/ovs-vswitchd
ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
--no-ovsdb-server --no-monitor --system-id=random \
--ovs-user=${OVS_USER_ID} start $OPTIONS
ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server stop
ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server \
--no-monitor --system-id=random --ovs-user=${OVS_USER_ID} \
restart $OPTIONS
TimeoutSec=300
[Install]
WantedBy=multi-user.target

View File

@ -1,7 +0,0 @@
# Connection string for the configuration database (usually a unix socket)
DATABASE="unix:/var/run/openvswitch/db.sock"
# Additional options
OPTIONS="--mlockall"
OVS_USER_ID="root:root"

View File

@ -1,15 +0,0 @@
[Unit]
Description=Open vSwitch Daemon
Documentation=man:ovs-vswitchd
Wants=network.target
Before=network.target
Requires=ovsdb-server.service
After=ovsdb-server.service
[Service]
# --pidfile options is needed for create file used
# by ovs-appctl command.
ExecStart=/usr/sbin/ovs-vswitchd --mlockall --monitor unix:/var/run/openvswitch/db.sock --pidfile
[Install]
WantedBy=multi-user.target

View File

@ -1,34 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
description="Open vSwitch database server"
remote_punix=${DB_SOCKET:+"--remote=punix:${DB_SOCKET}"}
remote_db=${REMOTE_DB:+"--remote=${REMOTE_DB}"}
private_key=${PRIVATE_KEY:+"--private-key=${PRIVATE_KEY}"}
certificate=${CERTIFICATE:+"--certificate=${CERTIFICATE}"}
bootstrap_ca_cert=${BOOTSTRAP_CA_CERT:+"--bootstrap-ca-cert=${BOOTSTRAP_CA_CERT}"}
command="/usr/sbin/ovsdb-server"
command_args="
--pidfile
--detach
--monitor
${remote_punix}
${remote_db}
${private_key}
${certificate}
${bootstrap_ca_cert}
${DATABASE}
${OPTIONS}"
pidfile="/var/run/openvswitch/ovsdb-server.pid"
depend() {
need localmount
use logger
}
start_pre() {
checkpath -d "/var/run/openvswitch" -m 0750
}

View File

@ -1,22 +0,0 @@
[Unit]
Description=Open vSwitch Database Unit
Documentation=man:ovsdb-server
After=syslog.target network-pre.target
Before=network.target network.service
Wants=ovs-delete-transient-ports.service
[Service]
Type=forking
Restart=on-failure
EnvironmentFile=-/etc/conf.d/ovsdb-server
ExecStartPre=/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch
ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
--no-ovs-vswitchd --no-monitor --system-id=random \
--ovs-user=${OVS_USER_ID} \
start $OPTIONS
ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd stop
ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd \
--ovs-user=${OVS_USER_ID} \
--no-monitor restart $OPTIONS
RuntimeDirectory=openvswitch
RuntimeDirectoryMode=0755

View File

@ -1,14 +0,0 @@
[Unit]
Description=Open vSwitch Database Server
Documentation=man:ovsdb-server
[Service]
# The file can be shared for this as this values are prone to change
# and that way we don't need to update them in two different places
EnvironmentFile=/etc/conf.d/ovsdb-server
ExecStart=/usr/sbin/ovsdb-server --monitor \
--remote=punix:${DB_SOCKET} \
--remote=${REMOTE_DB} \
--private-key=${PRIVATE_KEY} \
--certificate=${CERTIFICATE} \
--bootstrap-ca-cert=${BOOTSTRAP_CA_CERT}

View File

@ -1,16 +0,0 @@
# Socket for bringing the server up
DB_SOCKET="/var/run/openvswitch/db.sock"
# Remote sockets are defined in the database by default
REMOTE_DB="db:Open_vSwitch,manager_options"
# All certificates and keys are stored in the database (if any)
PRIVATE_KEY="db:SSL,private_key"
CERTIFICATE="db:SSL,certificate"
BOOTSTRAP_CA_CERT="db:SSL,ca_cert"
# Alternative path for the database (default is /etc/openvswitch/conf.db)
# DATABASE="/etc/openvswitch/conf.db"
# Additional options
# OPTIONS=""

View File

@ -1,19 +0,0 @@
# Socket for bringing the server up
DB_SOCKET="/var/run/openvswitch/db.sock"
# Remote sockets are defined in the database by default
REMOTE_DB="db:Open_vSwitch,Open_vSwitch,manager_options"
# All certificates and keys are stored in the database (if any)
PRIVATE_KEY="db:Open_vSwitch,SSL,private_key"
CERTIFICATE="db:Open_vSwitch,SSL,certificate"
BOOTSTRAP_CA_CERT="db:Open_vSwitch,SSL,ca_cert"
# Default user
OVS_USER_ID="root:root"
# Alternative path for the database (default is /etc/openvswitch/conf.db)
# DATABASE="/etc/openvswitch/conf.db"
# Additional options
# OPTIONS=""

View File

@ -1,20 +0,0 @@
Description: Use xcp-xapi interface-reconfigure if found
Ubuntu/Debian provide the XCP interface-reconfigure hook in
a FHS compliant location; use this if found.
Author: James Page <james.page@ubuntu.com>
Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/1195053
Forwarded: no
--- a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
+++ b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
@@ -43,6 +43,10 @@ def delete_cacert():
def update(session, args):
# Refresh bridge network UUIDs in case this host joined or left a pool.
script = '/opt/xensource/libexec/interface-reconfigure'
+ # NOTE(jamespage): Override with distro xcp xapi locations
+ # if present
+ if os.path.exists('/usr/lib/xcp/lib/interface-reconfigure'):
+ script = '/usr/lib/xcp/lib/interface-reconfigure'
try:
retval = subprocess.call([script, 'rewrite'])
if retval != 0:

View File

@ -1,146 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6,7,8,9} )
inherit autotools eutils linux-info linux-mod python-r1 systemd
DESCRIPTION="Production quality, multilayer virtual switch"
HOMEPAGE="https://www.openvswitch.org"
SRC_URI="https://www.openvswitch.org/releases/${P}.tar.gz"
LICENSE="Apache-2.0 GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm64 x86"
IUSE="debug modules monitor +ssl"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="
ssl? ( dev-libs/openssl:0= )
${PYTHON_DEPS}
~dev-python/ovs-2.13.0[${PYTHON_USEDEP}]
dev-python/twisted[conch,${PYTHON_USEDEP}]
dev-python/zope-interface[${PYTHON_USEDEP}]
debug? ( dev-lang/perl )"
DEPEND="${RDEPEND}
sys-apps/util-linux[caps]
virtual/pkgconfig"
PATCHES="
"${FILESDIR}/xcp-interface-reconfigure-2.3.2.patch"
"
CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
BUILD_TARGETS="all"
pkg_setup() {
if use modules ; then
CONFIG_CHECK+=" ~!OPENVSWITCH"
kernel_is ge 3 10 0 || die "Linux >= 3.10.0 and <= 4.8 required for userspace modules"
# docs state 4.17.x code states 4.15.x
kernel_is le 5 5 999 || die "Linux >= 3.10.0 and <= 4.18 required for userspace modules"
linux-mod_pkg_setup
else
CONFIG_CHECK+=" ~OPENVSWITCH"
linux-info_pkg_setup
fi
}
src_prepare() {
# Never build kernelmodules, doing this manually
sed -i \
-e '/^SUBDIRS/d' \
datapath/Makefile.in || die "sed failed"
eautoreconf
default
}
src_configure() {
set_arch_to_kernel
# monitor is statically enabled for bug 596206
# use monitor || export ovs_cv_python="no"
# pyside is staticly disabled
export ovs_cv_pyuic4="no"
# flake8 is primarily a style guide tool, running it as part of the tests
# in Gentoo does not make much sense, only breaks them: bug 607280
export ovs_cv_flake8="no"
local linux_config
use modules && linux_config="--with-linux=${KV_OUT_DIR}"
econf ${linux_config} \
--with-rundir=/var/run/openvswitch \
--with-logdir=/var/log/openvswitch \
--with-pkidir=/etc/ssl/openvswitch \
--with-dbdir=/var/lib/openvswitch \
$(use_enable ssl) \
$(use_enable !debug ndebug)
}
src_compile() {
default
use modules && linux-mod_src_compile
}
src_install() {
default
local SCRIPT
if use monitor; then
for SCRIPT in ovs-{pcap,parse-backtrace,dpctl-top,l3ping,tcpdump,tcpundump,test,vlan-test} bugtool/ovs-bugtool; do
sed -e '1s|^.*$|#!/usr/bin/python|' -i utilities/"${SCRIPT}"
python_foreach_impl python_doscript utilities/"${SCRIPT}"
done
rm -r "${ED%}"/usr/share/openvswitch/python || die
fi
keepdir /var/{lib,log}/openvswitch
keepdir /etc/ssl/openvswitch
fperms 0750 /etc/ssl/openvswitch
rm -rf "${ED%}"/var/run || die
newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
newconfd "${FILESDIR}/ovs-vswitchd.confd-r2" ovs-vswitchd
newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
systemd_newunit "${FILESDIR}/ovsdb-server-r3.service" ovsdb-server.service
systemd_newunit "${FILESDIR}/ovs-vswitchd-r3.service" ovs-vswitchd.service
systemd_newunit rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service ovs-delete-transient-ports.service
systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf
insinto /etc/logrotate.d
newins rhel/etc_logrotate.d_openvswitch openvswitch
use modules && linux-mod_src_install
}
pkg_postinst() {
use modules && linux-mod_pkg_postinst
# only needed on non-systemd, but helps anyway
elog "Use the following command to create an initial database for ovsdb-server:"
elog " emerge --config =${CATEGORY}/${PF}"
elog "(will create a database in /var/lib/openvswitch/conf.db)"
elog "or to convert the database to the current schema after upgrading."
}
pkg_config() {
local db="${EROOT%}"/var/lib/openvswitch/conf.db
if [[ -e "${db}" ]] ; then
einfo "Database '${db}' already exists, doing schema migration..."
einfo "(if the migration fails, make sure that ovsdb-server is not running)"
ovsdb-tool convert "${db}" \
"${EROOT%}"/usr/share/openvswitch/vswitch.ovsschema || die "converting database failed"
else
einfo "Creating new database '${db}'..."
ovsdb-tool create "${db}" \
"${EROOT%}"/usr/share/openvswitch/vswitch.ovsschema || die "creating database failed"
fi
}

View File

@ -1,146 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6,7,8,9} )
inherit autotools eutils linux-info linux-mod python-r1 systemd
DESCRIPTION="Production quality, multilayer virtual switch"
HOMEPAGE="https://www.openvswitch.org"
SRC_URI="https://www.openvswitch.org/releases/${P}.tar.gz"
LICENSE="Apache-2.0 GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm64 x86"
IUSE="debug modules monitor +ssl"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="
ssl? ( dev-libs/openssl:0= )
${PYTHON_DEPS}
~dev-python/ovs-2.13.0[${PYTHON_USEDEP}]
dev-python/twisted[conch,${PYTHON_USEDEP}]
dev-python/zope-interface[${PYTHON_USEDEP}]
debug? ( dev-lang/perl )"
DEPEND="${RDEPEND}
sys-apps/util-linux[caps]
virtual/pkgconfig"
PATCHES="
"${FILESDIR}/xcp-interface-reconfigure-2.3.2.patch"
"
CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
BUILD_TARGETS="all"
pkg_setup() {
if use modules ; then
CONFIG_CHECK+=" ~!OPENVSWITCH"
kernel_is ge 3 10 0 || die "Linux >= 3.10.0 and <= 4.8 required for userspace modules"
# docs state 4.17.x code states 4.15.x
kernel_is le 5 5 999 || die "Linux >= 3.10.0 and <= 4.18 required for userspace modules"
linux-mod_pkg_setup
else
CONFIG_CHECK+=" ~OPENVSWITCH"
linux-info_pkg_setup
fi
}
src_prepare() {
# Never build kernelmodules, doing this manually
sed -i \
-e '/^SUBDIRS/d' \
datapath/Makefile.in || die "sed failed"
eautoreconf
default
}
src_configure() {
set_arch_to_kernel
# monitor is statically enabled for bug 596206
# use monitor || export ovs_cv_python="no"
# pyside is staticly disabled
export ovs_cv_pyuic4="no"
# flake8 is primarily a style guide tool, running it as part of the tests
# in Gentoo does not make much sense, only breaks them: bug 607280
export ovs_cv_flake8="no"
local linux_config
use modules && linux_config="--with-linux=${KV_OUT_DIR}"
econf ${linux_config} \
--with-rundir=/var/run/openvswitch \
--with-logdir=/var/log/openvswitch \
--with-pkidir=/etc/ssl/openvswitch \
--with-dbdir=/var/lib/openvswitch \
$(use_enable ssl) \
$(use_enable !debug ndebug)
}
src_compile() {
default
use modules && linux-mod_src_compile
}
src_install() {
default
local SCRIPT
if use monitor; then
for SCRIPT in ovs-{pcap,parse-backtrace,dpctl-top,l3ping,tcpdump,tcpundump,test,vlan-test} bugtool/ovs-bugtool; do
sed -e '1s|^.*$|#!/usr/bin/python|' -i utilities/"${SCRIPT}"
python_foreach_impl python_doscript utilities/"${SCRIPT}"
done
rm -r "${ED%}"/usr/share/openvswitch/python || die
fi
keepdir /var/{lib,log}/openvswitch
keepdir /etc/ssl/openvswitch
fperms 0750 /etc/ssl/openvswitch
rm -rf "${ED%}"/var/run || die
newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
newconfd "${FILESDIR}/ovs-vswitchd.confd-r2" ovs-vswitchd
newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
systemd_newunit "${FILESDIR}/ovsdb-server-r3.service" ovsdb-server.service
systemd_newunit "${FILESDIR}/ovs-vswitchd-r3.service" ovs-vswitchd.service
systemd_newunit rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service ovs-delete-transient-ports.service
systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf
insinto /etc/logrotate.d
newins rhel/etc_logrotate.d_openvswitch openvswitch
use modules && linux-mod_src_install
}
pkg_postinst() {
use modules && linux-mod_pkg_postinst
# only needed on non-systemd, but helps anyway
elog "Use the following command to create an initial database for ovsdb-server:"
elog " emerge --config =${CATEGORY}/${PF}"
elog "(will create a database in /var/lib/openvswitch/conf.db)"
elog "or to convert the database to the current schema after upgrading."
}
pkg_config() {
local db="${EROOT%}"/var/lib/openvswitch/conf.db
if [[ -e "${db}" ]] ; then
einfo "Database '${db}' already exists, doing schema migration..."
einfo "(if the migration fails, make sure that ovsdb-server is not running)"
ovsdb-tool convert "${db}" \
"${EROOT%}"/usr/share/openvswitch/vswitch.ovsschema || die "converting database failed"
else
einfo "Creating new database '${db}'..."
ovsdb-tool create "${db}" \
"${EROOT%}"/usr/share/openvswitch/vswitch.ovsschema || die "creating database failed"
fi
}

View File

@ -1,146 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6,7,8,9} )
inherit autotools eutils linux-info linux-mod python-r1 systemd
DESCRIPTION="Production quality, multilayer virtual switch"
HOMEPAGE="https://www.openvswitch.org"
SRC_URI="https://www.openvswitch.org/releases/${P}.tar.gz"
LICENSE="Apache-2.0 GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm64 x86"
IUSE="debug modules monitor +ssl"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="
ssl? ( dev-libs/openssl:0= )
${PYTHON_DEPS}
~dev-python/ovs-2.13.0[${PYTHON_USEDEP}]
dev-python/twisted[conch,${PYTHON_USEDEP}]
dev-python/zope-interface[${PYTHON_USEDEP}]
debug? ( dev-lang/perl )"
DEPEND="${RDEPEND}
sys-apps/util-linux[caps]
virtual/pkgconfig"
PATCHES="
"${FILESDIR}/xcp-interface-reconfigure-2.3.2.patch"
"
CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
BUILD_TARGETS="all"
pkg_setup() {
if use modules ; then
CONFIG_CHECK+=" ~!OPENVSWITCH"
kernel_is ge 3 10 0 || die "Linux >= 3.10.0 and <= 4.8 required for userspace modules"
# docs state 4.17.x code states 4.15.x
kernel_is le 5 5 999 || die "Linux >= 3.10.0 and <= 4.18 required for userspace modules"
linux-mod_pkg_setup
else
CONFIG_CHECK+=" ~OPENVSWITCH"
linux-info_pkg_setup
fi
}
src_prepare() {
# Never build kernelmodules, doing this manually
sed -i \
-e '/^SUBDIRS/d' \
datapath/Makefile.in || die "sed failed"
eautoreconf
default
}
src_configure() {
set_arch_to_kernel
# monitor is statically enabled for bug 596206
# use monitor || export ovs_cv_python="no"
# pyside is staticly disabled
export ovs_cv_pyuic4="no"
# flake8 is primarily a style guide tool, running it as part of the tests
# in Gentoo does not make much sense, only breaks them: bug 607280
export ovs_cv_flake8="no"
local linux_config
use modules && linux_config="--with-linux=${KV_OUT_DIR}"
econf ${linux_config} \
--with-rundir=/var/run/openvswitch \
--with-logdir=/var/log/openvswitch \
--with-pkidir=/etc/ssl/openvswitch \
--with-dbdir=/var/lib/openvswitch \
$(use_enable ssl) \
$(use_enable !debug ndebug)
}
src_compile() {
default
use modules && linux-mod_src_compile
}
src_install() {
default
local SCRIPT
if use monitor; then
for SCRIPT in ovs-{pcap,parse-backtrace,dpctl-top,l3ping,tcpdump,tcpundump,test,vlan-test} bugtool/ovs-bugtool; do
sed -e '1s|^.*$|#!/usr/bin/python|' -i utilities/"${SCRIPT}"
python_foreach_impl python_doscript utilities/"${SCRIPT}"
done
rm -r "${ED%}"/usr/share/openvswitch/python || die
fi
keepdir /var/{lib,log}/openvswitch
keepdir /etc/ssl/openvswitch
fperms 0750 /etc/ssl/openvswitch
rm -rf "${ED%}"/var/run || die
newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
newconfd "${FILESDIR}/ovs-vswitchd.confd-r2" ovs-vswitchd
newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
systemd_newunit "${FILESDIR}/ovsdb-server-r3.service" ovsdb-server.service
systemd_newunit "${FILESDIR}/ovs-vswitchd-r3.service" ovs-vswitchd.service
systemd_newunit rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service ovs-delete-transient-ports.service
systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf
insinto /etc/logrotate.d
newins rhel/etc_logrotate.d_openvswitch openvswitch
use modules && linux-mod_src_install
}
pkg_postinst() {
use modules && linux-mod_pkg_postinst
# only needed on non-systemd, but helps anyway
elog "Use the following command to create an initial database for ovsdb-server:"
elog " emerge --config =${CATEGORY}/${PF}"
elog "(will create a database in /var/lib/openvswitch/conf.db)"
elog "or to convert the database to the current schema after upgrading."
}
pkg_config() {
local db="${EROOT%}"/var/lib/openvswitch/conf.db
if [[ -e "${db}" ]] ; then
einfo "Database '${db}' already exists, doing schema migration..."
einfo "(if the migration fails, make sure that ovsdb-server is not running)"
ovsdb-tool convert "${db}" \
"${EROOT%}"/usr/share/openvswitch/vswitch.ovsschema || die "converting database failed"
else
einfo "Creating new database '${db}'..."
ovsdb-tool create "${db}" \
"${EROOT%}"/usr/share/openvswitch/vswitch.ovsschema || die "creating database failed"
fi
}