testing/ovn: upgrade to 24.03.7

This commit is contained in:
Lindsay Zhou 2025-10-26 20:28:07 +08:00 committed by Leonardo Arena
parent 4b13eb55ef
commit b96dbb6c8b
7 changed files with 18 additions and 201 deletions

View File

@ -1,13 +1,13 @@
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=ovn
pkgver=24.03.1
_ovs_pkgver=3.3.0
pkgver=24.03.7
pkgrel=0
pkgdesc="Open Virtual Network"
url="https://www.ovn.org"
arch="all"
license="Apache-2.0"
depends="openvswitch"
makedepends="automake
autoconf
libtool
@ -18,50 +18,34 @@ makedepends="automake
unbound-dev
"
subpackages="$pkgname-dev $pkgname-doc $pkgname-dbg $pkgname-openrc"
giturl="https://github.com/openvswitch/ovs.git"
_gitrev="498cedc"
_gitrev="f1bc9af9627e97b8361dd32834068a8b7f2e0d17"
options="!check" # most of the tests are failing
install="$pkgname.post-install"
source="$pkgname-$pkgver.tar.gz::https://github.com/ovn-org/ovn/archive/refs/tags/v$pkgver.tar.gz
openvswitch-$_ovs_pkgver.tar.gz::https://github.com/openvswitch/ovs/archive/refs/tags/v$_ovs_pkgver.tar.gz
openvswitch-$_gitrev.tar.gz::https://github.com/openvswitch/ovs/archive/$_gitrev/ovs-$_gitrev.tar.gz
ovn-ctl.confd
ovn-northd.initd
ovn-ovsdb-server-nb.initd
ovn-ovsdb-server-sb.initd
ovn-controller.initd
ovs-modules.initd
ovs-vswitchd.confd
ovs-vswitchd.initd
ovsdb-server.confd
ovsdb-server.initd
ovs-ifupdown-alpine.patch
"
provides="openvswitch=$_ovs_pkgver"
# https://dev.alpinelinux.org/archive/ovn/openvswitch-$_ovs_pkgver-$_gitrev.tar.gz
snapshot() {
mkdir -p "$srcdir"
cd "$srcdir"
if ! [ -d ovs ]; then git clone $giturl; fi
cd ovs
git archive --prefix=openvswitch-$_ovs_pkgver/ -o "$srcdir"/openvswitch-$_ovs_pkgver-$_gitrev.tar.gz $_gitrev
scp "$srcdir"/openvswitch-$_ovs_pkgver-$_gitrev.tar.gz dev.alpinelinux.org:/archive/$pkgname/
}
prepare() {
# default_prepare
./boot.sh
cd "$srcdir"/ovs-$_ovs_pkgver
patch -p1 < ../ovs-ifupdown-alpine.patch
./boot.sh
default_prepare
cd "$srcdir"/ovs-$_gitrev
autoreconf -fiv
cd "$builddir"
autoreconf -fiv
}
build() {
export CFLAGS="$CFLAGS -fPIC"
# First OpenVSwitch must be built
# Taking the same configure options from openvswitch APKBUILD
cd "$srcdir"/ovs-$_ovs_pkgver
# Taking the same configure options from openvswitch APKBUILD,
# expect building static libraries here
cd "$srcdir"/ovs-$_gitrev
./configure \
--prefix=/usr \
--sysconfdir=/etc \
@ -82,8 +66,8 @@ build() {
--infodir=/usr/share/info \
--enable-shared \
--enable-ndebug \
--with-ovs-source=../ovs-$_ovs_pkgver \
--with-ovs-build=../ovs-$_ovs_pkgver
--with-ovs-source=../ovs-$_gitrev \
--with-ovs-build=../ovs-$_gitrev
make
}
@ -106,47 +90,14 @@ package() {
done
install -Dm755 ../ovn-controller.initd "$pkgdir/etc/init.d/ovn-controller"
# Install the required version of OpenVSwitch
# Taken from openvswitch package
cd "$srcdir/ovs-$_ovs_pkgver"
make DESTDIR="$pkgdir" install
# we don't install python and bash extensions
rm -rf "$pkgdir"/usr/share/openvswitch/python
rm -rf "$pkgdir"/etc/bash_completion.d
install -Dm755 "$srcdir"/ovsdb-server.initd \
"$pkgdir"/etc/init.d/ovsdb-server
install -Dm755 "$srcdir"/ovs-vswitchd.initd \
"$pkgdir"/etc/init.d/ovs-vswitchd
install -Dm755 "$srcdir"/ovs-modules.initd \
"$pkgdir"/etc/init.d/ovs-modules
install -Dm644 "$srcdir"/ovsdb-server.confd \
"$pkgdir"/etc/conf.d/ovsdb-server
install -Dm644 "$srcdir"/ovs-vswitchd.confd \
"$pkgdir"/etc/conf.d/ovs-vswitchd
install -d "$pkgdir"/etc/network/if-pre-up.d \
"$pkgdir"/etc/network/if-post-down.d
install -m755 debian/ifupdown.sh \
"$pkgdir"/etc/network/if-pre-up.d/openvswitch
ln -s ../if-pre-up.d/openvswitch \
"$pkgdir"/etc/network/if-post-down.d/openvswitch
}
sha512sums="
297d41adfcbcf325c69ef7e44ea6951c0c2aacca6457140e656d7fc5e33f6cd297bee05cb7ffdbe64faebe92e1f9e3a5e8dafdd62f0c4e966dce3fbae8b8bc8e ovn-24.03.1.tar.gz
05d980e51a11ae315d81de91404351774d05717946e3200a2564c0baf7959c204e94e3ea7efda75ff1a202b05348e5f39614c49eb65f60208beabf1103a8ae4c openvswitch-3.3.0.tar.gz
c53821a804673ef18954efdb94636bd5bca369bac929ff76b5cdd708b589aeca6c2c5c25d1c5fa6f547d48e2bd609824fe9dcd0a40ef95a035b9161efd0c7dd4 ovn-24.03.7.tar.gz
f6f3d13ebab2b6de8873a19a0eed984f24005b053766dc3f491b26e79b27ef8a2d6c6ab93869b5350f0a0530536297df6325c380bd2b9399b96911593f54ffa3 openvswitch-f1bc9af9627e97b8361dd32834068a8b7f2e0d17.tar.gz
b98fd4acefcc03714cebe18dd78839ec1e6777ed6b1b035873b7a05c24ce5c91b62d890543e58529ed47413c4ab926468a9915bf15675475712ac039f9d1cda5 ovn-ctl.confd
436f3bc162675b5baa9e301d58fe30d7d0dfb7a196f73012cd8dd3ee7b3e9016c8db81092629da08ee08fc572a697c4c1463c819254c26eaf1f69150f522c503 ovn-northd.initd
e2dc52c9328514d5ebe1b6b9e63a6b6055ff9fe1d9b4eb1cec429631f65d24b2144d5f328c7943b501eef40f1aafdf5bd247d5e7d58b028d25a8a361b9ebdcb0 ovn-ovsdb-server-nb.initd
393e8ae14280e8495b92063556c40273a8dc04572e2a78f03cbf61fd37fe509d9deacf30f50831f23664c1c3dd566122c5e683e928aa5e5c8a035f3183d84a78 ovn-ovsdb-server-sb.initd
9d54d84d1e70b0cc13c2c19b327f1441208ebcf3c1248c6625afa32cd47f8207ea80006fa82c9de6aa4d3fe03b2ab3bd3c887fb85dd6cb9bb7e5c3925afa38af ovn-controller.initd
1e08aa5ac6ce55b97256478b9243c8a4c92a42a97fc70ea0439c832b12a775af28a127224ae6c4ce01642dde65f76c610a44105912338bf443d8ea390c2d9ccf ovs-modules.initd
346aea099f51707d2b4fc9fdc8c1502582723fb4e00c4d5d1624b0378c94dfb76674fa95e2af894f36169df52109dbe441ee6a45aa744584d9e4c74d15a46c1d ovs-vswitchd.confd
4bff37f8bed32d5327b4b0433984ab8ffdce77f618034aa6ffd1ad4a7caa00703ea2bef312876dce5aafa4c17fe06dddd75e5c05c10e13bf8f5c3805a0654a96 ovs-vswitchd.initd
b1588d076bbfc7ef2dd46fce8e46186f40cbbc4667697f7ac13ddc68e34568fdab315fde47838de7f6d32916853190336cfe3735f672ad7cb624ae14dbff55a5 ovsdb-server.confd
097d4721a78fff749c534910d98543778474406bd61b469b88a0d981a2a380556444437ec44278cead6d8688c45a38b2acbf1551acb9ab38d048f413728e3b88 ovsdb-server.initd
08c08612be2bbcc3c006a6175f2357542e436fa5bec6b2f3ff5200e8084874a72b8116d3408cffec312e33c104b177db381727666f8dd4712617616eee8c4d63 ovs-ifupdown-alpine.patch
"

View File

@ -1,17 +0,0 @@
diff --git a/debian/ifupdown.sh b/debian/ifupdown.sh
index 952d1b0..7aed7e0 100755
--- a/debian/ifupdown.sh
+++ b/debian/ifupdown.sh
@@ -35,8 +35,10 @@ if [ -f $SERVICE_UNIT ] && [ -x /bin/systemctl ]; then
systemctl start openvswitch-switch.service
fi
else
- if service openvswitch-switch status > /dev/null 2>&1; then
- service openvswitch-switch start
+ if ! /etc/init.d/ovs-vswitchd status &>/dev/null; then
+ /etc/init.d/ovs-modules start
+ /etc/init.d/ovsdb-server start
+ /etc/init.d/ovs-vswitchd start
fi
fi

View File

@ -1,20 +0,0 @@
#!/sbin/openrc-run
MODULES="openvswitch"
depend() {
before ovsdb-server
}
start() {
ebegin "Loading Openvswitch kernel modules"
for mod in $MODULES; do
modprobe -q $mod
done
eend $?
}
stop() {
# modules cannot be removed without a reboot
return 0
}

View File

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

View File

@ -1,25 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/files/ovs-vswitchd-r1,v 1.1 2013/04/08 19:37:58 dev-zero Exp $
description="Open vSwitch virtual switch"
pidfile="/var/run/openvswitch/ovs-vswitchd.pid"
command="/usr/sbin/ovs-vswitchd"
command_args="
--pidfile=$pidfile
--detach
--monitor
${OPTIONS} ${DATABASE}"
depend() {
need localmount ovsdb-server
after bootmisc hwdrivers modules
before net
use logger
}
start_pre() {
checkpath --directory "${pidfile%/*}" --mode 0750
}

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,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"
# Alternative path for the database (default is /etc/openvswitch/conf.db)
# DATABASE="/etc/openvswitch/conf.db"
# Additional options
# OPTIONS=""

View File

@ -1,50 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/files/ovsdb-server-r1,v 1.1 2013/04/08 19:37:58 dev-zero Exp $
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}"}
db=${DATABASE:-/etc/openvswitch/conf.db}
dbschema=/usr/share/openvswitch/vswitch.ovsschema
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 dev
after bootmisc hwdrivers modules
before net
use logger
}
# ovsdb-server is a hard dependency for ovs-vswitchd (to keep them in sync) - to stop the db only:
# /etc/init.d/ovsdb-server --nodeps stop |or| rc-service ovsdb-server -- --nodeps stop
start_pre() {
checkpath -d "/var/run/openvswitch" -m 0750
if ! [ -e "$db" ]; then
ovsdb-tool create $db $dbschema
elif [ "$(ovsdb-tool needs-conversion $db $dbschema)" = "yes" ]; then
ovsdb-tool convert $db $dbschema
fi
}