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
|
|
|
|
|
2014-11-06 16:45:31 -02:00
|
|
|
# Enable PIE, bz#955181
|
|
|
|
%global _hardened_build 1
|
|
|
|
|
2012-10-02 14:31:55 -04:00
|
|
|
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:25 -02:00
|
|
|
Requires: openssl iproute module-init-tools
|
|
|
|
#Upstream kernel commit 4f647e0a3c37b8d5086214128614a136064110c3
|
|
|
|
Requires: kernel >= 3.15.0-0
|
|
|
|
|
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-11-06 16:45:32 -02:00
|
|
|
Obsoletes: openvswitch-controller <= 0:2.1.0-1
|
2012-10-02 14:31:55 -04:00
|
|
|
|
2014-06-23 14:05:00 -07:00
|
|
|
%bcond_without check
|
|
|
|
|
2012-10-02 14:31:55 -04:00
|
|
|
%description
|
2014-11-06 16:45:26 -02:00
|
|
|
Open vSwitch provides standard network bridging functions and
|
2012-10-02 14:31:55 -04:00
|
|
|
support for the OpenFlow protocol for remote per-flow control of
|
|
|
|
traffic.
|
|
|
|
|
2014-11-06 16:45:28 -02:00
|
|
|
%package -n python-openvswitch
|
|
|
|
Summary: Open vSwitch python bindings
|
|
|
|
License: ASL 2.0
|
|
|
|
BuildArch: noarch
|
|
|
|
Requires: python
|
|
|
|
|
|
|
|
%description -n python-openvswitch
|
|
|
|
Python bindings for the Open vSwitch database
|
|
|
|
|
2014-11-06 16:45:29 -02:00
|
|
|
%package test
|
|
|
|
Summary: Open vSwitch testing utilities
|
|
|
|
License: ASL 2.0
|
|
|
|
BuildArch: noarch
|
|
|
|
Requires: python-openvswitch = %{version}-%{release}
|
|
|
|
Requires: python python-twisted-core python-twisted-web
|
|
|
|
|
|
|
|
%description test
|
|
|
|
Utilities that are useful to diagnose performance and connectivity
|
|
|
|
issues in Open vSwitch setup.
|
|
|
|
|
2014-11-06 16:45:30 -02:00
|
|
|
%package devel
|
|
|
|
Summary: Open vSwitch OpenFlow development package (library, headers)
|
|
|
|
License: ASL 2.0
|
|
|
|
Provides: openvswitch-static = %{version}-%{release}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
This provides static library, libopenswitch.a and the openvswitch header
|
|
|
|
files needed to build an external application.
|
|
|
|
|
|
|
|
|
2012-10-02 14:31:55 -04:00
|
|
|
%prep
|
2014-11-06 16:45:34 -02:00
|
|
|
%setup -q
|
2012-10-02 14:31:55 -04:00
|
|
|
|
|
|
|
%build
|
2014-11-06 16:45:27 -02:00
|
|
|
%configure --enable-ssl --with-pkidir=%{_sharedstatedir}/openvswitch/pki
|
2014-11-06 16:45:33 -02:00
|
|
|
make %{?_smp_mflags}
|
2012-10-02 14:31:55 -04:00
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
2014-11-06 16:45:43 -02:00
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/%{_sysconfdir}
|
2014-11-06 16:45:35 -02:00
|
|
|
install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch
|
2012-10-02 14:31:55 -04:00
|
|
|
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
|
2014-11-06 16:45:43 -02:00
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d
|
2012-10-02 14:31:55 -04:00
|
|
|
install -m 755 rhel/etc_logrotate.d_openvswitch \
|
2014-11-06 16:45:43 -02:00
|
|
|
$RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/openvswitch
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d
|
2012-10-02 14:31:55 -04:00
|
|
|
install -m 644 vswitchd/vswitch.ovsschema \
|
2014-11-06 16:45:43 -02:00
|
|
|
$RPM_BUILD_ROOT/%{_datadir}/openvswitch/vswitch.ovsschema
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/openvswitch/scripts
|
|
|
|
install -d -m 0755 $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/
|
2012-10-02 14:31:55 -04:00
|
|
|
install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifdown-ovs \
|
2014-11-06 16:45:43 -02:00
|
|
|
$RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs
|
2012-10-02 14:31:55 -04:00
|
|
|
install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifup-ovs \
|
2014-11-06 16:45:43 -02:00
|
|
|
$RPM_BUILD_ROOT/%{_sysconfdir}/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 \
|
2014-11-06 16:45:43 -02:00
|
|
|
$RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/openvswitch
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/openvswitch/scripts
|
2012-10-02 14:31:55 -04:00
|
|
|
|
2014-11-06 16:45:28 -02:00
|
|
|
install -d -m 0755 $RPM_BUILD_ROOT%{python_sitelib}
|
|
|
|
mv $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/* $RPM_BUILD_ROOT%{python_sitelib}
|
|
|
|
rmdir $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/
|
2012-10-02 14:31:55 -04:00
|
|
|
|
2014-11-06 16:45:43 -02:00
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/%{_sharedstatedir}/openvswitch
|
2012-10-02 14:31:55 -04:00
|
|
|
|
2014-11-06 16:45:30 -02:00
|
|
|
install -d -m 0755 $RPM_BUILD_ROOT%{_includedir}/openvswitch
|
|
|
|
install -p -D -m 0644 include/openvswitch/*.h \
|
2014-11-06 16:45:44 -02:00
|
|
|
-t $RPM_BUILD_ROOT%{_includedir}/openvswitch
|
2014-11-06 16:45:30 -02:00
|
|
|
install -p -D -m 0644 config.h -t $RPM_BUILD_ROOT%{_includedir}/openvswitch
|
|
|
|
|
|
|
|
install -d -m 0755 $RPM_BUILD_ROOT%{_includedir}/openvswitch/lib
|
|
|
|
install -p -D -m 0644 lib/*.h \
|
2014-11-06 16:45:44 -02:00
|
|
|
-t $RPM_BUILD_ROOT%{_includedir}/openvswitch/lib
|
2014-11-06 16:45:30 -02:00
|
|
|
|
|
|
|
install -d -m 0755 $RPM_BUILD_ROOT%{_includedir}/openflow
|
|
|
|
install -p -D -m 0644 include/openflow/*.h \
|
2014-11-06 16:45:44 -02:00
|
|
|
-t $RPM_BUILD_ROOT%{_includedir}/openflow
|
2013-12-13 18:54:28 +01:00
|
|
|
|
2014-11-06 16:45:35 -02:00
|
|
|
touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/conf.db
|
|
|
|
touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/system-id.conf
|
|
|
|
|
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
|
|
|
|
|
2014-11-06 16:45:28 -02:00
|
|
|
%files -n python-openvswitch
|
|
|
|
%{python_sitelib}/ovs
|
|
|
|
%doc COPYING
|
|
|
|
|
2014-11-06 16:45:29 -02:00
|
|
|
%files test
|
|
|
|
%{_bindir}/ovs-test
|
|
|
|
%{_bindir}/ovs-vlan-test
|
|
|
|
%{_bindir}/ovs-l3ping
|
|
|
|
%{_mandir}/man8/ovs-test.8*
|
|
|
|
%{_mandir}/man8/ovs-vlan-test.8*
|
|
|
|
%{_mandir}/man8/ovs-l3ping.8*
|
|
|
|
%{python_sitelib}/ovstest
|
|
|
|
|
2014-11-06 16:45:30 -02:00
|
|
|
%files devel
|
|
|
|
%{_libdir}/*.a
|
|
|
|
%{_libdir}/*.la
|
|
|
|
%{_includedir}/openvswitch/*
|
|
|
|
%{_includedir}/openflow/*
|
|
|
|
|
2012-10-02 14:31:55 -04:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2014-11-06 16:45:35 -02:00
|
|
|
%dir %{_sysconfdir}/openvswitch
|
|
|
|
%config %ghost %{_sysconfdir}/openvswitch/conf.db
|
|
|
|
%config %ghost %{_sysconfdir}/openvswitch/system-id.conf
|
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/openvswitch
|
2014-11-06 16:45:42 -02:00
|
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/openvswitch
|
2012-10-02 14:31:55 -04:00
|
|
|
%{_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
|
2014-11-06 16:45:40 -02:00
|
|
|
%{_datadir}/openvswitch/bugtool-plugins/
|
|
|
|
%{_datadir}/openvswitch/scripts/ovs-bugtool-*
|
|
|
|
%{_datadir}/openvswitch/scripts/ovs-check-dead-ifs
|
|
|
|
%{_datadir}/openvswitch/scripts/ovs-lib
|
|
|
|
%{_datadir}/openvswitch/scripts/ovs-vtep
|
|
|
|
%{_datadir}/openvswitch/scripts/ovs-ctl
|
|
|
|
%config %{_datadir}/openvswitch/vswitch.ovsschema
|
|
|
|
%config %{_datadir}/openvswitch/vtep.ovsschema
|
2014-11-06 16:45:39 -02:00
|
|
|
%{_bindir}/ovs-appctl
|
|
|
|
%{_bindir}/ovs-docker
|
|
|
|
%{_bindir}/ovs-dpctl
|
|
|
|
%{_bindir}/ovs-dpctl-top
|
|
|
|
%{_bindir}/ovs-ofctl
|
|
|
|
%{_bindir}/ovs-vsctl
|
|
|
|
%{_bindir}/ovsdb-client
|
|
|
|
%{_bindir}/ovsdb-tool
|
|
|
|
%{_bindir}/ovs-testcontroller
|
|
|
|
%{_bindir}/ovs-pki
|
|
|
|
%{_bindir}/vtep-ctl
|
2014-11-06 16:45:38 -02:00
|
|
|
%{_sbindir}/ovs-bugtool
|
|
|
|
%{_sbindir}/ovs-vswitchd
|
|
|
|
%{_sbindir}/ovsdb-server
|
2014-11-06 16:45:36 -02:00
|
|
|
%{_mandir}/man1/ovs-benchmark.1*
|
|
|
|
%{_mandir}/man1/ovs-pcap.1*
|
|
|
|
%{_mandir}/man1/ovs-tcpundump.1*
|
|
|
|
%{_mandir}/man1/ovsdb-client.1*
|
|
|
|
%{_mandir}/man1/ovsdb-server.1*
|
|
|
|
%{_mandir}/man1/ovsdb-tool.1*
|
|
|
|
%{_mandir}/man5/ovs-vswitchd.conf.db.5*
|
|
|
|
%{_mandir}/man5/vtep.5*
|
|
|
|
%{_mandir}/man8/vtep-ctl.8*
|
|
|
|
%{_mandir}/man8/ovs-appctl.8*
|
|
|
|
%{_mandir}/man8/ovs-bugtool.8*
|
|
|
|
%{_mandir}/man8/ovs-ctl.8*
|
|
|
|
%{_mandir}/man8/ovs-dpctl.8*
|
|
|
|
%{_mandir}/man8/ovs-dpctl-top.8*
|
|
|
|
%{_mandir}/man8/ovs-ofctl.8*
|
|
|
|
%{_mandir}/man8/ovs-pki.8*
|
|
|
|
%{_mandir}/man8/ovs-vsctl.8*
|
|
|
|
%{_mandir}/man8/ovs-vswitchd.8*
|
|
|
|
%{_mandir}/man8/ovs-parse-backtrace.8*
|
|
|
|
%{_mandir}/man8/ovs-testcontroller.8*
|
2014-11-06 16:45:37 -02:00
|
|
|
%doc COPYING DESIGN.md INSTALL.SSL.md NOTICE README.md WHY-OVS.md
|
|
|
|
%doc FAQ.md NEWS INSTALL.DPDK.md rhel/README.RHEL
|
2012-10-02 14:31:55 -04:00
|
|
|
/var/lib/openvswitch
|
2013-07-12 20:52:51 -07:00
|
|
|
/var/log/openvswitch
|
2014-11-06 16:45:39 -02:00
|
|
|
%exclude %{_bindir}/ovs-benchmark
|
|
|
|
%exclude %{_bindir}/ovs-parse-backtrace
|
|
|
|
%exclude %{_bindir}/ovs-pcap
|
|
|
|
%exclude %{_bindir}/ovs-tcpundump
|
2014-11-06 16:45:38 -02:00
|
|
|
%exclude %{_sbindir}/ovs-vlan-bug-workaround
|
2014-11-06 16:45:41 -02:00
|
|
|
%exclude %{_mandir}/man1/ovs-benchmark.1.gz
|
|
|
|
%exclude %{_mandir}/man1/ovs-pcap.1.gz
|
|
|
|
%exclude %{_mandir}/man1/ovs-tcpundump.1.gz
|
|
|
|
%exclude %{_mandir}/man8/ovs-vlan-bug-workaround.8.gz
|
2014-11-06 16:45:40 -02:00
|
|
|
%exclude %{_datadir}/openvswitch/scripts/ovs-save
|
2012-10-02 14:31:55 -04:00
|
|
|
|
|
|
|
%changelog
|
|
|
|
* Wed Jan 12 2011 Ralf Spenneberg <ralf@os-s.net>
|
|
|
|
- First build on F14
|