]>
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 | |
f624bf23 | 95 | Requires(pre): shadow-utils |
108bcd6a | 96 | Requires(post): /bin/sed |
e3e738a3 | 97 | %if %{with dpdk} |
98 | Requires(post): /usr/sbin/usermod | |
99 | Requires(post): /usr/sbin/groupadd | |
100 | %endif | |
b33c6dca | 101 | Requires(post): systemd-units |
d8fe0a6a RS |
102 | Requires(preun): systemd-units |
103 | Requires(postun): systemd-units | |
f1b476c3 | 104 | Obsoletes: openvswitch-controller <= 0:2.1.0-1 |
d8fe0a6a | 105 | |
db8dcbaf | 106 | # to skip running checks, pass --without check |
329cf232 | 107 | %bcond_without check |
8ef22bb1 | 108 | %bcond_with check_datapath_kernel |
329cf232 | 109 | |
d8fe0a6a | 110 | %description |
6fcc7a7a | 111 | Open vSwitch provides standard network bridging functions and |
d8fe0a6a RS |
112 | support for the OpenFlow protocol for remote per-flow control of |
113 | traffic. | |
114 | ||
9b897c91 AA |
115 | %package selinux-policy |
116 | Summary: Open vSwitch SELinux policy | |
117 | License: ASL 2.0 | |
118 | BuildArch: noarch | |
119 | Requires: selinux-policy-targeted | |
120 | ||
121 | %description selinux-policy | |
122 | Tailored Open vSwitch SELinux policy | |
123 | ||
db8dcbaf | 124 | %package -n %{_py2}-openvswitch |
bb1a7ca2 | 125 | Summary: Open vSwitch python2 bindings |
9136f9bd FL |
126 | License: ASL 2.0 |
127 | BuildArch: noarch | |
db8dcbaf LM |
128 | Requires: %{_py2} |
129 | Requires: %{_py2}-six | |
130 | %{?python_provide:%python_provide python2-openvswitch = %{version}-%{release}} | |
131 | %description -n %{_py2}-openvswitch | |
bb1a7ca2 TR |
132 | Python bindings for the Open vSwitch database |
133 | ||
db8dcbaf | 134 | %if 0%{?fedora} > 22 || %{with build_python3} |
bb1a7ca2 TR |
135 | %package -n python3-openvswitch |
136 | Summary: Open vSwitch python3 bindings | |
137 | License: ASL 2.0 | |
138 | BuildArch: noarch | |
139 | Requires: python3 | |
140 | Requires: python3-six | |
db8dcbaf | 141 | %{?python_provide:%python_provide python3-openvswitch = %{version}-%{release}} |
bb1a7ca2 TR |
142 | |
143 | %description -n python3-openvswitch | |
9136f9bd | 144 | Python bindings for the Open vSwitch database |
db8dcbaf | 145 | %endif |
9136f9bd | 146 | |
f305420a FL |
147 | %package test |
148 | Summary: Open vSwitch testing utilities | |
149 | License: ASL 2.0 | |
150 | BuildArch: noarch | |
db8dcbaf LM |
151 | Requires: %{_py2}-openvswitch = %{version}-%{release} |
152 | Requires: %{_py2} %{_py2}-twisted | |
f305420a FL |
153 | |
154 | %description test | |
155 | Utilities that are useful to diagnose performance and connectivity | |
156 | issues in Open vSwitch setup. | |
157 | ||
3519fa08 FL |
158 | %package devel |
159 | Summary: Open vSwitch OpenFlow development package (library, headers) | |
160 | License: ASL 2.0 | |
161 | Provides: openvswitch-static = %{version}-%{release} | |
162 | ||
163 | %description devel | |
164 | This provides static library, libopenswitch.a and the openvswitch header | |
165 | files needed to build an external application. | |
166 | ||
0e12c2a4 | 167 | %package ovn-central |
c05ea879 RB |
168 | Summary: Open vSwitch - Open Virtual Network support |
169 | License: ASL 2.0 | |
0e12c2a4 | 170 | Requires: openvswitch openvswitch-ovn-common |
55f36be5 | 171 | Requires: firewalld-filesystem |
c05ea879 | 172 | |
0e12c2a4 | 173 | %description ovn-central |
c05ea879 RB |
174 | OVN, the Open Virtual Network, is a system to support virtual network |
175 | abstraction. OVN complements the existing capabilities of OVS to add | |
176 | native support for virtual network abstractions, such as virtual L2 and L3 | |
177 | overlays and security groups. | |
178 | ||
0e12c2a4 BS |
179 | %package ovn-host |
180 | Summary: Open vSwitch - Open Virtual Network support | |
181 | License: ASL 2.0 | |
182 | Requires: openvswitch openvswitch-ovn-common | |
55f36be5 | 183 | Requires: firewalld-filesystem |
0e12c2a4 BS |
184 | |
185 | %description ovn-host | |
186 | OVN, the Open Virtual Network, is a system to support virtual network | |
187 | abstraction. OVN complements the existing capabilities of OVS to add | |
188 | native support for virtual network abstractions, such as virtual L2 and L3 | |
189 | overlays and security groups. | |
190 | ||
191 | %package ovn-vtep | |
192 | Summary: Open vSwitch - Open Virtual Network support | |
193 | License: ASL 2.0 | |
194 | Requires: openvswitch openvswitch-ovn-common | |
195 | ||
196 | %description ovn-vtep | |
197 | OVN vtep controller | |
198 | ||
199 | %package ovn-common | |
200 | Summary: Open vSwitch - Open Virtual Network support | |
201 | License: ASL 2.0 | |
202 | Requires: openvswitch | |
203 | ||
204 | %description ovn-common | |
205 | Utilities that are use to diagnose and manage the OVN components. | |
206 | ||
207 | %package ovn-docker | |
208 | Summary: Open vSwitch - Open Virtual Network support | |
209 | License: ASL 2.0 | |
db8dcbaf | 210 | Requires: openvswitch openvswitch-ovn-common %{_py2}-openvswitch |
0e12c2a4 BS |
211 | |
212 | %description ovn-docker | |
213 | Docker network plugins for OVN. | |
3519fa08 | 214 | |
d8fe0a6a | 215 | %prep |
c1aadf4a | 216 | %setup -q |
d8fe0a6a RS |
217 | |
218 | %build | |
2ff63ae0 FL |
219 | %configure \ |
220 | %if %{with libcapng} | |
221 | --enable-libcapng \ | |
222 | %else | |
223 | --disable-libcapng \ | |
eea0cdb5 PM |
224 | %endif |
225 | %if %{with dpdk} | |
226 | --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \ | |
2ff63ae0 FL |
227 | %endif |
228 | --enable-ssl \ | |
229 | --with-pkidir=%{_sharedstatedir}/openvswitch/pki | |
230 | ||
dd6f26a9 | 231 | build-aux/dpdkstrip.py \ |
491a9d3b | 232 | %if %{with dpdk} |
233 | --dpdk \ | |
234 | %else | |
235 | --nodpdk \ | |
236 | %endif | |
237 | < rhel/usr_lib_systemd_system_ovs-vswitchd.service.in \ | |
238 | > rhel/usr_lib_systemd_system_ovs-vswitchd.service | |
239 | ||
6238c95d | 240 | make %{?_smp_mflags} |
ee29e9fe | 241 | make selinux-policy |
d8fe0a6a RS |
242 | |
243 | %install | |
244 | rm -rf $RPM_BUILD_ROOT | |
245 | make install DESTDIR=$RPM_BUILD_ROOT | |
95ca408c | 246 | |
2f4f43bf | 247 | install -d -m 0755 $RPM_BUILD_ROOT%{_rundir}/openvswitch |
03736a67 | 248 | install -d -m 0750 $RPM_BUILD_ROOT%{_localstatedir}/log/openvswitch |
1c9564eb | 249 | install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch |
95ca408c | 250 | |
ea5dbd79 | 251 | %if %{with dpdk} |
252 | install -p -D -m 0644 rhel/usr_lib_udev_rules.d_91-vfio.rules \ | |
253 | $RPM_BUILD_ROOT%{_prefix}/lib/udev/rules.d/91-vfio.rules | |
254 | %endif | |
255 | ||
c846a5b2 FL |
256 | install -p -D -m 0644 \ |
257 | rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \ | |
258 | $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/openvswitch | |
a694ead1 | 259 | for service in openvswitch ovsdb-server ovs-vswitchd ovs-delete-transient-ports \ |
ab4d55dc | 260 | ovn-controller ovn-controller-vtep ovn-northd; do |
c05ea879 RB |
261 | install -p -D -m 0644 \ |
262 | rhel/usr_lib_systemd_system_${service}.service \ | |
263 | $RPM_BUILD_ROOT%{_unitdir}/${service}.service | |
264 | done | |
fa0be8a4 | 265 | install -m 0755 rhel/etc_init.d_openvswitch \ |
d8fe0a6a | 266 | $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/openvswitch.init |
95ca408c | 267 | |
92d53574 | 268 | install -p -D -m 0644 rhel/etc_openvswitch_default.conf \ |
269 | $RPM_BUILD_ROOT/%{_sysconfdir}/openvswitch/default.conf | |
270 | ||
3d1d098c | 271 | install -p -D -m 0644 rhel/etc_logrotate.d_openvswitch \ |
4f98e02e | 272 | $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/openvswitch |
95ca408c | 273 | |
fa0be8a4 | 274 | install -m 0644 vswitchd/vswitch.ovsschema \ |
4f98e02e | 275 | $RPM_BUILD_ROOT/%{_datadir}/openvswitch/vswitch.ovsschema |
95ca408c | 276 | |
4f98e02e | 277 | install -d -m 0755 $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ |
d8fe0a6a | 278 | install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifdown-ovs \ |
4f98e02e | 279 | $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs |
d8fe0a6a | 280 | install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifup-ovs \ |
4f98e02e | 281 | $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs |
95ca408c | 282 | |
bb1a7ca2 | 283 | install -d -m 0755 $RPM_BUILD_ROOT%{python2_sitelib} |
bb1a7ca2 TR |
284 | cp -a $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/* \ |
285 | $RPM_BUILD_ROOT%{python2_sitelib} | |
db8dcbaf LM |
286 | |
287 | %if 0%{?fedora} > 22 || %{with build_python3} | |
288 | install -d -m 0755 $RPM_BUILD_ROOT%{python3_sitelib} | |
bb1a7ca2 TR |
289 | cp -a $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/ovs \ |
290 | $RPM_BUILD_ROOT%{python3_sitelib} | |
db8dcbaf LM |
291 | %endif |
292 | ||
bb1a7ca2 | 293 | rm -rf $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/ |
d8fe0a6a | 294 | |
fa0be8a4 | 295 | install -d -m 0755 $RPM_BUILD_ROOT/%{_sharedstatedir}/openvswitch |
d8fe0a6a | 296 | |
1c9564eb | 297 | touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/conf.db |
c1c7480b | 298 | touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/.conf.db.~lock~ |
1c9564eb FL |
299 | touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/system-id.conf |
300 | ||
9b897c91 AA |
301 | install -p -m 644 -D selinux/openvswitch-custom.pp \ |
302 | $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}/openvswitch-custom.pp | |
303 | ||
d5c2862a | 304 | install -d $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ |
4a546141 | 305 | install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-central-firewall-service.xml \ |
55f36be5 | 306 | $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ovn-central-firewall-service.xml |
4a546141 | 307 | install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-host-firewall-service.xml \ |
55f36be5 MM |
308 | $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ovn-host-firewall-service.xml |
309 | ||
f1ea8916 TR |
310 | install -d -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/ovn |
311 | ln -s %{_datadir}/openvswitch/scripts/ovndb-servers.ocf \ | |
312 | $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/ovn/ovndb-servers | |
313 | ||
ea36b046 TR |
314 | install -p -D -m 0755 \ |
315 | rhel/usr_share_openvswitch_scripts_ovs-systemd-reload \ | |
316 | $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/ovs-systemd-reload | |
317 | ||
1247b5a7 | 318 | # remove unpackaged files |
e7529141 | 319 | rm -f $RPM_BUILD_ROOT%{_bindir}/ovs-parse-backtrace \ |
1247b5a7 | 320 | $RPM_BUILD_ROOT%{_sbindir}/ovs-vlan-bug-workaround \ |
50e6c26f | 321 | $RPM_BUILD_ROOT%{_mandir}/man8/ovs-vlan-bug-workaround.8 |
1247b5a7 | 322 | |
329cf232 GS |
323 | %check |
324 | %if %{with check} | |
0d3f2152 | 325 | if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes; then :; |
329cf232 GS |
326 | else |
327 | cat tests/testsuite.log | |
328 | exit 1 | |
329 | fi | |
330 | %endif | |
8ef22bb1 LR |
331 | %if %{with check_datapath_kernel} |
332 | if make check-kernel RECHECK=yes; then :; | |
333 | else | |
334 | cat tests/system-kmod-testsuite.log | |
335 | exit 1 | |
336 | fi | |
337 | %endif | |
329cf232 | 338 | |
d8fe0a6a RS |
339 | %clean |
340 | rm -rf $RPM_BUILD_ROOT | |
341 | ||
342 | %preun | |
0447019d FL |
343 | %if 0%{?systemd_preun:1} |
344 | %systemd_preun %{name}.service | |
345 | %else | |
346 | if [ $1 -eq 0 ] ; then | |
0e12c2a4 | 347 | # Package removal, not upgrade |
0447019d FL |
348 | /bin/systemctl --no-reload disable %{name}.service >/dev/null 2>&1 || : |
349 | /bin/systemctl stop %{name}.service >/dev/null 2>&1 || : | |
350 | fi | |
351 | %endif | |
352 | ||
0e12c2a4 | 353 | %preun ovn-central |
c05ea879 | 354 | %if 0%{?systemd_preun:1} |
c05ea879 RB |
355 | %systemd_preun ovn-northd.service |
356 | %else | |
357 | if [ $1 -eq 0 ] ; then | |
0e12c2a4 BS |
358 | # Package removal, not upgrade |
359 | /bin/systemctl --no-reload disable ovn-northd.service >/dev/null 2>&1 || : | |
360 | /bin/systemctl stop ovn-northd.service >/dev/null 2>&1 || : | |
361 | fi | |
362 | %endif | |
363 | ||
364 | %preun ovn-host | |
365 | %if 0%{?systemd_preun:1} | |
366 | %systemd_preun ovn-controller.service | |
367 | %else | |
368 | if [ $1 -eq 0 ] ; then | |
369 | # Package removal, not upgrade | |
c05ea879 RB |
370 | /bin/systemctl --no-reload disable ovn-controller.service >/dev/null 2>&1 || : |
371 | /bin/systemctl stop ovn-controller.service >/dev/null 2>&1 || : | |
0e12c2a4 BS |
372 | fi |
373 | %endif | |
374 | ||
375 | %preun ovn-vtep | |
376 | %if 0%{?systemd_preun:1} | |
377 | %systemd_preun ovn-controller-vtep.service | |
378 | %else | |
379 | if [ $1 -eq 0 ] ; then | |
380 | # Package removal, not upgrade | |
ab4d55dc RB |
381 | /bin/systemctl --no-reload disable ovn-controller-vtep.service >/dev/null 2>&1 || : |
382 | /bin/systemctl stop ovn-controller-vtep.service >/dev/null 2>&1 || : | |
c05ea879 RB |
383 | fi |
384 | %endif | |
d8fe0a6a | 385 | |
f624bf23 AP |
386 | %pre |
387 | getent group openvswitch >/dev/null || groupadd -r openvswitch | |
388 | getent passwd openvswitch >/dev/null || \ | |
389 | useradd -r -g openvswitch -d / -s /sbin/nologin \ | |
390 | -c "Open vSwitch Daemons" openvswitch | |
391 | ||
392 | %if %{with dpdk} | |
393 | getent group hugetlbfs >/dev/null || groupadd hugetlbfs | |
394 | usermod -a -G hugetlbfs openvswitch | |
395 | %endif | |
396 | exit 0 | |
397 | ||
d8fe0a6a | 398 | %post |
ac416a3a | 399 | if [ $1 -eq 1 ]; then |
ac416a3a | 400 | sed -i 's:^#OVS_USER_ID=:OVS_USER_ID=:' /etc/sysconfig/openvswitch |
401 | ||
e3e738a3 | 402 | %if %{with dpdk} |
e3e738a3 | 403 | sed -i \ |
404 | 's@OVS_USER_ID="openvswitch:openvswitch"@OVS_USER_ID="openvswitch:hugetlbfs"@'\ | |
405 | /etc/sysconfig/openvswitch | |
406 | %endif | |
407 | ||
ac416a3a | 408 | # In the case of upgrade, this is not needed. |
409 | chown -R openvswitch:openvswitch /etc/openvswitch | |
410 | fi | |
411 | ||
0447019d FL |
412 | %if 0%{?systemd_post:1} |
413 | %systemd_post %{name}.service | |
414 | %else | |
415 | # Package install, not upgrade | |
416 | if [ $1 -eq 1 ]; then | |
417 | /bin/systemctl daemon-reload >dev/null || : | |
418 | fi | |
419 | %endif | |
420 | ||
0e12c2a4 BS |
421 | %post ovn-central |
422 | %if 0%{?systemd_post:1} | |
423 | %systemd_post ovn-northd.service | |
424 | %else | |
425 | # Package install, not upgrade | |
426 | if [ $1 -eq 1 ]; then | |
427 | /bin/systemctl daemon-reload >dev/null || : | |
428 | fi | |
429 | %endif | |
430 | ||
431 | %post ovn-host | |
c05ea879 RB |
432 | %if 0%{?systemd_post:1} |
433 | %systemd_post ovn-controller.service | |
0e12c2a4 BS |
434 | %else |
435 | # Package install, not upgrade | |
436 | if [ $1 -eq 1 ]; then | |
437 | /bin/systemctl daemon-reload >dev/null || : | |
438 | fi | |
439 | %endif | |
440 | ||
441 | %post ovn-vtep | |
442 | %if 0%{?systemd_post:1} | |
ab4d55dc | 443 | %systemd_post ovn-controller-vtep.service |
c05ea879 RB |
444 | %else |
445 | # Package install, not upgrade | |
446 | if [ $1 -eq 1 ]; then | |
447 | /bin/systemctl daemon-reload >dev/null || : | |
448 | fi | |
449 | %endif | |
d8fe0a6a | 450 | |
9b897c91 AA |
451 | %post selinux-policy |
452 | /usr/sbin/semodule -i %{_datadir}/selinux/packages/%{name}/openvswitch-custom.pp &> /dev/null || : | |
453 | ||
d8fe0a6a | 454 | %postun |
5771f476 FL |
455 | %if 0%{?systemd_postun:1} |
456 | %systemd_postun %{name}.service | |
0447019d FL |
457 | %else |
458 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
0447019d FL |
459 | %endif |
460 | ||
0e12c2a4 | 461 | %postun ovn-central |
44dd4cc4 LR |
462 | %if 0%{?systemd_postun:1} |
463 | %systemd_postun ovn-northd.service | |
c05ea879 RB |
464 | %else |
465 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
0e12c2a4 BS |
466 | %endif |
467 | ||
468 | %postun ovn-host | |
44dd4cc4 LR |
469 | %if 0%{?systemd_postun:1} |
470 | %systemd_postun ovn-controller.service | |
0e12c2a4 BS |
471 | %else |
472 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
0e12c2a4 BS |
473 | %endif |
474 | ||
475 | %postun ovn-vtep | |
44dd4cc4 LR |
476 | %if 0%{?systemd_postun:1} |
477 | %systemd_postun ovn-controller-vtep.service | |
0e12c2a4 BS |
478 | %else |
479 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
c05ea879 | 480 | %endif |
d8fe0a6a | 481 | |
9b897c91 AA |
482 | %postun selinux-policy |
483 | if [ $1 -eq 0 ] ; then | |
484 | /usr/sbin/semodule -r openvswitch-custom &> /dev/null || : | |
485 | fi | |
486 | ||
487 | %files selinux-policy | |
488 | %defattr(-,root,root) | |
489 | %{_datadir}/selinux/packages/%{name}/openvswitch-custom.pp | |
490 | ||
db8dcbaf | 491 | %files -n %{_py2}-openvswitch |
bb1a7ca2 | 492 | %{python2_sitelib}/ovs |
bb1a7ca2 | 493 | |
db8dcbaf | 494 | %if 0%{?fedora} > 22 || %{with build_python3} |
bb1a7ca2 TR |
495 | %files -n python3-openvswitch |
496 | %{python3_sitelib}/ovs | |
db8dcbaf | 497 | %endif |
9136f9bd | 498 | |
f305420a FL |
499 | %files test |
500 | %{_bindir}/ovs-test | |
501 | %{_bindir}/ovs-vlan-test | |
502 | %{_bindir}/ovs-l3ping | |
8647686e AC |
503 | %{_bindir}/ovs-pcap |
504 | %{_bindir}/ovs-tcpdump | |
505 | %{_bindir}/ovs-tcpundump | |
f305420a FL |
506 | %{_mandir}/man8/ovs-test.8* |
507 | %{_mandir}/man8/ovs-vlan-test.8* | |
508 | %{_mandir}/man8/ovs-l3ping.8* | |
8647686e AC |
509 | %{_mandir}/man1/ovs-pcap.1* |
510 | %{_mandir}/man8/ovs-tcpdump.8* | |
511 | %{_mandir}/man1/ovs-tcpundump.1* | |
bb1a7ca2 | 512 | %{python2_sitelib}/ovstest |
f305420a | 513 | |
3519fa08 FL |
514 | %files devel |
515 | %{_libdir}/*.a | |
516 | %{_libdir}/*.la | |
2fd84d5e | 517 | %{_libdir}/pkgconfig/*.pc |
3519fa08 FL |
518 | %{_includedir}/openvswitch/* |
519 | %{_includedir}/openflow/* | |
13a08aa9 | 520 | %{_includedir}/ovn/* |
3519fa08 | 521 | |
d8fe0a6a | 522 | %files |
951d79e6 | 523 | %defattr(-,openvswitch,openvswitch) |
1c9564eb | 524 | %dir %{_sysconfdir}/openvswitch |
92d53574 | 525 | %{_sysconfdir}/openvswitch/default.conf |
1c9564eb | 526 | %config %ghost %{_sysconfdir}/openvswitch/conf.db |
c1c7480b | 527 | %ghost %{_sysconfdir}/openvswitch/.conf.db.~lock~ |
1c9564eb FL |
528 | %config %ghost %{_sysconfdir}/openvswitch/system-id.conf |
529 | %config(noreplace) %{_sysconfdir}/sysconfig/openvswitch | |
951d79e6 TR |
530 | %defattr(-,root,root) |
531 | %{_sysconfdir}/bash_completion.d/ovs-appctl-bashcomp.bash | |
532 | %{_sysconfdir}/bash_completion.d/ovs-vsctl-bashcomp.bash | |
a7321a1f | 533 | %config(noreplace) %{_sysconfdir}/logrotate.d/openvswitch |
d8fe0a6a | 534 | %{_unitdir}/openvswitch.service |
4f621873 | 535 | %{_unitdir}/ovsdb-server.service |
84ad1208 | 536 | %{_unitdir}/ovs-vswitchd.service |
a694ead1 | 537 | %{_unitdir}/ovs-delete-transient-ports.service |
d8fe0a6a RS |
538 | %{_datadir}/openvswitch/scripts/openvswitch.init |
539 | %{_sysconfdir}/sysconfig/network-scripts/ifup-ovs | |
540 | %{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs | |
aa6ccca5 FL |
541 | %{_datadir}/openvswitch/bugtool-plugins/ |
542 | %{_datadir}/openvswitch/scripts/ovs-bugtool-* | |
543 | %{_datadir}/openvswitch/scripts/ovs-check-dead-ifs | |
544 | %{_datadir}/openvswitch/scripts/ovs-lib | |
50e6c26f | 545 | %{_datadir}/openvswitch/scripts/ovs-save |
aa6ccca5 FL |
546 | %{_datadir}/openvswitch/scripts/ovs-vtep |
547 | %{_datadir}/openvswitch/scripts/ovs-ctl | |
ea36b046 | 548 | %{_datadir}/openvswitch/scripts/ovs-systemd-reload |
aa6ccca5 FL |
549 | %config %{_datadir}/openvswitch/vswitch.ovsschema |
550 | %config %{_datadir}/openvswitch/vtep.ovsschema | |
5b88626a FL |
551 | %{_bindir}/ovs-appctl |
552 | %{_bindir}/ovs-docker | |
553 | %{_bindir}/ovs-dpctl | |
554 | %{_bindir}/ovs-dpctl-top | |
555 | %{_bindir}/ovs-ofctl | |
556 | %{_bindir}/ovs-vsctl | |
557 | %{_bindir}/ovsdb-client | |
558 | %{_bindir}/ovsdb-tool | |
559 | %{_bindir}/ovs-testcontroller | |
560 | %{_bindir}/ovs-pki | |
561 | %{_bindir}/vtep-ctl | |
f616ba3e FL |
562 | %{_sbindir}/ovs-bugtool |
563 | %{_sbindir}/ovs-vswitchd | |
564 | %{_sbindir}/ovsdb-server | |
a2f24d79 FL |
565 | %{_mandir}/man1/ovsdb-client.1* |
566 | %{_mandir}/man1/ovsdb-server.1* | |
567 | %{_mandir}/man1/ovsdb-tool.1* | |
6bb9b060 | 568 | %{_mandir}/man5/ovsdb-server.5* |
a2f24d79 | 569 | %{_mandir}/man5/ovs-vswitchd.conf.db.5* |
bfaf6352 | 570 | %{_mandir}/man5/ovsdb.5* |
a2f24d79 | 571 | %{_mandir}/man5/vtep.5* |
b81dc9a3 | 572 | %{_mandir}/man7/ovs-fields.7* |
bfaf6352 TR |
573 | %{_mandir}/man7/ovsdb.7* |
574 | %{_mandir}/man7/ovsdb-server.7* | |
a2f24d79 FL |
575 | %{_mandir}/man8/vtep-ctl.8* |
576 | %{_mandir}/man8/ovs-appctl.8* | |
577 | %{_mandir}/man8/ovs-bugtool.8* | |
578 | %{_mandir}/man8/ovs-ctl.8* | |
579 | %{_mandir}/man8/ovs-dpctl.8* | |
580 | %{_mandir}/man8/ovs-dpctl-top.8* | |
581 | %{_mandir}/man8/ovs-ofctl.8* | |
582 | %{_mandir}/man8/ovs-pki.8* | |
583 | %{_mandir}/man8/ovs-vsctl.8* | |
584 | %{_mandir}/man8/ovs-vswitchd.8* | |
585 | %{_mandir}/man8/ovs-parse-backtrace.8* | |
586 | %{_mandir}/man8/ovs-testcontroller.8* | |
ea5dbd79 | 587 | %if %{with dpdk} |
588 | %{_prefix}/lib/udev/rules.d/91-vfio.rules | |
589 | %endif | |
888cf44d | 590 | %doc NOTICE README.rst NEWS rhel/README.RHEL.rst |
d8fe0a6a | 591 | /var/lib/openvswitch |
94cd8383 | 592 | %attr(755,-,-) /var/log/openvswitch |
51542edd | 593 | %ghost %attr(755,root,root) %{_rundir}/openvswitch |
d8fe0a6a | 594 | |
0e12c2a4 | 595 | %files ovn-docker |
eaa923e3 GS |
596 | %{_bindir}/ovn-docker-overlay-driver |
597 | %{_bindir}/ovn-docker-underlay-driver | |
0e12c2a4 BS |
598 | |
599 | %files ovn-common | |
c05ea879 | 600 | %{_bindir}/ovn-nbctl |
600a8085 | 601 | %{_bindir}/ovn-sbctl |
f448e5a4 | 602 | %{_bindir}/ovn-trace |
3547a8c1 | 603 | %{_bindir}/ovn-detrace |
c05ea879 | 604 | %{_datadir}/openvswitch/scripts/ovn-ctl |
a4245b78 | 605 | %{_datadir}/openvswitch/scripts/ovndb-servers.ocf |
cfc6963c FL |
606 | %{_datadir}/openvswitch/scripts/ovn-bugtool-nbctl-show |
607 | %{_datadir}/openvswitch/scripts/ovn-bugtool-sbctl-lflow-list | |
608 | %{_datadir}/openvswitch/scripts/ovn-bugtool-sbctl-show | |
c05ea879 RB |
609 | %{_mandir}/man8/ovn-ctl.8* |
610 | %{_mandir}/man8/ovn-nbctl.8* | |
f448e5a4 | 611 | %{_mandir}/man8/ovn-trace.8* |
3547a8c1 | 612 | %{_mandir}/man1/ovn-detrace.1* |
0e12c2a4 | 613 | %{_mandir}/man7/ovn-architecture.7* |
600a8085 | 614 | %{_mandir}/man8/ovn-sbctl.8* |
0e12c2a4 BS |
615 | %{_mandir}/man5/ovn-nb.5* |
616 | %{_mandir}/man5/ovn-sb.5* | |
f1ea8916 | 617 | %{_prefix}/lib/ocf/resource.d/ovn/ovndb-servers |
0e12c2a4 BS |
618 | |
619 | %files ovn-central | |
620 | %{_bindir}/ovn-northd | |
621 | %{_mandir}/man8/ovn-northd.8* | |
c05ea879 RB |
622 | %config %{_datadir}/openvswitch/ovn-nb.ovsschema |
623 | %config %{_datadir}/openvswitch/ovn-sb.ovsschema | |
0e12c2a4 | 624 | %{_unitdir}/ovn-northd.service |
d5c2862a | 625 | %{_prefix}/lib/firewalld/services/ovn-central-firewall-service.xml |
0e12c2a4 BS |
626 | |
627 | %files ovn-host | |
628 | %{_bindir}/ovn-controller | |
629 | %{_mandir}/man8/ovn-controller.8* | |
c05ea879 | 630 | %{_unitdir}/ovn-controller.service |
d5c2862a | 631 | %{_prefix}/lib/firewalld/services/ovn-host-firewall-service.xml |
0e12c2a4 BS |
632 | |
633 | %files ovn-vtep | |
634 | %{_bindir}/ovn-controller-vtep | |
635 | %{_mandir}/man8/ovn-controller-vtep.8* | |
ab4d55dc | 636 | %{_unitdir}/ovn-controller-vtep.service |
c05ea879 | 637 | |
d8fe0a6a RS |
638 | %changelog |
639 | * Wed Jan 12 2011 Ralf Spenneberg <ralf@os-s.net> | |
640 | - First build on F14 |