3 UPSTREAM_GIT
= https
://github.com
/openvswitch
/ovs
4 include /usr
/share
/openstack-pkg-tools
/pkgos.make
6 export DEB_BUILD_MAINT_OPTIONS
=hardening
=+bindnow
9 dh
$@
--with autoreconf
,python3
,sphinxdoc
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
)
16 ifneq (,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
17 PARALLEL
= -j
$(patsubst parallel
=%,%,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
22 override_dh_auto_configure
:
23 test -d _debian || mkdir _debian
26 ..
/configure
--prefix=/usr
--localstatedir
=/var
--enable-ssl
--enable-shared \
27 --libdir=/usr
/lib
/$(DEB_HOST_MULTIARCH
) \
28 --sysconfdir
=/etc
$(DATAPATH_CONFIGURE_OPTS
))
29 ifneq (,$(filter i386 amd64 ppc64el arm64
, $(DEB_HOST_ARCH
)))
30 test -d _dpdk || mkdir _dpdk
33 ..
/configure
--prefix=/usr
--localstatedir
=/var
--enable-ssl
--enable-shared \
34 --libdir=/usr
/lib
/$(DEB_HOST_MULTIARCH
) \
35 --with-dpdk
=shared
--sysconfdir
=/etc \
36 $(DATAPATH_CONFIGURE_OPTS
))
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.
43 # 1021: ofproto-dpif - select group with weights FAILED (ofproto-dpif.at:535)
44 # 1057: ofproto-dpif - controller action without megaflows FAILED (ofproto-dpif.at:1893)
45 TEST_LIST
= 1-19 21-531 533-1020 1022-1056 1058-
46 TEST_LIST_DPDK
= $(TEST_LIST
)
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)
55 ifneq (,$(filter armhf
, $(DEB_HOST_ARCH
)))
56 TEST_LIST
= 1-19 21-23 28-531 533-917 919-1020 1022-1056 1058-
57 TEST_LIST_DPDK
= $(TEST_LIST
)
61 # 20: bfd - bfd decay FAILED (bfd.at:396)
63 # 917: ofproto - asynchronous message control (OpenFlow 1.2) (ofproto.at:3183)
64 # 918: ofproto - asynchronous message control (OpenFlow 1.3) FAILED (ovs-macros.at:241)
65 # 927: ofproto - asynchronous message control (OpenFlow 1.3) FAILED (ofproto.at:3405)
66 # 919: ofproto - asynchronous message control (OpenFlow 1.4) FAILED (ovs-ofctl)
67 # 1035: ofproto-dpif - select group with weights
68 # 1057: ofproto-dpif - controller action without megaflows FAILED (ofproto-dpif.at:1893)
69 # 1069: ofproto-dpif - controller action without megaflows
70 # 1102: ofproto-dpif - continuation - resubmit FAILED (ovs-macros.at:241)
71 # 1071: ofproto-dpif - controller action without megaflows
72 # 1136: ofproto-dpif - sFlow packet sampling - LACP structures
73 ifneq (,$(filter mipsel
, $(DEB_HOST_ARCH
)))
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-
75 TEST_LIST_DPDK
= $(TEST_LIST
)
79 # 20: bfd - bfd decay FAILED (bfd.at:396)
80 # 1033: ofproto-dpif - select group with weights
81 # 1057: ofproto-dpif - controller action without megaflows FAILED (ofproto-dpif.at:1893)
82 # 1021: ofproto-dpif - select group with weights FAILED (ofproto-dpif.at:535)
83 # 1069: ofproto-dpif - controller action without megaflows
84 ifneq (,$(filter mips64el
, $(DEB_HOST_ARCH
)))
85 TEST_LIST
= 1-19 22-531 533-1020 1022-1032 1034-1056 1058-1068 1070 1072-1120 1122-
86 TEST_LIST_DPDK
= $(TEST_LIST
)
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
)))
93 TEST_LIST
= 1-19 21-531 533-1020 1022-1056 1058-1122 1124-
94 TEST_LIST_DPDK
= $(TEST_LIST
)
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
)))
102 TEST_LIST
= 1-19 21-158 160-531 533-1020 1022-1056 1058-
103 TEST_LIST_DPDK
= $(TEST_LIST
)
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
)))
111 TEST_LIST
= 1-19 21-531 533-2723 2725-2727 2729-2736 2738-
112 TEST_LIST_DPDK
= $(TEST_LIST
)
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
)))
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-
136 TEST_LIST_DPDK
= $(TEST_LIST
)
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
)))
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-
153 TEST_LIST_DPDK
= $(TEST_LIST
)
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
)))
161 TEST_LIST
= 1-19 21-531 533-1020 1022-1056 1058-
162 TEST_LIST_DPDK
= $(TEST_LIST
)
165 override_dh_auto_test
:
166 ifeq (,$(filter nocheck
,$(DEB_BUILD_OPTIONS
)))
167 if
$(MAKE
) -C _debian
check TESTSUITEFLAGS
='$(PARALLEL) $(TEST_LIST)' || \
168 $(MAKE
) -C _debian
check TESTSUITEFLAGS
='--recheck' ; then
:; \
170 cat _debian
/tests
/testsuite.log
; \
173 ifneq (,$(filter i386 amd64 ppc64el arm64
, $(DEB_HOST_ARCH
)))
174 if
$(MAKE
) -C _dpdk
check TESTSUITEFLAGS
='$(PARALLEL) $(TEST_LIST_DPDK)' || \
175 $(MAKE
) -C _dpdk
check TESTSUITEFLAGS
='--recheck' ; then
:; \
177 cat _dpdk
/tests
/testsuite.log
; \
180 endif # i386/amd64/ppc64el/arm64
183 override_dh_auto_build
:
184 touch tests
/fuzz-regression
/ofp_print_fuzzer-6540965472632832
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 ; \
189 $(MAKE
) $(PARALLEL
) -C _debian
dist distdir
=openvswitch
190 $(MAKE
) $(PARALLEL
) -C _debian
191 ifneq (,$(filter i386 amd64 ppc64el arm64
, $(DEB_HOST_ARCH
)))
192 $(MAKE
) $(PARALLEL
) -C _dpdk
195 override_dh_auto_clean
:
196 find .
-name
"*.pyc" -delete
198 set
-e
; make python
/ovs
/version.py
&& cd python
&& python3 setup.py
clean ; rm -f ovs
/version.py
; cd ..
200 rm -f debian
/openvswitch-common.postinst debian
/openvswitch-switch-dpdk.postinst
202 override_dh_auto_install-arch
:
203 $(MAKE
) -C _debian DESTDIR
=$(CURDIR
)/debian
/tmp
install
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
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
212 override_dh_auto_install-indep
:
213 $(MAKE
) -C _debian DESTDIR
=$(CURDIR
)/debian
/tmp
install
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 ..
; \
218 rm -rf
$(pwd
)/debian
/python
*/usr
/lib
/python
*/dist-packages
/*.pth
221 install -D
-m
0644 utilities
/ovs-vsctl-bashcomp.bash
$(CURDIR
)/debian
/openvswitch-switch
/usr
/share
/bash-completion
/completions
/ovs-vsctl
222 dh_install
--exclude
=usr
/sbin
/ovs-vswitchd
--exclude
=usr
/lib
/`dpkg-architecture -qDEB_HOST_MULTIARCH`/libopenvswitch-2.15.so
.0.0.0
224 rm -f
$(CURDIR
)/debian
/tmp
/usr
/lib
/*/*.la
225 dh_installman
--language
=C
226 rm -rf
$(CURDIR
)/debian
/tmp
/usr
/share
/man
228 # remove the files managed via update-alternatives
229 rm -f
$(CURDIR
)/debian
/tmp
/usr
/sbin
/ovs-vswitchd
230 rm -f
$(CURDIR
)/debian
/tmp
/usr
/lib
/*/libopenvswitch-2.15.so
.0.0.0
232 dh_missing
--fail-missing
234 mkdir
-p debian
/openvswitch-switch
/usr
/share
/openvswitch
/switch
235 cp debian
/openvswitch-switch.template debian
/openvswitch-switch
/usr
/share
/openvswitch
/switch
/default.template
237 ifneq (,$(filter i386 amd64 ppc64el arm64
, $(DEB_HOST_ARCH
)))
238 install -v
-D _dpdk
/vswitchd
/.libs
/ovs-vswitchd \
239 $(CURDIR
)/debian
/openvswitch-switch-dpdk
/usr
/lib
/openvswitch-switch-dpdk
/ovs-vswitchd-dpdk
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
244 override_dh_installinit
:
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
249 override_dh_installsystemd
:
250 dh_installsystemd
-popenvswitch-switch
--name
=ovsdb-server
251 dh_installsystemd
-popenvswitch-switch
--name
=ovs-vswitchd
252 dh_installsystemd
--restart-after-upgrade
-Xovs-vswitchd.service
-Xovsdb-server.service
255 dh_strip
--dbg-package
=openvswitch-dbg
257 override_dh_shlibdeps
:
258 dh_shlibdeps
-l
$(CURDIR
)/_debian
/lib
/.libs
260 override_dh_installman
:
264 dh_python3
--shebang
=/usr
/bin
/python3
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
268 dh_python3 usr
/share
/openvswitch
/scripts
--shebang
=/usr
/bin
/python3