2012-10-02 14:31:55 -04:00
|
|
|
# Spec file for Open vSwitch.
|
|
|
|
|
2014-05-01 08:10:20 -07:00
|
|
|
# Copyright (C) 2009, 2010, 2013, 2014 Nicira Networks, Inc.
|
2012-10-02 14:31:55 -04:00
|
|
|
#
|
|
|
|
# Copying and distribution of this file, with or without modification,
|
|
|
|
# are permitted in any medium without royalty provided the copyright
|
|
|
|
# notice and this notice are preserved. This file is offered as-is,
|
|
|
|
# without warranty of any kind.
|
2014-06-23 14:05:00 -07:00
|
|
|
#
|
|
|
|
# If tests have to be skipped while building, specify the '--without check'
|
|
|
|
# option. For example:
|
|
|
|
# rpmbuild -bb --without check rhel/openvswitch-fedora.spec
|
2012-10-02 14:31:55 -04:00
|
|
|
|
|
|
|
#%define kernel 2.6.40.4-5.fc15.x86_64
|
|
|
|
|
|
|
|
Name: openvswitch
|
|
|
|
Summary: Open vSwitch
|
|
|
|
Group: System Environment/Daemons
|
|
|
|
URL: http://www.openvswitch.org/
|
|
|
|
Version: @VERSION@
|
|
|
|
|
2014-11-06 16:45:19 -02:00
|
|
|
# Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the
|
|
|
|
# lib/sflow*.[ch] files are SISSL
|
|
|
|
# datapath/ is GPLv2 (although not built into any of the binary packages)
|
|
|
|
# python/compat is Python (although not built into any of the binary packages)
|
|
|
|
License: ASL 2.0 and LGPLv2+ and SISSL
|
2012-10-02 14:31:55 -04:00
|
|
|
Release: 1%{?dist}
|
2014-11-06 16:45:22 -02:00
|
|
|
Source: http://openvswitch.org/releases/%{name}-%{version}.tar.gz
|
2012-10-02 14:31:55 -04:00
|
|
|
|
2014-11-06 16:45:23 -02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: systemd-units openssl openssl-devel
|
|
|
|
BuildRequires: python python-twisted-core python-zope-interface PyQt4
|
|
|
|
BuildRequires: desktop-file-utils
|
|
|
|
BuildRequires: groff graphviz
|
|
|
|
|
2014-11-06 16:45:24 -02:00
|
|
|
Requires(post): systemd-units
|
2012-10-02 14:31:55 -04:00
|
|
|
Requires(preun): systemd-units
|
|
|
|
Requires(postun): systemd-units
|
|
|
|
|
2014-06-23 14:05:00 -07:00
|
|
|
%bcond_without check
|
|
|
|
|
2012-10-02 14:31:55 -04:00
|
|
|
%description
|
|
|
|
Open vSwitch provides standard network bridging functions augmented with
|
|
|
|
support for the OpenFlow protocol for remote per-flow control of
|
|
|
|
traffic.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n openvswitch-%{version}
|
|
|
|
|
|
|
|
%build
|
2013-12-13 21:53:25 -05:00
|
|
|
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir} --enable-ssl
|
2012-10-02 14:31:55 -04:00
|
|
|
make %{_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/etc
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/etc/openvswitch
|
|
|
|
install -p -D -m 0644 rhel/usr_lib_systemd_system_openvswitch.service \
|
|
|
|
$RPM_BUILD_ROOT%{_unitdir}/openvswitch.service
|
2014-01-09 01:04:33 -02:00
|
|
|
install -p -D -m 0644 rhel/usr_lib_systemd_system_openvswitch-nonetwork.service \
|
|
|
|
$RPM_BUILD_ROOT%{_unitdir}/openvswitch-nonetwork.service
|
2012-10-02 14:31:55 -04:00
|
|
|
install -m 755 rhel/etc_init.d_openvswitch \
|
|
|
|
$RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/openvswitch.init
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/etc/sysconfig
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/etc/logrotate.d
|
|
|
|
install -m 755 rhel/etc_logrotate.d_openvswitch \
|
|
|
|
$RPM_BUILD_ROOT/etc/logrotate.d/openvswitch
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/etc/profile.d
|
|
|
|
install -m 644 vswitchd/vswitch.ovsschema \
|
|
|
|
$RPM_BUILD_ROOT/usr/share/openvswitch/vswitch.ovsschema
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/usr/share/openvswitch/scripts
|
|
|
|
install -d -m 0755 $RPM_BUILD_ROOT/etc/sysconfig/network-scripts/
|
|
|
|
install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifdown-ovs \
|
|
|
|
$RPM_BUILD_ROOT/etc/sysconfig/network-scripts/ifdown-ovs
|
|
|
|
install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifup-ovs \
|
|
|
|
$RPM_BUILD_ROOT/etc/sysconfig/network-scripts/ifup-ovs
|
2014-01-09 01:04:33 -02:00
|
|
|
install -p -D -m 0644 rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \
|
2012-10-02 14:31:55 -04:00
|
|
|
$RPM_BUILD_ROOT/etc/sysconfig/openvswitch
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/usr/share/openvswitch/scripts
|
|
|
|
|
|
|
|
install python/compat/uuid.py $RPM_BUILD_ROOT/usr/share/openvswitch/python
|
|
|
|
install python/compat/argparse.py $RPM_BUILD_ROOT/usr/share/openvswitch/python
|
|
|
|
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/var/lib/openvswitch
|
|
|
|
|
2013-12-13 18:54:28 +01:00
|
|
|
# Get rid of stuff we don't want to make RPM happy.
|
2013-12-18 09:05:40 -08:00
|
|
|
(cd "$RPM_BUILD_ROOT" && rm -f usr/lib/lib*)
|
2013-12-13 18:54:28 +01:00
|
|
|
|
2014-06-23 14:05:00 -07:00
|
|
|
%check
|
|
|
|
%if %{with check}
|
|
|
|
if make check TESTSUITEFLAGS='%{_smp_mflags}' ||
|
|
|
|
make check TESTSUITEFLAGS='--recheck'; then :;
|
|
|
|
else
|
|
|
|
cat tests/testsuite.log
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
%endif
|
|
|
|
|
2012-10-02 14:31:55 -04:00
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%preun
|
|
|
|
# Package removal, not upgrade
|
|
|
|
systemctl stop openvswitch.service
|
|
|
|
systemctl disable openvswitch.service
|
|
|
|
|
|
|
|
%post
|
|
|
|
if test ! -e /etc/openvswitch/conf.db; then
|
|
|
|
install -d -m 755 -o root -g root /etc/openvswitch
|
|
|
|
|
|
|
|
# Create ovs-vswitchd config database
|
|
|
|
ovsdb-tool -vANY:console:emer create /etc/openvswitch/conf.db \
|
|
|
|
/usr/share/openvswitch/vswitch.ovsschema
|
|
|
|
|
|
|
|
# Create initial table in config database
|
|
|
|
ovsdb-tool -vANY:console:emer transact /etc/openvswitch/conf.db \
|
|
|
|
'[{"op": "insert", "table": "Open_vSwitch", "row": {}}]' \
|
|
|
|
> /dev/null
|
|
|
|
fi
|
|
|
|
# Initial installation
|
|
|
|
systemctl enable openvswitch.service
|
|
|
|
systemctl start openvswitch.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%config /etc/sysconfig/openvswitch
|
|
|
|
%config /etc/logrotate.d/openvswitch
|
|
|
|
%{_unitdir}/openvswitch.service
|
2014-01-09 01:04:33 -02:00
|
|
|
%{_unitdir}/openvswitch-nonetwork.service
|
2012-10-02 14:31:55 -04:00
|
|
|
%{_datadir}/openvswitch/scripts/openvswitch.init
|
|
|
|
%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs
|
|
|
|
%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs
|
|
|
|
/usr/share/openvswitch/bugtool-plugins/
|
2013-12-02 23:13:16 -02:00
|
|
|
/usr/share/openvswitch/python/ovs/__init__.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/daemon.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/db/__init__.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/db/data.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/db/error.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/db/idl.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/db/parser.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/db/schema.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/db/types.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/dirs.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/fatal_signal.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/json.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/jsonrpc.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/ovsuuid.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/poller.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/process.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/reconnect.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/socket_util.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/stream.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/timeval.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/util.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/version.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/unixctl/__init__.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/unixctl/client.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/unixctl/server.py*
|
|
|
|
/usr/share/openvswitch/python/uuid.py*
|
|
|
|
/usr/share/openvswitch/python/argparse.py*
|
|
|
|
/usr/share/openvswitch/python/ovs/vlog.py*
|
|
|
|
/usr/share/openvswitch/python/ovstest/__init__.py*
|
|
|
|
/usr/share/openvswitch/python/ovstest/args.py*
|
|
|
|
/usr/share/openvswitch/python/ovstest/rpcserver.py*
|
|
|
|
/usr/share/openvswitch/python/ovstest/tcp.py*
|
|
|
|
/usr/share/openvswitch/python/ovstest/udp.py*
|
|
|
|
/usr/share/openvswitch/python/ovstest/util.py*
|
|
|
|
/usr/share/openvswitch/python/ovstest/vswitch.py*
|
|
|
|
/usr/share/openvswitch/python/ovstest/tests.py*
|
2012-10-02 14:31:55 -04:00
|
|
|
/usr/share/openvswitch/scripts/ovs-bugtool-*
|
|
|
|
/usr/share/openvswitch/scripts/ovs-check-dead-ifs
|
|
|
|
/usr/share/openvswitch/scripts/ovs-lib
|
2013-10-24 15:35:14 -04:00
|
|
|
/usr/share/openvswitch/scripts/ovs-vtep
|
2012-10-02 14:31:55 -04:00
|
|
|
%config /usr/share/openvswitch/vswitch.ovsschema
|
2013-10-24 15:35:14 -04:00
|
|
|
%config /usr/share/openvswitch/vtep.ovsschema
|
2012-10-02 14:31:55 -04:00
|
|
|
/usr/sbin/ovs-bugtool
|
|
|
|
/usr/sbin/ovs-vswitchd
|
|
|
|
/usr/sbin/ovsdb-server
|
|
|
|
/usr/bin/ovs-appctl
|
2014-10-14 00:51:52 -07:00
|
|
|
/usr/bin/ovs-docker
|
2012-10-02 14:31:55 -04:00
|
|
|
/usr/bin/ovs-dpctl
|
2013-10-24 15:35:14 -04:00
|
|
|
/usr/bin/ovs-dpctl-top
|
2012-10-02 14:31:55 -04:00
|
|
|
/usr/bin/ovs-ofctl
|
|
|
|
/usr/bin/ovs-vsctl
|
|
|
|
/usr/bin/ovsdb-client
|
|
|
|
/usr/bin/ovsdb-tool
|
2014-08-15 10:32:50 -07:00
|
|
|
/usr/bin/ovs-testcontroller
|
2012-10-02 14:31:55 -04:00
|
|
|
/usr/bin/ovs-pki
|
|
|
|
/usr/bin/ovs-test
|
|
|
|
/usr/bin/ovs-l3ping
|
2013-10-24 15:35:14 -04:00
|
|
|
/usr/bin/vtep-ctl
|
2014-08-15 10:32:50 -07:00
|
|
|
%doc /usr/share/man/man8/ovs-testcontroller.8.gz
|
2012-10-02 14:31:55 -04:00
|
|
|
%doc /usr/share/man/man8/ovs-pki.8.gz
|
|
|
|
%doc /usr/share/man/man1/ovsdb-client.1.gz
|
|
|
|
%doc /usr/share/man/man1/ovsdb-server.1.gz
|
|
|
|
%doc /usr/share/man/man1/ovsdb-tool.1.gz
|
|
|
|
%doc /usr/share/man/man5/ovs-vswitchd.conf.db.5.gz
|
2013-10-24 15:35:14 -04:00
|
|
|
%doc /usr/share/man/man5/vtep.5.gz
|
2012-10-02 14:31:55 -04:00
|
|
|
%doc /usr/share/man/man8/ovs-appctl.8.gz
|
|
|
|
%doc /usr/share/man/man8/ovs-bugtool.8.gz
|
2014-05-01 08:10:20 -07:00
|
|
|
%doc /usr/share/man/man8/ovs-ctl.8.gz
|
2012-10-02 14:31:55 -04:00
|
|
|
%doc /usr/share/man/man8/ovs-dpctl.8.gz
|
2013-10-24 15:35:14 -04:00
|
|
|
%doc /usr/share/man/man8/ovs-dpctl-top.8.gz
|
2012-10-02 14:31:55 -04:00
|
|
|
%doc /usr/share/man/man8/ovs-ofctl.8.gz
|
2012-10-15 12:42:48 -07:00
|
|
|
%doc /usr/share/man/man8/ovs-parse-backtrace.8.gz
|
2012-10-02 14:31:55 -04:00
|
|
|
%doc /usr/share/man/man8/ovs-vsctl.8.gz
|
|
|
|
%doc /usr/share/man/man8/ovs-vswitchd.8.gz
|
|
|
|
%doc /usr/share/man/man8/ovs-test.8.gz
|
|
|
|
%doc /usr/share/man/man8/ovs-l3ping.8.gz
|
2013-10-24 15:35:14 -04:00
|
|
|
%doc /usr/share/man/man8/vtep-ctl.8.gz
|
2014-10-28 11:19:52 +01:00
|
|
|
%doc COPYING DESIGN.md INSTALL.SSL.md NOTICE README.md WHY-OVS.md FAQ.md NEWS INSTALL.DPDK.md
|
2012-10-02 14:31:55 -04:00
|
|
|
/var/lib/openvswitch
|
2013-07-12 20:52:51 -07:00
|
|
|
/var/log/openvswitch
|
2012-10-02 14:31:55 -04:00
|
|
|
/usr/share/openvswitch/scripts/ovs-ctl
|
|
|
|
%exclude /etc/openvswitch
|
|
|
|
%exclude /usr/bin/ovs-benchmark
|
2012-10-15 12:42:48 -07:00
|
|
|
%exclude /usr/bin/ovs-parse-backtrace
|
2012-10-02 14:31:55 -04:00
|
|
|
%exclude /usr/bin/ovs-pcap
|
|
|
|
%exclude /usr/bin/ovs-tcpundump
|
|
|
|
%exclude /usr/bin/ovs-vlan-test
|
|
|
|
%exclude /usr/sbin/ovs-vlan-bug-workaround
|
|
|
|
%exclude /usr/share/man/man1/ovs-benchmark.1.gz
|
|
|
|
%exclude /usr/share/man/man1/ovs-pcap.1.gz
|
|
|
|
%exclude /usr/share/man/man1/ovs-tcpundump.1.gz
|
|
|
|
%exclude /usr/share/man/man8/ovs-vlan-bug-workaround.8.gz
|
|
|
|
%exclude /usr/share/man/man8/ovs-vlan-test.8.gz
|
|
|
|
%exclude /usr/share/openvswitch/scripts/ovs-save
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
* Wed Jan 12 2011 Ralf Spenneberg <ralf@os-s.net>
|
|
|
|
- First build on F14
|