diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2023-10-24 15:03:59 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2023-10-24 15:06:03 +0000 |
commit | 38edc5a25962725fb10dab4e318b71053c49b782 (patch) | |
tree | 0a2d613830bf9d7fb0123ed54d95fa6265007521 | |
parent | 26367a34abb18184bf9ad5651f754b6413544f86 (diff) | |
download | aports-38edc5a25962725fb10dab4e318b71053c49b782.zip |
testing/ovn: upgrade to 23.09
- Include required built version of OpenVSwitch and avoid conflict with the package
- Add init scripts
-rw-r--r-- | testing/ovn/APKBUILD | 53 | ||||
-rw-r--r-- | testing/ovn/ovn-ctl.confd | 3 | ||||
-rw-r--r-- | testing/ovn/ovn-northd.initd | 20 | ||||
-rw-r--r-- | testing/ovn/ovn-ovsdb-server-nb.initd | 20 | ||||
-rw-r--r-- | testing/ovn/ovn-ovsdb-server-sb.initd | 20 |
5 files changed, 103 insertions, 13 deletions
diff --git a/testing/ovn/APKBUILD b/testing/ovn/APKBUILD index f5130b25338..a976416d34e 100644 --- a/testing/ovn/APKBUILD +++ b/testing/ovn/APKBUILD @@ -1,8 +1,8 @@ # Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> pkgname=ovn -pkgver=22.03.0 -ovs_pkgver=2.17.1 -pkgrel=2 +pkgver=23.09.0 +ovs_pkgver=3.2.1 +pkgrel=0 pkgdesc="Open Virtual Network" url="https://www.ovn.org" arch="all" @@ -16,12 +16,19 @@ makedepends="automake python3 unbound-dev " -subpackages="$pkgname-dev $pkgname-doc" +subpackages="$pkgname-dev $pkgname-doc $pkgname-dbg $pkgname-openrc" giturl="https://github.com/openvswitch/ovs.git" _gitrev="498cedc" -options="!check" # a couple of tests fail, disabling for now +options="!check" # most of the tests are failing source="$pkgname-$pkgver.tar.gz::https://github.com/ovn-org/ovn/archive/refs/tags/v$pkgver.tar.gz - https://dev.alpinelinux.org/archive/ovn/openvswitch-$ovs_pkgver-$_gitrev.tar.gz" + openvswitch-$ovs_pkgver.tar.gz::https://github.com/openvswitch/ovs/archive/refs/tags/v$ovs_pkgver.tar.gz + ovn-ctl.confd + ovn-northd.initd + ovn-ovsdb-server-nb.initd + ovn-ovsdb-server-sb.initd + " +provides="openvswitch=$ovs_pkgver" +# https://dev.alpinelinux.org/archive/ovn/openvswitch-$ovs_pkgver-$_gitrev.tar.gz snapshot() { mkdir -p "$srcdir" @@ -35,14 +42,15 @@ snapshot() { prepare() { default_prepare ./boot.sh + cd "$srcdir"/ovs-$ovs_pkgver + ./boot.sh } build() { export CFLAGS="$CFLAGS -fPIC" # First OpenVSwitch must be built # Taking the same configure options from openvswitch APKBUILD - cd "$srcdir"/openvswitch-$ovs_pkgver - ./boot.sh + cd "$srcdir"/ovs-$ovs_pkgver ./configure \ --prefix=/usr \ --sysconfdir=/etc \ @@ -53,7 +61,7 @@ build() { --enable-libcap-ng make - # now building OVN + msg "Built OVS. Now building OVN" cd "$builddir" ./configure \ --prefix=/usr \ @@ -62,8 +70,8 @@ build() { --mandir=/usr/share/man \ --infodir=/usr/share/info \ --enable-shared \ - --with-ovs-source=../openvswitch-$ovs_pkgver \ - --with-ovs-build=../openvswitch-$ovs_pkgver + --with-ovs-source=../ovs-$ovs_pkgver \ + --with-ovs-build=../ovs-$ovs_pkgver make } @@ -75,9 +83,28 @@ package() { # parallel install issue make -j1 DESTDIR="$pkgdir" install + # install the required version of OpenVSwitch + cd "$srcdir/ovs-$ovs_pkgver" + make DESTDIR="$pkgdir" install + + # remove unneeded ovs files + rm -rf "$pkgdir"/etc + rm -rf "$pkgdir"/var + + for f in ovn-northd \ + ovn-ovsdb-server-nb \ + ovn-ovsdb-server-sb \ + ; do + install -Dm755 ../"$f".initd "$pkgdir/etc/init.d/$f" + install -Dm644 ../ovn-ctl.confd "$pkgdir/etc/conf.d/$f" + done } sha512sums=" -b47ad17ada4bbaadd4a7baf194512f327c9838aa779a811c4ba1859e6ebcf380e56cb3bf4786d32ef1cdef4fe285351996dccf740b74982f195c6b19feb75ccb ovn-22.03.0.tar.gz -5d1fb0fb5eb070c8712759131f4c86915ab7b9075a1f5d136bea7b66efdcf55fd9aef79768f6431582aba9baddec4514200e2998abc3a37e01e5f0e186170b86 openvswitch-2.17.1-498cedc.tar.gz +90fb0496e7a219fa8a4cf22daa40ce54a7e8174228d1baa6946c399a81fed7ba380a8e0a93ad8da6a83aaf47c22312637541e449e076f08884fc9dd28179e6fd ovn-23.09.0.tar.gz +709e7a39c97d44cb4fc2741ec386d2bb446adf4c374d5d15480dc62e49d5e327354eb81ca09b55b0c0954dd42b28d3bd278840247d42b2f8802e667f90bd8c97 openvswitch-3.2.1.tar.gz +b98fd4acefcc03714cebe18dd78839ec1e6777ed6b1b035873b7a05c24ce5c91b62d890543e58529ed47413c4ab926468a9915bf15675475712ac039f9d1cda5 ovn-ctl.confd +9208004e2615f39e4432741781a38ba8d0f312a3a728e51d32f45bccecd3012d869cc7d3f1a77a850ff6803f93e2e0fac49a77f9136ec8faa553df50d4545936 ovn-northd.initd +c57f8728c6cd46dee838ff8a5093c736632782e469fdc87c840c70dacc69bc46e83b96e03bcac308b0d109bcbeea118e28a7c4487e60ff0296ed5b5ad68a6dfb ovn-ovsdb-server-nb.initd +11a670dfec6d20290cff20faea95aadc520984a45047b5baf798c89bdea46fab699b2a499c1f2e1c31e14a0c670dd554c061b35185977e7e9ebce42eb388786e ovn-ovsdb-server-sb.initd " diff --git a/testing/ovn/ovn-ctl.confd b/testing/ovn/ovn-ctl.confd new file mode 100644 index 00000000000..c969a18ef0d --- /dev/null +++ b/testing/ovn/ovn-ctl.confd @@ -0,0 +1,3 @@ +# OVN_CTL_OPTS: Extra options to pass to ovs-ctl. This is, for example, +# a suitable place to specify --ovn-northd-wrapper=valgrind. +# OVN_CTL_OPTS= diff --git a/testing/ovn/ovn-northd.initd b/testing/ovn/ovn-northd.initd new file mode 100644 index 00000000000..b433eeb9b0b --- /dev/null +++ b/testing/ovn/ovn-northd.initd @@ -0,0 +1,20 @@ +#!/sbin/openrc-run + +command="/usr/share/ovn/scripts/ovn-ctl" +command_args="start_northd --ovn-manage-ovsdb=no --no-monitor $OVN_CTL_OPTS" +command_background="yes" +pidfile="/run/ovn/$RC_SVCNAME.pid" +description="Open Virtual Network central control daemon" + +depend() { + need net + after firewall +} + +start_pre() { + checkpath --directory "${pidfile%/*}" +} + +stop() { + $command stop_northd --no-monitor +} diff --git a/testing/ovn/ovn-ovsdb-server-nb.initd b/testing/ovn/ovn-ovsdb-server-nb.initd new file mode 100644 index 00000000000..80d2c06a754 --- /dev/null +++ b/testing/ovn/ovn-ovsdb-server-nb.initd @@ -0,0 +1,20 @@ +#!/sbin/openrc-run + +command="/usr/share/ovn/scripts/ovn-ctl" +command_args="run_nb_ovsdb $OVN_CTL_OPTS" +command_background="yes" +pidfile="/run/ovn/$RC_SVCNAME.pid" +description="Open vSwitch database server for OVN Northbound database" + +depend() { + need net + after firewall +} + +start_pre() { + checkpath --directory "${pidfile%/*}" +} + +stop() { + $command stop_nb_ovsdb +} diff --git a/testing/ovn/ovn-ovsdb-server-sb.initd b/testing/ovn/ovn-ovsdb-server-sb.initd new file mode 100644 index 00000000000..13ee14fda2b --- /dev/null +++ b/testing/ovn/ovn-ovsdb-server-sb.initd @@ -0,0 +1,20 @@ +#!/sbin/openrc-run + +command="/usr/share/ovn/scripts/ovn-ctl" +command_args="run_sb_ovsdb $OVN_CTL_OPTS" +command_background="yes" +pidfile="/run/ovn/$RC_SVCNAME.pid" +description="Open vSwitch database server for OVN Southbound database" + +depend() { + need net + after firewall +} + +start_pre() { + checkpath --directory "${pidfile%/*}" +} + +stop() { + $command stop_sb_ovsdb +} |