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