[ovs-dev] [PATCH] Drop support for RHEL 5 and 6

Russell Bryant russell at ovn.org
Wed Jan 17 13:48:13 UTC 2018


OK - fine with me.

So an alternative patch would be to document that this spec is now
just an alternative for RHEL7 vs one for 5 / 6?

On Tue, Jan 16, 2018 at 11:56 PM, Guru Shetty <guru at ovn.org> wrote:
> We use RHEL6 spec to build rpms for RHEL7 as we still use sysV scripts. We
> will need quite a bit of scripting changes, install script changes,
> dependencies etc to get ourselves accustomed to systemd. So I would prefer
> that we not do this till OVS 2.10 atleast.
>
> On 16 January 2018 at 08:44, Russell Bryant <russell at ovn.org> wrote:
>>
>> On Thu, Jan 11, 2018 at 11:36 AM, Timothy Redaelli <tredaelli at redhat.com>
>> wrote:
>> > RHEL 6 is not supported anymore since it uses Python 2.6 and GCC 4.4.x,
>> > but Open vSwitch needs, at least, Python 2.7 and GCC 4.6 to build
>> > correctly.
>> >
>> >
>> > http://docs.openvswitch.org/en/latest/intro/install/general/#build-requirements
>> >
>> > CC: Gurucharan Shetty <guru at ovn.org>
>> > Signed-off-by: Timothy Redaelli <tredaelli at redhat.com>
>>
>> Acked-by: Russell Bryant <russell at ovn.org>
>>
>> I'm fine with this, but I'll let Guru comment as well before applying
>> anything.
>>
>> > ---
>> >
>> > This is the same, rejected, patch I sent as RFC since I have, in the
>> > meanwhile, sent another patchset (already merged) to add the requested
>> > "force-reload-kmod" support on RHEL7 ("ovs-systemd-reload
>> > force-reload-kmod").
>> >
>> >  Documentation/automake.mk             |   1 -
>> >  Documentation/howto/docker.rst        |   2 +-
>> >  Documentation/index.rst               |   1 -
>> >  Documentation/intro/install/index.rst |   1 -
>> >  Documentation/intro/install/rhel.rst  | 238
>> > ------------------------------
>> >  rhel/.gitignore                       |   3 -
>> >  rhel/automake.mk                      |  11 --
>> >  rhel/openvswitch-kmod-rhel6.spec.in   |  78 ----------
>> >  rhel/openvswitch-kmod.files           |   3 -
>> >  rhel/openvswitch.spec.in              | 267
>> > ----------------------------------
>> >  10 files changed, 1 insertion(+), 604 deletions(-)
>> >  delete mode 100644 Documentation/intro/install/rhel.rst
>> >  delete mode 100644 rhel/openvswitch-kmod-rhel6.spec.in
>> >  delete mode 100644 rhel/openvswitch-kmod.files
>> >  delete mode 100644 rhel/openvswitch.spec.in
>> >
>> > diff --git a/Documentation/automake.mk b/Documentation/automake.mk
>> > index 2b202cb2a..e614b9de1 100644
>> > --- a/Documentation/automake.mk
>> > +++ b/Documentation/automake.mk
>> > @@ -18,7 +18,6 @@ DOC_SOURCE = \
>> >         Documentation/intro/install/general.rst \
>> >         Documentation/intro/install/netbsd.rst \
>> >         Documentation/intro/install/ovn-upgrades.rst \
>> > -       Documentation/intro/install/rhel.rst \
>> >         Documentation/intro/install/userspace.rst \
>> >         Documentation/intro/install/windows.rst \
>> >         Documentation/intro/install/xenserver.rst \
>> > diff --git a/Documentation/howto/docker.rst
>> > b/Documentation/howto/docker.rst
>> > index ff8b708af..c3d4dbf20 100644
>> > --- a/Documentation/howto/docker.rst
>> > +++ b/Documentation/howto/docker.rst
>> > @@ -296,7 +296,7 @@ The "underlay" mode
>> >     Depending on your VM, you can make the above step persistent across
>> > reboots.
>> >     For example, if your VM is Debian/Ubuntu-based, read
>> >     `openvswitch-switch.README.Debian` found in `debian` folder. If your
>> > VM is
>> > -   RHEL-based, refer to :doc:`/intro/install/rhel`.
>> > +   Fedora/RHEL7/CentOS7-based, refer to :doc:`/intro/install/fedora`.
>> >
>> >  3. Start the Open vSwitch network driver
>> >
>> > diff --git a/Documentation/index.rst b/Documentation/index.rst
>> > index ddffa3a62..dac14ba58 100644
>> > --- a/Documentation/index.rst
>> > +++ b/Documentation/index.rst
>> > @@ -86,7 +86,6 @@ Deeper Dive
>> >  - **Testing** :doc:`topics/testing`
>> >
>> >  - **Packaging:** :doc:`intro/install/debian` |
>> > -  :doc:`intro/install/rhel` |
>> >    :doc:`intro/install/fedora`
>> >
>> >  The Open vSwitch Project
>> > diff --git a/Documentation/intro/install/index.rst
>> > b/Documentation/intro/install/index.rst
>> > index 3193c736c..626b49f12 100644
>> > --- a/Documentation/intro/install/index.rst
>> > +++ b/Documentation/intro/install/index.rst
>> > @@ -59,7 +59,6 @@ provided below.
>> >     distributions
>> >     debian
>> >     fedora
>> > -   rhel
>> >
>> >  Upgrades
>> >  --------
>> > diff --git a/Documentation/intro/install/rhel.rst
>> > b/Documentation/intro/install/rhel.rst
>> > deleted file mode 100644
>> > index f8b26069f..000000000
>> > --- a/Documentation/intro/install/rhel.rst
>> > +++ /dev/null
>> > @@ -1,238 +0,0 @@
>> > -..
>> > -      Licensed under the Apache License, Version 2.0 (the "License");
>> > you may
>> > -      not use this file except in compliance with the License. You may
>> > obtain
>> > -      a copy of the License at
>> > -
>> > -          http://www.apache.org/licenses/LICENSE-2.0
>> > -
>> > -      Unless required by applicable law or agreed to in writing,
>> > software
>> > -      distributed under the License is distributed on an "AS IS" BASIS,
>> > WITHOUT
>> > -      WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>> > See the
>> > -      License for the specific language governing permissions and
>> > limitations
>> > -      under the License.
>> > -
>> > -      Convention for heading levels in Open vSwitch documentation:
>> > -
>> > -      =======  Heading 0 (reserved for the title in a document)
>> > -      -------  Heading 1
>> > -      ~~~~~~~  Heading 2
>> > -      +++++++  Heading 3
>> > -      '''''''  Heading 4
>> > -
>> > -      Avoid deeper levels because they do not render well.
>> > -
>> > -========================================
>> > -RHEL 5.6, 6.x Packaging for Open vSwitch
>> > -========================================
>> > -
>> > -This document describes how to build and install Open vSwitch on a Red
>> > Hat
>> > -Enterprise Linux (RHEL) host.  If you want to install Open vSwitch on a
>> > generic
>> > -Linux host, refer to :doc:`general` instead.
>> > -
>> > -We have tested these instructions with RHEL 5.6 and RHEL 6.0.
>> > -
>> > -For RHEL 7.x (or derivatives, such as CentOS 7.x), you should follow
>> > the
>> > -instructions in the :doc:`fedora`.  The Fedora spec files are used for
>> > RHEL
>> > -7.x.
>> > -
>> > -.. _rhel-prerequisites:
>> > -
>> > -Prerequisites
>> > --------------
>> > -
>> > -You may build from an Open vSwitch distribution tarball or from an Open
>> > vSwitch
>> > -Git tree.
>> > -
>> > -The default RPM build directory, ``_topdir``, has five directories in
>> > the
>> > -top-level.
>> > -
>> > -BUILD/
>> > -  where the software is unpacked and built
>> > -RPMS/
>> > -  where the newly created binary package files are written
>> > -SOURCES/
>> > -  contains the original sources, patches, and icon files
>> > -SPECS/
>> > -  contains the spec files for each package to be built
>> > -SRPMS/
>> > -  where the newly created source package files are written
>> > -
>> > -Before you begin, note the RPM sources directory on your version of
>> > RHEL.  The
>> > -command ``rpmbuild --showrc`` will show the configuration for each of
>> > those
>> > -directories. Alternatively, the command ``rpm --eval '%{_topdir}'``
>> > shows the
>> > -current configuration for the top level directory and the command ``rpm
>> > --eval
>> > -'%{_sourcedir}'`` does the same for the sources directory. On RHEL 5,
>> > the
>> > -default RPM ``_topdir`` is ``/usr/src/redhat`` and the default RPM
>> > sources
>> > -directory is ``/usr/src/redhat/SOURCES``. On RHEL 6, the default
>> > ``_topdir`` is
>> > -``$HOME/rpmbuild`` and the default RPM sources directory is
>> > -``$HOME/rpmbuild/SOURCES``.
>> > -
>> > -Build Requirements
>> > -------------------
>> > -
>> > -You will need to install all required packages to build the RPMs.
>> > -The command below will install RPM tools and generic build
>> > dependencies::
>> > -
>> > -    $ yum install @'Development Tools' rpm-build yum-utils
>> > -
>> > -Then it is necessary to install Open vSwitch specific build
>> > dependencies.
>> > -The dependencies are listed in the SPEC file, but first it is necessary
>> > -to replace the VERSION tag to be a valid SPEC.
>> > -
>> > -The command below will create a temporary SPEC file::
>> > -
>> > -    $ sed -e 's/@VERSION@/0.0.1/' rhel/openvswitch.spec.in >
>> > /tmp/ovs.spec
>> > -
>> > -And to install specific dependencies, use yum-builddep tool::
>> > -
>> > -    $ yum-builddep /tmp/ovs.spec
>> > -
>> > -Once that is completed, remove the file ``/tmp/ovs.spec``.
>> > -
>> > -If python-sphinx package is not available in your version of RHEL, you
>> > can
>> > -install it via pip with 'pip install sphinx'.
>> > -
>> > -Open vSwitch requires python 2.7 or newer which is not available in
>> > older
>> > -distributions. In the case of RHEL 6.x and its derivatives, one option
>> > is
>> > -to install python34 and python34-six from `EPEL`_.
>> > -
>> > -.. _EPEL: https://fedoraproject.org/wiki/EPEL
>> > -
>> > -.. _rhel-bootstrapping:
>> > -
>> > -Bootstrapping and Configuring
>> > ------------------------------
>> > -
>> > -If you are building from a distribution tarball, skip to
>> > :ref:`rhel-building`.
>> > -If not, you must be building from an Open vSwitch Git tree.  Determine
>> > what
>> > -version of Autoconf is installed (e.g. run ``autoconf --version``).  If
>> > it is
>> > -not at least version 2.63, then you must upgrade or use another machine
>> > to
>> > -build the packages.
>> > -
>> > -Assuming all requirements have been met, build the tarball by running::
>> > -
>> > -    $ ./boot.sh
>> > -    $ ./configure
>> > -    $ make dist
>> > -
>> > -You must run this on a machine that has the tools listed in
>> > -:ref:`general-build-reqs` as prerequisites for building from a Git
>> > tree.
>> > -Afterward, proceed with the rest of the instructions using the
>> > distribution
>> > -tarball.
>> > -
>> > -Now you have a distribution tarball, named something like
>> > -``openvswitch-x.y.z.tar.gz``.  Copy this file into the RPM sources
>> > directory,
>> > -e.g.::
>> > -
>> > -    $ cp openvswitch-x.y.z.tar.gz $HOME/rpmbuild/SOURCES
>> > -
>> > -Broken ``build`` symlink
>> > -~~~~~~~~~~~~~~~~~~~~~~~~
>> > -
>> > -Some versions of the RHEL 6 kernel-devel package contain a broken
>> > ``build``
>> > -symlink.  If you are using such a version, you must fix the problem
>> > before
>> > -continuing.
>> > -
>> > -To find out whether you are affected, run::
>> > -
>> > -    $ cd /lib/modules/<version>
>> > -    $ ls -l build/
>> > -
>> > -where ``<version>`` is the version number of the RHEL 6 kernel.
>> > -
>> > -.. note::
>> > -  The trailing slash in the final command is important.  Be sure to
>> > include
>> > -  it.
>> > -
>> > -If the ``ls`` command produces a directory listing, your kernel-devel
>> > package
>> > -is OK.  If it produces a ``No such file or directory`` error, your
>> > kernel-devel
>> > -package is buggy.
>> > -
>> > -If your kernel-devel package is buggy, then you can fix it with::
>> > -
>> > -    $ cd /lib/modules/<version>
>> > -    $ rm build
>> > -    $ ln -s /usr/src/kernels/<target> build
>> > -
>> > -where ``<target>`` is the name of an existing directory under
>> > -``/usr/src/kernels``, whose name should be similar to ``<version>`` but
>> > may
>> > -contain some extra parts.  Once you have done this, verify the fix with
>> > the
>> > -same procedure you used above to check for the problem.
>> > -
>> > -.. _rhel-building:
>> > -
>> > -Building
>> > ---------
>> > -
>> > -You should have a distribution tarball named something like
>> > -openvswitch-x.y.z.tar.gz.  Copy this file into the RPM sources
>> > directory::
>> > -
>> > -    $ cp openvswitch-x.y.z.tar.gz $HOME/rpmbuild/SOURCES
>> > -
>> > -Make another copy of the distribution tarball in a temporary directory.
>> > Then
>> > -unpack the tarball and ``cd`` into its root::
>> > -
>> > -    $ tar xzf openvswitch-x.y.z.tar.gz
>> > -    $ cd openvswitch-x.y.z
>> > -
>> > -Userspace
>> > -~~~~~~~~~
>> > -
>> > -To build Open vSwitch userspace, run::
>> > -
>> > -    $ rpmbuild -bb rhel/openvswitch.spec
>> > -
>> > -This produces two RPMs: "openvswitch" and "openvswitch-debuginfo".
>> > -
>> > -The above command automatically runs the Open vSwitch unit tests.  To
>> > disable
>> > -the unit tests, run::
>> > -
>> > -    $ rpmbuild -bb --without check rhel/openvswitch.spec
>> > -
>> > -.. note::
>> > -   If the build fails with ``configure: error: source dir
>> > -   /lib/modules/2.6.32-279.el6.x86_64/build doesn't exist`` or similar,
>> > then
>> > -   the kernel-devel package is missing or buggy.
>> > -
>> > -Kernel Module
>> > -~~~~~~~~~~~~~
>> > -
>> > -On RHEL 6, to build the Open vSwitch kernel module, copy
>> > -rhel/openvswitch-kmod.files into the RPM sources directory and run::
>> > -
>> > -    $ rpmbuild -bb rhel/openvswitch-kmod-rhel6.spec
>> > -
>> > -You might have to specify a kernel version and/or variants, e.g.:
>> > -
>> > -    $ rpmbuild -bb \
>> > -        -D "kversion 2.6.32-131.6.1.el6.x86_64" \
>> > -        -D "kflavors default debug kdump" \
>> > -        rhel/openvswitch-kmod-rhel6.spec
>> > -
>> > -This produces an "kmod-openvswitch" RPM for each kernel variant, in
>> > this
>> > -example: "kmod-openvswitch", "kmod-openvswitch-debug", and
>> > -"kmod-openvswitch-kdump".
>> > -
>> > -.. _rhel-script-integrations:
>> > -
>> > -Red Hat Network Scripts Integration
>> > ------------------------------------
>> > -
>> > -A RHEL host has default firewall rules that prevent any Open vSwitch
>> > tunnel
>> > -traffic from passing through. If a user configures Open vSwitch tunnels
>> > like
>> > -Geneve, GRE, VXLAN, LISP etc., they will either have to manually add
>> > iptables
>> > -firewall rules to allow the tunnel traffic or add it through a startup
>> > script
>> > -Refer to the "enable-protocol" command in the ovs-ctl(8) manpage for
>> > more
>> > -information.
>> > -
>> > -In addition, simple integration with Red Hat network scripts has been
>> > -implemented.  Refer to `README.RHEL.rst`__ in the source tree or
>> > -/usr/share/doc/openvswitch/README.RHEL.rst in the installed openvswitch
>> > package
>> > -for details.
>> > -
>> > -__ https://github.com/openvswitch/ovs/blob/master/rhel/README.RHEL.rst
>> > -
>> > -Reporting Bugs
>> > ---------------
>> > -
>> > -Report problems to bugs at openvswitch.org.
>> > diff --git a/rhel/.gitignore b/rhel/.gitignore
>> > index e584a1ed0..0fbcba69f 100644
>> > --- a/rhel/.gitignore
>> > +++ b/rhel/.gitignore
>> > @@ -1,7 +1,4 @@
>> >  openvswitch-dkms.spec
>> > -openvswitch-kmod-rhel5.spec
>> > -openvswitch-kmod-rhel6.spec
>> >  openvswitch-kmod-fedora.spec
>> > -openvswitch.spec
>> >  openvswitch-fedora.spec
>> >  usr_lib_systemd_system_ovs-vswitchd.service
>> > diff --git a/rhel/automake.mk b/rhel/automake.mk
>> > index 137ff4a39..e8abc0b65 100644
>> > --- a/rhel/automake.mk
>> > +++ b/rhel/automake.mk
>> > @@ -15,13 +15,8 @@ EXTRA_DIST += \
>> >         rhel/etc_sysconfig_network-scripts_ifup-ovs \
>> >         rhel/openvswitch-dkms.spec \
>> >         rhel/openvswitch-dkms.spec.in \
>> > -       rhel/openvswitch-kmod-rhel6.spec \
>> > -       rhel/openvswitch-kmod-rhel6.spec.in \
>> > -       rhel/openvswitch-kmod.files \
>> >         rhel/openvswitch-kmod-fedora.spec \
>> >         rhel/openvswitch-kmod-fedora.spec.in \
>> > -       rhel/openvswitch.spec \
>> > -       rhel/openvswitch.spec.in \
>> >         rhel/openvswitch-fedora.spec \
>> >         rhel/openvswitch-fedora.spec.in \
>> >         rhel/usr_share_openvswitch_scripts_ovs-systemd-reload \
>> > @@ -48,15 +43,9 @@ update_rhel_spec = \
>> >  $(srcdir)/rhel/openvswitch-dkms.spec: rhel/openvswitch-dkms.spec.in
>> > $(top_builddir)/config.status
>> >         $(update_rhel_spec)
>> >
>> > -$(srcdir)/rhel/openvswitch-kmod-rhel6.spec:
>> > rhel/openvswitch-kmod-rhel6.spec.in $(top_builddir)/config.status
>> > -       $(update_rhel_spec)
>> > -
>> >  $(srcdir)/rhel/openvswitch-kmod-fedora.spec:
>> > rhel/openvswitch-kmod-fedora.spec.in $(top_builddir)/config.status
>> >         $(update_rhel_spec)
>> >
>> > -$(srcdir)/rhel/openvswitch.spec: rhel/openvswitch.spec.in
>> > $(top_builddir)/config.status
>> > -       $(update_rhel_spec)
>> > -
>> >  $(srcdir)/rhel/openvswitch-fedora.spec: rhel/openvswitch-fedora.spec.in
>> > $(top_builddir)/config.status
>> >         $(update_rhel_spec)
>> >
>> > diff --git a/rhel/openvswitch-kmod-rhel6.spec.in
>> > b/rhel/openvswitch-kmod-rhel6.spec.in
>> > deleted file mode 100644
>> > index 8413b254f..000000000
>> > --- a/rhel/openvswitch-kmod-rhel6.spec.in
>> > +++ /dev/null
>> > @@ -1,78 +0,0 @@
>> > -# Spec file for Open vSwitch kernel modules on Red Hat Enterprise
>> > -# Linux 6.
>> > -
>> > -# Copyright (C) 2011, 2012 Nicira, Inc.
>> > -#
>> > -# 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.
>> > -
>> > -%define oname openvswitch
>> > -
>> > -Name:           %{oname}-kmod
>> > -Version:        @VERSION@
>> > -Release:        1%{?dist}
>> > -Summary:        Open vSwitch kernel module
>> > -
>> > -Group:          System/Kernel
>> > -License:        GPLv2
>> > -URL:            http://openvswitch.org/
>> > -Source0:        %{oname}-%{version}.tar.gz
>> > -Source1:        %{oname}-kmod.files
>> > -BuildRoot:      %(mktemp -ud
>> > %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
>> > -BuildRequires:  %kernel_module_package_buildreqs
>> > -
>> > -# Without this we get an empty openvswitch-debuginfo package (whose
>> > name
>> > -# conflicts with the openvswitch-debuginfo package for OVS userspace).
>> > -%undefine _enable_debug_packages
>> > -
>> > -# Use -D 'kversion 2.6.32-131.6.1.el6.x86_64' to build package
>> > -# for specified kernel version.
>> > -%{?kversion:%define kernel_version %kversion}
>> > -
>> > -# Use -D 'kflavors default debug kdump' to build packages for
>> > -# specified kernel variants.
>> > -%{!?kflavors:%define kflavors default}
>> > -
>> > -%kernel_module_package -n %{oname} -f %{SOURCE1} %kflavors
>> > -
>> > -%description
>> > -Open vSwitch Linux kernel module.
>> > -
>> > -%prep
>> > -
>> > -%setup -n %{oname}-%{version}
>> > -
>> > -%build
>> > -for flavor in %flavors_to_build; do
>> > -       mkdir _$flavor
>> > -       (cd _$flavor && ../configure --with-linux="%{kernel_source
>> > $flavor}")
>> > -       %{__make} -C _$flavor/datapath/linux %{?_smp_mflags}
>> > -done
>> > -
>> > -%install
>> > -export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
>> > -export INSTALL_MOD_DIR=extra/%{oname}
>> > -for flavor in %flavors_to_build ; do
>> > -         make -C %{kernel_source $flavor} modules_install \
>> > -                 M="`pwd`"/_$flavor/datapath/linux
>> > -
>> > -         # Cleanup unnecessary kernel-generated module dependency
>> > files.
>> > -         find $INSTALL_MOD_PATH/lib/modules -iname 'modules.*' -exec rm
>> > {} \;
>> > -done
>> > -install -d %{buildroot}%{_sysconfdir}/depmod.d/
>> > -for module in
>> > %{buildroot}/lib/modules/%{kernel_version}/$INSTALL_MOD_DIR/*.ko;
>> > -do
>> > -    modname="$(basename ${module})"
>> > -    echo "override ${modname%.ko} * extra/%{oname}" >> %{oname}.conf
>> > -    echo "override ${modname%.ko} * weak-updates/%{oname}" >>
>> > %{oname}.conf
>> > -done
>> > -install -m 644 %{oname}.conf %{buildroot}%{_sysconfdir}/depmod.d/
>> > -
>> > -%files
>> > -%defattr(644,root,root)
>> > -/etc/depmod.d/%{oname}.conf
>> > -
>> > -%clean
>> > -rm -rf $RPM_BUILD_ROOT
>> > diff --git a/rhel/openvswitch-kmod.files b/rhel/openvswitch-kmod.files
>> > deleted file mode 100644
>> > index 357c2e8b7..000000000
>> > --- a/rhel/openvswitch-kmod.files
>> > +++ /dev/null
>> > @@ -1,3 +0,0 @@
>> > -%defattr(644,root,root,755)
>> > -/lib/modules/%2-%1
>> > -/etc/depmod.d/openvswitch.conf
>> > diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in
>> > deleted file mode 100644
>> > index e510d351b..000000000
>> > --- a/rhel/openvswitch.spec.in
>> > +++ /dev/null
>> > @@ -1,267 +0,0 @@
>> > -# Spec file for Open vSwitch on Red Hat Enterprise Linux.
>> > -
>> > -# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira,
>> > Inc.
>> > -#
>> > -# 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.
>> > -#
>> > -# If tests have to be skipped while building, specify the '--without
>> > check'
>> > -# option. For example:
>> > -#     rpmbuild -bb --without check rhel/openvswitch.spec
>> > -#
>> > -# Support for executing kernel data path tests under rpmbuild is
>> > -# provided, however this is intended for use only in test environments
>> > -# and should not be used otherwise (these tests require root
>> > privileges).
>> > -# These tests can be executed, for example, via:
>> > -#    rpmbuild -rb --with check_datapath_kernel openvswitch.src.rpm
>> > -#
>> > -# These tests will use the currently installed OVS kernel modules, when
>> > -# testing out of tree kernel modules the appropriate openvswitch-kmod
>> > -# package should be installed first.
>> > -
>> > -Name: openvswitch
>> > -Summary: Open vSwitch daemon/database/utilities
>> > -Group: System Environment/Daemons
>> > -URL: http://www.openvswitch.org/
>> > -Vendor: Nicira, Inc.
>> > -Version: @VERSION@
>> > -
>> > -License: ASL 2.0
>> > -Release: 1
>> > -Source: openvswitch-%{version}.tar.gz
>> > -Buildroot: /tmp/openvswitch-rpm
>> > -Requires: logrotate, hostname, python >= 2.7, python-six
>> > -BuildRequires: python-six
>> > -BuildRequires: openssl-devel
>> > -BuildRequires: checkpolicy, selinux-policy-devel
>> > -
>> > -%bcond_without check
>> > -%bcond_with check_datapath_kernel
>> > -
>> > -%description
>> > -Open vSwitch provides standard network bridging functions and
>> > -support for the OpenFlow protocol for remote per-flow control of
>> > -traffic.
>> > -
>> > -%package devel
>> > -Summary:        Open vSwitch development package
>> > -Group:          Development/Libraries
>> > -
>> > -%description devel
>> > -This package provides openvswitch headers and libopenvswitch for
>> > developers.
>> > -
>> > -%package selinux-policy
>> > -Summary: Open vSwitch SELinux policy
>> > -License: ASL 2.0
>> > -BuildArch: noarch
>> > -Requires: selinux-policy-targeted
>> > -
>> > -%description selinux-policy
>> > -Tailored Open vSwitch SELinux policy
>> > -
>> > -%prep
>> > -%setup -q
>> > -
>> > -%build
>> > -./configure --prefix=/usr --sysconfdir=/etc
>> > --localstatedir=%{_localstatedir} \
>> > -    --libdir=%{_libdir} --enable-ssl --enable-shared
>> > -make %{_smp_mflags}
>> > -make selinux/openvswitch-custom.te
>> > -cd selinux
>> > -make -f %{_datadir}/selinux/devel/Makefile
>> > -
>> > -%install
>> > -rm -rf $RPM_BUILD_ROOT
>> > -make install DESTDIR=$RPM_BUILD_ROOT
>> > -
>> > -rhel_cp() {
>> > - base=$1
>> > - mode=$2
>> > - dst=$RPM_BUILD_ROOT/$(echo $base | sed 's,_,/,g')
>> > - install -D -m $mode rhel/$base $dst
>> > -}
>> > -rhel_cp etc_init.d_openvswitch 0755
>> > -rhel_cp etc_logrotate.d_openvswitch 0644
>> > -rhel_cp etc_sysconfig_network-scripts_ifup-ovs 0755
>> > -rhel_cp etc_sysconfig_network-scripts_ifdown-ovs 0755
>> > -rhel_cp usr_share_openvswitch_scripts_sysconfig.template 0644
>> > -
>> > -install -p -m 644 -D selinux/openvswitch-custom.pp \
>> > -
>> > $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}/openvswitch-custom.pp
>> > -
>> > -# Get rid of stuff we don't want to make RPM happy.
>> > -rm \
>> > -    $RPM_BUILD_ROOT/usr/bin/ovs-testcontroller \
>> > -    $RPM_BUILD_ROOT/usr/share/man/man8/ovs-testcontroller.8 \
>> > -    $RPM_BUILD_ROOT/usr/bin/ovs-test \
>> > -    $RPM_BUILD_ROOT/usr/bin/ovs-l3ping \
>> > -    $RPM_BUILD_ROOT/usr/share/man/man8/ovs-test.8 \
>> > -    $RPM_BUILD_ROOT/usr/share/man/man8/ovs-l3ping.8 \
>> > -    $RPM_BUILD_ROOT/usr/sbin/ovs-vlan-bug-workaround \
>> > -    $RPM_BUILD_ROOT/usr/share/man/man8/ovs-vlan-bug-workaround.8 \
>> > -    $RPM_BUILD_ROOT/usr/bin/ovn-* \
>> > -    $RPM_BUILD_ROOT/usr/share/man/man?/ovn-* \
>> > -    $RPM_BUILD_ROOT/usr/share/openvswitch/ovn-* \
>> > -    $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/ovn*
>> > -(cd "$RPM_BUILD_ROOT" && rm -rf usr/%{_lib}/*.la)
>> > -(cd "$RPM_BUILD_ROOT" && rm -rf usr/include)
>> > -
>> > -install -d -m 0755 $RPM_BUILD_ROOT%{_rundir}/openvswitch
>> > -install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/log/openvswitch
>> > -install -d -m 0755 $RPM_BUILD_ROOT/var/lib/openvswitch
>> > -
>> > -copy_headers() {
>> > -    src=$1
>> > -    dst=$RPM_BUILD_ROOT/$2
>> > -    install -d -m 0755 $dst
>> > -    install -m 0644 $src/*.h $dst
>> > -}
>> > -copy_headers include %{_includedir}/openvswitch
>> > -copy_headers include/openflow %{_includedir}/openvswitch/openflow
>> > -copy_headers include/openvswitch %{_includedir}/openvswitch/openvswitch
>> > -copy_headers include/sparse %{_includedir}/openvswitch/sparse
>> > -copy_headers include/sparse/arpa %{_includedir}/openvswitch/sparse/arpa
>> > -copy_headers include/sparse/netinet
>> > %{_includedir}/openvswitch/sparse/netinet
>> > -copy_headers include/sparse/sys %{_includedir}/openvswitch/sparse/sys
>> > -copy_headers lib %{_includedir}/openvswitch/lib
>> > -
>> > -install -D -m 0644 lib/.libs/libopenvswitch.a \
>> > -    $RPM_BUILD_ROOT/%{_libdir}/libopenvswitch.a
>> > -
>> > -%check
>> > -%if %{with check}
>> > -    if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes; then :;
>> > -    else
>> > -        cat tests/testsuite.log
>> > -        exit 1
>> > -    fi
>> > -%endif
>> > -%if %{with check_datapath_kernel}
>> > -    if make check-kernel RECHECK=yes; then :;
>> > -    else
>> > -        cat tests/system-kmod-testsuite.log
>> > -        exit 1
>> > -    fi
>> > -%endif
>> > -
>> > -%clean
>> > -rm -rf $RPM_BUILD_ROOT
>> > -
>> > -%post
>> > -# Create default or update existing /etc/sysconfig/openvswitch.
>> > -SYSCONFIG=/etc/sysconfig/openvswitch
>> > -TEMPLATE=/usr/share/openvswitch/scripts/sysconfig.template
>> > -if [ ! -e $SYSCONFIG ]; then
>> > -    cp $TEMPLATE $SYSCONFIG
>> > -else
>> > -    for var in $(awk -F'[ :]' '/^# [_A-Z0-9]+:/{print $2}' $TEMPLATE)
>> > -    do
>> > -        if ! grep $var $SYSCONFIG >/dev/null 2>&1; then
>> > -            echo >> $SYSCONFIG
>> > -            sed -n "/$var:/,/$var=/p" $TEMPLATE >> $SYSCONFIG
>> > -        fi
>> > -    done
>> > -fi
>> > -
>> > -# Ensure all required services are set to run
>> > -/sbin/chkconfig --add openvswitch
>> > -/sbin/chkconfig openvswitch on
>> > -
>> > -%post selinux-policy
>> > -/usr/sbin/semodule -i
>> > %{_datadir}/selinux/packages/%{name}/openvswitch-custom.pp &> /dev/null || :
>> > -
>> > -%preun
>> > -if [ "$1" = "0" ]; then     # $1 = 0 for uninstall
>> > -    /sbin/service openvswitch stop
>> > -    /sbin/chkconfig --del openvswitch
>> > -fi
>> > -
>> > -%postun
>> > -if [ "$1" = "0" ]; then     # $1 = 0 for uninstall
>> > -    rm -f /etc/openvswitch/conf.db
>> > -    rm -f /etc/sysconfig/openvswitch
>> > -    rm -f /etc/openvswitch/vswitchd.cacert
>> > -fi
>> > -
>> > -%postun selinux-policy
>> > -if [ $1 -eq 0 ] ; then
>> > -  /usr/sbin/semodule -r openvswitch-custom &> /dev/null || :
>> > -fi
>> > -
>> > -exit 0
>> > -
>> > -%files
>> > -%defattr(-,root,root)
>> > -%dir /etc/openvswitch
>> > -/etc/bash_completion.d/ovs-appctl-bashcomp.bash
>> > -/etc/bash_completion.d/ovs-vsctl-bashcomp.bash
>> > -/etc/init.d/openvswitch
>> > -%config(noreplace) /etc/logrotate.d/openvswitch
>> > -/etc/sysconfig/network-scripts/ifup-ovs
>> > -/etc/sysconfig/network-scripts/ifdown-ovs
>> > -/usr/bin/ovs-appctl
>> > -/usr/bin/ovs-dpctl
>> > -/usr/bin/ovs-dpctl-top
>> > -/usr/bin/ovs-docker
>> > -/usr/bin/ovs-ofctl
>> > -/usr/bin/ovs-parse-backtrace
>> > -/usr/bin/ovs-pcap
>> > -/usr/bin/ovs-pki
>> > -/usr/bin/ovs-tcpdump
>> > -/usr/bin/ovs-tcpundump
>> > -/usr/bin/ovs-vlan-test
>> > -/usr/bin/ovs-vsctl
>> > -/usr/bin/ovsdb-client
>> > -/usr/bin/ovsdb-tool
>> > -/usr/bin/vtep-ctl
>> > -%{_libdir}/lib*.so.*
>> > -/usr/sbin/ovs-bugtool
>> > -/usr/sbin/ovs-vswitchd
>> > -/usr/sbin/ovsdb-server
>> > -/usr/share/man/man1/ovs-pcap.1.gz
>> > -/usr/share/man/man1/ovs-tcpundump.1.gz
>> > -/usr/share/man/man1/ovsdb-client.1.gz
>> > -/usr/share/man/man1/ovsdb-server.1.gz
>> > -/usr/share/man/man1/ovsdb-tool.1.gz
>> > -/usr/share/man/man5/ovs-vswitchd.conf.db.5.gz
>> > -/usr/share/man/man5/vtep.5.gz
>> > -/usr/share/man/man7/ovs-fields.7.gz
>> > -/usr/share/man/man8/ovs-appctl.8.gz
>> > -/usr/share/man/man8/ovs-bugtool.8.gz
>> > -/usr/share/man/man8/ovs-ctl.8.gz
>> > -/usr/share/man/man8/ovs-dpctl.8.gz
>> > -/usr/share/man/man8/ovs-dpctl-top.8.gz
>> > -/usr/share/man/man8/ovs-ofctl.8.gz
>> > -/usr/share/man/man8/ovs-parse-backtrace.8.gz
>> > -/usr/share/man/man8/ovs-pki.8.gz
>> > -/usr/share/man/man8/ovs-tcpdump.8.gz
>> > -/usr/share/man/man8/ovs-vlan-test.8.gz
>> > -/usr/share/man/man8/ovs-vsctl.8.gz
>> > -/usr/share/man/man8/ovs-vswitchd.8.gz
>> > -/usr/share/man/man8/vtep-ctl.8.gz
>> > -/usr/share/openvswitch/bugtool-plugins/
>> > -/usr/share/openvswitch/python/
>> > -/usr/share/openvswitch/scripts/ovs-bugtool-*
>> > -/usr/share/openvswitch/scripts/ovs-check-dead-ifs
>> > -/usr/share/openvswitch/scripts/ovs-ctl
>> > -/usr/share/openvswitch/scripts/ovs-lib
>> > -/usr/share/openvswitch/scripts/ovs-save
>> > -/usr/share/openvswitch/scripts/ovs-vtep
>> > -/usr/share/openvswitch/scripts/sysconfig.template
>> > -/usr/share/openvswitch/vswitch.ovsschema
>> > -/usr/share/openvswitch/vtep.ovsschema
>> > -%doc COPYING NOTICE README.rst NEWS rhel/README.RHEL.rst
>> > -/var/lib/openvswitch
>> > -/var/log/openvswitch
>> > -
>> > -%files devel
>> > -%{_libdir}/lib*.so
>> > -%{_libdir}/lib*.a
>> > -%{_libdir}/pkgconfig
>> > -%{_includedir}/openvswitch/*
>> > -
>> > -%files selinux-policy
>> > -%defattr(-,root,root)
>> > -%{_datadir}/selinux/packages/%{name}/openvswitch-custom.pp
>> > --
>> > 2.14.3
>> >
>> > _______________________________________________
>> > dev mailing list
>> > dev at openvswitch.org
>> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>>
>>
>>
>> --
>> Russell Bryant
>
>



-- 
Russell Bryant


More information about the dev mailing list