2 # - verify all init scripts still work
4 # warning: Installed (but unpackaged) file(s) found:
5 # /etc/bash_completion.d/ovs-appctl-bashcomp.bash
6 # /etc/bash_completion.d/ovs-vsctl-bashcomp.bash
7 # /usr/bin/ovn-controller
8 # /usr/bin/ovn-controller-vtep
10 # /usr/bin/ovn-docker-overlay-driver
11 # /usr/bin/ovn-docker-underlay-driver
17 # /usr/bin/ovs-tcpdump
18 # /usr/bin/ovs-testcontroller
20 # /usr/include/openflow/intel-ext.h
21 # /usr/include/openflow/netronome-ext.h
22 # /usr/include/openflow/nicira-ext.h
23 # /usr/include/openflow/openflow-1.0.h
24 # /usr/include/openflow/openflow-1.1.h
25 # /usr/include/openflow/openflow-1.2.h
26 # /usr/include/openflow/openflow-1.3.h
27 # /usr/include/openflow/openflow-1.4.h
28 # /usr/include/openflow/openflow-1.5.h
29 # /usr/include/openflow/openflow-1.6.h
30 # /usr/include/openflow/openflow-common.h
31 # /usr/include/openflow/openflow.h
32 # /usr/include/openvswitch/compiler.h
33 # /usr/include/openvswitch/dynamic-string.h
34 # /usr/include/openvswitch/flow.h
35 # /usr/include/openvswitch/geneve.h
36 # /usr/include/openvswitch/hmap.h
37 # /usr/include/openvswitch/json.h
38 # /usr/include/openvswitch/list.h
39 # /usr/include/openvswitch/match.h
40 # /usr/include/openvswitch/meta-flow.h
41 # /usr/include/openvswitch/netdev.h
42 # /usr/include/openvswitch/nsh.h
43 # /usr/include/openvswitch/ofp-actions.h
44 # /usr/include/openvswitch/ofp-ed-props.h
45 # /usr/include/openvswitch/ofp-errors.h
46 # /usr/include/openvswitch/ofp-msgs.h
47 # /usr/include/openvswitch/ofp-parse.h
48 # /usr/include/openvswitch/ofp-print.h
49 # /usr/include/openvswitch/ofp-prop.h
50 # /usr/include/openvswitch/ofp-util.h
51 # /usr/include/openvswitch/ofpbuf.h
52 # /usr/include/openvswitch/packets.h
53 # /usr/include/openvswitch/shash.h
54 # /usr/include/openvswitch/thread.h
55 # /usr/include/openvswitch/token-bucket.h
56 # /usr/include/openvswitch/tun-metadata.h
57 # /usr/include/openvswitch/type-props.h
58 # /usr/include/openvswitch/types.h
59 # /usr/include/openvswitch/util.h
60 # /usr/include/openvswitch/uuid.h
61 # /usr/include/openvswitch/vconn.h
62 # /usr/include/openvswitch/version.h
63 # /usr/include/openvswitch/vlog.h
64 # /usr/include/ovn/actions.h
65 # /usr/include/ovn/expr.h
66 # /usr/include/ovn/lex.h
67 # /usr/lib64/libofproto.a
68 # /usr/lib64/libofproto.la
69 # /usr/lib64/libopenvswitch.a
70 # /usr/lib64/libopenvswitch.la
72 # /usr/lib64/libovn.la
73 # /usr/lib64/libovsdb.a
74 # /usr/lib64/libovsdb.la
75 # /usr/lib64/libsflow.a
76 # /usr/lib64/libsflow.la
77 # /usr/lib64/libvtep.a
78 # /usr/lib64/libvtep.la
79 # /usr/lib64/pkgconfig/libofproto.pc
80 # /usr/lib64/pkgconfig/libopenvswitch.pc
81 # /usr/lib64/pkgconfig/libovsdb.pc
82 # /usr/lib64/pkgconfig/libsflow.pc
83 # /usr/share/man/man1/ovn-detrace.1.gz
84 # /usr/share/man/man5/ovn-nb.5.gz
85 # /usr/share/man/man5/ovn-sb.5.gz
86 # /usr/share/man/man5/vtep.5.gz
87 # /usr/share/man/man7/ovn-architecture.7.gz
88 # /usr/share/man/man7/ovs-fields.7.gz
89 # /usr/share/man/man8/ovn-controller-vtep.8.gz
90 # /usr/share/man/man8/ovn-controller.8.gz
91 # /usr/share/man/man8/ovn-ctl.8.gz
92 # /usr/share/man/man8/ovn-nbctl.8.gz
93 # /usr/share/man/man8/ovn-northd.8.gz
94 # /usr/share/man/man8/ovn-sbctl.8.gz
95 # /usr/share/man/man8/ovn-trace.8.gz
96 # /usr/share/man/man8/ovs-tcpdump.8.gz
97 # /usr/share/man/man8/ovs-testcontroller.8.gz
98 # /usr/share/man/man8/vtep-ctl.8.gz
99 # /usr/share/openvswitch/ovn-nb.ovsschema
100 # /usr/share/openvswitch/ovn-sb.ovsschema
101 # /usr/share/openvswitch/vtep.ovsschema
105 %bcond_with kernel # build kernel module for flow-based switching for kernels < 4.11
106 %bcond_without userspace # don't build userspace programs
107 %bcond_with verbose # verbose build (V=1)
109 %if 0%{?_pld_builder:1} && %{with kernel} && %{with userspace}
110 %{error:kernel and userspace cannot be built at the same time on PLD builders}
114 %if %{without userspace}
115 # nothing to be placed to debuginfo package
116 %define _enable_debug_packages 0
120 %define pname openvswitch
121 Summary: Production Quality, Multilayer Open Virtual Switch
122 #Summary(pl.UTF-8): -
123 Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
125 Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
127 Group: Networking/Daemons
128 Source0: http://openvswitch.org/releases/%{pname}-%{version}.tar.gz
129 # Source0-md5: 837e291cfd60af0fc455e77deb2e1172
133 Source4: %{pname}.logrotate
134 Source5: %{pname}.tmpfiles
135 Source6: %{pname}.sysconfig
136 Source7: %{pname}.init
137 #Source8: openvswitch-controller.init
138 #Source9: openvswitch-ipsec.init
139 Source10: %{pname}.service
140 URL: http://openvswitch.org/
141 BuildRequires: Zope-Interface
142 BuildRequires: automake
143 BuildRequires: autoconf
144 BuildRequires: graphviz
146 BuildRequires: openssl-devel
147 BuildRequires: openssl-tools
148 BuildRequires: pkgconfig
149 BuildRequires: sip-PyQt4
150 BuildRequires: python-PyQt4-devel-tools
151 BuildRequires: python-TwistedConch
152 BuildRequires: python-TwistedCore
153 BuildRequires: python-distribute
154 BuildRequires: rpm-pythonprov
155 BuildRequires: rpmbuild(macros) >= 1.701
157 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:3.11}
159 Requires: uname(release) >= 3.11
161 Requires(post,preun): /sbin/chkconfig
162 Requires(post,preun,postun): systemd-units >= 38
163 Requires: python-modules
165 Requires: systemd-units >= 38
166 Obsoletes: ovsdbmonitor < 2.3.0-1
167 BuildRoot: %{tmpdir}/%{pname}-%{version}-root-%(id -u -n)
170 Open vSwitch is a production quality, multilayer virtual switch
171 licensed under the open source Apache 2.0 license. It is designed to
172 enable massive network automation through programmatic extension,
173 while still supporting standard management interfaces and protocols
174 (e.g. NetFlow, sFlow, SPAN, RSPAN, CLI, LACP, 802.1ag). In addition,
175 it is designed to support distribution across multiple physical
176 servers similar to VMware's vNetwork distributed vswitch or Cisco's
179 %package -n python-openvswitch
180 Summary: Open vSwitch python bindings
181 Group: Development/Languages/Python
182 Requires: python-modules
184 %description -n python-openvswitch
185 Python bindings for the Open vSwitch database
188 Summary: Open vSwitch test package
189 Group: Networking/Admin
190 Requires: python-modules
191 Requires: python-openvswitch = %{version}-%{release}
194 This package contains utilities that are useful to diagnose
195 performance and connectivity issues in Open vSwitch setup.
197 %define kernel_pkg()\
198 %package -n kernel%{_alt_kernel}-net-openvswitch\
199 Summary: Linux driver for openvswitch\
200 Summary(pl.UTF-8): Sterownik dla Linuksa do openvswitch\
201 Release: %{rel}@%{_kernel_ver_str}\
203 Requires(post,postun): /sbin/depmod\
204 %requires_releq_kernel\
205 Requires(postun): %releq_kernel\
207 %description -n kernel%{_alt_kernel}-net-openvswitch\
208 This is driver for openvswitch for Linux.\
210 This package contains Linux module.\
212 %description -n kernel%{_alt_kernel}-net-openvswitch -l pl.UTF-8\
213 Sterownik dla Linuksa do openvswitch.\
215 Ten pakiet zawiera moduł jądra Linuksa.\
218 %files -n kernel%{_alt_kernel}-net-openvswitch\
219 %defattr(644,root,root,755)\
220 /etc/modprobe.d/%{_kernel_ver}/openvswitch.conf\
221 %dir /lib/modules/%{_kernel_ver}/kernel/net/openvswitch\
222 /lib/modules/%{_kernel_ver}/kernel/net/openvswitch/*.ko*\
225 %post -n kernel%{_alt_kernel}-net-openvswitch\
226 %depmod %{_kernel_ver}\
228 %postun -n kernel%{_alt_kernel}-net-openvswitch\
229 %depmod %{_kernel_ver}\
232 %define build_kernel_pkg()\
234 --with-linux=%{_kernelsrcdir} \\\
235 --with-linux-source=%{_kernelsrcdir}\
238 %{__make} -C datapath/linux %{?with_verbose:V=1}\
239 %install_kernel_modules -D installed -s %{version} -n openvswitch -m datapath/linux/openvswitch,datapath/linux/vport-geneve,datapath/linux/vport-gre,datapath/linux/vport-lisp,datapath/linux/vport-stt,datapath/linux/vport-vxlan -d kernel/net/openvswitch\
242 %{?with_kernel:%{expand:%create_kernel_packages}}
245 %setup -q -n %{pname}-%{version}
249 %{?with_kernel:%{expand:%build_kernel_packages}}
251 %if %{with userspace}
258 rm -rf $RPM_BUILD_ROOT
260 %if %{with userspace}
261 install -d $RPM_BUILD_ROOT{%{py_sitescriptdir},%{systemdunitdir},%{systemdtmpfilesdir}} \
262 $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d,logrotate.d},/lib/rc-scripts} \
263 $RPM_BUILD_ROOT%{_datadir}/%{pname}/pki
266 DESTDIR=$RPM_BUILD_ROOT
268 install -p %{SOURCE1} $RPM_BUILD_ROOT/lib/rc-scripts/ifdown-ovs
269 install -p %{SOURCE2} $RPM_BUILD_ROOT/lib/rc-scripts/ifup-ovs
270 install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/openvswitch
271 install -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/openvswitch.conf
272 install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/openvswitch
273 install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/openvswitch
274 install -p %{SOURCE10} $RPM_BUILD_ROOT%{systemdunitdir}/openvswitch.service
276 %{__mv} $RPM_BUILD_ROOT%{_datadir}/%{pname}/python/{ovs,ovstest} $RPM_BUILD_ROOT%{py_sitescriptdir}
277 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{pname}/python
279 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
280 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
282 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/ovsdbmonitor
283 %py_comp $RPM_BUILD_ROOT%{_datadir}/ovsdbmonitor
287 cp -a installed/* $RPM_BUILD_ROOT
291 rm -rf $RPM_BUILD_ROOT
294 /sbin/chkconfig --add openvswitch
295 %service -n openvswitch restart
297 %systemd_post openvswitch.service
300 if [ "$1" = "0" ]; then
301 %service -q openvswitch stop
302 /sbin/chkconfig --del openvswitch
304 %systemd_preun openvswitch.service
309 %if %{with userspace}
311 %defattr(644,root,root,755)
312 %doc AUTHORS.rst CONTRIBUTING.rst MAINTAINERS.rst NEWS NOTICE README.rst
314 %attr(755,root,root) /lib/rc-scripts/ifdown-ovs
315 %attr(755,root,root) /lib/rc-scripts/ifup-ovs
316 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/openvswitch
317 %{systemdtmpfilesdir}/openvswitch.conf
318 %{systemdunitdir}/openvswitch.service
319 %dir %{_datadir}/%{pname}
320 %{_datadir}/%{pname}/pki
321 %dir %{_datadir}/%{pname}/scripts
322 %attr(755,root,root) %{_datadir}/%{pname}/scripts/*
323 %{_datadir}/%{pname}/bugtool-plugins
324 %{_datadir}/%{pname}/vswitch.ovsschema
326 %attr(754,root,root) /etc/rc.d/init.d/openvswitch
327 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/openvswitch
329 %attr(755,root,root) %{_bindir}/ovs-appctl
330 %attr(755,root,root) %{_bindir}/ovs-dpctl
331 %attr(755,root,root) %{_bindir}/ovs-dpctl-top
332 %attr(755,root,root) %{_bindir}/ovs-l3ping
333 %attr(755,root,root) %{_bindir}/ovs-ofctl
334 %attr(755,root,root) %{_bindir}/ovs-parse-backtrace
335 %attr(755,root,root) %{_bindir}/ovs-pcap
336 %attr(755,root,root) %{_bindir}/ovs-pki
337 %attr(755,root,root) %{_bindir}/ovs-tcpundump
338 %attr(755,root,root) %{_bindir}/ovs-vsctl
339 %attr(755,root,root) %{_bindir}/ovsdb-client
340 %attr(755,root,root) %{_bindir}/ovsdb-tool
341 %attr(755,root,root) %{_sbindir}/ovs-bugtool
342 %attr(755,root,root) %{_sbindir}/ovs-vlan-bug-workaround
343 %attr(755,root,root) %{_sbindir}/ovs-vswitchd
344 %attr(755,root,root) %{_sbindir}/ovsdb-server
345 %{_mandir}/man1/ovs-pcap.1*
346 %{_mandir}/man1/ovs-tcpundump.1*
347 %{_mandir}/man1/ovsdb-client.1*
348 %{_mandir}/man1/ovsdb-server.1*
349 %{_mandir}/man1/ovsdb-tool.1*
350 %{_mandir}/man5/ovs-vswitchd.conf.db.5*
351 %{_mandir}/man8/ovs-appctl.8*
352 %{_mandir}/man8/ovs-bugtool.8*
353 %{_mandir}/man8/ovs-ctl.8*
354 %{_mandir}/man8/ovs-dpctl.8*
355 %{_mandir}/man8/ovs-dpctl-top.8*
356 %{_mandir}/man8/ovs-l3ping.8*
357 %{_mandir}/man8/ovs-ofctl.8*
358 %{_mandir}/man8/ovs-parse-backtrace.8*
359 %{_mandir}/man8/ovs-pki.8*
360 %{_mandir}/man8/ovs-vlan-bug-workaround.8*
361 %{_mandir}/man8/ovs-vlan-test.8*
362 %{_mandir}/man8/ovs-vsctl.8*
363 %{_mandir}/man8/ovs-vswitchd.8*
365 %files -n python-openvswitch
366 %defattr(644,root,root,755)
367 %dir %{py_sitescriptdir}/ovs
368 %{py_sitescriptdir}/ovs/*.py*
369 %dir %{py_sitescriptdir}/ovs/db
370 %{py_sitescriptdir}/ovs/db/*.py*
371 %dir %{py_sitescriptdir}/ovs/unixctl
372 %{py_sitescriptdir}/ovs/unixctl/*.py*
375 %defattr(644,root,root,755)
376 %attr(755,root,root) %{_bindir}/ovs-test
377 %attr(755,root,root) %{_bindir}/ovs-vlan-test
378 %{py_sitescriptdir}/ovstest
379 %{_mandir}/man8/ovs-test.8*