blob: d141dc2cc5f0eed684b75e7c56136981f2347c73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=ovn
pkgver=23.09.0
ovs_pkgver=3.2.1
pkgrel=3
pkgdesc="Open Virtual Network"
url="https://www.ovn.org"
arch="all"
license="Apache-2.0"
makedepends="automake
autoconf
libtool
libcap-ng-dev
linux-headers
openssl-dev>3
python3
unbound-dev
"
subpackages="$pkgname-dev $pkgname-doc $pkgname-dbg $pkgname-openrc"
giturl="https://github.com/openvswitch/ovs.git"
_gitrev="498cedc"
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
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
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
}
build() {
export CFLAGS="$CFLAGS -fPIC"
# First OpenVSwitch must be built
# Taking the same configure options from openvswitch APKBUILD
cd "$srcdir"/ovs-$ovs_pkgver
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--enable-ndebug \
--enable-libcap-ng
make
msg "Built OVS. Now building OVN"
cd "$builddir"
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--enable-shared \
--enable-ndebug \
--with-ovs-source=../ovs-$ovs_pkgver \
--with-ovs-build=../ovs-$ovs_pkgver
make
}
check() {
make check
}
package() {
# parallel install issue
make -j1 DESTDIR="$pkgdir" install
install -Dm644 ../ovn-ctl.confd "$pkgdir"/etc/conf.d/ovn-ctl
local f
for f in ovn-northd \
ovn-ovsdb-server-nb \
ovn-ovsdb-server-sb \
; do
install -Dm755 ../"$f".initd "$pkgdir/etc/init.d/$f"
ln -s ovn-ctl "$pkgdir/etc/conf.d/$f"
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="
90fb0496e7a219fa8a4cf22daa40ce54a7e8174228d1baa6946c399a81fed7ba380a8e0a93ad8da6a83aaf47c22312637541e449e076f08884fc9dd28179e6fd ovn-23.09.0.tar.gz
709e7a39c97d44cb4fc2741ec386d2bb446adf4c374d5d15480dc62e49d5e327354eb81ca09b55b0c0954dd42b28d3bd278840247d42b2f8802e667f90bd8c97 openvswitch-3.2.1.tar.gz
b98fd4acefcc03714cebe18dd78839ec1e6777ed6b1b035873b7a05c24ce5c91b62d890543e58529ed47413c4ab926468a9915bf15675475712ac039f9d1cda5 ovn-ctl.confd
436f3bc162675b5baa9e301d58fe30d7d0dfb7a196f73012cd8dd3ee7b3e9016c8db81092629da08ee08fc572a697c4c1463c819254c26eaf1f69150f522c503 ovn-northd.initd
eb9ad8be32752acb2cc43590629568855957b2da9a3df3374498e983f7cd87c7562cf39c28ef33e4162ee11ebfee201fdfbdb3efc8cf98676cc06eb84d61d6ea ovn-ovsdb-server-nb.initd
752b57d73f8fe9583b09c814758a0d779c3e87680b47efa55e80ed4b2e80c949b1094ddc36f2533e1b8a3eea3cb7481c09dcfae15b0a6381463b27b898823ee5 ovn-ovsdb-server-sb.initd
26ad49aa5deeb216bb24b8a76ed1f2bbaee582a53f034546110d7380f8c5d225663994ce44b108bac8cd2ea4c5348b3c8edef1cd7c9668c14f39151d35a0ed35 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
"
|