]> git.proxmox.com Git - ovs.git/blame - debian/rules
* Mipsel64 and mipsel: blacklist more tests, as they are failing on these
[ovs.git] / debian / rules
CommitLineData
0e43db78
TG
1#!/usr/bin/make -f
2
3UPSTREAM_GIT = https://github.com/openvswitch/ovs
4include /usr/share/openstack-pkg-tools/pkgos.make
5
2e149089
TG
6export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow
7
0e43db78 8%:
c5505928 9 dh $@ --with autoreconf,python3,sphinxdoc
0e43db78
TG
10
11# use --as-needed only if supported by dh-autoreconf (to simplify backporting)
12DH_AS_NEEDED=$(shell dpkg --compare-versions $$(dpkg --status dh-autoreconf | grep Version | cut -d' ' -f2) ge 6 && echo --as-needed)
13override_dh_autoreconf:
14 dh_autoreconf $(DH_AS_NEEDED)
15
1cb56bc5
TG
16ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
17PARALLEL = -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
18else
19PARALLEL =
20endif
21
0e43db78 22override_dh_auto_configure:
1cb56bc5
TG
23 test -d _debian || mkdir _debian
24 cd _debian && ( \
25 test -e Makefile || \
26 ../configure --prefix=/usr --localstatedir=/var --enable-ssl --enable-shared \
692a4dac 27 --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
1cb56bc5
TG
28 --sysconfdir=/etc $(DATAPATH_CONFIGURE_OPTS))
29ifneq (,$(filter i386 amd64 ppc64el arm64, $(DEB_HOST_ARCH)))
30 test -d _dpdk || mkdir _dpdk
31 cd _dpdk && ( \
32 test -e Makefile || \
33 ../configure --prefix=/usr --localstatedir=/var --enable-ssl --enable-shared \
692a4dac 34 --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
9835b2d8 35 --with-dpdk=shared --sysconfdir=/etc \
1cb56bc5
TG
36 $(DATAPATH_CONFIGURE_OPTS))
37endif
0e43db78 38
72dc24e4 39
ceb7a16e
TG
40# NOTE(zigo): by default, just run all tests
41# but 20: bfd - bfd decay FAILED (bfd.at:396)
42# that one doesn't feel like deterministic.
3e3c21d3 43# 1021: ofproto-dpif - select group with weights FAILED (ofproto-dpif.at:535)
b57274c0 44# 1057: ofproto-dpif - controller action without megaflows FAILED (ofproto-dpif.at:1893)
29047482 45TEST_LIST = 1-19 21-531 533-1020 1022-1056 1058-
ceb7a16e 46TEST_LIST_DPDK = $(TEST_LIST)
72dc24e4
TG
47
48# armhf:
189eca1d
TG
49# 24: bfd.at:662 bfd - check that BFD works together with RSTP
50# 25: bfd - check that BFD works together with RSTP FAILED (bfd.at:829)
51# 26: bfd - check that BFD works together with RSTP FAILED (bfd.at:829)
52# 918: ofproto - asynchronous message control (OpenFlow 1.3) ok
53# 1021: ofproto-dpif - select group with weights FAILED (ofproto-dpif.at:535)
54# 1057: ofproto-dpif - controller action without megaflows FAILED (ofproto-dpif.at:1893)
72dc24e4 55ifneq (,$(filter armhf, $(DEB_HOST_ARCH)))
29047482 56TEST_LIST = 1-19 21-23 28-531 533-917 919-1020 1022-1056 1058-
72dc24e4
TG
57TEST_LIST_DPDK = $(TEST_LIST)
58endif # armhf
59
73b3580b 60# mipsel:
af0251bd 61# 20: bfd - bfd decay FAILED (bfd.at:396)
b736de27 62# 21: bfd - bfd decay
0289875e 63# 917: ofproto - asynchronous message control (OpenFlow 1.2) (ofproto.at:3183)
af0251bd 64# 918: ofproto - asynchronous message control (OpenFlow 1.3) FAILED (ovs-macros.at:241)
fef7a861 65# 927: ofproto - asynchronous message control (OpenFlow 1.3) FAILED (ofproto.at:3405)
af0251bd 66# 919: ofproto - asynchronous message control (OpenFlow 1.4) FAILED (ovs-ofctl)
fef7a861 67# 1035: ofproto-dpif - select group with weights
73b3580b 68# 1057: ofproto-dpif - controller action without megaflows FAILED (ofproto-dpif.at:1893)
b736de27 69# 1069: ofproto-dpif - controller action without megaflows
af0251bd 70# 1102: ofproto-dpif - continuation - resubmit FAILED (ovs-macros.at:241)
fef7a861 71# 1071: ofproto-dpif - controller action without megaflows
b736de27 72# 1136: ofproto-dpif - sFlow packet sampling - LACP structures
73b3580b 73ifneq (,$(filter mipsel, $(DEB_HOST_ARCH)))
fef7a861 74TEST_LIST = 1-19 22-531 533-916 920-926 928-1020 1022-1034 1036-1056 1058-1068 1070 1072-1101 1103-1135 1137-
73b3580b
TG
75TEST_LIST_DPDK = $(TEST_LIST)
76endif # mipsel
77
66ee17d2 78# mips64el:
af0251bd 79# 20: bfd - bfd decay FAILED (bfd.at:396)
b736de27 80# 1033: ofproto-dpif - select group with weights
73b3580b 81# 1057: ofproto-dpif - controller action without megaflows FAILED (ofproto-dpif.at:1893)
af0251bd 82# 1021: ofproto-dpif - select group with weights FAILED (ofproto-dpif.at:535)
b736de27 83# 1069: ofproto-dpif - controller action without megaflows
66ee17d2 84ifneq (,$(filter mips64el, $(DEB_HOST_ARCH)))
fef7a861 85TEST_LIST = 1-19 22-531 533-1020 1022-1032 1034-1056 1058-1068 1070 1072-1120 1122-
73b3580b 86TEST_LIST_DPDK = $(TEST_LIST)
66ee17d2 87endif # mips64el
73b3580b
TG
88
89# armel:
90# 1021: ofproto-dpif - select group with weights FAILED (ofproto-dpif.at:535)
91# 1123: ofproto-dpif - sFlow packet sampling - LACP structures FAILED (ofproto-dpif.at:6643)
92ifneq (,$(filter armel, $(DEB_HOST_ARCH)))
29047482 93TEST_LIST = 1-19 21-531 533-1020 1022-1056 1058-1122 1124-
73b3580b
TG
94TEST_LIST_DPDK = $(TEST_LIST)
95endif #armel
96
97# arm64:
98# 159: ofp-actions - inconsistent MPLS actions FAILED (ofp-actions.at:819)
99# 1021: ofproto-dpif - select group with weights FAILED (ofproto-dpif.at:535)
100# 1057: ofproto-dpif - controller action without megaflows FAILED (ofproto-dpif.at:1893)
101ifneq (,$(filter arm64, $(DEB_HOST_ARCH)))
29047482 102TEST_LIST = 1-19 21-158 160-531 533-1020 1022-1056 1058-
73b3580b
TG
103TEST_LIST_DPDK = $(TEST_LIST)
104endif #arm64
105
f4ddf032
TG
106# alpha
107# 2724: ovn -- dns lookup : 1 HV, 2 LS, 2 LSPs/LS FAILED (ovn.at:7451)
108# 2728: ovn -- vlan traffic for external network with distributed router gateway port FAILED (ovn.at:8563)
109# 2737: ovn -- IPv6 periodic RA FAILED (ovn.at:9916)
110ifneq (,$(filter alpha, $(DEB_HOST_ARCH)))
29047482 111TEST_LIST = 1-19 21-531 533-2723 2725-2727 2729-2736 2738-
f4ddf032
TG
112TEST_LIST_DPDK = $(TEST_LIST)
113endif #alpha
114
3a4fc47a
TG
115# hppa
116# 20: bfd - bfd decay FAILED (bfd.at:314)
117# 847: ofproto - bundle del group (OpenFlow 1.5) FAILED (ofproto.at:813)
118# 850: ofproto - bundle remove group buckets FAILED (ofproto.at:1005)
119# 916: ofproto - asynchronous message control (OpenFlow 1.0) FAILED (ovs-macros.at:241)
120# 917: ofproto - asynchronous message control (OpenFlow 1.2) FAILED (ovs-macros.at:241)
121# 919: ofproto - asynchronous message control (OpenFlow 1.4) FAILED (ovs-ofctl)
122# 918: ofproto - asynchronous message control (OpenFlow 1.3) FAILED (ofproto.at:3371)
123# 942: ofproto - flow monitoring pause and resume FAILED (ofproto.at:4850)
124# 1033: ofproto-dpif - masked set-field into metadata FAILED (ofproto-dpif.at:860)
125# 1021: ofproto-dpif - select group with weights FAILED (ofproto-dpif.at:535)
126# 1057: ofproto-dpif - controller action without megaflows FAILED (ofproto-dpif.at:1893)
127# 1102: ofproto-dpif - continuation - resubmit FAILED (ovs-macros.at:241)
128# 1105: ofproto-dpif - continuation - mirroring FAILED (ovs-macros.at:241)
129# 1123: ofproto-dpif - sFlow packet sampling - LACP structures FAILED (ofproto-dpif.at:6643)
130# 1181: ofproto - bundle with variable bfd/cfm config FAILED (ofproto-dpif.at:8749)
131# 1209: ofproto-dpif - conntrack - zones FAILED (ofproto-dpif.at:9898)
132# 1735: ovsdb-server combines updates on backlogged connections FAILED (ovsdb-server.at:1205)
133# 2193: RSTP - dummy interface FAILED (rstp.at:210)
134ifneq (,$(filter hppa, $(DEB_HOST_ARCH)))
29047482 135TEST_LIST = 1-19 21-531 533-846 848-849 851-915 920-941 943-1020 1022-1056 1058-1101 1103-1104 1106-1122 1124-1180 1182-1208 1210-1734 1736-2192 2194-
3a4fc47a
TG
136TEST_LIST_DPDK = $(TEST_LIST)
137endif #hppa
138
e6d484bb
TG
139# sparc64
140# 20: bfd - bfd decay FAILED (bfd.at:396)
141# 26: bfd - check that BFD works together with RSTP FAILED (bfd.at:829)
142# 466: fuzz regression - ofp_print_fuzzer-5395207246839808 FAILED (fuzz-regression.at:12)
143# 900: ofproto - bundle packet-out makes bundle commit to fail(OpenFlow 1.4) FAILED (ofproto.at:2180)
144# 918: ofproto - asynchronous message control (OpenFlow 1.3) ok
145# 942: ofproto - flow monitoring pause and resume ok
146# 998: PMD - monitor threads FAILED (pmd.at:660)
147# 1057: ofproto-dpif - controller action without megaflows FAILED (ofproto-dpif.at:1893)
148# 2184: STP - dummy interface FAILED (stp.at:439)
149# 2185: STP - flush the fdb and mdb when topology changed FAILED (stp.at:529)
150# 2249: auto-attach - packets FAILED (auto-attach.at:5)
151ifneq (,$(filter sparc64, $(DEB_HOST_ARCH)))
29047482 152TEST_LIST = 1-19 21-25 27-465 467-531 533-899 901-917 919-941 943-997 999-1056 1058-2183 2186-2248 2250-
e6d484bb
TG
153TEST_LIST_DPDK = $(TEST_LIST)
154endif #sparc64
155
1c207ff9
TG
156# ia64
157# 20: bfd - bfd decay FAILED (bfd.at:396)
158# 1021: ofproto-dpif - select group with weights FAILED (ofproto-dpif.at:535)
159# 1057: ofproto-dpif - controller action without megaflows FAILED (ofproto-dpif.at:1893)
160ifneq (,$(filter ia64, $(DEB_HOST_ARCH)))
29047482 161TEST_LIST = 1-19 21-531 533-1020 1022-1056 1058-
1c207ff9
TG
162TEST_LIST_DPDK = $(TEST_LIST)
163endif #ia64
164
0e43db78
TG
165override_dh_auto_test:
166ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
72dc24e4
TG
167 if $(MAKE) -C _debian check TESTSUITEFLAGS='$(PARALLEL) $(TEST_LIST)' || \
168 $(MAKE) -C _debian check TESTSUITEFLAGS='--recheck' ; then :; \
f710c530 169 else \
1cb56bc5 170 cat _debian/tests/testsuite.log; \
f710c530
TG
171 exit 1; \
172 fi
1cb56bc5 173ifneq (,$(filter i386 amd64 ppc64el arm64, $(DEB_HOST_ARCH)))
72dc24e4
TG
174 if $(MAKE) -C _dpdk check TESTSUITEFLAGS='$(PARALLEL) $(TEST_LIST_DPDK)' || \
175 $(MAKE) -C _dpdk check TESTSUITEFLAGS='--recheck' ; then :; \
1cb56bc5
TG
176 else \
177 cat _dpdk/tests/testsuite.log; \
178 exit 1; \
179 fi
180endif # i386/amd64/ppc64el/arm64
181endif # nocheck
bddfdb4c
TG
182
183override_dh_auto_build:
bbc8ba29
TG
184 set -e ; set -x ; for MYMAINTSCRIPT in openvswitch-common.postinst openvswitch-switch-dpdk.postinst ; do \
185 sed s/%%MULTIARCH_TRIPLETT%%/$$(dpkg-architecture -qDEB_HOST_MULTIARCH)/ debian/$$MYMAINTSCRIPT.in >debian/$$MYMAINTSCRIPT ; \
186 done
187
72dc24e4
TG
188 $(MAKE) $(PARALLEL) -C _debian dist distdir=openvswitch
189 $(MAKE) $(PARALLEL) -C _debian
1cb56bc5 190ifneq (,$(filter i386 amd64 ppc64el arm64, $(DEB_HOST_ARCH)))
72dc24e4 191 $(MAKE) $(PARALLEL) -C _dpdk
1cb56bc5 192endif
bddfdb4c
TG
193
194override_dh_auto_clean:
1cb56bc5 195 find . -name "*.pyc" -delete
bddfdb4c 196 dh_auto_clean
e4bd154f 197 set -e ; make python/ovs/version.py && cd python && python3 setup.py clean ; rm -f ovs/version.py ; cd ..
1cb56bc5 198 rm -rf _debian _dpdk
bbc8ba29 199 rm -f debian/openvswitch-common.postinst debian/openvswitch-switch-dpdk.postinst
1cb56bc5 200
a2c40a61 201override_dh_auto_install-arch:
1cb56bc5 202 $(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/tmp install
bddfdb4c 203
a2c40a61
TG
204 # Move ovs-vswitchd away, so we can use update-alternatives
205 mkdir -p $(CURDIR)/debian/openvswitch-common/usr/lib/openvswitch-common
206 mv $(CURDIR)/debian/tmp/usr/sbin/ovs-vswitchd \
207 $(CURDIR)/debian/openvswitch-common/usr/lib/openvswitch-common/ovs-vswitchd
6c73af42
TG
208 mv $(CURDIR)/debian/tmp/usr/lib/*/libopenvswitch-2.15.so.0.0.0 \
209 $(CURDIR)/debian/openvswitch-common/usr/lib/openvswitch-common/libopenvswitch-2.15.so.0.0.0
1cb56bc5 210
a2c40a61
TG
211override_dh_auto_install-indep:
212 $(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/tmp install
1cb56bc5
TG
213 set -e && for pyvers in $(PYTHON3S); do \
214 cd python && python$$pyvers setup.py install --install-layout=deb \
215 --root $(CURDIR)/debian/python3-openvswitch; cd ..; \
216 done
217 rm -rf $(pwd)/debian/python*/usr/lib/python*/dist-packages/*.pth
218
a2c40a61
TG
219override_dh_install:
220 install -D -m 0644 utilities/ovs-vsctl-bashcomp.bash $(CURDIR)/debian/openvswitch-switch/usr/share/bash-completion/completions/ovs-vsctl
6c73af42 221 dh_install --exclude=usr/sbin/ovs-vswitchd --exclude=usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/libopenvswitch-2.15.so.0.0.0
a2c40a61 222
85cfa617 223 rm -f $(CURDIR)/debian/tmp/usr/lib/*/*.la
0f968165
TG
224 dh_installman --language=C
225 rm -rf $(CURDIR)/debian/tmp/usr/share/man
1cb56bc5 226
07001f9a
TG
227 # remove the files managed via update-alternatives
228 rm -f $(CURDIR)/debian/tmp/usr/sbin/ovs-vswitchd
6c73af42 229 rm -f $(CURDIR)/debian/tmp/usr/lib/*/libopenvswitch-2.15.so.0.0.0
07001f9a 230
0f968165 231 dh_missing --fail-missing
0e43db78 232 # openvswitch-switch
10c7eaaa 233 mkdir -p debian/openvswitch-switch/usr/share/openvswitch/switch
0e43db78
TG
234 cp debian/openvswitch-switch.template debian/openvswitch-switch/usr/share/openvswitch/switch/default.template
235
1cb56bc5 236ifneq (,$(filter i386 amd64 ppc64el arm64, $(DEB_HOST_ARCH)))
07001f9a 237 install -v -D _dpdk/vswitchd/.libs/ovs-vswitchd \
1cb56bc5 238 $(CURDIR)/debian/openvswitch-switch-dpdk/usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk
6c73af42
TG
239 install -v -D _dpdk/lib/.libs/libopenvswitch-2.15.so.0.0.0 \
240 $(CURDIR)/debian/openvswitch-switch-dpdk/usr/lib/openvswitch-switch-dpdk/libopenvswitch-2.15.so.0.0.0
1cb56bc5
TG
241endif
242
0e43db78 243override_dh_installinit:
1cb56bc5
TG
244 dh_installinit --restart-after-upgrade
245 dh_installinit -popenvswitch-switch --name=ovsdb-server --no-start
246 dh_installinit -popenvswitch-switch --name=ovs-vswitchd --no-start
0e43db78 247
c5505928 248override_dh_installsystemd:
39e32f28
TG
249 dh_installsystemd -popenvswitch-switch --name=ovsdb-server
250 dh_installsystemd -popenvswitch-switch --name=ovs-vswitchd
c5505928 251 dh_installsystemd --restart-after-upgrade -Xovs-vswitchd.service -Xovsdb-server.service
1cb56bc5 252
0e43db78
TG
253override_dh_strip:
254 dh_strip --dbg-package=openvswitch-dbg
255
07001f9a
TG
256override_dh_shlibdeps:
257 dh_shlibdeps -l$(CURDIR)/_debian/lib/.libs
258
0e43db78 259override_dh_installman:
0f968165 260 echo "Do nothing..."
103b3e1a 261
516f5a88
TG
262override_dh_python3:
263 dh_python3 --shebang=/usr/bin/python3
a6ad9a89
TG
264 dh_python3 -popenvswitch-ipsec /usr --shebang=/usr/bin/python3
265 dh_python3 -popenvswitch-vtep /usr --shebang=/usr/bin/python3
266 dh_python3 -popenvswitch-switch /usr --shebang=/usr/bin/python3
516f5a88 267 dh_python3 usr/share/openvswitch/scripts --shebang=/usr/bin/python3