[ovs-dev] [PATCH 1/3] Fedora: update rpm build instructions after trying them with Fedora 22
fbl at sysclose.org
Thu Oct 8 19:38:44 UTC 2015
On Thu, Oct 08, 2015 at 12:11:22PM -0700, Ansis Atteka wrote:
> 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.
Sounds good to me.
> >>> 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
$ dnf builddep
usage: dnf builddep [--help-cmd] [-D 'MACRO EXPR'] [--spec | --srpm]
package [package ...]
package packages with builddeps to install
--help-cmd show this help about this tool
-D 'MACRO EXPR', --define 'MACRO EXPR'
define a macro for spec file parsing
--spec treat commandline arguments as spec files
--srpm treat commandline arguments as source rpm
$ sudo dnf builddep --spec rhel/openvswitch-fedora.spec
Last metadata expiration check performed 2:30:42 ago on Thu Oct 8 13:53:57 2015.
Package PyQt4-4.11.4-1.fc22.x86_64 is already installed, skipping.
Package autoconf-2.69-20.fc22.noarch is already installed, skipping.
$ rpm -q dnf
master]$ sudo yum-builddep rhel/openvswitch-fedora.spec
Yum-utils package has been deprecated, use dnf instead.
See 'man yum2dnf' for more information.
Loaded plugins: auto-update-debuginfo, fastestmirror, langpacks
Checking for new repos for mirrors
Getting requirements for rhel/openvswitch-fedora.spec
--> Already installed : PyQt4-4.11.4-1.fc22.x86_64
--> Already installed : autoconf-2.69-20.fc22.noarch
No uninstalled build requires
> > 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).
master]$ rpmbuild -bs rhel/openvswitch-fedora.spec
[fleitner at x240 master]$ mock -r fedora-21-x86_64 /home/fleitner/ovs/master/SRPMS/openvswitch-2.4.90-1.fc22.src.rpm
You are attempting to run "mock" which requires administrative
privileges, but more information is needed in order to do so.
Authenticating as "root"
Finish: yum install
Start: creating cache
Finish: creating cache
Finish: chroot init
INFO: Installed packages:
Start: build phase for openvswitch-2.4.90-1.fc22.src.rpm
Start: build setup for openvswitch-2.4.90-1.fc22.src.rpm
Finish: build phase for openvswitch-2.4.90-1.fc22.src.rpm
INFO: Done(/home/fleitner/ovs/master/SRPMS/openvswitch-2.4.90-1.fc22.src.rpm) Config(fedora-21-x86_64) 1 minutes 33 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-21-x86_64/result
[fleitner at x240 master]$ ls /var/lib/mock/fedora-21-x86_64/result
build.log openvswitch-debuginfo-2.4.90-1.fc21.x86_64.rpm openvswitch-test-2.4.90-1.fc21.noarch.rpm state.log
openvswitch-2.4.90-1.fc21.src.rpm openvswitch-devel-2.4.90-1.fc21.x86_64.rpm python-openvswitch-2.4.90-1.fc21.noarch.rpm
openvswitch-2.4.90-1.fc21.x86_64.rpm openvswitch-ovn-2.4.90-1.fc21.x86_64.rpm root.log
but ``make check´´ didn't like it.
More information about the dev