forked from pool/openvswitch
- Use build conditionals instead of %define and disable GUI by default
everywhere OBS-URL: https://build.opensuse.org/package/show/network/openvswitch?expand=0&rev=21
This commit is contained in:
parent
ef809c2ca7
commit
4b0966a15e
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 26 11:21:37 UTC 2013 - speilicke@suse.com
|
||||
|
||||
- Use build conditionals instead of %define and disable GUI by default
|
||||
everywhere
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 21 13:23:36 UTC 2013 - tpaszkowski@novell.com
|
||||
|
||||
|
255
openvswitch.spec
255
openvswitch.spec
@ -1,3 +1,4 @@
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@ -12,24 +13,25 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
%define build_kmp 1
|
||||
# never build in kernel module, as openvswitch shipped one is more feature
|
||||
# rich
|
||||
%define build_in_kernel_kmp 0
|
||||
## ipsec build tempoaaryr disabled (need to upgrade ipsec-tools)
|
||||
%define build_ipsec 0
|
||||
# Enable KMP building by default:
|
||||
%bcond_without kmp
|
||||
# Don't build in-kernel module, the shipped one is more feature rich:
|
||||
%bcond_with kernel_kmp
|
||||
# IpSec build disabled temporarily (need to upgrade ipsec-tools):
|
||||
%bcond_with ipsec
|
||||
# Disable GUI building by default (heavy Qt4 dependencies):
|
||||
%bcond_with gui
|
||||
|
||||
Name: openvswitch
|
||||
Version: 1.9.0
|
||||
Release: 2
|
||||
License: Apache-2.0
|
||||
Summary: An open source, production quality, multilayer virtual switch
|
||||
Url: http://openswitch.org/
|
||||
Group: Productivity/Networking/System
|
||||
Source0: http://openvswitch.org/releases/%{name}-%{version}.tar.gz
|
||||
Source1: preamble
|
||||
Version: 1.9.0
|
||||
Release: 0
|
||||
License: Apache-2.0
|
||||
Summary: An open source, production quality, multilayer virtual switch
|
||||
Url: http://openswitch.org/
|
||||
Group: Productivity/Networking/System
|
||||
Source0: http://openvswitch.org/releases/%{name}-%{version}.tar.gz
|
||||
Source1: preamble
|
||||
Source2: openvswitch-switch.init
|
||||
Source3: openvswitch-switch.template
|
||||
Source4: openvswitch-switch.logrotate
|
||||
@ -37,24 +39,27 @@ Source5: openvswitch-controller.init
|
||||
Source6: openvswitch-controller.sysconfig
|
||||
# brcompat is going to be deprecated soon
|
||||
# PATCH-FEATURE-UPSTREAM openvswitch-1.7.0-stp-fwd-delay.patch -- Set STP bridge forward delay
|
||||
Patch1: %name-1.7.0-stp-fwd-delay.patch
|
||||
BuildRequires: autoconf automake libtool
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: perl
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: openssl libopenssl-devel
|
||||
BuildRequires: valgrind-devel
|
||||
BuildRequires: graphviz
|
||||
BuildRequires: python-devel
|
||||
Requires: python
|
||||
Requires: openssl
|
||||
Requires: logrotate
|
||||
Provides: openvswitch-common = %version
|
||||
Patch1: %{name}-1.7.0-stp-fwd-delay.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: gcc
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: graphviz
|
||||
BuildRequires: libopenssl-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: make
|
||||
BuildRequires: openssl
|
||||
BuildRequires: perl
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: valgrind-devel
|
||||
Requires: logrotate
|
||||
Requires: openssl
|
||||
Requires: python
|
||||
Provides: openvswitch-common = %{version}
|
||||
Obsoletes: openvswitch-common <= 1.9.0
|
||||
%py_requires
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%py_requires
|
||||
|
||||
%description
|
||||
Open vSwitch is a production quality, multilayer virtual switch licensed under
|
||||
@ -64,14 +69,13 @@ and protocols (e.g. NetFlow, sFlow, RSPAN, ERSPAN, CLI, LACP, 802.1ag). In addit
|
||||
it is designed to support distribution across multiple physical servers similar to
|
||||
VMware’s vNetwork distributed vswitch or Cisco’s Nexus 1000V.
|
||||
|
||||
%if 0%{?build_kmp}
|
||||
%package -n %{name}-kmp
|
||||
Group: System/Kernel
|
||||
License: GPLv2
|
||||
Summary: Open vSwitch kernel modules
|
||||
BuildRequires: %kernel_module_package_buildreqs
|
||||
%if 0%{?build_in_kernel_kmp}
|
||||
BuildRequires: kernel-source
|
||||
%if %{with kmp}
|
||||
%package kmp
|
||||
Summary: Open vSwitch kernel modules
|
||||
Group: System/Kernel
|
||||
BuildRequires: %kernel_module_package_buildreqs
|
||||
%if %{with kernel_kmp}
|
||||
BuildRequires: kernel-source
|
||||
%endif
|
||||
%suse_kernel_module_package -p %_sourcedir/preamble ec2 xen xenpae vmi um
|
||||
|
||||
@ -79,18 +83,17 @@ BuildRequires: kernel-source
|
||||
Kernel modules supporting the openvswitch datapath
|
||||
%endif
|
||||
|
||||
|
||||
%if 0%{?build_ipsec}
|
||||
%if %{with ipsec}
|
||||
%package ipsec
|
||||
Summary: Open vSwitch GRE-over-IPsec support
|
||||
Group: Productivity/Networking/System
|
||||
Requires: python
|
||||
Requires: python-argparse
|
||||
Requires: ipsec-tools >= 0.8
|
||||
Requires: racoon >= 0.8
|
||||
Requires: openvswitch = %{version}
|
||||
Requires: openvswitch-switch = %{version}
|
||||
Requires: python-openvswitch = %{version}
|
||||
Summary: Open vSwitch GRE-over-IPsec support
|
||||
Group: Productivity/Networking/System
|
||||
Requires: %{name} = %{version}
|
||||
Requires: %{name}-switch = %{version}
|
||||
Requires: ipsec-tools >= 0.8
|
||||
Requires: python
|
||||
Requires: python-argparse
|
||||
Requires: python-openvswitch = %{version}
|
||||
Requires: racoon >= 0.8
|
||||
|
||||
%description ipsec
|
||||
The ovs-monitor-ipsec script provides support for encrypting GRE
|
||||
@ -100,26 +103,27 @@ Open vSwitch is a full-featured software-based Ethernet switch.
|
||||
%endif
|
||||
|
||||
%package switch
|
||||
Suggests: openvswitch-kmp
|
||||
PreReq: %insserv_prereq %fillup_prereq
|
||||
Requires: openvswitch = %{version}
|
||||
Requires: module-init-tools
|
||||
Requires: procps
|
||||
Requires: uuid-runtime
|
||||
Requires: python
|
||||
Summary: Open vSwitch switch implementations
|
||||
Group: Productivity/Networking/System
|
||||
Summary: Open vSwitch switch implementations
|
||||
Group: Productivity/Networking/System
|
||||
Requires(pre): %fillup_prereq
|
||||
Requires(pre): %insserv_prereq
|
||||
Requires: module-init-tools
|
||||
Requires: openvswitch = %{version}
|
||||
Requires: procps
|
||||
Requires: python
|
||||
Requires: uuid-runtime
|
||||
Suggests: openvswitch-kmp
|
||||
|
||||
%description switch
|
||||
openvswitch-switch provides the userspace components and utilities for
|
||||
he Open vSwitch kernel-based switch.
|
||||
the Open vSwitch kernel-based switch.
|
||||
|
||||
Open vSwitch is a full-featured software-based Ethernet switch.
|
||||
|
||||
%package pki
|
||||
Requires: openvswitch = %{version}
|
||||
Summary: Open vSwitch public key infrastructure dependency package
|
||||
Group: Productivity/Networking/System
|
||||
Summary: Open vSwitch public key infrastructure dependency package
|
||||
Group: Productivity/Networking/System
|
||||
Requires: openvswitch = %{version}
|
||||
|
||||
%description pki
|
||||
openvswitch-pki provides PKI (public key infrastructure) support for
|
||||
@ -129,9 +133,9 @@ man-in-the-middle attacks on the Open vSwitch network infrastructure.
|
||||
Open vSwitch is a full-featured software-based Ethernet switch.
|
||||
|
||||
%package controller
|
||||
Requires: openvswitch = %{version}
|
||||
Summary: Open vSwitch controller implementation
|
||||
Group: Productivity/Networking/System
|
||||
Summary: Open vSwitch controller implementation
|
||||
Group: Productivity/Networking/System
|
||||
Requires: openvswitch = %{version}
|
||||
|
||||
%description controller
|
||||
The Open vSwitch controller enables OpenFlow switches that connect to it
|
||||
@ -140,10 +144,10 @@ to act as MAC-learning Ethernet switches.
|
||||
Open vSwitch is a full-featured software-based Ethernet switch.
|
||||
|
||||
%package brcompat
|
||||
Requires: openvswitch-switch = %{version}
|
||||
Recommends: bridge-utils
|
||||
Summary: Open vSwitch bridge compatibility support (deprecated)
|
||||
Group: Productivity/Networking/System
|
||||
Summary: Open vSwitch bridge compatibility support (deprecated)
|
||||
Group: Productivity/Networking/System
|
||||
Requires: openvswitch-switch = %{version}
|
||||
Recommends: bridge-utils
|
||||
|
||||
%description brcompat
|
||||
openvswitch-brcompat provides a way for applications that use the
|
||||
@ -158,35 +162,35 @@ Once this package is installed, adding BRCOMPAT=yes in
|
||||
Open vSwitch is a full-featured software-based Ethernet switch.
|
||||
|
||||
%package -n python-openvswitch
|
||||
Requires: python
|
||||
Summary: Python bindings for Open vSwitch
|
||||
Group: Productivity/Networking/System
|
||||
Summary: Python bindings for Open vSwitch
|
||||
Group: Productivity/Networking/System
|
||||
Requires: python
|
||||
|
||||
%description -n python-openvswitch
|
||||
This package contains the full Python bindings for Open vSwitch database.
|
||||
|
||||
%package -n python-openvswitch-test
|
||||
Requires: python
|
||||
Summary: Python bindings for Open vSwitch
|
||||
Group: Productivity/Networking/System
|
||||
Summary: Python bindings for Open vSwitch
|
||||
Group: Productivity/Networking/System
|
||||
Requires: python
|
||||
|
||||
%description -n python-openvswitch-test
|
||||
This package contains the full Python bindings for Open vSwitch database.
|
||||
|
||||
%if ! 0%{?sles_version}
|
||||
%if %{with gui}
|
||||
%package ovsdbmonitor
|
||||
BuildRequires: python-qt4-devel
|
||||
Summary: Open vSwitch graphical monitoring tool
|
||||
Group: Productivity/Networking/System
|
||||
BuildRequires: python-pyside
|
||||
BuildRequires: python-qt4-devel
|
||||
BuildRequires: python-twisted
|
||||
BuildRequires: python-zopeinterface
|
||||
BuildRequires: python-pyside
|
||||
Requires: python-pyside
|
||||
Requires: python-qt4
|
||||
Requires: python-twisted
|
||||
Requires: python-zopeinterface
|
||||
BuildRequires: python-zopeinterface
|
||||
Requires: python-openvswitch
|
||||
Requires: python-pyasn1
|
||||
Summary: Open vSwitch graphical monitoring tool
|
||||
Group: Productivity/Networking/System
|
||||
Requires: python-pyside
|
||||
Requires: python-qt4
|
||||
Requires: python-twisted
|
||||
Requires: python-zopeinterface
|
||||
|
||||
%description ovsdbmonitor
|
||||
This package is a GUI tool for monitoring and troubleshooting local
|
||||
@ -199,12 +203,12 @@ Open vSwitch is a full-featured software-based Ethernet switch.
|
||||
%endif
|
||||
|
||||
%package test
|
||||
Requires: python-twisted
|
||||
Requires: python
|
||||
Requires: python-argparse
|
||||
Requires: python-openvswitch-test = %{version}
|
||||
Summary: Open vSwitch test package
|
||||
Group: Productivity/Networking/System
|
||||
Summary: Open vSwitch test package
|
||||
Group: Productivity/Networking/System
|
||||
Requires: python
|
||||
Requires: python-argparse
|
||||
Requires: python-openvswitch-test = %{version}
|
||||
Requires: python-twisted
|
||||
|
||||
%description test
|
||||
This package contains utilities that are useful to diagnose
|
||||
@ -228,8 +232,8 @@ pushd source
|
||||
bash -x boot.sh
|
||||
%endif
|
||||
popd
|
||||
%if 0%{?build_kmp}
|
||||
%if 0%{?build_in_kernel_kmp}
|
||||
%if %{with kmp}
|
||||
%if %{with kernel_kmp}
|
||||
for flavor in %flavors_to_build; do
|
||||
mkdir -p $flavor
|
||||
cp -a $RPM_SOURCE_DIR/Module.supported $flavor/
|
||||
@ -239,7 +243,7 @@ for flavor in %flavors_to_build; do
|
||||
make -C %{kernel_source $flavor} modules M=$PWD/$flavor
|
||||
done
|
||||
%else
|
||||
export EXTRA_CFLAGS='-DVERSION=\"%version\"'
|
||||
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
|
||||
for flavor in %flavors_to_build; do
|
||||
rm -rf obj/$flavor
|
||||
cp -r source obj/$flavor
|
||||
@ -262,11 +266,11 @@ make %{?_smp_mflags}
|
||||
popd
|
||||
|
||||
%install
|
||||
%if 0%{?build_kmp}
|
||||
%if %{with kmp}
|
||||
export INSTALL_MOD_PATH=%{buildroot}
|
||||
export INSTALL_MOD_DIR=updates
|
||||
for flavor in %flavors_to_build; do
|
||||
%if 0%{?build_in_kernel_kmp}
|
||||
%if %{with kernel_kmp}
|
||||
make -C %{kernel_source $flavor} modules_install M=$PWD/$flavor
|
||||
%else
|
||||
pushd obj/$flavor/datapath/linux
|
||||
@ -277,46 +281,43 @@ done
|
||||
%endif
|
||||
pushd source
|
||||
|
||||
%makeinstall
|
||||
install -d -m 755 %{buildroot}/%_sysconfdir/init.d
|
||||
install -d -m 755 %{buildroot}/var/adm/fillup-templates
|
||||
%make_install
|
||||
install -d -m 755 %{buildroot}/%{_sysconfdir}/init.d
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/adm/fillup-templates
|
||||
|
||||
install -m 644 %SOURCE3 \
|
||||
%{buildroot}/var/adm/fillup-templates/sysconfig.%{name}-switch
|
||||
install -m 644 %SOURCE6 \
|
||||
%{buildroot}/var/adm/fillup-templates/sysconfig.%{name}-controller
|
||||
install -m 755 %SOURCE2 \
|
||||
%{buildroot}/%_sysconfdir/init.d/%{name}-switch
|
||||
ln -s %_sysconfdir/init.d/%{name}-switch %{buildroot}%{_sbindir}/rc%{name}-switch
|
||||
install -m 755 %SOURCE5 \
|
||||
%{buildroot}/%_sysconfdir/init.d/%{name}-controller
|
||||
ln -s %_sysconfdir/init.d/%{name}-controller %{buildroot}%{_sbindir}/rc%{name}-controller
|
||||
install -m 644 %{SOURCE3} \
|
||||
%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}-switch
|
||||
install -m 644 %{SOURCE6} \
|
||||
%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}-controller
|
||||
install -m 755 %{SOURCE2} \
|
||||
%{buildroot}/%{_sysconfdir}/init.d/%{name}-switch
|
||||
ln -s %{_sysconfdir}/init.d/%{name}-switch %{buildroot}%{_sbindir}/rc%{name}-switch
|
||||
install -m 755 %{SOURCE5} \
|
||||
%{buildroot}/%{_sysconfdir}/init.d/%{name}-controller
|
||||
ln -s %{_sysconfdir}/init.d/%{name}-controller %{buildroot}%{_sbindir}/rc%{name}-controller
|
||||
|
||||
|
||||
install -d -m 755 %{buildroot}/%_sysconfdir/sysconfig
|
||||
install -d -m 755 %{buildroot}/%_sysconfdir/logrotate.d
|
||||
install -d -m 755 %{buildroot}/%{_sysconfdir}/sysconfig
|
||||
install -d -m 755 %{buildroot}/%{_sysconfdir}/logrotate.d
|
||||
|
||||
install -m 644 %SOURCE4 \
|
||||
%{buildroot}/%_sysconfdir/logrotate.d/%{name}-switch
|
||||
install -d -m 755 %{buildroot}/%_sysconfdir/profile.d
|
||||
install -m 644 %{SOURCE4} \
|
||||
%{buildroot}/%{_sysconfdir}/logrotate.d/%{name}-switch
|
||||
install -d -m 755 %{buildroot}/%{_sysconfdir}/profile.d
|
||||
|
||||
install -d -m 755 %{buildroot}/%{_datadir}/%{name}/scripts
|
||||
install -m 644 vswitchd/vswitch.ovsschema \
|
||||
%{buildroot}/%{_datadir}/%{name}/vswitch.ovsschema
|
||||
%if 0%{?build_ipsec}
|
||||
%if %{with ipsec}
|
||||
install -m 755 debian/ovs-monitor-ipsec \
|
||||
%{buildroot}/%{_datadir}/%{name}/ovs-monitor-ipsec
|
||||
%endif
|
||||
|
||||
popd
|
||||
|
||||
%{__mkdir_p} %{buildroot}%{py_sitedir}
|
||||
mkdir -p %{buildroot}%{py_sitedir}
|
||||
mv %{buildroot}%{_datadir}/%{name}/python/* %{buildroot}%{py_sitedir}
|
||||
rmdir %{buildroot}%{_datadir}/%{name}/python
|
||||
|
||||
%clean
|
||||
%{?buildroot:%__rm -rf "%{buildroot}"}
|
||||
|
||||
%post switch
|
||||
%{fillup_and_insserv openvswitch-switch}
|
||||
|
||||
@ -375,19 +376,17 @@ rmdir %{buildroot}%{_datadir}/%{name}/python
|
||||
%{_sysconfdir}/init.d/openvswitch-controller
|
||||
%{_sbindir}/rc%{name}-controller
|
||||
%{_mandir}/man8/ovs-controller.8.gz
|
||||
/var/adm/fillup-templates/sysconfig.openvswitch-controller
|
||||
%{_localstatedir}/adm/fillup-templates/sysconfig.openvswitch-controller
|
||||
|
||||
%files -n python-openvswitch
|
||||
%defattr(-,root,root)
|
||||
%dir %{py_sitedir}/ovs
|
||||
%{py_sitedir}/ovs/*
|
||||
%{py_sitedir}/ovs/
|
||||
|
||||
%files -n python-openvswitch-test
|
||||
%defattr(-,root,root)
|
||||
%dir %{py_sitedir}/ovstest
|
||||
%{py_sitedir}/ovstest/*
|
||||
%{py_sitedir}/ovstest/
|
||||
|
||||
%if 0%{?build_ipsec}
|
||||
%if %{with ipsec}
|
||||
%files ipsec
|
||||
%defattr(-,root,root)
|
||||
%{_datadir}/openvswitch/ovs-monitor-ipsec
|
||||
@ -407,7 +406,7 @@ rmdir %{buildroot}%{_datadir}/%{name}/python
|
||||
%{_datadir}/openvswitch/scripts/ovs-lib
|
||||
%{_datadir}/openvswitch/scripts/ovs-save
|
||||
%{_datadir}/openvswitch/vswitch.ovsschema
|
||||
/var/adm/fillup-templates/sysconfig.openvswitch-switch
|
||||
%{_localstatedir}/adm/fillup-templates/sysconfig.openvswitch-switch
|
||||
%{_sysconfdir}/init.d/openvswitch-switch
|
||||
%{_sbindir}/rc%{name}-switch
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/openvswitch-switch
|
||||
@ -430,7 +429,7 @@ rmdir %{buildroot}%{_datadir}/%{name}/python
|
||||
%{_mandir}/man8/ovs-l3ping.8.gz
|
||||
%{_mandir}/man8/ovs-vlan-test.8.gz
|
||||
|
||||
%if ! 0%{?sles_version}
|
||||
%if %{with gui}
|
||||
%files ovsdbmonitor
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/ovsdbmonitor
|
||||
|
Loading…
Reference in New Issue
Block a user