Chris Wright 2564f3b
Name:           openvswitch
54df2a2
Version:        1.4.2
6cbb8d4
Release:        6%{?dist}
Chris Wright 2564f3b
Summary:        Open vSwitch daemon/database/utilities
Chris Wright 2564f3b
Chris Wright 2564f3b
# Nearly all of openvswitch is ASL 2.0.  The bugtool is LGPLv2+, and the
Chris Wright 2564f3b
# lib/sflow*.[ch] files are SISSL
Chris Wright 2564f3b
# datapath/ is GPLv2 (although not built into any of the binary packages)
Chris Wright 2564f3b
# python/compat is Python (although not built into any of the binary packages)
Chris Wright 2564f3b
License:        ASL 2.0 and LGPLv2+ and SISSL
Chris Wright 2564f3b
URL:            http://openvswitch.org
Chris Wright 2564f3b
Source0:        http://openvswitch.org/releases/%{name}-%{version}.tar.gz
Chris Wright 2564f3b
Source1:        openvswitch.service
Chris Wright 2564f3b
Source2:        openvswitch.init
Chris Wright 2564f3b
Source3:        openvswitch.logrotate
Chris Wright 2564f3b
Source4:        ifup-ovs
Chris Wright 2564f3b
Source5:        ifdown-ovs
Chris Wright 2564f3b
Source6:        ovsdbmonitor.desktop
Chris Wright 2564f3b
Source7:        openvswitch-configure-ovskmod-var.patch
Chris Wright 2564f3b
Source8:        ovsdbmonitor-move-to-its-own-data-directory.patch
Chris Wright 2564f3b
# make the kmod name configurable since Fedora kernel ships openvswitch module
Chris Wright 2564f3b
# Source7 is not applied, it's used to generate patch0
Chris Wright 2564f3b
Patch0:         openvswitch-configure-ovskmod-var-autoconfd.patch
Chris Wright 2564f3b
# mv ovsdbmonitordir. Source8 (accepted upstream) is source for patch1
Chris Wright 2564f3b
Patch1:         ovsdbmonitor-move-to-its-own-data-directory-automaked.patch
Chris Wright 87a74a5
Patch2:         openvswitch-rhel-initscripts-resync.patch
2f18fc0
Patch3:         openvswitch-ovs-pki-perm.patch
6cbb8d4
Patch4:         openvswitch-ovs-ctl-ulimit.patch
Chris Wright 2564f3b
Chris Wright cb04a2d
BuildRequires:  systemd-units openssl openssl-devel
Chris Wright 2564f3b
BuildRequires:  python python-twisted-core python-twisted-conch python-zope-interface PyQt4
Chris Wright 2564f3b
BuildRequires:  desktop-file-utils
Chris Wright 2564f3b
BuildRequires:  groff graphviz
Chris Wright 2564f3b
Chris Wright 2564f3b
Requires:       openssl iproute module-init-tools
Chris Wright 2564f3b
Chris Wright 2564f3b
Requires(post):  systemd-units
Chris Wright 2564f3b
Requires(preun): systemd-units
Chris Wright 91498f6
Requires(postun): systemd-units
Chris Wright 2564f3b
Chris Wright 2564f3b
%description
Chris Wright 2564f3b
Open vSwitch provides standard network bridging functions and
Chris Wright 2564f3b
support for the OpenFlow protocol for remote per-flow control of
Chris Wright 2564f3b
traffic.
Chris Wright 2564f3b
Chris Wright 2564f3b
%package -n python-openvswitch
Chris Wright 2564f3b
Summary:        Open vSwitch python bindings
Chris Wright 2564f3b
License:        ASL 2.0
Chris Wright 2564f3b
BuildArch:      noarch
Chris Wright 2564f3b
Requires:       python
Chris Wright 2564f3b
Chris Wright 2564f3b
%description -n python-openvswitch
Chris Wright 2564f3b
Python bindings for the Open vSwitch database
Chris Wright 2564f3b
Chris Wright 2564f3b
%package -n ovsdbmonitor
Chris Wright 2564f3b
Summary:        Open vSwitch graphical monitoring tool
Chris Wright 2564f3b
License:        ASL 2.0
Chris Wright 2564f3b
BuildArch:      noarch
Chris Wright 2564f3b
Requires:       python-openvswitch = %{version}-%{release}
Chris Wright 2564f3b
Requires:       python python-twisted-core python-twisted-conch python-zope-interface PyQt4
Chris Wright 2564f3b
Chris Wright 2564f3b
%description -n ovsdbmonitor
Chris Wright 2564f3b
A GUI tool for monitoring and troubleshooting local or remote Open
Chris Wright 2564f3b
vSwitch installations.  It presents GUI tables that graphically represent
Chris Wright 2564f3b
an Open vSwitch kernel flow table (similar to "ovs-dpctl dump-flows")
Chris Wright 2564f3b
and Open vSwitch database contents (similar to "ovs-vsctl list ").
Chris Wright 2564f3b
Chris Wright 2564f3b
%package test
Chris Wright 2564f3b
Summary:        Open vSwitch testing utilities
Chris Wright 2564f3b
License:        ASL 2.0
Chris Wright 2564f3b
BuildArch:      noarch
Chris Wright 2564f3b
Requires:       python-openvswitch = %{version}-%{release}
Chris Wright 2564f3b
Requires:       python python-twisted-core python-twisted-web
Chris Wright 2564f3b
Chris Wright 2564f3b
%description test
Chris Wright 2564f3b
Utilities that are useful to diagnose performance and connectivity
Chris Wright 2564f3b
issues in Open vSwitch setup.
Chris Wright 2564f3b
70c56d1
%package controller
70c56d1
Summary:        Open vSwitch OpenFlow controller
70c56d1
License:        ASL 2.0
70c56d1
Requires:       openvswitch = %{version}-%{release}
70c56d1
70c56d1
%description controller
70c56d1
Simple reference implementation of an OpenFlow controller for Open
70c56d1
vSwitch. Manages any number of remote switches over OpenFlow protocol,
70c56d1
causing them to function as L2 MAC-learning switches or hub.
70c56d1
Chris Wright 2564f3b
%prep
Chris Wright 2564f3b
%setup -q
Chris Wright 2564f3b
%patch0 -p1 -b .ovskmod
Chris Wright 2564f3b
%patch1 -p1 -b .ovsdbmonitordir
Chris Wright 87a74a5
%patch2 -p1 -b .initscripts
2f18fc0
%patch3 -p1 -b .openvswitch-ovs-pki-perm
6cbb8d4
%patch4 -p1 -b .openvswitch-ovs-ctl-ulimit
Chris Wright 2564f3b
Chris Wright 2564f3b
%build
Chris Wright 2564f3b
%configure --enable-ssl --with-pkidir=%{_sharedstatedir}/openvswitch/pki OVSKMOD=openvswitch
Chris Wright 2564f3b
make %{?_smp_mflags}
Chris Wright 2564f3b
Chris Wright 2564f3b
Chris Wright 2564f3b
%install
Chris Wright 2564f3b
rm -rf $RPM_BUILD_ROOT
Chris Wright 2564f3b
make install DESTDIR=$RPM_BUILD_ROOT
Chris Wright 2564f3b
Chris Wright 2564f3b
install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch
Chris Wright 2564f3b
Chris Wright 2564f3b
src=rhel/usr_share_openvswitch_scripts_sysconfig.template
Chris Wright 2564f3b
dst=$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/openvswitch
Chris Wright 2564f3b
install -p -D -m 0644 $src $dst
Chris Wright 2564f3b
Chris Wright 2564f3b
install -p -D -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/openvswitch.service
Chris Wright 2564f3b
install -p -D -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/openvswitch.init
Chris Wright 2564f3b
install -p -D -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/openvswitch
Chris Wright 2564f3b
Chris Wright 2564f3b
install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/network-scripts/
Chris Wright 2564f3b
install -p -m 0755 %{SOURCE4} %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/network-scripts/
Chris Wright 2564f3b
Chris Wright 2564f3b
install -d -m 0755 $RPM_BUILD_ROOT/%{_sharedstatedir}/openvswitch
Chris Wright 2564f3b
Chris Wright 2564f3b
install -d -m 0755 $RPM_BUILD_ROOT%{python_sitelib}
Chris Wright 2564f3b
mv $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/* $RPM_BUILD_ROOT%{python_sitelib}
Chris Wright 2564f3b
rmdir $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/
Chris Wright 2564f3b
Chris Wright 2564f3b
# Get rid of stuff we don't want to make RPM happy.
Chris Wright 2564f3b
rm -f \
Chris Wright 2564f3b
    $RPM_BUILD_ROOT%{_sbindir}/ovs-vlan-bug-workaround \
Chris Wright 2564f3b
    $RPM_BUILD_ROOT%{_mandir}/man8/ovs-vlan-bug-workaround.8 \
Chris Wright 2564f3b
    $RPM_BUILD_ROOT%{_sbindir}/ovs-brcompatd \
Chris Wright 2564f3b
    $RPM_BUILD_ROOT%{_mandir}/man8/ovs-brcompatd.8
Chris Wright 2564f3b
Chris Wright 2564f3b
desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE6}
Chris Wright 2564f3b
Chris Wright 2564f3b
%post
Chris Wright 2564f3b
if [ $1 -eq 1 ] ; then
Chris Wright 2564f3b
    # Initial installation
Chris Wright 2564f3b
    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
Chris Wright 2564f3b
fi
Chris Wright 2564f3b
Chris Wright 2564f3b
%preun
Chris Wright 2564f3b
if [ "$1" = "0" ]; then
Chris Wright 2564f3b
    # Package removal, not upgrade
Chris Wright 2564f3b
    /bin/systemctl --no-reload disable openvswitch.service > /dev/null 2>&1 || :
Chris Wright 2564f3b
    /bin/systemctl stop openvswitch.service > /dev/null 2>&1 || :
Chris Wright 2564f3b
fi
Chris Wright 2564f3b
Chris Wright 2564f3b
%postun
Chris Wright 2564f3b
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
Chris Wright 2564f3b
if [ $1 -ge 1 ] ; then
Chris Wright 2564f3b
    # Package upgrade, not uninstall
Chris Wright 2564f3b
    /bin/systemctl try-restart openvswitch.service >/dev/null 2>&1 || :
Chris Wright 2564f3b
fi
Chris Wright 2564f3b
Chris Wright 2564f3b
Chris Wright 2564f3b
%files
Chris Wright 2564f3b
%{_sysconfdir}/openvswitch/
Chris Wright 2564f3b
%config(noreplace) %{_sysconfdir}/logrotate.d/openvswitch
Chris Wright 2564f3b
%config(noreplace) %{_sysconfdir}/sysconfig/openvswitch
Chris Wright 2564f3b
%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs
Chris Wright 2564f3b
%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs
Chris Wright 2564f3b
%{_unitdir}/openvswitch.service
Chris Wright 2564f3b
%{_bindir}/ovs-appctl
Chris Wright 2564f3b
%{_bindir}/ovs-benchmark
Chris Wright 2564f3b
%{_bindir}/ovs-dpctl
Chris Wright 2564f3b
%{_bindir}/ovs-ofctl
Chris Wright 2564f3b
%{_bindir}/ovs-parse-leaks
Chris Wright 2564f3b
%{_bindir}/ovs-pcap
Chris Wright 2564f3b
%{_bindir}/ovs-pki
Chris Wright 2564f3b
%{_bindir}/ovs-tcpundump
Chris Wright 2564f3b
%{_bindir}/ovs-vsctl
Chris Wright 2564f3b
%{_bindir}/ovsdb-client
Chris Wright 2564f3b
%{_bindir}/ovsdb-tool
Chris Wright 2564f3b
# ovs-bugtool is LGPLv2+
Chris Wright 2564f3b
%{_sbindir}/ovs-bugtool
Chris Wright 2564f3b
%{_sbindir}/ovs-vswitchd
Chris Wright 2564f3b
%{_sbindir}/ovsdb-server
Chris Wright 91498f6
%{_mandir}/man1/ovs-benchmark.1*
Chris Wright 91498f6
%{_mandir}/man1/ovs-pcap.1*
Chris Wright 91498f6
%{_mandir}/man1/ovs-tcpundump.1*
Chris Wright 91498f6
%{_mandir}/man1/ovsdb-client.1*
Chris Wright 91498f6
%{_mandir}/man1/ovsdb-server.1*
Chris Wright 91498f6
%{_mandir}/man1/ovsdb-tool.1*
Chris Wright 91498f6
%{_mandir}/man5/ovs-vswitchd.conf.db.5*
Chris Wright 91498f6
%{_mandir}/man8/ovs-appctl.8*
Chris Wright 91498f6
%{_mandir}/man8/ovs-bugtool.8*
Chris Wright 91498f6
%{_mandir}/man8/ovs-ctl.8*
Chris Wright 91498f6
%{_mandir}/man8/ovs-dpctl.8*
Chris Wright 91498f6
%{_mandir}/man8/ovs-ofctl.8*
Chris Wright 91498f6
%{_mandir}/man8/ovs-parse-leaks.8*
Chris Wright 91498f6
%{_mandir}/man8/ovs-pki.8*
Chris Wright 91498f6
%{_mandir}/man8/ovs-vsctl.8*
Chris Wright 91498f6
%{_mandir}/man8/ovs-vswitchd.8*
Chris Wright 2564f3b
# /usr/share/openvswitch/bugtool-plugins and
Chris Wright 2564f3b
# /usr/share/openvswitch/scripts/ovs-bugtool* are LGPLv2+
Chris Wright 2564f3b
%{_datadir}/openvswitch/
Chris Wright 2564f3b
%{_sharedstatedir}/openvswitch
Chris Wright 2564f3b
# see COPYING for full licensing details
Chris Wright 2564f3b
%doc COPYING DESIGN INSTALL.SSL NOTICE README WHY-OVS rhel/README.RHEL
Chris Wright 2564f3b
Chris Wright 2564f3b
%files -n python-openvswitch
Chris Wright 2564f3b
%{python_sitelib}/ovs
Chris Wright 2564f3b
%doc COPYING
Chris Wright 2564f3b
Chris Wright 2564f3b
%files -n ovsdbmonitor
Chris Wright 2564f3b
%{_bindir}/ovsdbmonitor
Chris Wright 91498f6
%{_mandir}/man1/ovsdbmonitor.1*
Chris Wright 2564f3b
%{_datadir}/ovsdbmonitor
Chris Wright 2564f3b
%{_datadir}/applications/ovsdbmonitor.desktop
Chris Wright 2564f3b
%doc ovsdb/ovsdbmonitor/COPYING
Chris Wright 2564f3b
Chris Wright 2564f3b
%files test
Chris Wright 2564f3b
%{_bindir}/ovs-test
Chris Wright 2564f3b
%{_bindir}/ovs-vlan-test
Chris Wright 91498f6
%{_mandir}/man8/ovs-test.8*
Chris Wright 91498f6
%{_mandir}/man8/ovs-vlan-test.8*
Chris Wright 2564f3b
%{python_sitelib}/ovstest
Chris Wright 2564f3b
70c56d1
%files controller
70c56d1
%{_bindir}/ovs-controller
70c56d1
%{_mandir}/man8/ovs-controller.8*
70c56d1
Chris Wright 2564f3b
Chris Wright 2564f3b
%changelog
6cbb8d4
* Tue Nov 20 2012 Thomas Graf <tgraf@redhat.com> - 1.4.2-6
6cbb8d4
- Increase max fd limit to support 256 bridges (#873072)
6cbb8d4
2f18fc0
* Tue Nov  1 2012 Thomas Graf <tgraf@redhat.com> - 1.4.2-5
2f18fc0
- Don't create world writable pki/*/incoming directory (#845351)
2f18fc0
5c33f70
* Tue Oct 25 2012 Thomas Graf <tgraf@redhat.com> - 1.4.2-4
5c33f70
- Don't add iptables accept rule for -p GRE as GRE tunneling is unsupported
5c33f70
3d5e256
* Wed Oct 10 2012 Thomas Graf <tgraf@redhat.com> - 1.4.2-3
3d5e256
- make ovs-vsctl timeout if daemon is not running (#858722)
3d5e256
70c56d1
* Fri Sep 10 2012 Thomas Graf <tgraf@redhat.com> - 1.4.2-2
70c56d1
- add controller package containing ovs-controller
70c56d1
54df2a2
* Fri Aug 17 2012 Tomas Hozza <thozza@redhat.com> - 1.4.2-1
54df2a2
- Update to 1.4.2
54df2a2
- Fixed openvswitch-rhel-initscripts-resync.patch so it fits on new sources.
54df2a2
Chris Wright 87a74a5
* Thu Mar 15 2012 Chris Wright <chrisw@redhat.com> - 1.4.0-5
Chris Wright 87a74a5
- fix ovs network initscripts DHCP address acquisition (#803843)
Chris Wright 87a74a5
Chris Wright cb04a2d
* Tue Mar  6 2012 Chris Wright <chrisw@redhat.com> - 1.4.0-4
Chris Wright cb04a2d
- make BuildRequires openssl explicit (needed on f18/rawhide now)
Chris Wright cb04a2d
Chris Wright 91498f6
* Tue Mar  6 2012 Chris Wright <chrisw@redhat.com> - 1.4.0-3
Chris Wright 91498f6
- use glob to catch compressed manpages
Chris Wright 91498f6
Chris Wright 2564f3b
* Fri Mar  1 2012 Chris Wright <chrisw@redhat.com> - 1.4.0-2
Chris Wright 2564f3b
- Update License comment, use consitent macros as per review comments bz799171
Chris Wright 2564f3b
Chris Wright 2564f3b
* Wed Feb 29 2012 Chris Wright <chrisw@redhat.com> - 1.4.0-1
Chris Wright 2564f3b
- Initial package for Fedora