diff --git a/_lastrevision b/_lastrevision index 3ccde1b..76b8c29 100644 --- a/_lastrevision +++ b/_lastrevision @@ -1 +1 @@ -32a086961fa3b3b60287a78169b2ad66a000073a \ No newline at end of file +49e3fd4997f92fccba76eb5e4586f6eaaf7a5b8e \ No newline at end of file diff --git a/make-importing-seco.range-thread-safe-bsc-1211649.patch b/make-importing-seco.range-thread-safe-bsc-1211649.patch new file mode 100644 index 0000000..f60e60c --- /dev/null +++ b/make-importing-seco.range-thread-safe-bsc-1211649.patch @@ -0,0 +1,63 @@ +From 0913a58a36ef69d957dd9cc5c95fafe6d56448d5 Mon Sep 17 00:00:00 2001 +From: Marek Czernek +Date: Mon, 4 Mar 2024 11:27:35 +0100 +Subject: [PATCH] Make importing seco.range thread safe (bsc#1211649) + +--- + salt/roster/range.py | 5 +++++ + salt/utils/roster_matcher.py | 5 +++++ + 2 files changed, 10 insertions(+) + +diff --git a/salt/roster/range.py b/salt/roster/range.py +index 3f039dcef42..1525f70c32b 100644 +--- a/salt/roster/range.py ++++ b/salt/roster/range.py +@@ -15,16 +15,21 @@ import copy + import fnmatch + import logging + ++import salt.loader ++ + log = logging.getLogger(__name__) + + # Try to import range from https://github.com/ytoolshed/range + HAS_RANGE = False + try: ++ salt.loader.LOAD_LOCK.acquire() + import seco.range + + HAS_RANGE = True + except ImportError: + log.error("Unable to load range library") ++finally: ++ salt.loader.LOAD_LOCK.release() + # pylint: enable=import-error + + +diff --git a/salt/utils/roster_matcher.py b/salt/utils/roster_matcher.py +index db5dfda3e03..5165dc122b7 100644 +--- a/salt/utils/roster_matcher.py ++++ b/salt/utils/roster_matcher.py +@@ -8,14 +8,19 @@ import functools + import logging + import re + ++import salt.loader ++ + # Try to import range from https://github.com/ytoolshed/range + HAS_RANGE = False + try: ++ salt.loader.LOAD_LOCK.acquire() + import seco.range + + HAS_RANGE = True + except ImportError: + pass ++finally: ++ salt.loader.LOAD_LOCK.release() + # pylint: enable=import-error + + +-- +2.44.0 + diff --git a/salt.changes b/salt.changes index 8b24f82..137d886 100644 --- a/salt.changes +++ b/salt.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Mar 6 13:38:29 UTC 2024 - Marek Czernek + +- Make importing seco.range thread safe (bsc#1211649) + +- Added: + * make-importing-seco.range-thread-safe-bsc-1211649.patch + ------------------------------------------------------------------- Mon Feb 26 10:43:37 UTC 2024 - Pablo Suárez Hernández diff --git a/salt.spec b/salt.spec index 85170a5..fec378d 100644 --- a/salt.spec +++ b/salt.spec @@ -353,7 +353,8 @@ Patch99: allow-kwargs-for-fileserver-roots-update-bsc-1218482.patch Patch100: discover-both-.yml-and-.yaml-playbooks-bsc-1211888.patch # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/66130 Patch101: fix-problematic-tests-and-allow-smooth-tests-executi.patch - +# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/628 +Patch102: make-importing-seco.range-thread-safe-bsc-1211649.patch ### IMPORTANT: The line below is used as a snippet marker. Do not touch it. ### SALT PATCHES LIST END