[ovs-dev] [PATCH 1/3] Fedora: update rpm build instructions after trying them with Fedora 22

Kyle Mestery mestery at mestery.com
Mon Oct 5 01:19:09 UTC 2015


On Sun, Oct 4, 2015 at 5:20 PM, Ansis Atteka <aatteka at nicira.com> wrote:

> Mention:
> 1. that these instructions have been tested with Fedora 22.
> 2. dependencies that need to be installed on Fedora 22.  Otherwise,
>    rpmbuild command simply fails.
> 3. that rpmdev-setuptree utility can be used to create rpmbuild
>    directory under $HOME, if one doesn't exist already.
> 4. directory where rpm packages that were just built can be found.
> 5. mention SElinux implications that could prevent OVS from starting,
>    if not using designated OVS directories.
>
> Signed-off-by: Ansis Atteka <aatteka at nicira.com>
> ---
>  INSTALL.Fedora.md | 33 +++++++++++++++++++++++++++------
>  1 file changed, 27 insertions(+), 6 deletions(-)
>
> diff --git a/INSTALL.Fedora.md b/INSTALL.Fedora.md
> index 75b6375..02d99be 100644
> --- a/INSTALL.Fedora.md
> +++ b/INSTALL.Fedora.md
> @@ -5,7 +5,7 @@ This document describes how to build and install Open
> vSwitch on a Fedora
>  Linux host.  If you want to install Open vSwitch on a generic Linux host,
>  see [INSTALL.md] instead.
>
> -We have tested these instructions with Fedora 16 and Fedora 17.
> +We have tested these instructions with Fedora 16, Fedora 17 and Fedora 22.
>
> Is the RPM build still tested for Fedora 16 and 17 at this point? Is that
automated? If not, maybe those can be removed.

 Building Open vSwitch for Fedora
>  --------------------------------
> @@ -21,6 +21,9 @@ the top-level:
>  4. SPECS/ Contains the spec files for each package to be built.
>  5. SRPMS/ Where the newly created source package files are written.
>
> +If these directories do not exist on your system by default (as in Fedora
> 22),
> +then use rpmdev-setuptree utility to create them.
> +
>  Before you begin, note the RPM sources directory on your version of
>  Fedora.  The command "rpmbuild --showrc" will show the configuration
>  for each of those directories. Alternatively, the command "rpm --eval
> @@ -30,7 +33,16 @@ for the sources directory.  On Fedora 17, the default
> RPM _topdir is
>  $HOME/rpmbuild and the default RPM sources directory is
>  $HOME/rpmbuild/SOURCES.
>
> -1. If you are building from a distribution tarball, skip to step 2.
> +1. Install build prerequisites with dnf (or yum on older Fedora versions):
> +
> +   ```
> +   dnf install gcc make python-devel openssl-devel kernel-devel graphviz \
> +       kernel-debug-devel autoconf automake rpm-build redhat-rpm-config \
> +       libtool pyqt4 groff libcap-ng-devel python-twisted-core \
> +       python-zope-interface
> +   ```
> +
> +2. If you are building from a distribution tarball, skip to step 2.
>     Otherwise, you must be building from an Open vSwitch Git tree.
>     Create a distribution tarball from the root of the Git tree by
>     running:
> @@ -41,21 +53,22 @@ $HOME/rpmbuild/SOURCES.
>         make dist
>            ```
>
> -2. Now you have a distribution tarball, named something like
> +3. 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`
>
> -3. Make another copy of the distribution tarball in a temporary
> +4. Make another copy of the distribution tarball in a temporary
>     directory.  Then unpack the tarball and "cd" into its root, e.g.:
>
>         ```
> +       cd $HOME/rpmbuild/SOURCES
>         tar xzf openvswitch-x.y.z.tar.gz
>         cd openvswitch-x.y.z
>            ```
>
> -4. To build Open vSwitch userspace, run:
> +5. To build Open vSwitch userspace, run:
>
>         `rpmbuild -bb rhel/openvswitch-fedora.spec`
>
> @@ -66,7 +79,7 @@ $HOME/rpmbuild/SOURCES.
>
>         `rpmbuild -bb --without check rhel/openvswitch-fedora.spec`
>
> -5. On Fedora 17, to build the Open vSwitch kernel module, run:
> +6. On Fedora 17, to build the Open vSwitch kernel module, run:
>
>         `rpmbuild -bb rhel/openvswitch-kmod-fedora.spec`
>
> @@ -83,6 +96,14 @@ $HOME/rpmbuild/SOURCES.
>      in this example: "kmod-openvswitch", "kmod-openvswitch-debug", and
>      "kmod-openvswitch-kdump".
>
> +7. Find the created packages in $HOME/rpmbuild/RPMS directory.
> +
> +Fedora based distributions nowadays ship with SElinux enabled in
> enforcing mode
> +by default.  This means that, if you have problems starting Open vSwitch,
> then
> +first check that Open vSwitch is configured to run inside its SElinux
> confined
> +area.  For more details see "man (8) openvswitch_selinux" that is
> distributed
> +with selinux-policy-devel package on your distribution.
> +
>  Reporting Bugs
>  --------------
>
> --
> 2.1.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>



More information about the dev mailing list