From 49c79ed27f3cb0304e1e61b4a25ec94a53332b218bb52efc75f2d494910513d1 Mon Sep 17 00:00:00 2001 From: Victor Zhestkov Date: Thu, 3 Oct 2024 11:58:56 +0000 Subject: [PATCH] Update to latest version OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=261 --- _lastrevision | 2 +- ...-key-tests-and-test_suse-on-sle12-68.patch | 87 +++++++++++++++++++ salt.changes | 8 ++ salt.spec | 4 +- 4 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 fix-x509-private-key-tests-and-test_suse-on-sle12-68.patch diff --git a/_lastrevision b/_lastrevision index 5c1d88e..d7601ae 100644 --- a/_lastrevision +++ b/_lastrevision @@ -1 +1 @@ -cc4e56e0465b20664e2f24bfe7034e5fee37232f \ No newline at end of file +1de50cc517e1ca25175eecfbdf87317aadb44d33 \ No newline at end of file diff --git a/fix-x509-private-key-tests-and-test_suse-on-sle12-68.patch b/fix-x509-private-key-tests-and-test_suse-on-sle12-68.patch new file mode 100644 index 0000000..92f7f1e --- /dev/null +++ b/fix-x509-private-key-tests-and-test_suse-on-sle12-68.patch @@ -0,0 +1,87 @@ +From 43e05d3beea1d6e772fe88c051abf006c2a9bf90 Mon Sep 17 00:00:00 2001 +From: Marek Czernek +Date: Thu, 3 Oct 2024 13:08:16 +0200 +Subject: [PATCH] Fix x509 private key tests and test_suse on SLE12 + (#684) + +--- + .../functional/modules/test_x509_v2.py | 12 +++++++++-- + .../functional/states/pkgrepo/test_suse.py | 20 +++++++++---------- + 2 files changed, 20 insertions(+), 12 deletions(-) + +diff --git a/tests/pytests/functional/modules/test_x509_v2.py b/tests/pytests/functional/modules/test_x509_v2.py +index 7de8f3b01f..3db78c1b63 100644 +--- a/tests/pytests/functional/modules/test_x509_v2.py ++++ b/tests/pytests/functional/modules/test_x509_v2.py +@@ -1442,14 +1442,22 @@ def test_create_private_key_with_passphrase(x509, algo): + + @pytest.mark.slow_test + def test_create_private_key_der(x509): +- res = x509.create_private_key(algo="ec", encoding="der") ++ try: ++ res = x509.create_private_key(algo="ec", encoding="der") ++ except NotImplementedError: ++ pytest.skip("Algorithm 'ec' is not supported on this OpenSSL version") + assert base64.b64decode(res) + + + @pytest.mark.slow_test + @pytest.mark.parametrize("passphrase", [None, "hunter2"]) + def test_create_private_key_pkcs12(x509, passphrase): +- res = x509.create_private_key(algo="ec", encoding="pkcs12", passphrase=passphrase) ++ try: ++ res = x509.create_private_key( ++ algo="ec", encoding="pkcs12", passphrase=passphrase ++ ) ++ except NotImplementedError: ++ pytest.skip("Algorithm 'ec' is not supported on this OpenSSL version") + assert base64.b64decode(res) + + +diff --git a/tests/pytests/functional/states/pkgrepo/test_suse.py b/tests/pytests/functional/states/pkgrepo/test_suse.py +index 3bafeedc94..d21a9aeb9d 100644 +--- a/tests/pytests/functional/states/pkgrepo/test_suse.py ++++ b/tests/pytests/functional/states/pkgrepo/test_suse.py +@@ -28,14 +28,14 @@ def suse_state_tree(grains, pkgrepo, state_tree): + - comments: + - '# Salt Test' + - refresh: 1 +- {% if grains['osmajorrelease'] == 15 %} +- - baseurl: https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP4/standard/ +- - humanname: openSUSE Backports for SLE 15 SP4 +- - gpgkey: https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP4/standard/repodata/repomd.xml.key +- {% elif grains['osfullname'] == 'openSUSE Tumbleweed' %} ++ {% if grains['osfullname'] == 'openSUSE Tumbleweed' %} + - baseurl: http://download.opensuse.org/tumbleweed/repo/oss/ + - humanname: openSUSE Tumbleweed OSS + - gpgkey: https://download.opensuse.org/tumbleweed/repo/oss/repodata/repomd.xml.key ++ {% else %} ++ - baseurl: https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP4/standard/ ++ - humanname: openSUSE Backports for SLE 15 SP4 ++ - gpgkey: https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP4/standard/repodata/repomd.xml.key + {% endif %} + """ + +@@ -53,14 +53,14 @@ def suse_state_tree(grains, pkgrepo, state_tree): + - comments: + - '# Salt Test (modified)' + - refresh: 1 +- {% if grains['osmajorrelease'] == 15 %} +- - baseurl: https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP4/standard/ +- - humanname: Salt modified Backports +- - gpgkey: https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP4/standard/repodata/repomd.xml.key +- {% elif grains['osfullname'] == 'openSUSE Tumbleweed' %} ++ {% if grains['osfullname'] == 'openSUSE Tumbleweed' %} + - baseurl: http://download.opensuse.org/tumbleweed/repo/oss/ + - humanname: Salt modified OSS + - gpgkey: https://download.opensuse.org/tumbleweed/repo/oss/repodata/repomd.xml.key ++ {% else %} ++ - baseurl: https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP4/standard/ ++ - humanname: Salt modified Backports ++ - gpgkey: https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP4/standard/repodata/repomd.xml.key + {% endif %} + """ + +-- +2.46.1 + diff --git a/salt.changes b/salt.changes index f9e4497..3e3c379 100644 --- a/salt.changes +++ b/salt.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Oct 3 11:21:30 UTC 2024 - Marek Czernek + +- Fix additional x509 tests and test_suse tests for SLE12 + +- Added: + * fix-x509-private-key-tests-and-test_suse-on-sle12-68.patch + ------------------------------------------------------------------- Wed Oct 2 07:47:58 UTC 2024 - Marek Czernek diff --git a/salt.spec b/salt.spec index ebeeae4..3363e1e 100644 --- a/salt.spec +++ b/salt.spec @@ -446,8 +446,10 @@ Patch140: revert-the-change-making-reactor-less-blocking-bsc-1.patch Patch141: allow-namedloadercontexts-to-be-returned-from-loader.patch # PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/commit/d54407ba6dc664e5e5f3f613e27ae24f828c9648 Patch142: avoid-explicit-reading-of-etc-salt-minion-bsc-122035.patch -# PATCH-FIX_UPSTREAM: https://github.com/openSUSE/salt/pull/682 +# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/682 Patch143: fix-x509-test-fails-on-old-openssl-systems-682.patch +# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/684 +Patch144: fix-x509-private-key-tests-and-test_suse-on-sle12-68.patch ### IMPORTANT: The line below is used as a snippet marker. Do not touch it. ### SALT PATCHES LIST END