From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: First results from running build without python2 Date: Wed, 04 Aug 2021 16:45:38 +0200 Message-ID: <73161181-6616-48ED-BFA9-C2FB024AF8A4@ipfire.org> In-Reply-To: <1900327a-e199-8343-655e-d34326d6af81@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8994484125611966771==" List-Id: --===============8994484125611966771== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, > On 4 Aug 2021, at 13:40, Adolf Belka wrote: >=20 > Hi All, >=20 > I have resolved the frr program build. The version currently in IPFire (6.0= ) only works with python2. Python3 support came in with version 7.4. I have n= ow built frr with version 8.0 including libyang as a new dependency but only = for the build, so nothing installed into IPFire itself, and that has successf= ully built without python2 being present. Great. This could also resolve Matthias=E2=80=99 problem with building frr. > Will now go back and have another go with spice-protocol. Maybe it has a =E2=80=94-disable-python switch? -Michael >=20 > Regards, >=20 > Adolf. >=20 >=20 > On 03/08/2021 23:38, Adolf Belka wrote: >> Hi Michael & all, >>=20 >>=20 >> On 03/08/2021 17:11, Michael Tremer wrote: >>> Hello, >>>=20 >>> Thank you for looking into this. >>>=20 >>> This is a third-party script that came from either Mozilla or RedHat. May= be they have ported it. If not, it should not be rocket science to do it ours= elves. If we do it, we should of course upstream it. >> I found an updated script from fedora and gave that a try. This time the s= cript went all the way through but then the build.sh script failed at the poi= nt where it should find all the .crt files in the certs directory and it came= back and said there weren't any. >>>=20 >>> However, can you comment out this package and continue the build? This sh= ould be required until you reach the cdrom stage. >> I then commented ca-certificates out in make.sh and ran the build. >> This time it stopped at spice-protocol which is an addon and uses the py-c= ompile script that is in automake to compile some python modules. >> py-compile is python2 based and the build stopped because it could not fin= d python >>=20 >> There is a py_compile.py script that is python3 based but when I ran that = in place of the py-compile script I got a Permission denied error when it tri= ed to carry out the compile. >>=20 >> I then commented out spice-protocol and ran the build. >>=20 >> It then failed on frr which did look for python3-config but then failed du= e to not finding python-config or pkg-config python >> It looks like I should be able to tell it to use python3 in the ./configure >>=20 >> I commented out frr and nothing else failed before cdrom was reached. >>=20 >> So the packages that need to be made to work with python3 are >> ca-certificates >> spice-protocol >> frr >>=20 >>=20 >> I also converted client175 with 2to3 converter and built it and installed = the .ipfire package into a vm and successfully got the WUI page for Media Pla= yer IPFire to render. What I haven't tested yet is if the audio works. I will= need to get audio set up in my vm to try that. >>=20 >> Regards, >> Adolf. >>=20 >>>=20 >>> If this is the only thing that flags up, we should port the script. If we= find another, stronger reason to keep Python 2 around, we do not need to bot= her and can keep the script this way. >>>=20 >>> -Michael >>>=20 >>>> On 3 Aug 2021, at 13:31, Adolf Belka wrote: >>>>=20 >>>> Hi All, >>>>=20 >>>> So with crda and the remaining python2 modules removed the question was = if removing python2 from the build ran without any problem or if something wa= s flagged up. >>>>=20 >>>>=20 >>>> ca-certificates was flagged up. >>>>=20 >>>> There is a python2 script, certdata2pem.py, which fails if python2 is no= t present. Running that script with python3 flags up some invalid syntax, uns= urprisingly. >>>>=20 >>>> I found some patches in Debian from 2015 for certdata2pem.py to provide = python3 compatibility. Unfortunately looking at the patch approx half could n= ot be applied because the lines don't exist in the IPFire version of certdata= 2pem.py (sections to do with blacklisted certs) >>>>=20 >>>> I then ran the 2to3 converter on certdata2pem.py and tried that in the b= uild but it came up with the following error. >>>>=20 >>>> TypeError: a bytes-like object is required, not 'str' >>>>=20 >>>>=20 >>>> I don't know how to further move forward with this as I am totally unfam= iliar with the python language. >>>>=20 >>>>=20 >>>> Regards, >>>>=20 >>>> Adolf. >>>>=20 >>>>=20 >>>=20 --===============8994484125611966771==--