Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package salt for openSUSE:Factory checked in at 2025-08-12 17:03:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/salt (Old) and /work/SRC/openSUSE:Factory/.salt.new.1085 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "salt" Tue Aug 12 17:03:42 2025 rev:179 rq:1298881 version:3006.0 Changes: -------- --- /work/SRC/openSUSE:Factory/salt/salt.changes 2025-07-06 17:05:34.805166842 +0200 +++ /work/SRC/openSUSE:Factory/.salt.new.1085/salt.changes 2025-08-12 17:04:47.023783375 +0200 @@ -1,0 +2,13 @@ +Mon Aug 11 13:57:29 UTC 2025 - Victor Zhestkov <vzhest...@suse.com> + +- Revert require M2Crypto >= 0.44.0 for SUSE Family distros +- Improve SL Micro 6.2 detection with grains +- Fix functional.states.test_user for SLES 16 and Micro systems +- Fix the tests failing on AlmaLinux 10 and other clones + +- Added: + * improve-sl-micro-6.2-detection-with-grains.patch + * fix-functional.states.test_user-for-sles-16-and-micr.patch + * fix-the-tests-failing-on-almalinux-10-and-other-clon.patch + +------------------------------------------------------------------- New: ---- fix-functional.states.test_user-for-sles-16-and-micr.patch fix-the-tests-failing-on-almalinux-10-and-other-clon.patch improve-sl-micro-6.2-detection-with-grains.patch ----------(New B)---------- New: * improve-sl-micro-6.2-detection-with-grains.patch * fix-functional.states.test_user-for-sles-16-and-micr.patch * fix-the-tests-failing-on-almalinux-10-and-other-clon.patch New: * fix-functional.states.test_user-for-sles-16-and-micr.patch * fix-the-tests-failing-on-almalinux-10-and-other-clon.patch New:- Added: * improve-sl-micro-6.2-detection-with-grains.patch * fix-functional.states.test_user-for-sles-16-and-micr.patch ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ salt.spec ++++++ --- /var/tmp/diff_new_pack.pFsayj/_old 2025-08-12 17:04:50.759939069 +0200 +++ /var/tmp/diff_new_pack.pFsayj/_new 2025-08-12 17:04:50.763939235 +0200 @@ -568,6 +568,12 @@ Patch175: fix-tests-issues-in-salt-shaker-environments-721.patch # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/722 Patch176: add-minion_legacy_req_warnings-option-to-avoid-noisy.patch +# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/68246 +Patch177: fix-the-tests-failing-on-almalinux-10-and-other-clon.patch +# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/66630 +Patch178: fix-functional.states.test_user-for-sles-16-and-micr.patch +# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/68247 +Patch179: improve-sl-micro-6.2-detection-with-grains.patch ### IMPORTANT: The line below is used as a snippet marker. Do not touch it. ### SALT PATCHES LIST END @@ -681,7 +687,7 @@ BuildRequires: %{python_module msgpack-python > 0.3} BuildRequires: %{python_module pyzmq > 2.2.0} %if 0%{?suse_version} >= 1500 -BuildRequires: %{python_module M2Crypto >= 0.44.0} +BuildRequires: %{python_module M2Crypto} %else BuildRequires: %{python_module pycrypto >= 2.6.1} %endif ++++++ _lastrevision ++++++ --- /var/tmp/diff_new_pack.pFsayj/_old 2025-08-12 17:04:50.903945070 +0200 +++ /var/tmp/diff_new_pack.pFsayj/_new 2025-08-12 17:04:50.911945402 +0200 @@ -1,3 +1,3 @@ -027db6671bef8be8800aed184d79a28f0318f9be +3084db7285ade6f5552ea3e79c11d57a17a6b529 (No newline at EOF) ++++++ fix-functional.states.test_user-for-sles-16-and-micr.patch ++++++ >From 6bab2b1bea75e240ebcb86b839a238496a235307 Mon Sep 17 00:00:00 2001 From: Victor Zhestkov <vzhest...@suse.com> Date: Mon, 11 Aug 2025 14:17:03 +0200 Subject: [PATCH] Fix functional.states.test_user for SLES 16 and Micro systems --- tests/pytests/functional/states/test_user.py | 42 +++++++++++++------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/tests/pytests/functional/states/test_user.py b/tests/pytests/functional/states/test_user.py index 5eac093ef4..231841ee78 100644 --- a/tests/pytests/functional/states/test_user.py +++ b/tests/pytests/functional/states/test_user.py @@ -138,7 +138,9 @@ def test_user_present_nondefault(grains, modules, states, username, user_home): if not salt.utils.platform.is_darwin() and not salt.utils.platform.is_windows(): assert user_home.is_dir() - if grains["os_family"] in ("Suse",) and not grains.get("transactional", False): + if grains["os_family"] == "Suse" and not ( + grains.get("transactional", False) or grains.get("osmajorrelease", 0) >= 16 + ): expected_group_name = "users" elif grains["os_family"] == "MacOS": expected_group_name = "staff" @@ -381,11 +383,15 @@ def test_user_present_existing(states, username): @pytest.mark.skip_unless_on_linux(reason="underlying functionality only runs on Linux") -@pytest.mark.skipif( - bool(salt.utils.path.which("transactional-update")), - reason="Skipping on transactional systems", -) -def test_user_present_change_groups(modules, states, username, group_1, group_2): +def test_user_present_change_groups( + grains, modules, states, username, group_1, group_2 +): + expected_groups = [group_2.name, group_1.name] + if grains["os_family"] == "Suse" and ( + grains.get("transactional", False) or grains.get("osmajorrelease", 0) >= 16 + ): + expected_groups.append(username) + ret = states.user.present( name=username, groups=[group_1.name, group_2.name], @@ -394,7 +400,9 @@ def test_user_present_change_groups(modules, states, username, group_1, group_2) user_info = modules.user.info(username) assert user_info - assert user_info["groups"] == [group_2.name, group_1.name] + assert sorted(user_info["groups"]) == sorted(expected_groups) + + expected_groups.remove(group_2.name) # run again and remove group_2 ret = states.user.present( @@ -405,17 +413,19 @@ def test_user_present_change_groups(modules, states, username, group_1, group_2) user_info = modules.user.info(username) assert user_info - assert user_info["groups"] == [group_1.name] + assert sorted(user_info["groups"]) == sorted(expected_groups) @pytest.mark.skip_unless_on_linux(reason="underlying functionality only runs on Linux") -@pytest.mark.skipif( - bool(salt.utils.path.which("transactional-update")), - reason="Skipping on transactional systems", -) def test_user_present_change_optional_groups( - modules, states, username, group_1, group_2 + grains, modules, states, username, group_1, group_2 ): + expected_groups = [group_2.name, group_1.name] + if grains["os_family"] == "Suse" and ( + grains.get("transactional", False) or grains.get("osmajorrelease", 0) >= 16 + ): + expected_groups.append(username) + ret = states.user.present( name=username, optional_groups=[group_1.name, group_2.name], @@ -424,7 +434,9 @@ def test_user_present_change_optional_groups( user_info = modules.user.info(username) assert user_info - assert user_info["groups"] == [group_2.name, group_1.name] + assert sorted(user_info["groups"]) == sorted(expected_groups) + + expected_groups.remove(group_2.name) # run again and remove group_2 ret = states.user.present( @@ -435,7 +447,7 @@ def test_user_present_change_optional_groups( user_info = modules.user.info(username) assert user_info - assert user_info["groups"] == [group_1.name] + assert sorted(user_info["groups"]) == sorted(expected_groups) @pytest.mark.skip_unless_on_linux(reason="underlying functionality only runs on Linux") -- 2.50.1 ++++++ fix-the-tests-failing-on-almalinux-10-and-other-clon.patch ++++++ >From 4cdce6826c5dcc4b26ce9b877858aa0425d33842 Mon Sep 17 00:00:00 2001 From: Victor Zhestkov <vzhest...@suse.com> Date: Mon, 11 Aug 2025 14:16:15 +0200 Subject: [PATCH] Fix the tests failing on AlmaLinux 10 and other clones * Fix the package manager related tests failing with AlmaLinux 10 * Fix network test failing on NetworkManager only systems * Align test conditions with upstream --- tests/integration/states/test_network.py | 7 +++++++ tests/pytests/functional/states/pkgrepo/test_centos.py | 6 +++++- tests/pytests/functional/states/test_pkg.py | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/integration/states/test_network.py b/tests/integration/states/test_network.py index 623cde77b9..efc5768e48 100644 --- a/tests/integration/states/test_network.py +++ b/tests/integration/states/test_network.py @@ -25,6 +25,13 @@ class NetworkTest(ModuleCase, SaltReturnAssertsMixin): "Network state only supported on RedHat and Debian based systems." "The network state does not currently work on VMware Photon OS." ) + if ( + os_family == "RedHat" + and self.run_function("grains.get", ["osmajorrelease"]) >= 10 + ): + self.skipTest( + "Network state doesn't fully support NetworkManager only systems." + ) @pytest.mark.slow_test def test_managed(self): diff --git a/tests/pytests/functional/states/pkgrepo/test_centos.py b/tests/pytests/functional/states/pkgrepo/test_centos.py index 6a84f96ac9..5f6e82d59f 100644 --- a/tests/pytests/functional/states/pkgrepo/test_centos.py +++ b/tests/pytests/functional/states/pkgrepo/test_centos.py @@ -242,7 +242,11 @@ def copr_pkgrepo_with_comments_name(pkgrepo, grains): or grains["os"] == "VMware Photon OS" ): pytest.skip("copr plugin not installed on {} CI".format(grains["osfinger"])) - if grains["os"] in ("CentOS Stream", "AlmaLinux") and grains["osmajorrelease"] == 9: + if ( + grains["os"] in ("CentOS Stream", "AlmaLinux", "Rocky") + and grains["osmajorrelease"] >= 9 + or grains["osfinger"] == "Amazon Linux-2023" + ): pytest.skip("No repo for {} in test COPR yet".format(grains["osfinger"])) pkgrepo_name = "hello-copr" try: diff --git a/tests/pytests/functional/states/test_pkg.py b/tests/pytests/functional/states/test_pkg.py index 9e5a8350ad..559a91e060 100644 --- a/tests/pytests/functional/states/test_pkg.py +++ b/tests/pytests/functional/states/test_pkg.py @@ -52,8 +52,8 @@ def PKG_TARGETS(grains): if grains["os"] == "VMware Photon OS": _PKG_TARGETS = ["wget", "zsh-html"] elif ( - grains["os"] in ("CentOS Stream", "AlmaLinux") - and grains["osmajorrelease"] == 9 + grains["os"] in ("CentOS Stream", "Rocky", "AlmaLinux") + and grains["osmajorrelease"] >= 9 ): _PKG_TARGETS = ["units", "zsh"] else: -- 2.50.1 ++++++ improve-sl-micro-6.2-detection-with-grains.patch ++++++ >From 270fda818beca6cb1a8b0f79f6df33e2cb7dc2d2 Mon Sep 17 00:00:00 2001 From: Victor Zhestkov <vzhest...@suse.com> Date: Mon, 11 Aug 2025 14:17:57 +0200 Subject: [PATCH] Improve SL Micro 6.2 detection with grains * Add workaround for detecting SL Micro 6.2 * Add SL Micro 6.2 core grains detection test --- salt/grains/core.py | 12 +++++++++++ tests/pytests/unit/grains/test_core.py | 28 ++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/salt/grains/core.py b/salt/grains/core.py index 619969df9a..582b37de94 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py @@ -2376,6 +2376,18 @@ def _legacy_linux_distribution_data(grains, os_release, lsb_has_error): grains["oscodename"] = oscodename if "os" not in grains: grains["os"] = _derive_os_grain(grains["osfullname"]) + if "SUSE_SUPPORT_PRODUCT" in os_release and "SUSE_SUPPORT_PRODUCT_VERSION": + # It's a workaround for very specific case of SL Micro 6.2 + # SL Micro 6.2 is different than prevoius ones and identifies itself + # as SLES-16, but transactional. This workaround was made to make the grains + # of SL Micro 6.2 aligned with the previous versions. + grains["oscodename"] = os_release.get( + "SUSE_PRETTY_NAME", + f"{os_release['SUSE_SUPPORT_PRODUCT']} {os_release['SUSE_SUPPORT_PRODUCT_VERSION']}", + ) + grains["osrelease"] = os_release["SUSE_SUPPORT_PRODUCT_VERSION"] + if os_release["SUSE_SUPPORT_PRODUCT"] == "SUSE Linux Micro": + grains["osfullname"] = "SL-Micro" # this assigns family names based on the os name # family defaults to the os name if not found grains["os_family"] = _OS_FAMILY_MAP.get(grains["os"], grains["os"]) diff --git a/tests/pytests/unit/grains/test_core.py b/tests/pytests/unit/grains/test_core.py index c15a3b4360..135c40bc2b 100644 --- a/tests/pytests/unit/grains/test_core.py +++ b/tests/pytests/unit/grains/test_core.py @@ -841,6 +841,34 @@ def test_suse_os_grains_tumbleweed(): _run_suse_os_grains_tests(_os_release_data, {}, expectation) +@pytest.mark.skip_unless_on_linux +def test_suse_os_grains_slmicro62(): + """ + Test if OS grains are parsed correctly in SL Micro 6.2 + """ + _os_release_data = { + "NAME": "SLES", + "VERSION": "16.0", + "VERSION_ID": "16.0", + "PRETTY_NAME": "SUSE Linux Enterprise Server 16.0", + "ID": "sles", + "ANSI_COLOR": "0;32", + "CPE_NAME": "cpe:/o:suse:sles:16:16.0", + "SUSE_SUPPORT_PRODUCT": "SUSE Linux Micro", + "SUSE_SUPPORT_PRODUCT_VERSION": "6.2", + "SUSE_PRETTY_NAME": "SUSE Linux Micro 6.2", + } + expectation = { + "oscodename": "SUSE Linux Micro 6.2", + "osfullname": "SL-Micro", + "osrelease": "6.2", + "osrelease_info": (6, 2), + "osmajorrelease": 6, + "osfinger": "SL-Micro-6", + } + _run_suse_os_grains_tests(_os_release_data, {}, expectation) + + @pytest.mark.skip_unless_on_linux def test_debian_9_os_grains(): """ -- 2.50.1