Debian Bug report logs -
#1006784
automake: fixes for python3.10 distutils changes
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Eric Dorland <eric@debian.org>:
Bug#1006784; Package src:automake-1.16.
(Fri, 04 Mar 2022 21:30:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Gianfranco Costamagna <locutusofborg@debian.org>:
New Bug report received and forwarded. Copy sent to Eric Dorland <eric@debian.org>.
(Fri, 04 Mar 2022 21:30:04 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Source: automake-1.16
Version: 1:1.16.5-1.1
Severity: important
tags: patch
Hello, with the changes in Python3.10, packages using automake will try to install into /usr/local/lib
instead of /usr/lib
The following patch, inspired from the one made by Stefano for pybind11 in #1006615 [1]
http://launchpadlibrarian.net/588978778/automake-1.16_1%3A1.16.5-1.1_1%3A1.16.5-1.1ubuntu1.diff.gz
diff -Nru automake-1.16-1.16.5/debian/changelog automake-1.16-1.16.5/debian/changelog
--- automake-1.16-1.16.5/debian/changelog 2021-11-11 11:46:00.000000000 +0000
+++ automake-1.16-1.16.5/debian/changelog 2022-03-04 09:29:43.000000000 +0000
@@ -1,3 +1,10 @@
+automake-1.16 (1:1.16.5-1.2) unstable; urgency=medium
+
+ * Non maintainer upload
+ * Fix search paths for new Python 3.10 LP: #1960608 (Closes: #-1)
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org> Fri, 04 Mar 2022 10:29:43 +0100
+
automake-1.16 (1:1.16.5-1.1) unstable; urgency=medium
* Non-maintainer upload.
diff -Nru automake-1.16-1.16.5/debian/patches/python3.10-sysconfig.patch automake-1.16-1.16.5/debian/patches/python3.10-sysconfig.patch
--- automake-1.16-1.16.5/debian/patches/python3.10-sysconfig.patch 1970-01-01 00:00:00.000000000 +0000
+++ automake-1.16-1.16.5/debian/patches/python3.10-sysconfig.patch 2022-03-04 09:29:40.000000000 +0000
@@ -0,0 +1,33 @@
+Description: Apply a similar fix from the one in https://github.com/pybind/pybind11/pull/3764/files to fix
+installations in /usr/local of tools using automake, fox example firewalld.
+Author: Gianfranco Costamagna <locutusofborg@debian.org>
+Last-Update: 2022-03-04
+
+--- automake-1.16-1.16.5.orig/m4/python.m4
++++ automake-1.16-1.16.5/m4/python.m4
+@@ -255,7 +255,11 @@ except ImportError:
+ am_cv_python_pythondir=`$PYTHON -c "
+ $am_python_setup_sysconfig
+ if can_use_sysconfig:
+- sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
++ scheme = sysconfig.get_default_scheme()
++ if scheme == 'posix_local':
++ # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
++ scheme = 'posix_prefix'
++ sitedir = sysconfig.get_path('purelib', scheme, vars={'base':'$am_py_prefix'})
+ else:
+ from distutils import sysconfig
+ sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
+@@ -297,7 +301,11 @@ sys.stdout.write(sitedir)"`
+ am_cv_python_pyexecdir=`$PYTHON -c "
+ $am_python_setup_sysconfig
+ if can_use_sysconfig:
+- sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_exec_prefix'})
++ scheme = sysconfig.get_default_scheme()
++ if scheme == 'posix_local':
++ # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
++ scheme = 'posix_prefix'
++ sitedir = sysconfig.get_path('platlib', scheme, vars={'platbase':'$am_py_exec_prefix'})
+ else:
+ from distutils import sysconfig
+ sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix')
diff -Nru automake-1.16-1.16.5/debian/patches/series automake-1.16-1.16.5/debian/patches/series
--- automake-1.16-1.16.5/debian/patches/series 2021-11-11 11:46:00.000000000 +0000
+++ automake-1.16-1.16.5/debian/patches/series 2022-03-04 09:28:47.000000000 +0000
@@ -2,3 +2,4 @@
0002-Drop-SHELL.patch
0003-t-python-prefix.sh-Respect-PYTHON-environment-variable.patch
python3.10.patch
+python3.10-sysconfig.patch
[1] https://github.com/pybind/pybind11/pull/3764/files
Information forwarded
to debian-bugs-dist@lists.debian.org, Eric Dorland <eric@debian.org>:
Bug#1006784; Package src:automake-1.16.
(Fri, 04 Mar 2022 22:21:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Stefano Rivera <stefanor@debian.org>:
Extra info received and forwarded to list. Copy sent to Eric Dorland <eric@debian.org>.
(Fri, 04 Mar 2022 22:21:03 GMT) (full text, mbox, link).
Message #10 received at 1006784@bugs.debian.org (full text, mbox, reply):
Hi Gianfranco (2022.03.04_17:26:52_-0400)
> Hello, with the changes in Python3.10, packages using automake will
> try to install into /usr/local/lib instead of /usr/lib
Aha, thanks for that.
The patch should work, but I'm not convinced that it's the best
solution.
The comment, copied from pybind11 refers to headers, but the paths being
queried are platlib and purelib. These are module installation paths,
not header paths.
It makes sense for packages to install to /usr/local when being built
locally, and to /usr when being built as part of a Debian package build.
In the pybind11 case, I helped it to find the Python headers in
/usr/include (platinclude), but let it install modules to the /usr/local
platlib.
dh_python3 will move modules from /usr/local to /usr, so this works.
Although there are scenarios where it won't, such as anything that
hard-codes the target path. And packages may need to adjust dh_install
configuration to find modules in /usr/local.
With this patch, automake will install to /usr for locally built code
and debian-packaged code. This probably isn't desired. Maybe check
prefix and select the appropriate scheme from that?
SR
--
Stefano Rivera
http://tumbleweed.org.za/
+1 415 683 3272
Reply sent
to Gianfranco Costamagna <locutusofborg@debian.org>:
You have taken responsibility.
(Wed, 09 Mar 2022 15:33:08 GMT) (full text, mbox, link).
Notification sent
to Gianfranco Costamagna <locutusofborg@debian.org>:
Bug acknowledged by developer.
(Wed, 09 Mar 2022 15:33:08 GMT) (full text, mbox, link).
Message #15 received at 1006784-close@bugs.debian.org (full text, mbox, reply):
On Fri, 4 Mar 2022 18:19:35 -0400 Stefano Rivera <stefanor@debian.org> wrote:
> Hi Gianfranco (2022.03.04_17:26:52_-0400)
> > Hello, with the changes in Python3.10, packages using automake will
> > try to install into /usr/local/lib instead of /usr/lib
>
> Aha, thanks for that.
>
> The patch should work, but I'm not convinced that it's the best
> solution.
>
> The comment, copied from pybind11 refers to headers, but the paths being
> queried are platlib and purelib. These are module installation paths,
> not header paths.
>
> It makes sense for packages to install to /usr/local when being built
> locally, and to /usr when being built as part of a Debian package build.
>
> In the pybind11 case, I helped it to find the Python headers in
> /usr/include (platinclude), but let it install modules to the /usr/local
> platlib.
>
> dh_python3 will move modules from /usr/local to /usr, so this works.
> Although there are scenarios where it won't, such as anything that
> hard-codes the target path. And packages may need to adjust dh_install
> configuration to find modules in /usr/local.
>
> With this patch, automake will install to /usr for locally built code
> and debian-packaged code. This probably isn't desired. Maybe check
> prefix and select the appropriate scheme from that?
>
thanks, I reverted the change in Ubuntu, looks like dh-python should deal with this?
Stuff such as firewalld is now FTBFS due to this change because it tries to install into /usr/local and fails.
G.
> SR
>
> --
> Stefano Rivera
> http://tumbleweed.org.za/
> +1 415 683 3272
>
>
Information forwarded
to debian-bugs-dist@lists.debian.org, Eric Dorland <eric@debian.org>:
Bug#1006784; Package src:automake-1.16.
(Sat, 12 Mar 2022 20:36:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Stefano Rivera <stefanor@debian.org>:
Extra info received and forwarded to list. Copy sent to Eric Dorland <eric@debian.org>.
(Sat, 12 Mar 2022 20:36:02 GMT) (full text, mbox, link).
Message #20 received at 1006784@bugs.debian.org (full text, mbox, reply):
Control: reopen -1
Hi Gianfranco (2022.03.04_18:19:35_-0400)
> With this patch, automake will install to /usr for locally built code
> and debian-packaged code. This probably isn't desired. Maybe check
> prefix and select the appropriate scheme from that?
I take this back. Of course it is combining posix_prefix with the
specified prefix, which will do the right thing.
We should apply this patch, ASAP.
SR
--
Stefano Rivera
http://tumbleweed.org.za/
+1 415 683 3272
Bug reopened
Request was from Stefano Rivera <stefanor@debian.org>
to 1006784-submit@bugs.debian.org.
(Sat, 12 Mar 2022 20:36:02 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Eric Dorland <eric@debian.org>:
Bug#1006784; Package src:automake-1.16.
(Mon, 14 Mar 2022 03:03:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Stefano Rivera <stefanor@debian.org>:
Extra info received and forwarded to list. Copy sent to Eric Dorland <eric@debian.org>.
(Mon, 14 Mar 2022 03:03:03 GMT) (full text, mbox, link).
Message #27 received at 1006784@bugs.debian.org (full text, mbox, reply):
Hi 1006784 (2022.03.12_16:32:30_-0400)
> Hi Gianfranco (2022.03.04_18:19:35_-0400)
> > With this patch, automake will install to /usr for locally built code
> > and debian-packaged code. This probably isn't desired. Maybe check
> > prefix and select the appropriate scheme from that?
>
> I take this back. Of course it is combining posix_prefix with the
> specified prefix, which will do the right thing.
Confirmed that this patch does the right thing.
As things stand: with automake 1:1.16.5-1.1:
python3.9:
--prefix=/usr installs to /usr/lib/python3.9/site-packages
--prefix=/usr/local installs to /usr/local/lib/python3.9/site-packages
python3.10:
--prefix=/usr installs to /usr/local/lib/python3.10/dist-packages
--prefix=/usr/local installs to /usr/local/local/lib/python3.10/dist-packages
That's an excess /local/ in the path. dh_python3 can fix it up, but
it'll break existing dh_install configs. And the /local/local thing
definitely won't work.
with this patch:
python3.9:
--prefix=/usr installs to /usr/lib/python3.9/site-packages
--prefix=/usr/local installs to /usr/local/lib/python3.9/site-packages
python3.10:
--prefix=/usr installs to /usr/lib/python3.10/site-packages
--prefix=/usr/local installs to /usr/local/lib/python3.10/site-packages
The site-packages, directory isn't on sys.path, but dh_python3 will fix
that up, and it matches previous behaviour, so no changes needed in
other packages.
SR
--
Stefano Rivera
http://tumbleweed.org.za/
+1 415 683 3272
Information forwarded
to debian-bugs-dist@lists.debian.org, Eric Dorland <eric@debian.org>:
Bug#1006784; Package src:automake-1.16.
(Wed, 16 Mar 2022 00:24:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Stefano Rivera <stefanor@debian.org>:
Extra info received and forwarded to list. Copy sent to Eric Dorland <eric@debian.org>.
(Wed, 16 Mar 2022 00:24:03 GMT) (full text, mbox, link).
Message #32 received at 1006784@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Control: tags 1006784 + pending
Control: forwarded 1006784 https://debbugs.gnu.org/54412
Dear maintainer,
I've prepared an NMU for automake-1.16 (versioned as 1:1.16.5-1.2) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.
Regards.
SR
[automake-1.16-1.16.5-1.2-nmu.diff (text/x-diff, attachment)]
Added tag(s) pending.
Request was from Stefano Rivera <stefanor@debian.org>
to 1006784-submit@bugs.debian.org.
(Wed, 16 Mar 2022 00:24:03 GMT) (full text, mbox, link).
Reply sent
to Stefano Rivera <stefanor@debian.org>:
You have taken responsibility.
(Fri, 18 Mar 2022 00:51:04 GMT) (full text, mbox, link).
Notification sent
to Gianfranco Costamagna <locutusofborg@debian.org>:
Bug acknowledged by developer.
(Fri, 18 Mar 2022 00:51:05 GMT) (full text, mbox, link).
Message #41 received at 1006784-close@bugs.debian.org (full text, mbox, reply):
Source: automake-1.16
Source-Version: 1:1.16.5-1.2
Done: Stefano Rivera <stefanor@debian.org>
We believe that the bug you reported is fixed in the latest version of
automake-1.16, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1006784@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Stefano Rivera <stefanor@debian.org> (supplier of updated automake-1.16 package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Tue, 15 Mar 2022 20:13:57 -0400
Source: automake-1.16
Architecture: source
Version: 1:1.16.5-1.2
Distribution: unstable
Urgency: medium
Maintainer: Eric Dorland <eric@debian.org>
Changed-By: Stefano Rivera <stefanor@debian.org>
Closes: 1006784
Changes:
automake-1.16 (1:1.16.5-1.2) unstable; urgency=medium
.
* Non maintainer upload
* Patch: Fix search paths for new Python 3.10, use posix_prefix scheme.
(Closes: #1006784, LP: #1960608)
Checksums-Sha1:
99e82ded56e5c9d5d020689912865be5e3450b3f 1973 automake-1.16_1.16.5-1.2.dsc
2ec708c23b9726bc8d029a3ff01188ea4b4bbb7c 14088 automake-1.16_1.16.5-1.2.debian.tar.xz
5858d58cbd5dfbcbb3af3901905a8e9c777e90b7 5137 automake-1.16_1.16.5-1.2_source.buildinfo
Checksums-Sha256:
2d423eccaf78a7348591ab529b1978c3dce9afedeaa0708c5fe79cbb1ef1336b 1973 automake-1.16_1.16.5-1.2.dsc
b5f96c6b04db1f8c71f4e44ce721a63bd0f58d34193b8c30d524e3fc48a4f43b 14088 automake-1.16_1.16.5-1.2.debian.tar.xz
e578e55884c64fd819b0b92989d9ffe06107e8d2c7eced243c3b1b4b6c071822 5137 automake-1.16_1.16.5-1.2_source.buildinfo
Files:
1eb85b669db72781b947898403190cdb 1973 devel optional automake-1.16_1.16.5-1.2.dsc
6b66860404f9ff9042595c370a03030f 14088 devel optional automake-1.16_1.16.5-1.2.debian.tar.xz
f728587ec3907c5dc503111be56fae0a 5137 devel optional automake-1.16_1.16.5-1.2_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iIoEARYKADIWIQTumtb5BSD6EfafSCRHew2wJjpU2AUCYjEtXxQcc3RlZmFub3JA
ZGViaWFuLm9yZwAKCRBHew2wJjpU2EkiAQCjlpds/aHHtLQ64DuiMG3zicl86wci
51KwoFFZA3wZMwEAmzVpwyL//a2A40EeLDI4ag7scrv8gryRtpjp/kHYogw=
=wMFT
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Mon, 18 Apr 2022 07:28:07 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Thu Aug 8 01:59:52 2024;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.