Bug 1899132 - python-caja fails to build with Python 3.10: configure truncates 3.10 to 3.1
Summary: python-caja fails to build with Python 3.10: configure truncates 3.10 to 3.1
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-caja
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Wolfgang Ulbrich
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2020-11-18 15:23 UTC by Tomáš Hrnčiar
Modified: 2020-11-19 10:20 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-19 10:20:06 UTC
Type: Bug


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2020-11-18 15:23:57 UTC
python-caja fails to build with Python 3.10.0a2.

This seems like a problem with detecting the correct version of Python (3.10 instead of 3.1). 
 
$ rg -F "sys.version"
aclocal.m4
1230:    [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
1263:    if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
1366:# word of sys.version), in order to cope with versions such as 2.2c1.

configure
14719:  am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
14760:    if python_implementation() == 'CPython' and sys.version[:3] == '2.7':

$ python3.10 -c "import sys; sys.stdout.write(sys.version[:3])" 
3.1 
 
Please use (something like) this instead: 
 
$ python3.10 -c "import sys; sys.stdout.write('{}.{}'.format(*sys.version_info[:2]))" 
3.10

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01771018-python-caja/

For all our attempts to build python-caja with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-caja/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Patrick Monnerat 2020-11-18 17:52:17 UTC
This is an automake problem that has been fixed upstream end of last october.
Release 1.24.0 has been prepared with an automake older than this date and has latched the bugous macro into aclocal.m4.

@Wolfgang:
There is two ways to fix it:
1) Issue a new upstream release prepared with a very recent automake, then package it. You have to do it.
2) Have a "BR: autoconf" and an "autoreconf -fi" at end of %prep section. I can do it (https://koji.fedoraproject.org/koji/taskinfo?taskID=55817651).
You decide... please tell.

Comment 2 Miro Hrončok 2020-11-18 18:09:02 UTC
Option (2) is my recommendation. That way you always use the latest fixes when the Fedora package is built, instead of having to do (1) any tome something is wrong with the pre-generated configure. It is also consistent with the suggested idea of rebuilding everything in Fedora instead of shipping pre-generated files in SRPM:

https://docs.fedoraproject.org/en-US/packaging-guidelines/what-can-be-packaged/#_pregenerated_code

Comment 3 Patrick Monnerat 2020-11-18 18:16:17 UTC
> That way you always use the latest fixes when the Fedora package is built...

On the other way, autogen/buildconf process is done when generating an upstream release from SCM and systematically redoing it for an upatched release is not very elegant !

Comment 4 Wolfgang Ulbrich 2020-11-18 18:43:45 UTC
Patrick, you can run `NOCONFIGURE=1 ./autogen.sh` after `%autosetup` because
MATE ships `autogen.sh` in all tarballs.

Btw, mate-common pulls in `autoconf` as runtime require.
https://src.fedoraproject.org/rpms/mate-common/blob/master/f/mate-common.spec#_12

As Mate upstream folk i prefer to re-run autogen to fix the issue.
We include `autogen` ecactly for this case to avoid preparing a new tarball for a leightweight problem probably caused by a thirdparty.

Comment 5 Patrick Monnerat 2020-11-19 10:11:49 UTC
This should do it: https://koji.fedoraproject.org/koji/taskinfo?taskID=55864617
Builds successfully in mock with python 3.10.
Thanks for the hints.

Comment 6 Miro Hrončok 2020-11-19 10:20:06 UTC
Thanks.


Note You need to log in before you can comment on or make changes to this bug.