From 5dfb62c7e87ed9abc98d71cf3e64d966e8c52efa Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 6 Jan 2026 16:43:47 +0100 Subject: [PATCH 1/6] overlay profiles: Bump python to 3.12 Try to do it with in a kinda-sorta proper Gentoo way - with PYTHON_TARGETS and PYTHON_SINGLE_TARGET variables in make.defaults. Still need to disable all other versions of python, otherwise our settings gets merged with settings from base Gentoo profiles, which currently enable python 3.13. And we also need to keep masking the other python versions, because emerge still for some reason wants to install python 3.13 or 3.14 for some packages, despite the settings in PYTHON_TARGETS. We are not bumping to 3.13, because sec-policy/selinux-base PYTHON_COMPAT is still on at most 3.12. Note that this change still allows python 3.11 in PYTHON_TARGETS for a transition period. Otherwise the SDK builds do not go past stage1. We only restrict generic images to 3.12 only, otherwise we would end up with two python version installed in sysext images. Signed-off-by: Krzesimir Nowak --- .../profiles/coreos/base/make.defaults | 12 ++++++------ .../profiles/coreos/base/package.mask | 10 ++++++---- .../coreos-overlay/profiles/coreos/base/use.mask | 14 -------------- .../profiles/coreos/targets/generic/make.defaults | 4 ++++ .../profiles/coreos/targets/generic/package.mask | 8 ++++++++ 5 files changed, 24 insertions(+), 24 deletions(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.mask diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults index 658fee2f8d7..1b87ebc6b1e 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults @@ -10,13 +10,13 @@ USE_EXPAND="${USE_EXPAND} GO_VERSION" USE="${USE} -cracklib -cups -tcpd -berkdb" -# Use Python 3 as the default version -USE="${USE} -python_single_target_python2_7 python_single_target_python3_11" -USE="${USE} -python_targets_python2_7 python_targets_python3_11" +# Use Python 3.12 as the default version, allow python 3.11 for a transition. +PYTHON_SINGLE_TARGET="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" +PYTHON_TARGETS="-pypy3_11 python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" -# Use Python 3 as the default version -BOOTSTRAP_USE="${BOOTSTRAP_USE} -python_single_target_python2_7 python_single_target_python3_11" -BOOTSTRAP_USE="${BOOTSTRAP_USE} -python_targets_python2_7 python_targets_python3_11" +# Same as above, but for bootstrapping. +BOOTSTRAP_USE="${BOOTSTRAP_USE} -python_single_target_pypy3_11 -python_single_target_python3_11 python_single_target_python3_12 -python_single_target_python3_13 -python_single_target_python3_14 -python_single_target_python3_13t -python_single_target_python3_14t" +BOOTSTRAP_USE="${BOOTSTRAP_USE} -python_targets_pypy3_11 python_targets_python3_11 python_targets_python3_12 -python_targets_python3_13 -python_targets_python3_14 -python_targets_python3_13t -python_targets_python3_14t" # Never install cron or cron jobs diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask index ca897247278..69b5d00fdcc 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask @@ -11,9 +11,11 @@ # certificate store provided in NSS rather than the Gentoo/Debian package. >=app-misc/ca-certificates-20000000 -# Python 3.12 is in portage-stable (currently testing), so avoid picking it -# up. Update this to mask later versions when we switch to 3.11. ->=dev-lang/python-3.12 - # Update engine needs updating to use a newer version of protobuf. >=dev-libs/protobuf-22.0 + +# Do not install python versions that were "disabled" in +# PYTHON_TARGETS. For some reason emerge still insists on installing +# those as a dependency for some packages. +=dev-lang/python-3.13 diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/use.mask b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/use.mask index 721bd1be2f6..b110ca2d876 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/use.mask +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/use.mask @@ -1,20 +1,6 @@ # Never enable experimental code kdbus -# We default to python 3.11 for now -python_targets_python2_7 -python_single_target_python2_7 -python_targets_python3_8 -python_single_target_python3_8 -python_targets_python3_9 -python_single_target_python3_9 -python_targets_python3_10 -python_single_target_python3_10 -python_targets_python3_12 -python_single_target_python3_12 -python_targets_python3_13 -python_single_target_python3_13 - # Unmask selinux so it can be enabled selectively in package.use -selinux diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults index 41c51cf110a..f2e02104ba8 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults @@ -3,6 +3,10 @@ FLATCAR_TYPE=generic +# Use Python 3.12 as the default version. +PYTHON_SINGLE_TARGET="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" +PYTHON_TARGETS="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" + USE="acpi usb cryptsetup policykit" USE="${USE} -cros_host -expat -cairo -X -man" USE="${USE} -acl -gpm -python" diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.mask b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.mask new file mode 100644 index 00000000000..290a00bc4f0 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.mask @@ -0,0 +1,8 @@ +# Copyright (c) 2026 The Flatcar Maintainers. +# Distributed under the terms of the GNU General Public License v2 + +# Do not install python versions that were "disabled" in +# PYTHON_TARGETS. For some reason emerge still insists on installing +# those as a dependency for some packages. +=dev-lang/python-3.13 From 1a55092a98d76d9bbb298a7ca06edae1e5e45263 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 6 Jan 2026 15:44:27 +0100 Subject: [PATCH 2/6] overlay *: Bump some python compats to 3.14 Signed-off-by: Krzesimir Nowak --- ...90124-r2.ebuild => google-compute-engine-20190124-r3.ebuild} | 2 +- .../{xenstore-4.14.2-r2.ebuild => xenstore-4.14.2-r3.ebuild} | 2 +- ...ertificates-3.120.ebuild => ca-certificates-3.120-r1.ebuild} | 2 +- ...eos-init-0.0.1-r201.ebuild => coreos-init-0.0.1-r202.ebuild} | 0 .../coreos-base/coreos-init/coreos-init-9999.ebuild | 2 +- ...lone-0.0.1-r592.ebuild => emerge-gitclone-0.0.1-r593.ebuild} | 0 .../coreos-base/emerge-gitclone/emerge-gitclone-9999.ebuild | 2 +- .../boto/{boto-2.49.0-r7.ebuild => boto-2.49.0-r8.ebuild} | 2 +- ...sdk-355.0.0-r3.ebuild => google-cloud-sdk-355.0.0-r4.ebuild} | 2 +- 9 files changed, 7 insertions(+), 7 deletions(-) rename sdk_container/src/third_party/coreos-overlay/app-emulation/google-compute-engine/{google-compute-engine-20190124-r2.ebuild => google-compute-engine-20190124-r3.ebuild} (95%) rename sdk_container/src/third_party/coreos-overlay/app-emulation/xenstore/{xenstore-4.14.2-r2.ebuild => xenstore-4.14.2-r3.ebuild} (98%) rename sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/{ca-certificates-3.120.ebuild => ca-certificates-3.120-r1.ebuild} (98%) rename sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/{coreos-init-0.0.1-r201.ebuild => coreos-init-0.0.1-r202.ebuild} (100%) rename sdk_container/src/third_party/coreos-overlay/coreos-base/emerge-gitclone/{emerge-gitclone-0.0.1-r592.ebuild => emerge-gitclone-0.0.1-r593.ebuild} (100%) rename sdk_container/src/third_party/coreos-overlay/dev-python/boto/{boto-2.49.0-r7.ebuild => boto-2.49.0-r8.ebuild} (97%) rename sdk_container/src/third_party/coreos-overlay/net-misc/google-cloud-sdk/{google-cloud-sdk-355.0.0-r3.ebuild => google-cloud-sdk-355.0.0-r4.ebuild} (98%) diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/google-compute-engine/google-compute-engine-20190124-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/google-compute-engine/google-compute-engine-20190124-r3.ebuild similarity index 95% rename from sdk_container/src/third_party/coreos-overlay/app-emulation/google-compute-engine/google-compute-engine-20190124-r2.ebuild rename to sdk_container/src/third_party/coreos-overlay/app-emulation/google-compute-engine/google-compute-engine-20190124-r3.ebuild index 40a7a10e63c..2235e90a901 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/google-compute-engine/google-compute-engine-20190124-r2.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/google-compute-engine/google-compute-engine-20190124-r3.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_11 ) +PYTHON_COMPAT=( python3_{11..14} ) DISTUTILS_USE_PEP517=setuptools inherit distutils-r1 diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/xenstore/xenstore-4.14.2-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/xenstore/xenstore-4.14.2-r3.ebuild similarity index 98% rename from sdk_container/src/third_party/coreos-overlay/app-emulation/xenstore/xenstore-4.14.2-r2.ebuild rename to sdk_container/src/third_party/coreos-overlay/app-emulation/xenstore/xenstore-4.14.2-r3.ebuild index 69914b39af8..9becc956eba 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/xenstore/xenstore-4.14.2-r2.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/xenstore/xenstore-4.14.2-r3.ebuild @@ -4,7 +4,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_{6..11} ) +PYTHON_COMPAT=( python3_{11..14} ) inherit multilib python-any-r1 systemd toolchain-funcs diff --git a/sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/ca-certificates-3.120.ebuild b/sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/ca-certificates-3.120-r1.ebuild similarity index 98% rename from sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/ca-certificates-3.120.ebuild rename to sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/ca-certificates-3.120-r1.ebuild index 6e98e259178..9523c71d1e4 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/ca-certificates-3.120.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/ca-certificates-3.120-r1.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{6..11} ) +PYTHON_COMPAT=( python3_{11..14} ) TMPFILES_OPTIONAL=1 inherit python-any-r1 systemd tmpfiles diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-0.0.1-r201.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-0.0.1-r202.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-0.0.1-r201.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-0.0.1-r202.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-9999.ebuild index 0a22231db5f..f7379ce2ff2 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-9999.ebuild @@ -4,7 +4,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_COMPAT=( python3_{11..14} ) inherit systemd python-any-r1 DESCRIPTION="Init scripts for Flatcar" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/emerge-gitclone/emerge-gitclone-0.0.1-r592.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/emerge-gitclone/emerge-gitclone-0.0.1-r593.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/emerge-gitclone/emerge-gitclone-0.0.1-r592.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/emerge-gitclone/emerge-gitclone-0.0.1-r593.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/emerge-gitclone/emerge-gitclone-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/emerge-gitclone/emerge-gitclone-9999.ebuild index 7c64269095b..abc297fb58f 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/emerge-gitclone/emerge-gitclone-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/emerge-gitclone/emerge-gitclone-9999.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{6..11} ) +PYTHON_COMPAT=( python3_{11..14} ) inherit python-single-r1 DESCRIPTION="emerge utilities for Flatcar developer images" diff --git a/sdk_container/src/third_party/coreos-overlay/dev-python/boto/boto-2.49.0-r7.ebuild b/sdk_container/src/third_party/coreos-overlay/dev-python/boto/boto-2.49.0-r8.ebuild similarity index 97% rename from sdk_container/src/third_party/coreos-overlay/dev-python/boto/boto-2.49.0-r7.ebuild rename to sdk_container/src/third_party/coreos-overlay/dev-python/boto/boto-2.49.0-r8.ebuild index 5dc49a7d84f..c9cdfa4ec2b 100644 --- a/sdk_container/src/third_party/coreos-overlay/dev-python/boto/boto-2.49.0-r7.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/dev-python/boto/boto-2.49.0-r8.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10..11} ) +PYTHON_COMPAT=( python3_{11..14} ) DISTUTILS_USE_PEP517=setuptools inherit distutils-r1 pypi diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/google-cloud-sdk/google-cloud-sdk-355.0.0-r3.ebuild b/sdk_container/src/third_party/coreos-overlay/net-misc/google-cloud-sdk/google-cloud-sdk-355.0.0-r4.ebuild similarity index 98% rename from sdk_container/src/third_party/coreos-overlay/net-misc/google-cloud-sdk/google-cloud-sdk-355.0.0-r3.ebuild rename to sdk_container/src/third_party/coreos-overlay/net-misc/google-cloud-sdk/google-cloud-sdk-355.0.0-r4.ebuild index 224311acb3e..5c95d908226 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/google-cloud-sdk/google-cloud-sdk-355.0.0-r3.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/google-cloud-sdk/google-cloud-sdk-355.0.0-r4.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_{6..11} ) +PYTHON_COMPAT=( python3_{11..14} ) inherit bash-completion-r1 python-single-r1 From 06328bb286fbef98e6d90bb5803c3d6210b1ff94 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 7 Jan 2026 12:09:21 +0100 Subject: [PATCH 3/6] changelog: Add an entry Signed-off-by: Krzesimir Nowak --- changelog/updates/2026-01-07-python-bump.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/updates/2026-01-07-python-bump.md diff --git a/changelog/updates/2026-01-07-python-bump.md b/changelog/updates/2026-01-07-python-bump.md new file mode 100644 index 00000000000..187a607b7f7 --- /dev/null +++ b/changelog/updates/2026-01-07-python-bump.md @@ -0,0 +1 @@ +- python ([3.12.12](https://www.python.org/downloads/release/python-31212/) (includes [3.12.0](https://www.python.org/downloads/release/python-3120/))) From 965d344a922b143821f51a5b47a163b95deb76f6 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 19 Jan 2026 11:55:44 +0100 Subject: [PATCH 4/6] overlay profiles: Add a transitional profile for SDK Signed-off-by: Krzesimir Nowak --- build_library/catalyst.sh | 7 ++++--- .../profiles/coreos/amd64/sdk/transition/parent | 2 ++ .../profiles/coreos/targets/sdk/transition/README | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/profiles/coreos/amd64/sdk/transition/parent create mode 100644 sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/README diff --git a/build_library/catalyst.sh b/build_library/catalyst.sh index d7d16f4e081..3e792417bed 100644 --- a/build_library/catalyst.sh +++ b/build_library/catalyst.sh @@ -80,7 +80,8 @@ export ac_cv_posix_semaphores_enabled=yes EOF } -# Common values for all stage spec files +# Common values for all stage spec files. Takes a stage number and, +# optionally, a profile name as parameters. catalyst_stage_default() { cat < Date: Mon, 19 Jan 2026 11:56:42 +0100 Subject: [PATCH 5/6] overlay profiles: Ease into Python bump with transitional profile We only allow one version of Python in the SDK and generic images, but this creates a friction during the SDK build where the seed still has an old version of Python and the stage1 is supposed to have the new one, and thus we end up with slot conflicts for python packages - I don't really understand what is going on (there are python packages in the seed image that are built for old Python and emerge wants to install the same packages in the seed but built for the new Python and it can't work its way around it.) Allowing both versions of Python to coexist in stage1 seems to be moving things forward. Stage3 image (stage2 is skipped) will contain only the new version of Python. Signed-off-by: Krzesimir Nowak --- .../coreos-overlay/profiles/coreos/base/make.defaults | 6 +++--- .../coreos-overlay/profiles/coreos/base/package.mask | 2 +- .../profiles/coreos/targets/generic/make.defaults | 4 ---- .../profiles/coreos/targets/generic/package.mask | 8 -------- .../profiles/coreos/targets/sdk/transition/make.defaults | 9 +++++++++ .../coreos/targets/sdk/transition/package.unmask | 1 + 6 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.mask create mode 100644 sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/make.defaults create mode 100644 sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/package.unmask diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults index 1b87ebc6b1e..cf5b8e5ba3e 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults @@ -10,13 +10,13 @@ USE_EXPAND="${USE_EXPAND} GO_VERSION" USE="${USE} -cracklib -cups -tcpd -berkdb" -# Use Python 3.12 as the default version, allow python 3.11 for a transition. +# Use Python 3.12 as the default version. PYTHON_SINGLE_TARGET="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" -PYTHON_TARGETS="-pypy3_11 python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" +PYTHON_TARGETS="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" # Same as above, but for bootstrapping. BOOTSTRAP_USE="${BOOTSTRAP_USE} -python_single_target_pypy3_11 -python_single_target_python3_11 python_single_target_python3_12 -python_single_target_python3_13 -python_single_target_python3_14 -python_single_target_python3_13t -python_single_target_python3_14t" -BOOTSTRAP_USE="${BOOTSTRAP_USE} -python_targets_pypy3_11 python_targets_python3_11 python_targets_python3_12 -python_targets_python3_13 -python_targets_python3_14 -python_targets_python3_13t -python_targets_python3_14t" +BOOTSTRAP_USE="${BOOTSTRAP_USE} -python_targets_pypy3_11 -python_targets_python3_11 python_targets_python3_12 -python_targets_python3_13 -python_targets_python3_14 -python_targets_python3_13t -python_targets_python3_14t" # Never install cron or cron jobs diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask index 69b5d00fdcc..85b9fe1f525 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask @@ -17,5 +17,5 @@ # Do not install python versions that were "disabled" in # PYTHON_TARGETS. For some reason emerge still insists on installing # those as a dependency for some packages. -=dev-lang/python-3.13 diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults index f2e02104ba8..41c51cf110a 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults @@ -3,10 +3,6 @@ FLATCAR_TYPE=generic -# Use Python 3.12 as the default version. -PYTHON_SINGLE_TARGET="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" -PYTHON_TARGETS="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" - USE="acpi usb cryptsetup policykit" USE="${USE} -cros_host -expat -cairo -X -man" USE="${USE} -acl -gpm -python" diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.mask b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.mask deleted file mode 100644 index 290a00bc4f0..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.mask +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2026 The Flatcar Maintainers. -# Distributed under the terms of the GNU General Public License v2 - -# Do not install python versions that were "disabled" in -# PYTHON_TARGETS. For some reason emerge still insists on installing -# those as a dependency for some packages. -=dev-lang/python-3.13 diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/make.defaults b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/make.defaults new file mode 100644 index 00000000000..540cbb1ae7d --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/make.defaults @@ -0,0 +1,9 @@ +# Override python settings + +# Use Python 3.12 as the default version, allow python 3.11 for a transition. +PYTHON_SINGLE_TARGET="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" +PYTHON_TARGETS="-pypy3_11 python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" + +# Same as above, but for bootstrapping. +BOOTSTRAP_USE="${BOOTSTRAP_USE} -python_single_target_pypy3_11 -python_single_target_python3_11 python_single_target_python3_12 -python_single_target_python3_13 -python_single_target_python3_14 -python_single_target_python3_13t -python_single_target_python3_14t" +BOOTSTRAP_USE="${BOOTSTRAP_USE} -python_targets_pypy3_11 python_targets_python3_11 python_targets_python3_12 -python_targets_python3_13 -python_targets_python3_14 -python_targets_python3_13t -python_targets_python3_14t" diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/package.unmask b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/package.unmask new file mode 100644 index 00000000000..0873f9ab037 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/package.unmask @@ -0,0 +1 @@ +=dev-lang/python-3.11* From f23661e2d01e012b618777665c0aeeb67855e2a5 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 16 Jan 2026 15:22:23 +0100 Subject: [PATCH 6/6] overlay dev-python/boto: Add a patch to make it work on python 3.12 Signed-off-by: Krzesimir Nowak --- .../dev-python/boto/boto-2.49.0-r8.ebuild | 1 + .../boto/files/boto-2.49.0-py312.patch | 335 ++++++++++++++++++ 2 files changed, 336 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/dev-python/boto/files/boto-2.49.0-py312.patch diff --git a/sdk_container/src/third_party/coreos-overlay/dev-python/boto/boto-2.49.0-r8.ebuild b/sdk_container/src/third_party/coreos-overlay/dev-python/boto/boto-2.49.0-r8.ebuild index c9cdfa4ec2b..91ee1f38ee9 100644 --- a/sdk_container/src/third_party/coreos-overlay/dev-python/boto/boto-2.49.0-r8.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/dev-python/boto/boto-2.49.0-r8.ebuild @@ -25,6 +25,7 @@ PATCHES=( "${FILESDIR}"/${P}-unbundle-six.patch "${FILESDIR}"/${P}-py310.patch "${FILESDIR}"/${P}-mock-spec.patch + "${FILESDIR}"/${P}-py312.patch ) RDEPEND=" diff --git a/sdk_container/src/third_party/coreos-overlay/dev-python/boto/files/boto-2.49.0-py312.patch b/sdk_container/src/third_party/coreos-overlay/dev-python/boto/files/boto-2.49.0-py312.patch new file mode 100644 index 00000000000..eb64e1e1a97 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/dev-python/boto/files/boto-2.49.0-py312.patch @@ -0,0 +1,335 @@ +diff '--color=auto' -u -r boto-2.49.0/MANIFEST.in boto-2.49.0-patched/MANIFEST.in +--- boto-2.49.0/MANIFEST.in 2018-07-11 17:35:36.000000000 -0000 ++++ boto-2.49.0-patched/MANIFEST.in 2026-01-16 15:03:51.938929181 -0000 +@@ -6,7 +6,5 @@ + include boto/endpoints.json + include boto/pyami/copybot.cfg + include boto/services/sonofmmm.cfg +-include boto/mturk/test/*.doctest +-include boto/mturk/test/.gitignore + recursive-include tests *.json *.py *.txt + recursive-include docs * +diff '--color=auto' -u -r boto-2.49.0/bin/instance_events boto-2.49.0-patched/bin/instance_events +--- boto-2.49.0/bin/instance_events 2018-07-11 17:35:36.000000000 -0000 ++++ boto-2.49.0-patched/bin/instance_events 2026-01-16 15:03:43.818883024 -0000 +@@ -83,7 +83,7 @@ + events[stat.id]['description'] = event.description + events[stat.id]['not_before'] = event.not_before + events[stat.id]['not_after'] = event.not_after +- if completed and re.match('^\[Completed\]',event.description): ++ if completed and re.match(r'^\[Completed\]',event.description): + events[stat.id]['not_before'] = 'Completed' + events[stat.id]['not_after'] = 'Completed' + +diff '--color=auto' -u -r boto-2.49.0/bin/launch_instance boto-2.49.0-patched/bin/launch_instance +--- boto-2.49.0/bin/launch_instance 2018-07-11 17:35:36.000000000 -0000 ++++ boto-2.49.0-patched/bin/launch_instance 2026-01-16 15:03:43.818883024 -0000 +@@ -50,7 +50,7 @@ + :param file_url: URL for the file to add, or a local path + :type file_url: str + """ +- if not re.match("^([a-zA-Z0-9]*:\/\/)(.*)", file_url): ++ if not re.match(r"^([a-zA-Z0-9]*:\/\/)(.*)", file_url): + if not file_url.startswith("/"): + file_url = os.path.join(os.getcwd(), file_url) + file_url = "file://%s" % file_url +@@ -58,7 +58,7 @@ + base_config = boto.utils.fetch_file(file_url) + base_config.seek(0) + for line in base_config.readlines(): +- match = re.match("^#import[\s\t]*([^\s^\t]*)[\s\t]*$", line) ++ match = re.match(r"^#import[\s\t]*([^\s^\t]*)[\s\t]*$", line) + if match: + self.add_config("%s/%s" % (base_url, match.group(1))) + base_config.seek(0) +@@ -95,7 +95,7 @@ + script_raw = boto.utils.fetch_file(scr_url) + script_content = '' + for line in script_raw.readlines(): +- match = re.match("^#import[\s\t]*([^\s^\t]*)[\s\t]*$", line) ++ match = re.match(r"^#import[\s\t]*([^\s^\t]*)[\s\t]*$", line) + #if there is an import + if match: + #Read the other script and put it in that spot +@@ -194,7 +194,7 @@ + scriptuples.append(('user_data', user_data)) + for scr in scripts: + scr_url = scr +- if not re.match("^([a-zA-Z0-9]*:\/\/)(.*)", scr_url): ++ if not re.match(r"^([a-zA-Z0-9]*:\/\/)(.*)", scr_url): + if not scr_url.startswith("/"): + scr_url = os.path.join(os.getcwd(), scr_url) + try: +diff '--color=auto' -u -r boto-2.49.0/boto/__init__.py boto-2.49.0-patched/boto/__init__.py +--- boto-2.49.0/boto/__init__.py 2018-07-11 20:42:42.000000000 -0000 ++++ boto-2.49.0-patched/boto/__init__.py 2026-01-16 15:03:43.822216377 -0000 +@@ -1136,7 +1136,7 @@ + * gs://bucket + * s3://bucket + * filename (which could be a Unix path like /a/b/c or a Windows path like +- C:\a\b\c) ++ C:\\a\\b\\c) + + The last example uses the default scheme ('file', unless overridden). + """ +diff '--color=auto' -u -r boto-2.49.0/boto/cloudfront/distribution.py boto-2.49.0-patched/boto/cloudfront/distribution.py +--- boto-2.49.0/boto/cloudfront/distribution.py 2018-07-11 17:35:36.000000000 -0000 ++++ boto-2.49.0-patched/boto/cloudfront/distribution.py 2026-01-16 15:03:43.822216377 -0000 +@@ -540,7 +540,7 @@ + :type policy_url: str + :param policy_url: If provided, allows the signature to contain + wildcard globs in the URL. For example, you could +- provide: 'http://example.com/media/\*' and the policy ++ provide: 'http://example.com/media/\\*' and the policy + and signature would allow access to all contents of + the media subdirectory. If not specified, only + allow access to the exact url provided in 'url'. +diff '--color=auto' -u -r boto-2.49.0/boto/cloudsearchdomain/layer1.py boto-2.49.0-patched/boto/cloudsearchdomain/layer1.py +--- boto-2.49.0/boto/cloudsearchdomain/layer1.py 2018-07-11 17:35:36.000000000 -0000 ++++ boto-2.49.0-patched/boto/cloudsearchdomain/layer1.py 2026-01-16 15:03:43.822216377 -0000 +@@ -270,7 +270,7 @@ + ~ operator to perform a sloppy phrase search. Disabling the `fuzzy` + operator disables the ability to use the ~ operator to perform a + fuzzy search. `escape` disables the ability to use a backslash ( +- `\`) to escape special characters within the search string. ++ `\\`) to escape special characters within the search string. + Disabling whitespace is an advanced option that prevents the parser + from tokenizing on whitespace, which can be useful for Vietnamese. + (It prevents Vietnamese words from being split incorrectly.) For +diff '--color=auto' -u -r boto-2.49.0/boto/connection.py boto-2.49.0-patched/boto/connection.py +--- boto-2.49.0/boto/connection.py 2026-01-16 15:03:21.202087596 -0000 ++++ boto-2.49.0-patched/boto/connection.py 2026-01-16 15:03:43.822216377 -0000 +@@ -664,10 +664,10 @@ + self.proxy_pass = proxy_pass + if 'http_proxy' in os.environ and not self.proxy: + pattern = re.compile( +- '(?:http://)?' +- '(?:(?P[\w\-\.]+):(?P.*)@)?' +- '(?P[\w\-\.]+)' +- '(?::(?P\d+))?' ++ r'(?:http://)?' ++ r'(?:(?P[\w\-\.]+):(?P.*)@)?' ++ r'(?P[\w\-\.]+)' ++ r'(?::(?P\d+))?' + ) + match = pattern.match(os.environ['http_proxy']) + if match: +diff '--color=auto' -u -r boto-2.49.0/boto/gs/resumable_upload_handler.py boto-2.49.0-patched/boto/gs/resumable_upload_handler.py +--- boto-2.49.0/boto/gs/resumable_upload_handler.py 2018-07-11 17:35:36.000000000 -0000 ++++ boto-2.49.0-patched/boto/gs/resumable_upload_handler.py 2026-01-16 15:03:43.822216377 -0000 +@@ -235,7 +235,7 @@ + range_spec = resp.getheader('range') + if range_spec: + # Parse 'bytes=-' range_spec. +- m = re.search('bytes=(\d+)-(\d+)', range_spec) ++ m = re.search(r'bytes=(\d+)-(\d+)', range_spec) + if m: + server_start = long(m.group(1)) + server_end = long(m.group(2)) +diff '--color=auto' -u -r boto-2.49.0/boto/https_connection.py boto-2.49.0-patched/boto/https_connection.py +--- boto-2.49.0/boto/https_connection.py 2026-01-16 15:03:21.182087483 -0000 ++++ boto-2.49.0-patched/boto/https_connection.py 2026-01-16 15:03:43.822216377 -0000 +@@ -77,7 +77,7 @@ + "validating server certificate: hostname=%s, certificate hosts=%s", + hostname, hosts) + for host in hosts: +- host_re = host.replace('.', '\.').replace('*', '[^.]*') ++ host_re = host.replace('.', r'\.').replace('*', '[^.]*') + if re.search('^%s$' % (host_re,), hostname, re.I): + return True + return False +diff '--color=auto' -u -r boto-2.49.0/boto/iam/connection.py boto-2.49.0-patched/boto/iam/connection.py +--- boto-2.49.0/boto/iam/connection.py 2018-07-11 17:35:36.000000000 -0000 ++++ boto-2.49.0-patched/boto/iam/connection.py 2026-01-16 15:03:43.822216377 -0000 +@@ -1111,7 +1111,7 @@ + else: + + for tld, policy in DEFAULT_POLICY_DOCUMENTS.items(): +- if tld is 'default': ++ if tld == 'default': + # Skip the default. We'll fall back to it if we don't find + # anything. + continue +diff '--color=auto' -u -r boto-2.49.0/boto/opsworks/layer1.py boto-2.49.0-patched/boto/opsworks/layer1.py +--- boto-2.49.0/boto/opsworks/layer1.py 2018-07-11 17:35:36.000000000 -0000 ++++ boto-2.49.0-patched/boto/opsworks/layer1.py 2026-01-16 15:03:43.822216377 -0000 +@@ -2657,7 +2657,7 @@ + OpsWorksand by Chef. The short name is also used as the name for + the directory where your app files are installed. It can have a + maximum of 200 characters and must be in the following format: +- /\A[a-z0-9\-\_\.]+\Z/. ++ /\\A[a-z0-9\\-\\_\\.]+\\Z/. + + :type attributes: map + :param attributes: One or more user-defined key/value pairs to be added +diff '--color=auto' -u -r boto-2.49.0/boto/plugin.py boto-2.49.0-patched/boto/plugin.py +--- boto-2.49.0/boto/plugin.py 2018-07-11 17:35:36.000000000 -0000 ++++ boto-2.49.0-patched/boto/plugin.py 2026-01-16 15:03:43.822216377 -0000 +@@ -37,8 +37,9 @@ + """ + + import glob +-import imp ++import importlib + import os.path ++import sys + + + class Plugin(object): +@@ -70,12 +71,13 @@ + (path, name) = os.path.split(filename) + (name, ext) = os.path.splitext(name) + +- (file, filename, data) = imp.find_module(name, [path]) ++ spec = importlib.util.spec_from_file_location(name, path) ++ module = importlib.util.module_from_spec(spec) ++ sys.modules[module_name] = module + try: +- return imp.load_module(name, file, filename, data) ++ spec.loader.exec_module(module) + finally: +- if file: +- file.close() ++ pass + + _plugin_loaded = False + +diff '--color=auto' -u -r boto-2.49.0/boto/pyami/config.py boto-2.49.0-patched/boto/pyami/config.py +--- boto-2.49.0/boto/pyami/config.py 2018-07-11 17:35:36.000000000 -0000 ++++ boto-2.49.0-patched/boto/pyami/config.py 2026-01-16 15:03:43.822216377 -0000 +@@ -95,7 +95,7 @@ + def load_from_path(self, path): + file = open(path) + for line in file.readlines(): +- match = re.match("^#import[\s\t]*([^\s^\t]*)[\s\t]*$", line) ++ match = re.match(r"^#import[\s\t]*([^\s^\t]*)[\s\t]*$", line) + if match: + extended_file = match.group(1) + (dir, file) = os.path.split(path) +diff '--color=auto' -u -r boto-2.49.0/boto/pyami/launch_ami.py boto-2.49.0-patched/boto/pyami/launch_ami.py +--- boto-2.49.0/boto/pyami/launch_ami.py 2018-07-11 17:35:36.000000000 -0000 ++++ boto-2.49.0-patched/boto/pyami/launch_ami.py 2026-01-16 15:03:43.822216377 -0000 +@@ -22,7 +22,7 @@ + # + import getopt + import sys +-import imp ++import importlib + import time + import boto + +@@ -132,11 +132,11 @@ + print('Reloading module %s to S3' % params['script_name']) + else: + print('Copying module %s to S3' % params['script_name']) +- l = imp.find_module(params['script_name']) ++ spec = importlib.util.find_spec(params['script_name']) + c = boto.connect_s3() + bucket = c.get_bucket(params['script_bucket']) + key = bucket.new_key(params['script_name'] + '.py') +- key.set_contents_from_file(l[0]) ++ key.set_contents_from_file(spec.origin) + params['script_md5'] = key.md5 + # we have everything we need, now build userdata string + l = [] +diff '--color=auto' -u -r boto-2.49.0/boto/redshift/layer1.py boto-2.49.0-patched/boto/redshift/layer1.py +--- boto-2.49.0/boto/redshift/layer1.py 2018-07-11 17:35:36.000000000 -0000 ++++ boto-2.49.0-patched/boto/redshift/layer1.py 2026-01-16 15:03:43.825549730 -0000 +@@ -417,7 +417,7 @@ + + Must contain at least one lowercase letter. + + Must contain one number. + + Can be any printable ASCII character (ASCII code 33 to 126) except ' +- (single quote), " (double quote), \, /, @, or space. ++ (single quote), " (double quote), \\, /, @, or space. + + :type cluster_security_groups: list + :param cluster_security_groups: A list of security groups to be +@@ -2189,7 +2189,7 @@ + + + Cannot exceed 512 characters + + Cannot contain spaces( ), double quotes ("), single quotes ('), a +- backslash (\), or control characters. The hexadecimal codes for ++ backslash (\\), or control characters. The hexadecimal codes for + invalid characters are: + + + x00 to x20 +@@ -2363,7 +2363,7 @@ + + Must contain at least one lowercase letter. + + Must contain one number. + + Can be any printable ASCII character (ASCII code 33 to 126) except ' +- (single quote), " (double quote), \, /, @, or space. ++ (single quote), " (double quote), \\, /, @, or space. + + :type cluster_parameter_group_name: string + :param cluster_parameter_group_name: The name of the cluster parameter +diff '--color=auto' -u -r boto-2.49.0/boto/sdb/db/manager/sdbmanager.py boto-2.49.0-patched/boto/sdb/db/manager/sdbmanager.py +--- boto-2.49.0/boto/sdb/db/manager/sdbmanager.py 2018-07-11 17:35:36.000000000 -0000 ++++ boto-2.49.0-patched/boto/sdb/db/manager/sdbmanager.py 2026-01-16 15:03:43.825549730 -0000 +@@ -345,7 +345,7 @@ + key = bucket.new_key(str(uuid.uuid4())) + value.id = "s3://%s/%s" % (key.bucket.name, key.name) + else: +- match = re.match("^s3:\/\/([^\/]*)\/(.*)$", value.id) ++ match = re.match(r"^s3:\/\/([^\/]*)\/(.*)$", value.id) + if match: + s3 = self.manager.get_s3_connection() + bucket = s3.get_bucket(match.group(1), validate=False) +@@ -360,7 +360,7 @@ + def decode_blob(self, value): + if not value: + return None +- match = re.match("^s3:\/\/([^\/]*)\/(.*)$", value) ++ match = re.match(r"^s3:\/\/([^\/]*)\/(.*)$", value) + if match: + s3 = self.manager.get_s3_connection() + bucket = s3.get_bucket(match.group(1), validate=False) +diff '--color=auto' -u -r boto-2.49.0/boto/sdb/db/property.py boto-2.49.0-patched/boto/sdb/db/property.py +--- boto-2.49.0/boto/sdb/db/property.py 2018-07-11 17:35:36.000000000 -0000 ++++ boto-2.49.0-patched/boto/sdb/db/property.py 2026-01-16 15:03:43.825549730 -0000 +@@ -262,7 +262,7 @@ + + data_type = boto.s3.key.Key + type_name = 'S3Key' +- validate_regex = "^s3:\/\/([^\/]*)\/(.*)$" ++ validate_regex = r"^s3:\/\/([^\/]*)\/(.*)$" + + def __init__(self, verbose_name=None, name=None, default=None, + required=False, validator=None, choices=None, unique=False): +diff '--color=auto' -u -r boto-2.49.0/setup.cfg boto-2.49.0-patched/setup.cfg +--- boto-2.49.0/setup.cfg 2018-07-11 20:44:23.000000000 -0000 ++++ boto-2.49.0-patched/setup.cfg 2026-01-16 15:03:43.825549730 -0000 +@@ -1,6 +1,3 @@ +-[bdist_wheel] +-universal = 1 +- + [egg_info] + tag_build = + tag_date = 0 +diff '--color=auto' -u -r boto-2.49.0/setup.py boto-2.49.0-patched/setup.py +--- boto-2.49.0/setup.py 2018-07-11 17:35:36.000000000 -0000 ++++ boto-2.49.0-patched/setup.py 2026-01-16 15:03:43.825549730 -0000 +@@ -27,10 +27,8 @@ + + try: + from setuptools import setup +- extra = dict(test_suite="tests.test.suite", include_package_data=True) + except ImportError: + from distutils.core import setup +- extra = {} + + import sys + +@@ -91,7 +89,6 @@ + platforms = "Posix; MacOS X; Windows", + classifiers = ["Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", +- "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Topic :: Internet", + "Programming Language :: Python :: 2", +@@ -100,5 +97,4 @@ + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4"], +- **extra + )