deadsnakes / issues

Issues for https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
86 stars 6 forks source link

Ubuntu 24.04 : Package python3.10-minimal configuration error (SyntaxError) #283

Closed fuog closed 7 months ago

fuog commented 7 months ago

Hello everyone,

while testing your python3.10 package on Ubuntu 24.04 I noticed that there is a problem configuring the packages. It seems to affect python3.11 in the same way.

root@bfc198acc443:/# apt install python3.10 python3.10-distutils
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libnsl2 libpython3.10-minimal libpython3.10-stdlib libtirpc-common libtirpc3t64 python3.10-lib2to3 python3.10-minimal
Suggested packages:
  python3.10-venv binutils binfmt-support
The following NEW packages will be installed:
  libnsl2 libpython3.10-minimal libpython3.10-stdlib libtirpc-common libtirpc3t64 python3.10 python3.10-distutils python3.10-lib2to3 python3.10-minimal
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 5398 kB of archives.
After this operation, 20.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu noble/main amd64 libpython3.10-minimal amd64 3.10.14-1+noble1 [801 kB]
Get:2 http://archive.ubuntu.com/ubuntu noble/main amd64 libtirpc-common all 1.3.4+ds-1.1build1 [8094 B]
Get:3 http://archive.ubuntu.com/ubuntu noble/main amd64 libtirpc3t64 amd64 1.3.4+ds-1.1build1 [82.6 kB]
Get:4 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu noble/main amd64 python3.10-minimal amd64 3.10.14-1+noble1 [1906 kB]
Get:5 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu noble/main amd64 libpython3.10-stdlib amd64 3.10.14-1+noble1 [1823 kB]
Get:6 http://archive.ubuntu.com/ubuntu noble/main amd64 libnsl2 amd64 1.3.0-3build3 [41.4 kB]
Get:7 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu noble/main amd64 python3.10 amd64 3.10.14-1+noble1 [510 kB]
Get:8 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu noble/main amd64 python3.10-lib2to3 all 3.10.14-1+noble1 [82.1 kB]
Get:9 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu noble/main amd64 python3.10-distutils all 3.10.14-1+noble1 [144 kB]
Fetched 5398 kB in 1s (7885 kB/s)             
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libpython3.10-minimal:amd64.
(Reading database ... 10460 files and directories currently installed.)
Preparing to unpack .../0-libpython3.10-minimal_3.10.14-1+noble1_amd64.deb ...
Unpacking libpython3.10-minimal:amd64 (3.10.14-1+noble1) ...
Selecting previously unselected package python3.10-minimal.
Preparing to unpack .../1-python3.10-minimal_3.10.14-1+noble1_amd64.deb ...
Unpacking python3.10-minimal (3.10.14-1+noble1) ...
Selecting previously unselected package libtirpc-common.
Preparing to unpack .../2-libtirpc-common_1.3.4+ds-1.1build1_all.deb ...
Unpacking libtirpc-common (1.3.4+ds-1.1build1) ...
Selecting previously unselected package libtirpc3t64:amd64.
Preparing to unpack .../3-libtirpc3t64_1.3.4+ds-1.1build1_amd64.deb ...
Adding 'diversion of /lib/x86_64-linux-gnu/libtirpc.so.3 to /lib/x86_64-linux-gnu/libtirpc.so.3.usr-is-merged by libtirpc3t64'
Adding 'diversion of /lib/x86_64-linux-gnu/libtirpc.so.3.0.0 to /lib/x86_64-linux-gnu/libtirpc.so.3.0.0.usr-is-merged by libtirpc3t64'
Unpacking libtirpc3t64:amd64 (1.3.4+ds-1.1build1) ...
Selecting previously unselected package libnsl2:amd64.
Preparing to unpack .../4-libnsl2_1.3.0-3build3_amd64.deb ...
Unpacking libnsl2:amd64 (1.3.0-3build3) ...
Selecting previously unselected package libpython3.10-stdlib:amd64.
Preparing to unpack .../5-libpython3.10-stdlib_3.10.14-1+noble1_amd64.deb ...
Unpacking libpython3.10-stdlib:amd64 (3.10.14-1+noble1) ...
Selecting previously unselected package python3.10.
Preparing to unpack .../6-python3.10_3.10.14-1+noble1_amd64.deb ...
Unpacking python3.10 (3.10.14-1+noble1) ...
Selecting previously unselected package python3.10-lib2to3.
Preparing to unpack .../7-python3.10-lib2to3_3.10.14-1+noble1_all.deb ...
Unpacking python3.10-lib2to3 (3.10.14-1+noble1) ...
Selecting previously unselected package python3.10-distutils.
Preparing to unpack .../8-python3.10-distutils_3.10.14-1+noble1_all.deb ...
Unpacking python3.10-distutils (3.10.14-1+noble1) ...
Setting up libtirpc-common (1.3.4+ds-1.1build1) ...
Setting up python3.10-lib2to3 (3.10.14-1+noble1) ...
Setting up libpython3.10-minimal:amd64 (3.10.14-1+noble1) ...
Setting up python3.10-distutils (3.10.14-1+noble1) ...
Setting up libtirpc3t64:amd64 (1.3.4+ds-1.1build1) ...
Setting up python3.10-minimal (3.10.14-1+noble1) ...
  File "/usr/lib/python3.10/_sysconfigdata__x86_64-linux-gnu.py", line 48
    '
    ^
