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 <[\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 + ) 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 diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/amd64/sdk/transition/parent b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/amd64/sdk/transition/parent new file mode 100644 index 00000000000..627544f8c19 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/amd64/sdk/transition/parent @@ -0,0 +1,2 @@ +.. +:coreos/targets/sdk/transition 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..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 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. +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..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 @@ -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/sdk/transition/README b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/README new file mode 100644 index 00000000000..7e5324b8d6d --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/README @@ -0,0 +1,2 @@ +This profile is only used for stage1 build of the SDK. It can be used +to ease into some rather disruptive updates, like Python update. 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*