[ovs-discuss] Build OpenvSwitch on Oracle Linux 8

Ben Pfaff blp at ovn.org
Thu Oct 3 12:50:48 UTC 2019


If you come up with something that you ulimately find satisfactory, then
it would be helpful to post a summary of how to build RPMs for OVS on
Oracle Linux.  Or, if you're willing, you could contribute a spec file
for it to the project.

On Wed, Oct 02, 2019 at 10:09:11PM +0000, Gilbert Standen wrote:
> Also need "sudo yum -y install python27" which I had left out ... and that should be everything finally for this build of openvswitch 2.11.1 on Oracle Linux 8
> 
>                         if [ $Release -eq 8 ]
>                         then
>                                 sudo yum -y install python27                                              <--this is also needed
>                                 sudo yum -y install python3-sphinx
>                                 sudo yum -y install python3-six
>                                 sudo yum -y install selinux-policy-devel unbound-devel     <--this is also needed
>                                 sudo alternatives --set python /usr/bin/python3
>                                 python3 -m venv py36env
>                                 source py36env/bin/activate
>                                 python3 -m pip install --upgrade pip
>                                 python3 -m pip install six
>                                 python3 -m pip install sphinx
>                                 sed -i 's/python-six/python3-six/g'       openvswitch.spec
>                                 sed -i 's/python-sphinx/python3-sphinx/g' openvswitch.spec
>                                 sleep 5
>                         fi
> 
>                         sed -i 's/python >= 2.7/python27/g'       openvswitch.spec         <--this is also needed
> 
>                         rpmbuild --define "_topdir /opt/olxc/"$DistDir"/uekulele/openvswitch/rpmbuild" -ba openvswitch.spec
> 
> ________________________________
> From: Gilbert Standen <gilstanden at hotmail.com>
> Sent: Wednesday, October 2, 2019 5:00 PM
> To: Ben Pfaff <blp at ovn.org>
> Cc: Orabuntu-LXC <gilbert at orabuntu-lxc.com>; ovs-discuss at openvswitch.org <ovs-discuss at openvswitch.org>
> Subject: Re: [ovs-discuss] Build OpenvSwitch on Oracle Linux 8
> 
> Nothing is easy it seems ... it is working ok on my hacked up dev box ... but when I try to run it on a fresh machine the build seems to be running OK, and then I get this:
> 
> rm: cannot remove '/opt/olxc/home/ubuntu/Downloads/orabuntu-lxc-6.12.13-beta/uekulele/openvswitch/rpmbuild/BUILDROOT/openvswitch-2.11.1-1.x86_64/usr/bin/ovs-test': No such file or directory
> rm: cannot remove '/opt/olxc/home/ubuntu/Downloads/orabuntu-lxc-6.12.13-beta/uekulele/openvswitch/rpmbuild/BUILDROOT/openvswitch-2.11.1-1.x86_64/usr/bin/ovs-l3ping': No such file or directory
> error: Bad exit status from /var/tmp/rpm-tmp.ah3XN9 (%install)
> 
> 
> RPM build errors:
>     Bad exit status from /var/tmp/rpm-tmp.ah3XN9 (%install)
> 
> so it seems I still have at least this issue to solve ...
> ________________________________
> From: Gilbert Standen <gilstanden at hotmail.com>
> Sent: Wednesday, October 2, 2019 1:47 PM
> To: Ben Pfaff <blp at ovn.org>
> Cc: Orabuntu-LXC <gilbert at orabuntu-lxc.com>; ovs-discuss at openvswitch.org <ovs-discuss at openvswitch.org>
> Subject: Re: [ovs-discuss] Build OpenvSwitch on Oracle Linux 8
> 
> Ok the build and install of the RPM's for OpenvSwitch 2.11.1 was successful.  There were a few additional lines needed for the recipe as shown below this is the scripting that worked completely successfully.  There could possible be some things in here that are not absolutely needed, but I haven't had a chance to do that kind of testing yet.  Below will work albeit possibly with more steps than minimally needed.
> 
>                         if [ $Release -eq 8 ]
>                         then
>                                 sudo yum -y install python3-sphinx
>                                 sudo yum -y install python3-six
>                                 sudo yum -y install selinux-policy-devel unbound-devel     <--this is also needed
>                                 sudo alternatives --set python /usr/bin/python3
>                                 python3 -m venv py36env
>                                 source py36env/bin/activate
>                                 python3 -m pip install --upgrade pip
>                                 python3 -m pip install six
>                                 python3 -m pip install sphinx
>                                 sed -i 's/python-six/python3-six/g'       openvswitch.spec
>                                 sed -i 's/python-sphinx/python3-sphinx/g' openvswitch.spec
>                                 sleep 5
>                         fi
> 
>                         sed -i 's/python >= 2.7/python27/g'       openvswitch.spec         <--this is also needed
> 
>                         rpmbuild --define "_topdir /opt/olxc/"$DistDir"/uekulele/openvswitch/rpmbuild" -ba openvswitch.spec
> 
> ________________________________
> From: Gilbert Standen <gilstanden at hotmail.com>
> Sent: Wednesday, October 2, 2019 11:40 AM
> To: Ben Pfaff <blp at ovn.org>
> Cc: Orabuntu-LXC <gilbert at orabuntu-lxc.com>; ovs-discuss at openvswitch.org <ovs-discuss at openvswitch.org>
> Subject: Re: [ovs-discuss] Build OpenvSwitch on Oracle Linux 8
> 
> And also for completeness noting that these are needed for this build on Oracle8
> 
> sudo yum -y install python3-sphinx
> sudo yum -y install python3-six
> 
> ________________________________
> From: Gilbert Standen <gilstanden at hotmail.com>
> Sent: Wednesday, October 2, 2019 11:36 AM
> To: Ben Pfaff <blp at ovn.org>
> Cc: Orabuntu-LXC <gilbert at orabuntu-lxc.com>; ovs-discuss at openvswitch.org <ovs-discuss at openvswitch.org>
> Subject: Re: [ovs-discuss] Build OpenvSwitch on Oracle Linux 8
> 
> Ok I think I've got it - it's running the openvswitch 2.11.1 test suite atm - here is the solution that is working.
> 
>                        if [ $Release -eq 8 ]
>                         then
>                                 sudo alternatives --set python /usr/bin/python3
>                                 python3 -m venv py36env
>                                 source py36env/bin/activate
>                                 python3 -m pip install --upgrade pip
>                                 python3 -m pip install six
>                                 python3 -m pip install sphinx
>                         fi
>                                 sed -i 's/python-six/python3-six/g'       openvswitch.spec
>                                 sed -i 's/python-sphinx/python3-sphinx/g' openvswitch.spec
>                         fi
>                         rpmbuild --define "_topdir /opt/olxc/"$DistDir"/uekulele/openvswitch/rpmbuild" -ba openvswitch.spec
> 
> ________________________________
> From: Gilbert Standen <gilstanden at hotmail.com>
> Sent: Wednesday, October 2, 2019 11:21 AM
> To: Ben Pfaff <blp at ovn.org>
> Cc: Orabuntu-LXC <gilbert at orabuntu-lxc.com>; ovs-discuss at openvswitch.org <ovs-discuss at openvswitch.org>
> Subject: Re: [ovs-discuss] Build OpenvSwitch on Oracle Linux 8
> 
> Thanks Ben.  Progress ... I got past the Requires, but there's still issues later on related to Sphinx and Six.  Any thoughts on solving this ?  TIA
> 
> sphinx-build  -b html -W -n -d ./Documentation/_build/doctrees  ./Documentation ./Documentation/_build/html && touch docs-check
> Traceback (most recent call last):
>   File "/usr/local/bin/sphinx-build", line 11, in <module>
>     sys.exit(main())
>   File "/usr/lib/python3.6/site-packages/sphinx/cmd/build.py", line 38, in main
>     return build_main(argv)
>   File "/usr/lib/python3.6/site-packages/sphinx/cmd/build.py", line 22, in build_main
>     from sphinx import cmdline
>   File "/usr/lib/python3.6/site-packages/sphinx/cmdline.py", line 20, in <module>
>     from six import text_type, binary_type
> ModuleNotFoundError: No module named 'six'
> make[2]: *** [Makefile:7107: docs-check] Error 1
> make[2]: Leaving directory '/opt/olxc/home/ubuntu/Downloads/orabuntu-lxc-6.12.13-beta/uekulele/openvswitch/rpmbuild/BUILD/openvswitch-2.11.1'
> make[1]: *** [Makefile:6016: all-recursive] Error 1
> make[1]: Leaving directory '/opt/olxc/home/ubuntu/Downloads/orabuntu-lxc-6.12.13-beta/uekulele/openvswitch/rpmbuild/BUILD/openvswitch-2.11.1'
> make: *** [Makefile:3594: all] Error 2
> error: Bad exit status from /var/tmp/rpm-tmp.XEARO1 (%build)
> 
> 
> RPM build errors:
>     Bad exit status from /var/tmp/rpm-tmp.XEARO1 (%build)
> 
> ________________________________
> From: Ben Pfaff <blp at ovn.org>
> Sent: Wednesday, October 2, 2019 9:45 AM
> To: Gilbert Standen <gilstanden at hotmail.com>
> Cc: Orabuntu-LXC <gilbert at orabuntu-lxc.com>; ovs-discuss at openvswitch.org <ovs-discuss at openvswitch.org>
> Subject: Re: [ovs-discuss] Build OpenvSwitch on Oracle Linux 8
> 
> On Wed, Oct 02, 2019 at 02:53:23PM +0000, Gilbert Standen wrote:
> > SO THE ABOVE DID NOT WORK:  I still got:
> >
> > error: Failed build dependencies:
> > python-six is needed by openvswitch-2.11.1-1.x86_64
> > python-sphinx is needed by openvswitch-2.11.1-1.x86_64
> 
> It looks like the packages are named python2-six and python2-sphinx on
> Oracle Linux.  If so, then you can update the spec file to use those
> names, and then build.


More information about the discuss mailing list