summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/salt/files')
-rw-r--r--app-admin/salt/files/salt-2017.7.0-dont-realpath-tmpdir.patch19
-rw-r--r--app-admin/salt/files/salt-2019.2.0-skip-tests-that-oom-machine.patch20
-rw-r--r--app-admin/salt/files/salt-2019.2.8-ansible-roster-fix.patch13
-rw-r--r--app-admin/salt/files/salt-3000.1-tests.patch58
-rw-r--r--app-admin/salt/files/salt-3000.2-py38-abc.patch79
-rw-r--r--app-admin/salt/files/salt-3000.2-py38-logwarn.patch116
-rw-r--r--app-admin/salt/files/salt-3000.2-py38.patch60
-rw-r--r--app-admin/salt/files/salt-3000.2-tests.patch18
-rw-r--r--app-admin/salt/files/salt-3000.9-tests.patch12
-rw-r--r--app-admin/salt/files/salt-3001.1-tests.patch151
-rw-r--r--app-admin/salt/files/salt-3001.6-tests.patch18
-rw-r--r--app-admin/salt/files/salt-3002-dont-realpath-on-tmpdir.patch38
-rw-r--r--app-admin/salt/files/salt-3002.5-tests.patch30
-rw-r--r--app-admin/salt/files/salt-3002.7-tests.patch12
-rw-r--r--app-admin/salt/files/salt-3002.8-relax-pyzmq-dep.patch11
-rw-r--r--app-admin/salt/files/salt-3002.8-tests.patch33
-rw-r--r--app-admin/salt/files/salt-3003-skip-tests-that-oom-machine.patch20
-rw-r--r--app-admin/salt/files/salt-3003-tests.patch139
-rw-r--r--app-admin/salt/files/salt-3003.3-jinja.patch155
-rw-r--r--app-admin/salt/files/salt-3003.3-tests.patch233
-rw-r--r--app-admin/salt/files/salt-3003.4-relax-pyzmq-dep.patch12
-rw-r--r--app-admin/salt/files/salt-3003.4-tests.patch52
-rw-r--r--app-admin/salt/files/salt-3004.1-jinja-3.patch40
-rw-r--r--app-admin/salt/files/salt-3004.1-py310.patch53
-rw-r--r--app-admin/salt/files/salt-3004.1-relax-pyzmq-dep.patch12
-rw-r--r--app-admin/salt/files/salt-3004.1-tests.patch311
-rw-r--r--app-admin/salt/files/salt-3005-tests.patch94
-rw-r--r--app-admin/salt/files/salt-3005.1-importlib-metadata-5-r1.patch29
-rw-r--r--app-admin/salt/files/salt-3005.1-modules-file-python-3.11-host.patch123
-rw-r--r--app-admin/salt/files/salt-3005.1-no-entry-points.patch13
-rw-r--r--app-admin/salt/files/salt-3005.1-tests.patch40
-rw-r--r--app-admin/salt/files/salt-3006.2-tests.patch114
32 files changed, 413 insertions, 1715 deletions
diff --git a/app-admin/salt/files/salt-2017.7.0-dont-realpath-tmpdir.patch b/app-admin/salt/files/salt-2017.7.0-dont-realpath-tmpdir.patch
deleted file mode 100644
index 90a48a662998..000000000000
--- a/app-admin/salt/files/salt-2017.7.0-dont-realpath-tmpdir.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff --git a/tests/support/paths.py b/tests/support/paths.py
-index da93c8e1e3..895c636fef 100644
---- a/tests/support/paths.py
-+++ b/tests/support/paths.py
-@@ -40,12 +40,12 @@ if CODE_DIR not in sys.path:
- if TESTS_DIR not in sys.path:
- sys.path.insert(1, TESTS_DIR)
-
--SYS_TMP_DIR = os.path.abspath(os.path.realpath(
-+SYS_TMP_DIR = os.path.abspath(
- # Avoid ${TMPDIR} and gettempdir() on MacOS as they yield a base path too long
- # for unix sockets: ``error: AF_UNIX path too long``
- # Gentoo Portage prefers ebuild tests are rooted in ${TMPDIR}
- os.environ.get('TMPDIR', tempfile.gettempdir()) if not sys.platform.startswith('darwin') else '/tmp'
--))
-+)
- TMP = os.path.join(SYS_TMP_DIR, 'salt-tests-tmpdir')
- FILES = os.path.join(INTEGRATION_TEST_DIR, 'files')
- PYEXEC = 'python{0}.{1}'.format(*sys.version_info)
diff --git a/app-admin/salt/files/salt-2019.2.0-skip-tests-that-oom-machine.patch b/app-admin/salt/files/salt-2019.2.0-skip-tests-that-oom-machine.patch
deleted file mode 100644
index d0172d739554..000000000000
--- a/app-admin/salt/files/salt-2019.2.0-skip-tests-that-oom-machine.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/tests/unit/modules/test_boto_apigateway.py b/tests/unit/modules/test_boto_apigateway.py
-index be26b3f093..ca971556d5 100644
---- a/tests/unit/modules/test_boto_apigateway.py
-+++ b/tests/unit/modules/test_boto_apigateway.py
-@@ -169,6 +169,7 @@ def _has_required_botocore():
- return True
-
-
-+@skipIf(True, "Causes machines to OOM")
- class BotoApiGatewayTestCaseBase(TestCase, LoaderModuleMockMixin):
- conn = None
-
-@@ -207,6 +208,7 @@ class BotoApiGatewayTestCaseBase(TestCase, LoaderModuleMockMixin):
- self.addCleanup(delattr, self, 'conn')
-
-
-+@skipIf(True, "Causes machines to OOM")
- class BotoApiGatewayTestCaseMixin(object):
- def _diff_list_dicts(self, listdict1, listdict2, sortkey):
- '''
diff --git a/app-admin/salt/files/salt-2019.2.8-ansible-roster-fix.patch b/app-admin/salt/files/salt-2019.2.8-ansible-roster-fix.patch
deleted file mode 100644
index 597c97e87774..000000000000
--- a/app-admin/salt/files/salt-2019.2.8-ansible-roster-fix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/salt/roster/ansible.py b/salt/roster/ansible.py
-index f4a2a23e0b..e6b9e80247 100644
---- a/salt/roster/ansible.py
-+++ b/salt/roster/ansible.py
-@@ -129,7 +129,7 @@ def targets(tgt, tgt_type='glob', **kwargs):
-
- def _get_hosts_from_group(group):
- inventory = __context__['inventory']
-- hosts = [host for host in inventory[group].get('hosts', [])]
-+ hosts = [host for host in inventory.setdefault(group, {}).get('hosts', [])]
- for child in inventory[group].get('children', []):
- hosts.extend(_get_hosts_from_group(child))
- return hosts
diff --git a/app-admin/salt/files/salt-3000.1-tests.patch b/app-admin/salt/files/salt-3000.1-tests.patch
deleted file mode 100644
index 12a2e7822b94..000000000000
--- a/app-admin/salt/files/salt-3000.1-tests.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-diff --git a/tests/unit/fileserver/test_roots.py b/tests/unit/fileserver/test_roots.py
-index e0d939a086..33a9b6dc35 100644
---- a/tests/unit/fileserver/test_roots.py
-+++ b/tests/unit/fileserver/test_roots.py
-@@ -11,7 +11,7 @@ import tempfile
-
- # Import Salt Testing libs
- from tests.support.mixins import AdaptedConfigurationTestCaseMixin, LoaderModuleMockMixin
--from tests.support.unit import TestCase
-+from tests.support.unit import TestCase, skipIf
- from tests.support.mock import patch
- from tests.support.runtests import RUNTIME_VARS
-
-@@ -165,6 +165,7 @@ class RootsTest(TestCase, AdaptedConfigurationTestCaseMixin, LoaderModuleMockMix
- self.assertIn('empty_dir', ret)
- self.assertIn(UNICODE_DIRNAME, ret)
-
-+ @skipIf(True, "doesn't like sandbox")
- def test_symlink_list(self):
- orig_file_roots = self.opts['file_roots']
- try:
-diff --git a/tests/unit/modules/test_dockermod.py b/tests/unit/modules/test_dockermod.py
-index 191bfc123f..1956127f0b 100644
---- a/tests/unit/modules/test_dockermod.py
-+++ b/tests/unit/modules/test_dockermod.py
-@@ -793,6 +793,7 @@ class DockerTestCase(TestCase, LoaderModuleMockMixin):
- },
- ret)
-
-+ @skipIf(True, "Doesn't work with sandbox")
- def test_call_success(self):
- '''
- test module calling inside containers
-diff --git a/tests/unit/states/test_pip_state.py b/tests/unit/states/test_pip_state.py
-index 13c158b309..27e10e6161 100644
---- a/tests/unit/states/test_pip_state.py
-+++ b/tests/unit/states/test_pip_state.py
-@@ -384,6 +384,7 @@ class PipStateUtilsTest(TestCase):
-
-
- @skipIf(salt.utils.path.which_bin(KNOWN_BINARY_NAMES) is None, 'virtualenv not installed')
-+@skipIf(True, "Needs network access")
- class PipStateInstallationErrorTest(TestCase):
-
- def test_importable_installation_error(self):
-diff --git a/tests/unit/utils/test_jinja.py b/tests/unit/utils/test_jinja.py
-index f48fa9d42c..bb57929cfa 100644
---- a/tests/unit/utils/test_jinja.py
-+++ b/tests/unit/utils/test_jinja.py
-@@ -1268,7 +1268,7 @@ class TestCustomExtensions(TestCase):
- dict(opts=self.local_opts, saltenv='test', salt=self.local_salt))
- self.assertEqual(rendered, '16777216')
-
-- @flaky
-+ @skipIf("True", "Needs network access")
- def test_http_query(self):
- '''
- Test the `http_query` Jinja filter.
diff --git a/app-admin/salt/files/salt-3000.2-py38-abc.patch b/app-admin/salt/files/salt-3000.2-py38-abc.patch
deleted file mode 100644
index e9f64b664178..000000000000
--- a/app-admin/salt/files/salt-3000.2-py38-abc.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 11c23a526ae926ca082ee7ad92246e085c51b8e6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?S=C3=A9bastien=20Blaisot?= <sebastien@blaisot.org>
-Date: Fri, 17 Jan 2020 17:06:42 +0100
-Subject: [PATCH] Import abstract base classes from collection.abc in python
- 3.3+
-
----
- salt/modules/file.py | 6 +++++-
- salt/modules/win_file.py | 5 ++++-
- salt/states/file.py | 6 +++++-
- salt/utils/dictdiffer.py | 5 ++++-
- 4 files changed, 18 insertions(+), 4 deletions(-)
-
-diff --git a/salt/modules/file.py b/salt/modules/file.py
-index 771b204d63fe..d1ec5e4c295d 100644
---- a/salt/modules/file.py
-+++ b/salt/modules/file.py
-@@ -29,7 +29,11 @@
- import glob
- import hashlib
- import mmap
--from collections import Iterable, Mapping, namedtuple
-+try:
-+ from collections.abc import Iterable, Mapping
-+except ImportError:
-+ from collections import Iterable, Mapping
-+from collections import namedtuple
- from functools import reduce # pylint: disable=redefined-builtin
-
- # pylint: disable=import-error,no-name-in-module,redefined-builtin
-diff --git a/salt/modules/win_file.py b/salt/modules/win_file.py
-index 4fd3eebcdd81..5bc983786a98 100644
---- a/salt/modules/win_file.py
-+++ b/salt/modules/win_file.py
-@@ -17,7 +17,10 @@
- import logging
- # pylint: disable=W0611
- import operator # do not remove
--from collections import Iterable, Mapping # do not remove
-+try:
-+ from collections.abc import Iterable, Mapping # do not remove
-+except ImportError:
-+ from collections import Iterable, Mapping # do not remove
- from functools import reduce # do not remove
- import datetime # do not remove.
- import tempfile # do not remove. Used in salt.modules.file.__clean_tmp
-diff --git a/salt/states/file.py b/salt/states/file.py
-index 23c3d3c53955..36231c69cff6 100644
---- a/salt/states/file.py
-+++ b/salt/states/file.py
-@@ -291,7 +291,11 @@ def run():
- import sys
- import time
- import traceback
--from collections import Iterable, Mapping, defaultdict
-+try:
-+ from collections.abc import Iterable, Mapping
-+except ImportError:
-+ from collections import Iterable, Mapping
-+from collections import defaultdict
- from datetime import datetime, date # python3 problem in the making?
-
- # Import salt libs
-diff --git a/salt/utils/dictdiffer.py b/salt/utils/dictdiffer.py
-index 30e87e885436..da6bd5ed944c 100644
---- a/salt/utils/dictdiffer.py
-+++ b/salt/utils/dictdiffer.py
-@@ -13,7 +13,10 @@
- '''
- from __future__ import absolute_import, print_function, unicode_literals
- import copy
--from collections import Mapping
-+try:
-+ from collections.abc import Mapping
-+except ImportError:
-+ from collections import Mapping
- from salt.ext import six
-
-
diff --git a/app-admin/salt/files/salt-3000.2-py38-logwarn.patch b/app-admin/salt/files/salt-3000.2-py38-logwarn.patch
deleted file mode 100644
index e77d2376ce1b..000000000000
--- a/app-admin/salt/files/salt-3000.2-py38-logwarn.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-diff --git a/salt/cloud/clouds/ec2.py b/salt/cloud/clouds/ec2.py
-index 68f752cb2d..fa2b96499d 100644
---- a/salt/cloud/clouds/ec2.py
-+++ b/salt/cloud/clouds/ec2.py
-@@ -4901,7 +4901,7 @@ def get_password_data(
-
- if not HAS_M2 and not HAS_PYCRYPTO:
- if 'key' in kwargs or 'key_file' in kwargs:
-- log.warn("No crypto library is installed, can not decrypt password")
-+ log.warning("No crypto library is installed, can not decrypt password")
- return ret
-
- if 'key' not in kwargs:
-diff --git a/salt/modules/gpg.py b/salt/modules/gpg.py
-index 9dd1007c1b..47c82a7141 100644
---- a/salt/modules/gpg.py
-+++ b/salt/modules/gpg.py
-@@ -1083,7 +1083,7 @@ def verify(text=None,
-
- if trustmodel and trustmodel not in trustmodels:
- msg = 'Invalid trustmodel defined: {}. Use one of: {}'.format(trustmodel, ', '.join(trustmodels))
-- log.warn(msg)
-+ log.warning(msg)
- return {'res': False, 'message': msg}
-
- extra_args = []
-diff --git a/salt/modules/network.py b/salt/modules/network.py
-index 38e2bc326e..f3a8a714cd 100644
---- a/salt/modules/network.py
-+++ b/salt/modules/network.py
-@@ -958,7 +958,7 @@ def traceroute(host):
-
- ret.append(result)
- if not result:
-- log.warn('Cannot parse traceroute output line: %s', line)
-+ log.warning('Cannot parse traceroute output line: %s', line)
- return ret
-
-
-diff --git a/salt/modules/saltutil.py b/salt/modules/saltutil.py
-index 138a0fcf51..5f026b0f36 100644
---- a/salt/modules/saltutil.py
-+++ b/salt/modules/saltutil.py
-@@ -1096,7 +1096,7 @@ def refresh_pillar(wait=False, timeout=30):
- tag='/salt/minion/minion_pillar_refresh_complete',
- wait=timeout)
- if not event_ret or event_ret['complete'] is False:
-- log.warn("Pillar refresh did not complete within timeout %s", timeout)
-+ log.warning("Pillar refresh did not complete within timeout %s", timeout)
- return ret
-
-
-diff --git a/salt/transport/tcp.py b/salt/transport/tcp.py
-index 12ef24e86f..e83d1c927f 100644
---- a/salt/transport/tcp.py
-+++ b/salt/transport/tcp.py
-@@ -1073,7 +1073,7 @@ class SaltMessageClient(object):
- self._connecting_future.set_result(True)
- break
- except Exception as exc: # pylint: disable=broad-except
-- log.warn('TCP Message Client encountered an exception %r', exc)
-+ log.warning('TCP Message Client encountered an exception %r', exc)
- yield salt.ext.tornado.gen.sleep(1) # TODO: backoff
- #self._connecting_future.set_exception(e)
-
-diff --git a/salt/utils/process.py b/salt/utils/process.py
-index 9626ac0cb2..18697ccf7c 100644
---- a/salt/utils/process.py
-+++ b/salt/utils/process.py
-@@ -124,7 +124,7 @@ def dup2(file1, file2):
- try:
- fno1 = file1.fileno()
- except io.UnsupportedOperation:
-- log.warn('Unsupported operation on file: %r', file1)
-+ log.warning('Unsupported operation on file: %r', file1)
- return
- if isinstance(file2, int):
- fno2 = file2
-@@ -132,7 +132,7 @@ def dup2(file1, file2):
- try:
- fno2 = file2.fileno()
- except io.UnsupportedOperation:
-- log.warn('Unsupported operation on file: %r', file2)
-+ log.warning('Unsupported operation on file: %r', file2)
- return
- os.dup2(fno1, fno2)
-
-@@ -829,13 +829,13 @@ class SignalHandlingProcess(Process):
- if child.is_running():
- child.terminate()
- except psutil.NoSuchProcess:
-- log.warn(
-+ log.warning(
- 'Unable to kill child of process %d, it does '
- 'not exist. My pid is %d',
- self.pid, os.getpid()
- )
- except psutil.NoSuchProcess:
-- log.warn(
-+ log.warning(
- 'Unable to kill children of process %d, it does not exist.'
- 'My pid is %d',
- self.pid, os.getpid()
-diff --git a/tests/integration/modules/test_state.py b/tests/integration/modules/test_state.py
-index 81b3b677b9..2f3bcaa613 100644
---- a/tests/integration/modules/test_state.py
-+++ b/tests/integration/modules/test_state.py
-@@ -2282,7 +2282,7 @@ class StateModuleTest(ModuleCase, SaltReturnAssertsMixin):
- try:
- os.remove(path)
- except OSError:
-- log.warn("Path not found: %s", path)
-+ log.warning("Path not found: %s", path)
-
- with salt.utils.files.fopen(module_path, 'w') as fp:
- fp.write('raise ImportError("No module named pip")')
diff --git a/app-admin/salt/files/salt-3000.2-py38.patch b/app-admin/salt/files/salt-3000.2-py38.patch
deleted file mode 100644
index 1c543a085b10..000000000000
--- a/app-admin/salt/files/salt-3000.2-py38.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 5259ba8ef6e5949815641edc563deab67ba68582 Mon Sep 17 00:00:00 2001
-From: Mathias Fussenegger <f.mathias@zignar.net>
-Date: Fri, 22 Nov 2019 17:05:27 +0100
-Subject: [PATCH] Remove _supported_dists import for python-3.8 support
-
-`_supported_dists` has been removed from platform in Python 3.8:
-
- https://github.com/python/cpython/commit/8b94b41ab7b12f745dea744e8940631318816935#diff-47c8e5750258a08a6dd9de3e9c3774acL267-L271
-
-This instead inlines all the values that have been there.
-
-Without this change running `salt-ssh` with Python 3.8 run into an
-import error.
----
- salt/grains/core.py | 31 +++++++++++++++++++++++++++----
- 1 file changed, 27 insertions(+), 4 deletions(-)
-
-diff --git a/salt/grains/core.py b/salt/grains/core.py
-index 04c1ae91b5f5..77694abe84f9 100644
---- a/salt/grains/core.py
-+++ b/salt/grains/core.py
-@@ -35,11 +35,34 @@
- __proxyenabled__ = ['*']
- __FQDN__ = None
-
--# Extend the default list of supported distros. This will be used for the
-+# Default list of supported distros. This will be used for the
- # /etc/DISTRO-release checking that is part of linux_distribution()
--from platform import _supported_dists
--_supported_dists += ('arch', 'mageia', 'meego', 'vmware', 'bluewhite64',
-- 'slamd64', 'ovs', 'system', 'mint', 'oracle', 'void')
-+_supported_dists = (
-+ 'SuSE',
-+ 'UnitedLinux',
-+ 'arch',
-+ 'bluewhite64',
-+ 'centos',
-+ 'debian',
-+ 'fedora',
-+ 'gentoo',
-+ 'mageia',
-+ 'mandrake',
-+ 'mandriva',
-+ 'meego',
-+ 'mint',
-+ 'oracle',
-+ 'ovs',
-+ 'redhat',
-+ 'rocks',
-+ 'slackware',
-+ 'slamd64',
-+ 'system',
-+ 'turbolinux',
-+ 'vmware',
-+ 'void',
-+ 'yellowdog',
-+)
-
- # linux_distribution deprecated in py3.7
- try:
diff --git a/app-admin/salt/files/salt-3000.2-tests.patch b/app-admin/salt/files/salt-3000.2-tests.patch
deleted file mode 100644
index a562dee5bf94..000000000000
--- a/app-admin/salt/files/salt-3000.2-tests.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- salt-3000.2.orig/tests/unit/utils/test_verify.py 2020-04-29 16:57:02.775635698 -0700
-+++ salt-3000.2/tests/unit/utils/test_verify.py 2020-04-29 16:57:58.042282147 -0700
-@@ -324,6 +324,7 @@
- self.assertTrue(os.path.exists(path))
-
-
-+@skipIf(True, "breaks under sandbox")
- class TestCleanPath(TestCase):
- '''
- salt.utils.clean_path works as expected
-@@ -366,6 +367,7 @@
- raise ctypes.WinError()
-
-
-+@skipIf(True, "breaks under sandbox")
- @skipIf(six.PY2 and salt.utils.platform.is_windows(), 'Skipped on windows py2')
- class TestCleanPathLink(TestCase):
- '''
diff --git a/app-admin/salt/files/salt-3000.9-tests.patch b/app-admin/salt/files/salt-3000.9-tests.patch
deleted file mode 100644
index 9b7a1786e72a..000000000000
--- a/app-admin/salt/files/salt-3000.9-tests.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/tests/unit/modules/test_cmdmod.py b/tests/unit/modules/test_cmdmod.py
-index 2d88706b49..ec8b623f5b 100644
---- a/tests/unit/modules/test_cmdmod.py
-+++ b/tests/unit/modules/test_cmdmod.py
-@@ -509,6 +509,7 @@ class CMDMODTestCase(TestCase, LoaderModuleMockMixin):
- self.assertEqual(ret['stdout'],
- salt.utils.stringutils.to_unicode(stdout))
-
-+ @skipIf(True, "Not happy in sandbox")
- def test_run_all_output_loglevel_debug(self):
- '''
- Test that specifying debug for loglevel
diff --git a/app-admin/salt/files/salt-3001.1-tests.patch b/app-admin/salt/files/salt-3001.1-tests.patch
deleted file mode 100644
index ad32b611dfe2..000000000000
--- a/app-admin/salt/files/salt-3001.1-tests.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-diff --git a/tests/integration/master/test_event_return.py b/tests/integration/master/test_event_return.py
-index 1a97be0e5f..93c57f08ff 100644
---- a/tests/integration/master/test_event_return.py
-+++ b/tests/integration/master/test_event_return.py
-@@ -18,7 +18,7 @@ import time
- import salt.ext.six as six
- from salt.utils.nb_popen import NonBlockingPopen
- from saltfactories.utils.ports import get_unused_localhost_port
--from saltfactories.utils.processes.helpers import terminate_process
-+from saltfactories.utils.processes import terminate_process
- from tests.support.cli_scripts import ScriptPathMixin
- from tests.support.mixins import AdaptedConfigurationTestCaseMixin
- from tests.support.runtests import RUNTIME_VARS
-diff --git a/tests/integration/utils/testprogram.py b/tests/integration/utils/testprogram.py
-index 74bbc1cd90..be651591d1 100644
---- a/tests/integration/utils/testprogram.py
-+++ b/tests/integration/utils/testprogram.py
-@@ -30,7 +30,7 @@ import salt.utils.psutil_compat as psutils
- import salt.utils.yaml
- from salt.ext import six
- from salt.ext.six.moves import range
--from saltfactories.utils.processes.helpers import (
-+from saltfactories.utils.processes import (
- terminate_process,
- terminate_process_list,
- )
-diff --git a/tests/support/case.py b/tests/support/case.py
-index 9017027ae3..517cefb64a 100644
---- a/tests/support/case.py
-+++ b/tests/support/case.py
-@@ -25,7 +25,7 @@ import time
- from datetime import datetime, timedelta
-
- import salt.utils.files
--from saltfactories.utils.processes.helpers import terminate_process
-+from saltfactories.utils.processes import terminate_process
- from tests.support.cli_scripts import ScriptPathMixin
- from tests.support.helpers import RedirectStdStreams, requires_sshd_server
- from tests.support.mixins import ( # pylint: disable=unused-import
-diff --git a/tests/support/helpers.py b/tests/support/helpers.py
-index bae2dceff4..93fbb66742 100644
---- a/tests/support/helpers.py
-+++ b/tests/support/helpers.py
-@@ -42,7 +42,7 @@ import salt.utils.versions
- from salt.ext import six
- from salt.ext.six.moves import builtins, range
- from saltfactories.utils.ports import get_unused_localhost_port
--from saltfactories.utils.processes.bases import ProcessResult
-+from saltfactories.utils.processes import ProcessResult
- from tests.support.mock import patch
- from tests.support.runtests import RUNTIME_VARS
- from tests.support.sminion import create_sminion
-@@ -1674,7 +1674,7 @@ class VirtualEnv(object):
- kwargs.setdefault("stderr", subprocess.PIPE)
- kwargs.setdefault("universal_newlines", True)
- proc = subprocess.run(args, check=False, **kwargs)
-- ret = ProcessResult(proc.returncode, proc.stdout, proc.stderr, proc.args)
-+ ret = ProcessResult(proc.returncode, proc.stdout, proc.stderr, cmdline=proc.args)
- log.debug(ret)
- if check is True:
- proc.check_returncode()
-diff --git a/tests/support/paths.py b/tests/support/paths.py
-index 1e1e081dc4..981aa54eb7 100644
---- a/tests/support/paths.py
-+++ b/tests/support/paths.py
-@@ -49,14 +49,12 @@ if TESTS_DIR not in sys.path:
- sys.path.insert(1, TESTS_DIR)
-
- SYS_TMP_DIR = os.path.abspath(
-- os.path.realpath(
-- # Avoid ${TMPDIR} and gettempdir() on MacOS as they yield a base path too long
-- # for unix sockets: ``error: AF_UNIX path too long``
-- # Gentoo Portage prefers ebuild tests are rooted in ${TMPDIR}
-- os.environ.get("TMPDIR", tempfile.gettempdir())
-- if not sys.platform.startswith("darwin")
-- else "/tmp"
-- )
-+ # Avoid ${TMPDIR} and gettempdir() on MacOS as they yield a base path too long
-+ # for unix sockets: ``error: AF_UNIX path too long``
-+ # Gentoo Portage prefers ebuild tests are rooted in ${TMPDIR}
-+ os.environ.get("TMPDIR", tempfile.gettempdir())
-+ if not sys.platform.startswith("darwin")
-+ else "/tmp"
- )
- TMP = os.path.join(SYS_TMP_DIR, "salt-tests-tmpdir")
- TMP_ROOT_DIR = os.path.join(TMP, "rootdir")
-diff --git a/tests/support/processes.py b/tests/support/processes.py
-index 4f264862a4..7c93e48368 100644
---- a/tests/support/processes.py
-+++ b/tests/support/processes.py
-@@ -14,7 +14,7 @@ from __future__ import absolute_import
-
- import logging
-
--from saltfactories.utils.processes.helpers import ( # pylint: disable=unused-import
-+from saltfactories.utils.processes import ( # pylint: disable=unused-import
- collect_child_processes,
- terminate_process,
- terminate_process_list,
-diff --git a/tests/unit/utils/scheduler/base.py b/tests/unit/utils/scheduler/base.py
-index 5d7f161eb5..286e047e40 100644
---- a/tests/unit/utils/scheduler/base.py
-+++ b/tests/unit/utils/scheduler/base.py
-@@ -14,7 +14,7 @@ import salt.utils.platform
- import salt.utils.schedule
- from salt.modules.test import ping
- from salt.utils.process import SubprocessList
--from saltfactories.utils.processes.helpers import terminate_process
-+from saltfactories.utils.processes import terminate_process
- from tests.support.mixins import SaltReturnAssertsMixin
- from tests.support.mock import MagicMock, patch
- from tests.support.runtests import RUNTIME_VARS
-diff --git a/tests/unit/utils/test_event.py b/tests/unit/utils/test_event.py
-index 9a3b1c428d..dfcf1c5275 100644
---- a/tests/unit/utils/test_event.py
-+++ b/tests/unit/utils/test_event.py
-@@ -21,7 +21,7 @@ import zmq
- import zmq.eventloop.ioloop
- from salt.ext.six.moves import range
- from salt.ext.tornado.testing import AsyncTestCase
--from saltfactories.utils.processes.helpers import terminate_process
-+from saltfactories.utils.processes import terminate_process
- from tests.support.events import eventpublisher_process, eventsender_process
- from tests.support.helpers import slowTest
- from tests.support.runtests import RUNTIME_VARS
-diff --git a/tests/unit/utils/test_verify.py b/tests/unit/utils/test_verify.py
-index 5662cf621b..0339c353dc 100644
---- a/tests/unit/utils/test_verify.py
-+++ b/tests/unit/utils/test_verify.py
-@@ -343,7 +343,7 @@ class TestCleanPath(TestCase):
- def test_clean_path_valid(self):
- path_a = os.path.join(self.tmpdir, "foo")
- path_b = os.path.join(self.tmpdir, "foo", "bar")
-- assert clean_path(path_a, path_b) == path_b
-+ assert clean_path(path_a, path_b) == os.path.realpath(path_b)
-
- def test_clean_path_invalid(self):
- path_a = os.path.join(self.tmpdir, "foo")
-@@ -398,10 +398,10 @@ class TestCleanPathLink(TestCase):
- test_path = os.path.join(self.from_path, "test")
- expect_path = os.path.join(self.to_path, "test")
- ret = clean_path(self.from_path, test_path)
-- assert ret == expect_path, "{} is not {}".format(ret, expect_path)
-+ assert ret == os.path.realpath(expect_path), "{} is not {}".format(ret, expect_path)
-
- def test_clean_path_symlinked_tgt(self):
- test_path = os.path.join(self.to_path, "test")
- expect_path = os.path.join(self.to_path, "test")
- ret = clean_path(self.from_path, test_path)
-- assert ret == expect_path, "{} is not {}".format(ret, expect_path)
-+ assert ret == os.path.realpath(expect_path), "{} is not {}".format(ret, expect_path)
diff --git a/app-admin/salt/files/salt-3001.6-tests.patch b/app-admin/salt/files/salt-3001.6-tests.patch
deleted file mode 100644
index d32977e4694b..000000000000
--- a/app-admin/salt/files/salt-3001.6-tests.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- salt-3001.6-python3_7/tests/unit/modules/test_cmdmod.py 2021-02-26 16:13:26.386553301 -0800
-+++ salt-3001.6/tests/unit/modules/test_cmdmod.py 2021-02-26 16:14:25.858150910 -0800
-@@ -437,6 +437,7 @@
- else:
- raise RuntimeError
-
-+ @skipIf(True, "does not work with sandbox")
- @skipIf(salt.utils.platform.is_windows(), "Do not run on Windows")
- @skipIf(salt.utils.platform.is_darwin(), "Do not run on MacOS")
- def test_run_cwd_in_combination_with_runas(self):
-@@ -560,6 +561,7 @@
-
- self.assertEqual(ret["stdout"], salt.utils.stringutils.to_unicode(stdout))
-
-+ @skipIf(True, "does not work with sandbox")
- def test_run_all_output_loglevel_debug(self):
- """
- Test that specifying debug for loglevel
diff --git a/app-admin/salt/files/salt-3002-dont-realpath-on-tmpdir.patch b/app-admin/salt/files/salt-3002-dont-realpath-on-tmpdir.patch
deleted file mode 100644
index 5ef68dcd1803..000000000000
--- a/app-admin/salt/files/salt-3002-dont-realpath-on-tmpdir.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/tests/integration/files/file/base/_modules/runtests_helpers.py b/tests/integration/files/file/base/_modules/runtests_helpers.py
-index 3ee0e2da5f..5b462f0a9e 100644
---- a/tests/integration/files/file/base/_modules/runtests_helpers.py
-+++ b/tests/integration/files/file/base/_modules/runtests_helpers.py
-@@ -18,7 +18,7 @@ try:
- from tests.support.runtests import RUNTIME_VARS
- except ImportError:
- # Salt SSH Tests
-- SYS_TMP_DIR = os.path.realpath(
-+ SYS_TMP_DIR = os.path.abspath(
- # Avoid ${TMPDIR} and gettempdir() on MacOS as they yield a base path too long
- # for unix sockets: ``error: AF_UNIX path too long``
- # Gentoo Portage prefers ebuild tests are rooted in ${TMPDIR}
-diff --git a/tests/support/paths.py b/tests/support/paths.py
-index 5f28904858..26245fadf9 100644
---- a/tests/support/paths.py
-+++ b/tests/support/paths.py
-@@ -48,14 +48,12 @@ if TESTS_DIR not in sys.path:
- sys.path.insert(1, TESTS_DIR)
-
- SYS_TMP_DIR = os.path.abspath(
-- os.path.realpath(
-- # Avoid ${TMPDIR} and gettempdir() on MacOS as they yield a base path too long
-- # for unix sockets: ``error: AF_UNIX path too long``
-- # Gentoo Portage prefers ebuild tests are rooted in ${TMPDIR}
-- os.environ.get("TMPDIR", tempfile.gettempdir())
-- if not sys.platform.startswith("darwin")
-- else "/tmp"
-- )
-+ # Avoid ${TMPDIR} and gettempdir() on MacOS as they yield a base path too long
-+ # for unix sockets: ``error: AF_UNIX path too long``
-+ # Gentoo Portage prefers ebuild tests are rooted in ${TMPDIR}
-+ os.environ.get("TMPDIR", tempfile.gettempdir())
-+ if not sys.platform.startswith("darwin")
-+ else "/tmp"
- )
- TMP = os.path.join(SYS_TMP_DIR, "salt-tests-tmpdir")
- TMP_ROOT_DIR = os.path.join(TMP, "rootdir")
diff --git a/app-admin/salt/files/salt-3002.5-tests.patch b/app-admin/salt/files/salt-3002.5-tests.patch
deleted file mode 100644
index 5a2eb43c3a42..000000000000
--- a/app-admin/salt/files/salt-3002.5-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- salt-3002.5/tests/unit/modules/test_cmdmod.py 2021-02-26 11:01:33.407219444 -0800
-+++ salt-3002.5-python3_7/tests/unit/modules/test_cmdmod.py 2021-02-26 11:01:47.709124416 -0800
-@@ -560,6 +560,7 @@
-
- self.assertEqual(ret["stdout"], salt.utils.stringutils.to_unicode(stdout))
-
-+ @skipIf(True, "doesn't work in sandbox")
- def test_run_all_output_loglevel_debug(self):
- """
- Test that specifying debug for loglevel
---- salt-3002.5//tests/unit/utils/test_thin.py 2021-02-26 13:30:47.841179546 -0800
-+++ salt-3002.5-python3_7//tests/unit/utils/test_thin.py 2021-02-26 13:41:33.681174531 -0800
-@@ -1275,6 +1275,7 @@
- @skipIf(
- salt.utils.platform.is_windows(), "salt-ssh does not deploy to/from windows"
- )
-+ @skipIf(True, "does not work with network-sandbox")
- def test_thin_dir(self):
- """
- Test the thin dir to make sure salt-call can run
---- salt-3002.5/tests/unit/modules/test_cmdmod.py 2021-02-26 13:30:48.014178373 -0800
-+++ salt-3002.5-python3_7/tests/unit/modules/test_cmdmod.py 2021-02-26 13:43:22.395441008 -0800
-@@ -439,6 +439,7 @@
-
- @skipIf(salt.utils.platform.is_windows(), "Do not run on Windows")
- @skipIf(salt.utils.platform.is_darwin(), "Do not run on MacOS")
-+ @skipIf(True, "does not work with network-sandbox")
- def test_run_cwd_in_combination_with_runas(self):
- """
- cmd.run executes command in the cwd directory
diff --git a/app-admin/salt/files/salt-3002.7-tests.patch b/app-admin/salt/files/salt-3002.7-tests.patch
deleted file mode 100644
index 828b7eee76eb..000000000000
--- a/app-admin/salt/files/salt-3002.7-tests.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/tests/unit/modules/test_boto_route53.py b/tests/unit/modules/test_boto_route53.py
-index e745f8f8c6..a2bb2a7ef2 100644
---- a/tests/unit/modules/test_boto_route53.py
-+++ b/tests/unit/modules/test_boto_route53.py
-@@ -80,6 +80,7 @@ def _has_required_moto():
- return True
-
-
-+@skipIf(True, "skipping broken test")
- @skipIf(HAS_MOTO is False, "The moto module must be installed.")
- @skipIf(
- _has_required_moto() is False,
diff --git a/app-admin/salt/files/salt-3002.8-relax-pyzmq-dep.patch b/app-admin/salt/files/salt-3002.8-relax-pyzmq-dep.patch
deleted file mode 100644
index e42a22b4e8b7..000000000000
--- a/app-admin/salt/files/salt-3002.8-relax-pyzmq-dep.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff --git a/requirements/zeromq.txt b/requirements/zeromq.txt
-index 77c9bd8be1..ffa1589043 100644
---- a/requirements/zeromq.txt
-+++ b/requirements/zeromq.txt
-@@ -1,5 +1,4 @@
- -r base.txt
- -r crypto.txt
-
--pyzmq>=17.0.0 ; python_version < "3.9"
--pyzmq>=19.0.2 ; python_version >= "3.9"
-+pyzmq
diff --git a/app-admin/salt/files/salt-3002.8-tests.patch b/app-admin/salt/files/salt-3002.8-tests.patch
deleted file mode 100644
index c94a0c106347..000000000000
--- a/app-admin/salt/files/salt-3002.8-tests.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff --git a/salt/transport/mixins/auth.py b/salt/transport/mixins/auth.py
-index de86773750..3ca09260a0 100644
---- a/salt/transport/mixins/auth.py
-+++ b/salt/transport/mixins/auth.py
-@@ -54,7 +54,7 @@ class AESPubClientMixin:
- @salt.ext.tornado.gen.coroutine
- def _decode_payload(self, payload):
- # we need to decrypt it
-- log.trace("Decoding payload: %s", payload)
-+ log.debug("Decoding payload: %s", payload)
- if payload["enc"] == "aes":
- self._verify_master_signature(payload)
- try:
-diff --git a/tests/unit/utils/test_schema.py b/tests/unit/utils/test_schema.py
-index 97bce1f10b..2ff5904b87 100644
---- a/tests/unit/utils/test_schema.py
-+++ b/tests/unit/utils/test_schema.py
-@@ -835,6 +835,7 @@ class ConfigTestCase(TestCase):
- )
-
- @skipIf(HAS_JSONSCHEMA is False, "The 'jsonschema' library is missing")
-+ @skipIf(True, "Broken with newer versions of jsonschema")
- def test_hostname_config_validation(self):
- class TestConf(schema.Schema):
- item = schema.HostnameItem(title="Item", description="Item description")
-@@ -2060,6 +2061,7 @@ class ConfigTestCase(TestCase):
- item = schema.NotItem(item=schema.BooleanItem())
- self.assertEqual(item.serialize(), {"not": item.item.serialize()})
-
-+ @skipIf(True, "Broken with newer versions of jsonschema")
- @skipIf(HAS_JSONSCHEMA is False, "The 'jsonschema' library is missing")
- def test_not_config_validation(self):
- class TestConf(schema.Schema):
diff --git a/app-admin/salt/files/salt-3003-skip-tests-that-oom-machine.patch b/app-admin/salt/files/salt-3003-skip-tests-that-oom-machine.patch
deleted file mode 100644
index 804b6a8704f0..000000000000
--- a/app-admin/salt/files/salt-3003-skip-tests-that-oom-machine.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/tests/unit/modules/test_boto_apigateway.py b/tests/unit/modules/test_boto_apigateway.py
-index 6ee6aeb002..db9aeaee95 100644
---- a/tests/unit/modules/test_boto_apigateway.py
-+++ b/tests/unit/modules/test_boto_apigateway.py
-@@ -154,6 +154,7 @@ def _has_required_botocore():
- return True
-
-
-+@skipIf(True, "Causes machines to OOM")
- class BotoApiGatewayTestCaseBase(TestCase, LoaderModuleMockMixin):
- conn = None
-
-@@ -190,6 +191,7 @@ class BotoApiGatewayTestCaseBase(TestCase, LoaderModuleMockMixin):
- self.addCleanup(delattr, self, "utils")
-
-
-+@skipIf(True, "Causes machines to OOM")
- class BotoApiGatewayTestCaseMixin:
- def _diff_list_dicts(self, listdict1, listdict2, sortkey):
- """
diff --git a/app-admin/salt/files/salt-3003-tests.patch b/app-admin/salt/files/salt-3003-tests.patch
deleted file mode 100644
index c3562c5a4448..000000000000
--- a/app-admin/salt/files/salt-3003-tests.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-diff --git a/tests/integration/grains/test_core.py b/tests/integration/grains/test_core.py
-index 5f1cf11e24..8affb398ff 100644
---- a/tests/integration/grains/test_core.py
-+++ b/tests/integration/grains/test_core.py
-@@ -21,6 +21,7 @@ def _freebsd_or_openbsd():
- return salt.utils.platform.is_freebsd() or salt.utils.platform.is_openbsd()
-
-
-+@pytest.mark.skip("Tests only should run on FreeBSD and OpenBSD")
- @pytest.mark.windows_whitelisted
- class TestGrainsCore(ModuleCase):
- """
-diff --git a/tests/integration/states/test_x509.py b/tests/integration/states/test_x509.py
-index 2321689ef5..574de51e56 100644
---- a/tests/integration/states/test_x509.py
-+++ b/tests/integration/states/test_x509.py
-@@ -468,7 +468,7 @@ c9bcgp7D7xD+TxWWNj4CSXEccJgGr91StV+gFg4ARQ==
- first_run[key]["changes"]["Certificate"]["New"]["Not After"],
- "%Y-%m-%d %H:%M:%S",
- )
-- self.assertEqual(29, (expiry - datetime.datetime.now()).days)
-+ self.assertEqual(30, (expiry - datetime.datetime.now()).days)
- self.assertTrue(os.path.exists(crtfile), "Certificate was not created.")
-
- with salt.utils.files.fopen(crtfile, "r") as first_cert:
-@@ -485,14 +485,14 @@ c9bcgp7D7xD+TxWWNj4CSXEccJgGr91StV+gFg4ARQ==
- },
- )
- self.assertEqual(
-- "Certificate needs renewal: 29 days remaining but it needs to be at least 90",
-+ "Certificate needs renewal: 30 days remaining but it needs to be at least 90",
- second_run[key]["changes"]["Status"]["Old"],
- )
- expiry = datetime.datetime.strptime(
- second_run[key]["changes"]["Certificate"]["New"]["Not After"],
- "%Y-%m-%d %H:%M:%S",
- )
-- self.assertEqual(179, (expiry - datetime.datetime.now()).days)
-+ self.assertEqual(180, (expiry - datetime.datetime.now()).days)
- with salt.utils.files.fopen(crtfile, "r") as second_cert:
- self.assertNotEqual(
- cert_contents,
-diff --git a/tests/pytests/unit/modules/test_cmdmod.py b/tests/pytests/unit/modules/test_cmdmod.py
-index 5424514160..0564b59593 100644
---- a/tests/pytests/unit/modules/test_cmdmod.py
-+++ b/tests/pytests/unit/modules/test_cmdmod.py
-@@ -438,6 +438,7 @@ def test_run_cwd_doesnt_exist_issue_7154():
-
- @pytest.mark.skip_on_darwin
- @pytest.mark.skip_on_windows
-+@pytest.mark.skip("does not work in sandbox environment")
- def test_run_cwd_in_combination_with_runas():
- """
- cmd.run executes command in the cwd directory
-diff --git a/tests/unit/ext/test_ipaddress.py b/tests/unit/ext/test_ipaddress.py
-index 4fd87d1c3f..02585a9e4e 100644
---- a/tests/unit/ext/test_ipaddress.py
-+++ b/tests/unit/ext/test_ipaddress.py
-@@ -2682,6 +2682,7 @@ class IpaddrUnitTest(TestCase):
- "2001:658:22a:cafe:200::1/::ffff:ffff:ffff:ffff",
- )
-
-+ @pytest.mark.skip("_cache no longer present in python3.8+")
- def testNetworkElementCaching(self):
- # V4 - make sure we're empty
- self.assertNotIn("broadcast_address", self.ipv4_network._cache)
-diff --git a/tests/unit/utils/test_parsers.py b/tests/unit/utils/test_parsers.py
-index 907c67f477..2429d27641 100644
---- a/tests/unit/utils/test_parsers.py
-+++ b/tests/unit/utils/test_parsers.py
-@@ -5,6 +5,7 @@
- import os
- import shutil
- import tempfile
-+import pytest
-
- import salt.config
- import salt.log.setup as log
-@@ -983,6 +984,7 @@ class SaltRunOptionParserTestCase(ParserBase, TestCase):
- if os.path.exists(self.log_file):
- os.unlink(self.log_file)
-
-+ @pytest.mark.skip("Tries to write to /var")
- def test_jid_option(self):
- jid = salt.utils.jid.gen_jid({})
- args = ["--jid", jid]
-@@ -991,6 +993,7 @@ class SaltRunOptionParserTestCase(ParserBase, TestCase):
- parser.parse_args(args)
- assert parser.options.jid == jid
-
-+ @pytest.mark.skip("Tries to write to /var")
- def test_jid_option_invalid(self):
- jid = salt.utils.jid.gen_jid({}) + "A"
- args = ["--jid", jid]
-@@ -1041,6 +1044,7 @@ class SaltSSHOptionParserTestCase(ParserBase, TestCase):
- if os.path.exists(self.ssh_log_file):
- os.unlink(self.ssh_log_file)
-
-+ @pytest.mark.skip("Tries to write to /var")
- def test_jid_option(self):
- jid = salt.utils.jid.gen_jid({})
- args = ["--jid", jid] + self.args
-@@ -1049,6 +1053,7 @@ class SaltSSHOptionParserTestCase(ParserBase, TestCase):
- parser.parse_args(args)
- assert parser.options.jid == jid
-
-+ @pytest.mark.skip("Tries to write to /var")
- def test_jid_option_invalid(self):
- jid = salt.utils.jid.gen_jid({}) + "A"
- args = ["--jid", jid] + self.args
-diff --git a/tests/unit/utils/test_vt.py b/tests/unit/utils/test_vt.py
-index 87fc6a342c..12d4c6a073 100644
---- a/tests/unit/utils/test_vt.py
-+++ b/tests/unit/utils/test_vt.py
-@@ -20,6 +20,8 @@ import subprocess
- import sys
- import time
-
-+import pytest
-+
- # Import Salt libs
- import salt.utils
- import salt.utils.files
-@@ -274,6 +276,7 @@ class VTTestCase(TestCase):
- salt.utils.platform.is_windows(), "Skip VT tests on windows, due to issue 54290"
- )
- @fixStdOutErrFileNoIfNeeded
-+ @pytest.mark.skip("Does not work in sandbox environment")
- def test_split_multibyte_characters_unicode(self):
- """
- Tests that the vt correctly handles multibyte characters that are
-@@ -341,6 +344,7 @@ class VTTestCase(TestCase):
- salt.utils.platform.is_windows(), "Skip VT tests on windows, due to issue 54290"
- )
- @fixStdOutErrFileNoIfNeeded
-+ @pytest.mark.skip("Does not work in sandbox environment")
- def test_split_multibyte_characters_shiftjis(self):
- """
- Tests that the vt correctly handles multibyte characters that are
diff --git a/app-admin/salt/files/salt-3003.3-jinja.patch b/app-admin/salt/files/salt-3003.3-jinja.patch
deleted file mode 100644
index ec5b1ac6156f..000000000000
--- a/app-admin/salt/files/salt-3003.3-jinja.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-https://github.com/saltstack/salt/issues/61848
-https://patch-diff.githubusercontent.com/raw/saltstack/salt/pull/61856.patch
-
-Dropped a bunch of irrelevant hunks (CI files and a test not in 3003.3)
-
-From 03c2a607a0722ad5e55b6c8f8eda630be7c7fee5 Mon Sep 17 00:00:00 2001
-From: jonyhy96 <hy352144278@gmail.com>
-Date: Thu, 10 Mar 2022 10:41:48 +0800
-Subject: [PATCH 1/5] fix: jinja2 contextfuntion base on version
-
----
- salt/utils/jinja.py | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/salt/utils/jinja.py b/salt/utils/jinja.py
-index 4c430b5ccf32..9a1938c2d69b 100644
---- a/salt/utils/jinja.py
-+++ b/salt/utils/jinja.py
-@@ -707,7 +707,11 @@ def method_call(obj, f_name, *f_args, **f_kwargs):
- return getattr(obj, f_name, lambda *args, **kwargs: None)(*f_args, **f_kwargs)
-
-
--@jinja2.contextfunction
-+if jinja2.__version__ < '3.0.0' :
-+ contextfunction = jinja2.contextfunction
-+else:
-+ contextfunction = jinja2.pass_context
-+@contextfunction
- def show_full_context(ctx):
- return salt.utils.data.simple_types_filter(
- {key: value for key, value in ctx.items()}
-
-From 1aba938021b86732a211a899dc4c2a46afa488a2 Mon Sep 17 00:00:00 2001
-From: jonyhy96 <hy352144278@gmail.com>
-Date: Thu, 3 Mar 2022 16:21:17 +0800
-Subject: [PATCH 2/5] fix: jinja2 DeprecationWarning
-
----
- salt/utils/jinja.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/salt/utils/jinja.py b/salt/utils/jinja.py
-index 9a1938c2d69b..207a2cb77035 100644
---- a/salt/utils/jinja.py
-+++ b/salt/utils/jinja.py
-@@ -710,7 +710,7 @@ def method_call(obj, f_name, *f_args, **f_kwargs):
- if jinja2.__version__ < '3.0.0' :
- contextfunction = jinja2.contextfunction
- else:
-- contextfunction = jinja2.pass_context
-+ contextfunction = jinja2.pass_context
- @contextfunction
- def show_full_context(ctx):
- return salt.utils.data.simple_types_filter(
-
-From 7f281bbfc8efda40cfe7d607c0ddebb2fb00bd5d Mon Sep 17 00:00:00 2001
-From: Megan Wilhite <mwilhite@vmware.com>
-Date: Fri, 25 Mar 2022 08:31:24 -0600
-Subject: [PATCH 3/5] Use the correct Markup from jinja for each version
-
----
- salt/utils/jinja.py | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/salt/utils/jinja.py b/salt/utils/jinja.py
-index 207a2cb77035..558f063d7206 100644
---- a/salt/utils/jinja.py
-+++ b/salt/utils/jinja.py
-@@ -26,7 +26,7 @@
- import salt.utils.stringutils
- import salt.utils.url
- import salt.utils.yaml
--from jinja2 import BaseLoader, Markup, TemplateNotFound, nodes
-+from jinja2 import BaseLoader, TemplateNotFound, nodes
- from jinja2.environment import TemplateModule
- from jinja2.exceptions import TemplateRuntimeError
- from jinja2.ext import Extension
-@@ -35,6 +35,12 @@
- from salt.utils.odict import OrderedDict
- from salt.utils.versions import LooseVersion
-
-+try:
-+ from jinja2 import Markup
-+except ImportError:
-+ # Markup moved to markupsafe in jinja>= 3.1
-+ from markupsafe import Markup
-+
- log = logging.getLogger(__name__)
-
- __all__ = ["SaltCacheLoader", "SerializerExtension"]
-
-diff --git a/salt/utils/jinja.py b/salt/utils/jinja.py
-index 558f063d7206..5d00b134e25f 100644
---- a/salt/utils/jinja.py
-+++ b/salt/utils/jinja.py
-@@ -713,10 +713,12 @@ def method_call(obj, f_name, *f_args, **f_kwargs):
- return getattr(obj, f_name, lambda *args, **kwargs: None)(*f_args, **f_kwargs)
-
-
--if jinja2.__version__ < '3.0.0' :
-+if jinja2.__version__ < "3.0.0":
- contextfunction = jinja2.contextfunction
- else:
- contextfunction = jinja2.pass_context
-+
-+
- @contextfunction
- def show_full_context(ctx):
- return salt.utils.data.simple_types_filter(
-
-From 9056e636beaea7de2e3a61876ba0345e5d390973 Mon Sep 17 00:00:00 2001
-From: Megan Wilhite <mwilhite@vmware.com>
-Date: Fri, 25 Mar 2022 11:14:01 -0600
-Subject: [PATCH 5/5] Fix requested feedback
-
----
- requirements/static/ci/docs.in | 1 +
- requirements/static/ci/py3.10/docs.txt | 3 ++-
- requirements/static/ci/py3.6/docs.txt | 1 +
- requirements/static/ci/py3.7/docs.txt | 3 ++-
- requirements/static/ci/py3.8/docs.txt | 3 ++-
- requirements/static/ci/py3.9/docs.txt | 3 ++-
- salt/utils/jinja.py | 10 +++++-----
- 8 files changed, 21 insertions(+), 10 deletions(-)
-
-diff --git a/salt/utils/jinja.py b/salt/utils/jinja.py
-index 5d00b134e25f..aa8ebe90546c 100644
---- a/salt/utils/jinja.py
-+++ b/salt/utils/jinja.py
-@@ -36,10 +36,10 @@
- from salt.utils.versions import LooseVersion
-
- try:
-- from jinja2 import Markup
--except ImportError:
-- # Markup moved to markupsafe in jinja>= 3.1
- from markupsafe import Markup
-+except ImportError:
-+ # jinja < 3.1
-+ from jinja2 import Markup
-
- log = logging.getLogger(__name__)
-
-@@ -713,9 +713,9 @@ def method_call(obj, f_name, *f_args, **f_kwargs):
- return getattr(obj, f_name, lambda *args, **kwargs: None)(*f_args, **f_kwargs)
-
-
--if jinja2.__version__ < "3.0.0":
-+try:
- contextfunction = jinja2.contextfunction
--else:
-+except AttributeError:
- contextfunction = jinja2.pass_context
-
-
diff --git a/app-admin/salt/files/salt-3003.3-tests.patch b/app-admin/salt/files/salt-3003.3-tests.patch
deleted file mode 100644
index 049d8c164c55..000000000000
--- a/app-admin/salt/files/salt-3003.3-tests.patch
+++ /dev/null
@@ -1,233 +0,0 @@
-diff --git a/salt/transport/ipc.py b/salt/transport/ipc.py
-index 29210d7522..4fd648116f 100644
---- a/salt/transport/ipc.py
-+++ b/salt/transport/ipc.py
-@@ -2,7 +2,6 @@
- IPC transport classes
- """
-
--
- import errno
- import logging
- import socket
-@@ -20,6 +19,7 @@ from salt.ext.tornado.ioloop import IOLoop
- from salt.ext.tornado.ioloop import TimeoutError as TornadoTimeoutError
- from salt.ext.tornado.iostream import IOStream, StreamClosedError
- from salt.ext.tornado.locks import Lock
-+import tornado.iostream
-
- log = logging.getLogger(__name__)
-
-@@ -693,11 +693,11 @@ class IPCMessageSubscriber(IPCClient):
- if not first_sync_msg:
- # We read at least one piece of data and we're on sync run
- break
-- except TornadoTimeoutError:
-+ except TornadoTimeoutError if isinstance(TornadoTimeoutError, BaseException) else (salt.ext.tornado.ioloop.TimeoutError):
- # In the timeout case, just return None.
- # Keep 'self._read_stream_future' alive.
- ret = None
-- except StreamClosedError as exc:
-+ except StreamClosedError if isinstance(StreamClosedError, BaseException) else (tornado.iostream.StreamClosedError) as exc:
- log.trace("Subscriber disconnected from IPC %s", self.socket_path)
- self._read_stream_future = None
- except Exception as exc: # pylint: disable=broad-except
-diff --git a/tests/integration/grains/test_core.py b/tests/integration/grains/test_core.py
-index 5f1cf11e24..8affb398ff 100644
---- a/tests/integration/grains/test_core.py
-+++ b/tests/integration/grains/test_core.py
-@@ -21,6 +21,7 @@ def _freebsd_or_openbsd():
- return salt.utils.platform.is_freebsd() or salt.utils.platform.is_openbsd()
-
-
-+@pytest.mark.skip("Tests only should run on FreeBSD and OpenBSD")
- @pytest.mark.windows_whitelisted
- class TestGrainsCore(ModuleCase):
- """
-diff --git a/tests/integration/states/test_x509.py b/tests/integration/states/test_x509.py
-index 2321689ef5..574de51e56 100644
---- a/tests/integration/states/test_x509.py
-+++ b/tests/integration/states/test_x509.py
-@@ -468,7 +468,7 @@ c9bcgp7D7xD+TxWWNj4CSXEccJgGr91StV+gFg4ARQ==
- first_run[key]["changes"]["Certificate"]["New"]["Not After"],
- "%Y-%m-%d %H:%M:%S",
- )
-- self.assertEqual(29, (expiry - datetime.datetime.now()).days)
-+ self.assertEqual(30, (expiry - datetime.datetime.now()).days)
- self.assertTrue(os.path.exists(crtfile), "Certificate was not created.")
-
- with salt.utils.files.fopen(crtfile, "r") as first_cert:
-@@ -485,14 +485,14 @@ c9bcgp7D7xD+TxWWNj4CSXEccJgGr91StV+gFg4ARQ==
- },
- )
- self.assertEqual(
-- "Certificate needs renewal: 29 days remaining but it needs to be at least 90",
-+ "Certificate needs renewal: 30 days remaining but it needs to be at least 90",
- second_run[key]["changes"]["Status"]["Old"],
- )
- expiry = datetime.datetime.strptime(
- second_run[key]["changes"]["Certificate"]["New"]["Not After"],
- "%Y-%m-%d %H:%M:%S",
- )
-- self.assertEqual(179, (expiry - datetime.datetime.now()).days)
-+ self.assertEqual(180, (expiry - datetime.datetime.now()).days)
- with salt.utils.files.fopen(crtfile, "r") as second_cert:
- self.assertNotEqual(
- cert_contents,
-diff --git a/tests/pytests/functional/modules/state/requisites/test_listen.py b/tests/pytests/functional/modules/state/requisites/test_listen.py
-index b7a90d0ca0..26030f403b 100644
---- a/tests/pytests/functional/modules/state/requisites/test_listen.py
-+++ b/tests/pytests/functional/modules/state/requisites/test_listen.py
-@@ -292,43 +292,3 @@ def test_listen_requisite_resolution_names(state, state_tree):
- assert "test_|-listener_service_|-nginx_|-mod_watch" in ret
- assert "test_|-listener_service_|-crond_|-mod_watch" in ret
-
--
--def test_onlyif_req(state, subtests):
-- onlyif = [{}]
-- state_id = "test_|-onlyif test_|-onlyif test_|-succeed_with_changes"
-- with subtests.test(onlyif=onlyif):
-- ret = state.single(
-- name="onlyif test", fun="test.succeed_with_changes", onlyif=onlyif
-- )
-- assert ret[state_id]["result"] is True
-- assert ret[state_id]["comment"] == "Success!"
--
-- onlyif = [{"fun": "test.true"}]
-- state_id = "test_|-onlyif test_|-onlyif test_|-succeed_without_changes"
-- with subtests.test(onlyif=onlyif):
-- ret = state.single(
-- name="onlyif test", fun="test.succeed_without_changes", onlyif=onlyif
-- )
-- assert ret[state_id]["result"] is True
-- assert not ret[state_id]["changes"]
-- assert ret[state_id]["comment"] == "Success!"
--
-- onlyif = [{"fun": "test.false"}]
-- state_id = "test_|-onlyif test_|-onlyif test_|-fail_with_changes"
-- with subtests.test(onlyif=onlyif):
-- ret = state.single(
-- name="onlyif test", fun="test.fail_with_changes", onlyif=onlyif
-- )
-- assert ret[state_id]["result"] is True
-- assert not ret[state_id]["changes"]
-- assert ret[state_id]["comment"] == "onlyif condition is false"
--
-- onlyif = [{"fun": "test.true"}]
-- state_id = "test_|-onlyif test_|-onlyif test_|-fail_with_changes"
-- with subtests.test(onlyif=onlyif):
-- ret = state.single(
-- name="onlyif test", fun="test.fail_with_changes", onlyif=onlyif
-- )
-- assert ret[state_id]["result"] is False
-- assert ret[state_id]["changes"]
-- assert ret[state_id]["comment"] == "Failure!"
-diff --git a/tests/pytests/unit/modules/test_cmdmod.py b/tests/pytests/unit/modules/test_cmdmod.py
-index 5424514160..0564b59593 100644
---- a/tests/pytests/unit/modules/test_cmdmod.py
-+++ b/tests/pytests/unit/modules/test_cmdmod.py
-@@ -438,6 +438,7 @@ def test_run_cwd_doesnt_exist_issue_7154():
-
- @pytest.mark.skip_on_darwin
- @pytest.mark.skip_on_windows
-+@pytest.mark.skip("does not work in sandbox environment")
- def test_run_cwd_in_combination_with_runas():
- """
- cmd.run executes command in the cwd directory
-diff --git a/tests/unit/ext/test_ipaddress.py b/tests/unit/ext/test_ipaddress.py
-index 3b91757a03..5fa0f88e78 100644
---- a/tests/unit/ext/test_ipaddress.py
-+++ b/tests/unit/ext/test_ipaddress.py
-@@ -2707,6 +2707,7 @@ class IpaddrUnitTest(TestCase):
- "2001:658:22a:cafe:200::1/::ffff:ffff:ffff:ffff",
- )
-
-+ @pytest.mark.skip("_cache no longer present in python3.8+")
- def testNetworkElementCaching(self):
- # V4 - make sure we're empty
- self.assertNotIn("broadcast_address", self.ipv4_network._cache)
-diff --git a/tests/unit/modules/test_boto_route53.py b/tests/unit/modules/test_boto_route53.py
-index e745f8f8c6..ab36a90a79 100644
---- a/tests/unit/modules/test_boto_route53.py
-+++ b/tests/unit/modules/test_boto_route53.py
-@@ -80,6 +80,7 @@ def _has_required_moto():
- return True
-
-
-+@skipIf(True, "test case appears to be broken")
- @skipIf(HAS_MOTO is False, "The moto module must be installed.")
- @skipIf(
- _has_required_moto() is False,
-diff --git a/tests/unit/utils/test_parsers.py b/tests/unit/utils/test_parsers.py
-index 907c67f477..2429d27641 100644
---- a/tests/unit/utils/test_parsers.py
-+++ b/tests/unit/utils/test_parsers.py
-@@ -5,6 +5,7 @@
- import os
- import shutil
- import tempfile
-+import pytest
-
- import salt.config
- import salt.log.setup as log
-@@ -983,6 +984,7 @@ class SaltRunOptionParserTestCase(ParserBase, TestCase):
- if os.path.exists(self.log_file):
- os.unlink(self.log_file)
-
-+ @pytest.mark.skip("Tries to write to /var")
- def test_jid_option(self):
- jid = salt.utils.jid.gen_jid({})
- args = ["--jid", jid]
-@@ -991,6 +993,7 @@ class SaltRunOptionParserTestCase(ParserBase, TestCase):
- parser.parse_args(args)
- assert parser.options.jid == jid
-
-+ @pytest.mark.skip("Tries to write to /var")
- def test_jid_option_invalid(self):
- jid = salt.utils.jid.gen_jid({}) + "A"
- args = ["--jid", jid]
-@@ -1041,6 +1044,7 @@ class SaltSSHOptionParserTestCase(ParserBase, TestCase):
- if os.path.exists(self.ssh_log_file):
- os.unlink(self.ssh_log_file)
-
-+ @pytest.mark.skip("Tries to write to /var")
- def test_jid_option(self):
- jid = salt.utils.jid.gen_jid({})
- args = ["--jid", jid] + self.args
-@@ -1049,6 +1053,7 @@ class SaltSSHOptionParserTestCase(ParserBase, TestCase):
- parser.parse_args(args)
- assert parser.options.jid == jid
-
-+ @pytest.mark.skip("Tries to write to /var")
- def test_jid_option_invalid(self):
- jid = salt.utils.jid.gen_jid({}) + "A"
- args = ["--jid", jid] + self.args
-diff --git a/tests/unit/utils/test_vt.py b/tests/unit/utils/test_vt.py
-index bf7a323e26..3c8ce3a128 100644
---- a/tests/unit/utils/test_vt.py
-+++ b/tests/unit/utils/test_vt.py
-@@ -17,6 +17,8 @@ import subprocess
- import sys
- import time
-
-+import pytest
-+
- import salt.utils
- import salt.utils.files
- import salt.utils.platform
-@@ -275,6 +277,7 @@ class VTTestCase(TestCase):
- salt.utils.platform.is_windows(), "Skip VT tests on windows, due to issue 54290"
- )
- @fixStdOutErrFileNoIfNeeded
-+ @pytest.mark.skip("Does not work in sandbox environment")
- def test_split_multibyte_characters_unicode(self):
- """
- Tests that the vt correctly handles multibyte characters that are
-@@ -342,6 +345,7 @@ class VTTestCase(TestCase):
- salt.utils.platform.is_windows(), "Skip VT tests on windows, due to issue 54290"
- )
- @fixStdOutErrFileNoIfNeeded
-+ @pytest.mark.skip("Does not work in sandbox environment")
- def test_split_multibyte_characters_shiftjis(self):
- """
- Tests that the vt correctly handles multibyte characters that are
diff --git a/app-admin/salt/files/salt-3003.4-relax-pyzmq-dep.patch b/app-admin/salt/files/salt-3003.4-relax-pyzmq-dep.patch
deleted file mode 100644
index 7585af58ab11..000000000000
--- a/app-admin/salt/files/salt-3003.4-relax-pyzmq-dep.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/requirements/zeromq.txt b/requirements/zeromq.txt
-index 35d9014713..ffa1589043 100644
---- a/requirements/zeromq.txt
-+++ b/requirements/zeromq.txt
-@@ -1,6 +1,4 @@
- -r base.txt
- -r crypto.txt
-
--pyzmq<=20.0.0 ; python_version < "3.6"
--pyzmq>=17.0.0 ; python_version < "3.9"
--pyzmq>=19.0.2 ; python_version >= "3.9"
-+pyzmq
diff --git a/app-admin/salt/files/salt-3003.4-tests.patch b/app-admin/salt/files/salt-3003.4-tests.patch
deleted file mode 100644
index 93fd4214021b..000000000000
--- a/app-admin/salt/files/salt-3003.4-tests.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff --git a/tests/conftest.py b/tests/conftest.py
-index 0fc1844bc8..32346da1f6 100644
---- a/tests/conftest.py
-+++ b/tests/conftest.py
-@@ -34,7 +34,6 @@ import salt.utils.files
- import salt.utils.path
- import salt.utils.platform
- import salt.utils.win_functions
--import saltfactories.utils.compat
- from salt.serializers import yaml
- from salt.utils.immutabletypes import freeze
- from tests.support.helpers import (
-@@ -465,9 +464,7 @@ def pytest_runtest_setup(item):
- item._skipped_by_mark = True
- pytest.skip(PRE_PYTEST_SKIP_REASON)
-
-- if saltfactories.utils.compat.has_unittest_attr(
-- item, "__slow_test__"
-- ) or item.get_closest_marker("slow_test"):
-+ if item.get_closest_marker("slow_test"):
- if item.config.getoption("--run-slow") is False:
- item._skipped_by_mark = True
- pytest.skip("Slow tests are disabled!")
-diff --git a/tests/unit/utils/test_schema.py b/tests/unit/utils/test_schema.py
-index ef7acdb7a3..22953556cb 100644
---- a/tests/unit/utils/test_schema.py
-+++ b/tests/unit/utils/test_schema.py
-@@ -1,6 +1,8 @@
- # pylint: disable=function-redefined
- import copy
-
-+import pytest
-+
- import salt.utils.json
- import salt.utils.schema as schema
- import salt.utils.stringutils
-@@ -822,6 +824,7 @@ class ConfigTestCase(TestCase):
- },
- )
-
-+ @pytest.mark.skip("broken with newer versions of jsonschema")
- @skipIf(HAS_JSONSCHEMA is False, "The 'jsonschema' library is missing")
- def test_hostname_config_validation(self):
- class TestConf(schema.Schema):
-@@ -2048,6 +2051,7 @@ class ConfigTestCase(TestCase):
- item = schema.NotItem(item=schema.BooleanItem())
- self.assertEqual(item.serialize(), {"not": item.item.serialize()})
-
-+ @pytest.mark.skip("broken with newer versions of jsonschema")
- @skipIf(HAS_JSONSCHEMA is False, "The 'jsonschema' library is missing")
- def test_not_config_validation(self):
- class TestConf(schema.Schema):
diff --git a/app-admin/salt/files/salt-3004.1-jinja-3.patch b/app-admin/salt/files/salt-3004.1-jinja-3.patch
deleted file mode 100644
index 98f21bc35129..000000000000
--- a/app-admin/salt/files/salt-3004.1-jinja-3.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/salt/utils/jinja.py b/salt/utils/jinja.py
-index 0cb70bf64a..322c2f7f46 100644
---- a/salt/utils/jinja.py
-+++ b/salt/utils/jinja.py
-@@ -25,10 +25,11 @@ import salt.utils.json
- import salt.utils.stringutils
- import salt.utils.url
- import salt.utils.yaml
--from jinja2 import BaseLoader, Markup, TemplateNotFound, nodes
-+from jinja2 import BaseLoader, TemplateNotFound, nodes
- from jinja2.environment import TemplateModule
- from jinja2.exceptions import TemplateRuntimeError
- from jinja2.ext import Extension
-+from markupsafe import Markup
- from salt.exceptions import TemplateError
- from salt.utils.decorators.jinja import jinja_filter, jinja_global, jinja_test
- from salt.utils.odict import OrderedDict
-@@ -706,7 +707,7 @@ def method_call(obj, f_name, *f_args, **f_kwargs):
- return getattr(obj, f_name, lambda *args, **kwargs: None)(*f_args, **f_kwargs)
-
-
--@jinja2.contextfunction
-+@jinja2.pass_context
- def show_full_context(ctx):
- return salt.utils.data.simple_types_filter(
- {key: value for key, value in ctx.items()}
-diff --git a/tests/unit/utils/test_jinja.py b/tests/unit/utils/test_jinja.py
-index 6502831aff..dec847364a 100644
---- a/tests/unit/utils/test_jinja.py
-+++ b/tests/unit/utils/test_jinja.py
-@@ -22,7 +22,8 @@ import salt.utils.files
- import salt.utils.json
- import salt.utils.stringutils
- import salt.utils.yaml
--from jinja2 import DictLoader, Environment, Markup, exceptions
-+from jinja2 import DictLoader, Environment, exceptions
-+from markupsafe import Markup
- from salt.exceptions import SaltRenderError
- from salt.utils.decorators.jinja import JinjaFilter
- from salt.utils.jinja import (
diff --git a/app-admin/salt/files/salt-3004.1-py310.patch b/app-admin/salt/files/salt-3004.1-py310.patch
deleted file mode 100644
index 7e30d7687a66..000000000000
--- a/app-admin/salt/files/salt-3004.1-py310.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From a58bbbe058df8f45872c43a95992f6a7a7914ab9 Mon Sep 17 00:00:00 2001
-From: piterpunk <piterpunk@slackware.com>
-Date: Fri, 15 Oct 2021 11:03:20 -0300
-Subject: [PATCH] Fix _compat.py importlib logic for Python 3.10
-
-Use the same logic in _compat.py and entrypoints.py to load
-the same importlib.metadata. Python's built in implementation for
-Python >= 3.10 and the Salt one for others.
----
- salt/_compat.py | 30 +++++++++++++++++-------------
- 1 file changed, 17 insertions(+), 13 deletions(-)
-
-diff --git a/salt/_compat.py b/salt/_compat.py
-index 8149657bea61..a402f17a3c71 100644
---- a/salt/_compat.py
-+++ b/salt/_compat.py
-@@ -11,19 +11,23 @@
- else:
- import salt.ext.ipaddress as ipaddress
-
-+if sys.version_info >= (3, 10):
-+ # Python 3.10 will include a fix in importlib.metadata which allows us to
-+ # get the distribution of a loaded entry-point
-+ import importlib.metadata # pylint: disable=no-member,no-name-in-module
-+else:
-+ # importlib_metadata before version 3.3.0 does not include the functionality we need.
-+ try:
-+ import importlib_metadata
-
--# importlib_metadata before version 3.3.0 does not include the functionality we need.
--try:
-- import importlib_metadata
--
-- importlib_metadata_version = [
-- int(part)
-- for part in importlib_metadata.version("importlib_metadata").split(".")
-- if part.isdigit()
-- ]
-- if tuple(importlib_metadata_version) < (3, 3, 0):
-+ importlib_metadata_version = [
-+ int(part)
-+ for part in importlib_metadata.version("importlib_metadata").split(".")
-+ if part.isdigit()
-+ ]
-+ if tuple(importlib_metadata_version) < (3, 3, 0):
-+ # Use the vendored importlib_metadata
-+ import salt.ext.importlib_metadata as importlib_metadata
-+ except ImportError:
- # Use the vendored importlib_metadata
- import salt.ext.importlib_metadata as importlib_metadata
--except ImportError:
-- # Use the vendored importlib_metadata
-- import salt.ext.importlib_metadata as importlib_metadata
diff --git a/app-admin/salt/files/salt-3004.1-relax-pyzmq-dep.patch b/app-admin/salt/files/salt-3004.1-relax-pyzmq-dep.patch
deleted file mode 100644
index 99d432158215..000000000000
--- a/app-admin/salt/files/salt-3004.1-relax-pyzmq-dep.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/requirements/zeromq.txt b/requirements/zeromq.txt
-index 62cb775d87..ffa1589043 100644
---- a/requirements/zeromq.txt
-+++ b/requirements/zeromq.txt
-@@ -1,6 +1,4 @@
- -r base.txt
- -r crypto.txt
-
--pyzmq<=20.0.0 ; python_version < "3.6"
--pyzmq>=17.0.0,<22.0.0 ; python_version < "3.9"
--pyzmq>19.0.2,<22.0.0 ; python_version >= "3.9"
-+pyzmq
diff --git a/app-admin/salt/files/salt-3004.1-tests.patch b/app-admin/salt/files/salt-3004.1-tests.patch
deleted file mode 100644
index 956cf1b0041c..000000000000
--- a/app-admin/salt/files/salt-3004.1-tests.patch
+++ /dev/null
@@ -1,311 +0,0 @@
-diff --git a/tests/pytests/functional/fileserver/test_roots.py b/tests/pytests/functional/fileserver/test_roots.py
-index c65efc8d52..9060fb61e2 100644
---- a/tests/pytests/functional/fileserver/test_roots.py
-+++ b/tests/pytests/functional/fileserver/test_roots.py
-@@ -15,6 +15,7 @@ def configure_loader_modules(base_env_state_tree_root_dir):
- return {roots: {"__opts__": opts}}
-
-
-+@pytest.mark.skip("needs network access")
- # nox -e pytest-zeromq-3.8(coverage=False) -- -vvv --run-slow --run-destructive tests\pytests\functional\fileserver\test_roots.py
- def test_symlink_list(base_env_state_tree_root_dir):
- with pytest.helpers.temp_file(
-diff --git a/tests/pytests/functional/pillar/test_gpg.py b/tests/pytests/functional/pillar/test_gpg.py
-index aaa4733f1d..b55cc9b4cf 100644
---- a/tests/pytests/functional/pillar/test_gpg.py
-+++ b/tests/pytests/functional/pillar/test_gpg.py
-@@ -203,7 +203,7 @@ def gpg_homedir(salt_master, pillar_state_tree):
- universal_newlines=True,
- )
- ret = ProcessResult(
-- exitcode=proc.returncode,
-+ returncode=proc.returncode,
- stdout=proc.stdout,
- stderr=proc.stderr,
- cmdline=proc.args,
-@@ -220,7 +220,7 @@ def gpg_homedir(salt_master, pillar_state_tree):
- input=TEST_KEY,
- )
- ret = ProcessResult(
-- exitcode=proc.returncode,
-+ returncode=proc.returncode,
- stdout=proc.stdout,
- stderr=proc.stderr,
- cmdline=proc.args,
-@@ -250,7 +250,7 @@ def gpg_homedir(salt_master, pillar_state_tree):
- input="KILLAGENT",
- )
- ret = ProcessResult(
-- exitcode=proc.returncode,
-+ returncode=proc.returncode,
- stdout=proc.stdout,
- stderr=proc.stderr,
- cmdline=proc.args,
-diff --git a/tests/pytests/integration/cli/test_salt_proxy.py b/tests/pytests/integration/cli/test_salt_proxy.py
-index c32c7e11e2..a9ee9fbd8d 100644
---- a/tests/pytests/integration/cli/test_salt_proxy.py
-+++ b/tests/pytests/integration/cli/test_salt_proxy.py
-@@ -40,6 +40,7 @@ def test_exit_status_no_proxyid(salt_master, proxy_minion_id):
- assert "error: salt-proxy requires --proxyid" in exc.value.stderr, exc.value
-
-
-+@pytest.mark.skip("Currently broken")
- @pytest.mark.skip_on_windows(reason="Windows does not do user checks")
- def test_exit_status_unknown_user(salt_master, proxy_minion_id):
- """
-@@ -66,7 +67,7 @@ def test_exit_status_unknown_argument(salt_master, proxy_minion_id):
- factory = salt_master.salt_proxy_minion_daemon(proxy_minion_id)
- factory.start("--unknown-argument", start_timeout=10, max_start_attempts=1)
-
-- assert exc.value.exitcode == salt.defaults.exitcodes.EX_USAGE, exc.value
-+ assert exc.value.returncode == salt.defaults.exitcodes.EX_USAGE, exc.value
- assert "Usage" in exc.value.stderr, exc.value
- assert "no such option: --unknown-argument" in exc.value.stderr, exc.value
-
-@@ -89,8 +90,8 @@ def test_exit_status_correct_usage(salt_master, proxy_minion_id, salt_cli):
- assert factory.is_running()
- # Let's issue a ping before terminating
- ret = salt_cli.run("test.ping", minion_tgt=proxy_minion_id)
-- assert ret.exitcode == 0
-+ assert ret.returncode == 0
- assert ret.json is True
- # Terminate the proxy minion
- ret = factory.terminate()
-- assert ret.exitcode == salt.defaults.exitcodes.EX_OK, ret
-+ assert ret.returncode == salt.defaults.exitcodes.EX_OK, ret
-diff --git a/tests/pytests/integration/sdb/test_vault.py b/tests/pytests/integration/sdb/test_vault.py
-index 7dc4c55417..6c48296a0c 100644
---- a/tests/pytests/integration/sdb/test_vault.py
-+++ b/tests/pytests/integration/sdb/test_vault.py
-@@ -107,7 +107,7 @@ def vault_container_version(request, salt_call_cli, vault_port):
- if proc.returncode == 0:
- break
- ret = ProcessResult(
-- exitcode=proc.returncode,
-+ returncode=proc.returncode,
- stdout=proc.stdout,
- stderr=proc.stderr,
- cmdline=proc.args,
-@@ -133,7 +133,7 @@ def vault_container_version(request, salt_call_cli, vault_port):
- )
- if proc.returncode != 0:
- ret = ProcessResult(
-- exitcode=proc.returncode,
-+ returncode=proc.returncode,
- stdout=proc.stdout,
- stderr=proc.stderr,
- cmdline=proc.args,
-@@ -150,7 +150,7 @@ def vault_container_version(request, salt_call_cli, vault_port):
- universal_newlines=True,
- )
- ret = ProcessResult(
-- exitcode=proc.returncode,
-+ returncode=proc.returncode,
- stdout=proc.stdout,
- stderr=proc.stderr,
- cmdline=proc.args,
-diff --git a/tests/pytests/unit/modules/test_cmdmod.py b/tests/pytests/unit/modules/test_cmdmod.py
-index bc1d2818aa..3bd93862b7 100644
---- a/tests/pytests/unit/modules/test_cmdmod.py
-+++ b/tests/pytests/unit/modules/test_cmdmod.py
-@@ -440,6 +440,7 @@ def test_run_cwd_doesnt_exist_issue_7154():
- cmdmod.run_all(cmd, cwd=cwd)
-
-
-+@pytest.mark.skip("needs root access")
- @pytest.mark.skip_on_darwin
- @pytest.mark.skip_on_windows
- def test_run_cwd_in_combination_with_runas():
-diff --git a/tests/pytests/unit/modules/test_portage_config.py b/tests/pytests/unit/modules/test_portage_config.py
-index 5cc6b90596..db37d2c4f1 100644
---- a/tests/pytests/unit/modules/test_portage_config.py
-+++ b/tests/pytests/unit/modules/test_portage_config.py
-@@ -29,6 +29,7 @@ def test_get_config_file_wildcards():
- assert portage_config._get_config_file("mask", atom) == expected
-
-
-+@pytest.mark.skip("test needs root access")
- def test_enforce_nice_config(tmp_path):
- atoms = [
- ("*/*::repo", "repo"),
-diff --git a/tests/pytests/unit/state/test_state_compiler.py b/tests/pytests/unit/state/test_state_compiler.py
-index fc43cf154d..7aa511c9f7 100644
---- a/tests/pytests/unit/state/test_state_compiler.py
-+++ b/tests/pytests/unit/state/test_state_compiler.py
-@@ -679,6 +679,7 @@ def test_verify_retry_parsing():
- assert set(expected_result).issubset(set(state_obj.call(low_data)))
-
-
-+@pytest.mark.skip("test requires root access")
- def test_render_requisite_require_disabled():
- """
- Test that the state compiler correctly deliver a rendering
-@@ -719,6 +720,7 @@ def test_render_requisite_require_disabled():
- assert run_num == 0
-
-
-+@pytest.mark.skip("test requires root access")
- def test_render_requisite_require_in_disabled():
- """
- Test that the state compiler correctly deliver a rendering
-diff --git a/tests/pytests/unit/state/test_state_format_slots.py b/tests/pytests/unit/state/test_state_format_slots.py
-index 57b7bb2b87..7d2abce8d0 100644
---- a/tests/pytests/unit/state/test_state_format_slots.py
-+++ b/tests/pytests/unit/state/test_state_format_slots.py
-@@ -218,6 +218,7 @@ def test_slot_append(state_obj):
- assert cdata == {"args": ["arg"], "kwargs": {"key": "value1thing~"}}
-
-
-+@pytest.mark.skip("test needs root")
- # Skip on windows like integration.modules.test_state.StateModuleTest.test_parallel_state_with_long_tag
- @skipIf(
- salt.utils.platform.is_windows(),
-diff --git a/tests/pytests/unit/test_minion.py b/tests/pytests/unit/test_minion.py
-index 985ec99276..eb8a476e30 100644
---- a/tests/pytests/unit/test_minion.py
-+++ b/tests/pytests/unit/test_minion.py
-@@ -493,6 +493,7 @@ def test_scheduler_before_connect():
- minion.destroy()
-
-
-+@pytest.mark.skip("test needs root access")
- def test_minion_module_refresh():
- """
- Tests that the 'module_refresh' just return in case there is no 'schedule'
-@@ -520,6 +521,7 @@ def test_minion_module_refresh():
- minion.destroy()
-
-
-+@pytest.mark.skip("test needs root access")
- def test_minion_module_refresh_beacons_refresh():
- """
- Tests that 'module_refresh' calls beacons_refresh and that the
-diff --git a/tests/pytests/unit/test_version.py b/tests/pytests/unit/test_version.py
-index bc6bbfeadd..2653b558b0 100644
---- a/tests/pytests/unit/test_version.py
-+++ b/tests/pytests/unit/test_version.py
-@@ -140,6 +140,7 @@ def test_sha(commit, match):
- assert ret is None
-
-
-+@pytest.mark.skip("test is broken if some optional deps aren't installed")
- def test_version_report_lines():
- """
- Validate padding in versions report is correct
-diff --git a/tests/support/helpers.py b/tests/support/helpers.py
-index d82b14cb90..751018162c 100644
---- a/tests/support/helpers.py
-+++ b/tests/support/helpers.py
-@@ -40,7 +40,7 @@ import salt.utils.platform
- import salt.utils.pycrypto
- import salt.utils.stringutils
- import salt.utils.versions
--from saltfactories.exceptions import FactoryFailure as ProcessFailed
-+from pytestshellutils.exceptions import FactoryFailure as ProcessFailed
- from saltfactories.utils.ports import get_unused_localhost_port
- from saltfactories.utils.processes import ProcessResult
- from tests.support.mock import patch
-@@ -1720,7 +1720,7 @@ class VirtualEnv:
- kwargs.setdefault("env", self.environ)
- proc = subprocess.run(args, check=False, **kwargs)
- ret = ProcessResult(
-- exitcode=proc.returncode,
-+ returncode=proc.returncode,
- stdout=proc.stdout,
- stderr=proc.stderr,
- cmdline=proc.args,
-@@ -1735,7 +1735,7 @@ class VirtualEnv:
- cmdline=proc.args,
- stdout=proc.stdout,
- stderr=proc.stderr,
-- exitcode=proc.returncode,
-+ returncode=proc.returncode,
- )
- return ret
-
-diff --git a/tests/unit/modules/test_boto_route53.py b/tests/unit/modules/test_boto_route53.py
-index 1d3d1393a9..df331761e2 100644
---- a/tests/unit/modules/test_boto_route53.py
-+++ b/tests/unit/modules/test_boto_route53.py
-@@ -4,6 +4,8 @@ from collections import namedtuple
-
- import pkg_resources # pylint: disable=3rd-party-module-not-gated
-
-+import pytest
-+
- import salt.config
- import salt.loader
- import salt.utils.versions
-@@ -99,6 +101,7 @@ class BotoRoute53TestCase(TestCase, LoaderModuleMockMixin):
- def tearDown(self):
- del self.opts
-
-+ @pytest.mark.skip("test currently broken")
- @mock_route53_deprecated
- def test_create_healthcheck(self):
- """
-diff --git a/tests/unit/utils/test_parsers.py b/tests/unit/utils/test_parsers.py
-index 907c67f477..3f68cfe8f3 100644
---- a/tests/unit/utils/test_parsers.py
-+++ b/tests/unit/utils/test_parsers.py
-@@ -6,6 +6,8 @@ import os
- import shutil
- import tempfile
-
-+import pytest
-+
- import salt.config
- import salt.log.setup as log
- import salt.syspaths
-@@ -983,6 +985,7 @@ class SaltRunOptionParserTestCase(ParserBase, TestCase):
- if os.path.exists(self.log_file):
- os.unlink(self.log_file)
-
-+ @pytest.mark.skip("needs root access")
- def test_jid_option(self):
- jid = salt.utils.jid.gen_jid({})
- args = ["--jid", jid]
-@@ -991,6 +994,7 @@ class SaltRunOptionParserTestCase(ParserBase, TestCase):
- parser.parse_args(args)
- assert parser.options.jid == jid
-
-+ @pytest.mark.skip("needs root access")
- def test_jid_option_invalid(self):
- jid = salt.utils.jid.gen_jid({}) + "A"
- args = ["--jid", jid]
-@@ -1041,6 +1045,7 @@ class SaltSSHOptionParserTestCase(ParserBase, TestCase):
- if os.path.exists(self.ssh_log_file):
- os.unlink(self.ssh_log_file)
-
-+ @pytest.mark.skip("needs root access")
- def test_jid_option(self):
- jid = salt.utils.jid.gen_jid({})
- args = ["--jid", jid] + self.args
-@@ -1049,6 +1054,7 @@ class SaltSSHOptionParserTestCase(ParserBase, TestCase):
- parser.parse_args(args)
- assert parser.options.jid == jid
-
-+ @pytest.mark.skip("needs root access")
- def test_jid_option_invalid(self):
- jid = salt.utils.jid.gen_jid({}) + "A"
- args = ["--jid", jid] + self.args
-diff --git a/tests/unit/utils/test_schema.py b/tests/unit/utils/test_schema.py
-index 8c648f5288..74b9bc6981 100644
---- a/tests/unit/utils/test_schema.py
-+++ b/tests/unit/utils/test_schema.py
-@@ -872,6 +872,7 @@ class ConfigTestCase(TestCase):
- },
- )
-
-+ @skipIf(True, "Does not work in network sandbox")
- @skipIf(HAS_JSONSCHEMA is False, "The 'jsonschema' library is missing")
- def test_hostname_config_validation(self):
- class TestConf(schema.Schema):
-@@ -2098,6 +2099,7 @@ class ConfigTestCase(TestCase):
- item = schema.NotItem(item=schema.BooleanItem())
- self.assertEqual(item.serialize(), {"not": item.item.serialize()})
-
-+ @skipIf(True, "Does not work in network sandbox")
- @skipIf(HAS_JSONSCHEMA is False, "The 'jsonschema' library is missing")
- def test_not_config_validation(self):
- class TestConf(schema.Schema):
diff --git a/app-admin/salt/files/salt-3005-tests.patch b/app-admin/salt/files/salt-3005-tests.patch
new file mode 100644
index 000000000000..f170ef7dcafd
--- /dev/null
+++ b/app-admin/salt/files/salt-3005-tests.patch
@@ -0,0 +1,94 @@
+diff --git a/tests/conftest.py b/tests/conftest.py
+index 24ecf57e04..babc7ced90 100644
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -684,8 +684,6 @@ def salt_factories_config():
+ """
+ return {
+ "code_dir": str(CODE_DIR),
+- "inject_coverage": MAYBE_RUN_COVERAGE,
+- "inject_sitecustomize": MAYBE_RUN_COVERAGE,
+ "start_timeout": 120
+ if (os.environ.get("JENKINS_URL") or os.environ.get("CI"))
+ else 60,
+diff --git a/tests/pytests/unit/_logging/handlers/test_deferred_stream_handler.py b/tests/pytests/unit/_logging/handlers/test_deferred_stream_handler.py
+index 230da8abc8..f6f1a70ce4 100644
+--- a/tests/pytests/unit/_logging/handlers/test_deferred_stream_handler.py
++++ b/tests/pytests/unit/_logging/handlers/test_deferred_stream_handler.py
+@@ -62,6 +62,7 @@ def _deferred_write_on_flush_proc_target():
+ assert stds.stderr == "Foo\nBar\n"
+
+
++@pytest.mark.skip("doesn't work with sandbox")
+ def test_sync_with_handlers():
+ proc = multiprocessing.Process(target=_sync_with_handlers_proc_target)
+ proc.start()
+@@ -69,6 +70,7 @@ def test_sync_with_handlers():
+ assert proc.exitcode == 0
+
+
++@pytest.mark.skip("doesn't work with sandbox")
+ def test_deferred_write_on_flush():
+ proc = multiprocessing.Process(target=_deferred_write_on_flush_proc_target)
+ proc.start()
+diff --git a/tests/pytests/unit/modules/test_portage_config.py b/tests/pytests/unit/modules/test_portage_config.py
+index 5cc6b90596..f344526909 100644
+--- a/tests/pytests/unit/modules/test_portage_config.py
++++ b/tests/pytests/unit/modules/test_portage_config.py
+@@ -53,7 +53,7 @@ def test_enforce_nice_config(tmp_path):
+ ("use", ["apple", "-banana", "ananas", "orange"]),
+ ]
+
+- base_path = str(tmp_path / "/package.{0}")
++ base_path = str(f"{tmp_path}/package.{{0}}")
+
+ def make_line(atom, addition):
+ return atom + (" " + addition if addition != "" else "") + "\n"
+@@ -72,14 +72,3 @@ def test_enforce_nice_config(tmp_path):
+ portage_config, "_merge_flags", lambda l1, l2, _: list(set(l1 + l2))
+ ):
+ portage_config.enforce_nice_config()
+-
+- for typ, additions in supported:
+- for atom, file_name in atoms:
+- with salt.utils.files.fopen(
+- base_path.format(typ) + "/" + file_name, "r"
+- ) as fh:
+- for line in fh:
+- for atom in line:
+- assert atom not in line
+- for addition in additions:
+- assert addition not in line
+diff --git a/tests/support/cli_scripts.py b/tests/support/cli_scripts.py
+index 270af75d4b..50c08f4ed2 100644
+--- a/tests/support/cli_scripts.py
++++ b/tests/support/cli_scripts.py
+@@ -32,8 +32,6 @@ def get_script_path(bin_dir, script_name):
+ bin_dir=bin_dir,
+ script_name=script_name,
+ code_dir=RUNTIME_VARS.CODE_DIR,
+- inject_coverage="COVERAGE_PROCESS_START" in os.environ,
+- inject_sitecustomize="COVERAGE_PROCESS_START" in os.environ,
+ )
+ log.info("Returning script path %r", script_path)
+ return script_path
+diff --git a/tests/unit/utils/test_schema.py b/tests/unit/utils/test_schema.py
+index 8c648f5288..ce5715a562 100644
+--- a/tests/unit/utils/test_schema.py
++++ b/tests/unit/utils/test_schema.py
+@@ -873,6 +873,7 @@ class ConfigTestCase(TestCase):
+ )
+
+ @skipIf(HAS_JSONSCHEMA is False, "The 'jsonschema' library is missing")
++ @skipIf(True, "Does not work with sandbox")
+ def test_hostname_config_validation(self):
+ class TestConf(schema.Schema):
+ item = schema.HostnameItem(title="Item", description="Item description")
+@@ -2099,6 +2100,7 @@ class ConfigTestCase(TestCase):
+ self.assertEqual(item.serialize(), {"not": item.item.serialize()})
+
+ @skipIf(HAS_JSONSCHEMA is False, "The 'jsonschema' library is missing")
++ @skipIf(True, "Does not work with sandbox")
+ def test_not_config_validation(self):
+ class TestConf(schema.Schema):
+ item = schema.ArrayItem(
diff --git a/app-admin/salt/files/salt-3005.1-importlib-metadata-5-r1.patch b/app-admin/salt/files/salt-3005.1-importlib-metadata-5-r1.patch
new file mode 100644
index 000000000000..c4c8056c1a6a
--- /dev/null
+++ b/app-admin/salt/files/salt-3005.1-importlib-metadata-5-r1.patch
@@ -0,0 +1,29 @@
+diff --git a/salt/utils/entrypoints.py b/salt/utils/entrypoints.py
+index 3effa0b494..9452878ade 100644
+--- a/salt/utils/entrypoints.py
++++ b/salt/utils/entrypoints.py
+@@ -38,13 +38,20 @@ def iter_entry_points(group, name=None):
+ entry_points_listing = []
+ entry_points = importlib_metadata.entry_points()
+
+- for entry_point_group, entry_points_list in entry_points.items():
+- if entry_point_group != group:
+- continue
+- for entry_point in entry_points_list:
++ try:
++ for entry_point in entry_points.select(group=group):
+ if name is not None and entry_point.name != name:
+ continue
+ entry_points_listing.append(entry_point)
++ except AttributeError:
++ # importlib-metadata<5.0.0
++ for entry_point_group, entry_points_list in entry_points.items():
++ if entry_point_group != group:
++ continue
++ for entry_point in entry_points_list:
++ if name is not None and entry_point.name != name:
++ continue
++ entry_points_listing.append(entry_point)
+
+ return entry_points_listing
+
diff --git a/app-admin/salt/files/salt-3005.1-modules-file-python-3.11-host.patch b/app-admin/salt/files/salt-3005.1-modules-file-python-3.11-host.patch
new file mode 100644
index 000000000000..2e9be8db18c0
--- /dev/null
+++ b/app-admin/salt/files/salt-3005.1-modules-file-python-3.11-host.patch
@@ -0,0 +1,123 @@
+diff --git a/salt/modules/file.py b/salt/modules/file.py
+index f39d618203..93eeaf312e 100644
+--- a/salt/modules/file.py
++++ b/salt/modules/file.py
+@@ -16,7 +16,6 @@ import hashlib
+ import itertools
+ import logging
+ import mmap
+-import operator
+ import os
+ import re
+ import shutil
+@@ -28,7 +27,6 @@ import time
+ import urllib.parse
+ from collections import namedtuple
+ from collections.abc import Iterable, Mapping
+-from functools import reduce
+
+ import salt.utils.args
+ import salt.utils.atomicfile
+@@ -1622,38 +1620,38 @@ def comment_line(path, regex, char="#", cmnt=True, backup=".bak"):
+
+ def _get_flags(flags):
+ """
+- Return an integer appropriate for use as a flag for the re module from a
+- list of human-readable strings
++ Return the names of the Regex flags that correspond to flags
+
+ .. code-block:: python
+
+- >>> _get_flags(['MULTILINE', 'IGNORECASE'])
+- 10
++ >>> _get_flags(['IGNORECASE', 'MULTILINE'])
++ re.IGNORECASE|re.MULTILINE
+ >>> _get_flags('MULTILINE')
+- 8
+- >>> _get_flags(2)
+- 2
++ re.MULTILINE
++ >>> _get_flags(8)
++ re.MULTILINE
++ >>> _get_flags(re.IGNORECASE)
++ re.IGNORECASE
+ """
+- if isinstance(flags, str):
++ if isinstance(flags, re.RegexFlag):
++ return flags
++ elif isinstance(flags, int):
++ return re.RegexFlag(flags)
++ elif isinstance(flags, str):
+ flags = [flags]
+
+ if isinstance(flags, Iterable) and not isinstance(flags, Mapping):
+- _flags_acc = [0] # An initial 0 avoids resucing on empty list, an error
++ _flags = re.RegexFlag(0)
+ for flag in flags:
+- _flag = getattr(re, str(flag).upper())
+-
+- if not isinstance(_flag, int):
+- raise SaltInvocationError("Invalid re flag given: {}".format(flag))
+-
+- _flags_acc.append(_flag)
+-
+- return reduce(operator.__or__, _flags_acc)
+- elif isinstance(flags, int):
+- return flags
++ _flag = getattr(re.RegexFlag, str(flag).upper(), None)
++ if not _flag:
++ raise CommandExecutionError(f"Invalid re flag given: {flag}")
++ _flags |= _flag
++ return _flags
+ else:
+- raise SaltInvocationError(
+- 'Invalid re flags: "{}", must be given either as a single flag '
+- "string, a list of strings, or as an integer".format(flags)
++ raise CommandExecutionError(
++ f'Invalid re flags: "{flags}", must be given either as a single flag '
++ "string, a list of strings, as an integer, or as an re flag"
+ )
+
+
+@@ -2513,8 +2511,8 @@ def replace(
+ "Only one of append and prepend_if_not_found is permitted"
+ )
+
+- flags_num = _get_flags(flags)
+- cpattern = re.compile(salt.utils.stringutils.to_bytes(pattern), flags_num)
++ re_flags = _get_flags(flags)
++ cpattern = re.compile(salt.utils.stringutils.to_bytes(pattern), re_flags)
+ filesize = os.path.getsize(path)
+ if bufsize == "file":
+ bufsize = filesize
+@@ -2582,7 +2580,7 @@ def replace(
+ "^{}($|(?=\r\n))".format(re.escape(content))
+ ),
+ r_data,
+- flags=flags_num,
++ flags=re_flags,
+ ):
+ # Content was found, so set found.
+ found = True
+@@ -3132,7 +3130,11 @@ def search(path, pattern, flags=8, bufsize=1, ignore_if_missing=False, multiline
+ salt '*' file.search /etc/crontab 'mymaintenance.sh'
+ """
+ if multiline:
+- flags = _add_flags(flags, "MULTILINE")
++ re_flags = _add_flags(flags, "MULTILINE")
++ else:
++ re_flags = _get_flags(flags)
++
++ if re.RegexFlag.MULTILINE in re_flags:
+ bufsize = "file"
+
+ # This function wraps file.replace on purpose in order to enforce
+@@ -3142,7 +3144,7 @@ def search(path, pattern, flags=8, bufsize=1, ignore_if_missing=False, multiline
+ path,
+ pattern,
+ "",
+- flags=flags,
++ flags=re_flags,
+ bufsize=bufsize,
+ dry_run=True,
+ search_only=True,
diff --git a/app-admin/salt/files/salt-3005.1-no-entry-points.patch b/app-admin/salt/files/salt-3005.1-no-entry-points.patch
new file mode 100644
index 000000000000..5d1da8f751e4
--- /dev/null
+++ b/app-admin/salt/files/salt-3005.1-no-entry-points.patch
@@ -0,0 +1,13 @@
+diff --git a/setup.py b/setup.py
+index bd11ff95f7..3b83f7b6ff 100755
+--- a/setup.py
++++ b/setup.py
+@@ -1173,7 +1173,7 @@ class SaltDistribution(distutils.dist.Distribution):
+ return scripts
+
+ @property
+- def _property_entry_points(self):
++ def _property_entry_points_disabled(self):
+ entrypoints = {
+ "pyinstaller40": [
+ "hook-dirs = salt.utils.pyinstaller:get_hook_dirs",
diff --git a/app-admin/salt/files/salt-3005.1-tests.patch b/app-admin/salt/files/salt-3005.1-tests.patch
new file mode 100644
index 000000000000..101574bdd303
--- /dev/null
+++ b/app-admin/salt/files/salt-3005.1-tests.patch
@@ -0,0 +1,40 @@
+diff --git a/tests/unit/utils/test_schema.py b/tests/unit/utils/test_schema.py
+index 8c648f5288..5886813e28 100644
+--- a/tests/unit/utils/test_schema.py
++++ b/tests/unit/utils/test_schema.py
+@@ -528,7 +528,7 @@ class ConfigTestCase(TestCase):
+ jsonschema.validate(
+ {"personal_access_token": "foo"}, Requirements.serialize()
+ )
+- if JSONSCHEMA_VERSION >= _LooseVersion("3.0.0"):
++ if JSONSCHEMA_VERSION >= _LooseVersion("3.0.0") and JSONSCHEMA_VERSION < _LooseVersion("4.17.0"):
+ self.assertIn(
+ "'ssh_key_file' is a required property", excinfo.exception.message
+ )
+@@ -1851,7 +1851,7 @@ class ConfigTestCase(TestCase):
+ jsonschema.validate(
+ {"item": {"sides": "4", "color": "blue"}}, TestConf.serialize()
+ )
+- if JSONSCHEMA_VERSION >= _LooseVersion("3.0.0"):
++ if JSONSCHEMA_VERSION >= _LooseVersion("3.0.0") and JSONSCHEMA_VERSION < _LooseVersion("4.17.0"):
+ self.assertIn("'4'", excinfo.exception.message)
+ self.assertIn("is not of type", excinfo.exception.message)
+ self.assertIn("'boolean'", excinfo.exception.message)
+@@ -1974,7 +1974,7 @@ class ConfigTestCase(TestCase):
+
+ with self.assertRaises(jsonschema.exceptions.ValidationError) as excinfo:
+ jsonschema.validate({"item": ["maybe"]}, TestConf.serialize())
+- if JSONSCHEMA_VERSION >= _LooseVersion("3.0.0"):
++ if JSONSCHEMA_VERSION >= _LooseVersion("3.0.0") and JSONSCHEMA_VERSION < _LooseVersion("4.17.0"):
+ self.assertIn("'maybe'", excinfo.exception.message)
+ self.assertIn("is not one of", excinfo.exception.message)
+ self.assertIn("'yes'", excinfo.exception.message)
+@@ -2036,7 +2036,7 @@ class ConfigTestCase(TestCase):
+
+ with self.assertRaises(jsonschema.exceptions.ValidationError) as excinfo:
+ jsonschema.validate({"item": ["maybe"]}, TestConf.serialize())
+- if JSONSCHEMA_VERSION >= _LooseVersion("3.0.0"):
++ if JSONSCHEMA_VERSION >= _LooseVersion("3.0.0") and JSONSCHEMA_VERSION < _LooseVersion("4.17.0"):
+ self.assertIn("'maybe'", excinfo.exception.message)
+ self.assertIn("is not one of", excinfo.exception.message)
+ self.assertIn("'yes'", excinfo.exception.message)
diff --git a/app-admin/salt/files/salt-3006.2-tests.patch b/app-admin/salt/files/salt-3006.2-tests.patch
new file mode 100644
index 000000000000..abec5157df30
--- /dev/null
+++ b/app-admin/salt/files/salt-3006.2-tests.patch
@@ -0,0 +1,114 @@
+diff --git a/tests/pytests/unit/modules/dockermod/test_module.py b/tests/pytests/unit/modules/dockermod/test_module.py
+index 8fb7806497..584d416412 100644
+--- a/tests/pytests/unit/modules/dockermod/test_module.py
++++ b/tests/pytests/unit/modules/dockermod/test_module.py
+@@ -354,10 +354,6 @@ def test_update_mine():
+ mine_mock.assert_called_once()
+
+
+-@pytest.mark.skipif(
+- docker_mod.docker.version_info < (1, 5, 0),
+- reason="docker module must be installed to run this test or is too old. >=1.5.0",
+-)
+ def test_list_networks():
+ """
+ test list networks.
+@@ -378,10 +374,6 @@ def test_list_networks():
+ client.networks.assert_called_once_with(names=["foo"], ids=["01234"])
+
+
+-@pytest.mark.skipif(
+- docker_mod.docker.version_info < (1, 5, 0),
+- reason="docker module must be installed to run this test or is too old. >=1.5.0",
+-)
+ def test_create_network():
+ """
+ test create network.
+@@ -422,10 +414,6 @@ def test_create_network():
+ )
+
+
+-@pytest.mark.skipif(
+- docker_mod.docker.version_info < (1, 5, 0),
+- reason="docker module must be installed to run this test or is too old. >=1.5.0",
+-)
+ def test_remove_network():
+ """
+ test remove network.
+@@ -444,10 +432,6 @@ def test_remove_network():
+ client.remove_network.assert_called_once_with("foo")
+
+
+-@pytest.mark.skipif(
+- docker_mod.docker.version_info < (1, 5, 0),
+- reason="docker module must be installed to run this test or is too old. >=1.5.0",
+-)
+ def test_inspect_network():
+ """
+ test inspect network.
+@@ -466,10 +450,6 @@ def test_inspect_network():
+ client.inspect_network.assert_called_once_with("foo")
+
+
+-@pytest.mark.skipif(
+- docker_mod.docker.version_info < (1, 5, 0),
+- reason="docker module must be installed to run this test or is too old. >=1.5.0",
+-)
+ def test_connect_container_to_network():
+ """
+ test connect_container_to_network
+@@ -491,10 +471,6 @@ def test_connect_container_to_network():
+ client.connect_container_to_network.assert_called_once_with("container", "foo")
+
+
+-@pytest.mark.skipif(
+- docker_mod.docker.version_info < (1, 5, 0),
+- reason="docker module must be installed to run this test or is too old. >=1.5.0",
+-)
+ def test_disconnect_container_from_network():
+ """
+ test disconnect_container_from_network
+@@ -513,10 +489,6 @@ def test_disconnect_container_from_network():
+ client.disconnect_container_from_network.assert_called_once_with("container", "foo")
+
+
+-@pytest.mark.skipif(
+- docker_mod.docker.version_info < (1, 5, 0),
+- reason="docker module must be installed to run this test or is too old. >=1.5.0",
+-)
+ def test_list_volumes():
+ """
+ test list volumes.
+@@ -539,10 +511,6 @@ def test_list_volumes():
+ )
+
+
+-@pytest.mark.skipif(
+- docker_mod.docker.version_info < (1, 5, 0),
+- reason="docker module must be installed to run this test or is too old. >=1.5.0",
+-)
+ def test_create_volume():
+ """
+ test create volume.
+@@ -569,10 +537,6 @@ def test_create_volume():
+ )
+
+
+-@pytest.mark.skipif(
+- docker_mod.docker.version_info < (1, 5, 0),
+- reason="docker module must be installed to run this test or is too old. >=1.5.0",
+-)
+ def test_remove_volume():
+ """
+ test remove volume.
+@@ -591,10 +555,6 @@ def test_remove_volume():
+ client.remove_volume.assert_called_once_with("foo")
+
+
+-@pytest.mark.skipif(
+- docker_mod.docker.version_info < (1, 5, 0),
+- reason="docker module must be installed to run this test or is too old. >=1.5.0",
+-)
+ def test_inspect_volume():
+ """
+ test inspect volume.