Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package salt for openSUSE:Factory checked in at 2026-09-18 22:03:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/salt (Old) and /work/SRC/openSUSE:Factory/.salt.new.383539 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "salt" Fri Sep 18 22:03:26 2026 rev:207 rq:1378771 version:3006.0 Changes: -------- --- /work/SRC/openSUSE:Factory/salt/salt.changes 2026-09-12 21:16:28.057262840 +0200 +++ /work/SRC/openSUSE:Factory/.salt.new.383539/salt.changes 2026-09-18 22:03:54.349973258 +0200 @@ -1,0 +2,16 @@ +Fri Sep 18 07:56:27 UTC 2026 - Victor Zhestkov <[email protected]> + +- Ignore release if not specified in the pkg state (bsc#1280289) + +- Added: + * ignore-release-if-not-specified-in-the-pkg-state-bsc.patch + +------------------------------------------------------------------- +Thu Sep 17 11:15:50 UTC 2026 - Marek Czernek <[email protected]> + +- Stabilize testsuite + +- Added: + * stabilize-testsuite-784.patch + +------------------------------------------------------------------- New: ---- ignore-release-if-not-specified-in-the-pkg-state-bsc.patch stabilize-testsuite-784.patch ----------(New B)---------- New:- Added: * ignore-release-if-not-specified-in-the-pkg-state-bsc.patch New:- Added: * stabilize-testsuite-784.patch ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ salt.spec ++++++ --- /var/tmp/diff_new_pack.pSMzyE/_old 2026-09-18 22:03:58.292138473 +0200 +++ /var/tmp/diff_new_pack.pSMzyE/_new 2026-09-18 22:03:58.294138557 +0200 @@ -702,6 +702,12 @@ Patch226: add-__pillar__-global-in-templates-and-matchers-776.patch # PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/70269 Patch227: patch-tornado-for-ghsa-8423-8fgw-73vq-783.patch +# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/784 +# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/70282 +Patch228: stabilize-testsuite-784.patch +# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/786 +# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/70231 +Patch229: ignore-release-if-not-specified-in-the-pkg-state-bsc.patch ### IMPORTANT: The line below is used as a snippet marker. Do not touch it. ### SALT PATCHES LIST END ++++++ _lastrevision ++++++ --- /var/tmp/diff_new_pack.pSMzyE/_old 2026-09-18 22:03:58.434144425 +0200 +++ /var/tmp/diff_new_pack.pSMzyE/_new 2026-09-18 22:03:58.437144551 +0200 @@ -1,3 +1,3 @@ -6611f033fee9b85d997d265e3a79393d1c670a7d +9b98eebfdd0590dc79d69842e3f70703657eed38 (No newline at EOF) ++++++ ignore-release-if-not-specified-in-the-pkg-state-bsc.patch ++++++ >From 733b8f2120f7207d9bb2c7a92a68e95dfe1b7174 Mon Sep 17 00:00:00 2001 From: Victor Zhestkov <[email protected]> Date: Fri, 18 Sep 2026 09:34:00 +0200 Subject: [PATCH] Ignore release if not specified in the pkg state (bsc#1280289) * Ignore relese on verification if not specified in state * Add tests with release either in installed or required packages --- salt/states/pkg.py | 11 +++++++++++ tests/pytests/unit/states/test_pkg.py | 28 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/salt/states/pkg.py b/salt/states/pkg.py index a605b231076..27096c2277b 100644 --- a/salt/states/pkg.py +++ b/salt/states/pkg.py @@ -222,7 +222,18 @@ def _fulfills_version_spec(versions, oper, desired_version, ignore_epoch=None): if salt.utils.platform.is_freebsd(): if isinstance(versions, dict) and "version" in versions: versions = versions["version"] + + # If desired version is missing a release, but not the installed + # The versions would be equal, ignore the release. + # This can happen on checking if a package version 3.2 is satisfied by + # 3.2-1.0 or 3.2-2.1 + ignore_release = "-" not in desired_version + for ver in versions: + if ignore_release and "-" in ver: + # Strip release part from the installed package version + # if release was not specified as desired + ver = ver[: ver.find("-")] if ( oper == "==" and fnmatch.fnmatch(ver, desired_version) ) or salt.utils.versions.compare( diff --git a/tests/pytests/unit/states/test_pkg.py b/tests/pytests/unit/states/test_pkg.py index f58be11011f..7d1ea1bfdd6 100644 --- a/tests/pytests/unit/states/test_pkg.py +++ b/tests/pytests/unit/states/test_pkg.py @@ -285,6 +285,24 @@ def test_parse_version_string(version_string, expected_version_conditions): ("> 15.0.0", ["16.0.0"], True), ("15.0.0", [], False), ("15.0.0", ["15.0.0"], True), + # Combinations with release present for either installed or required + ("1.2.3", ["1.2.3-1.1"], True), + ("1.2.3", ["1.2.3-2.1"], True), + ("= 1.2.3", ["1.2.3-2.1"], True), + ("!= 1.2.3", ["1.2.3-2.1"], False), + ("!= 1.2.3", ["1.2.2-1.1"], True), + ("1.2.3", ["1.2.2-2.1"], False), + ("1.2.3", ["1.2.4-2.1"], False), + ("1.2.2", ["1.2.3-2.1"], False), + ("1.2.4", ["1.2.3-2.1"], False), + (">= 1.2.3", ["1.2.3-2.1"], True), + (">= 1.2.3", ["1.2.3-4.2"], True), + (">= 1.2.3-1.3", ["1.2.3-1.2"], False), + ("> 1.2.3", ["1.2.3-2.1"], False), + ("> 1.2.3", ["1.2.3-3.1"], False), + ("1.2.3-2.1", ["1.2.3"], False), + ("1.2.2-2.1", ["1.2.3"], False), + ("1.2.4-2.1", ["1.2.3"], False), # No version specified, whatever version installed. This is threated like ANY version installed fulfills. ("", ["15.0.0"], True), # No version specified, no version installed. @@ -312,6 +330,16 @@ def test_fulfills_version_string(version_string, installed_versions, expected_re (["1.0.0", "14.0.1", "16.0.0", "2.0.0"], "==", "17.0.0", False), (["1.0.0"], "!=", "1.0.0", False), ([], "==", "17.0.0", False), + # Combinations with release present for either installed or required + (["1.2.3-1.2"], "==", "1.2.3", True), + (["1.2.3"], "==", "1.2.3-1.2", False), + (["1.2.3-1.2"], ">=", "1.2.3-1.3", False), + (["1.2.3-1.2", "1.2.2-1.1"], "==", "1.2.3", True), + (["1.2.3", "1.2.2-1.1"], "==", "1.2.3-1.2", False), + (["1.2.3", "1.2.2-1.1"], ">=", "1.2.3-1.2", False), + (["1.2.3-1.2"], ">=", "1.2.3", True), + (["1.2.3-1.2"], ">=", "1.2.3-1.3", False), + (["1.2.1-1.2"], "!=", "1.2.3", True), ], ) def test_fulfills_version_spec(installed_versions, operator, version, expected_result): -- 2.55.0 ++++++ stabilize-testsuite-784.patch ++++++ >From ff227c3fd8bc468ae5953a633b0982dda0ae5f22 Mon Sep 17 00:00:00 2001 From: Marek Czernek <[email protected]> Date: Thu, 17 Sep 2026 10:54:45 +0200 Subject: [PATCH] Stabilize testsuite (#784) * Fix repo URL that had expired gpg key * Fix behavior on SUSE vs openSUSE systems * Fix test_http * Fix flaky test_log_sanitize[ls] by draining child output The test called term.recv() once and immediately asserted on caplog.text, which races against the child producing output. echo wrote to stdout quickly enough to be captured; ls 123456 wrote to stderr after a stat() delay and was missed, leaving caplog.text empty. Drain the child with the canonical 'while term.has_unread_data: recv()' loop used elsewhere in the codebase. --------- Co-authored-by: Daniel A. Wozniak <[email protected]> --- .../functional/states/pkgrepo/test_suse.py | 16 +++++++------- tests/pytests/functional/states/test_user.py | 22 ++++++++++++++----- tests/pytests/unit/utils/test_vt.py | 3 ++- tests/unit/utils/test_http.py | 14 +++++++++++- 4 files changed, 39 insertions(+), 16 deletions(-) diff --git a/tests/pytests/functional/states/pkgrepo/test_suse.py b/tests/pytests/functional/states/pkgrepo/test_suse.py index d21a9aeb9d..b864352dfd 100644 --- a/tests/pytests/functional/states/pkgrepo/test_suse.py +++ b/tests/pytests/functional/states/pkgrepo/test_suse.py @@ -33,9 +33,9 @@ def suse_state_tree(grains, pkgrepo, state_tree): - 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 + - baseurl: https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP7/standard/ + - humanname: openSUSE Backports for SLE 15 SP7 + - gpgkey: https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP7/standard/repodata/repomd.xml.key {% endif %} """ @@ -58,9 +58,9 @@ def suse_state_tree(grains, pkgrepo, state_tree): - 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/ + - baseurl: https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP7/standard/ - humanname: Salt modified Backports - - gpgkey: https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP4/standard/repodata/repomd.xml.key + - gpgkey: https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP7/standard/repodata/repomd.xml.key {% endif %} """ @@ -202,12 +202,12 @@ def test_pkgrepo_managed_modify(grains, modules, subtests, suse_state_tree): "comments": {"new": ["# Salt Test (modified)"], "old": None}, "refresh": {"new": 1, "old": None}, "gpgkey": { - "new": "https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP4/standard/repodata/repomd.xml.key", + "new": "https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15-SP7/standard/repodata/repomd.xml.key", "old": None, }, "name": { "new": "Salt modified Backports", - "old": "openSUSE Backports for SLE 15 SP4", + "old": "openSUSE Backports for SLE 15 SP7", }, } assert state.comment.startswith( @@ -223,7 +223,7 @@ def test_pkgrepo_managed_modify(grains, modules, subtests, suse_state_tree): assert state.changes == { "name": { "new": "Salt modified Backports", - "old": "openSUSE Backports for SLE 15 SP4", + "old": "openSUSE Backports for SLE 15 SP7", } } assert state.comment == "Configured package repo 'salttest'" diff --git a/tests/pytests/functional/states/test_user.py b/tests/pytests/functional/states/test_user.py index 4060e049d0..0064f61b1e 100644 --- a/tests/pytests/functional/states/test_user.py +++ b/tests/pytests/functional/states/test_user.py @@ -138,10 +138,14 @@ 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"] == "Suse" and not ( - grains.get("transactional", False) - or grains.get("osmajorrelease", 0) >= 16 - or grains.get("osrelease_info", ()) >= (15, 6) + if ( + grains["os_family"] == "Suse" + and not grains.get("transactional", False) + and grains.get("osmajorrelease", 0) < 16 + and ( + grains.get("osrelease_info", ()) < (15, 6) + or grains.get("osfullname", "") == "SLES" + ) ): expected_group_name = "users" elif grains["os_family"] == "MacOS": @@ -392,7 +396,10 @@ def test_user_present_change_groups( if grains["os_family"] == "Suse" and ( grains.get("transactional", False) or grains.get("osmajorrelease", 0) >= 16 - or grains.get("osrelease_info", ()) >= (15, 6) + or ( + grains.get("osrelease_info", ()) >= (15, 6) + and grains.get("osfullname", "") != "SLES" + ) ): expected_groups.append(username) @@ -428,7 +435,10 @@ def test_user_present_change_optional_groups( if grains["os_family"] == "Suse" and ( grains.get("transactional", False) or grains.get("osmajorrelease", 0) >= 16 - or grains.get("osrelease_info", ()) >= (15, 6) + or ( + grains.get("osrelease_info", ()) >= (15, 6) + and grains.get("osfullname", "") != "SLES" + ) ): expected_groups.append(username) diff --git a/tests/pytests/unit/utils/test_vt.py b/tests/pytests/unit/utils/test_vt.py index c31b25e623..6444ac6ed9 100644 --- a/tests/pytests/unit/utils/test_vt.py +++ b/tests/pytests/unit/utils/test_vt.py @@ -51,6 +51,7 @@ def test_log_sanitize(test_cmd, caplog): stream_stderr=False, ) with caplog.at_level(logging.DEBUG): - ret = term.recv() + while term.has_unread_data: + term.recv() assert password not in caplog.text assert "******" in caplog.text diff --git a/tests/unit/utils/test_http.py b/tests/unit/utils/test_http.py index 31dbff2654..c3ae1c2557 100644 --- a/tests/unit/utils/test_http.py +++ b/tests/unit/utils/test_http.py @@ -223,8 +223,20 @@ class HTTPPostTestCase(TestCase): } mock_curl = MagicMock() + class MockContextManager: + def __init__(self, cls, args=None, kwargs=None, **_): + self.cls = cls + self.args = args or [] + self.kwargs = kwargs or {} + + def __enter__(self): + return self.cls(*self.args, **self.kwargs) + + def __exit__(self, *args): + pass + def mock_sync_wrapper(cls, args=None, kwargs=None, **_): - return cls(*args or [], **kwargs or {}) + return MockContextManager(cls, args, kwargs) with patch("salt.utils.http.SyncWrapper", side_effect=mock_sync_wrapper), patch( "tornado.httpclient.AsyncHTTPClient.fetch", mock_curl -- 2.55.0
