From: Adolf Belka <adolf.belka@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: Dropping Python 2 (python-m2crypto)
Date: Thu, 20 May 2021 12:30:50 +0200 [thread overview]
Message-ID: <b72a9eaf-6ca3-7f48-6d49-1786fb4c4fba@ipfire.org> (raw)
In-Reply-To: <309E6440-7625-4B74-A571-DBD2D81DA9E3@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 4463 bytes --]
Hi Michael,
On 20/05/2021 12:15, Michael Tremer wrote:
> Hello,
>
> Since Core Update 158 is now open, I would like to finish migrating the remaining Python 2 modules.
>
> Fedora has dropped crda a little while ago and added some scripts to wireless-regdb:
>
> https://src.fedoraproject.org/rpms/wireless-regdb
>
> I think we should follow that path and add the udev rules to lfs/wireless-regdb and adapt this script for our needs:
>
> https://src.fedoraproject.org/rpms/wireless-regdb/blob/rawhide/f/setregdomain
>
> We could then drop crda and all dependencies.
>
> Would you be up for having a look at this?
Absolutely. I will give it a go and see how I get on.
Good news about crda because then we should eventually be able to remove python2.
Regards,
Adolf.
>
> -Michael
>
>> On 14 May 2021, at 20:28, Adolf Belka <adolf.belka(a)ipfire.org> wrote:
>>
>> Hi Michael,
>>
>> The blockage of nmap to removing python2 was resolved but I have a new one now that may be more difficult to resolve.
>>
>> python-m2crypt was able to be successfully built with python3. However crda uses python-m2crypt and from what I have read it only works with python2.
>>
>> When I do the build then M2Crypto is in python3.8/site-packages/ and crda gives the following error
>>
>>
>> make[1]: Entering directory '/usr/src/crda-4.14'
>> GEN keys-gcrypt.c
>> Trusted pubkeys: pubkeys/linville.key.pub.pem pubkeys/sforshee.key.pub.pem
>> ERROR: Failed to import the "M2Crypto" module: No module named _m2crypto
>> Please install the "M2Crypto" Python module.
>> On Debian GNU/Linux the package is called "python-m2crypto".
>>
>>
>> No matter what I do crda doesn't find python-m2crypto. If I change the python-m2crypto lfs from using
>>
>> cd $(DIR_APP) && python3 setup.py build
>> cd $(DIR_APP) && python3 setup.py install --root=/
>>
>> to
>>
>> cd $(DIR_APP) && python setup.py build
>> cd $(DIR_APP) && python setup.py install --root=/
>>
>> then crda builds successfully.
>>
>> Arch Linux and Gentoo have a python3 patch for crda (the same patch for both) but it makes no difference for my build.
>>
>>
>> Regards,
>>
>> Adolf
>>
>>
>> On 05/05/2021 16:27, Michael Tremer wrote:
>>> Hello,
>>>
>>> I would like to talk about what has been discussed at the last developer conference call this week: Dropping Python 2
>>>
>>> This version of Python has reached its end of life and will no longer receive any security fixes. Hence we need to get rid of it as soon as possible.
>>>
>>> However, there is lots of software that still depends on it which has to be migrated away first.
>>>
>>> There are at least the following packages:
>>>
>>> boost
>>> fetchmail
>>> fireinfo
>>> iotop
>>> ipaddr
>>> libxml2
>>> libxslt
>>> newt
>>> nmap
>>> python
>>> python-clientform
>>> python-daemon
>>> python-distutils
>>> python-distutils-extra
>>> python-docutils
>>> python-feedparser
>>> python-inotify
>>> python-ipaddress
>>> python-m2crypto
>>> python-mechanize
>>> python-optional-src
>>> python-pyparsing
>>> python-rssdler
>>> python-setuptools
>>> python-six
>>> python-typing
>>>
>>> We also have the following scripts:
>>>
>>> config/ca-certificates/certdata2pem.py
>>> config/unbound/unbound-dhcp-leases-bridge
>>>
>>> Fireinfo is written by us and has a lot of C which will make it a little bit more difficult to migrate. We would also have to be very careful to not change any behaviour of the current implementation.
>>>
>>> The rest is probably either software that is entirely written in Python 2 or software that brings bindings for Python. The latter case is easy because we can either force it to build with Python 3 or we just disable the bindings.
>>>
>>> Ultimately we might need to keep Python around in the build system if there are other packages that rely on it. However, it would be great if we were able to remove it from the distribution very soon. Looking at his list, it does not seem to be too difficult.
>>>
>>> Would anyone be up to help and remove Python from any of those packages above? I would like to aim for Core Update 158 and remove as much stuff as possible - if we can everything - and then remove Python 2 in the update after that. If anyone has any custom scripts or applications, people will have some time to migrate away.
>>>
>>> Best,
>>> -Michael
>
next prev parent reply other threads:[~2021-05-20 10:30 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 14:27 Dropping Python 2 Michael Tremer
2021-05-05 16:49 ` Adolf Belka
2021-05-05 17:12 ` Adolf Belka
2021-05-05 21:46 ` Adolf Belka
2021-05-05 22:30 ` Michael Tremer
2021-05-06 19:40 ` Dropping Python 2 - question about boost Adolf Belka
2021-05-07 11:00 ` Michael Tremer
2021-05-07 11:16 ` Migrating fireinfo to Python 3 Michael Tremer
2021-05-07 11:16 ` [PATCH 01/10] configure: Link against " Michael Tremer
2021-05-07 11:16 ` [PATCH 02/10] _fireinfo: Migrate to " Michael Tremer
2021-05-07 11:16 ` [PATCH 03/10] _fireinfo: Refactor some code Michael Tremer
2021-05-07 11:16 ` [PATCH 04/10] Run 2to3 Michael Tremer
2021-05-07 11:21 ` Michael Tremer
2021-05-14 12:10 ` Migrating fireinfo to Python 3 Adolf Belka
2021-05-14 12:13 ` Michael Tremer
2021-05-17 13:59 ` Adolf Belka
2021-05-18 10:29 ` Michael Tremer
2021-05-11 10:37 ` Dropping Python 2 (Problem with ipaddr) Adolf Belka
2021-05-11 10:40 ` Michael Tremer
2021-05-15 11:51 ` Adolf Belka
2021-05-11 12:18 ` Dropping Python 2 (questions about python modules that are in python3 and python2 versions) Adolf Belka
2021-05-12 18:34 ` Jonatan Schlag
2021-05-13 17:36 ` Adolf Belka
2021-05-11 13:24 ` Dropping Python 2 (problems with libxml2 and libxslt) Adolf Belka
2021-05-11 13:25 ` Michael Tremer
2021-05-11 13:31 ` Adolf Belka
2021-05-12 11:07 ` Dropping Python 2 (python-distutils & python-distutils-extra) Adolf Belka
2021-05-12 17:11 ` Michael Tremer
2021-05-12 12:31 ` Dropping Python 2 (python-mechanize + knock on effects) Adolf Belka
2021-05-14 19:28 ` Dropping Python 2 (python-m2crypto) Adolf Belka
2021-05-15 21:03 ` Adolf Belka
2021-05-16 14:16 ` Adolf Belka
2021-05-20 10:15 ` Michael Tremer
2021-05-20 10:30 ` Adolf Belka [this message]
2021-05-20 11:21 ` Michael Tremer
2021-05-22 12:25 ` Adolf Belka
2021-05-25 10:03 ` Michael Tremer
2021-05-29 14:31 ` Jonatan Schlag
2021-05-29 16:19 ` Adolf Belka
2021-05-15 8:28 ` Dropping Python 2 (python-optional-src) Adolf Belka
2021-05-15 8:41 ` Adolf Belka
[not found] <4E6F7814-66BE-4B68-A1DF-C45377AA2F31@ipfire.org>
2021-06-01 13:57 ` Dropping Python 2 (python-m2crypto) Adolf Belka
2021-06-02 9:41 ` Michael Tremer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b72a9eaf-6ca3-7f48-6d49-1786fb4c4fba@ipfire.org \
--to=adolf.belka@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox