]> git.pld-linux.org Git - packages/openvswitch.git/blob - openvswitch.spec
- started update to 2.8.1
[packages/openvswitch.git] / openvswitch.spec
1 # TODO:
2 # - verify all init scripts still work
3 #
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
9 #       /usr/bin/ovn-detrace
10 #       /usr/bin/ovn-docker-overlay-driver
11 #       /usr/bin/ovn-docker-underlay-driver
12 #       /usr/bin/ovn-nbctl
13 #       /usr/bin/ovn-northd
14 #       /usr/bin/ovn-sbctl
15 #       /usr/bin/ovn-trace
16 #       /usr/bin/ovs-docker
17 #       /usr/bin/ovs-tcpdump
18 #       /usr/bin/ovs-testcontroller
19 #       /usr/bin/vtep-ctl
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
71 #       /usr/lib64/libovn.a
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
102
103 #
104 # Conditional build:
105 %bcond_without  dist_kernel     # allow non-distribution kernel
106 %bcond_without  kernel          # don't build kernel modules
107 %bcond_without  userspace       # don't build userspace programs
108 %bcond_with     verbose         # verbose build (V=1)
109
110 # set kernel_builtin to true for kernels with openvswitch module (>= 3.3)
111 %define         kernel_builtin  %(echo %{_kernel_ver} | awk '{ split($0, v, "."); vv=v[1]*1000+v[2]; if (vv >= 3003) print 1; else print 0 }')
112 #'
113 %if %{kernel_builtin} == 1
114 %undefine       with_kernel
115 %endif
116
117 %if %{without kernel}
118 %undefine       with_dist_kernel
119 %endif
120 %if "%{_alt_kernel}" != "%{nil}"
121 %undefine       with_userspace
122 %endif
123 %if %{without userspace}
124 # nothing to be placed to debuginfo package
125 %define         _enable_debug_packages  0
126 %endif
127
128 %define         rel     0.1
129 %define         pname   openvswitch
130 Summary:        Production Quality, Multilayer Open Virtual Switch
131 #Summary(pl.UTF-8):     -
132 Name:           %{pname}%{_alt_kernel}
133 Version:        2.8.1
134 Release:        %{rel}
135 License:        Apache v2.0
136 Group:          Networking/Daemons
137 Source0:        http://openvswitch.org/releases/%{pname}-%{version}.tar.gz
138 # Source0-md5:  837e291cfd60af0fc455e77deb2e1172
139 Source1:        ifdown-ovs
140 Source2:        ifup-ovs
141 Source3:        README.PLD
142 Source4:        %{pname}.logrotate
143 Source5:        %{pname}.tmpfiles
144 Source6:        %{pname}.sysconfig
145 Source7:        %{pname}.init
146 #Source8:       openvswitch-controller.init
147 #Source9:       openvswitch-ipsec.init
148 Source10:       %{pname}.service
149 URL:            http://openvswitch.org/
150 BuildRequires:  Zope-Interface
151 BuildRequires:  automake
152 BuildRequires:  autoconf
153 BuildRequires:  graphviz
154 BuildRequires:  groff
155 BuildRequires:  openssl-devel
156 BuildRequires:  openssl-tools
157 BuildRequires:  pkgconfig
158 BuildRequires:  sip-PyQt4
159 BuildRequires:  python-PyQt4-devel-tools
160 BuildRequires:  python-TwistedConch
161 BuildRequires:  python-TwistedCore
162 BuildRequires:  python-distribute
163 BuildRequires:  rpm-pythonprov
164 BuildRequires:  rpmbuild(macros) >= 1.647
165 %if %{with kernel}
166 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.32}
167 %else
168 Requires:       uname(release) >= 3.3
169 %endif
170 Requires(post,preun):   /sbin/chkconfig
171 Requires(post,preun,postun):    systemd-units >= 38
172 Requires:       python-modules
173 Requires:       rc-scripts
174 Requires:       systemd-units >= 38
175 Obsoletes:      ovsdbmonitor < 2.3.0-1
176 BuildRoot:      %{tmpdir}/%{pname}-%{version}-root-%(id -u -n)
177
178 %description
179 Open vSwitch is a production quality, multilayer virtual switch
180 licensed under the open source Apache 2.0 license. It is designed to
181 enable massive network automation through programmatic extension,
182 while still supporting standard management interfaces and protocols
183 (e.g. NetFlow, sFlow, SPAN, RSPAN, CLI, LACP, 802.1ag). In addition,
184 it is designed to support distribution across multiple physical
185 servers similar to VMware's vNetwork distributed vswitch or Cisco's
186 Nexus 1000V.
187
188 %package -n python-openvswitch
189 Summary:        Open vSwitch python bindings
190 Group:          Development/Languages/Python
191 Requires:       python-modules
192
193 %description -n python-openvswitch
194 Python bindings for the Open vSwitch database
195
196 %package test
197 Summary:        Open vSwitch test package
198 Group:          Networking/Admin
199 Requires:       python-modules
200 Requires:       python-openvswitch = %{version}-%{release}
201
202 %description test
203 This package contains utilities that are useful to diagnose
204 performance and connectivity issues in Open vSwitch setup.
205
206 %package -n kernel%{_alt_kernel}-net-openvswitch
207 Summary:        Linux driver for openvswitch
208 Summary(pl.UTF-8):      Sterownik dla Linuksa do openvswitch
209 Release:        %{rel}@%{_kernel_ver_str}
210 Group:          Base/Kernel
211 Requires(post,postun):  /sbin/depmod
212 %if %{with dist_kernel}
213 %requires_releq_kernel
214 Requires(postun):       %releq_kernel
215 %endif
216
217 %description -n kernel%{_alt_kernel}-net-openvswitch
218 This is driver for openvswitch for Linux.
219
220 This package contains Linux module.
221
222 %description -n kernel%{_alt_kernel}-net-openvswitch -l pl.UTF-8
223 Sterownik dla Linuksa do openvswitch.
224
225 Ten pakiet zawiera moduł jądra Linuksa.
226
227 %prep
228 %setup -q -n %{pname}-%{version}
229 cp %{SOURCE3} .
230
231 %build
232 %configure \
233 %if %{with kernel}
234         --with-linux=%{_kernelsrcdir} \
235         --with-linux-source=%{_kernelsrcdir}
236 %endif
237
238 %{__make}
239
240 %install
241 rm -rf $RPM_BUILD_ROOT
242
243 %if %{with userspace}
244 install -d $RPM_BUILD_ROOT{%{py_sitescriptdir},%{systemdunitdir},%{systemdtmpfilesdir}} \
245         $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d,logrotate.d},/lib/rc-scripts} \
246         $RPM_BUILD_ROOT{%{_desktopdir},%{_datadir}/%{pname}/pki}
247
248 %{__make} install \
249         DESTDIR=$RPM_BUILD_ROOT
250
251 install -p %{SOURCE1} $RPM_BUILD_ROOT/lib/rc-scripts/ifdown-ovs
252 install -p %{SOURCE2} $RPM_BUILD_ROOT/lib/rc-scripts/ifup-ovs
253 install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/openvswitch
254 install -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/openvswitch.conf
255 install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/openvswitch
256 install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/openvswitch
257 install -p %{SOURCE10} $RPM_BUILD_ROOT%{systemdunitdir}/openvswitch.service
258 install -p %{SOURCE11} $RPM_BUILD_ROOT%{_desktopdir}
259
260 %{__mv} $RPM_BUILD_ROOT%{_datadir}/%{pname}/python/{ovs,ovstest} $RPM_BUILD_ROOT%{py_sitescriptdir}
261 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{pname}/python
262
263 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
264 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
265
266 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/ovsdbmonitor
267 %py_comp $RPM_BUILD_ROOT%{_datadir}/ovsdbmonitor
268 %endif
269
270 %if %{with kernel}
271 cd datapath/linux
272 %install_kernel_modules -m openvswitch -d kernel/net/openvswitch
273 %endif
274
275 %clean
276 rm -rf $RPM_BUILD_ROOT
277
278 %post
279 /sbin/chkconfig --add openvswitch
280 %service -n openvswitch restart
281 NORESTART=1
282 %systemd_post openvswitch.service
283
284 %preun
285 if [ "$1" = "0" ]; then
286         %service -q openvswitch stop
287         /sbin/chkconfig --del openvswitch
288 fi
289 %systemd_preun openvswitch.service
290
291 %postun
292 %systemd_reload
293
294 %post   -n kernel%{_alt_kernel}-net-openvswitch
295 %depmod %{_kernel_ver}
296
297 %postun -n kernel%{_alt_kernel}-net-openvswitch
298 %depmod %{_kernel_ver}
299
300 %if %{with userspace}
301 %files
302 %defattr(644,root,root,755)
303 %doc AUTHORS.rst CONTRIBUTING.rst MAINTAINERS.rst NEWS NOTICE README.rst
304 %doc README.PLD
305 %attr(755,root,root) /lib/rc-scripts/ifdown-ovs
306 %attr(755,root,root) /lib/rc-scripts/ifup-ovs
307 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/openvswitch
308 %{systemdtmpfilesdir}/openvswitch.conf
309 %{systemdunitdir}/openvswitch.service
310 %dir %{_datadir}/%{pname}
311 %{_datadir}/%{pname}/pki
312 %dir %{_datadir}/%{pname}/scripts
313 %attr(755,root,root) %{_datadir}/%{pname}/scripts/*
314 %{_datadir}/%{pname}/bugtool-plugins
315 %{_datadir}/%{pname}/vswitch.ovsschema
316
317 %attr(754,root,root) /etc/rc.d/init.d/openvswitch
318 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/openvswitch
319
320 %attr(755,root,root) %{_bindir}/ovs-appctl
321 %attr(755,root,root) %{_bindir}/ovs-dpctl
322 %attr(755,root,root) %{_bindir}/ovs-dpctl-top
323 %attr(755,root,root) %{_bindir}/ovs-l3ping
324 %attr(755,root,root) %{_bindir}/ovs-ofctl
325 %attr(755,root,root) %{_bindir}/ovs-parse-backtrace
326 %attr(755,root,root) %{_bindir}/ovs-pcap
327 %attr(755,root,root) %{_bindir}/ovs-pki
328 %attr(755,root,root) %{_bindir}/ovs-tcpundump
329 %attr(755,root,root) %{_bindir}/ovs-vsctl
330 %attr(755,root,root) %{_bindir}/ovsdb-client
331 %attr(755,root,root) %{_bindir}/ovsdb-tool
332 %attr(755,root,root) %{_sbindir}/ovs-bugtool
333 %attr(755,root,root) %{_sbindir}/ovs-vlan-bug-workaround
334 %attr(755,root,root) %{_sbindir}/ovs-vswitchd
335 %attr(755,root,root) %{_sbindir}/ovsdb-server
336 %{_mandir}/man1/ovs-pcap.1*
337 %{_mandir}/man1/ovs-tcpundump.1*
338 %{_mandir}/man1/ovsdb-client.1*
339 %{_mandir}/man1/ovsdb-server.1*
340 %{_mandir}/man1/ovsdb-tool.1*
341 %{_mandir}/man5/ovs-vswitchd.conf.db.5*
342 %{_mandir}/man8/ovs-appctl.8*
343 %{_mandir}/man8/ovs-bugtool.8*
344 %{_mandir}/man8/ovs-ctl.8*
345 %{_mandir}/man8/ovs-dpctl.8*
346 %{_mandir}/man8/ovs-dpctl-top.8*
347 %{_mandir}/man8/ovs-l3ping.8*
348 %{_mandir}/man8/ovs-ofctl.8*
349 %{_mandir}/man8/ovs-parse-backtrace.8*
350 %{_mandir}/man8/ovs-pki.8*
351 %{_mandir}/man8/ovs-vlan-bug-workaround.8*
352 %{_mandir}/man8/ovs-vlan-test.8*
353 %{_mandir}/man8/ovs-vsctl.8*
354 %{_mandir}/man8/ovs-vswitchd.8*
355
356 %files -n python-openvswitch
357 %defattr(644,root,root,755)
358 %dir %{py_sitescriptdir}/ovs
359 %{py_sitescriptdir}/ovs/*.py*
360 %dir %{py_sitescriptdir}/ovs/db
361 %{py_sitescriptdir}/ovs/db/*.py*
362 %dir %{py_sitescriptdir}/ovs/unixctl
363 %{py_sitescriptdir}/ovs/unixctl/*.py*
364
365 %files test
366 %defattr(644,root,root,755)
367 %attr(755,root,root) %{_bindir}/ovs-test
368 %attr(755,root,root) %{_bindir}/ovs-vlan-test
369 %{py_sitescriptdir}/ovstest
370 %{_mandir}/man8/ovs-test.8*
371 %endif
372
373 %if %{with kernel}
374 %files -n kernel%{_alt_kernel}-net-openvswitch
375 %defattr(644,root,root,755)
376 %dir /lib/modules/%{_kernel_ver}/kernel/net/openvswitch
377 /lib/modules/%{_kernel_ver}/kernel/net/openvswitch/*.ko*
378 %endif
This page took 0.055903 seconds and 4 git commands to generate.