diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 89acaae..523253c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,3 +5,7 @@ include: project: QubesOS/qubes-continuous-integration - file: /r4.3/gitlab-vm.yml project: QubesOS/qubes-continuous-integration +- file: /r4.2/gitlab-base.yml + project: QubesOS/qubes-continuous-integration +- file: /r4.2/gitlab-host.yml + project: QubesOS/qubes-continuous-integration diff --git a/.qubesbuilder b/.qubesbuilder index 7f6c7e0..32c19b7 100644 --- a/.qubesbuilder +++ b/.qubesbuilder @@ -14,6 +14,18 @@ vm-fc38: rpm: build: - salt.spec +vm-fc39: + rpm: + build: + - salt.spec +vm-fc40: + rpm: + build: + - salt.spec +vm-fc41: + rpm: + build: + - salt.spec vm-bookworm: deb: build: diff --git a/0001-Drop-versioned-certifi-dependency.patch b/0001-Drop-versioned-certifi-dependency.patch index 6d8bca8..53cd0dc 100644 --- a/0001-Drop-versioned-certifi-dependency.patch +++ b/0001-Drop-versioned-certifi-dependency.patch @@ -5,6 +5,7 @@ Date: Thu, 15 Aug 2024 03:46:12 +0200 Subject: [PATCH] Drop versioned certifi dependency Let it pick the version from the distribution. +Similarly for requests. --- requirements/base.txt | 2 -- 1 file changed, 2 deletions(-) @@ -13,10 +14,13 @@ diff --git a/requirements/base.txt b/requirements/base.txt index de9cbaab17..bce14bc510 100644 --- a/requirements/base.txt +++ b/requirements/base.txt -@@ -7,8 +7,6 @@ PyYAML +@@ -7,10 +7,7 @@ PyYAML + msgpack>=1.0.0 + PyYAML MarkupSafe - requests<2.32.0 ; python_version < '3.10' - requests>=2.32.3 ; python_version >= '3.10' +-requests<2.32.0 ; python_version < '3.10' +-requests>=2.32.3 ; python_version >= '3.10' ++requests -certifi==2023.07.22; python_version < '3.10' -certifi>=2024.7.4; python_version >= '3.10' distro>=1.0.1 diff --git a/0001-Fix-Python3.13-compatibility-regarding-urllib.parse-.patch b/0001-Fix-Python3.13-compatibility-regarding-urllib.parse-.patch new file mode 100644 index 0000000..de65fc0 --- /dev/null +++ b/0001-Fix-Python3.13-compatibility-regarding-urllib.parse-.patch @@ -0,0 +1,49 @@ +From 187f1f6f3bf6e5f8da4f7029368ddd0967711ba9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= + +Date: Wed, 18 Sep 2024 04:54:24 +0200 +Subject: [PATCH] Fix Python3.13 compatibility regarding urllib.parse module + +Python 3.13 fixed handling relative paths in urllib.parse module. +Specifically, relative file URL is now constructed as file:path instead +of converting it to absolute file:///path. This breaks +salt.utils.url.create which expects file:/// specifically. The mismatch +results in for example changing salt://top.sls into salt://.sls and thus +not finding the top file. + +Fix this by handling both prefixes. + +Relevant python change: https://github.com/python/cpython/issues/85110 +Fixes: #66898 +--- + changelog/66898.fixed.md | 1 + + salt/utils/url.py | 5 ++++- + 2 files changed, 5 insertions(+), 1 deletion(-) + create mode 100644 changelog/66898.fixed.md + +diff --git a/changelog/66898.fixed.md b/changelog/66898.fixed.md +new file mode 100644 +index 0000000000..2549d5e00e +--- /dev/null ++++ b/changelog/66898.fixed.md +@@ -0,0 +1 @@ ++Fixed Python 3.13 compatibility regarding urllib.parse module +diff --git a/salt/utils/url.py b/salt/utils/url.py +index 478d8e911c..6d7ea37e6d 100644 +--- a/salt/utils/url.py ++++ b/salt/utils/url.py +@@ -47,7 +47,10 @@ def create(path, saltenv=None): + + query = f"saltenv={saltenv}" if saltenv else "" + url = salt.utils.data.decode(urlunparse(("file", "", path, "", query, ""))) +- return "salt://{}".format(url[len("file:///") :]) ++ # urlunparse changed behavior in Python 3.13 ++ if url.startswith("file:///"): ++ return "salt://{}".format(url[len("file:///") :]) ++ return "salt://{}".format(url[len("file:") :]) + + + def is_escaped(url): +-- +2.46.0 + diff --git a/salt.spec.in b/salt.spec.in index 43dff94..3ce5eb7 100644 --- a/salt.spec.in +++ b/salt.spec.in @@ -44,6 +44,7 @@ Patch1: match_hostname.patch Patch2: 0002-Hide-known-DeprecationWarning-related-to-PEP-594.patch Patch3: 0001-Drop-versioned-certifi-dependency.patch Patch4: 0001-Use-timezone-aware-datetime-objects-for-UTC-too.patch +Patch5: 0001-Fix-Python3.13-compatibility-regarding-urllib.parse-.patch BuildArch: noarch %ifarch %{ix86} x86_64