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

Ansis Atteka aatteka at nicira.com
Thu Oct 8 19:11:22 UTC 2015


On Tue, Oct 6, 2015 at 3:22 PM, Russell Bryant <rbryant at redhat.com> wrote:
> On 10/06/2015 08:20 PM, Flavio Leitner wrote:
>> On Sun, Oct 04, 2015 at 03:20:08PM -0700, Ansis Atteka 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.
>>
>> I am maintaining OVS on F21, F22, F23 and F24.  I don't know the
>> current state of F16 and F17 though the RPM instructions should be
>> the same.

How about: "These instructions are tested with Fedora 21-24. However,
they could also still work with other Fedora versions."?

Another approach would be not to give exact Fedora versions and simply
state that OVS supports Fedora versions that are still being actively
maintained by Fedora Project. And then if these instructions don't
work on one of those Fedoras then we would consider that as a bug.



>>
>>
>>>  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
>>> +   ```
>>> +
>>
>> I am not sure if that list is complete.  I use yum-builddep <spec>
>> to install all the build requisites.  The nice thing about it is that
>> when libcap-ng-devel deps was added, the documentation would remain
>> updated.
>>
>> For dnf I think it's dnf builddep --spec <spec>

Neither yum-builddep nor dnf-builddep seem to accept --spec argument:

# dnf builddep --spec rhel/openvswitch-fedora.spec
usage: dnf builddep [--help-cmd] [-D 'MACRO EXPR'] [package [package ...]]

I guess you might have meant:

# dnf builddep rhel/openvswitch-fedora.spec




>
> Another approach would be to change the instructions to build the
> package using mock.  That's actually what I'd prefer, I just hadn't
> gotten around to documenting it and proposing it properly.

Russell, can you provide me sample mock commands that you use? Mock
seems to have plenty of plugins and I did not have a chance to go
through all of them yet.

I think there are two approaches here regarding to mock:
1. replace these rpmbuild commands with mock (if it is easy to set up mock); or
2. document Mock alongside these rpmbuild commands (in the same or
another INSTALL document).



More information about the dev mailing list