SyntaxError: unterminated string literal (detected at line 48)
dpkg: error processing package python3.10-minimal (--configure):
 installed python3.10-minimal package post-installation script subprocess returned error exit status 1
Setting up libnsl2:amd64 (1.3.0-3build3) ...
dpkg: dependency problems prevent configuration of python3.10:
 python3.10 depends on python3.10-minimal (= 3.10.14-1+noble1); however:
  Package python3.10-minimal is not configured yet.

dpkg: error processing package python3.10 (--configure):
 dependency problems - leaving unconfigured
Setting up libpython3.10-stdlib:amd64 (3.10.14-1+noble1) ...
Processing triggers for libc-bin (2.39-0ubuntu8) ...
Errors were encountered while processing:
 python3.10-minimal
 python3.10

the place in the /usr/lib/python3.10/_sysconfigdata__x86_64-linux-gnu.py file that is being criticized looks like this:

...
 'CONFIGURE_CFLAGS': '-g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '
                     ' '
                     '  '
                     ' '
                     '-fstack-protector-strong -fstack-clash-protection -Wformat '
                     '-Werror=format-security -fcf-protection '
                     '                             <----------------------- line 48
 'CONFIGURE_CFLAGS_NODIST': '-std=c99 -Wextra -Wno-unused-result '
                            '-Wno-unused-parameter '
                            '-Wno-missing-field-initializers '
...

i think the whole thing seems to be a simple mistake, but unfortunately i don't know enough about this process to be able to help out. i hope that my report will still help you.

lsb_release -a

root@bfc198acc443:/# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04 LTS
Release:        24.04
Codename:       noble

uname -a

root@bfc198acc443:/# uname -a
Linux bfc198acc443 6.8.0-76060800daily20240311-generic #202403110203~1713206908~22.04~3a62479 SMP PREEMPT_DYNAMIC Mon A x86_64 x86_64 x86_64 GNU/Linux

My System where podman is running on (my kernel is comming from):

❯ lsb_release -a
No LSB modules are available.
Distributor ID: Pop
Description:    Pop!_OS 22.04 LTS
Release:        22.04
Codename:       jammy

reproducing the problem

podman run --name test --rm -it ubuntu:24.04

This will give us a simple instance of ubuntu:24.04 just setting the minimal things up will run in to the problem with the package:

apt update
export TZ="Europe/Zurich"
ln -fs "/usr/share/zoneinfo/$TZ" /etc/localtime
DEBIAN_FRONTEND=noninteractive apt install curl tzdata ca-certificates software-properties-common -y
add-apt-repository ppa:deadsnakes/ppa -y
apt install python3.10 python3.10-distutils -y

# see error above ..

This is the exact image i used :

❯ podman images
REPOSITORY                                                                TAG                     IMAGE ID      CREATED        SIZE
docker.io/library/ubuntu                                                  24.04                   de52d803b224  4 days ago     78.7 MB
...

best regards,