1 # Spec file for Open vSwitch.
3 # Copyright (C) 2009, 2010, 2013, 2014 Nicira Networks, Inc.
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.
10 # If tests have to be skipped while building, specify the '--without check'
11 # option. For example:
12 # rpmbuild -bb --without check rhel/openvswitch-fedora.spec
14 #%define kernel 2.6.40.4-5.fc15.x86_64
18 Group: System Environment
/Daemons
19 URL: http
://www.openvswitch.org
/
22 # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the
23 # lib/sflow*.[ch] files are SISSL
24 # datapath/ is GPLv2 (although not built into any of the binary packages)
25 # python/compat is Python (although not built into any of the binary packages)
26 License: ASL
2.0 and LGPLv2
+ and SISSL
28 Source: http
://openvswitch.org
/releases
/%{name}-%{version}.tar.gz
30 BuildRequires
: autoconf
31 BuildRequires
: systemd
-units openssl openssl
-devel
32 BuildRequires
: python python
-twisted
-core python
-zope
-interface PyQt4
33 BuildRequires
: desktop
-file
-utils
34 BuildRequires
: groff graphviz
36 Requires: openssl iproute module
-init
-tools
37 #Upstream kernel commit 4f647e0a3c37b8d5086214128614a136064110c3
38 Requires: kernel
>= 3.15.0-0
40 Requires(post
): systemd
-units
41 Requires(preun
): systemd
-units
42 Requires(postun
): systemd
-units
47 Open vSwitch provides standard network bridging functions and
48 support
for the OpenFlow protocol
for remote per
-flow control of
52 %setup -q
-n openvswitch
-%{version}
55 %configure --enable-ssl
--with
-pkidir
=%{_sharedstatedir}/openvswitch
/pki
59 rm -rf $RPM_BUILD_ROOT
60 make install DESTDIR
=$RPM_BUILD_ROOT
61 install -d
-m
755 $RPM_BUILD_ROOT
/etc
62 install -d
-m
755 $RPM_BUILD_ROOT
/etc
/openvswitch
63 install -p
-D
-m
0644 rhel
/usr_lib_systemd_system_openvswitch.service \
64 $RPM_BUILD_ROOT
%{_unitdir}/openvswitch.service
65 install -p
-D
-m
0644 rhel
/usr_lib_systemd_system_openvswitch
-nonetwork.service \
66 $RPM_BUILD_ROOT
%{_unitdir}/openvswitch
-nonetwork.service
67 install -m
755 rhel
/etc_init.d_openvswitch \
68 $RPM_BUILD_ROOT
%{_datadir}/openvswitch
/scripts
/openvswitch.init
69 install -d
-m
755 $RPM_BUILD_ROOT
/etc
/sysconfig
70 install -d
-m
755 $RPM_BUILD_ROOT
/etc
/logrotate.d
71 install -m
755 rhel
/etc_logrotate.d_openvswitch \
72 $RPM_BUILD_ROOT
/etc
/logrotate.d
/openvswitch
73 install -d
-m
755 $RPM_BUILD_ROOT
/etc
/profile.d
74 install -m
644 vswitchd
/vswitch.ovsschema \
75 $RPM_BUILD_ROOT
/usr
/share
/openvswitch
/vswitch.ovsschema
76 install -d
-m
755 $RPM_BUILD_ROOT
/usr
/share
/openvswitch
/scripts
77 install -d
-m
0755 $RPM_BUILD_ROOT
/etc
/sysconfig
/network
-scripts
/
78 install -p
-m
0755 rhel
/etc_sysconfig_network
-scripts_ifdown
-ovs \
79 $RPM_BUILD_ROOT
/etc
/sysconfig
/network
-scripts
/ifdown
-ovs
80 install -p
-m
0755 rhel
/etc_sysconfig_network
-scripts_ifup
-ovs \
81 $RPM_BUILD_ROOT
/etc
/sysconfig
/network
-scripts
/ifup
-ovs
82 install -p
-D
-m
0644 rhel
/usr_share_openvswitch_scripts_systemd_sysconfig.template \
83 $RPM_BUILD_ROOT
/etc
/sysconfig
/openvswitch
84 install -d
-m
755 $RPM_BUILD_ROOT
/usr
/share
/openvswitch
/scripts
86 install python
/compat
/uuid.py $RPM_BUILD_ROOT
/usr
/share
/openvswitch
/python
87 install python
/compat
/argparse.py $RPM_BUILD_ROOT
/usr
/share
/openvswitch
/python
89 install -d
-m
755 $RPM_BUILD_ROOT
/var
/lib
/openvswitch
91 # Get rid of stuff we don't want to make RPM happy.
92 (cd "$RPM_BUILD_ROOT"
&& rm -f usr
/lib
/lib
*)
96 if make check TESTSUITEFLAGS
='
%{_smp_mflags}' ||
97 make check TESTSUITEFLAGS
='
--recheck'
; then :;
99 cat tests
/testsuite.log
105 rm -rf $RPM_BUILD_ROOT
108 # Package removal, not upgrade
109 systemctl stop openvswitch.service
110 systemctl disable openvswitch.service
113 if test ! -e
/etc
/openvswitch
/conf.db
; then
114 install -d
-m
755 -o root
-g root
/etc
/openvswitch
116 # Create ovs-vswitchd config database
117 ovsdb
-tool
-vANY
:console
:emer create
/etc
/openvswitch
/conf.db \
118 /usr
/share
/openvswitch
/vswitch.ovsschema
120 # Create initial table in config database
121 ovsdb
-tool
-vANY
:console
:emer transact
/etc
/openvswitch
/conf.db \
122 '
[{"op"
: "insert"
, "table"
: "Open_vSwitch"
, "row"
: {}}]' \
125 # Initial installation
126 systemctl
enable openvswitch.service
127 systemctl start openvswitch.service
132 %defattr(-,root
,root
)
133 %config /etc
/sysconfig
/openvswitch
134 %config /etc
/logrotate.d
/openvswitch
135 %{_unitdir}/openvswitch.service
136 %{_unitdir}/openvswitch
-nonetwork.service
137 %{_datadir}/openvswitch
/scripts
/openvswitch.init
138 %{_sysconfdir}/sysconfig
/network
-scripts
/ifup
-ovs
139 %{_sysconfdir}/sysconfig
/network
-scripts
/ifdown
-ovs
140 /usr
/share
/openvswitch
/bugtool
-plugins
/
141 /usr
/share
/openvswitch
/python
/ovs
/__init__.py
*
142 /usr
/share
/openvswitch
/python
/ovs
/daemon.py
*
143 /usr
/share
/openvswitch
/python
/ovs
/db
/__init__.py
*
144 /usr
/share
/openvswitch
/python
/ovs
/db
/data.py
*
145 /usr
/share
/openvswitch
/python
/ovs
/db
/error.py
*
146 /usr
/share
/openvswitch
/python
/ovs
/db
/idl.py
*
147 /usr
/share
/openvswitch
/python
/ovs
/db
/parser.py
*
148 /usr
/share
/openvswitch
/python
/ovs
/db
/schema.py
*
149 /usr
/share
/openvswitch
/python
/ovs
/db
/types.py
*
150 /usr
/share
/openvswitch
/python
/ovs
/dirs.py
*
151 /usr
/share
/openvswitch
/python
/ovs
/fatal_signal.py
*
152 /usr
/share
/openvswitch
/python
/ovs
/json.py
*
153 /usr
/share
/openvswitch
/python
/ovs
/jsonrpc.py
*
154 /usr
/share
/openvswitch
/python
/ovs
/ovsuuid.py
*
155 /usr
/share
/openvswitch
/python
/ovs
/poller.py
*
156 /usr
/share
/openvswitch
/python
/ovs
/process.py
*
157 /usr
/share
/openvswitch
/python
/ovs
/reconnect.py
*
158 /usr
/share
/openvswitch
/python
/ovs
/socket_util.py
*
159 /usr
/share
/openvswitch
/python
/ovs
/stream.py
*
160 /usr
/share
/openvswitch
/python
/ovs
/timeval.py
*
161 /usr
/share
/openvswitch
/python
/ovs
/util.py
*
162 /usr
/share
/openvswitch
/python
/ovs
/version.py
*
163 /usr
/share
/openvswitch
/python
/ovs
/unixctl
/__init__.py
*
164 /usr
/share
/openvswitch
/python
/ovs
/unixctl
/client.py
*
165 /usr
/share
/openvswitch
/python
/ovs
/unixctl
/server.py
*
166 /usr
/share
/openvswitch
/python
/uuid.py
*
167 /usr
/share
/openvswitch
/python
/argparse.py
*
168 /usr
/share
/openvswitch
/python
/ovs
/vlog.py
*
169 /usr
/share
/openvswitch
/python
/ovstest
/__init__.py
*
170 /usr
/share
/openvswitch
/python
/ovstest
/args.py
*
171 /usr
/share
/openvswitch
/python
/ovstest
/rpcserver.py
*
172 /usr
/share
/openvswitch
/python
/ovstest
/tcp.py
*
173 /usr
/share
/openvswitch
/python
/ovstest
/udp.py
*
174 /usr
/share
/openvswitch
/python
/ovstest
/util.py
*
175 /usr
/share
/openvswitch
/python
/ovstest
/vswitch.py
*
176 /usr
/share
/openvswitch
/python
/ovstest
/tests.py
*
177 /usr
/share
/openvswitch
/scripts
/ovs
-bugtool
-*
178 /usr
/share
/openvswitch
/scripts
/ovs
-check
-dead
-ifs
179 /usr
/share
/openvswitch
/scripts
/ovs
-lib
180 /usr
/share
/openvswitch
/scripts
/ovs
-vtep
181 %config /usr
/share
/openvswitch
/vswitch.ovsschema
182 %config /usr
/share
/openvswitch
/vtep.ovsschema
183 /usr
/sbin
/ovs
-bugtool
184 /usr
/sbin
/ovs
-vswitchd
185 /usr
/sbin
/ovsdb
-server
189 /usr
/bin
/ovs
-dpctl
-top
192 /usr
/bin
/ovsdb
-client
194 /usr
/bin
/ovs
-testcontroller
199 %doc /usr
/share
/man
/man8
/ovs
-testcontroller
.8.gz
200 %doc /usr
/share
/man
/man8
/ovs
-pki
.8.gz
201 %doc /usr
/share
/man
/man1
/ovsdb
-client
.1.gz
202 %doc /usr
/share
/man
/man1
/ovsdb
-server
.1.gz
203 %doc /usr
/share
/man
/man1
/ovsdb
-tool
.1.gz
204 %doc /usr
/share
/man
/man5
/ovs
-vswitchd.conf.db
.5.gz
205 %doc /usr
/share
/man
/man5
/vtep
.5.gz
206 %doc /usr
/share
/man
/man8
/ovs
-appctl
.8.gz
207 %doc /usr
/share
/man
/man8
/ovs
-bugtool
.8.gz
208 %doc /usr
/share
/man
/man8
/ovs
-ctl
.8.gz
209 %doc /usr
/share
/man
/man8
/ovs
-dpctl
.8.gz
210 %doc /usr
/share
/man
/man8
/ovs
-dpctl
-top
.8.gz
211 %doc /usr
/share
/man
/man8
/ovs
-ofctl
.8.gz
212 %doc /usr
/share
/man
/man8
/ovs
-parse
-backtrace
.8.gz
213 %doc /usr
/share
/man
/man8
/ovs
-vsctl
.8.gz
214 %doc /usr
/share
/man
/man8
/ovs
-vswitchd
.8.gz
215 %doc /usr
/share
/man
/man8
/ovs
-test.8.gz
216 %doc /usr
/share
/man
/man8
/ovs
-l3ping
.8.gz
217 %doc /usr
/share
/man
/man8
/vtep
-ctl
.8.gz
218 %doc COPYING DESIGN.md INSTALL.SSL.md NOTICE README.md WHY
-OVS.md FAQ.md NEWS INSTALL.DPDK.md
221 /usr
/share
/openvswitch
/scripts
/ovs
-ctl
222 %exclude /etc
/openvswitch
223 %exclude /usr
/bin
/ovs
-benchmark
224 %exclude /usr
/bin
/ovs
-parse
-backtrace
225 %exclude /usr
/bin
/ovs
-pcap
226 %exclude /usr
/bin
/ovs
-tcpundump
227 %exclude /usr
/bin
/ovs
-vlan
-test
228 %exclude /usr
/sbin
/ovs
-vlan
-bug
-workaround
229 %exclude /usr
/share
/man
/man1
/ovs
-benchmark
.1.gz
230 %exclude /usr
/share
/man
/man1
/ovs
-pcap
.1.gz
231 %exclude /usr
/share
/man
/man1
/ovs
-tcpundump
.1.gz
232 %exclude /usr
/share
/man
/man8
/ovs
-vlan
-bug
-workaround
.8.gz
233 %exclude /usr
/share
/man
/man8
/ovs
-vlan
-test.8.gz
234 %exclude /usr
/share
/openvswitch
/scripts
/ovs
-save
237 * Wed Jan
12 2011 Ralf Spenneberg
<ralf@os
-s.net
>