]>
Commit | Line | Data |
---|---|---|
0e43db78 TG |
1 | #!/usr/bin/make -f |
2 | ||
3 | UPSTREAM_GIT = https://github.com/openvswitch/ovs | |
4 | include /usr/share/openstack-pkg-tools/pkgos.make | |
5 | ||
2e149089 TG |
6 | export 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) | |
12 | DH_AS_NEEDED=$(shell dpkg --compare-versions $$(dpkg --status dh-autoreconf | grep Version | cut -d' ' -f2) ge 6 && echo --as-needed) | |
13 | override_dh_autoreconf: | |
14 | dh_autoreconf $(DH_AS_NEEDED) | |
15 | ||
1cb56bc5 TG |
16 | ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) |
17 | PARALLEL = -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) | |
18 | else | |
19 | PARALLEL = | |
20 | endif | |
21 | ||
0e43db78 | 22 | override_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)) |
29 | ifneq (,$(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)) |
37 | endif | |
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 | 45 | TEST_LIST = 1-19 21-531 533-1020 1022-1056 1058- |
ceb7a16e | 46 | TEST_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 | 55 | ifneq (,$(filter armhf, $(DEB_HOST_ARCH))) |
29047482 | 56 | TEST_LIST = 1-19 21-23 28-531 533-917 919-1020 1022-1056 1058- |
72dc24e4 TG |
57 | TEST_LIST_DPDK = $(TEST_LIST) |
58 | endif # 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 | 73 | ifneq (,$(filter mipsel, $(DEB_HOST_ARCH))) |
fef7a861 | 74 | TEST_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 |
75 | TEST_LIST_DPDK = $(TEST_LIST) |
76 | endif # 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 | 84 | ifneq (,$(filter mips64el, $(DEB_HOST_ARCH))) |
fef7a861 | 85 | TEST_LIST = 1-19 22-531 533-1020 1022-1032 1034-1056 1058-1068 1070 1072-1120 1122- |
73b3580b | 86 | TEST_LIST_DPDK = $(TEST_LIST) |
66ee17d2 | 87 | endif # 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) | |
92 | ifneq (,$(filter armel, $(DEB_HOST_ARCH))) | |
29047482 | 93 | TEST_LIST = 1-19 21-531 533-1020 1022-1056 1058-1122 1124- |
73b3580b TG |
94 | TEST_LIST_DPDK = $(TEST_LIST) |
95 | endif #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) | |
101 | ifneq (,$(filter arm64, $(DEB_HOST_ARCH))) | |
29047482 | 102 | TEST_LIST = 1-19 21-158 160-531 533-1020 1022-1056 1058- |
73b3580b TG |
103 | TEST_LIST_DPDK = $(TEST_LIST) |
104 | endif #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) | |
110 | ifneq (,$(filter alpha, $(DEB_HOST_ARCH))) | |
29047482 | 111 | TEST_LIST = 1-19 21-531 533-2723 2725-2727 2729-2736 2738- |
f4ddf032 TG |
112 | TEST_LIST_DPDK = $(TEST_LIST) |
113 | endif #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) | |
134 | ifneq (,$(filter hppa, $(DEB_HOST_ARCH))) | |
29047482 | 135 | TEST_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 |
136 | TEST_LIST_DPDK = $(TEST_LIST) |
137 | endif #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) | |
151 | ifneq (,$(filter sparc64, $(DEB_HOST_ARCH))) | |
29047482 | 152 | TEST_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 |
153 | TEST_LIST_DPDK = $(TEST_LIST) |
154 | endif #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) | |
160 | ifneq (,$(filter ia64, $(DEB_HOST_ARCH))) | |
29047482 | 161 | TEST_LIST = 1-19 21-531 533-1020 1022-1056 1058- |
1c207ff9 TG |
162 | TEST_LIST_DPDK = $(TEST_LIST) |
163 | endif #ia64 | |
164 | ||
0e43db78 TG |
165 | override_dh_auto_test: |
166 | ifeq (,$(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 | 173 | ifneq (,$(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 | |
180 | endif # i386/amd64/ppc64el/arm64 | |
181 | endif # nocheck | |
bddfdb4c TG |
182 | |
183 | override_dh_auto_build: | |
e4d0330f | 184 | touch tests/fuzz-regression/ofp_print_fuzzer-6540965472632832 |
bbc8ba29 TG |
185 | set -e ; set -x ; for MYMAINTSCRIPT in openvswitch-common.postinst openvswitch-switch-dpdk.postinst ; do \ |
186 | sed s/%%MULTIARCH_TRIPLETT%%/$$(dpkg-architecture -qDEB_HOST_MULTIARCH)/ debian/$$MYMAINTSCRIPT.in >debian/$$MYMAINTSCRIPT ; \ | |
187 | done | |
188 | ||
72dc24e4 TG |
189 | $(MAKE) $(PARALLEL) -C _debian dist distdir=openvswitch |
190 | $(MAKE) $(PARALLEL) -C _debian | |
1cb56bc5 | 191 | ifneq (,$(filter i386 amd64 ppc64el arm64, $(DEB_HOST_ARCH))) |
72dc24e4 | 192 | $(MAKE) $(PARALLEL) -C _dpdk |
1cb56bc5 | 193 | endif |
bddfdb4c TG |
194 | |
195 | override_dh_auto_clean: | |
1cb56bc5 | 196 | find . -name "*.pyc" -delete |
bddfdb4c | 197 | dh_auto_clean |
e4bd154f | 198 | set -e ; make python/ovs/version.py && cd python && python3 setup.py clean ; rm -f ovs/version.py ; cd .. |
1cb56bc5 | 199 | rm -rf _debian _dpdk |
bbc8ba29 | 200 | rm -f debian/openvswitch-common.postinst debian/openvswitch-switch-dpdk.postinst |
1cb56bc5 | 201 | |
a2c40a61 | 202 | override_dh_auto_install-arch: |
1cb56bc5 | 203 | $(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/tmp install |
bddfdb4c | 204 | |
a2c40a61 TG |
205 | # Move ovs-vswitchd away, so we can use update-alternatives |
206 | mkdir -p $(CURDIR)/debian/openvswitch-common/usr/lib/openvswitch-common | |
207 | mv $(CURDIR)/debian/tmp/usr/sbin/ovs-vswitchd \ | |
208 | $(CURDIR)/debian/openvswitch-common/usr/lib/openvswitch-common/ovs-vswitchd | |
6c73af42 TG |
209 | mv $(CURDIR)/debian/tmp/usr/lib/*/libopenvswitch-2.15.so.0.0.0 \ |
210 | $(CURDIR)/debian/openvswitch-common/usr/lib/openvswitch-common/libopenvswitch-2.15.so.0.0.0 | |
1cb56bc5 | 211 | |
a2c40a61 TG |
212 | override_dh_auto_install-indep: |
213 | $(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/tmp install | |
1cb56bc5 TG |
214 | set -e && for pyvers in $(PYTHON3S); do \ |
215 | cd python && python$$pyvers setup.py install --install-layout=deb \ | |
216 | --root $(CURDIR)/debian/python3-openvswitch; cd ..; \ | |
217 | done | |
218 | rm -rf $(pwd)/debian/python*/usr/lib/python*/dist-packages/*.pth | |
219 | ||
a2c40a61 TG |
220 | override_dh_install: |
221 | install -D -m 0644 utilities/ovs-vsctl-bashcomp.bash $(CURDIR)/debian/openvswitch-switch/usr/share/bash-completion/completions/ovs-vsctl | |
6c73af42 | 222 | dh_install --exclude=usr/sbin/ovs-vswitchd --exclude=usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/libopenvswitch-2.15.so.0.0.0 |
a2c40a61 | 223 | |
85cfa617 | 224 | rm -f $(CURDIR)/debian/tmp/usr/lib/*/*.la |
0f968165 TG |
225 | dh_installman --language=C |
226 | rm -rf $(CURDIR)/debian/tmp/usr/share/man | |
1cb56bc5 | 227 | |
07001f9a TG |
228 | # remove the files managed via update-alternatives |
229 | rm -f $(CURDIR)/debian/tmp/usr/sbin/ovs-vswitchd | |
6c73af42 | 230 | rm -f $(CURDIR)/debian/tmp/usr/lib/*/libopenvswitch-2.15.so.0.0.0 |
07001f9a | 231 | |
0f968165 | 232 | dh_missing --fail-missing |
0e43db78 | 233 | # openvswitch-switch |
10c7eaaa | 234 | mkdir -p debian/openvswitch-switch/usr/share/openvswitch/switch |
0e43db78 TG |
235 | cp debian/openvswitch-switch.template debian/openvswitch-switch/usr/share/openvswitch/switch/default.template |
236 | ||
1cb56bc5 | 237 | ifneq (,$(filter i386 amd64 ppc64el arm64, $(DEB_HOST_ARCH))) |
07001f9a | 238 | install -v -D _dpdk/vswitchd/.libs/ovs-vswitchd \ |
1cb56bc5 | 239 | $(CURDIR)/debian/openvswitch-switch-dpdk/usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk |
6c73af42 TG |
240 | install -v -D _dpdk/lib/.libs/libopenvswitch-2.15.so.0.0.0 \ |
241 | $(CURDIR)/debian/openvswitch-switch-dpdk/usr/lib/openvswitch-switch-dpdk/libopenvswitch-2.15.so.0.0.0 | |
1cb56bc5 TG |
242 | endif |
243 | ||
0e43db78 | 244 | override_dh_installinit: |
1cb56bc5 TG |
245 | dh_installinit --restart-after-upgrade |
246 | dh_installinit -popenvswitch-switch --name=ovsdb-server --no-start | |
247 | dh_installinit -popenvswitch-switch --name=ovs-vswitchd --no-start | |
0e43db78 | 248 | |
c5505928 | 249 | override_dh_installsystemd: |
39e32f28 TG |
250 | dh_installsystemd -popenvswitch-switch --name=ovsdb-server |
251 | dh_installsystemd -popenvswitch-switch --name=ovs-vswitchd | |
c5505928 | 252 | dh_installsystemd --restart-after-upgrade -Xovs-vswitchd.service -Xovsdb-server.service |
1cb56bc5 | 253 | |
0e43db78 TG |
254 | override_dh_strip: |
255 | dh_strip --dbg-package=openvswitch-dbg | |
256 | ||
07001f9a TG |
257 | override_dh_shlibdeps: |
258 | dh_shlibdeps -l$(CURDIR)/_debian/lib/.libs | |
259 | ||
0e43db78 | 260 | override_dh_installman: |
0f968165 | 261 | echo "Do nothing..." |
103b3e1a | 262 | |
516f5a88 TG |
263 | override_dh_python3: |
264 | dh_python3 --shebang=/usr/bin/python3 | |
a6ad9a89 TG |
265 | dh_python3 -popenvswitch-ipsec /usr --shebang=/usr/bin/python3 |
266 | dh_python3 -popenvswitch-vtep /usr --shebang=/usr/bin/python3 | |
267 | dh_python3 -popenvswitch-switch /usr --shebang=/usr/bin/python3 | |
516f5a88 | 268 | dh_python3 usr/share/openvswitch/scripts --shebang=/usr/bin/python3 |