FYI This is what is working after several rounds of testing various methods so far. Some notes:
(1) I've tried rolling my own python-six using py2pack (search google on keywords "py2pack james adam creating rpms" ) but it doesn't work because even though I can build the RPM, it won't install the resulting RPM because there are several "conflicting files" errors during the installed of the roll-your-own RPM that conflict with files in the python3-six that comes with the Oracle8 distro by default; and, the python3-six cannot be uninstalled because the new dnf capability in Oracle8 depends on that python3-six that comes with the distro so the OS blocks uninstall of python3-six. I haven't considered whether dnf could be uninstalled but won't go there because an Orabuntu-LXC design principle is we are a pure overlay we don't reconfigure anything unless absolutely unavoidable. However, as indicated in the recipe, the python-six noarch from the CentOS7 repo installs fine with no issues and moreover the openvswitch build likes it. (2) When I try to have the build depend entirely on python3-six (and skip the install of the CentOS7 python-six noarch rpm) and just update the spec file to use "python3-six" throughout I get errors in the OpenvSwitch build. I get errors that "files 'ovs-test' and 'ovs-l3ping' are missing and cannot be deleted." (3) The python py36env virtual python environment also is needed; without it I get errors in the build. (4) When I try to use python2 variants (set in the python alternatives step) I get errors in the build. Here is the code that is working on Oracle8 elif [ $Release -ge 7 ] then echo '' echo "==============================================" echo "Build OpenvSwitch RPMs... " echo "==============================================" echo '' cd /opt/olxc/"$DistDir"/uekulele/openvswitch/rpmbuild/SOURCES tar -zxvf openvswitch-"$OvsVersion".tar.gz cp -p openvswitch-"$OvsVersion"/rhel/*.spec /opt/olxc/"$DistDir"/uekulele/openvswitch/. cd /opt/olxc/"$DistDir"/uekulele/openvswitch if [ $Release -eq 8 ] then wget https://rpmfind.net/linux/centos/7.7.1908/os/x86_64/Packages/python-six-1.9.0-2.el7.noarch.rpm sudo yum -y localinstall python-six-1.9.0-2.el7.noarch.rpm sudo yum -y install python3-sphinx sudo yum -y install python3-six sudo yum -y install selinux-policy-devel unbound-devel 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/BuildRequires: python-six/BuildRequires: python3-six/g' openvswitch.spec sed -i 's/BuildRequires: python-sphinx/BuildRequires: python3-sphinx/g' openvswitch.spec sleep 5 fi sed -i 's/python >= 2.7/python27/g' openvswitch.spec rpmbuild --define "_topdir /opt/olxc/"$DistDir"/uekulele/openvswitch/rpmbuild" -ba openvswitch.spec echo '' echo "==============================================" echo "Done: Build OpenvSwitch RPMs " echo "==============================================" ________________________________ From: Orabuntu-LXC <gilb...@orabuntu-lxc.com> Sent: Sunday, October 6, 2019 5:24 PM To: Ben Pfaff <b...@ovn.org> Cc: Gilbert Standen <gilstan...@hotmail.com>; ovs-discuss@openvswitch.org <ovs-discuss@openvswitch.org> Subject: Re: [ovs-discuss] Build OpenvSwitch on Oracle Linux 8 FYI This is what is working after several rounds of testing various methods so far. Some notes: (1) I've tried rolling my own python-six using py2pack (search google on keywords "py2pack james adam creating rpms" ) but it doesn't work because even though I can build the RPM, it won't install the resulting RPM because there are several "conflicting files" errors during the installed of the roll-your-own RPM that conflict with files in the python3-six that comes with the Oracle8 distro by default; and, the python3-six cannot be uninstalled because the new dnf capability in Oracle8 depends on that python3-six that comes with the distro so the OS blocks uninstall of python3-six. I haven't considered whether dnf could be uninstalled but won't go there because an Orabuntu-LXC design principle is we are a pure overlay we don't reconfigure anything unless absolutely unavoidable. However, as indicated in the recipe, the python-six noarch from the CentOS7 repo installs fine with no issues and moreover the openvswitch build likes it. (2) When I try to have the build depend entirely on python3-six (and skip the install of the CentOS7 python-six noarch rpm) and just update the spec file to use "python3-six" throughout I get errors in the OpenvSwitch build. I get errors that "files 'ovs-test' and 'ovs-l3ping' are missing and cannot be deleted." (3) The python py36env virtual python environment also is needed; without it I get errors in the build. (4) When I try to use python2 variants (set in the python alternatives step) I get errors in the build. Here is the code that is working on Oracle8 elif [ $Release -ge 7 ] then echo '' echo "==============================================" echo "Build OpenvSwitch RPMs... " echo "==============================================" echo '' cd /opt/olxc/"$DistDir"/uekulele/openvswitch/rpmbuild/SOURCES tar -zxvf openvswitch-"$OvsVersion".tar.gz cp -p openvswitch-"$OvsVersion"/rhel/*.spec /opt/olxc/"$DistDir"/uekulele/openvswitch/. cd /opt/olxc/"$DistDir"/uekulele/openvswitch if [ $Release -eq 8 ] then wget https://rpmfind.net/linux/centos/7.7.1908/os/x86_64/Packages/python-six-1.9.0-2.el7.noarch.rpm sudo yum -y localinstall python-six-1.9.0-2.el7.noarch.rpm sudo yum -y install python3-sphinx sudo yum -y install python3-six sudo yum -y install selinux-policy-devel unbound-devel 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/BuildRequires: python-six/BuildRequires: python3-six/g' openvswitch.spec sed -i 's/BuildRequires: python-sphinx/BuildRequires: python3-sphinx/g' openvswitch.spec sleep 5 fi sed -i 's/python >= 2.7/python27/g' openvswitch.spec rpmbuild --define "_topdir /opt/olxc/"$DistDir"/uekulele/openvswitch/rpmbuild" -ba openvswitch.spec echo '' echo "==============================================" echo "Done: Build OpenvSwitch RPMs " echo "==============================================" On Thu, Oct 3, 2019 at 10:50 AM Ben Pfaff <b...@ovn.org<mailto:b...@ovn.org>> wrote: 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 <gilstan...@hotmail.com<mailto:gilstan...@hotmail.com>> > Sent: Wednesday, October 2, 2019 5:00 PM > To: Ben Pfaff <b...@ovn.org<mailto:b...@ovn.org>> > Cc: Orabuntu-LXC <gilb...@orabuntu-lxc.com<mailto:gilb...@orabuntu-lxc.com>>; > ovs-discuss@openvswitch.org<mailto:ovs-discuss@openvswitch.org> > <ovs-discuss@openvswitch.org<mailto:ovs-discuss@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 <gilstan...@hotmail.com<mailto:gilstan...@hotmail.com>> > Sent: Wednesday, October 2, 2019 1:47 PM > To: Ben Pfaff <b...@ovn.org<mailto:b...@ovn.org>> > Cc: Orabuntu-LXC <gilb...@orabuntu-lxc.com<mailto:gilb...@orabuntu-lxc.com>>; > ovs-discuss@openvswitch.org<mailto:ovs-discuss@openvswitch.org> > <ovs-discuss@openvswitch.org<mailto:ovs-discuss@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 <gilstan...@hotmail.com<mailto:gilstan...@hotmail.com>> > Sent: Wednesday, October 2, 2019 11:40 AM > To: Ben Pfaff <b...@ovn.org<mailto:b...@ovn.org>> > Cc: Orabuntu-LXC <gilb...@orabuntu-lxc.com<mailto:gilb...@orabuntu-lxc.com>>; > ovs-discuss@openvswitch.org<mailto:ovs-discuss@openvswitch.org> > <ovs-discuss@openvswitch.org<mailto:ovs-discuss@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 <gilstan...@hotmail.com<mailto:gilstan...@hotmail.com>> > Sent: Wednesday, October 2, 2019 11:36 AM > To: Ben Pfaff <b...@ovn.org<mailto:b...@ovn.org>> > Cc: Orabuntu-LXC <gilb...@orabuntu-lxc.com<mailto:gilb...@orabuntu-lxc.com>>; > ovs-discuss@openvswitch.org<mailto:ovs-discuss@openvswitch.org> > <ovs-discuss@openvswitch.org<mailto:ovs-discuss@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 <gilstan...@hotmail.com<mailto:gilstan...@hotmail.com>> > Sent: Wednesday, October 2, 2019 11:21 AM > To: Ben Pfaff <b...@ovn.org<mailto:b...@ovn.org>> > Cc: Orabuntu-LXC <gilb...@orabuntu-lxc.com<mailto:gilb...@orabuntu-lxc.com>>; > ovs-discuss@openvswitch.org<mailto:ovs-discuss@openvswitch.org> > <ovs-discuss@openvswitch.org<mailto:ovs-discuss@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 <b...@ovn.org<mailto:b...@ovn.org>> > Sent: Wednesday, October 2, 2019 9:45 AM > To: Gilbert Standen <gilstan...@hotmail.com<mailto:gilstan...@hotmail.com>> > Cc: Orabuntu-LXC <gilb...@orabuntu-lxc.com<mailto:gilb...@orabuntu-lxc.com>>; > ovs-discuss@openvswitch.org<mailto:ovs-discuss@openvswitch.org> > <ovs-discuss@openvswitch.org<mailto:ovs-discuss@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. -- Gilbert Standen Creator Orabuntu-LXC 914-261-4594 gilb...@orabuntu-lxc.com<mailto:gilb...@orabuntu-lxc.com>
_______________________________________________ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss