Bug 2259967

Summary: Missing runtime dependency on setuptools (for distutils) with Python 3.12+
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: m2cryptoAssignee: Neal Gompa <ngompa13>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 40CC: gholms, ngompa13, pemensik, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: m2crypto-0.41.0^git20240613.3156614-1.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-06-30 05:06:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2291510    

Description Adam Williamson 2024-01-24 00:46:58 UTC
m2crypto uses distutils. That means with Python 3.12 - where distutils is removed - it effectively runtime requires setuptools, as setuptools provides a hack to supply distutils.

This is easy to verify. Set up a clean F39 or Rawhide environment without python3-setuptools installed, and try to import m2crypto. It will fail. Install setuptools and it will work.

An alternative, of course, would be to send a patch upstream to drop m2crypto's use of distutils, then backport it.

Comment 1 Neal Gompa 2024-01-24 00:49:12 UTC
Could you please report this upstream? https://gitlab.com/m2crypto/m2crypto

Comment 2 Adam Williamson 2024-01-24 00:54:00 UTC
well, probably the appropriate issue for upstream would be "stop using distutils"...I can file that.

Comment 3 Adam Williamson 2024-01-24 00:56:04 UTC
oh, looks like upstream already fixed this in https://gitlab.com/m2crypto/m2crypto/-/commit/ce75069d20053ad7bd558166eeb7c9ec8c7d77da (which just kinda dropped it all) then https://gitlab.com/m2crypto/m2crypto/-/commit/b83e39ed09e46f9f2c506d56d22f08f1f2d2b63c (which added it back but with safety for distutils not being there).

Comment 4 Neal Gompa 2024-01-24 01:13:03 UTC
It's probably going to be safer to upgrade m2crypto and then backport the second patch... seems upstream made releases while I wasn't looking! :P

Comment 5 Aoife Moloney 2024-02-15 23:12:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.

Comment 6 Petr Menšík 2024-06-19 10:59:00 UTC
Is there any progress in making recent m2crypto working on recent releases? What are blockers, if I may ask? Should the effort spent into migrating remaining packages away from it?

Comment 7 Fedora Update System 2024-06-21 22:24:09 UTC
FEDORA-2024-5e75b28838 (m2crypto-0.41.0^git20240613.3156614-1.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-5e75b28838

Comment 8 Fedora Update System 2024-06-22 06:37:01 UTC
FEDORA-2024-5e75b28838 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-5e75b28838`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-5e75b28838

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2024-06-30 05:06:47 UTC
FEDORA-2024-5e75b28838 (m2crypto-0.41.0^git20240613.3156614-1.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.