[Buildroot] [PATCH v2] package/python-pycrypto: fix python3.8 compatibility

James Hilliard james.hilliard1 at gmail.com
Tue Apr 21 20:49:42 UTC 2020


On Tue, Apr 21, 2020 at 2:28 PM Thomas Petazzoni
<thomas.petazzoni at bootlin.com> wrote:
>
> On Mon, 20 Apr 2020 16:07:24 +0200
> Romain Naour <romain.naour at gmail.com> wrote:
>
> > Apply the patch from Fedora 31 [1][2] to replace the user-space RNG with a
> > thin wrapper to os.urandom. This allow to fixes compatibility with
> > Python 3.8 since the code containing time.clock() is removed.
> >
> > time.clock() was deprecated in Python 3.3 and removed in Python 3.8.
> >
> > [1] https://src.fedoraproject.org/rpms/python-crypto/c/a5fd7148fb0e9d5526f24feb1bb708bf203480b9?branch=f31
> > [2] https://src.fedoraproject.org/rpms/python-crypto/blob/f31/f/pycrypto-2.6.1-use-os-random.patch
> >
> > Fixes:
> > https://gitlab.com/buildroot.org/buildroot/-/jobs/498144209
> >
> > Signed-off-by: Romain Naour <romain.naour at gmail.com>
> > ---
> > This patch would allow to use python2 and python3.
> > To be backported to Buildroot 2020.02 to fixes the qemu-arm-vexpress-tz defconfig.
> > ---
> >  ...2-pycrypto-2.6.1-use-os-random.patch.patch | 1904 +++++++++++++++++
> >  1 file changed, 1904 insertions(+)
> >  create mode 100644 package/python-pycrypto/0002-pycrypto-2.6.1-use-os-random.patch.patch
>
> Meh, the Fedora patch is really gigantic. I think the option suggested
> by James makes a lot of sense. I think even for 2020.02.x it could be
> an acceptable solution. As you said, the only user of
> host-python-pycrypto is crda, so it's not a huge effort to quickly test
> that it still builds fine on 2020.02.x with python-pycryptodome.
Actually we probably just need to add python-m2crypto and drop
https://github.com/buildroot/buildroot/blob/master/package/crda/0001-crda-support-python-3-in-utils-key2pub.py.patch
as it appears that python-m2crypto added support for python 3.
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot


More information about the buildroot mailing list