]>
Commit | Line | Data |
---|---|---|
d8fe0a6a RS |
1 | # Spec file for Open vSwitch. |
2 | ||
e7529141 | 3 | # Copyright (C) 2009, 2010, 2013, 2014, 2015, 2016 Nicira Networks, Inc. |
d8fe0a6a RS |
4 | # |
5 | # Copying and distribution of this file, with or without modification, | |
6 | # are permitted in any medium without royalty provided the copyright | |
7 | # notice and this notice are preserved. This file is offered as-is, | |
8 | # without warranty of any kind. | |
329cf232 GS |
9 | # |
10 | # If tests have to be skipped while building, specify the '--without check' | |
11 | # option. For example: | |
8ef22bb1 LR |
12 | # rpmbuild -bb --without check rhel/openvswitch-fedora.spec |
13 | # | |
14 | # Support for executing kernel data path tests under rpmbuild is | |
15 | # provided, however this is intended for use only in test environments | |
16 | # and should not be used otherwise (these tests require root privileges). | |
17 | # These tests can be executed, for example, via: | |
18 | # rpmbuild -rb --with check_datapath_kernel openvswitch-fedora.src.rpm | |
19 | # | |
20 | # These tests will use the currently installed OVS kernel modules, when | |
21 | # testing out of tree kernel modules the appropriate openvswitch-kmod | |
22 | # package should be installed first. | |
d8fe0a6a RS |
23 | |
24 | #%define kernel 2.6.40.4-5.fc15.x86_64 | |
25 | ||
2ff63ae0 FL |
26 | # If libcap-ng isn't available and there is no need for running OVS |
27 | # as regular user, specify the '--without libcapng' | |
28 | %bcond_without libcapng | |
eea0cdb5 PM |
29 | # To enable DPDK support, specify '--with dpdk' when building |
30 | %bcond_with dpdk | |
db8dcbaf LM |
31 | # Enable Python 3 by specifying '--with build_python3'. |
32 | # This is enabled by default for versions of the distribution that | |
33 | # have Python 3 by default (Fedora > 22). | |
34 | %bcond_with build_python3 | |
2ff63ae0 | 35 | |
da11d088 FL |
36 | # Enable PIE, bz#955181 |
37 | %global _hardened_build 1 | |
38 | ||
b4366682 FL |
39 | # some distros (e.g: RHEL-7) don't define _rundir macro yet |
40 | # Fedora 15 onwards uses /run as _rundir | |
41 | %if 0%{!?_rundir:1} | |
42 | %define _rundir /run | |
43 | %endif | |
44 | ||
db8dcbaf LM |
45 | # define the python package prefix based on distribution version so that we can |
46 | # simultaneously support RHEL-based and later Fedora versions in this spec file. | |
47 | %if 0%{?fedora} >= 25 | |
48 | %define _py2 python2 | |
49 | %endif | |
50 | ||
51 | %if 0%{?rhel} || 0%{?fedora} < 25 | |
52 | %define _py2 python | |
53 | %endif | |
54 | ||
55 | ||
d8fe0a6a RS |
56 | Name: openvswitch |
57 | Summary: Open vSwitch | |
58 | Group: System Environment/Daemons | |
59 | URL: http://www.openvswitch.org/ | |
60 | Version: @VERSION@ | |
61 | ||
362d45b7 FL |
62 | # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the |
63 | # lib/sflow*.[ch] files are SISSL | |
64 | # datapath/ is GPLv2 (although not built into any of the binary packages) | |
362d45b7 | 65 | License: ASL 2.0 and LGPLv2+ and SISSL |
d8fe0a6a | 66 | Release: 1%{?dist} |
d09dbe62 | 67 | Source: http://openvswitch.org/releases/%{name}-%{version}.tar.gz |
d8fe0a6a | 68 | |
d2ed89bc | 69 | BuildRequires: autoconf automake libtool |
21ea8738 | 70 | BuildRequires: systemd-units openssl openssl-devel |
db8dcbaf LM |
71 | BuildRequires: %{_py2}-devel |
72 | %if 0%{?fedora} > 22 || %{with build_python3} | |
bb1a7ca2 | 73 | BuildRequires: python3-devel |
db8dcbaf | 74 | %endif |
21ea8738 FL |
75 | BuildRequires: desktop-file-utils |
76 | BuildRequires: groff graphviz | |
9b897c91 | 77 | BuildRequires: checkpolicy, selinux-policy-devel |
fa90cc39 | 78 | BuildRequires: %{_py2}-sphinx |
3b4099b4 | 79 | # make check dependencies |
db8dcbaf | 80 | BuildRequires: %{_py2}-twisted%{?rhel:-core} %{_py2}-zope-interface %{_py2}-six |
3b4099b4 | 81 | BuildRequires: procps-ng |
2ff63ae0 FL |
82 | %if %{with libcapng} |
83 | BuildRequires: libcap-ng libcap-ng-devel | |
84 | %endif | |
eea0cdb5 | 85 | %if %{with dpdk} |
e6932e5d | 86 | BuildRequires: libpcap-devel numactl-devel |
f3e7ec25 | 87 | BuildRequires: dpdk-devel >= 17.05.1 |
eea0cdb5 PM |
88 | Provides: %{name}-dpdk = %{version}-%{release} |
89 | %endif | |
21ea8738 | 90 | |
89ca9021 | 91 | Requires: openssl hostname iproute module-init-tools |
ab725f42 | 92 | #Upstream kernel commit 4f647e0a3c37b8d5086214128614a136064110c3 |
c1ddf091 | 93 | #Requires: kernel >= 3.15.0-0 |
ab725f42 | 94 | |
ac416a3a | 95 | Requires(post): /usr/bin/getent |
96 | Requires(post): /usr/sbin/useradd | |
97 | Requires(post): /usr/bin/sed | |
e3e738a3 | 98 | %if %{with dpdk} |
99 | Requires(post): /usr/sbin/usermod | |
100 | Requires(post): /usr/sbin/groupadd | |
101 | %endif | |
b33c6dca | 102 | Requires(post): systemd-units |
d8fe0a6a RS |
103 | Requires(preun): systemd-units |
104 | Requires(postun): systemd-units | |
f1b476c3 | 105 | Obsoletes: openvswitch-controller <= 0:2.1.0-1 |
d8fe0a6a | 106 | |
db8dcbaf | 107 | # to skip running checks, pass --without check |
329cf232 | 108 | %bcond_without check |
8ef22bb1 | 109 | %bcond_with check_datapath_kernel |
329cf232 | 110 | |
d8fe0a6a | 111 | %description |
6fcc7a7a | 112 | Open vSwitch provides standard network bridging functions and |
d8fe0a6a RS |
113 | support for the OpenFlow protocol for remote per-flow control of |
114 | traffic. | |
115 | ||
9b897c91 AA |
116 | %package selinux-policy |
117 | Summary: Open vSwitch SELinux policy | |
118 | License: ASL 2.0 | |
119 | BuildArch: noarch | |
120 | Requires: selinux-policy-targeted | |
121 | ||
122 | %description selinux-policy | |
123 | Tailored Open vSwitch SELinux policy | |
124 | ||
db8dcbaf | 125 | %package -n %{_py2}-openvswitch |
bb1a7ca2 | 126 | Summary: Open vSwitch python2 bindings |
9136f9bd FL |
127 | License: ASL 2.0 |
128 | BuildArch: noarch | |
db8dcbaf LM |
129 | Requires: %{_py2} |
130 | Requires: %{_py2}-six | |
131 | %{?python_provide:%python_provide python2-openvswitch = %{version}-%{release}} | |
132 | %description -n %{_py2}-openvswitch | |
bb1a7ca2 TR |
133 | Python bindings for the Open vSwitch database |
134 | ||
db8dcbaf | 135 | %if 0%{?fedora} > 22 || %{with build_python3} |
bb1a7ca2 TR |
136 | %package -n python3-openvswitch |
137 | Summary: Open vSwitch python3 bindings | |
138 | License: ASL 2.0 | |
139 | BuildArch: noarch | |
140 | Requires: python3 | |
141 | Requires: python3-six | |
db8dcbaf | 142 | %{?python_provide:%python_provide python3-openvswitch = %{version}-%{release}} |
bb1a7ca2 TR |
143 | |
144 | %description -n python3-openvswitch | |
9136f9bd | 145 | Python bindings for the Open vSwitch database |
db8dcbaf | 146 | %endif |
9136f9bd | 147 | |
f305420a FL |
148 | %package test |
149 | Summary: Open vSwitch testing utilities | |
150 | License: ASL 2.0 | |
151 | BuildArch: noarch | |
db8dcbaf LM |
152 | Requires: %{_py2}-openvswitch = %{version}-%{release} |
153 | Requires: %{_py2} %{_py2}-twisted | |
f305420a FL |
154 | |
155 | %description test | |
156 | Utilities that are useful to diagnose performance and connectivity | |
157 | issues in Open vSwitch setup. | |
158 | ||
3519fa08 FL |
159 | %package devel |
160 | Summary: Open vSwitch OpenFlow development package (library, headers) | |
161 | License: ASL 2.0 | |
162 | Provides: openvswitch-static = %{version}-%{release} | |
163 | ||
164 | %description devel | |
165 | This provides static library, libopenswitch.a and the openvswitch header | |
166 | files needed to build an external application. | |
167 | ||
0e12c2a4 | 168 | %package ovn-central |
c05ea879 RB |
169 | Summary: Open vSwitch - Open Virtual Network support |
170 | License: ASL 2.0 | |
0e12c2a4 | 171 | Requires: openvswitch openvswitch-ovn-common |
55f36be5 | 172 | Requires: firewalld-filesystem |
c05ea879 | 173 | |
0e12c2a4 | 174 | %description ovn-central |
c05ea879 RB |
175 | OVN, the Open Virtual Network, is a system to support virtual network |
176 | abstraction. OVN complements the existing capabilities of OVS to add | |
177 | native support for virtual network abstractions, such as virtual L2 and L3 | |
178 | overlays and security groups. | |
179 | ||
0e12c2a4 BS |
180 | %package ovn-host |
181 | Summary: Open vSwitch - Open Virtual Network support | |
182 | License: ASL 2.0 | |
183 | Requires: openvswitch openvswitch-ovn-common | |
55f36be5 | 184 | Requires: firewalld-filesystem |
0e12c2a4 BS |
185 | |
186 | %description ovn-host | |
187 | OVN, the Open Virtual Network, is a system to support virtual network | |
188 | abstraction. OVN complements the existing capabilities of OVS to add | |
189 | native support for virtual network abstractions, such as virtual L2 and L3 | |
190 | overlays and security groups. | |
191 | ||
192 | %package ovn-vtep | |
193 | Summary: Open vSwitch - Open Virtual Network support | |
194 | License: ASL 2.0 | |
195 | Requires: openvswitch openvswitch-ovn-common | |
196 | ||
197 | %description ovn-vtep | |
198 | OVN vtep controller | |
199 | ||
200 | %package ovn-common | |
201 | Summary: Open vSwitch - Open Virtual Network support | |
202 | License: ASL 2.0 | |
203 | Requires: openvswitch | |
204 | ||
205 | %description ovn-common | |
206 | Utilities that are use to diagnose and manage the OVN components. | |
207 | ||
208 | %package ovn-docker | |
209 | Summary: Open vSwitch - Open Virtual Network support | |
210 | License: ASL 2.0 | |
db8dcbaf | 211 | Requires: openvswitch openvswitch-ovn-common %{_py2}-openvswitch |
0e12c2a4 BS |
212 | |
213 | %description ovn-docker | |
214 | Docker network plugins for OVN. | |
3519fa08 | 215 | |
d8fe0a6a | 216 | %prep |
c1aadf4a | 217 | %setup -q |
d8fe0a6a RS |
218 | |
219 | %build | |
2ff63ae0 FL |
220 | %configure \ |
221 | %if %{with libcapng} | |
222 | --enable-libcapng \ | |
223 | %else | |
224 | --disable-libcapng \ | |
eea0cdb5 PM |
225 | %endif |
226 | %if %{with dpdk} | |
227 | --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \ | |
2ff63ae0 FL |
228 | %endif |
229 | --enable-ssl \ | |
230 | --with-pkidir=%{_sharedstatedir}/openvswitch/pki | |
231 | ||
dd6f26a9 | 232 | build-aux/dpdkstrip.py \ |
491a9d3b | 233 | %if %{with dpdk} |
234 | --dpdk \ | |
235 | %else | |
236 | --nodpdk \ | |
237 | %endif | |
238 | < rhel/usr_lib_systemd_system_ovs-vswitchd.service.in \ | |
239 | > rhel/usr_lib_systemd_system_ovs-vswitchd.service | |
240 | ||
6238c95d | 241 | make %{?_smp_mflags} |
ee29e9fe | 242 | make selinux-policy |
d8fe0a6a RS |
243 | |
244 | %install | |
245 | rm -rf $RPM_BUILD_ROOT | |
246 | make install DESTDIR=$RPM_BUILD_ROOT | |
95ca408c | 247 | |
2f4f43bf | 248 | install -d -m 0755 $RPM_BUILD_ROOT%{_rundir}/openvswitch |
03736a67 | 249 | install -d -m 0750 $RPM_BUILD_ROOT%{_localstatedir}/log/openvswitch |
1c9564eb | 250 | install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch |
95ca408c | 251 | |
ea5dbd79 | 252 | %if %{with dpdk} |
253 | install -p -D -m 0644 rhel/usr_lib_udev_rules.d_91-vfio.rules \ | |
254 | $RPM_BUILD_ROOT%{_prefix}/lib/udev/rules.d/91-vfio.rules | |
255 | %endif | |
256 | ||
c846a5b2 FL |
257 | install -p -D -m 0644 \ |
258 | rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \ | |
259 | $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/openvswitch | |
a694ead1 | 260 | for service in openvswitch ovsdb-server ovs-vswitchd ovs-delete-transient-ports \ |
ab4d55dc | 261 | ovn-controller ovn-controller-vtep ovn-northd; do |
c05ea879 RB |
262 | install -p -D -m 0644 \ |
263 | rhel/usr_lib_systemd_system_${service}.service \ | |
264 | $RPM_BUILD_ROOT%{_unitdir}/${service}.service | |
265 | done | |
fa0be8a4 | 266 | install -m 0755 rhel/etc_init.d_openvswitch \ |
d8fe0a6a | 267 | $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/openvswitch.init |
95ca408c | 268 | |
92d53574 | 269 | install -p -D -m 0644 rhel/etc_openvswitch_default.conf \ |
270 | $RPM_BUILD_ROOT/%{_sysconfdir}/openvswitch/default.conf | |
271 | ||
3d1d098c | 272 | install -p -D -m 0644 rhel/etc_logrotate.d_openvswitch \ |
4f98e02e | 273 | $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/openvswitch |
95ca408c | 274 | |
fa0be8a4 | 275 | install -m 0644 vswitchd/vswitch.ovsschema \ |
4f98e02e | 276 | $RPM_BUILD_ROOT/%{_datadir}/openvswitch/vswitch.ovsschema |
95ca408c | 277 | |
4f98e02e | 278 | install -d -m 0755 $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ |
d8fe0a6a | 279 | install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifdown-ovs \ |
4f98e02e | 280 | $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs |
d8fe0a6a | 281 | install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifup-ovs \ |
4f98e02e | 282 | $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs |
95ca408c | 283 | |
bb1a7ca2 | 284 | install -d -m 0755 $RPM_BUILD_ROOT%{python2_sitelib} |
bb1a7ca2 TR |
285 | cp -a $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/* \ |
286 | $RPM_BUILD_ROOT%{python2_sitelib} | |
db8dcbaf LM |
287 | |
288 | %if 0%{?fedora} > 22 || %{with build_python3} | |
289 | install -d -m 0755 $RPM_BUILD_ROOT%{python3_sitelib} | |
bb1a7ca2 TR |
290 | cp -a $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/ovs \ |
291 | $RPM_BUILD_ROOT%{python3_sitelib} | |
db8dcbaf LM |
292 | %endif |
293 | ||
bb1a7ca2 | 294 | rm -rf $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/ |
d8fe0a6a | 295 | |
fa0be8a4 | 296 | install -d -m 0755 $RPM_BUILD_ROOT/%{_sharedstatedir}/openvswitch |
d8fe0a6a | 297 | |
1c9564eb | 298 | touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/conf.db |
c1c7480b | 299 | touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/.conf.db.~lock~ |
1c9564eb FL |
300 | touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/system-id.conf |
301 | ||
9b897c91 AA |
302 | install -p -m 644 -D selinux/openvswitch-custom.pp \ |
303 | $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}/openvswitch-custom.pp | |
304 | ||
d5c2862a | 305 | install -d $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ |
4a546141 | 306 | install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-central-firewall-service.xml \ |
55f36be5 | 307 | $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ovn-central-firewall-service.xml |
4a546141 | 308 | install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-host-firewall-service.xml \ |
55f36be5 MM |
309 | $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ovn-host-firewall-service.xml |
310 | ||
f1ea8916 TR |
311 | install -d -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/ovn |
312 | ln -s %{_datadir}/openvswitch/scripts/ovndb-servers.ocf \ | |
313 | $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/ovn/ovndb-servers | |
314 | ||
ea36b046 TR |
315 | install -p -D -m 0755 \ |
316 | rhel/usr_share_openvswitch_scripts_ovs-systemd-reload \ | |
317 | $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/ovs-systemd-reload | |
318 | ||
1247b5a7 | 319 | # remove unpackaged files |
e7529141 | 320 | rm -f $RPM_BUILD_ROOT%{_bindir}/ovs-parse-backtrace \ |
1247b5a7 | 321 | $RPM_BUILD_ROOT%{_sbindir}/ovs-vlan-bug-workaround \ |
50e6c26f | 322 | $RPM_BUILD_ROOT%{_mandir}/man8/ovs-vlan-bug-workaround.8 |
1247b5a7 | 323 | |
329cf232 GS |
324 | %check |
325 | %if %{with check} | |
0d3f2152 | 326 | if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes; then :; |
329cf232 GS |
327 | else |
328 | cat tests/testsuite.log | |
329 | exit 1 | |
330 | fi | |
331 | %endif | |
8ef22bb1 LR |
332 | %if %{with check_datapath_kernel} |
333 | if make check-kernel RECHECK=yes; then :; | |
334 | else | |
335 | cat tests/system-kmod-testsuite.log | |
336 | exit 1 | |
337 | fi | |
338 | %endif | |
329cf232 | 339 | |
d8fe0a6a RS |
340 | %clean |
341 | rm -rf $RPM_BUILD_ROOT | |
342 | ||
343 | %preun | |
0447019d FL |
344 | %if 0%{?systemd_preun:1} |
345 | %systemd_preun %{name}.service | |
346 | %else | |
347 | if [ $1 -eq 0 ] ; then | |
0e12c2a4 | 348 | # Package removal, not upgrade |
0447019d FL |
349 | /bin/systemctl --no-reload disable %{name}.service >/dev/null 2>&1 || : |
350 | /bin/systemctl stop %{name}.service >/dev/null 2>&1 || : | |
351 | fi | |
352 | %endif | |
353 | ||
0e12c2a4 | 354 | %preun ovn-central |
c05ea879 | 355 | %if 0%{?systemd_preun:1} |
c05ea879 RB |
356 | %systemd_preun ovn-northd.service |
357 | %else | |
358 | if [ $1 -eq 0 ] ; then | |
0e12c2a4 BS |
359 | # Package removal, not upgrade |
360 | /bin/systemctl --no-reload disable ovn-northd.service >/dev/null 2>&1 || : | |
361 | /bin/systemctl stop ovn-northd.service >/dev/null 2>&1 || : | |
362 | fi | |
363 | %endif | |
364 | ||
365 | %preun ovn-host | |
366 | %if 0%{?systemd_preun:1} | |
367 | %systemd_preun ovn-controller.service | |
368 | %else | |
369 | if [ $1 -eq 0 ] ; then | |
370 | # Package removal, not upgrade | |
c05ea879 RB |
371 | /bin/systemctl --no-reload disable ovn-controller.service >/dev/null 2>&1 || : |
372 | /bin/systemctl stop ovn-controller.service >/dev/null 2>&1 || : | |
0e12c2a4 BS |
373 | fi |
374 | %endif | |
375 | ||
376 | %preun ovn-vtep | |
377 | %if 0%{?systemd_preun:1} | |
378 | %systemd_preun ovn-controller-vtep.service | |
379 | %else | |
380 | if [ $1 -eq 0 ] ; then | |
381 | # Package removal, not upgrade | |
ab4d55dc RB |
382 | /bin/systemctl --no-reload disable ovn-controller-vtep.service >/dev/null 2>&1 || : |
383 | /bin/systemctl stop ovn-controller-vtep.service >/dev/null 2>&1 || : | |
c05ea879 RB |
384 | fi |
385 | %endif | |
d8fe0a6a RS |
386 | |
387 | %post | |
ac416a3a | 388 | if [ $1 -eq 1 ]; then |
389 | getent passwd openvswitch >/dev/null || \ | |
390 | useradd -r -d / -s /sbin/nologin -c "Open vSwitch Daemons" openvswitch | |
391 | ||
392 | sed -i 's:^#OVS_USER_ID=:OVS_USER_ID=:' /etc/sysconfig/openvswitch | |
393 | ||
e3e738a3 | 394 | %if %{with dpdk} |
395 | getent group hugetlbfs >/dev/null || \ | |
396 | groupadd hugetlbfs | |
397 | usermod -a -G hugetlbfs openvswitch | |
398 | sed -i \ | |
399 | 's@OVS_USER_ID="openvswitch:openvswitch"@OVS_USER_ID="openvswitch:hugetlbfs"@'\ | |
400 | /etc/sysconfig/openvswitch | |
401 | %endif | |
402 | ||
ac416a3a | 403 | # In the case of upgrade, this is not needed. |
404 | chown -R openvswitch:openvswitch /etc/openvswitch | |
405 | fi | |
406 | ||
0447019d FL |
407 | %if 0%{?systemd_post:1} |
408 | %systemd_post %{name}.service | |
409 | %else | |
410 | # Package install, not upgrade | |
411 | if [ $1 -eq 1 ]; then | |
412 | /bin/systemctl daemon-reload >dev/null || : | |
413 | fi | |
414 | %endif | |
415 | ||
0e12c2a4 BS |
416 | %post ovn-central |
417 | %if 0%{?systemd_post:1} | |
418 | %systemd_post ovn-northd.service | |
419 | %else | |
420 | # Package install, not upgrade | |
421 | if [ $1 -eq 1 ]; then | |
422 | /bin/systemctl daemon-reload >dev/null || : | |
423 | fi | |
424 | %endif | |
425 | ||
426 | %post ovn-host | |
c05ea879 RB |
427 | %if 0%{?systemd_post:1} |
428 | %systemd_post ovn-controller.service | |
0e12c2a4 BS |
429 | %else |
430 | # Package install, not upgrade | |
431 | if [ $1 -eq 1 ]; then | |
432 | /bin/systemctl daemon-reload >dev/null || : | |
433 | fi | |
434 | %endif | |
435 | ||
436 | %post ovn-vtep | |
437 | %if 0%{?systemd_post:1} | |
ab4d55dc | 438 | %systemd_post ovn-controller-vtep.service |
c05ea879 RB |
439 | %else |
440 | # Package install, not upgrade | |
441 | if [ $1 -eq 1 ]; then | |
442 | /bin/systemctl daemon-reload >dev/null || : | |
443 | fi | |
444 | %endif | |
d8fe0a6a | 445 | |
9b897c91 AA |
446 | %post selinux-policy |
447 | /usr/sbin/semodule -i %{_datadir}/selinux/packages/%{name}/openvswitch-custom.pp &> /dev/null || : | |
448 | ||
d8fe0a6a | 449 | %postun |
5771f476 FL |
450 | %if 0%{?systemd_postun:1} |
451 | %systemd_postun %{name}.service | |
0447019d FL |
452 | %else |
453 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
0447019d FL |
454 | %endif |
455 | ||
0e12c2a4 | 456 | %postun ovn-central |
44dd4cc4 LR |
457 | %if 0%{?systemd_postun:1} |
458 | %systemd_postun ovn-northd.service | |
c05ea879 RB |
459 | %else |
460 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
0e12c2a4 BS |
461 | %endif |
462 | ||
463 | %postun ovn-host | |
44dd4cc4 LR |
464 | %if 0%{?systemd_postun:1} |
465 | %systemd_postun ovn-controller.service | |
0e12c2a4 BS |
466 | %else |
467 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
0e12c2a4 BS |
468 | %endif |
469 | ||
470 | %postun ovn-vtep | |
44dd4cc4 LR |
471 | %if 0%{?systemd_postun:1} |
472 | %systemd_postun ovn-controller-vtep.service | |
0e12c2a4 BS |
473 | %else |
474 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
c05ea879 | 475 | %endif |
d8fe0a6a | 476 | |
9b897c91 AA |
477 | %postun selinux-policy |
478 | if [ $1 -eq 0 ] ; then | |
479 | /usr/sbin/semodule -r openvswitch-custom &> /dev/null || : | |
480 | fi | |
481 | ||
482 | %files selinux-policy | |
483 | %defattr(-,root,root) | |
484 | %{_datadir}/selinux/packages/%{name}/openvswitch-custom.pp | |
485 | ||
db8dcbaf | 486 | %files -n %{_py2}-openvswitch |
bb1a7ca2 TR |
487 | %{python2_sitelib}/ovs |
488 | %doc COPYING | |
489 | ||
db8dcbaf | 490 | %if 0%{?fedora} > 22 || %{with build_python3} |
bb1a7ca2 TR |
491 | %files -n python3-openvswitch |
492 | %{python3_sitelib}/ovs | |
9136f9bd | 493 | %doc COPYING |
db8dcbaf | 494 | %endif |
9136f9bd | 495 | |
f305420a FL |
496 | %files test |
497 | %{_bindir}/ovs-test | |
498 | %{_bindir}/ovs-vlan-test | |
499 | %{_bindir}/ovs-l3ping | |
8647686e AC |
500 | %{_bindir}/ovs-pcap |
501 | %{_bindir}/ovs-tcpdump | |
502 | %{_bindir}/ovs-tcpundump | |
f305420a FL |
503 | %{_mandir}/man8/ovs-test.8* |
504 | %{_mandir}/man8/ovs-vlan-test.8* | |
505 | %{_mandir}/man8/ovs-l3ping.8* | |
8647686e AC |
506 | %{_mandir}/man1/ovs-pcap.1* |
507 | %{_mandir}/man8/ovs-tcpdump.8* | |
508 | %{_mandir}/man1/ovs-tcpundump.1* | |
bb1a7ca2 | 509 | %{python2_sitelib}/ovstest |
f305420a | 510 | |
3519fa08 FL |
511 | %files devel |
512 | %{_libdir}/*.a | |
513 | %{_libdir}/*.la | |
2fd84d5e | 514 | %{_libdir}/pkgconfig/*.pc |
3519fa08 FL |
515 | %{_includedir}/openvswitch/* |
516 | %{_includedir}/openflow/* | |
13a08aa9 | 517 | %{_includedir}/ovn/* |
3519fa08 | 518 | |
d8fe0a6a | 519 | %files |
951d79e6 | 520 | %defattr(-,openvswitch,openvswitch) |
1c9564eb | 521 | %dir %{_sysconfdir}/openvswitch |
92d53574 | 522 | %{_sysconfdir}/openvswitch/default.conf |
1c9564eb | 523 | %config %ghost %{_sysconfdir}/openvswitch/conf.db |
c1c7480b | 524 | %ghost %{_sysconfdir}/openvswitch/.conf.db.~lock~ |
1c9564eb FL |
525 | %config %ghost %{_sysconfdir}/openvswitch/system-id.conf |
526 | %config(noreplace) %{_sysconfdir}/sysconfig/openvswitch | |
951d79e6 TR |
527 | %defattr(-,root,root) |
528 | %{_sysconfdir}/bash_completion.d/ovs-appctl-bashcomp.bash | |
529 | %{_sysconfdir}/bash_completion.d/ovs-vsctl-bashcomp.bash | |
a7321a1f | 530 | %config(noreplace) %{_sysconfdir}/logrotate.d/openvswitch |
d8fe0a6a | 531 | %{_unitdir}/openvswitch.service |
4f621873 | 532 | %{_unitdir}/ovsdb-server.service |
84ad1208 | 533 | %{_unitdir}/ovs-vswitchd.service |
a694ead1 | 534 | %{_unitdir}/ovs-delete-transient-ports.service |
d8fe0a6a RS |
535 | %{_datadir}/openvswitch/scripts/openvswitch.init |
536 | %{_sysconfdir}/sysconfig/network-scripts/ifup-ovs | |
537 | %{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs | |
aa6ccca5 FL |
538 | %{_datadir}/openvswitch/bugtool-plugins/ |
539 | %{_datadir}/openvswitch/scripts/ovs-bugtool-* | |
540 | %{_datadir}/openvswitch/scripts/ovs-check-dead-ifs | |
541 | %{_datadir}/openvswitch/scripts/ovs-lib | |
50e6c26f | 542 | %{_datadir}/openvswitch/scripts/ovs-save |
aa6ccca5 FL |
543 | %{_datadir}/openvswitch/scripts/ovs-vtep |
544 | %{_datadir}/openvswitch/scripts/ovs-ctl | |
ea36b046 | 545 | %{_datadir}/openvswitch/scripts/ovs-systemd-reload |
aa6ccca5 FL |
546 | %config %{_datadir}/openvswitch/vswitch.ovsschema |
547 | %config %{_datadir}/openvswitch/vtep.ovsschema | |
5b88626a FL |
548 | %{_bindir}/ovs-appctl |
549 | %{_bindir}/ovs-docker | |
550 | %{_bindir}/ovs-dpctl | |
551 | %{_bindir}/ovs-dpctl-top | |
552 | %{_bindir}/ovs-ofctl | |
553 | %{_bindir}/ovs-vsctl | |
554 | %{_bindir}/ovsdb-client | |
555 | %{_bindir}/ovsdb-tool | |
556 | %{_bindir}/ovs-testcontroller | |
557 | %{_bindir}/ovs-pki | |
558 | %{_bindir}/vtep-ctl | |
f616ba3e FL |
559 | %{_sbindir}/ovs-bugtool |
560 | %{_sbindir}/ovs-vswitchd | |
561 | %{_sbindir}/ovsdb-server | |
a2f24d79 FL |
562 | %{_mandir}/man1/ovsdb-client.1* |
563 | %{_mandir}/man1/ovsdb-server.1* | |
564 | %{_mandir}/man1/ovsdb-tool.1* | |
6bb9b060 | 565 | %{_mandir}/man5/ovsdb-server.5* |
a2f24d79 | 566 | %{_mandir}/man5/ovs-vswitchd.conf.db.5* |
bfaf6352 | 567 | %{_mandir}/man5/ovsdb.5* |
a2f24d79 | 568 | %{_mandir}/man5/vtep.5* |
b81dc9a3 | 569 | %{_mandir}/man7/ovs-fields.7* |
bfaf6352 TR |
570 | %{_mandir}/man7/ovsdb.7* |
571 | %{_mandir}/man7/ovsdb-server.7* | |
a2f24d79 FL |
572 | %{_mandir}/man8/vtep-ctl.8* |
573 | %{_mandir}/man8/ovs-appctl.8* | |
574 | %{_mandir}/man8/ovs-bugtool.8* | |
575 | %{_mandir}/man8/ovs-ctl.8* | |
576 | %{_mandir}/man8/ovs-dpctl.8* | |
577 | %{_mandir}/man8/ovs-dpctl-top.8* | |
578 | %{_mandir}/man8/ovs-ofctl.8* | |
579 | %{_mandir}/man8/ovs-pki.8* | |
580 | %{_mandir}/man8/ovs-vsctl.8* | |
581 | %{_mandir}/man8/ovs-vswitchd.8* | |
582 | %{_mandir}/man8/ovs-parse-backtrace.8* | |
583 | %{_mandir}/man8/ovs-testcontroller.8* | |
ea5dbd79 | 584 | %if %{with dpdk} |
585 | %{_prefix}/lib/udev/rules.d/91-vfio.rules | |
586 | %endif | |
11e02906 | 587 | %doc COPYING NOTICE README.rst NEWS rhel/README.RHEL.rst |
d8fe0a6a | 588 | /var/lib/openvswitch |
94cd8383 | 589 | %attr(755,-,-) /var/log/openvswitch |
51542edd | 590 | %ghost %attr(755,root,root) %{_rundir}/openvswitch |
d8fe0a6a | 591 | |
0e12c2a4 | 592 | %files ovn-docker |
eaa923e3 GS |
593 | %{_bindir}/ovn-docker-overlay-driver |
594 | %{_bindir}/ovn-docker-underlay-driver | |
0e12c2a4 BS |
595 | |
596 | %files ovn-common | |
c05ea879 | 597 | %{_bindir}/ovn-nbctl |
600a8085 | 598 | %{_bindir}/ovn-sbctl |
f448e5a4 | 599 | %{_bindir}/ovn-trace |
3547a8c1 | 600 | %{_bindir}/ovn-detrace |
c05ea879 | 601 | %{_datadir}/openvswitch/scripts/ovn-ctl |
a4245b78 | 602 | %{_datadir}/openvswitch/scripts/ovndb-servers.ocf |
cfc6963c FL |
603 | %{_datadir}/openvswitch/scripts/ovn-bugtool-nbctl-show |
604 | %{_datadir}/openvswitch/scripts/ovn-bugtool-sbctl-lflow-list | |
605 | %{_datadir}/openvswitch/scripts/ovn-bugtool-sbctl-show | |
c05ea879 RB |
606 | %{_mandir}/man8/ovn-ctl.8* |
607 | %{_mandir}/man8/ovn-nbctl.8* | |
f448e5a4 | 608 | %{_mandir}/man8/ovn-trace.8* |
3547a8c1 | 609 | %{_mandir}/man1/ovn-detrace.1* |
0e12c2a4 | 610 | %{_mandir}/man7/ovn-architecture.7* |
600a8085 | 611 | %{_mandir}/man8/ovn-sbctl.8* |
0e12c2a4 BS |
612 | %{_mandir}/man5/ovn-nb.5* |
613 | %{_mandir}/man5/ovn-sb.5* | |
f1ea8916 | 614 | %{_prefix}/lib/ocf/resource.d/ovn/ovndb-servers |
0e12c2a4 BS |
615 | |
616 | %files ovn-central | |
617 | %{_bindir}/ovn-northd | |
618 | %{_mandir}/man8/ovn-northd.8* | |
c05ea879 RB |
619 | %config %{_datadir}/openvswitch/ovn-nb.ovsschema |
620 | %config %{_datadir}/openvswitch/ovn-sb.ovsschema | |
0e12c2a4 | 621 | %{_unitdir}/ovn-northd.service |
d5c2862a | 622 | %{_prefix}/lib/firewalld/services/ovn-central-firewall-service.xml |
0e12c2a4 BS |
623 | |
624 | %files ovn-host | |
625 | %{_bindir}/ovn-controller | |
626 | %{_mandir}/man8/ovn-controller.8* | |
c05ea879 | 627 | %{_unitdir}/ovn-controller.service |
d5c2862a | 628 | %{_prefix}/lib/firewalld/services/ovn-host-firewall-service.xml |
0e12c2a4 BS |
629 | |
630 | %files ovn-vtep | |
631 | %{_bindir}/ovn-controller-vtep | |
632 | %{_mandir}/man8/ovn-controller-vtep.8* | |
ab4d55dc | 633 | %{_unitdir}/ovn-controller-vtep.service |
c05ea879 | 634 | |
d8fe0a6a RS |
635 | %changelog |
636 | * Wed Jan 12 2011 Ralf Spenneberg <ralf@os-s.net> | |
637 | - First build on F14 |