Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1948397
Summary: | gpgme fails to build with Python 3.10: configure: error: cannot import Python module "distutils". | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Tomáš Hrnčiar <thrnciar> |
Component: | gpgme | Assignee: | Igor Raits <igor.raits> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | igor.raits, mhroncok, packaging-team-maint, thrnciar |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-06-14 10:38:30 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: | 1890881 |
Description
Tomáš Hrnčiar
2021-04-12 06:48:44 UTC
This is needed for dnf, bumping severity and ccing packaging-team-maint@redhat m4/ax_python_devel.m4 has: # # Check if you have distutils, else fail # AC_MSG_CHECKING([for the distutils Python package]) ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` if test $? -eq 0; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) AC_MSG_ERROR([cannot import Python module "distutils". Please check your Python installation. The error was: $ac_distutils_result]) PYTHON_VERSION="" fi I read that as "if the command exited with 0, it's all good" -- and the command exits with 0 even in Python 3.10. However, configure has: # # Check if you have distutils, else fail # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5 $as_echo_n "checking for the distutils Python package... " >&6; } ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` if test -z "$ac_distutils_result"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "cannot import Python module \"distutils\". Please check your Python installation. The error was: $ac_distutils_result" "$LINENO" 5 PYTHON_VERSION="" fi Which I read as "if the command had empty (stdout+stderr), it's all good" -- an the command does have the warning on stdout, so it is not OK. My autotools/m4 skills are pretty much non-existent. I have no idea why the first logic (that seems correct) gets translated to the second (broken) logic. OK, when I run ./autogen.sh, configure is fixed. However, the spec file has: # People neeed to learn that you can't run autogen.sh anymore #./autogen.sh The commit says: Do not run autogen.sh Otherwise, VERSION is set to 1.13.1-unknown which breaks in multiple places. https://src.fedoraproject.org/rpms/gpgme/c/ad98c12a55f90c6120d0ebb2a43914e1aaa517cb?branch=rawhide How do we fix this? This has been fixed upstream autotools by Igor in m4/ax_python_devel.m4: http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=commit;h=883a2abd5a OK, I've run autogen.sh locally and cherry-picked the changes we need: https://src.fedoraproject.org/rpms/gpgme/pull-request/7 This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla. The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide. You can either build the package in the side tag, with: $ fedpkg build --target=f35-python Or you can the build and we will eventually build it for you. Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away. Thanks. See also https://fedoraproject.org/wiki/Changes/Python3.10 If you have general questions about the rebuild, please use this mailing list thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/G47SGOYIQLRDTWGOSLSWERZSSHXDEDH5/ The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build. This package was successfully rebuilt with Python 3.10. If you need this bugzilla open for tracking purposes, sorry for the automatic closing: feel free to reopen it. This package was successfully rebuilt with Python 3.10. If you need this bugzilla open for tracking purposes, sorry for the automatic closing: feel free to reopen it. |