Skip to content

Commit

Permalink
fedora: Add python3-openvswitch split package
Browse files Browse the repository at this point in the history
Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1412694
Signed-off-by: Timothy Redaelli <[email protected]>
Acked-by: Flavio Leitner <[email protected]>
Signed-off-by: Russell Bryant <[email protected]>
  • Loading branch information
drizzt authored and russellb committed Feb 23, 2017
1 parent b8aad9b commit bb1a7ca
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 16 deletions.
1 change: 1 addition & 0 deletions Documentation/intro/install/fedora.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ in the :doc:`general`. Specific packages (by package name) include:
- rpm-build
- autoconf automake libtool
- systemd-units openssl openssl-devel
- python-devel python3-devel
- python python-twisted-core python-zope-interface python-six
- desktop-file-utils
- groff graphviz
Expand Down
1 change: 1 addition & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Vagrant.require_version ">=1.7.0"
$bootstrap_fedora = <<SCRIPT
dnf -y update
dnf -y install autoconf automake openssl-devel libtool \
python-devel python3-devel \
python-twisted-core python-zope-interface \
desktop-file-utils groff graphviz rpmdevtools nc curl \
wget python-six pyftpdlib checkpolicy selinux-policy-devel \
Expand Down
54 changes: 38 additions & 16 deletions rhel/openvswitch-fedora.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,16 @@ Source: http://openvswitch.org/releases/%{name}-%{version}.tar.gz

BuildRequires: autoconf automake libtool
BuildRequires: systemd-units openssl openssl-devel
BuildRequires: python python-twisted-core python-zope-interface python-six
BuildRequires: python2-devel
BuildRequires: python3-devel
BuildRequires: desktop-file-utils
BuildRequires: groff graphviz
BuildRequires: checkpolicy, selinux-policy-devel
# make check dependencies
%if %{with check}
BuildRequires: python2-twisted python2-zope-interface python2-six
BuildRequires: procps-ng
%endif
%if %{with libcapng}
BuildRequires: libcap-ng libcap-ng-devel
%endif
Expand Down Expand Up @@ -94,22 +98,33 @@ Requires: selinux-policy-targeted
%description selinux-policy
Tailored Open vSwitch SELinux policy

%package -n python-openvswitch
Summary: Open vSwitch python bindings
%package -n python2-openvswitch
Summary: Open vSwitch python2 bindings
License: ASL 2.0
BuildArch: noarch
Requires: python
Requires: python-six
Requires: python2
Requires: python2-six
Provides: python-openvswitch = %{version}-%{release}

%description -n python-openvswitch
%description -n python2-openvswitch
Python bindings for the Open vSwitch database

%package -n python3-openvswitch
Summary: Open vSwitch python3 bindings
License: ASL 2.0
BuildArch: noarch
Requires: python3
Requires: python3-six

%description -n python3-openvswitch
Python bindings for the Open vSwitch database

%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
Requires: python2-openvswitch = %{version}-%{release}
Requires: python2 python2-twisted

%description test
Utilities that are useful to diagnose performance and connectivity
Expand Down Expand Up @@ -167,7 +182,7 @@ Utilities that are use to diagnose and manage the OVN components.
%package ovn-docker
Summary: Open vSwitch - Open Virtual Network support
License: ASL 2.0
Requires: openvswitch openvswitch-ovn-common python-openvswitch
Requires: openvswitch openvswitch-ovn-common python2-openvswitch

%description ovn-docker
Docker network plugins for OVN.
Expand Down Expand Up @@ -222,10 +237,13 @@ install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifdown-ovs \
install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifup-ovs \
$RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs

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/
install -d -m 0755 $RPM_BUILD_ROOT%{python2_sitelib}
install -d -m 0755 $RPM_BUILD_ROOT%{python3_sitelib}
cp -a $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/* \
$RPM_BUILD_ROOT%{python2_sitelib}
cp -a $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/ovs \
$RPM_BUILD_ROOT%{python3_sitelib}
rm -rf $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/

install -d -m 0755 $RPM_BUILD_ROOT/%{_sharedstatedir}/openvswitch

Expand Down Expand Up @@ -411,8 +429,12 @@ fi
%defattr(-,root,root)
%{_datadir}/selinux/packages/%{name}/openvswitch-custom.pp

%files -n python-openvswitch
%{python_sitelib}/ovs
%files -n python2-openvswitch
%{python2_sitelib}/ovs
%doc COPYING

%files -n python3-openvswitch
%{python3_sitelib}/ovs
%doc COPYING

%files test
Expand All @@ -428,7 +450,7 @@ fi
%{_mandir}/man1/ovs-pcap.1*
%{_mandir}/man8/ovs-tcpdump.8*
%{_mandir}/man1/ovs-tcpundump.1*
%{python_sitelib}/ovstest
%{python2_sitelib}/ovstest

%files devel
%{_libdir}/*.a
Expand Down

0 comments on commit bb1a7ca

Please sign in to comment.