diff --git a/2019.2.0-pr-54196-backport-173.patch b/2019.2.0-pr-54196-backport-173.patch index fcbf178..aade746 100644 --- a/2019.2.0-pr-54196-backport-173.patch +++ b/2019.2.0-pr-54196-backport-173.patch @@ -1,4 +1,4 @@ -From 3119bc27584472b0f0d440a37ec4cff2504165f2 Mon Sep 17 00:00:00 2001 +From c9e39c7af97180414205a8ad752f86f579e75a58 Mon Sep 17 00:00:00 2001 From: Cedric Bosdonnat Date: Tue, 3 Sep 2019 15:16:30 +0200 Subject: [PATCH] 2019.2.0 PR 54196 backport (#173) @@ -219,6 +219,6 @@ index 8022989937..2904fa224d 100644 'virt.pool_start': mocks['start'] }): -- -2.20.1 +2.16.4 diff --git a/_lastrevision b/_lastrevision index 89044b9..e63f25d 100644 --- a/_lastrevision +++ b/_lastrevision @@ -1 +1 @@ -84e27c403e61c28793ecffea4e280b3cdbb365a0 \ No newline at end of file +8ec046fadeba7bd58a5bf2a3f561c4bffd6c4510 \ No newline at end of file diff --git a/_service b/_service index 61586c5..a1e1834 100644 --- a/_service +++ b/_service @@ -3,7 +3,7 @@ https://github.com/openSUSE/salt-packaging.git salt package - 2019.2.0 + 2019.2.2 git @@ -12,8 +12,9 @@ codeload.github.com - openSUSE/salt/tar.gz/v2019.2.0-suse - v2019.2.0.tar.gz + openSUSE/salt/tar.gz/v2019.2.2-suse + v2019.2.2.tar.gz + diff --git a/accumulated-changes-from-yomi-167.patch b/accumulated-changes-from-yomi-167.patch index f33669b..77ac394 100644 --- a/accumulated-changes-from-yomi-167.patch +++ b/accumulated-changes-from-yomi-167.patch @@ -1,4 +1,4 @@ -From 46a60d81604eaf6f9fc3712e02d1066e959c96e3 Mon Sep 17 00:00:00 2001 +From bfaac404ffa334157f4408b312b12a59b059df69 Mon Sep 17 00:00:00 2001 From: Alberto Planas Date: Tue, 22 Oct 2019 11:02:33 +0200 Subject: [PATCH] Accumulated changes from Yomi (#167) @@ -17,17 +17,17 @@ This patch ignore this kind of issue during the grains creation. (cherry picked from commit b865491b74679140f7a71c5ba50d482db47b600f) --- - salt/grains/core.py | 4 +++ - salt/modules/zypperpkg.py | 30 +++++++++++++------ - tests/unit/grains/test_core.py | 45 ++++++++++++++++++++++++++++ - tests/unit/modules/test_zypperpkg.py | 26 ++++++++++++++++ + salt/grains/core.py | 4 ++++ + salt/modules/zypperpkg.py | 30 ++++++++++++++++-------- + tests/unit/grains/test_core.py | 45 ++++++++++++++++++++++++++++++++++++ + tests/unit/modules/test_zypperpkg.py | 26 +++++++++++++++++++++ 4 files changed, 96 insertions(+), 9 deletions(-) diff --git a/salt/grains/core.py b/salt/grains/core.py -index fa188a6ff7..fdabe484a8 100644 +index e1d08b76cf..6b1f2d2223 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py -@@ -986,6 +986,10 @@ def _virtual(osdata): +@@ -987,6 +987,10 @@ def _virtual(osdata): grains['virtual'] = 'gce' elif 'BHYVE' in output: grains['virtual'] = 'bhyve' @@ -88,10 +88,10 @@ index da1953b2a5..a87041aa70 100644 'install_date_time_t': None, }] diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py -index 889fb90074..aa04a7a7ac 100644 +index 09e197a2e4..7153a078f4 100644 --- a/tests/unit/grains/test_core.py +++ b/tests/unit/grains/test_core.py -@@ -1117,6 +1117,51 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): +@@ -1317,6 +1317,51 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): 'uuid': '' }) @@ -181,6 +181,6 @@ index 695d982ca6..7617113401 100644 ''' Test package removal -- -2.23.0 +2.16.4 diff --git a/accumulated-changes-required-for-yomi-165.patch b/accumulated-changes-required-for-yomi-165.patch index ba478e1..d013af6 100644 --- a/accumulated-changes-required-for-yomi-165.patch +++ b/accumulated-changes-required-for-yomi-165.patch @@ -1,4 +1,4 @@ -From 8cd87eba73df54a9ede47eda9425e6ffceff7ac0 Mon Sep 17 00:00:00 2001 +From 78f5d1bd931f5329792d0e430c75025b45c14041 Mon Sep 17 00:00:00 2001 From: Alberto Planas Date: Tue, 30 Jul 2019 11:23:12 +0200 Subject: [PATCH] Accumulated changes required for Yomi (#165) @@ -58,14 +58,14 @@ so the cached data will be separated too. (cherry picked from commit 9c54bb3e8c93ba21fc583bdefbcadbe53cbcd7b5) --- - salt/modules/chroot.py | 36 +++++++++------- - salt/modules/cmdmod.py | 12 ++++-- - salt/modules/freezer.py | 20 ++++++--- - salt/modules/zypperpkg.py | 13 ++++-- - tests/unit/modules/test_chroot.py | 36 +++++++++++++++- - tests/unit/modules/test_cmdmod.py | 50 ++++++++++++++++++++++ - tests/unit/modules/test_freezer.py | 62 +++++++++++++++++++++++++--- - tests/unit/modules/test_zypperpkg.py | 21 ++++++++++ + salt/modules/chroot.py | 36 +++++++++++---------- + salt/modules/cmdmod.py | 12 +++++-- + salt/modules/freezer.py | 20 ++++++++---- + salt/modules/zypperpkg.py | 13 ++++++-- + tests/unit/modules/test_chroot.py | 36 +++++++++++++++++++-- + tests/unit/modules/test_cmdmod.py | 50 +++++++++++++++++++++++++++++ + tests/unit/modules/test_freezer.py | 62 ++++++++++++++++++++++++++++++++---- + tests/unit/modules/test_zypperpkg.py | 21 ++++++++++++ 8 files changed, 214 insertions(+), 36 deletions(-) diff --git a/salt/modules/chroot.py b/salt/modules/chroot.py @@ -181,10 +181,10 @@ index 6e4705b67e..17b5890d8c 100644 raise CommandExecutionError(ret['stderr']) diff --git a/salt/modules/cmdmod.py b/salt/modules/cmdmod.py -index d0819f2f79..b279d00a11 100644 +index 1801147f57..a7e1553ec3 100644 --- a/salt/modules/cmdmod.py +++ b/salt/modules/cmdmod.py -@@ -3064,13 +3064,19 @@ def run_chroot(root, +@@ -3079,13 +3079,19 @@ def run_chroot(root, if isinstance(cmd, (list, tuple)): cmd = ' '.join([six.text_type(i) for i in cmd]) @@ -575,6 +575,6 @@ index 0a3053680f..695d982ca6 100644 + zypper._clean_cache() + self.assertEqual(zypper.__context__, {'pkg.other_data': None}) -- -2.21.0 +2.16.4 diff --git a/activate-all-beacons-sources-config-pillar-grains.patch b/activate-all-beacons-sources-config-pillar-grains.patch index 1c39061..ef9a2e5 100644 --- a/activate-all-beacons-sources-config-pillar-grains.patch +++ b/activate-all-beacons-sources-config-pillar-grains.patch @@ -1,4 +1,4 @@ -From 5b48dee2f1b9a8203490e97620581b3a04d42632 Mon Sep 17 00:00:00 2001 +From 45b3ee6c8255c2daa6ed291a430a6325155ef29c Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Tue, 17 Oct 2017 16:52:33 +0200 Subject: [PATCH] Activate all beacons sources: config/pillar/grains @@ -8,10 +8,10 @@ Subject: [PATCH] Activate all beacons sources: config/pillar/grains 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/minion.py b/salt/minion.py -index 9468695880..0a6771dccd 100644 +index 6912d9587f..c5f637eaa6 100644 --- a/salt/minion.py +++ b/salt/minion.py -@@ -439,7 +439,7 @@ class MinionBase(object): +@@ -484,7 +484,7 @@ class MinionBase(object): the pillar or grains changed ''' if 'config.merge' in functions: @@ -21,6 +21,6 @@ index 9468695880..0a6771dccd 100644 return self.beacons.process(b_conf, self.opts['grains']) # pylint: disable=no-member return [] -- -2.13.7 +2.16.4 diff --git a/add-all_versions-parameter-to-include-all-installed-.patch b/add-all_versions-parameter-to-include-all-installed-.patch index 24be312..3d4faa2 100644 --- a/add-all_versions-parameter-to-include-all-installed-.patch +++ b/add-all_versions-parameter-to-include-all-installed-.patch @@ -1,4 +1,4 @@ -From c059d617a77184c3bec8159d5197355f3cab8c4e Mon Sep 17 00:00:00 2001 +From 56c38610b083997cebf00070efe781d114fc33b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Mon, 14 May 2018 11:33:13 +0100 @@ -62,6 +62,6 @@ index 0aca1e0af8..2034262b23 100644 cver = new_pkgs.get(pkgname) if not cver and pkgname in new_caps: -- -2.17.1 +2.16.4 diff --git a/add-batch_presence_ping_timeout-and-batch_presence_p.patch b/add-batch_presence_ping_timeout-and-batch_presence_p.patch index 4ac8fc8..6695653 100644 --- a/add-batch_presence_ping_timeout-and-batch_presence_p.patch +++ b/add-batch_presence_ping_timeout-and-batch_presence_p.patch @@ -1,4 +1,4 @@ -From 902a3527415807448be0aa28a651374a189d102c Mon Sep 17 00:00:00 2001 +From 669a03b26870a7109c3f4b327dd2b5a4ec4fa1ba Mon Sep 17 00:00:00 2001 From: Marcelo Chiaradia Date: Thu, 4 Apr 2019 13:57:38 +0200 Subject: [PATCH] Add 'batch_presence_ping_timeout' and @@ -9,7 +9,7 @@ Subject: [PATCH] Add 'batch_presence_ping_timeout' and 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/salt/cli/batch.py b/salt/cli/batch.py -index 4bd07f584a..ce239215cb 100644 +index 36e66da1af..67f03c8a45 100644 --- a/salt/cli/batch.py +++ b/salt/cli/batch.py @@ -83,6 +83,9 @@ def batch_get_opts( @@ -41,6 +41,6 @@ index 4bd07f584a..ce239215cb 100644 # Broadcast to targets -- -2.20.1 +2.16.4 diff --git a/add-cpe_name-for-osversion-grain-parsing-u-49946.patch b/add-cpe_name-for-osversion-grain-parsing-u-49946.patch index 22cc3dd..7d429dc 100644 --- a/add-cpe_name-for-osversion-grain-parsing-u-49946.patch +++ b/add-cpe_name-for-osversion-grain-parsing-u-49946.patch @@ -1,4 +1,4 @@ -From c2c002a2b8f106388fda3c1abaf518f2d47ce1cf Mon Sep 17 00:00:00 2001 +From 2c4676963dfb4646ae0d2ad8aedba0aa83d266e9 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Tue, 9 Oct 2018 14:08:50 +0200 Subject: [PATCH] Add CPE_NAME for osversion* grain parsing (U#49946) @@ -29,10 +29,10 @@ Fix proper part name in the string-bound CPE 1 file changed, 28 insertions(+) diff --git a/salt/grains/core.py b/salt/grains/core.py -index 29e8371c2b..d688b6c757 100644 +index cd7ee39d2f..f59eeb5780 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py -@@ -1571,6 +1571,34 @@ def _parse_cpe_name(cpe): +@@ -1623,6 +1623,34 @@ def _parse_cpe_name(cpe): return ret @@ -68,6 +68,6 @@ index 29e8371c2b..d688b6c757 100644 ''' Return grains pertaining to the operating system -- -2.17.1 +2.16.4 diff --git a/add-custom-suse-capabilities-as-grains.patch b/add-custom-suse-capabilities-as-grains.patch index 9e21b8c..4834b74 100644 --- a/add-custom-suse-capabilities-as-grains.patch +++ b/add-custom-suse-capabilities-as-grains.patch @@ -1,4 +1,4 @@ -From b02aee33a3aa1676cbfdf3a0ed936eef8a40adfe Mon Sep 17 00:00:00 2001 +From a96d99e4bf7a43c99037aee6b6e030cdc46ab542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Thu, 21 Jun 2018 11:57:57 +0100 @@ -24,6 +24,6 @@ index fff70e9f5b..4fb58674bf 100644 + '__suse_reserved_pkg_patches_support': True + } -- -2.13.7 +2.16.4 diff --git a/add-environment-variable-to-know-if-yum-is-invoked-f.patch b/add-environment-variable-to-know-if-yum-is-invoked-f.patch index 1a820fe..ce47f3f 100644 --- a/add-environment-variable-to-know-if-yum-is-invoked-f.patch +++ b/add-environment-variable-to-know-if-yum-is-invoked-f.patch @@ -1,4 +1,4 @@ -From d9d459f62d53acddd67313d9d66e1fe8caf4fd45 Mon Sep 17 00:00:00 2001 +From 960c7f29239a23c3d46c31692d2e881735f4d2a7 Mon Sep 17 00:00:00 2001 From: Marcelo Chiaradia Date: Thu, 7 Jun 2018 10:29:41 +0200 Subject: [PATCH] Add environment variable to know if yum is invoked from @@ -73,6 +73,6 @@ index c250b94f0e..a56a2e8366 100644 for line in salt.utils.itertools.split(ret, os.linesep): inst, advisory_id, sev, pkg = re.match(r'([i|\s]) ([^\s]+) +([^\s]+) +([^\s]+)', -- -2.17.1 +2.16.4 diff --git a/add-hold-unhold-functions.patch b/add-hold-unhold-functions.patch index d39030f..8287c6a 100644 --- a/add-hold-unhold-functions.patch +++ b/add-hold-unhold-functions.patch @@ -1,4 +1,4 @@ -From 4219d3d69799bc20f88eed0a02ef15c932e6782e Mon Sep 17 00:00:00 2001 +From 1a98027d94dc7491182a16eef2e6134c2d8423b6 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Thu, 6 Dec 2018 16:26:23 +0100 Subject: [PATCH] Add hold/unhold functions @@ -7,7 +7,7 @@ Add unhold function Add warnings --- - salt/modules/zypperpkg.py | 88 ++++++++++++++++++++++++++++++++++++++- + salt/modules/zypperpkg.py | 88 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) diff --git a/salt/modules/zypperpkg.py b/salt/modules/zypperpkg.py @@ -139,6 +139,6 @@ index 001b852fc4..0c26e2214c 100644 added = [] try: -- -2.20.1 +2.16.4 diff --git a/add-missing-fun-for-returns-from-wfunc-executions.patch b/add-missing-fun-for-returns-from-wfunc-executions.patch index ee0faba..5a97c36 100644 --- a/add-missing-fun-for-returns-from-wfunc-executions.patch +++ b/add-missing-fun-for-returns-from-wfunc-executions.patch @@ -1,4 +1,4 @@ -From fa957bcb842a29a340a980a03cd8e54b06e7e21b Mon Sep 17 00:00:00 2001 +From 3ae0b949dacc7ac597dc94a5141d2f4c23d6efc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Wed, 9 Oct 2019 13:03:33 +0100 @@ -31,6 +31,6 @@ index 1453430e73..0df918d634 100644 self.event.fire_event( data, -- -2.22.0 +2.16.4 diff --git a/add-multi-file-support-and-globbing-to-the-filetree-.patch b/add-multi-file-support-and-globbing-to-the-filetree-.patch index b8a3dda..4a3c7cf 100644 --- a/add-multi-file-support-and-globbing-to-the-filetree-.patch +++ b/add-multi-file-support-and-globbing-to-the-filetree-.patch @@ -1,4 +1,4 @@ -From 671bb9d48e120c806ca1f6f176b0ada43b1e7594 Mon Sep 17 00:00:00 2001 +From ddc5439536e8d7a0b2fca1fcb9db0b18ed961d54 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Fri, 12 Oct 2018 16:20:40 +0200 Subject: [PATCH] Add multi-file support and globbing to the filetree @@ -12,8 +12,8 @@ Collect system logs and boot logs Support globbing in filetree --- - salt/cli/support/intfunc.py | 49 ++++++++++++++++----------- - salt/cli/support/profiles/default.yml | 7 ++++ + salt/cli/support/intfunc.py | 49 +++++++++++++++++++++-------------- + salt/cli/support/profiles/default.yml | 7 +++++ 2 files changed, 37 insertions(+), 19 deletions(-) diff --git a/salt/cli/support/intfunc.py b/salt/cli/support/intfunc.py @@ -111,6 +111,6 @@ index 01d9a26193..3defb5eef3 100644 + - /var/log/messages -- -2.19.0 +2.16.4 diff --git a/add-ppc64le-as-a-valid-rpm-package-architecture.patch b/add-ppc64le-as-a-valid-rpm-package-architecture.patch index 97414c3..3b122dc 100644 --- a/add-ppc64le-as-a-valid-rpm-package-architecture.patch +++ b/add-ppc64le-as-a-valid-rpm-package-architecture.patch @@ -1,4 +1,4 @@ -From aa9df9a08aa2a761cd91d91376a6a7dfa820c48f Mon Sep 17 00:00:00 2001 +From 27e882ff23e24ec26339503e727e5dec0507b55f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Fri, 24 May 2019 16:27:07 +0100 @@ -22,6 +22,6 @@ index 828b0cecda..cb85eb99fe 100644 ARCHES_SPARC = ( 'sparc', 'sparcv8', 'sparcv9', 'sparcv9v', 'sparc64', 'sparc64v' -- -2.17.1 +2.16.4 diff --git a/add-saltssh-multi-version-support-across-python-inte.patch b/add-saltssh-multi-version-support-across-python-inte.patch index 0059197..cb5458c 100644 --- a/add-saltssh-multi-version-support-across-python-inte.patch +++ b/add-saltssh-multi-version-support-across-python-inte.patch @@ -1,4 +1,4 @@ -From 18c46c301b98841d941e2d07901e7468de30b83a Mon Sep 17 00:00:00 2001 +From ee67c569786f5381fa0fb34c64f6796ecef5b21f Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Mon, 12 Mar 2018 12:01:39 +0100 Subject: [PATCH] Add SaltSSH multi-version support across Python @@ -254,7 +254,7 @@ Lintfix Set master_top_first to False by default --- - doc/topics/releases/fluorine.rst | 178 +++++++++++++++++++++++++++++++ + doc/topics/releases/fluorine.rst | 178 +++++++++++++++++++++++++++++++++++++++ salt/client/ssh/ssh_py_shim.py | 4 + salt/utils/thin.py | 1 + 3 files changed, 183 insertions(+) @@ -445,10 +445,10 @@ index 0000000000..40c69e25cc +Salt version is also available on the Master machine, although does not need to be directly +installed together with the older Python interpreter. diff --git a/salt/client/ssh/ssh_py_shim.py b/salt/client/ssh/ssh_py_shim.py -index be17a1a38c..595d1c40c7 100644 +index cd7549a178..95b3931a32 100644 --- a/salt/client/ssh/ssh_py_shim.py +++ b/salt/client/ssh/ssh_py_shim.py -@@ -164,6 +164,9 @@ def unpack_thin(thin_path): +@@ -165,6 +165,9 @@ def unpack_thin(thin_path): old_umask = os.umask(0o077) # pylint: disable=blacklisted-function tfile.extractall(path=OPTIONS.saltdir) tfile.close() @@ -458,7 +458,7 @@ index be17a1a38c..595d1c40c7 100644 os.umask(old_umask) # pylint: disable=blacklisted-function try: os.unlink(thin_path) -@@ -357,5 +360,6 @@ def main(argv): # pylint: disable=W0613 +@@ -358,5 +361,6 @@ def main(argv): # pylint: disable=W0613 return retcode @@ -466,7 +466,7 @@ index be17a1a38c..595d1c40c7 100644 if __name__ == '__main__': sys.exit(main(sys.argv)) diff --git a/salt/utils/thin.py b/salt/utils/thin.py -index b60815225e..172b0938f5 100644 +index 3c8ffec8af..b6fa90abae 100644 --- a/salt/utils/thin.py +++ b/salt/utils/thin.py @@ -9,6 +9,7 @@ from __future__ import absolute_import, print_function, unicode_literals @@ -478,6 +478,6 @@ index b60815225e..172b0938f5 100644 import subprocess import sys -- -2.17.1 +2.16.4 diff --git a/add-standalone-configuration-file-for-enabling-packa.patch b/add-standalone-configuration-file-for-enabling-packa.patch index 6dfaadf..d654e54 100644 --- a/add-standalone-configuration-file-for-enabling-packa.patch +++ b/add-standalone-configuration-file-for-enabling-packa.patch @@ -1,4 +1,4 @@ -From 74160010c0fdddb04980ad664e155550382ef82b Mon Sep 17 00:00:00 2001 +From d150fed197f47d17227f1801b29357ab509ebbd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Wed, 22 May 2019 13:00:46 +0100 @@ -21,6 +21,6 @@ index 0000000000..94d05fb2ee + - /usr/share/salt-formulas/states + - /srv/salt -- -2.17.1 +2.16.4 diff --git a/add-supportconfig-module-for-remote-calls-and-saltss.patch b/add-supportconfig-module-for-remote-calls-and-saltss.patch index 38c1d15..459bc04 100644 --- a/add-supportconfig-module-for-remote-calls-and-saltss.patch +++ b/add-supportconfig-module-for-remote-calls-and-saltss.patch @@ -1,4 +1,4 @@ -From 2bb024d871acaf5726eeb6e89fb83785605b4c83 Mon Sep 17 00:00:00 2001 +From 4bf9567fd28470085ee501e5e17c75a932b5dde5 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Fri, 19 Oct 2018 15:44:47 +0200 Subject: [PATCH] Add supportconfig module for remote calls and SaltSSH @@ -198,13 +198,13 @@ Check last function by full name salt/cli/support/__init__.py | 2 +- salt/cli/support/collector.py | 12 +- salt/loader.py | 6 +- - salt/modules/saltsupport.py | 381 ++++++++++++++++++++++++ + salt/modules/saltsupport.py | 381 +++++++++++++++++++++++++++++++ salt/state.py | 34 ++- - salt/states/saltsupport.py | 206 +++++++++++++ - salt/utils/args.py | 4 +- + salt/states/saltsupport.py | 206 +++++++++++++++++ + salt/utils/args.py | 6 +- salt/utils/decorators/__init__.py | 24 ++ - tests/unit/modules/test_saltsupport.py | 394 +++++++++++++++++++++++++ - 9 files changed, 1044 insertions(+), 19 deletions(-) + tests/unit/modules/test_saltsupport.py | 394 +++++++++++++++++++++++++++++++++ + 9 files changed, 1044 insertions(+), 21 deletions(-) create mode 100644 salt/modules/saltsupport.py create mode 100644 salt/states/saltsupport.py create mode 100644 tests/unit/modules/test_saltsupport.py @@ -267,10 +267,10 @@ index a4343297b6..cbae189aea 100644 archive_path = self.collector.archive_path diff --git a/salt/loader.py b/salt/loader.py -index ae024ccac9..094a816d11 100644 +index 0cff0c72bb..d494c452ed 100644 --- a/salt/loader.py +++ b/salt/loader.py -@@ -1570,8 +1570,10 @@ class LazyLoader(salt.utils.lazy.LazyDict): +@@ -1687,8 +1687,10 @@ class LazyLoader(salt.utils.lazy.LazyDict): )) for attr in getattr(mod, '__load__', dir(mod)): @@ -671,10 +671,10 @@ index 0000000000..750b2655d6 + + return __virtualname__ diff --git a/salt/state.py b/salt/state.py -index e7288bce2e..b4b2a00601 100644 +index dfa9c6de58..c3119b6a33 100644 --- a/salt/state.py +++ b/salt/state.py -@@ -1315,8 +1315,9 @@ class State(object): +@@ -1358,8 +1358,9 @@ class State(object): names = [] if state.startswith('__'): continue @@ -686,7 +686,7 @@ index e7288bce2e..b4b2a00601 100644 if orchestration_jid is not None: chunk['__orchestration_jid__'] = orchestration_jid if '__sls__' in body: -@@ -1901,8 +1902,12 @@ class State(object): +@@ -1929,8 +1930,12 @@ class State(object): ret = self.call_parallel(cdata, low) else: self.format_slots(cdata) @@ -701,7 +701,7 @@ index e7288bce2e..b4b2a00601 100644 self.states.inject_globals = {} if 'check_cmd' in low and '{0[state]}.mod_run_check_cmd'.format(low) not in self.states: ret.update(self._run_check_cmd(low)) -@@ -2729,10 +2734,31 @@ class State(object): +@@ -2762,10 +2767,31 @@ class State(object): running.update(errors) return running @@ -946,19 +946,21 @@ index 0000000000..f245f7f137 + ''' + return __virtualname__ diff --git a/salt/utils/args.py b/salt/utils/args.py -index a3d8099c7f..19de7d5d39 100644 +index 57dbf5861a..1f4d5d2e0f 100644 --- a/salt/utils/args.py +++ b/salt/utils/args.py -@@ -19,7 +19,7 @@ import salt.utils.data +@@ -20,9 +20,7 @@ import salt.utils.data import salt.utils.jid import salt.utils.versions import salt.utils.yaml - +-log = logging.getLogger(__name__) +- +from salt.utils.odict import OrderedDict if six.PY3: KWARG_REGEX = re.compile(r'^([^\d\W][\w.-]*)=(?!=)(.*)$', re.UNICODE) -@@ -409,7 +409,7 @@ def format_call(fun, +@@ -423,7 +421,7 @@ def format_call(fun, ret = initial_ret is not None and initial_ret or {} ret['args'] = [] @@ -968,10 +970,10 @@ index a3d8099c7f..19de7d5d39 100644 aspec = get_function_argspec(fun, is_class_method=is_class_method) diff --git a/salt/utils/decorators/__init__.py b/salt/utils/decorators/__init__.py -index 81d1812833..c5da5b6d4b 100644 +index a6da91447a..7529013a8e 100644 --- a/salt/utils/decorators/__init__.py +++ b/salt/utils/decorators/__init__.py -@@ -596,3 +596,27 @@ def ensure_unicode_args(function): +@@ -671,3 +671,27 @@ def ensure_unicode_args(function): else: return function(*args, **kwargs) return wrapped @@ -1400,6 +1402,6 @@ index 0000000000..7bd652a90e + assert out.messages[saltsupport.LogCollector.INFO] == ['00:00:00.000 - The real TTYs became ' + 'pseudo TTYs and vice versa'] -- -2.20.1 +2.16.4 diff --git a/add-virt.all_capabilities.patch b/add-virt.all_capabilities.patch index fcb8f96..42573d6 100644 --- a/add-virt.all_capabilities.patch +++ b/add-virt.all_capabilities.patch @@ -1,4 +1,4 @@ -From 0fd1e40e7149dd1a33f9a4497fa4e31c78ddfba7 Mon Sep 17 00:00:00 2001 +From fdc0a1f4adc40d9e5b5f7164f750e4580b9cd3f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Date: Thu, 18 Oct 2018 13:32:59 +0200 Subject: [PATCH] Add virt.all_capabilities @@ -10,15 +10,15 @@ before calling virt.domain_capabilities for each of them. This commit embeds all this logic to get them all in a single virt.all_capabilities call. --- - salt/modules/virt.py | 107 +++++++++++++++++++++++--------- - tests/unit/modules/test_virt.py | 56 +++++++++++++++++ + salt/modules/virt.py | 107 +++++++++++++++++++++++++++++----------- + tests/unit/modules/test_virt.py | 56 +++++++++++++++++++++ 2 files changed, 134 insertions(+), 29 deletions(-) diff --git a/salt/modules/virt.py b/salt/modules/virt.py -index b45c5f522d..0921122a8a 100644 +index 8d63b6ff4c..195da49296 100644 --- a/salt/modules/virt.py +++ b/salt/modules/virt.py -@@ -4094,37 +4094,10 @@ def _parse_caps_loader(node): +@@ -4097,37 +4097,10 @@ def _parse_caps_loader(node): return result @@ -58,7 +58,7 @@ index b45c5f522d..0921122a8a 100644 result = { 'emulator': caps.find('path').text if caps.find('path') is not None else None, 'domain': caps.find('domain').text if caps.find('domain') is not None else None, -@@ -4164,6 +4137,82 @@ def domain_capabilities(emulator=None, arch=None, machine=None, domain=None, **k +@@ -4167,6 +4140,82 @@ def domain_capabilities(emulator=None, arch=None, machine=None, domain=None, **k return result @@ -142,7 +142,7 @@ index b45c5f522d..0921122a8a 100644 ''' Return the optimal 'custom' CPU baseline config for VM's on this minion diff --git a/tests/unit/modules/test_virt.py b/tests/unit/modules/test_virt.py -index 3a69adece1..bd34962a6a 100644 +index 6546a0467c..36fcf0d4c0 100644 --- a/tests/unit/modules/test_virt.py +++ b/tests/unit/modules/test_virt.py @@ -2204,6 +2204,62 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): @@ -209,6 +209,6 @@ index 3a69adece1..bd34962a6a 100644 ''' Test virt._get_net_xml() with VLAN tag -- -2.20.1 +2.16.4 diff --git a/add-virt.volume_infos-and-virt.volume_delete.patch b/add-virt.volume_infos-and-virt.volume_delete.patch index a583d2e..0c2aa82 100644 --- a/add-virt.volume_infos-and-virt.volume_delete.patch +++ b/add-virt.volume_infos-and-virt.volume_delete.patch @@ -1,4 +1,4 @@ -From 5e202207d02d2bf4860cc5487ed19f9d835993d1 Mon Sep 17 00:00:00 2001 +From 3bb798795f89e1af5132c6a97ddb0cf414912265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Date: Fri, 15 Feb 2019 17:28:00 +0100 Subject: [PATCH] Add virt.volume_infos() and virt.volume_delete() @@ -11,15 +11,15 @@ names of the virtual machines using the volumes of file type. virt.volume_delete() allows removing a given volume. --- - salt/modules/virt.py | 126 +++++++++++++++++++++ - tests/unit/modules/test_virt.py | 195 ++++++++++++++++++++++++++++++++ + salt/modules/virt.py | 126 ++++++++++++++++++++++++++ + tests/unit/modules/test_virt.py | 195 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 321 insertions(+) diff --git a/salt/modules/virt.py b/salt/modules/virt.py -index 0921122a8a..17039444c4 100644 +index 195da49296..9bb3636bd1 100644 --- a/salt/modules/virt.py +++ b/salt/modules/virt.py -@@ -4988,3 +4988,129 @@ def pool_list_volumes(name, **kwargs): +@@ -4991,3 +4991,129 @@ def pool_list_volumes(name, **kwargs): return pool.listVolumes() finally: conn.close() @@ -150,7 +150,7 @@ index 0921122a8a..17039444c4 100644 + finally: + conn.close() diff --git a/tests/unit/modules/test_virt.py b/tests/unit/modules/test_virt.py -index bd34962a6a..14e51e1e2a 100644 +index 36fcf0d4c0..6f9eea241a 100644 --- a/tests/unit/modules/test_virt.py +++ b/tests/unit/modules/test_virt.py @@ -2698,3 +2698,198 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): @@ -353,6 +353,6 @@ index bd34962a6a..14e51e1e2a 100644 + virt.volume_delete('missing', 'test_volume') + self.assertEqual(mock_delete.call_count, 2) -- -2.20.1 +2.16.4 diff --git a/adds-the-possibility-to-also-use-downloadonly-in-kwa.patch b/adds-the-possibility-to-also-use-downloadonly-in-kwa.patch index 32b38b7..abff5c0 100644 --- a/adds-the-possibility-to-also-use-downloadonly-in-kwa.patch +++ b/adds-the-possibility-to-also-use-downloadonly-in-kwa.patch @@ -1,4 +1,4 @@ -From f9e7ace2f7c56a7fb4df60a048131dbd6887340b Mon Sep 17 00:00:00 2001 +From 812709918226b98cccdcb388863ce68b6cf076b6 Mon Sep 17 00:00:00 2001 From: Jochen Breuer Date: Fri, 27 Sep 2019 11:33:47 +0200 Subject: [PATCH] Adds the possibility to also use downloadonly in kwargs diff --git a/allow-passing-kwargs-to-pkg.list_downloaded-bsc-1140.patch b/allow-passing-kwargs-to-pkg.list_downloaded-bsc-1140.patch index 4aeeed8..a7f6609 100644 --- a/allow-passing-kwargs-to-pkg.list_downloaded-bsc-1140.patch +++ b/allow-passing-kwargs-to-pkg.list_downloaded-bsc-1140.patch @@ -1,4 +1,4 @@ -From 9e2139213bc2eeb8afbf10fdff663ebe7ed23887 Mon Sep 17 00:00:00 2001 +From eadcab9b1b03041360d27421e5e8204f2a463e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Wed, 3 Jul 2019 09:34:50 +0100 @@ -63,6 +63,6 @@ index d2ae06a98e..0a3053680f 100644 @patch('os.path.getsize', MagicMock(return_value=123456)) @patch('os.path.getctime', MagicMock(return_value=1234567890.123456)) -- -2.21.0 +2.16.4 diff --git a/async-batch-implementation.patch b/async-batch-implementation.patch index 4f91985..5b90c91 100644 --- a/async-batch-implementation.patch +++ b/async-batch-implementation.patch @@ -1,4 +1,4 @@ -From dfd16dd5968aae96e36e0dee412864fc765b62fb Mon Sep 17 00:00:00 2001 +From 6dea5186842285588ee02b66701cc91a4a2c4fa9 Mon Sep 17 00:00:00 2001 From: Mihai Dinca Date: Fri, 16 Nov 2018 17:05:29 +0100 Subject: [PATCH] Async batch implementation @@ -31,18 +31,18 @@ Add separate batch presence_ping timeout salt/client/__init__.py | 44 +--- salt/master.py | 25 ++ salt/netapi/__init__.py | 3 +- - salt/transport/ipc.py | 11 +- - salt/utils/event.py | 11 +- + salt/transport/ipc.py | 9 +- + salt/utils/event.py | 8 +- tests/unit/cli/test_batch_async.py | 351 +++++++++++++++++++++++++++++ - 9 files changed, 707 insertions(+), 60 deletions(-) + 9 files changed, 703 insertions(+), 59 deletions(-) create mode 100644 salt/cli/batch_async.py create mode 100644 tests/unit/cli/test_batch_async.py diff --git a/salt/auth/__init__.py b/salt/auth/__init__.py -index 61fbb018fd..a8aefa7091 100644 +index d43c57338c..e44c94fb37 100644 --- a/salt/auth/__init__.py +++ b/salt/auth/__init__.py -@@ -51,7 +51,9 @@ AUTH_INTERNAL_KEYWORDS = frozenset([ +@@ -52,7 +52,9 @@ AUTH_INTERNAL_KEYWORDS = frozenset([ 'metadata', 'print_event', 'raw', @@ -54,7 +54,7 @@ index 61fbb018fd..a8aefa7091 100644 diff --git a/salt/cli/batch.py b/salt/cli/batch.py -index e3a7bf9bcf..4bd07f584a 100644 +index 723944b60a..36e66da1af 100644 --- a/salt/cli/batch.py +++ b/salt/cli/batch.py @@ -26,6 +26,79 @@ import logging @@ -67,7 +67,7 @@ index e3a7bf9bcf..4bd07f584a 100644 + ''' + partition = lambda x: float(x) / 100.0 * len(minions) + try: -+ if '%' in opts['batch']: ++ if isinstance(opts['batch'], six.string_types) and '%' in opts['batch']: + res = partition(float(opts['batch'].strip('%'))) + if res < 1: + return int(math.ceil(res)) @@ -104,7 +104,7 @@ index e3a7bf9bcf..4bd07f584a 100644 + 'tgt_type': tgt_type, + 'ret': ret, + 'batch': batch, -+ 'failhard': kwargs.get('failhard', False), ++ 'failhard': kwargs.get('failhard', parent_opts.get('failhard', False)), + 'raw': kwargs.get('raw', False)} + + if 'timeout' in kwargs: @@ -146,7 +146,7 @@ index e3a7bf9bcf..4bd07f584a 100644 - ''' - partition = lambda x: float(x) / 100.0 * len(self.minions) - try: -- if '%' in self.opts['batch']: +- if isinstance(self.opts['batch'], six.string_types) and '%' in self.opts['batch']: - res = partition(float(self.opts['batch'].strip('%'))) - if res < 1: - return int(math.ceil(res)) @@ -396,7 +396,7 @@ index 0000000000..3160d46d8b + self.event.io_loop.call_later(self.opts['timeout'], self.find_job, set(next_batch)) + self.active = self.active.union(next_batch) diff --git a/salt/client/__init__.py b/salt/client/__init__.py -index 9f0903c7f0..8b37422cbf 100644 +index 6a62e53fdc..8b37422cbf 100644 --- a/salt/client/__init__.py +++ b/salt/client/__init__.py @@ -531,45 +531,14 @@ class LocalClient(object): @@ -424,7 +424,7 @@ index 9f0903c7f0..8b37422cbf 100644 - 'tgt_type': tgt_type, - 'ret': ret, - 'batch': batch, -- 'failhard': kwargs.get('failhard', False), +- 'failhard': kwargs.get('failhard', self.opts.get('failhard', False)), - 'raw': kwargs.get('raw', False)} - - if 'timeout' in kwargs: @@ -461,7 +461,7 @@ index 9f0903c7f0..8b37422cbf 100644 'Salt request timed out. The master is not responding. You ' 'may need to run your command with `--async` in order to ' diff --git a/salt/master.py b/salt/master.py -index 6881aae137..f08c126280 100644 +index 606be7319c..ee968410f7 100644 --- a/salt/master.py +++ b/salt/master.py @@ -32,6 +32,7 @@ import tornado.gen # pylint: disable=F0401 @@ -472,7 +472,7 @@ index 6881aae137..f08c126280 100644 import salt.client import salt.client.ssh.client import salt.exceptions -@@ -2039,6 +2040,27 @@ class ClearFuncs(object): +@@ -2040,6 +2041,27 @@ class ClearFuncs(object): return False return self.loadauth.get_tok(clear_load['token']) @@ -500,7 +500,7 @@ index 6881aae137..f08c126280 100644 def publish(self, clear_load): ''' This method sends out publications to the minions, it can only be used -@@ -2130,6 +2152,9 @@ class ClearFuncs(object): +@@ -2131,6 +2153,9 @@ class ClearFuncs(object): 'error': 'Master could not resolve minions for target {0}'.format(clear_load['tgt']) } } @@ -525,29 +525,20 @@ index 95f6384889..43b6e943a7 100644 def local(self, *args, **kwargs): ''' diff --git a/salt/transport/ipc.py b/salt/transport/ipc.py -index 40a172991d..8235f104ef 100644 +index dbcba18e5c..d0e1639b6e 100644 --- a/salt/transport/ipc.py +++ b/salt/transport/ipc.py -@@ -669,6 +669,8 @@ class IPCMessageSubscriber(IPCClient): - self._sync_ioloop_running = False - self.saved_data = [] - self._sync_read_in_progress = Semaphore() +@@ -615,6 +615,7 @@ class IPCMessageSubscriber(IPCClient): + self._read_stream_future = None + self._saved_data = [] + self._read_in_progress = Lock() + self.callbacks = set() -+ self.reading = False @tornado.gen.coroutine - def _read_sync(self, timeout): -@@ -756,6 +758,7 @@ class IPCMessageSubscriber(IPCClient): - while not self.stream.closed(): - try: - self._read_stream_future = self.stream.read_bytes(4096, partial=True) -+ self.reading = True - wire_bytes = yield self._read_stream_future - self._read_stream_future = None - self.unpacker.feed(wire_bytes) -@@ -768,8 +771,12 @@ class IPCMessageSubscriber(IPCClient): - except Exception as exc: - log.error('Exception occurred while Subscriber handling stream: %s', exc) + def _read(self, timeout, callback=None): +@@ -689,8 +690,12 @@ class IPCMessageSubscriber(IPCClient): + return self._saved_data.pop(0) + return self.io_loop.run_sync(lambda: self._read(timeout)) + def __run_callbacks(self, raw): + for callback in self.callbacks: @@ -559,20 +550,20 @@ index 40a172991d..8235f104ef 100644 ''' Asynchronously read messages and invoke a callback when they are ready. -@@ -784,7 +791,7 @@ class IPCMessageSubscriber(IPCClient): +@@ -705,7 +710,7 @@ class IPCMessageSubscriber(IPCClient): except Exception as exc: log.error('Exception occurred while Subscriber connecting: %s', exc) yield tornado.gen.sleep(1) -- yield self._read_async(callback) -+ yield self._read_async(self.__run_callbacks) +- yield self._read(None, callback) ++ yield self._read(None, self.__run_callbacks) def close(self): ''' diff --git a/salt/utils/event.py b/salt/utils/event.py -index 296a296084..d2700bd2a0 100644 +index 0b877980aa..ad9c85b576 100644 --- a/salt/utils/event.py +++ b/salt/utils/event.py -@@ -863,6 +863,10 @@ class SaltEvent(object): +@@ -858,6 +858,10 @@ class SaltEvent(object): # Minion fired a bad retcode, fire an event self._fire_ret_load_specific_fun(load) @@ -583,17 +574,15 @@ index 296a296084..d2700bd2a0 100644 def set_event_handler(self, event_handler): ''' Invoke the event_handler callback each time an event arrives. -@@ -871,8 +875,11 @@ class SaltEvent(object): +@@ -866,8 +870,10 @@ class SaltEvent(object): if not self.cpub: self.connect_pub() -- # This will handle reconnects -- return self.subscriber.read_async(event_handler) + + self.subscriber.callbacks.add(event_handler) -+ if not self.subscriber.reading: -+ # This will handle reconnects -+ self.subscriber.read_async() + # This will handle reconnects +- return self.subscriber.read_async(event_handler) ++ return self.subscriber.read_async() def __del__(self): # skip exceptions in destroy-- since destroy() doesn't cover interpreter @@ -955,6 +944,6 @@ index 0000000000..f65b6a06c3 + (self.batch.find_job, {'foo'}) + ) -- -2.20.1 +2.23.0 diff --git a/avoid-excessive-syslogging-by-watchdog-cronjob-58.patch b/avoid-excessive-syslogging-by-watchdog-cronjob-58.patch index 6c54333..2a29f57 100644 --- a/avoid-excessive-syslogging-by-watchdog-cronjob-58.patch +++ b/avoid-excessive-syslogging-by-watchdog-cronjob-58.patch @@ -1,4 +1,4 @@ -From 310f8eb22db6010ba48ab371a7223c1345cfbcf0 Mon Sep 17 00:00:00 2001 +From 47adf8fbd8ff1baeef83b2ba8f525dfd5eaef123 Mon Sep 17 00:00:00 2001 From: Hubert Mantel Date: Mon, 27 Nov 2017 13:55:13 +0100 Subject: [PATCH] avoid excessive syslogging by watchdog cronjob (#58) @@ -21,6 +21,6 @@ index 2e418094ed..73a91ebd62 100755 /usr/bin/salt-daemon-watcher --with-init & disown fi -- -2.13.7 +2.16.4 diff --git a/avoid-traceback-when-http.query-request-cannot-be-pe.patch b/avoid-traceback-when-http.query-request-cannot-be-pe.patch index cf286d0..c210136 100644 --- a/avoid-traceback-when-http.query-request-cannot-be-pe.patch +++ b/avoid-traceback-when-http.query-request-cannot-be-pe.patch @@ -1,4 +1,4 @@ -From 36433f3f81fb45ff40ed2d294494342c9f622c2e Mon Sep 17 00:00:00 2001 +From 58504344b62fd577c0ef9c8d55378ea668a57912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Mon, 29 Jul 2019 11:17:53 +0100 @@ -11,7 +11,7 @@ Improve error logging when http.query cannot be performed 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/salt/utils/http.py b/salt/utils/http.py -index 78043b1d6c..1b7dff6202 100644 +index c75ca73a85..ced01e110f 100644 --- a/salt/utils/http.py +++ b/salt/utils/http.py @@ -567,11 +567,13 @@ def query(url, @@ -30,6 +30,6 @@ index 78043b1d6c..1b7dff6202 100644 if stream is True or handle is True: -- -2.21.0 +2.16.4 diff --git a/azurefs-gracefully-handle-attributeerror.patch b/azurefs-gracefully-handle-attributeerror.patch deleted file mode 100644 index bcbf9c6..0000000 --- a/azurefs-gracefully-handle-attributeerror.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d914a1e952e393f3e72aee2cb8d9056533f490cc Mon Sep 17 00:00:00 2001 -From: Robert Munteanu -Date: Mon, 19 Nov 2018 17:52:34 +0100 -Subject: [PATCH] azurefs: gracefully handle AttributeError - -It is possible that the azure.storage object has no __version__ defined. -In that case, prevent console spam with unhandled AttributeError -messages and instead consider that Azure support is not present. - -Problem was encountered on openSUSE Tumbleweed. ---- - salt/fileserver/azurefs.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/salt/fileserver/azurefs.py b/salt/fileserver/azurefs.py -index 547a681016..032739d160 100644 ---- a/salt/fileserver/azurefs.py -+++ b/salt/fileserver/azurefs.py -@@ -68,7 +68,7 @@ try: - if LooseVersion(azure.storage.__version__) < LooseVersion('0.20.0'): - raise ImportError('azure.storage.__version__ must be >= 0.20.0') - HAS_AZURE = True --except ImportError: -+except (ImportError, AttributeError): - HAS_AZURE = False - - # Import third party libs --- -2.17.1 - - diff --git a/batch.py-avoid-exception-when-minion-does-not-respon.patch b/batch.py-avoid-exception-when-minion-does-not-respon.patch index 03d203f..971bd90 100644 --- a/batch.py-avoid-exception-when-minion-does-not-respon.patch +++ b/batch.py-avoid-exception-when-minion-does-not-respon.patch @@ -1,6 +1,7 @@ -From 50377852ca989ffa141fcf32d5ca57d120b455b8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jos=C3=A9=20Guilherme=20Vanz?= -Date: Tue, 21 May 2019 16:13:18 -0300 +From b7e1ff5b0d023fef1f86fa970323dc01bfaabd41 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= + +Date: Wed, 5 Jun 2019 15:15:04 +0100 Subject: [PATCH] batch.py: avoid exception when minion does not respond (bsc#1135507) MIME-Version: 1.0 @@ -21,11 +22,11 @@ Signed-off-by: José Guilherme Vanz 1 file changed, 5 insertions(+) diff --git a/salt/cli/batch.py b/salt/cli/batch.py -index ce239215cb..1623fc5be8 100644 +index 67f03c8a45..10fc81a5f4 100644 --- a/salt/cli/batch.py +++ b/salt/cli/batch.py -@@ -315,6 +315,11 @@ class Batch(object): - if self.opts.get('failhard') and data['ret']['retcode'] > 0: +@@ -318,6 +318,11 @@ class Batch(object): + if self.opts.get('failhard') and data['retcode'] > 0: failhard = True + # avoid an exception if the minion does not respond. @@ -37,6 +38,6 @@ index ce239215cb..1623fc5be8 100644 ret[minion] = data yield data -- -2.21.0 +2.16.4 diff --git a/bugfix-any-unicode-string-of-length-16-will-raise-ty.patch b/bugfix-any-unicode-string-of-length-16-will-raise-ty.patch index 1ba1462..1f5e760 100644 --- a/bugfix-any-unicode-string-of-length-16-will-raise-ty.patch +++ b/bugfix-any-unicode-string-of-length-16-will-raise-ty.patch @@ -1,27 +1,29 @@ -From 8fc3419db49497ca33f99d7bbc3a251d7b07ff09 Mon Sep 17 00:00:00 2001 +From 160103e536cfb5c956d64ed13b9c633153fb7a2e Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Fri, 5 Oct 2018 12:02:08 +0200 Subject: [PATCH] Bugfix: any unicode string of length 16 will raise TypeError instead of ValueError --- - salt/_compat.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + salt/_compat.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/_compat.py b/salt/_compat.py -index 8628833dcf..98931c6cce 100644 +index 61842b4bf3..42153f2395 100644 --- a/salt/_compat.py +++ b/salt/_compat.py -@@ -191,7 +191,7 @@ class IPv6AddressScoped(ipaddress.IPv6Address): +@@ -190,8 +190,8 @@ class IPv6AddressScoped(ipaddress.IPv6Address): + packed = False if isinstance(data, bytes) and len(data) == 16 and b':' not in data: try: - packed = bool(int(str(bytearray(data)).encode('hex'), 16)) +- packed = bool(int(binascii.hexlify(data), 16)) - except ValueError: ++ packed = bool(int(str(bytearray(data)).encode('hex'), 16)) + except (ValueError, TypeError): pass return packed -- -2.20.1 +2.16.4 diff --git a/calculate-fqdns-in-parallel-to-avoid-blockings-bsc-1.patch b/calculate-fqdns-in-parallel-to-avoid-blockings-bsc-1.patch index 685c77b..8902b16 100644 --- a/calculate-fqdns-in-parallel-to-avoid-blockings-bsc-1.patch +++ b/calculate-fqdns-in-parallel-to-avoid-blockings-bsc-1.patch @@ -1,8 +1,9 @@ -From 722b9395a6489da7626e6a388c78bf8e8812190e Mon Sep 17 00:00:00 2001 +From e27ccce1429fa604137df35d8dabbc8016c2b5c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Fri, 12 Apr 2019 16:47:03 +0100 -Subject: [PATCH] Calculate FQDNs in parallel to avoid blockings (bsc#1129079) +Subject: [PATCH] Calculate FQDNs in parallel to avoid blockings + (bsc#1129079) Fix pylint issue --- @@ -10,10 +11,10 @@ Fix pylint issue 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/salt/grains/core.py b/salt/grains/core.py -index 05a9d5035d..796458939d 100644 +index 7d75d48bb5..ac66a437fd 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py -@@ -20,11 +20,14 @@ import platform +@@ -20,12 +20,15 @@ import platform import logging import locale import uuid @@ -22,13 +23,14 @@ index 05a9d5035d..796458939d 100644 from errno import EACCES, EPERM import datetime import warnings + import time +from multiprocessing.dummy import Pool as ThreadPool + # pylint: disable=import-error try: import dateutil.tz -@@ -2200,13 +2203,10 @@ def fqdns(): +@@ -2255,13 +2258,10 @@ def fqdns(): grains = {} fqdns = set() @@ -44,9 +46,9 @@ index 05a9d5035d..796458939d 100644 except socket.herror as err: if err.errno == 0: # No FQDN for this IP address, so we don't need to know this all the time. -@@ -2216,6 +2216,27 @@ def fqdns(): +@@ -2271,6 +2271,27 @@ def fqdns(): except (socket.error, socket.gaierror, socket.timeout) as err: - log.error(err_message, err) + log.error(err_message, ip, err) + start = time.time() + @@ -73,5 +75,6 @@ index 05a9d5035d..796458939d 100644 -- -2.17.1 +2.16.4 + diff --git a/checking-for-jid-before-returning-data.patch b/checking-for-jid-before-returning-data.patch index 25d8bd5..94e419f 100644 --- a/checking-for-jid-before-returning-data.patch +++ b/checking-for-jid-before-returning-data.patch @@ -1,4 +1,4 @@ -From 8ced9cdeb53e7dc20a1665ba2e373fbdc5d30c5d Mon Sep 17 00:00:00 2001 +From d1e016a5deb8f79adc8473b02171b5661cb93ea8 Mon Sep 17 00:00:00 2001 From: Jochen Breuer Date: Tue, 9 Apr 2019 16:32:46 +0200 Subject: [PATCH] Checking for jid before returning data @@ -30,6 +30,6 @@ index 8b37422cbf..aff354a021 100644 # Ignore other erroneous messages continue -- -2.22.0 +2.16.4 diff --git a/debian-info_installed-compatibility-50453.patch b/debian-info_installed-compatibility-50453.patch index d29223c..925eb13 100644 --- a/debian-info_installed-compatibility-50453.patch +++ b/debian-info_installed-compatibility-50453.patch @@ -1,4 +1,4 @@ -From afdfd35222223d81c304854b5ae7af60f3820ed3 Mon Sep 17 00:00:00 2001 +From f7ae2b3ebe7d78ca60ada7fd2bb30f3cdbd75427 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Tue, 20 Nov 2018 16:06:31 +0100 Subject: [PATCH] Debian info_installed compatibility (#50453) @@ -49,10 +49,10 @@ Adjust architecture getter according to the lowpkg info Fix wrong Git merge: missing function signature --- - salt/modules/aptpkg.py | 20 +++- - salt/modules/dpkg_lowpkg.py | 93 +++++++++++++-- - tests/unit/modules/test_aptpkg.py | 151 ++++++++++++++++--------- - tests/unit/modules/test_dpkg_lowpkg.py | 69 +++++++++++ + salt/modules/aptpkg.py | 20 ++++- + salt/modules/dpkg_lowpkg.py | 93 +++++++++++++++++--- + tests/unit/modules/test_aptpkg.py | 151 +++++++++++++++++++++------------ + tests/unit/modules/test_dpkg_lowpkg.py | 69 +++++++++++++++ 4 files changed, 267 insertions(+), 66 deletions(-) diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py @@ -588,6 +588,6 @@ index bdcb7eec89..d16ce3cc1a 100644 + assert ret['emacs']['license'] == 'BSD v3' + assert ret['emacs']['version'] == '46.1' -- -2.20.1 +2.16.4 diff --git a/decide-if-the-source-should-be-actually-skipped.patch b/decide-if-the-source-should-be-actually-skipped.patch index 815788a..d25756f 100644 --- a/decide-if-the-source-should-be-actually-skipped.patch +++ b/decide-if-the-source-should-be-actually-skipped.patch @@ -1,4 +1,4 @@ -From 5eacdf8fef35cdd05cae1b65485b3f820c86bc68 Mon Sep 17 00:00:00 2001 +From 263c8c98a5601179a53c00523a1579883e705f1f Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Tue, 4 Dec 2018 16:39:08 +0100 Subject: [PATCH] Decide if the source should be actually skipped @@ -8,10 +8,10 @@ Subject: [PATCH] Decide if the source should be actually skipped 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py -index dc27903230..42d606926f 100644 +index 64620647c2..4a331444c9 100644 --- a/salt/modules/aptpkg.py +++ b/salt/modules/aptpkg.py -@@ -1698,6 +1698,27 @@ def list_repo_pkgs(*args, **kwargs): # pylint: disable=unused-import +@@ -1574,6 +1574,27 @@ def list_repo_pkgs(*args, **kwargs): # pylint: disable=unused-import return ret @@ -39,7 +39,7 @@ index dc27903230..42d606926f 100644 def list_repos(): ''' Lists all repos in the sources.list (and sources.lists.d) files -@@ -1713,7 +1734,7 @@ def list_repos(): +@@ -1589,7 +1610,7 @@ def list_repos(): repos = {} sources = sourceslist.SourcesList() for source in sources.list: @@ -49,6 +49,6 @@ index dc27903230..42d606926f 100644 repo = {} repo['file'] = source.file -- -2.20.1 +2.16.4 diff --git a/do-not-break-repo-files-with-multiple-line-values-on.patch b/do-not-break-repo-files-with-multiple-line-values-on.patch index 179dced..f90f8e6 100644 --- a/do-not-break-repo-files-with-multiple-line-values-on.patch +++ b/do-not-break-repo-files-with-multiple-line-values-on.patch @@ -1,4 +1,4 @@ -From b99e55aab52d086315d54cf44af68f40dcf79dc9 Mon Sep 17 00:00:00 2001 +From a8f289c4eb03c051d8ffc60eed28985f3b49d921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Wed, 29 May 2019 11:03:16 +0100 @@ -6,8 +6,8 @@ Subject: [PATCH] Do not break repo files with multiple line values on yumpkg (bsc#1135360) --- - salt/modules/yumpkg.py | 16 ++++++--- - tests/integration/modules/test_pkg.py | 48 +++++++++++++++++++++++++++ + salt/modules/yumpkg.py | 16 +++++++++--- + tests/integration/modules/test_pkg.py | 48 +++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 4 deletions(-) diff --git a/salt/modules/yumpkg.py b/salt/modules/yumpkg.py @@ -47,10 +47,10 @@ index 5ec3835574..3a4fe47a45 100644 content += comments + '\n' diff --git a/tests/integration/modules/test_pkg.py b/tests/integration/modules/test_pkg.py -index 0271cea81f..a82c9662c7 100644 +index 66ac3cfb61..7204428eca 100644 --- a/tests/integration/modules/test_pkg.py +++ b/tests/integration/modules/test_pkg.py -@@ -123,6 +123,54 @@ class PkgModuleTest(ModuleCase, SaltReturnAssertsMixin): +@@ -136,6 +136,54 @@ class PkgModuleTest(ModuleCase, SaltReturnAssertsMixin): if repo is not None: self.run_function('pkg.del_repo', [repo]) @@ -106,6 +106,6 @@ index 0271cea81f..a82c9662c7 100644 def test_owner(self): ''' -- -2.21.0 +2.16.4 diff --git a/do-not-crash-when-there-are-ipv6-established-connect.patch b/do-not-crash-when-there-are-ipv6-established-connect.patch index 721530d..4ad9713 100644 --- a/do-not-crash-when-there-are-ipv6-established-connect.patch +++ b/do-not-crash-when-there-are-ipv6-established-connect.patch @@ -1,4 +1,4 @@ -From f185eabfb4b529157cf7464b32beebeb8b944310 Mon Sep 17 00:00:00 2001 +From c6c8ce93bb0be6fe22fb5d65517a002595a9eb7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Tue, 7 May 2019 15:33:51 +0100 @@ -7,12 +7,12 @@ Subject: [PATCH] Do not crash when there are IPv6 established Add unit test for '_netlink_tool_remote_on' --- - salt/utils/network.py | 9 +++++---- + salt/utils/network.py | 5 +++-- tests/unit/utils/test_network.py | 16 ++++++++++++++++ - 2 files changed, 21 insertions(+), 4 deletions(-) + 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/salt/utils/network.py b/salt/utils/network.py -index c72d2aec41..3f0522b9a5 100644 +index a183c9776a..a3fd6e848e 100644 --- a/salt/utils/network.py +++ b/salt/utils/network.py @@ -1457,7 +1457,7 @@ def _parse_tcp_line(line): @@ -32,16 +32,7 @@ index c72d2aec41..3f0522b9a5 100644 ''' remotes = set() valid = False -@@ -1486,14 +1487,14 @@ def _netlink_tool_remote_on(port, which_end): - elif 'ESTAB' not in line: - continue - chunks = line.split() -- local_host, local_port = chunks[3].split(':', 1) -- remote_host, remote_port = chunks[4].split(':', 1) -+ local_host, local_port = chunks[3].rsplit(':', 1) -+ remote_host, remote_port = chunks[4].rsplit(':', 1) - - if which_end == 'remote_port' and int(remote_port) != port: +@@ -1493,7 +1494,7 @@ def _netlink_tool_remote_on(port, which_end): continue if which_end == 'local_port' and int(local_port) != port: continue @@ -51,11 +42,11 @@ index c72d2aec41..3f0522b9a5 100644 if valid is False: remotes = None diff --git a/tests/unit/utils/test_network.py b/tests/unit/utils/test_network.py -index ca627777a7..ecf7d7c45b 100644 +index f4c849d124..06e3aea6ea 100644 --- a/tests/unit/utils/test_network.py +++ b/tests/unit/utils/test_network.py -@@ -120,6 +120,14 @@ USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS - salt-master python2.781106 35 tcp4 127.0.0.1:61115 127.0.0.1:4506 +@@ -128,6 +128,14 @@ ESTAB 0 0 127.0.0.1:56726 127.0. + ESTAB 0 0 ::ffff:1.2.3.4:5678 ::ffff:1.2.3.4:4505 ''' +LINUX_NETLINK_SS_OUTPUT = '''\ @@ -69,7 +60,7 @@ index ca627777a7..ecf7d7c45b 100644 IPV4_SUBNETS = {True: ('10.10.0.0/24',), False: ('10.10.0.0', '10.10.0.0/33', 'FOO', 9, '0.9.800.1000/24')} IPV6_SUBNETS = {True: ('::1/128',), -@@ -453,6 +461,14 @@ class NetworkTestCase(TestCase): +@@ -491,6 +499,14 @@ class NetworkTestCase(TestCase): remotes = network._freebsd_remotes_on('4506', 'remote') self.assertEqual(remotes, set(['127.0.0.1'])) @@ -85,6 +76,6 @@ index ca627777a7..ecf7d7c45b 100644 ''' Test if minion IDs are distinct in the pool. -- -2.17.1 +2.16.4 diff --git a/do-not-load-pip-state-if-there-is-no-3rd-party-depen.patch b/do-not-load-pip-state-if-there-is-no-3rd-party-depen.patch index a8a1f2f..09019a6 100644 --- a/do-not-load-pip-state-if-there-is-no-3rd-party-depen.patch +++ b/do-not-load-pip-state-if-there-is-no-3rd-party-depen.patch @@ -1,4 +1,4 @@ -From ab7d69b3438c719f7ad6b4b346e56556e8a7bd10 Mon Sep 17 00:00:00 2001 +From 016e0c30718dac2a144090f82a2c35d5ce13bb8c Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Fri, 21 Sep 2018 17:31:39 +0200 Subject: [PATCH] Do not load pip state if there is no 3rd party @@ -40,6 +40,6 @@ index eac40c719c..988ae695a7 100644 def _clear_context(bin_env=None): -- -2.17.1 +2.16.4 diff --git a/do-not-make-ansiblegate-to-crash-on-python3-minions.patch b/do-not-make-ansiblegate-to-crash-on-python3-minions.patch index 1249f63..bcd99dc 100644 --- a/do-not-make-ansiblegate-to-crash-on-python3-minions.patch +++ b/do-not-make-ansiblegate-to-crash-on-python3-minions.patch @@ -1,4 +1,4 @@ -From 189a19b6e8d28cc49e5ad5f2a683e1dfdce66a86 Mon Sep 17 00:00:00 2001 +From ee69f252a71b950377987d7fad3515082e09abff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Fri, 28 Jun 2019 15:17:56 +0100 @@ -10,10 +10,10 @@ Move MockTimedProc implementation to tests.support.mock Add unit test for ansible caller --- - salt/modules/ansiblegate.py | 14 +++++++-- - tests/support/mock.py | 31 +++++++++++++++++++ - tests/unit/modules/test_ansiblegate.py | 41 ++++++++++++++++++++++++++ - tests/unit/modules/test_cmdmod.py | 34 +-------------------- + salt/modules/ansiblegate.py | 14 +++++++++--- + tests/support/mock.py | 31 +++++++++++++++++++++++++ + tests/unit/modules/test_ansiblegate.py | 41 ++++++++++++++++++++++++++++++++++ + tests/unit/modules/test_cmdmod.py | 34 +--------------------------- 4 files changed, 84 insertions(+), 36 deletions(-) diff --git a/salt/modules/ansiblegate.py b/salt/modules/ansiblegate.py @@ -214,6 +214,6 @@ index 8da672dd22..a20afaca0f 100644 class CMDMODTestCase(TestCase, LoaderModuleMockMixin): ''' -- -2.21.0 +2.16.4 diff --git a/do-not-report-patches-as-installed-when-not-all-the-.patch b/do-not-report-patches-as-installed-when-not-all-the-.patch index 0854c3a..a39c354 100644 --- a/do-not-report-patches-as-installed-when-not-all-the-.patch +++ b/do-not-report-patches-as-installed-when-not-all-the-.patch @@ -1,4 +1,4 @@ -From 769c9e85499bc9912b050fff7d3105690f1d7c7b Mon Sep 17 00:00:00 2001 +From 3c39b7ae5e4a0cd11a77241abde9407a8e1b3f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Wed, 13 Mar 2019 16:14:07 +0000 @@ -40,6 +40,6 @@ index 4f26a41670..5ec3835574 100644 -- -2.20.1 +2.16.4 diff --git a/don-t-call-zypper-with-more-than-one-no-refresh.patch b/don-t-call-zypper-with-more-than-one-no-refresh.patch index f8a3ebe..5b8eec9 100644 --- a/don-t-call-zypper-with-more-than-one-no-refresh.patch +++ b/don-t-call-zypper-with-more-than-one-no-refresh.patch @@ -1,4 +1,4 @@ -From 5e0fe08c6afd75a7d65d6ccd6cf6b4b197fb1064 Mon Sep 17 00:00:00 2001 +From a2e40158ad3b92a20ec9c12f7cd75edb4a01c2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Date: Tue, 29 Jan 2019 09:44:03 +0100 Subject: [PATCH] Don't call zypper with more than one --no-refresh @@ -37,6 +37,6 @@ index f586c23fd0..5c5091a570 100644 self.assertEqual(sniffer.calls[0]['args'][0], ['zypper', '--non-interactive', '--no-refresh', 'foo']) self.assertEqual(sniffer.calls[1]['args'][0], ['zypper', '--non-interactive', '--no-refresh', 'bar']) -- -2.20.1 +2.16.4 diff --git a/early-feature-support-config.patch b/early-feature-support-config.patch index 39bf87f..7bd25fa 100644 --- a/early-feature-support-config.patch +++ b/early-feature-support-config.patch @@ -1,4 +1,4 @@ -From 7c72c080c6b47cccecdf058cfe1be8f465d568a6 Mon Sep 17 00:00:00 2001 +From 0e4ac6001d552e649f8ab9d6c04b18bd531e4240 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Tue, 10 Jul 2018 12:06:33 +0200 Subject: [PATCH] early feature: support-config @@ -291,24 +291,24 @@ Remove development stub. Ughh... Removed blacklist of pkg_resources --- - salt/cli/support/__init__.py | 65 +++ - salt/cli/support/collector.py | 495 ++++++++++++++++++++++ - salt/cli/support/console.py | 165 ++++++++ - salt/cli/support/intfunc.py | 42 ++ + salt/cli/support/__init__.py | 65 ++++ + salt/cli/support/collector.py | 495 ++++++++++++++++++++++++++++++ + salt/cli/support/console.py | 165 ++++++++++ + salt/cli/support/intfunc.py | 42 +++ salt/cli/support/localrunner.py | 34 ++ - salt/cli/support/profiles/default.yml | 71 ++++ + salt/cli/support/profiles/default.yml | 71 +++++ salt/cli/support/profiles/jobs-active.yml | 3 + salt/cli/support/profiles/jobs-last.yml | 3 + salt/cli/support/profiles/jobs-trace.yml | 7 + salt/cli/support/profiles/network.yml | 27 ++ salt/cli/support/profiles/postgres.yml | 11 + salt/cli/support/profiles/salt.yml | 9 + - salt/cli/support/profiles/users.yml | 22 + + salt/cli/support/profiles/users.yml | 22 ++ salt/scripts.py | 14 + - salt/utils/parsers.py | 65 +++ + salt/utils/parsers.py | 65 ++++ scripts/salt-support | 11 + setup.py | 2 + - tests/unit/cli/test_support.py | 477 +++++++++++++++++++++ + tests/unit/cli/test_support.py | 477 ++++++++++++++++++++++++++++ 18 files changed, 1523 insertions(+) create mode 100644 salt/cli/support/__init__.py create mode 100644 salt/cli/support/collector.py @@ -1359,10 +1359,10 @@ index 0000000000..391acdb606 + info: List of all available groups + output: table diff --git a/salt/scripts.py b/salt/scripts.py -index e677368a0f..7a1b4bb133 100644 +index 71120366e0..c789df4e39 100644 --- a/salt/scripts.py +++ b/salt/scripts.py -@@ -508,3 +508,17 @@ def salt_extend(extension, name, description, salt_dir, merge): +@@ -539,3 +539,17 @@ def salt_extend(extension, name, description, salt_dir, merge): description=description, salt_dir=salt_dir, merge=merge) @@ -1381,7 +1381,7 @@ index e677368a0f..7a1b4bb133 100644 + _install_signal_handlers(client) + client.run() diff --git a/salt/utils/parsers.py b/salt/utils/parsers.py -index 9a7f27ac11..56a8961c3a 100644 +index 1e652a845e..aa13310d5a 100644 --- a/salt/utils/parsers.py +++ b/salt/utils/parsers.py @@ -20,6 +20,7 @@ import getpass @@ -1400,7 +1400,7 @@ index 9a7f27ac11..56a8961c3a 100644 import salt.utils.platform import salt.utils.process import salt.utils.stringutils -@@ -1863,6 +1865,69 @@ class SyndicOptionParser(six.with_metaclass(OptionParserMeta, +@@ -1902,6 +1904,69 @@ class SyndicOptionParser(six.with_metaclass(OptionParserMeta, self.get_config_file_path('minion')) @@ -1488,18 +1488,18 @@ index 0000000000..48ce141c67 +if __name__ == '__main__': + salt_support() diff --git a/setup.py b/setup.py -index 0841c93553..8d0dcaa4b8 100755 +index 3e930df8db..25e06a42f6 100755 --- a/setup.py +++ b/setup.py -@@ -1015,6 +1015,7 @@ class SaltDistribution(distutils.dist.Distribution): - 'scripts/salt-key', +@@ -1051,6 +1051,7 @@ class SaltDistribution(distutils.dist.Distribution): 'scripts/salt-master', 'scripts/salt-minion', + 'scripts/salt-proxy', + 'scripts/salt-support', 'scripts/salt-ssh', 'scripts/salt-syndic', 'scripts/salt-unity', -@@ -1052,6 +1053,7 @@ class SaltDistribution(distutils.dist.Distribution): +@@ -1086,6 +1087,7 @@ class SaltDistribution(distutils.dist.Distribution): 'salt-key = salt.scripts:salt_key', 'salt-master = salt.scripts:salt_master', 'salt-minion = salt.scripts:salt_minion', @@ -1991,6 +1991,6 @@ index 0000000000..85ea957d79 + assert jobs_trace['jobs-details'][0]['run:jobs.list_job']['info'] == 'Details on JID 0000' + assert jobs_trace['jobs-details'][0]['run:jobs.list_job']['args'] == [0] -- -2.17.1 +2.16.4 diff --git a/enable-passing-a-unix_socket-for-mysql-returners-bsc.patch b/enable-passing-a-unix_socket-for-mysql-returners-bsc.patch index a9d6b69..4003199 100644 --- a/enable-passing-a-unix_socket-for-mysql-returners-bsc.patch +++ b/enable-passing-a-unix_socket-for-mysql-returners-bsc.patch @@ -1,4 +1,4 @@ -From d937d1edb837bc084c1eaa320e8433382135e2d9 Mon Sep 17 00:00:00 2001 +From 7482f815a80c2c789bc09e2c72c522e6eb091fa3 Mon Sep 17 00:00:00 2001 From: Maximilian Meister Date: Thu, 3 May 2018 15:52:23 +0200 Subject: [PATCH] enable passing a unix_socket for mysql returners @@ -19,7 +19,7 @@ Signed-off-by: Maximilian Meister 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/salt/returners/mysql.py b/salt/returners/mysql.py -index 85892cb06c..a286731d5c 100644 +index fbaaacfe0d..06b249e664 100644 --- a/salt/returners/mysql.py +++ b/salt/returners/mysql.py @@ -18,6 +18,7 @@ config. These are the defaults: @@ -69,6 +69,6 @@ index 85892cb06c..a286731d5c 100644 try: __context__['mysql_returner_conn'] = conn -- -2.13.7 +2.16.4 diff --git a/fall-back-to-pymysql.patch b/fall-back-to-pymysql.patch index 784bc24..4e43100 100644 --- a/fall-back-to-pymysql.patch +++ b/fall-back-to-pymysql.patch @@ -1,4 +1,4 @@ -From d3b2f157643845d2659a226ba72ce24ce1d2a73d Mon Sep 17 00:00:00 2001 +From 37a3628e3a3cd2d1f18e7834a151efab21b10433 Mon Sep 17 00:00:00 2001 From: Maximilian Meister Date: Thu, 5 Apr 2018 13:23:23 +0200 Subject: [PATCH] fall back to PyMySQL @@ -11,7 +11,7 @@ Signed-off-by: Maximilian Meister 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/modules/mysql.py b/salt/modules/mysql.py -index de8916f4f2..64c773f40a 100644 +index 94f4b4acce..7e8e6026b3 100644 --- a/salt/modules/mysql.py +++ b/salt/modules/mysql.py @@ -58,7 +58,7 @@ try: @@ -33,6 +33,6 @@ index de8916f4f2..64c773f40a 100644 MySQLdb = None -- -2.17.1 +2.16.4 diff --git a/fix-a-wrong-rebase-in-test_core.py-180.patch b/fix-a-wrong-rebase-in-test_core.py-180.patch index 9bb019e..dc940f3 100644 --- a/fix-a-wrong-rebase-in-test_core.py-180.patch +++ b/fix-a-wrong-rebase-in-test_core.py-180.patch @@ -1,4 +1,4 @@ -From 329f90fcde205237545cd623f55f0f6c228bf893 Mon Sep 17 00:00:00 2001 +From 3812df3a2776e745160ef406dae85aa8acdf2333 Mon Sep 17 00:00:00 2001 From: Alberto Planas Date: Fri, 25 Oct 2019 15:43:16 +0200 Subject: [PATCH] Fix a wrong rebase in test_core.py (#180) @@ -17,15 +17,15 @@ This patch ignore this kind of issue during the grains creation. (cherry picked from commit bd0213bae00b737b24795bec3c030ebfe476e0d8) --- - salt/grains/core.py | 4 +-- - tests/unit/grains/test_core.py | 45 ---------------------------------- + salt/grains/core.py | 4 ++-- + tests/unit/grains/test_core.py | 45 ------------------------------------------ 2 files changed, 2 insertions(+), 47 deletions(-) diff --git a/salt/grains/core.py b/salt/grains/core.py -index fdabe484a8..bf54c54553 100644 +index 6b1f2d2223..31ed8a77aa 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py -@@ -989,7 +989,7 @@ def _virtual(osdata): +@@ -990,7 +990,7 @@ def _virtual(osdata): except UnicodeDecodeError: # Some firmwares provide non-valid 'product_name' # files, ignore them @@ -34,7 +34,7 @@ index fdabe484a8..bf54c54553 100644 except IOError: pass elif osdata['kernel'] == 'FreeBSD': -@@ -2490,7 +2490,7 @@ def _hw_data(osdata): +@@ -2545,7 +2545,7 @@ def _hw_data(osdata): except UnicodeDecodeError: # Some firmwares provide non-valid 'product_name' # files, ignore them @@ -44,10 +44,10 @@ index fdabe484a8..bf54c54553 100644 # PermissionError is new to Python 3, but corresponds to the EACESS and # EPERM error numbers. Use those instead here for PY2 compatibility. diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py -index aa04a7a7ac..889fb90074 100644 +index 7153a078f4..09e197a2e4 100644 --- a/tests/unit/grains/test_core.py +++ b/tests/unit/grains/test_core.py -@@ -1117,51 +1117,6 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): +@@ -1317,51 +1317,6 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): 'uuid': '' }) @@ -100,6 +100,6 @@ index aa04a7a7ac..889fb90074 100644 @skipIf(six.PY2, 'UnicodeDecodeError is throw in Python 3') @patch('os.path.exists') -- -2.23.0 +2.16.4 diff --git a/fix-aptpkg-systemd-call-bsc-1143301.patch b/fix-aptpkg-systemd-call-bsc-1143301.patch index 440a054..604e33d 100644 --- a/fix-aptpkg-systemd-call-bsc-1143301.patch +++ b/fix-aptpkg-systemd-call-bsc-1143301.patch @@ -1,4 +1,4 @@ -From f667d6f0534498e2aaa6e46242727bafc13241fd Mon Sep 17 00:00:00 2001 +From db65ebf356238c151af7798ed34684847ed4a5c0 Mon Sep 17 00:00:00 2001 From: Mihai Dinca Date: Wed, 31 Jul 2019 15:29:03 +0200 Subject: [PATCH] Fix aptpkg systemd call (bsc#1143301) @@ -35,6 +35,6 @@ index 580b840197..06f3a9f6aa 100644 def test_call_apt_with_kwargs(self): -- -2.22.0 +2.16.4 diff --git a/fix-async-batch-multiple-done-events.patch b/fix-async-batch-multiple-done-events.patch index f399bff..25fad70 100644 --- a/fix-async-batch-multiple-done-events.patch +++ b/fix-async-batch-multiple-done-events.patch @@ -1,4 +1,4 @@ -From 2dcee9c2773f588cc5ca040b1d22c1e8036dcbf7 Mon Sep 17 00:00:00 2001 +From 2fe38d075efce89dd94c1088ab8c97656e589c8f Mon Sep 17 00:00:00 2001 From: Mihai Dinca Date: Tue, 7 May 2019 12:24:35 +0200 Subject: [PATCH] Fix async-batch multiple done events @@ -133,6 +133,6 @@ index d519157d92..441f9c58b9 100644 + self.batch.schedule_next() + self.assertEqual(len(self.batch.event.io_loop.call_later.mock_calls), 0) -- -2.21.0 +2.16.4 diff --git a/fix-async-batch-race-conditions.patch b/fix-async-batch-race-conditions.patch index 6be04b5..ee25943 100644 --- a/fix-async-batch-race-conditions.patch +++ b/fix-async-batch-race-conditions.patch @@ -1,12 +1,12 @@ -From 33c5e10c2912f584243d29c764c2c6cca86edf4a Mon Sep 17 00:00:00 2001 +From 2c1311f544950fe417fb8609aa3a30da32656637 Mon Sep 17 00:00:00 2001 From: Mihai Dinca Date: Thu, 11 Apr 2019 15:57:59 +0200 Subject: [PATCH] Fix async batch race conditions Close batching when there is no next batch --- - salt/cli/batch_async.py | 80 +++++++++++++++--------------- - tests/unit/cli/test_batch_async.py | 35 ++++++------- + salt/cli/batch_async.py | 80 +++++++++++++++++++------------------- + tests/unit/cli/test_batch_async.py | 35 +++++++---------- 2 files changed, 54 insertions(+), 61 deletions(-) diff --git a/salt/cli/batch_async.py b/salt/cli/batch_async.py @@ -248,6 +248,6 @@ index f65b6a06c3..d519157d92 100644 @tornado.testing.gen_test -- -2.20.1 +2.16.4 diff --git a/fix-bsc-1065792.patch b/fix-bsc-1065792.patch index 1c71aa1..cca1881 100644 --- a/fix-bsc-1065792.patch +++ b/fix-bsc-1065792.patch @@ -1,4 +1,4 @@ -From 30a4053231cf67f486ca1f430dce563f7247d963 Mon Sep 17 00:00:00 2001 +From bff330bce4b6e8a848400417c5858ece1dc7b5cf Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Thu, 14 Dec 2017 16:21:40 +0100 Subject: [PATCH] Fix bsc#1065792 @@ -8,7 +8,7 @@ Subject: [PATCH] Fix bsc#1065792 1 file changed, 1 insertion(+) diff --git a/salt/states/service.py b/salt/states/service.py -index c5bf3f2d54..a5ec426ec4 100644 +index a0e553ead9..1fdcf126ff 100644 --- a/salt/states/service.py +++ b/salt/states/service.py @@ -80,6 +80,7 @@ def __virtual__(): @@ -20,6 +20,6 @@ index c5bf3f2d54..a5ec426ec4 100644 return __virtualname__ else: -- -2.13.7 +2.16.4 diff --git a/fix-failing-unit-tests-for-batch-async.patch b/fix-failing-unit-tests-for-batch-async.patch index c4b335f..b621600 100644 --- a/fix-failing-unit-tests-for-batch-async.patch +++ b/fix-failing-unit-tests-for-batch-async.patch @@ -1,4 +1,4 @@ -From 8378bb24a5a53973e8dba7658b8b3465d967329f Mon Sep 17 00:00:00 2001 +From 927cef6dfa547bf2410740a8c8b41a97492510f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Fri, 4 Oct 2019 15:00:50 +0100 @@ -6,7 +6,7 @@ Subject: [PATCH] Fix failing unit tests for batch async --- salt/cli/batch_async.py | 2 +- - tests/unit/cli/test_batch_async.py | 57 +++++++++++++++++------------- + tests/unit/cli/test_batch_async.py | 57 ++++++++++++++++++++++---------------- 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/salt/cli/batch_async.py b/salt/cli/batch_async.py @@ -180,6 +180,6 @@ index 441f9c58b9..12dfe543bc 100644 - self.assertEqual(len(self.batch.event.io_loop.call_later.mock_calls), 0) + self.assertEqual(len(self.batch.event.io_loop.spawn_callback.mock_calls), 0) -- -2.22.0 +2.16.4 diff --git a/fix-for-log-checking-in-x509-test.patch b/fix-for-log-checking-in-x509-test.patch new file mode 100644 index 0000000..7a96246 --- /dev/null +++ b/fix-for-log-checking-in-x509-test.patch @@ -0,0 +1,31 @@ +From f114484307a2b8a3cf72bef28febe44e73b498ed Mon Sep 17 00:00:00 2001 +From: Jochen Breuer +Date: Thu, 28 Nov 2019 15:23:36 +0100 +Subject: [PATCH] Fix for log checking in x509 test + +We are logging in debug and not in trace mode here. +--- + tests/unit/modules/test_x509.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/unit/modules/test_x509.py b/tests/unit/modules/test_x509.py +index 7030f96484..143abe82bf 100644 +--- a/tests/unit/modules/test_x509.py ++++ b/tests/unit/modules/test_x509.py +@@ -71,9 +71,9 @@ class X509TestCase(TestCase, LoaderModuleMockMixin): + + subj = FakeSubject() + x509._parse_subject(subj) +- assert x509.log.trace.call_args[0][0] == "Missing attribute '%s'. Error: %s" +- assert x509.log.trace.call_args[0][1] == list(subj.nid.keys())[0] +- assert isinstance(x509.log.trace.call_args[0][2], TypeError) ++ assert x509.log.debug.call_args[0][0] == "Missing attribute '%s'. Error: %s" ++ assert x509.log.debug.call_args[0][1] == list(subj.nid.keys())[0] ++ assert isinstance(x509.log.debug.call_args[0][2], TypeError) + + @skipIf(not HAS_M2CRYPTO, 'Skipping, M2Crypto is unavailble') + def test_get_pem_entry(self): +-- +2.16.4 + + diff --git a/fix-for-older-mock-module.patch b/fix-for-older-mock-module.patch index 01d5f73..6eb0c0a 100644 --- a/fix-for-older-mock-module.patch +++ b/fix-for-older-mock-module.patch @@ -1,4 +1,4 @@ -From 7e4c53ab89927b6b700603a74131da318c93b957 Mon Sep 17 00:00:00 2001 +From 56dde3e54715bd488e4110955ca066d9661512bf Mon Sep 17 00:00:00 2001 From: Jochen Breuer Date: Fri, 25 Oct 2019 16:18:58 +0200 Subject: [PATCH] Fix for older mock module diff --git a/fix-for-suse-expanded-support-detection.patch b/fix-for-suse-expanded-support-detection.patch index 5b08d54..51b2033 100644 --- a/fix-for-suse-expanded-support-detection.patch +++ b/fix-for-suse-expanded-support-detection.patch @@ -1,4 +1,4 @@ -From 616750ad4b2b2b8d55d19b81500dbd4f0aba1f74 Mon Sep 17 00:00:00 2001 +From 0c16dd5a3c7bef0fe980ac8517f099a8e034c6c9 Mon Sep 17 00:00:00 2001 From: Jochen Breuer Date: Thu, 6 Sep 2018 17:15:18 +0200 Subject: [PATCH] Fix for SUSE Expanded Support detection @@ -14,10 +14,10 @@ This change also adds a check for redhat-release and then marks the 1 file changed, 9 insertions(+) diff --git a/salt/grains/core.py b/salt/grains/core.py -index f0f1bd17c4..b2c1d475b0 100644 +index 04c1ae91b5..82cd3fb657 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py -@@ -1821,6 +1821,15 @@ def os_data(): +@@ -1873,6 +1873,15 @@ def os_data(): log.trace('Parsing distrib info from /etc/centos-release') # CentOS Linux grains['lsb_distrib_id'] = 'CentOS' @@ -34,6 +34,6 @@ index f0f1bd17c4..b2c1d475b0 100644 for line in ifile: # Need to pull out the version and codename -- -2.17.1 +2.16.4 diff --git a/fix-git_pillar-merging-across-multiple-__env__-repos.patch b/fix-git_pillar-merging-across-multiple-__env__-repos.patch index fc2378c..7ea6e8a 100644 --- a/fix-git_pillar-merging-across-multiple-__env__-repos.patch +++ b/fix-git_pillar-merging-across-multiple-__env__-repos.patch @@ -1,4 +1,4 @@ -From 6747243babde058762428f9bdb0e3ef16402eadd Mon Sep 17 00:00:00 2001 +From 31b9186f48ac37e2b814b8db61ec1d5a5868659f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Tue, 6 Nov 2018 16:38:54 +0000 @@ -11,14 +11,14 @@ Test git ext_pillar across multiple repos using __env__ Remove unicode references --- - tests/integration/pillar/test_git_pillar.py | 45 +++++++++++++++++++++ + tests/integration/pillar/test_git_pillar.py | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/tests/integration/pillar/test_git_pillar.py b/tests/integration/pillar/test_git_pillar.py -index 5d9a374f6e..4a9553d1a1 100644 +index 9ade88840b..ab3b1a89cf 100644 --- a/tests/integration/pillar/test_git_pillar.py +++ b/tests/integration/pillar/test_git_pillar.py -@@ -1361,6 +1361,51 @@ class TestPygit2SSH(GitPillarSSHTestBase): +@@ -1388,6 +1388,51 @@ class TestPygit2SSH(GitPillarSSHTestBase): 'nested_dict': {'master': True}}} ) @@ -71,6 +71,6 @@ index 5d9a374f6e..4a9553d1a1 100644 def test_root_parameter(self, grains): ''' -- -2.17.1 +2.16.4 diff --git a/fix-ipv6-scope-bsc-1108557.patch b/fix-ipv6-scope-bsc-1108557.patch index 58715cb..28e2119 100644 --- a/fix-ipv6-scope-bsc-1108557.patch +++ b/fix-ipv6-scope-bsc-1108557.patch @@ -1,4 +1,4 @@ -From b6d47a2ca7f1bed902dfc6574e6fe91d3034aa29 Mon Sep 17 00:00:00 2001 +From 682964fe1cb3fc859eb72da524beaeb2a85ff610 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Fri, 28 Sep 2018 15:22:33 +0200 Subject: [PATCH] Fix IPv6 scope (bsc#1108557) @@ -69,11 +69,11 @@ Lintfix: W0611 Reverse skipping tests: if no ipaddress --- - salt/_compat.py | 74 +++++++++++++++++++++++++++++++++++++++++++++++++ + salt/_compat.py | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/salt/_compat.py b/salt/_compat.py -index c10b82c0c2..8628833dcf 100644 +index ed6f4a38ea..61842b4bf3 100644 --- a/salt/_compat.py +++ b/salt/_compat.py @@ -229,7 +229,81 @@ class IPv6InterfaceScoped(ipaddress.IPv6Interface, IPv6AddressScoped): @@ -159,6 +159,6 @@ index c10b82c0c2..8628833dcf 100644 + ipaddress.ip_address = ip_address + ipaddress.ip_interface = ip_interface -- -2.20.1 +2.16.4 diff --git a/fix-issue-2068-test.patch b/fix-issue-2068-test.patch index 00cb130..2d6b81d 100644 --- a/fix-issue-2068-test.patch +++ b/fix-issue-2068-test.patch @@ -1,4 +1,4 @@ -From 3be2bb0043f15af468f1db33b1aa1cc6f2e5797d Mon Sep 17 00:00:00 2001 +From f81e6022b51b10406e52401fc75d7ef1ae93c55d Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Wed, 9 Jan 2019 16:08:19 +0100 Subject: [PATCH] Fix issue #2068 test @@ -13,7 +13,7 @@ Minor update: more correct is-dict check. 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/salt/state.py b/salt/state.py -index 91985c8edc..01ec1faf8b 100644 +index c3119b6a33..6af1b89037 100644 --- a/salt/state.py +++ b/salt/state.py @@ -25,6 +25,7 @@ import traceback @@ -47,6 +47,6 @@ index 91985c8edc..01ec1faf8b 100644 def call_high(self, high, orchestration_jid=None): ''' -- -2.20.1 +2.16.4 diff --git a/fix-memory-leak-produced-by-batch-async-find_jobs-me.patch b/fix-memory-leak-produced-by-batch-async-find_jobs-me.patch index 608f5c3..1ce9570 100644 --- a/fix-memory-leak-produced-by-batch-async-find_jobs-me.patch +++ b/fix-memory-leak-produced-by-batch-async-find_jobs-me.patch @@ -1,4 +1,4 @@ -From 8941de5a64b6330c6a814059e6e337f7ad3aa6cd Mon Sep 17 00:00:00 2001 +From d6432f9ebaba32f75a476a6d4a2989d54d149731 Mon Sep 17 00:00:00 2001 From: Mihai Dinca Date: Mon, 16 Sep 2019 11:27:30 +0200 Subject: [PATCH] Fix memory leak produced by batch async find_jobs @@ -16,7 +16,7 @@ Multiple fixes: Co-authored-by: Pablo Suárez Hernández --- - salt/cli/batch_async.py | 60 +++++++++++++++++++++++++++-------------- + salt/cli/batch_async.py | 60 ++++++++++++++++++++++++++++++++----------------- salt/client/__init__.py | 1 + salt/master.py | 1 - 3 files changed, 41 insertions(+), 21 deletions(-) @@ -165,10 +165,10 @@ index aff354a021..0bb6d2b111 100644 # if kwargs are passed, pack them. diff --git a/salt/master.py b/salt/master.py -index f08c126280..0e4bba0505 100644 +index ee968410f7..224725a1ba 100644 --- a/salt/master.py +++ b/salt/master.py -@@ -2043,7 +2043,6 @@ class ClearFuncs(object): +@@ -2044,7 +2044,6 @@ class ClearFuncs(object): def publish_batch(self, clear_load, minions, missing): batch_load = {} batch_load.update(clear_load) @@ -177,6 +177,6 @@ index f08c126280..0e4bba0505 100644 self.local.opts, functools.partial(self._prep_jid, clear_load, {}), -- -2.23.0 +2.16.4 diff --git a/fix-syndic-start-issue.patch b/fix-syndic-start-issue.patch deleted file mode 100644 index 7447fc9..0000000 --- a/fix-syndic-start-issue.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0b15fe1ecc3ed468714a5a8d84787ab23ac6144e Mon Sep 17 00:00:00 2001 -From: Mihai Dinca -Date: Thu, 2 May 2019 10:50:17 +0200 -Subject: [PATCH] Fix syndic start issue - ---- - salt/utils/event.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/salt/utils/event.py b/salt/utils/event.py -index d2700bd2a0..160cba9bde 100644 ---- a/salt/utils/event.py -+++ b/salt/utils/event.py -@@ -879,7 +879,7 @@ class SaltEvent(object): - self.subscriber.callbacks.add(event_handler) - if not self.subscriber.reading: - # This will handle reconnects -- self.subscriber.read_async() -+ return self.subscriber.read_async() - - def __del__(self): - # skip exceptions in destroy-- since destroy() doesn't cover interpreter --- -2.20.1 - - diff --git a/fix-unit-test-for-grains-core.patch b/fix-unit-test-for-grains-core.patch index 3d3004a..91b030f 100644 --- a/fix-unit-test-for-grains-core.patch +++ b/fix-unit-test-for-grains-core.patch @@ -1,4 +1,4 @@ -From 7ffa39cd80393f2a3ed5cd75793b134b9d939cf9 Mon Sep 17 00:00:00 2001 +From 91a864f7613927e47b9271bf0f947cf96a3bbfbf Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Thu, 11 Oct 2018 16:20:40 +0200 Subject: [PATCH] Fix unit test for grains core @@ -8,10 +8,10 @@ Subject: [PATCH] Fix unit test for grains core 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py -index 2ab32ef41b..4923ee00b0 100644 +index 8c45ee194a..c85225e959 100644 --- a/tests/unit/grains/test_core.py +++ b/tests/unit/grains/test_core.py -@@ -62,11 +62,10 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): +@@ -68,11 +68,10 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): def test_parse_etc_os_release(self, path_isfile_mock): path_isfile_mock.side_effect = lambda x: x == "/usr/lib/os-release" with salt.utils.files.fopen(os.path.join(OS_RELEASE_DIR, "ubuntu-17.10")) as os_release_file: @@ -27,7 +27,7 @@ index 2ab32ef41b..4923ee00b0 100644 self.assertEqual(os_release, { "NAME": "Ubuntu", "VERSION": "17.10 (Artful Aardvark)", -@@ -128,7 +127,7 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): +@@ -134,7 +133,7 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): def test_missing_os_release(self): with patch('salt.utils.files.fopen', mock_open(read_data={})): @@ -35,8 +35,8 @@ index 2ab32ef41b..4923ee00b0 100644 + os_release = core._parse_os_release(['/etc/os-release', '/usr/lib/os-release']) self.assertEqual(os_release, {}) - @skipIf(not salt.utils.platform.is_linux(), 'System is not Linux') + @skipIf(not salt.utils.platform.is_windows(), 'System is not Windows') -- -2.19.0 +2.16.4 diff --git a/fix-virt.full_info-176.patch b/fix-virt.full_info-176.patch index 1b5a016..2623db3 100644 --- a/fix-virt.full_info-176.patch +++ b/fix-virt.full_info-176.patch @@ -1,4 +1,4 @@ -From 4ce0bc544174fdb00482db4653fb4b0ef411e78b Mon Sep 17 00:00:00 2001 +From ab55daa8b642f7b7fde589f971bb078eea098059 Mon Sep 17 00:00:00 2001 From: Cedric Bosdonnat Date: Tue, 3 Sep 2019 15:18:04 +0200 Subject: [PATCH] Fix virt.full_info (#176) @@ -45,7 +45,7 @@ already used like by a running VM. Using the qemu-img -U flag gets it running in all cases. --- salt/modules/virt.py | 10 +- - tests/unit/modules/test_virt.py | 242 +++++++++++++++++--------------- + tests/unit/modules/test_virt.py | 242 +++++++++++++++++++++------------------- 2 files changed, 132 insertions(+), 120 deletions(-) diff --git a/salt/modules/virt.py b/salt/modules/virt.py @@ -369,6 +369,6 @@ index e644e62452..4d20e998d8 100644 + self.assertEqual('5900', graphics['port']) + self.assertEqual('0.0.0.0', graphics['listen']) -- -2.20.1 +2.16.4 diff --git a/fix-zypper-pkg.list_pkgs-expectation-and-dpkg-mockin.patch b/fix-zypper-pkg.list_pkgs-expectation-and-dpkg-mockin.patch index ea5fbe8..7239a2b 100644 --- a/fix-zypper-pkg.list_pkgs-expectation-and-dpkg-mockin.patch +++ b/fix-zypper-pkg.list_pkgs-expectation-and-dpkg-mockin.patch @@ -1,4 +1,4 @@ -From 8c4066c668147b1180c56f39722d2ade78ffd41c Mon Sep 17 00:00:00 2001 +From 10c3c47a4c6ae173e2831d4256b8d8af6b33cf5a Mon Sep 17 00:00:00 2001 From: Mihai Dinca Date: Thu, 13 Jun 2019 17:48:55 +0200 Subject: [PATCH] Fix zypper pkg.list_pkgs expectation and dpkg mocking @@ -52,6 +52,6 @@ index 5c5091a570..a7063e47c6 100644 'release': '1.1', 'arch': 'i586', -- -2.21.0 +2.16.4 diff --git a/fix-zypper.list_pkgs-to-be-aligned-with-pkg-state.patch b/fix-zypper.list_pkgs-to-be-aligned-with-pkg-state.patch index 3f21b30..bb39f3a 100644 --- a/fix-zypper.list_pkgs-to-be-aligned-with-pkg-state.patch +++ b/fix-zypper.list_pkgs-to-be-aligned-with-pkg-state.patch @@ -1,4 +1,4 @@ -From 3b5803d31a93d2f619246d48691f52f6c65d52ee Mon Sep 17 00:00:00 2001 +From 3b85fa4cadc10881f2408e95700f7a6dae35ce21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Mon, 25 Jun 2018 13:06:40 +0100 @@ -53,6 +53,6 @@ index 2034262b23..0aca1e0af8 100644 cver = new_pkgs.get(pkgname) if not cver and pkgname in new_caps: -- -2.17.1 +2.16.4 diff --git a/fixes-cve-2018-15750-cve-2018-15751.patch b/fixes-cve-2018-15750-cve-2018-15751.patch index 063c58d..2213783 100644 --- a/fixes-cve-2018-15750-cve-2018-15751.patch +++ b/fixes-cve-2018-15750-cve-2018-15751.patch @@ -1,4 +1,4 @@ -From b10ca8ee857e14915ac83a8614521495b42b5d2b Mon Sep 17 00:00:00 2001 +From b9185139c688999c10ed90ca96120c6dad597666 Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Fri, 24 Aug 2018 10:35:55 -0500 Subject: [PATCH] Fixes: CVE-2018-15750, CVE-2018-15751 @@ -16,7 +16,7 @@ Update tornado test to correct authentication message 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/salt/netapi/rest_cherrypy/app.py b/salt/netapi/rest_cherrypy/app.py -index 40ee976b25..f9ca908115 100644 +index 82615afb29..d230d822cd 100644 --- a/salt/netapi/rest_cherrypy/app.py +++ b/salt/netapi/rest_cherrypy/app.py @@ -1174,13 +1174,6 @@ class LowDataAdapter(object): @@ -34,10 +34,10 @@ index 40ee976b25..f9ca908115 100644 chunk['client'] = client diff --git a/tests/integration/netapi/rest_tornado/test_app.py b/tests/integration/netapi/rest_tornado/test_app.py -index a6829bdd4f..da96012b41 100644 +index 2c348a679d..40cf1ce580 100644 --- a/tests/integration/netapi/rest_tornado/test_app.py +++ b/tests/integration/netapi/rest_tornado/test_app.py -@@ -240,8 +240,8 @@ class TestSaltAPIHandler(_SaltnadoIntegrationTestCase): +@@ -276,8 +276,8 @@ class TestSaltAPIHandler(_SaltnadoIntegrationTestCase): self.assertIn('jid', ret[0]) # the first 2 are regular returns self.assertIn('jid', ret[1]) self.assertIn('Failed to authenticate', ret[2]) # bad auth @@ -49,6 +49,6 @@ index a6829bdd4f..da96012b41 100644 def test_simple_local_async_post_no_tgt(self): low = [{'client': 'local_async', -- -2.17.1 +2.16.4 diff --git a/get-os_arch-also-without-rpm-package-installed.patch b/get-os_arch-also-without-rpm-package-installed.patch index 5b67b18..7a4b5ff 100644 --- a/get-os_arch-also-without-rpm-package-installed.patch +++ b/get-os_arch-also-without-rpm-package-installed.patch @@ -1,4 +1,4 @@ -From 11c9eacc439697e9fa7b30918963e4736333ed36 Mon Sep 17 00:00:00 2001 +From 9fc2217cd12d313f87d4db0e408e5b68b23c2330 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Wed, 14 Nov 2018 17:36:23 +0100 Subject: [PATCH] Get os_arch also without RPM package installed @@ -17,8 +17,8 @@ Add UT for OS arch detection when no CPU arch or machine can be determined Remove unsupported testcase --- - salt/utils/pkg/rpm.py | 18 ++++-- - tests/unit/utils/test_pkg.py | 105 ++++++++++++++++++++++------------- + salt/utils/pkg/rpm.py | 18 +++++--- + tests/unit/utils/test_pkg.py | 105 ++++++++++++++++++++++++++----------------- 2 files changed, 77 insertions(+), 46 deletions(-) diff --git a/salt/utils/pkg/rpm.py b/salt/utils/pkg/rpm.py @@ -176,6 +176,6 @@ index c293852058..361e0bf92f 100644 + ''' + assert rpm.get_osarch() == 'unknown' -- -2.17.1 +2.16.4 diff --git a/implement-network.fqdns-module-function-bsc-1134860-.patch b/implement-network.fqdns-module-function-bsc-1134860-.patch index 96fe36d..05f0f60 100644 --- a/implement-network.fqdns-module-function-bsc-1134860-.patch +++ b/implement-network.fqdns-module-function-bsc-1134860-.patch @@ -1,4 +1,4 @@ -From 76d0ec5ec0764f6c5e71ddc2dc03bd12c25045a0 Mon Sep 17 00:00:00 2001 +From a94e1316565a30e166a5a846404fd2c2bd85e2ca Mon Sep 17 00:00:00 2001 From: EricS <54029547+ESiebigteroth@users.noreply.github.com> Date: Tue, 3 Sep 2019 11:22:53 +0200 Subject: [PATCH] Implement network.fqdns module function (bsc#1134860) @@ -12,20 +12,20 @@ Subject: [PATCH] Implement network.fqdns module function (bsc#1134860) Co-authored-by: Eric Siebigteroth --- - salt/grains/core.py | 66 +++++----------------------------- - salt/modules/network.py | 60 +++++++++++++++++++++++++++++++ - salt/utils/network.py | 12 +++++++ - tests/unit/grains/test_core.py | 64 ++++++++++++++++++++++++++------- + salt/grains/core.py | 66 +++++------------------------------------- + salt/modules/network.py | 60 ++++++++++++++++++++++++++++++++++++++ + salt/utils/network.py | 12 ++++++++ + tests/unit/grains/test_core.py | 64 +++++++++++++++++++++++++++++++--------- 4 files changed, 131 insertions(+), 71 deletions(-) diff --git a/salt/grains/core.py b/salt/grains/core.py -index e54212edfb..fa188a6ff7 100644 +index 30eba0ce99..e1d08b76cf 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py -@@ -25,8 +25,9 @@ import zlib - from errno import EACCES, EPERM +@@ -26,8 +26,9 @@ from errno import EACCES, EPERM import datetime import warnings + import time +import salt.modules.network -from multiprocessing.pool import ThreadPool @@ -33,7 +33,7 @@ index e54212edfb..fa188a6ff7 100644 # pylint: disable=import-error try: -@@ -83,6 +84,7 @@ __salt__ = { +@@ -84,6 +85,7 @@ __salt__ = { 'cmd.run_all': salt.modules.cmdmod._run_all_quiet, 'smbios.records': salt.modules.smbios.records, 'smbios.get': salt.modules.smbios.get, @@ -41,7 +41,7 @@ index e54212edfb..fa188a6ff7 100644 } log = logging.getLogger(__name__) -@@ -106,7 +108,6 @@ HAS_UNAME = True +@@ -107,7 +109,6 @@ HAS_UNAME = True if not hasattr(os, 'uname'): HAS_UNAME = False @@ -49,7 +49,7 @@ index e54212edfb..fa188a6ff7 100644 # Possible value for h_errno defined in netdb.h HOST_NOT_FOUND = 1 -@@ -1506,17 +1507,6 @@ def _linux_bin_exists(binary): +@@ -1538,17 +1539,6 @@ def _linux_bin_exists(binary): return False @@ -67,7 +67,7 @@ index e54212edfb..fa188a6ff7 100644 def _parse_lsb_release(): ret = {} try: -@@ -2200,52 +2190,12 @@ def fqdns(): +@@ -2255,52 +2245,12 @@ def fqdns(): ''' Return all known FQDNs for the system by enumerating all interfaces and then trying to reverse resolve them (excluding 'lo' interface). @@ -88,9 +88,9 @@ index e54212edfb..fa188a6ff7 100644 - # No FQDN for this IP address, so we don't need to know this all the time. - log.debug("Unable to resolve address %s: %s", ip, err) - else: -- log.error(err_message, err) +- log.error(err_message, ip, err) - except (socket.error, socket.gaierror, socket.timeout) as err: -- log.error(err_message, err) +- log.error(err_message, ip, err) - - start = time.time() - @@ -126,7 +126,7 @@ index e54212edfb..fa188a6ff7 100644 def ip_fqdn(): diff --git a/salt/modules/network.py b/salt/modules/network.py -index 28bcff1622..5b6ac930ea 100644 +index 8b4dfcead4..2f1b1c09e0 100644 --- a/salt/modules/network.py +++ b/salt/modules/network.py @@ -11,6 +11,10 @@ import logging @@ -140,7 +140,7 @@ index 28bcff1622..5b6ac930ea 100644 # Import salt libs import salt.utils.decorators.path -@@ -1881,3 +1885,59 @@ def iphexval(ip): +@@ -1887,3 +1891,59 @@ def iphexval(ip): a = ip.split('.') hexval = ['%02X' % int(x) for x in a] # pylint: disable=E1321 return ''.join(hexval) @@ -202,7 +202,7 @@ index 28bcff1622..5b6ac930ea 100644 + return {"fqdns": sorted(list(fqdns))} \ No newline at end of file diff --git a/salt/utils/network.py b/salt/utils/network.py -index 3f0522b9a5..942adf1ca4 100644 +index a3fd6e848e..3c8178eeb4 100644 --- a/salt/utils/network.py +++ b/salt/utils/network.py @@ -55,6 +55,18 @@ except (ImportError, OSError, AttributeError, TypeError): @@ -225,10 +225,10 @@ index 3f0522b9a5..942adf1ca4 100644 ''' Sanitize host string. diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py -index 5fa0ea06f1..889fb90074 100644 +index af9d27dd0e..09e197a2e4 100644 --- a/tests/unit/grains/test_core.py +++ b/tests/unit/grains/test_core.py -@@ -33,6 +33,7 @@ import salt.utils.network +@@ -34,6 +34,7 @@ import salt.utils.network import salt.utils.platform import salt.utils.path import salt.grains.core as core @@ -236,7 +236,7 @@ index 5fa0ea06f1..889fb90074 100644 # Import 3rd-party libs from salt.ext import six -@@ -845,6 +846,40 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): +@@ -976,6 +977,40 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): with patch.object(salt.utils.dns, 'parse_resolv', MagicMock(return_value=resolv_mock)): assert core.dns() == ret @@ -277,7 +277,7 @@ index 5fa0ea06f1..889fb90074 100644 @skipIf(not salt.utils.platform.is_linux(), 'System is not Linux') @patch.object(salt.utils, 'is_windows', MagicMock(return_value=False)) @patch('salt.utils.network.ip_addrs', MagicMock(return_value=['1.2.3.4', '5.6.7.8'])) -@@ -861,11 +896,12 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): +@@ -992,11 +1027,12 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): ('foo.bar.baz', [], ['fe80::a8b2:93ff:fe00:0']), ('bluesniff.foo.bar', [], ['fe80::a8b2:93ff:dead:beef'])] ret = {'fqdns': ['bluesniff.foo.bar', 'foo.bar.baz', 'rinzler.evil-corp.com']} @@ -295,7 +295,7 @@ index 5fa0ea06f1..889fb90074 100644 @skipIf(not salt.utils.platform.is_linux(), 'System is not Linux') @patch.object(salt.utils.platform, 'is_windows', MagicMock(return_value=False)) -@@ -881,14 +917,16 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): +@@ -1012,14 +1048,16 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): ('rinzler.evil-corp.com', ["false-hostname", "badaliass"], ['5.6.7.8']), ('foo.bar.baz', [], ['fe80::a8b2:93ff:fe00:0']), ('bluesniff.foo.bar', ["alias.bluesniff.foo.bar"], ['fe80::a8b2:93ff:dead:beef'])] @@ -321,6 +321,6 @@ index 5fa0ea06f1..889fb90074 100644 ''' test virtual grain with cmd virt-what -- -2.22.0 +2.16.4 diff --git a/improve-batch_async-to-release-consumed-memory-bsc-1.patch b/improve-batch_async-to-release-consumed-memory-bsc-1.patch index d8bf586..0c7889e 100644 --- a/improve-batch_async-to-release-consumed-memory-bsc-1.patch +++ b/improve-batch_async-to-release-consumed-memory-bsc-1.patch @@ -1,4 +1,4 @@ -From 002543df392f65d95dbc127dc058ac897f2035ed Mon Sep 17 00:00:00 2001 +From c54cdb24f09abf990fc23aa35a763c1ec3bd122a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Thu, 26 Sep 2019 10:41:06 +0100 @@ -6,7 +6,7 @@ Subject: [PATCH] Improve batch_async to release consumed memory (bsc#1140912) --- - salt/cli/batch_async.py | 73 +++++++++++++++++++++++++---------------- + salt/cli/batch_async.py | 73 ++++++++++++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 28 deletions(-) diff --git a/salt/cli/batch_async.py b/salt/cli/batch_async.py @@ -185,6 +185,6 @@ index 8a67331102..2bb50459c8 100644 + self.ioloop = None + gc.collect() -- -2.22.0 +2.16.4 diff --git a/include-aliases-in-the-fqdns-grains.patch b/include-aliases-in-the-fqdns-grains.patch index 0d29c81..e17e10a 100644 --- a/include-aliases-in-the-fqdns-grains.patch +++ b/include-aliases-in-the-fqdns-grains.patch @@ -1,4 +1,4 @@ -From 5dc6f2a59a8a774d13dcfd36b25ea735df18f10f Mon Sep 17 00:00:00 2001 +From 83fa749ca09eb8eb5eb29aaa30f8565106ee3c65 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Tue, 29 Jan 2019 11:11:38 +0100 Subject: [PATCH] Include aliases in the fqdns grains @@ -15,17 +15,17 @@ Add UT for fqdns aliases Leverage cached interfaces, if any. --- - salt/grains/core.py | 12 +++++------- + salt/grains/core.py | 14 ++++++-------- salt/utils/network.py | 12 ++++++++++++ tests/unit/grains/test_core.py | 28 +++++++++++++++++++++++++--- tests/unit/utils/test_network.py | 19 +++++++++++++++++++ - 4 files changed, 61 insertions(+), 10 deletions(-) + 4 files changed, 62 insertions(+), 11 deletions(-) diff --git a/salt/grains/core.py b/salt/grains/core.py -index b0c1acceeb..05a9d5035d 100644 +index f59eeb5780..7d75d48bb5 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py -@@ -2200,14 +2200,13 @@ def fqdns(): +@@ -2255,14 +2255,13 @@ def fqdns(): grains = {} fqdns = set() @@ -33,9 +33,10 @@ index b0c1acceeb..05a9d5035d 100644 - interface_data=_INTERFACES) - addresses.extend(salt.utils.network.ip_addrs6(include_loopback=False, - interface_data=_INTERFACES)) +- err_message = 'An exception occurred resolving address \'%s\': %s' + addresses = salt.utils.network.ip_addrs(include_loopback=False, interface_data=_get_interfaces()) + addresses.extend(salt.utils.network.ip_addrs6(include_loopback=False, interface_data=_get_interfaces())) - err_message = 'Exception during resolving address: %s' ++ err_message = 'Exception during resolving address: %s' for ip in addresses: try: - fqdns.add(socket.getfqdn(socket.gethostbyaddr(ip)[0])) @@ -44,9 +45,9 @@ index b0c1acceeb..05a9d5035d 100644 except socket.herror as err: if err.errno == 0: # No FQDN for this IP address, so we don't need to know this all the time. -@@ -2217,8 +2216,7 @@ def fqdns(): +@@ -2272,8 +2271,7 @@ def fqdns(): except (socket.error, socket.gaierror, socket.timeout) as err: - log.error(err_message, err) + log.error(err_message, ip, err) - grains['fqdns'] = sorted(list(fqdns)) - return grains @@ -55,10 +56,10 @@ index b0c1acceeb..05a9d5035d 100644 def ip_fqdn(): diff --git a/salt/utils/network.py b/salt/utils/network.py -index 83269cdcf6..c72d2aec41 100644 +index d6fc6a98c6..a183c9776a 100644 --- a/salt/utils/network.py +++ b/salt/utils/network.py -@@ -2016,3 +2016,15 @@ def parse_host_port(host_port): +@@ -2007,3 +2007,15 @@ def parse_host_port(host_port): raise ValueError('bad hostname: "{}"'.format(host)) return host, port @@ -75,10 +76,10 @@ index 83269cdcf6..c72d2aec41 100644 + compliant = re.compile(r"(?!-)[A-Z\d\-\_]{1,63}(? Date: Thu, 30 Aug 2018 06:07:08 -0600 Subject: [PATCH] Integration of MSI authentication with azurearm cloud @@ -9,7 +9,7 @@ Subject: [PATCH] Integration of MSI authentication with azurearm cloud 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/salt/cloud/clouds/azurearm.py b/salt/cloud/clouds/azurearm.py -index e8050dca16..229412adcd 100644 +index a422feca4f..9948dedc6c 100644 --- a/salt/cloud/clouds/azurearm.py +++ b/salt/cloud/clouds/azurearm.py @@ -58,6 +58,9 @@ The Azure ARM cloud module is used to control access to Microsoft Azure Resource @@ -41,6 +41,6 @@ index e8050dca16..229412adcd 100644 'client_id', get_configured_provider(), __opts__, search_global=False -- -2.17.1 +2.16.4 diff --git a/loosen-azure-sdk-dependencies-in-azurearm-cloud-driv.patch b/loosen-azure-sdk-dependencies-in-azurearm-cloud-driv.patch index 6251d3a..9ef0f32 100644 --- a/loosen-azure-sdk-dependencies-in-azurearm-cloud-driv.patch +++ b/loosen-azure-sdk-dependencies-in-azurearm-cloud-driv.patch @@ -1,4 +1,4 @@ -From 8fe82178247ff3704915b578398ea55b0c6e4fa0 Mon Sep 17 00:00:00 2001 +From 0cd0d8d50c500f3d8948470c2ecd5344f9c494a5 Mon Sep 17 00:00:00 2001 From: Joachim Gleissner Date: Tue, 18 Sep 2018 15:07:13 +0200 Subject: [PATCH] loosen azure sdk dependencies in azurearm cloud driver @@ -12,7 +12,7 @@ remove unused import from azurearm driver 1 file changed, 6 insertions(+) diff --git a/salt/cloud/clouds/azurearm.py b/salt/cloud/clouds/azurearm.py -index 229412adcd..ac59467fb3 100644 +index 9948dedc6c..5f0d4b7e6f 100644 --- a/salt/cloud/clouds/azurearm.py +++ b/salt/cloud/clouds/azurearm.py @@ -104,6 +104,7 @@ import time @@ -36,6 +36,6 @@ index 229412adcd..ac59467fb3 100644 except ImportError: pass -- -2.17.1 +2.16.4 diff --git a/make-aptpkg.list_repos-compatible-on-enabled-disable.patch b/make-aptpkg.list_repos-compatible-on-enabled-disable.patch index a899087..7831067 100644 --- a/make-aptpkg.list_repos-compatible-on-enabled-disable.patch +++ b/make-aptpkg.list_repos-compatible-on-enabled-disable.patch @@ -1,4 +1,4 @@ -From 350b0aa4ead80ac50047c08121bc09bddc05341d Mon Sep 17 00:00:00 2001 +From 9e543a835c870eaea424735fb8e52a82480dce90 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Fri, 16 Nov 2018 10:54:12 +0100 Subject: [PATCH] Make aptpkg.list_repos compatible on enabled/disabled @@ -9,10 +9,10 @@ Subject: [PATCH] Make aptpkg.list_repos compatible on enabled/disabled 1 file changed, 1 insertion(+) diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py -index 175ef2ed06..90b99c44b9 100644 +index ead7c6391e..6b3a921a82 100644 --- a/salt/modules/aptpkg.py +++ b/salt/modules/aptpkg.py -@@ -1719,6 +1719,7 @@ def list_repos(): +@@ -1595,6 +1595,7 @@ def list_repos(): repo['file'] = source.file repo['comps'] = getattr(source, 'comps', []) repo['disabled'] = source.disabled @@ -21,6 +21,6 @@ index 175ef2ed06..90b99c44b9 100644 repo['type'] = source.type repo['uri'] = source.uri.rstrip('/') -- -2.19.1 +2.16.4 diff --git a/make-profiles-a-package.patch b/make-profiles-a-package.patch index 421ccc1..d6ab8fd 100644 --- a/make-profiles-a-package.patch +++ b/make-profiles-a-package.patch @@ -1,4 +1,4 @@ -From 155aa52dca9272db492990ad737256dada1c4364 Mon Sep 17 00:00:00 2001 +From 117d2af99095cce3c0ab7222d7333334b73aa971 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Mon, 8 Oct 2018 17:52:07 +0200 Subject: [PATCH] Make profiles a package. @@ -22,6 +22,6 @@ index 0000000000..b86aef30b8 +Profiles for salt-support. +''' -- -2.19.0 +2.16.4 diff --git a/mount-fix-extra-t-parameter.patch b/mount-fix-extra-t-parameter.patch deleted file mode 100644 index a775996..0000000 --- a/mount-fix-extra-t-parameter.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 215d8d9c8f872b510a1c3fbb19ab4e91bc96bb64 Mon Sep 17 00:00:00 2001 -From: Alberto Planas -Date: Thu, 28 Feb 2019 15:45:28 +0100 -Subject: [PATCH] mount: fix extra -t parameter - -If 'fstype' parameter is not set in Linux environments, salt will -build a mount command with an empty -t value, making the command -fail. ---- - salt/modules/mount.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/salt/modules/mount.py b/salt/modules/mount.py -index 4ba370e5b3..e807b1729e 100644 ---- a/salt/modules/mount.py -+++ b/salt/modules/mount.py -@@ -1218,7 +1218,8 @@ def mount(name, device, mkmnt=False, fstype='', opts='defaults', user=None, util - if fstype: - args += ' -v {0}'.format(fstype) - else: -- args += ' -t {0}'.format(fstype) -+ if fstype: -+ args += ' -t {0}'.format(fstype) - cmd = 'mount {0} {1} {2} '.format(args, device, name) - out = __salt__['cmd.run_all'](cmd, runas=user, python_shell=False) - if out['retcode']: --- -2.20.1 - - diff --git a/move-server_id-deprecation-warning-to-reduce-log-spa.patch b/move-server_id-deprecation-warning-to-reduce-log-spa.patch index f2ed7ec..80505ac 100644 --- a/move-server_id-deprecation-warning-to-reduce-log-spa.patch +++ b/move-server_id-deprecation-warning-to-reduce-log-spa.patch @@ -1,4 +1,4 @@ -From dab9967f8e4a67e5b7ddd4e6718414d2e9b25e42 Mon Sep 17 00:00:00 2001 +From 10df6dcff22785962dc372064c899b942f3c1ff9 Mon Sep 17 00:00:00 2001 From: Mihai Dinca Date: Fri, 14 Jun 2019 15:13:12 +0200 Subject: [PATCH] Move server_id deprecation warning to reduce log @@ -10,10 +10,10 @@ Subject: [PATCH] Move server_id deprecation warning to reduce log 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/salt/grains/core.py b/salt/grains/core.py -index ce64620a24..e54212edfb 100644 +index ab37a4dd44..30eba0ce99 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py -@@ -2812,10 +2812,6 @@ def get_server_id(): +@@ -2867,10 +2867,6 @@ def get_server_id(): if bool(use_crc): id_hash = getattr(zlib, use_crc, zlib.adler32)(__opts__.get('id', '').encode()) & 0xffffffff else: @@ -25,10 +25,10 @@ index ce64620a24..e54212edfb 100644 server_id = {'server_id': id_hash} diff --git a/salt/minion.py b/salt/minion.py -index 058b7ef6b8..97f74bf47e 100644 +index c5f637eaa6..2c0a18604e 100644 --- a/salt/minion.py +++ b/salt/minion.py -@@ -103,6 +103,7 @@ from salt.utils.odict import OrderedDict +@@ -102,6 +102,7 @@ from salt.utils.odict import OrderedDict from salt.utils.process import (default_signals, SignalHandlingMultiprocessingProcess, ProcessManager) @@ -36,7 +36,7 @@ index 058b7ef6b8..97f74bf47e 100644 from salt.exceptions import ( CommandExecutionError, CommandNotFoundError, -@@ -992,6 +993,14 @@ class MinionManager(MinionBase): +@@ -993,6 +994,14 @@ class MinionManager(MinionBase): if (self.opts['master_type'] in ('failover', 'distributed')) or not isinstance(self.opts['master'], list): masters = [masters] @@ -48,10 +48,10 @@ index 058b7ef6b8..97f74bf47e 100644 + 'prefer (default "Adler32"). The server_id will be computed with' + 'Adler32 by default.') + + beacons_leader = True for master in masters: s_opts = copy.deepcopy(self.opts) - s_opts['master'] = master -- -2.22.0 +2.16.4 diff --git a/preserve-already-defined-destructive_tests-and-expen.patch b/preserve-already-defined-destructive_tests-and-expen.patch index 5c7131e..ad0940e 100644 --- a/preserve-already-defined-destructive_tests-and-expen.patch +++ b/preserve-already-defined-destructive_tests-and-expen.patch @@ -1,4 +1,4 @@ -From 5a1e0b7b8eab900e03fa800cc7a0a2b59bf2ff55 Mon Sep 17 00:00:00 2001 +From a83a3a01e3bb16ec7bf4463dea1b4770c4b2955c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Mon, 3 Jun 2019 11:38:36 +0100 @@ -10,10 +10,10 @@ Subject: [PATCH] Preserve already defined DESTRUCTIVE_TESTS and 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/support/parser/__init__.py b/tests/support/parser/__init__.py -index ed262d46c0..f269457670 100644 +index a188f8945f..2802b20c62 100644 --- a/tests/support/parser/__init__.py +++ b/tests/support/parser/__init__.py -@@ -574,12 +574,12 @@ class SaltTestingParser(optparse.OptionParser): +@@ -598,12 +598,12 @@ class SaltTestingParser(optparse.OptionParser): self.validate_options() @@ -29,6 +29,6 @@ index ed262d46c0..f269457670 100644 # expensive tests should be executed or not. os.environ['EXPENSIVE_TESTS'] = str(self.options.run_expensive) -- -2.17.1 +2.16.4 diff --git a/preserving-signature-in-module.run-state-u-50049.patch b/preserving-signature-in-module.run-state-u-50049.patch index 3d00d00..baa316b 100644 --- a/preserving-signature-in-module.run-state-u-50049.patch +++ b/preserving-signature-in-module.run-state-u-50049.patch @@ -1,4 +1,4 @@ -From 318b4e0cd2efb02f26392bfe2d354a3ff5d21cbc Mon Sep 17 00:00:00 2001 +From ae46bb899f3c7d70af62081b2ae0473f07a2a7b9 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Mon, 15 Oct 2018 17:26:16 +0200 Subject: [PATCH] Preserving signature in "module.run" state (U#50049) @@ -18,10 +18,10 @@ Replace standalone function with lambda-proxy for signatures only 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/salt/states/module.py b/salt/states/module.py -index 2190ffa3d2..90b1d0a5f5 100644 +index 9968529ffd..a6096ba35b 100644 --- a/salt/states/module.py +++ b/salt/states/module.py -@@ -323,7 +323,7 @@ def _call_function(name, returner=None, **kwargs): +@@ -324,7 +324,7 @@ def _call_function(name, returner=None, **kwargs): # func_args is initialized to a list of positional arguments that the function to be run accepts func_args = argspec.args[:len(argspec.args or []) - len(argspec.defaults or [])] @@ -30,7 +30,7 @@ index 2190ffa3d2..90b1d0a5f5 100644 for funcset in reversed(kwargs.get('func_args') or []): if not isinstance(funcset, dict): # We are just receiving a list of args to the function to be run, so just append -@@ -334,13 +334,16 @@ def _call_function(name, returner=None, **kwargs): +@@ -335,13 +335,16 @@ def _call_function(name, returner=None, **kwargs): # We are going to pass in a keyword argument. The trick here is to make certain # that if we find that in the *args* list that we pass it there and not as a kwarg if kwarg_key in func_args: @@ -49,7 +49,7 @@ index 2190ffa3d2..90b1d0a5f5 100644 _passed_prm = len(arg_type) missing = [] diff --git a/tests/unit/states/test_module.py b/tests/unit/states/test_module.py -index bf4ddcc5b4..25082d4bb4 100644 +index b505e85b90..2aff53eeaf 100644 --- a/tests/unit/states/test_module.py +++ b/tests/unit/states/test_module.py @@ -324,3 +324,30 @@ class ModuleStateTest(TestCase, LoaderModuleMockMixin): @@ -84,6 +84,6 @@ index bf4ddcc5b4..25082d4bb4 100644 + assert module._call_function('testfunc', func_args=[1, 2, 3]) == (1, 2, 3, (), {}) + assert module._call_function('testfunc', func_args=[3, 1, 2]) == (3, 1, 2, (), {}) -- -2.19.0 +2.16.4 diff --git a/prevent-already-reading-continuous-exception-message.patch b/prevent-already-reading-continuous-exception-message.patch deleted file mode 100644 index cc1dc5e..0000000 --- a/prevent-already-reading-continuous-exception-message.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 6c84612b52b5f14e74a1c44f03d78a85c6f0c5dc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= - -Date: Tue, 29 Oct 2019 09:08:52 +0000 -Subject: [PATCH] Prevent 'Already reading' continuous exception message - (bsc#1137642) - ---- - salt/transport/ipc.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/salt/transport/ipc.py b/salt/transport/ipc.py -index 8235f104ef..0ed0baeec2 100644 ---- a/salt/transport/ipc.py -+++ b/salt/transport/ipc.py -@@ -770,6 +770,7 @@ class IPCMessageSubscriber(IPCClient): - break - except Exception as exc: - log.error('Exception occurred while Subscriber handling stream: %s', exc) -+ yield tornado.gen.sleep(1) - - def __run_callbacks(self, raw): - for callback in self.callbacks: --- -2.23.0 - - diff --git a/prevent-ansiblegate-unit-tests-to-fail-on-ubuntu.patch b/prevent-ansiblegate-unit-tests-to-fail-on-ubuntu.patch index bab0f21..0594d0e 100644 --- a/prevent-ansiblegate-unit-tests-to-fail-on-ubuntu.patch +++ b/prevent-ansiblegate-unit-tests-to-fail-on-ubuntu.patch @@ -1,4 +1,4 @@ -From 84e9371399b50618765038bcec2e313a006eadf9 Mon Sep 17 00:00:00 2001 +From 32691d82e32dbc70adec03bee214b971c82a73cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Mon, 8 Jul 2019 14:46:10 +0100 @@ -27,6 +27,6 @@ index 70b47f8bc2..2a24d6f147 100644 + proc.assert_any_call(['echo', '{"ANSIBLE_MODULE_ARGS": {"_raw_params": "arg_1", "kwarg1": "foobar"}}'], stdout=-1, timeout=1200) assert ret == {"completed": True, "timeout": 1200} -- -2.21.0 +2.16.4 diff --git a/prevent-systemd-run-description-issue-when-running-a.patch b/prevent-systemd-run-description-issue-when-running-a.patch index 9f14025..c0d0bca 100644 --- a/prevent-systemd-run-description-issue-when-running-a.patch +++ b/prevent-systemd-run-description-issue-when-running-a.patch @@ -1,4 +1,4 @@ -From 44a91c2ce6df78d93ce0ef659dedb0e41b1c2e04 Mon Sep 17 00:00:00 2001 +From 03bf4718a82fe73e54c907bfcf9a315eee07feee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Mon, 30 Sep 2019 12:06:08 +0100 @@ -37,6 +37,6 @@ index 06f3a9f6aa..85360da181 100644 def test_call_apt_with_kwargs(self): -- -2.22.0 +2.16.4 diff --git a/prevent-test_mod_del_repo_multiline_values-to-fail.patch b/prevent-test_mod_del_repo_multiline_values-to-fail.patch new file mode 100644 index 0000000..1c8eeb1 --- /dev/null +++ b/prevent-test_mod_del_repo_multiline_values-to-fail.patch @@ -0,0 +1,57 @@ +From 13eaa8b2bb57eb1774b43e2437c5e1fd0de9cb93 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= + +Date: Wed, 27 Nov 2019 15:41:57 +0000 +Subject: [PATCH] Prevent test_mod_del_repo_multiline_values to fail + +--- + tests/integration/modules/test_pkg.py | 20 ++++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +diff --git a/tests/integration/modules/test_pkg.py b/tests/integration/modules/test_pkg.py +index 7204428eca..9a2cbc7bfc 100644 +--- a/tests/integration/modules/test_pkg.py ++++ b/tests/integration/modules/test_pkg.py +@@ -145,6 +145,7 @@ class PkgModuleTest(ModuleCase, SaltReturnAssertsMixin): + try: + if os_grain in ['CentOS', 'RedHat', 'SUSE']: + my_baseurl = 'http://my.fake.repo/foo/bar/\n http://my.fake.repo.alt/foo/bar/' ++ expected_get_repo_baseurl_zypp = 'http://my.fake.repo/foo/bar/%0A%20http://my.fake.repo.alt/foo/bar/' + expected_get_repo_baseurl = 'http://my.fake.repo/foo/bar/\nhttp://my.fake.repo.alt/foo/bar/' + major_release = int( + self.run_function( +@@ -169,17 +170,24 @@ class PkgModuleTest(ModuleCase, SaltReturnAssertsMixin): + enabled=enabled, + failovermethod=failovermethod, + ) +- # return data from pkg.mod_repo contains the file modified at +- # the top level, so use next(iter(ret)) to get that key + self.assertNotEqual(ret, {}) +- repo_info = ret[next(iter(ret))] ++ repo_info = {repo: ret} + self.assertIn(repo, repo_info) +- self.assertEqual(repo_info[repo]['baseurl'], my_baseurl) ++ if os_grain == 'SUSE': ++ self.assertEqual(repo_info[repo]['baseurl'], expected_get_repo_baseurl_zypp) ++ else: ++ self.assertEqual(repo_info[repo]['baseurl'], my_baseurl) + ret = self.run_function('pkg.get_repo', [repo]) +- self.assertEqual(ret['baseurl'], expected_get_repo_baseurl) ++ if os_grain == 'SUSE': ++ self.assertEqual(repo_info[repo]['baseurl'], expected_get_repo_baseurl_zypp) ++ else: ++ self.assertEqual(ret['baseurl'], expected_get_repo_baseurl) + self.run_function('pkg.mod_repo', [repo]) + ret = self.run_function('pkg.get_repo', [repo]) +- self.assertEqual(ret['baseurl'], expected_get_repo_baseurl) ++ if os_grain == 'SUSE': ++ self.assertEqual(repo_info[repo]['baseurl'], expected_get_repo_baseurl_zypp) ++ else: ++ self.assertEqual(ret['baseurl'], expected_get_repo_baseurl) + finally: + if repo is not None: + self.run_function('pkg.del_repo', [repo]) +-- +2.23.0 + + diff --git a/provide-the-missing-features-required-for-yomi-yet-o.patch b/provide-the-missing-features-required-for-yomi-yet-o.patch index 522d682..f342809 100644 --- a/provide-the-missing-features-required-for-yomi-yet-o.patch +++ b/provide-the-missing-features-required-for-yomi-yet-o.patch @@ -1,4 +1,4 @@ -From 121e37f185057f1135ccf89738e3a59c581d9efb Mon Sep 17 00:00:00 2001 +From d16606a95d316848e15006ef45c11dadfaa0e410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Thu, 20 Jun 2019 12:52:45 +0100 @@ -13,67 +13,65 @@ Subject: [PATCH] Provide the missing features required for Yomi (Yet one salt/modules/aixpkg.py | 2 +- salt/modules/apkpkg.py | 12 +- salt/modules/aptpkg.py | 14 +- - salt/modules/btrfs.py | 496 ++++++- - salt/modules/chroot.py | 165 +++ + salt/modules/btrfs.py | 496 +++++++++- + salt/modules/chroot.py | 165 ++++ salt/modules/cmdmod.py | 44 +- salt/modules/disk.py | 26 +- salt/modules/dpkg_lowpkg.py | 6 +- salt/modules/ebuildpkg.py | 8 +- salt/modules/freebsdpkg.py | 6 +- - salt/modules/freezer.py | 294 ++++ - salt/modules/groupadd.py | 177 ++- - salt/modules/kubeadm.py | 1265 ++++++++++++++++++ + salt/modules/freezer.py | 294 ++++++ + salt/modules/groupadd.py | 177 +++- + salt/modules/kubeadm.py | 1265 ++++++++++++++++++++++++++ salt/modules/linux_lvm.py | 36 +- salt/modules/mac_brew_pkg.py | 8 +- salt/modules/mac_portspkg.py | 6 +- salt/modules/mdadm_raid.py | 14 +- - salt/modules/mount.py | 56 +- + salt/modules/mount.py | 43 +- salt/modules/openbsdpkg.py | 2 +- salt/modules/pacmanpkg.py | 10 +- salt/modules/parted_partition.py | 91 +- salt/modules/pkgin.py | 8 +- salt/modules/pkgng.py | 4 +- salt/modules/rpm_lowpkg.py | 101 +- - salt/modules/shadow.py | 300 ++++- + salt/modules/shadow.py | 300 ++++-- salt/modules/solarisipspkg.py | 4 +- salt/modules/solarispkg.py | 2 +- - salt/modules/systemd_service.py | 264 +++- - salt/modules/useradd.py | 390 ++++-- + salt/modules/systemd_service.py | 264 ++++-- + salt/modules/useradd.py | 390 ++++++-- salt/modules/xbpspkg.py | 12 +- salt/modules/yumpkg.py | 34 +- - salt/modules/zypperpkg.py | 503 +++++-- + salt/modules/zypperpkg.py | 503 +++++++--- salt/states/blockdev.py | 3 +- - salt/states/btrfs.py | 385 ++++++ + salt/states/btrfs.py | 385 ++++++++ salt/states/cmd.py | 18 +- salt/states/file.py | 6 +- salt/states/loop.py | 4 + salt/states/lvm.py | 16 +- salt/states/mdadm_raid.py | 2 +- - salt/states/mount.py | 305 +++++ + salt/states/mount.py | 305 +++++++ salt/states/pkg.py | 28 +- salt/states/pkgrepo.py | 14 +- salt/utils/oset.py | 7 +- salt/utils/path.py | 7 +- - salt/utils/systemd.py | 5 +- tests/conftest.py | 10 +- tests/unit/grains/test_core.py | 39 + - tests/unit/modules/test_btrfs.py | 370 ++++- - tests/unit/modules/test_chroot.py | 184 +++ - tests/unit/modules/test_freezer.py | 274 ++++ + tests/unit/modules/test_btrfs.py | 370 +++++++- + tests/unit/modules/test_chroot.py | 184 ++++ + tests/unit/modules/test_freezer.py | 274 ++++++ tests/unit/modules/test_groupadd.py | 16 +- - tests/unit/modules/test_kubeadm.py | 1144 ++++++++++++++++ - tests/unit/modules/test_mount.py | 154 ++- + tests/unit/modules/test_kubeadm.py | 1144 +++++++++++++++++++++++ + tests/unit/modules/test_mount.py | 118 ++- tests/unit/modules/test_parted_partition.py | 17 + tests/unit/modules/test_rpm_lowpkg.py | 92 +- tests/unit/modules/test_systemd_service.py | 57 +- tests/unit/modules/test_useradd.py | 5 +- tests/unit/modules/test_zypperpkg.py | 100 +- - tests/unit/states/test_btrfs.py | 782 +++++++++++ - tests/unit/states/test_mount.py | 605 +++++++++ + tests/unit/states/test_btrfs.py | 782 ++++++++++++++++ + tests/unit/states/test_mount.py | 605 ++++++++++++ tests/unit/states/test_pkg.py | 7 +- tests/unit/test_loader.py | 96 +- - tests/unit/utils/test_systemd.py | 21 + - 67 files changed, 8570 insertions(+), 648 deletions(-) + 65 files changed, 8503 insertions(+), 640 deletions(-) create mode 100644 doc/ref/modules/all/salt.modules.kubeadm.rst create mode 100644 salt/modules/chroot.py create mode 100644 salt/modules/freezer.py @@ -85,15 +83,15 @@ Subject: [PATCH] Provide the missing features required for Yomi (Yet one create mode 100644 tests/unit/states/test_btrfs.py diff --git a/doc/ref/modules/all/index.rst b/doc/ref/modules/all/index.rst -index 9762347faf..eaf7e25450 100644 +index f1a85d2c71..8d165a033b 100644 --- a/doc/ref/modules/all/index.rst +++ b/doc/ref/modules/all/index.rst -@@ -208,6 +208,7 @@ execution modules +@@ -212,6 +212,7 @@ execution modules keystone keystoneng kmod + kubeadm - kubernetes + kubernetesmod launchctl_service layman diff --git a/doc/ref/modules/all/salt.modules.kubeadm.rst b/doc/ref/modules/all/salt.modules.kubeadm.rst @@ -108,10 +106,10 @@ index 0000000000..137c779da2 +.. automodule:: salt.modules.kubeadm + :members: diff --git a/salt/grains/core.py b/salt/grains/core.py -index fec7b204bc..ce64620a24 100644 +index 38b82b7f7c..ab37a4dd44 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py -@@ -108,6 +108,10 @@ if not hasattr(os, 'uname'): +@@ -109,6 +109,10 @@ if not hasattr(os, 'uname'): _INTERFACES = {} @@ -122,7 +120,7 @@ index fec7b204bc..ce64620a24 100644 def _windows_cpudata(): ''' -@@ -2208,7 +2212,7 @@ def fqdns(): +@@ -2263,7 +2267,7 @@ def fqdns(): name, aliaslist, addresslist = socket.gethostbyaddr(ip) return [socket.getfqdn(name)] + [als for als in aliaslist if salt.utils.network.is_fqdn(als)] except socket.herror as err: @@ -131,7 +129,7 @@ index fec7b204bc..ce64620a24 100644 # No FQDN for this IP address, so we don't need to know this all the time. log.debug("Unable to resolve address %s: %s", ip, err) else: -@@ -2529,6 +2533,10 @@ def _hw_data(osdata): +@@ -2584,6 +2588,10 @@ def _hw_data(osdata): grains[key] = salt.utils.stringutils.to_unicode(ifile.read().strip(), errors='replace') if key == 'uuid': grains['uuid'] = grains['uuid'].lower() @@ -142,7 +140,7 @@ index fec7b204bc..ce64620a24 100644 except (IOError, OSError) as err: # PermissionError is new to Python 3, but corresponds to the EACESS and # EPERM error numbers. Use those instead here for PY2 compatibility. -@@ -2760,26 +2768,6 @@ def _hw_data(osdata): +@@ -2815,26 +2823,6 @@ def _hw_data(osdata): else: log.error('The \'prtconf\' binary was not found in $PATH.') @@ -170,7 +168,7 @@ index fec7b204bc..ce64620a24 100644 diff --git a/salt/loader.py b/salt/loader.py -index 6760d9e720..1d8a4b90fd 100644 +index d494c452ed..52cb4cfcb5 100644 --- a/salt/loader.py +++ b/salt/loader.py @@ -253,6 +253,7 @@ def minion_mods( @@ -181,7 +179,7 @@ index 6760d9e720..1d8a4b90fd 100644 ) ret.pack['__salt__'] = ret -@@ -334,6 +335,7 @@ def engines(opts, functions, runners, utils, proxy=None): +@@ -346,6 +347,7 @@ def engines(opts, functions, runners, utils, proxy=None): opts, tag='engines', pack=pack, @@ -189,7 +187,7 @@ index 6760d9e720..1d8a4b90fd 100644 ) -@@ -346,6 +348,7 @@ def proxy(opts, functions=None, returners=None, whitelist=None, utils=None): +@@ -358,6 +360,7 @@ def proxy(opts, functions=None, returners=None, whitelist=None, utils=None): opts, tag='proxy', pack={'__salt__': functions, '__ret__': returners, '__utils__': utils}, @@ -197,7 +195,7 @@ index 6760d9e720..1d8a4b90fd 100644 ) ret.pack['__proxy__'] = ret -@@ -383,12 +386,14 @@ def pillars(opts, functions, context=None): +@@ -395,12 +398,14 @@ def pillars(opts, functions, context=None): ''' Returns the pillars modules ''' @@ -213,7 +211,7 @@ index 6760d9e720..1d8a4b90fd 100644 ret.pack['__ext_pillar__'] = ret return FilterDictWrapper(ret, '.ext_pillar') -@@ -488,11 +493,13 @@ def fileserver(opts, backends): +@@ -500,11 +505,13 @@ def fileserver(opts, backends): ''' Returns the file server modules ''' @@ -228,7 +226,7 @@ index 6760d9e720..1d8a4b90fd 100644 def roster(opts, runner=None, utils=None, whitelist=None): -@@ -508,6 +515,7 @@ def roster(opts, runner=None, utils=None, whitelist=None): +@@ -520,6 +527,7 @@ def roster(opts, runner=None, utils=None, whitelist=None): '__runner__': runner, '__utils__': utils, }, @@ -236,7 +234,7 @@ index 6760d9e720..1d8a4b90fd 100644 ) -@@ -546,6 +554,7 @@ def states(opts, functions, utils, serializers, whitelist=None, proxy=None): +@@ -558,6 +566,7 @@ def states(opts, functions, utils, serializers, whitelist=None, proxy=None): tag='states', pack={'__salt__': functions, '__proxy__': proxy or {}}, whitelist=whitelist, @@ -244,7 +242,7 @@ index 6760d9e720..1d8a4b90fd 100644 ) ret.pack['__states__'] = ret ret.pack['__utils__'] = utils -@@ -652,7 +661,8 @@ def grain_funcs(opts, proxy=None): +@@ -664,7 +673,8 @@ def grain_funcs(opts, proxy=None): __opts__ = salt.config.minion_config('/etc/salt/minion') grainfuncs = salt.loader.grain_funcs(__opts__) ''' @@ -254,7 +252,7 @@ index 6760d9e720..1d8a4b90fd 100644 _module_dirs( opts, 'grains', -@@ -661,7 +671,10 @@ def grain_funcs(opts, proxy=None): +@@ -673,7 +683,10 @@ def grain_funcs(opts, proxy=None): ), opts, tag='grains', @@ -265,7 +263,7 @@ index 6760d9e720..1d8a4b90fd 100644 def _load_cached_grains(opts, cfn): -@@ -895,6 +908,7 @@ def runner(opts, utils=None, context=None, whitelist=None): +@@ -907,6 +920,7 @@ def runner(opts, utils=None, context=None, whitelist=None): tag='runners', pack={'__utils__': utils, '__context__': context}, whitelist=whitelist, @@ -273,7 +271,7 @@ index 6760d9e720..1d8a4b90fd 100644 ) # TODO: change from __salt__ to something else, we overload __salt__ too much ret.pack['__salt__'] = ret -@@ -930,6 +944,7 @@ def sdb(opts, functions=None, whitelist=None, utils=None): +@@ -942,6 +956,7 @@ def sdb(opts, functions=None, whitelist=None, utils=None): '__salt__': minion_mods(opts, utils), }, whitelist=whitelist, @@ -281,7 +279,7 @@ index 6760d9e720..1d8a4b90fd 100644 ) -@@ -971,6 +986,7 @@ def clouds(opts): +@@ -983,6 +998,7 @@ def clouds(opts): ''' Return the cloud functions ''' @@ -289,7 +287,7 @@ index 6760d9e720..1d8a4b90fd 100644 # Let's bring __active_provider_name__, defaulting to None, to all cloud # drivers. This will get temporarily updated/overridden with a context # manager when needed. -@@ -982,8 +998,9 @@ def clouds(opts): +@@ -994,8 +1010,9 @@ def clouds(opts): int_type='clouds'), opts, tag='clouds', @@ -300,7 +298,7 @@ index 6760d9e720..1d8a4b90fd 100644 ) for funcname in LIBCLOUD_FUNCS_NOT_SUPPORTED: log.trace( -@@ -1097,6 +1114,7 @@ class LazyLoader(salt.utils.lazy.LazyDict): +@@ -1109,6 +1126,7 @@ class LazyLoader(salt.utils.lazy.LazyDict): :param bool virtual_enable: Whether or not to respect the __virtual__ function when loading modules. :param str virtual_funcs: The name of additional functions in the module to call to verify its functionality. If not true, the module will not load. @@ -308,7 +306,7 @@ index 6760d9e720..1d8a4b90fd 100644 :returns: A LazyLoader object which functions as a dictionary. Keys are 'module.function' and values are function references themselves which are loaded on-demand. # TODO: -@@ -1118,6 +1136,7 @@ class LazyLoader(salt.utils.lazy.LazyDict): +@@ -1130,6 +1148,7 @@ class LazyLoader(salt.utils.lazy.LazyDict): static_modules=None, proxy=None, virtual_funcs=None, @@ -316,7 +314,7 @@ index 6760d9e720..1d8a4b90fd 100644 ): # pylint: disable=W0231 ''' In pack, if any of the values are None they will be replaced with an -@@ -1159,6 +1178,9 @@ class LazyLoader(salt.utils.lazy.LazyDict): +@@ -1171,6 +1190,9 @@ class LazyLoader(salt.utils.lazy.LazyDict): virtual_funcs = [] self.virtual_funcs = virtual_funcs @@ -326,7 +324,7 @@ index 6760d9e720..1d8a4b90fd 100644 self.disabled = set( self.opts.get( 'disable_{0}{1}'.format( -@@ -1465,12 +1487,30 @@ class LazyLoader(salt.utils.lazy.LazyDict): +@@ -1477,12 +1499,30 @@ class LazyLoader(salt.utils.lazy.LazyDict): reload_module(submodule) self._reload_submodules(submodule) @@ -357,7 +355,7 @@ index 6760d9e720..1d8a4b90fd 100644 sys.path.append(fpath_dirname) if suffix == '.pyx': mod = pyximport.load_module(name, fpath, tempfile.gettempdir()) -@@ -1593,6 +1633,7 @@ class LazyLoader(salt.utils.lazy.LazyDict): +@@ -1605,6 +1645,7 @@ class LazyLoader(salt.utils.lazy.LazyDict): return False finally: sys.path.remove(fpath_dirname) @@ -1190,10 +1188,10 @@ index 0000000000..6e4705b67e + finally: + __utils__['files.rm_rf'](thin_dest_path) diff --git a/salt/modules/cmdmod.py b/salt/modules/cmdmod.py -index 81c4d3f811..d0819f2f79 100644 +index 723eddc67b..1801147f57 100644 --- a/salt/modules/cmdmod.py +++ b/salt/modules/cmdmod.py -@@ -2889,6 +2889,7 @@ def run_chroot(root, +@@ -2904,6 +2904,7 @@ def run_chroot(root, group=None, shell=DEFAULT_SHELL, python_shell=True, @@ -1201,7 +1199,7 @@ index 81c4d3f811..d0819f2f79 100644 env=None, clean_env=False, template=None, -@@ -2914,19 +2915,17 @@ def run_chroot(root, +@@ -2929,19 +2930,17 @@ def run_chroot(root, :param str root: Path to the root of the jail to use. @@ -1229,7 +1227,7 @@ index 81c4d3f811..d0819f2f79 100644 :param str cmd: The command to run. ex: ``ls -lart /home`` -@@ -2950,6 +2949,9 @@ def run_chroot(root, +@@ -2965,6 +2964,9 @@ def run_chroot(root, arguments. Set to True to use shell features, such as pipes or redirection. @@ -1239,7 +1237,7 @@ index 81c4d3f811..d0819f2f79 100644 :param dict env: Environment variables to be set prior to execution. .. note:: -@@ -2968,11 +2970,11 @@ def run_chroot(root, +@@ -2983,11 +2985,11 @@ def run_chroot(root, engine will be used to render the downloaded file. Currently jinja, mako, and wempy are supported. @@ -1255,7 +1253,7 @@ index 81c4d3f811..d0819f2f79 100644 :param str output_encoding: Control the encoding used to decode the command's output. -@@ -3046,6 +3048,15 @@ def run_chroot(root, +@@ -3061,6 +3063,15 @@ def run_chroot(root, 'sysfs', fstype='sysfs') @@ -1271,7 +1269,7 @@ index 81c4d3f811..d0819f2f79 100644 # Execute chroot routine sh_ = '/bin/sh' if os.path.isfile(os.path.join(root, 'bin/bash')): -@@ -3096,6 +3107,11 @@ def run_chroot(root, +@@ -3111,6 +3122,11 @@ def run_chroot(root, log.error('Processes running in chroot could not be killed, ' 'filesystem will remain mounted') @@ -3567,7 +3565,7 @@ index 829f4cdd24..1581a558b6 100644 for line in res.splitlines(): diff --git a/salt/modules/mount.py b/salt/modules/mount.py -index e807b1729e..f2737b9a5c 100644 +index 97263252c7..f2737b9a5c 100644 --- a/salt/modules/mount.py +++ b/salt/modules/mount.py @@ -711,11 +711,15 @@ def set_fstab( @@ -3642,31 +3640,16 @@ index e807b1729e..f2737b9a5c 100644 if comps[0] != name: change = True comps[0] = name -@@ -1212,14 +1223,17 @@ def mount(name, device, mkmnt=False, fstype='', opts='defaults', user=None, util - lopts = ','.join(opts) - args = '-o {0}'.format(lopts) - -- # use of fstype on AIX differs from typical Linux use of -t functionality -- # AIX uses -v vfsname, -t fstype mounts all with fstype in /etc/filesystems -- if 'AIX' in __grains__['os']: -- if fstype: -+ if fstype: -+ # use of fstype on AIX differs from typical Linux use of -t -+ # functionality AIX uses -v vfsname, -t fstype mounts all with -+ # fstype in /etc/filesystems -+ if 'AIX' in __grains__['os']: +@@ -1218,6 +1229,8 @@ def mount(name, device, mkmnt=False, fstype='', opts='defaults', user=None, util + # fstype in /etc/filesystems + if 'AIX' in __grains__['os']: args += ' -v {0}'.format(fstype) -- else: -- if fstype: + elif 'solaris' in __grains__['os'].lower(): + args += ' -F {0}'.format(fstype) -+ else: + else: args += ' -t {0}'.format(fstype) -+ - cmd = 'mount {0} {1} {2} '.format(args, device, name) - out = __salt__['cmd.run_all'](cmd, runas=user, python_shell=False) - if out['retcode']: -@@ -1247,7 +1261,7 @@ def remount(name, device, mkmnt=False, fstype='', opts='defaults', user=None): + +@@ -1248,7 +1261,7 @@ def remount(name, device, mkmnt=False, fstype='', opts='defaults', user=None): if 'AIX' in __grains__['os']: if opts == 'defaults': @@ -3675,7 +3658,7 @@ index e807b1729e..f2737b9a5c 100644 if isinstance(opts, six.string_types): opts = opts.split(',') -@@ -1262,14 +1276,16 @@ def remount(name, device, mkmnt=False, fstype='', opts='defaults', user=None): +@@ -1263,14 +1276,16 @@ def remount(name, device, mkmnt=False, fstype='', opts='defaults', user=None): lopts = ','.join(opts) args = '-o {0}'.format(lopts) @@ -3699,7 +3682,7 @@ index e807b1729e..f2737b9a5c 100644 if __grains__['os'] not in ['OpenBSD', 'MacOS', 'Darwin'] or force_mount: cmd = 'mount {0} {1} {2} '.format(args, device, name) -@@ -1667,6 +1683,7 @@ def set_filesystems( +@@ -1668,6 +1683,7 @@ def set_filesystems( config='/etc/filesystems', test=False, match_on='auto', @@ -3707,7 +3690,7 @@ index e807b1729e..f2737b9a5c 100644 **kwargs): ''' .. versionadded:: 2018.3.3 -@@ -1674,6 +1691,9 @@ def set_filesystems( +@@ -1675,6 +1691,9 @@ def set_filesystems( Verify that this mount is represented in the filesystems, change the mount to match the data passed, or add the mount if it is not present on AIX @@ -3717,7 +3700,7 @@ index e807b1729e..f2737b9a5c 100644 Provide information if the path is mounted :param name: The name of the mount point where the device is mounted. -@@ -1773,7 +1793,7 @@ def set_filesystems( +@@ -1774,7 +1793,7 @@ def set_filesystems( for fsys_view in six.viewitems(fsys_filedict): if criteria.match(fsys_view): ret = 'present' @@ -8230,10 +8213,10 @@ index 4d20b51381..86934f9ffc 100644 return ret diff --git a/salt/states/file.py b/salt/states/file.py -index 15bb93e5ec..8823a7c8cf 100644 +index 4e451c58f8..c98081fa7f 100644 --- a/salt/states/file.py +++ b/salt/states/file.py -@@ -276,7 +276,11 @@ import shutil +@@ -291,7 +291,11 @@ import shutil import sys import time import traceback @@ -8868,29 +8851,6 @@ index b1d601e464..132190b271 100644 return None for exe in exes: path = which(exe) -diff --git a/salt/utils/systemd.py b/salt/utils/systemd.py -index 7790b3567d..060bc1e3fb 100644 ---- a/salt/utils/systemd.py -+++ b/salt/utils/systemd.py -@@ -6,6 +6,7 @@ Contains systemd related help files - from __future__ import absolute_import, print_function, unicode_literals - import logging - import os -+import re - import subprocess - - # Import Salt libs -@@ -65,8 +66,8 @@ def version(context=None): - stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0] - outstr = salt.utils.stringutils.to_str(stdout) - try: -- ret = int(outstr.splitlines()[0].split()[-1]) -- except (IndexError, ValueError): -+ ret = int(re.search(r'\w+ ([0-9]+)', outstr.splitlines()[0]).group(1)) -+ except (AttributeError, IndexError, ValueError): - log.error( - 'Unable to determine systemd version from systemctl ' - '--version, output follows:\n%s', outstr diff --git a/tests/conftest.py b/tests/conftest.py index 906cca6dd5..1dbe2176b6 100644 --- a/tests/conftest.py @@ -8934,13 +8894,13 @@ index 906cca6dd5..1dbe2176b6 100644 only_local_network = requires_network_marker.kwargs.get('only_local_network', False) has_local_network = False diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py -index 117e02c39f..5fa0ea06f1 100644 +index e43be4939c..af9d27dd0e 100644 --- a/tests/unit/grains/test_core.py +++ b/tests/unit/grains/test_core.py -@@ -1062,3 +1062,42 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): - ret = core._osx_memdata() - assert ret['swap_total'] == 0 - assert ret['mem_total'] == 4096 +@@ -1262,3 +1262,42 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): + is_proxy.assert_called_once_with() + is_windows.assert_not_called() + self.assertEqual(ret['locale_info']['timezone'], 'unknown') + + @skipIf(not salt.utils.platform.is_linux(), 'System is not Linux') + @patch('os.path.exists') @@ -11026,7 +10986,7 @@ index 0000000000..a58f54f118 + with pytest.raises(CommandExecutionError): + assert kubeadm.reset() diff --git a/tests/unit/modules/test_mount.py b/tests/unit/modules/test_mount.py -index a9df52f1d8..fe9b067665 100644 +index 1a0d64f2f5..fe9b067665 100644 --- a/tests/unit/modules/test_mount.py +++ b/tests/unit/modules/test_mount.py @@ -216,6 +216,21 @@ class MountTestCase(TestCase, LoaderModuleMockMixin): @@ -11095,65 +11055,16 @@ index a9df52f1d8..fe9b067665 100644 mock_read = MagicMock(side_effect=OSError) with patch.object(os.path, 'isfile', mock): -@@ -305,6 +348,13 @@ class MountTestCase(TestCase, LoaderModuleMockMixin): - 'stderr': True}) - with patch.dict(mount.__salt__, {'cmd.run_all': mock}): - self.assertTrue(mount.mount('name', 'device')) -+ mock.assert_called_with('mount device name ', -+ python_shell=False, runas=None) -+ -+ with patch.dict(mount.__salt__, {'cmd.run_all': mock}): -+ self.assertTrue(mount.mount('name', 'device', fstype='fstype')) -+ mock.assert_called_with('mount -t fstype device name ', -+ python_shell=False, runas=None) - - mock = MagicMock(return_value={'retcode': False, - 'stderr': False}) -@@ -320,13 +370,42 @@ class MountTestCase(TestCase, LoaderModuleMockMixin): - 'stderr': True}) - with patch.dict(mount.__salt__, {'cmd.run_all': mock}): - self.assertTrue(mount.mount('name', 'device')) -+ mock.assert_called_with('mount device name ', -+ python_shell=False, runas=None) -+ -+ with patch.dict(mount.__salt__, {'cmd.run_all': mock}): -+ self.assertTrue(mount.mount('name', 'device', fstype='fstype')) -+ mock.assert_called_with('mount -v fstype device name ', -+ python_shell=False, runas=None) - - mock = MagicMock(return_value={'retcode': False, - 'stderr': False}) +@@ -362,7 +405,7 @@ class MountTestCase(TestCase, LoaderModuleMockMixin): with patch.dict(mount.__salt__, {'cmd.run_all': mock}): self.assertTrue(mount.mount('name', 'device')) - def test_remount(self): -+ with patch.dict(mount.__grains__, {'os': 'Linux'}): -+ mock = MagicMock(return_value=True) -+ with patch.object(os.path, 'exists', mock): -+ mock = MagicMock(return_value=None) -+ with patch.dict(mount.__salt__, {'file.mkdir': None}): -+ mock = MagicMock(return_value={'retcode': True, -+ 'stderr': True}) -+ with patch.dict(mount.__salt__, {'cmd.run_all': mock}): -+ self.assertTrue(mount.mount('name', 'device')) -+ mock.assert_called_with('mount -o defaults device name ', -+ python_shell=False, runas=None) -+ -+ with patch.dict(mount.__salt__, {'cmd.run_all': mock}): -+ self.assertTrue(mount.mount('name', 'device', fstype='fstype')) -+ mock.assert_called_with('mount -o defaults -t fstype device name ', -+ python_shell=False, runas=None) -+ -+ mock = MagicMock(return_value={'retcode': False, -+ 'stderr': False}) -+ with patch.dict(mount.__salt__, {'cmd.run_all': mock}): -+ self.assertTrue(mount.mount('name', 'device')) -+ + def test_remount_non_mounted(self): ''' Attempt to remount a device, if the device is not already mounted, mount is called -@@ -345,6 +424,77 @@ class MountTestCase(TestCase, LoaderModuleMockMixin): +@@ -381,6 +424,77 @@ class MountTestCase(TestCase, LoaderModuleMockMixin): with patch.object(mount, 'mount', mock): self.assertTrue(mount.remount('name', 'device')) @@ -13174,7 +13085,7 @@ index 42fe6c6867..d30e064167 100644 with patch.dict(pkg.__salt__, {'pkg.list_upgrades': list_upgrades, diff --git a/tests/unit/test_loader.py b/tests/unit/test_loader.py -index 0f22334559..ba8739a6b2 100644 +index dd0ce8e2e2..38dcb18109 100644 --- a/tests/unit/test_loader.py +++ b/tests/unit/test_loader.py @@ -119,6 +119,97 @@ class LazyLoaderTest(TestCase): @@ -13287,39 +13198,7 @@ index 0f22334559..ba8739a6b2 100644 def test_auth(self): ''' -diff --git a/tests/unit/utils/test_systemd.py b/tests/unit/utils/test_systemd.py -index 248ff44579..bddfee5e54 100644 ---- a/tests/unit/utils/test_systemd.py -+++ b/tests/unit/utils/test_systemd.py -@@ -100,6 +100,27 @@ class SystemdTestCase(TestCase): - self.assertTrue(_systemd.version(context)) - self.assertEqual(context, {'salt.utils.systemd.version': _version}) - -+ def test_version_generated_from_git_describe(self): -+ ''' -+ Test with version string matching versions generated by git describe -+ in systemd. This feature is used in systemd>=241. -+ ''' -+ with patch('subprocess.Popen') as popen_mock: -+ _version = 241 -+ output = 'systemd {0} ({0}.0-0-dist)\n-SYSVINIT'.format(_version) -+ popen_mock.return_value = Mock( -+ communicate=lambda *args, **kwargs: (output, None), -+ pid=lambda: 12345, -+ retcode=0 -+ ) -+ -+ # Test without context dict passed -+ self.assertEqual(_systemd.version(), _version) -+ # Test that context key is set when context dict is passed -+ context = {} -+ self.assertTrue(_systemd.version(context)) -+ self.assertEqual(context, {'salt.utils.systemd.version': _version}) -+ - def test_version_return_from_context(self): - ''' - Test that the context data is returned when present. To ensure we're -- -2.21.0 +2.16.4 diff --git a/read-repo-info-without-using-interpolation-bsc-11356.patch b/read-repo-info-without-using-interpolation-bsc-11356.patch new file mode 100644 index 0000000..5410057 --- /dev/null +++ b/read-repo-info-without-using-interpolation-bsc-11356.patch @@ -0,0 +1,27 @@ +From 53f6eb05bb33117483246cdd199c73954c936e19 Mon Sep 17 00:00:00 2001 +From: Mihai Dinca +Date: Thu, 7 Nov 2019 15:11:49 +0100 +Subject: [PATCH] Read repo info without using interpolation + (bsc#1135656) + +--- + salt/modules/zypperpkg.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/salt/modules/zypperpkg.py b/salt/modules/zypperpkg.py +index a87041aa70..8c1e05c21c 100644 +--- a/salt/modules/zypperpkg.py ++++ b/salt/modules/zypperpkg.py +@@ -1043,7 +1043,7 @@ def _get_repo_info(alias, repos_cfg=None, root=None): + Get one repo meta-data. + ''' + try: +- meta = dict((repos_cfg or _get_configured_repos(root=root)).items(alias)) ++ meta = dict((repos_cfg or _get_configured_repos(root=root)).items(alias, raw=True)) + meta['alias'] = alias + for key, val in six.iteritems(meta): + if val in ['0', '1']: +-- +2.16.4 + + diff --git a/remove-arch-from-name-when-pkg.list_pkgs-is-called-w.patch b/remove-arch-from-name-when-pkg.list_pkgs-is-called-w.patch index a7ebb25..09d62b2 100644 --- a/remove-arch-from-name-when-pkg.list_pkgs-is-called-w.patch +++ b/remove-arch-from-name-when-pkg.list_pkgs-is-called-w.patch @@ -1,4 +1,4 @@ -From 51ccc41dd16564dea5b465d122218ca8047f9f3e Mon Sep 17 00:00:00 2001 +From 560910fbf8a500c501032846d6250a1a633137c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Mon, 19 Nov 2018 11:46:26 +0000 @@ -37,13 +37,13 @@ Remove unnecessary lambda Return None instead empty string for arch and release in pkg.list_pkgs --- - salt/modules/aptpkg.py | 38 ++++++++ - salt/modules/pkg_resource.py | 20 +++- - salt/modules/yumpkg.py | 32 ++++++- - salt/modules/zypperpkg.py | 29 +++++- - tests/unit/modules/test_pkg_resource.py | 116 ++++++++++++++++++++++++ - tests/unit/modules/test_yumpkg.py | 85 ++++++++++++++++- - tests/unit/modules/test_zypperpkg.py | 79 +++++++++++++++- + salt/modules/aptpkg.py | 38 +++++++++++ + salt/modules/pkg_resource.py | 20 ++++-- + salt/modules/yumpkg.py | 32 ++++++++- + salt/modules/zypperpkg.py | 29 +++++++- + tests/unit/modules/test_pkg_resource.py | 116 ++++++++++++++++++++++++++++++++ + tests/unit/modules/test_yumpkg.py | 85 ++++++++++++++++++++++- + tests/unit/modules/test_zypperpkg.py | 79 +++++++++++++++++++++- 7 files changed, 383 insertions(+), 16 deletions(-) diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py @@ -739,6 +739,6 @@ index 3259e1810d..f586c23fd0 100644 ''' Test advisory patches listing. -- -2.20.1 +2.16.4 diff --git a/remove-unnecessary-yield-causing-badyielderror-bsc-1.patch b/remove-unnecessary-yield-causing-badyielderror-bsc-1.patch index 0d1f348..3b3b0d5 100644 --- a/remove-unnecessary-yield-causing-badyielderror-bsc-1.patch +++ b/remove-unnecessary-yield-causing-badyielderror-bsc-1.patch @@ -1,4 +1,4 @@ -From 53d182abfbf7ab1156496481801e5e64e7f112e6 Mon Sep 17 00:00:00 2001 +From 23d21edaf5565d99bb6316087863ecbf6a699034 Mon Sep 17 00:00:00 2001 From: Mihai Dinca Date: Wed, 30 Oct 2019 10:19:12 +0100 Subject: [PATCH] Remove unnecessary yield causing BadYieldError @@ -29,6 +29,6 @@ index 6d0dca1da5..754c257b36 100644 def __del__(self): self.local = None -- -2.23.0 +2.16.4 diff --git a/remove-virt.pool_delete-fast-parameter-178.patch b/remove-virt.pool_delete-fast-parameter-178.patch index 5feae35..1f00c85 100644 --- a/remove-virt.pool_delete-fast-parameter-178.patch +++ b/remove-virt.pool_delete-fast-parameter-178.patch @@ -1,4 +1,4 @@ -From 6dfe6e1370f330c0d300bf0effd7e6cf8a28c734 Mon Sep 17 00:00:00 2001 +From 8d150403ceedd9bf7939bfa9ec1d6790e8ed4609 Mon Sep 17 00:00:00 2001 From: Cedric Bosdonnat Date: Wed, 30 Oct 2019 12:18:51 +0100 Subject: [PATCH] Remove virt.pool_delete fast parameter (#178) @@ -71,6 +71,6 @@ index 4d20e998d8..b95f51807f 100644 + # and thus throwing exceptions. + mock_pool.delete.assert_called_once_with(self.mock_libvirt.VIR_STORAGE_POOL_DELETE_NORMAL) -- -2.23.0 +2.16.4 diff --git a/restore-default-behaviour-of-pkg-list-return.patch b/restore-default-behaviour-of-pkg-list-return.patch index 394479a..66b296d 100644 --- a/restore-default-behaviour-of-pkg-list-return.patch +++ b/restore-default-behaviour-of-pkg-list-return.patch @@ -1,4 +1,4 @@ -From 56fd68474f399a36b0a74ca9a01890649d997792 Mon Sep 17 00:00:00 2001 +From 1da400568977ffc45d4071189658855ee73b4013 Mon Sep 17 00:00:00 2001 From: Jochen Breuer Date: Fri, 30 Aug 2019 14:20:06 +0200 Subject: [PATCH] Restore default behaviour of pkg list return @@ -130,6 +130,6 @@ index f71d6aac9e..da1953b2a5 100644 def list_locks(root=None): -- -2.20.1 +2.16.4 diff --git a/return-the-expected-powerpc-os-arch-bsc-1117995.patch b/return-the-expected-powerpc-os-arch-bsc-1117995.patch index 53a57c2..c4337f0 100644 --- a/return-the-expected-powerpc-os-arch-bsc-1117995.patch +++ b/return-the-expected-powerpc-os-arch-bsc-1117995.patch @@ -1,4 +1,4 @@ -From 2cbc403b422a699cd948ed6218fce28fa901f5fa Mon Sep 17 00:00:00 2001 +From 2140fc26fb347388ac60f91c4badf76a73a8a728 Mon Sep 17 00:00:00 2001 From: Mihai Dinca Date: Thu, 13 Dec 2018 12:17:35 +0100 Subject: [PATCH] Return the expected powerpc os arch (bsc#1117995) @@ -26,6 +26,6 @@ index bb8c3fb589..828b0cecda 100644 def check_32(arch, osarch=None): -- -2.20.1 +2.16.4 diff --git a/run-salt-api-as-user-salt-bsc-1064520.patch b/run-salt-api-as-user-salt-bsc-1064520.patch index 0b448df..d117c8f 100644 --- a/run-salt-api-as-user-salt-bsc-1064520.patch +++ b/run-salt-api-as-user-salt-bsc-1064520.patch @@ -1,4 +1,4 @@ -From e9b5c0ae02552eb9a76488da32217a0e339d86a2 Mon Sep 17 00:00:00 2001 +From 6bec79137c30375d62a2e3238081a9f4a5a8ae1b Mon Sep 17 00:00:00 2001 From: Christian Lanig Date: Mon, 27 Nov 2017 13:10:26 +0100 Subject: [PATCH] Run salt-api as user salt (bsc#1064520) @@ -20,6 +20,6 @@ index 7ca582dfb4..bf513e4dbd 100644 ExecStart=/usr/bin/salt-api TimeoutStopSec=3 -- -2.13.7 +2.16.4 diff --git a/run-salt-master-as-dedicated-salt-user.patch b/run-salt-master-as-dedicated-salt-user.patch index 9266201..a03f972 100644 --- a/run-salt-master-as-dedicated-salt-user.patch +++ b/run-salt-master-as-dedicated-salt-user.patch @@ -1,4 +1,4 @@ -From 3d4be53c265dffdbfaf1d7d4764c361a640fd5ff Mon Sep 17 00:00:00 2001 +From ab1bc69e1454fc78ac9ba8725e61e034d882b5aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Wed, 20 Jan 2016 11:01:06 +0100 Subject: [PATCH] Run salt master as dedicated salt user @@ -10,7 +10,7 @@ Subject: [PATCH] Run salt master as dedicated salt user 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/conf/master b/conf/master -index 149fe8812f..d492aef6df 100644 +index 546db5cb28..573e4213ba 100644 --- a/conf/master +++ b/conf/master @@ -25,7 +25,8 @@ @@ -42,6 +42,6 @@ index 3cd002308e..0d99d1b801 100644 missingok rotate 7 -- -2.13.7 +2.16.4 diff --git a/salt.changes b/salt.changes index 8402240..9929cd2 100644 --- a/salt.changes +++ b/salt.changes @@ -1,3 +1,119 @@ +------------------------------------------------------------------- +Thu Nov 28 15:27:27 UTC 2019 - Mihai Dincă + +- Prevent test_mod_del_repo_multiline_values to fail +- Read repo info without using interpolation (bsc#1135656) +- Requires vs BuildRequires +- Limiting M2Crypto to >= SLE15 +- Replacing pycrypto with M2Crypto +- Fix for log checking in x509 test +- Update to 2019.2.2 release + +- Added: + * fix-for-log-checking-in-x509-test.patch + * prevent-test_mod_del_repo_multiline_values-to-fail.patch + * read-repo-info-without-using-interpolation-bsc-11356.patch + +- Modified: + * async-batch-implementation.patch + * add-hold-unhold-functions.patch + * adds-the-possibility-to-also-use-downloadonly-in-kwa.patch + * decide-if-the-source-should-be-actually-skipped.patch + * allow-passing-kwargs-to-pkg.list_downloaded-bsc-1140.patch + * add-batch_presence_ping_timeout-and-batch_presence_p.patch + * run-salt-master-as-dedicated-salt-user.patch + * run-salt-api-as-user-salt-bsc-1064520.patch + * fix-unit-test-for-grains-core.patch + * add-environment-variable-to-know-if-yum-is-invoked-f.patch + * fix-async-batch-multiple-done-events.patch + * activate-all-beacons-sources-config-pillar-grains.patch + * fix-for-older-mock-module.patch + * do-not-break-repo-files-with-multiple-line-values-on.patch + * fall-back-to-pymysql.patch + * add-missing-fun-for-returns-from-wfunc-executions.patch + * loosen-azure-sdk-dependencies-in-azurearm-cloud-driv.patch + * add-virt.volume_infos-and-virt.volume_delete.patch + * fix-issue-2068-test.patch + * switch-firewalld-state-to-use-change_interface.patch + * make-aptpkg.list_repos-compatible-on-enabled-disable.patch + * fix-ipv6-scope-bsc-1108557.patch + * 2019.2.0-pr-54196-backport-173.patch + * do-not-make-ansiblegate-to-crash-on-python3-minions.patch + * x509-fixes-111.patch + * prevent-ansiblegate-unit-tests-to-fail-on-ubuntu.patch + * fix-zypper.list_pkgs-to-be-aligned-with-pkg-state.patch + * add-cpe_name-for-osversion-grain-parsing-u-49946.patch + * fix-failing-unit-tests-for-batch-async.patch + * temporary-fix-extend-the-whitelist-of-allowed-comman.patch + * improve-batch_async-to-release-consumed-memory-bsc-1.patch + * batch.py-avoid-exception-when-minion-does-not-respon.patch + * preserve-already-defined-destructive_tests-and-expen.patch + * virt.volume_infos-fix-for-single-vm.patch + * move-server_id-deprecation-warning-to-reduce-log-spa.patch + * include-aliases-in-the-fqdns-grains.patch + * don-t-call-zypper-with-more-than-one-no-refresh.patch + * add-custom-suse-capabilities-as-grains.patch + * get-os_arch-also-without-rpm-package-installed.patch + * add-saltssh-multi-version-support-across-python-inte.patch + * accumulated-changes-required-for-yomi-165.patch + * use-adler32-algorithm-to-compute-string-checksums.patch + * remove-arch-from-name-when-pkg.list_pkgs-is-called-w.patch + * use-current-ioloop-for-the-localclient-instance-of-b.patch + * remove-virt.pool_delete-fast-parameter-178.patch + * add-multi-file-support-and-globbing-to-the-filetree-.patch + * use-threadpool-from-multiprocessing.pool-to-avoid-le.patch + * prevent-systemd-run-description-issue-when-running-a.patch + * integration-of-msi-authentication-with-azurearm-clou.patch + * virt.volume_infos-needs-to-ignore-inactive-pools-174.patch + * virt-1.volume_infos-fix-for-single-vm.patch + * add-supportconfig-module-for-remote-calls-and-saltss.patch + * avoid-excessive-syslogging-by-watchdog-cronjob-58.patch + * strip-trailing-from-repo.uri-when-comparing-repos-in.patch + * preserving-signature-in-module.run-state-u-50049.patch + * fix-zypper-pkg.list_pkgs-expectation-and-dpkg-mockin.patch + * fix-aptpkg-systemd-call-bsc-1143301.patch + * calculate-fqdns-in-parallel-to-avoid-blockings-bsc-1.patch + * remove-unnecessary-yield-causing-badyielderror-bsc-1.patch + * debian-info_installed-compatibility-50453.patch + * add-standalone-configuration-file-for-enabling-packa.patch + * accumulated-changes-from-yomi-167.patch + * add-virt.all_capabilities.patch + * fix-memory-leak-produced-by-batch-async-find_jobs-me.patch + * do-not-report-patches-as-installed-when-not-all-the-.patch + * support-config-non-root-permission-issues-fixes-u-50.patch + * add-all_versions-parameter-to-include-all-installed-.patch + * fixes-cve-2018-15750-cve-2018-15751.patch + * fix-bsc-1065792.patch + * enable-passing-a-unix_socket-for-mysql-returners-bsc.patch + * avoid-traceback-when-http.query-request-cannot-be-pe.patch + * restore-default-behaviour-of-pkg-list-return.patch + * take-checksums-arg-into-account-for-postgres.datadir.patch + * early-feature-support-config.patch + * provide-the-missing-features-required-for-yomi-yet-o.patch + * implement-network.fqdns-module-function-bsc-1134860-.patch + * fix-virt.full_info-176.patch + * checking-for-jid-before-returning-data.patch + * virt.volume_infos-silence-libvirt-error-message-175.patch + * do-not-crash-when-there-are-ipv6-established-connect.patch + * fix-for-suse-expanded-support-detection.patch + * fix-a-wrong-rebase-in-test_core.py-180.patch + * add-ppc64le-as-a-valid-rpm-package-architecture.patch + * make-profiles-a-package.patch + * bugfix-any-unicode-string-of-length-16-will-raise-ty.patch + * fix-git_pillar-merging-across-multiple-__env__-repos.patch + * return-the-expected-powerpc-os-arch-bsc-1117995.patch + * fix-async-batch-race-conditions.patch + * do-not-load-pip-state-if-there-is-no-3rd-party-depen.patch + +- Removed: + * fix-syndic-start-issue.patch + * prevent-already-reading-continuous-exception-message.patch + * virt.pool_running-fix-pool-start.patch + * azurefs-gracefully-handle-attributeerror.patch + * virt-handle-whitespaces-in-vm-names.patch + * mount-fix-extra-t-parameter.patch + * try-except-undefineflags-as-this-operation-is-not-su.patch + ------------------------------------------------------------------- Wed Oct 30 11:23:05 UTC 2019 - Pablo Suárez Hernández diff --git a/salt.spec b/salt.spec index 56580da..c762c5c 100644 --- a/salt.spec +++ b/salt.spec @@ -58,7 +58,7 @@ %bcond_with builddocs Name: salt -Version: 2019.2.0 +Version: 2019.2.2 Release: 0 Summary: A parallel remote execution system License: Apache-2.0 @@ -139,137 +139,128 @@ Patch34: add-hold-unhold-functions.patch # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/50401 # NOTE: This is a techpreview as well as in Fluorine! Release only in Neon. Patch35: add-supportconfig-module-for-remote-calls-and-saltss.patch -# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/50567 -Patch36: azurefs-gracefully-handle-attributeerror.patch # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/116 -Patch37: return-the-expected-powerpc-os-arch-bsc-1117995.patch +Patch36: return-the-expected-powerpc-os-arch-bsc-1117995.patch # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51108 -Patch38: remove-arch-from-name-when-pkg.list_pkgs-is-called-w.patch +Patch37: remove-arch-from-name-when-pkg.list_pkgs-is-called-w.patch # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51119 -Patch39: fix-issue-2068-test.patch +Patch38: fix-issue-2068-test.patch # PATCH_FIX_OPENSUSE: Temporary fix allowing "id_" and "force" params while upstrem figures it out -Patch40: temporary-fix-extend-the-whitelist-of-allowed-comman.patch +Patch39: temporary-fix-extend-the-whitelist-of-allowed-comman.patch # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51382 -Patch41: don-t-call-zypper-with-more-than-one-no-refresh.patch +Patch40: don-t-call-zypper-with-more-than-one-no-refresh.patch # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/50109 # PATCH_FIX_OPENSUSE https://github.com/openSUSE/salt/pull/121 -Patch42: add-virt.all_capabilities.patch +Patch41: add-virt.all_capabilities.patch # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51691 -Patch43: add-virt.volume_infos-and-virt.volume_delete.patch +Patch42: add-virt.volume_infos-and-virt.volume_delete.patch # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51384 -Patch44: include-aliases-in-the-fqdns-grains.patch +Patch43: include-aliases-in-the-fqdns-grains.patch # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/50546 # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51863 -Patch45: async-batch-implementation.patch -# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51905 -Patch46: mount-fix-extra-t-parameter.patch +Patch44: async-batch-implementation.patch # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/52527 -Patch47: calculate-fqdns-in-parallel-to-avoid-blockings-bsc-1.patch +Patch45: calculate-fqdns-in-parallel-to-avoid-blockings-bsc-1.patch #PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/139 -Patch48: fix-async-batch-race-conditions.patch +Patch46: fix-async-batch-race-conditions.patch #PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/141 -Patch49: add-batch_presence_ping_timeout-and-batch_presence_p.patch +Patch47: add-batch_presence_ping_timeout-and-batch_presence_p.patch #PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52657 -Patch50: do-not-report-patches-as-installed-when-not-all-the-.patch +Patch48: do-not-report-patches-as-installed-when-not-all-the-.patch # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/52527 -Patch51: use-threadpool-from-multiprocessing.pool-to-avoid-le.patch -# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/52519 (partial porting) -Patch52: fix-syndic-start-issue.patch +Patch49: use-threadpool-from-multiprocessing.pool-to-avoid-le.patch # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/52888 -Patch53: do-not-crash-when-there-are-ipv6-established-connect.patch +Patch50: do-not-crash-when-there-are-ipv6-established-connect.patch # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/144 # PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52855 -Patch54: fix-async-batch-multiple-done-events.patch +Patch51: fix-async-batch-multiple-done-events.patch # PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52743 -Patch55: switch-firewalld-state-to-use-change_interface.patch +Patch52: switch-firewalld-state-to-use-change_interface.patch # PATCH-FIX_OPENSUSE -Patch56: add-standalone-configuration-file-for-enabling-packa.patch +Patch53: add-standalone-configuration-file-for-enabling-packa.patch # PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53237 -Patch57: add-ppc64le-as-a-valid-rpm-package-architecture.patch +Patch54: add-ppc64le-as-a-valid-rpm-package-architecture.patch # PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53293 -Patch58: do-not-break-repo-files-with-multiple-line-values-on.patch +Patch55: do-not-break-repo-files-with-multiple-line-values-on.patch # PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53343 -Patch59: preserve-already-defined-destructive_tests-and-expen.patch +Patch56: preserve-already-defined-destructive_tests-and-expen.patch # PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53159 -Patch60: batch.py-avoid-exception-when-minion-does-not-respon.patch +Patch57: batch.py-avoid-exception-when-minion-does-not-respon.patch # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53471 -Patch61: fix-zypper-pkg.list_pkgs-expectation-and-dpkg-mockin.patch -# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/142 -Patch62: try-except-undefineflags-as-this-operation-is-not-su.patch -# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52160 -Patch63: virt-handle-whitespaces-in-vm-names.patch -# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52341 -Patch64: virt.pool_running-fix-pool-start.patch +Patch58: fix-zypper-pkg.list_pkgs-expectation-and-dpkg-mockin.patch # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52414 -Patch65: virt.volume_infos-fix-for-single-vm.patch +Patch59: virt.volume_infos-fix-for-single-vm.patch # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/161 -Patch66: provide-the-missing-features-required-for-yomi-yet-o.patch +Patch60: provide-the-missing-features-required-for-yomi-yet-o.patch # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53661 -Patch67: do-not-make-ansiblegate-to-crash-on-python3-minions.patch +Patch61: do-not-make-ansiblegate-to-crash-on-python3-minions.patch # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53693 -Patch68: allow-passing-kwargs-to-pkg.list_downloaded-bsc-1140.patch +Patch62: allow-passing-kwargs-to-pkg.list_downloaded-bsc-1140.patch # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53661 -Patch69: prevent-ansiblegate-unit-tests-to-fail-on-ubuntu.patch +Patch63: prevent-ansiblegate-unit-tests-to-fail-on-ubuntu.patch # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53755 -Patch70: virt-1.volume_infos-fix-for-single-vm.patch +Patch64: virt-1.volume_infos-fix-for-single-vm.patch # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52459 -Patch71: checking-for-jid-before-returning-data.patch +Patch65: checking-for-jid-before-returning-data.patch # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54048 -Patch72: avoid-traceback-when-http.query-request-cannot-be-pe.patch +Patch66: avoid-traceback-when-http.query-request-cannot-be-pe.patch # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53992 # https://github.com/saltstack/salt/pull/53996 # https://github.com/saltstack/salt/pull/54022 # https://github.com/saltstack/salt/pull/54024 -Patch73: accumulated-changes-required-for-yomi-165.patch -# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/177 -Patch74: restore-default-behaviour-of-pkg-list-return.patch -# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/6af07030a502c427781991fc9a2b994fa04ef32e -Patch75: fix-memory-leak-produced-by-batch-async-find_jobs-me.patch +Patch67: accumulated-changes-required-for-yomi-165.patch # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/159 -Patch76: move-server_id-deprecation-warning-to-reduce-log-spa.patch +Patch68: move-server_id-deprecation-warning-to-reduce-log-spa.patch # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54077 # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/166 -Patch77: fix-aptpkg-systemd-call-bsc-1143301.patch +Patch69: fix-aptpkg-systemd-call-bsc-1143301.patch # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/170 -Patch78: strip-trailing-from-repo.uri-when-comparing-repos-in.patch +Patch70: strip-trailing-from-repo.uri-when-comparing-repos-in.patch +# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/177 +Patch71: restore-default-behaviour-of-pkg-list-return.patch # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/172 -Patch79: implement-network.fqdns-module-function-bsc-1134860-.patch +Patch72: implement-network.fqdns-module-function-bsc-1134860-.patch # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/173 -Patch80: 2019.2.0-pr-54196-backport-173.patch +Patch73: 2019.2.0-pr-54196-backport-173.patch # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/174 -Patch81: virt.volume_infos-needs-to-ignore-inactive-pools-174.patch +Patch74: virt.volume_infos-needs-to-ignore-inactive-pools-174.patch # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/175 -Patch82: virt.volume_infos-silence-libvirt-error-message-175.patch +Patch75: virt.volume_infos-silence-libvirt-error-message-175.patch # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/176 -Patch83: fix-virt.full_info-176.patch +Patch76: fix-virt.full_info-176.patch +# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/6af07030a502c427781991fc9a2b994fa04ef32e +Patch77: fix-memory-leak-produced-by-batch-async-find_jobs-me.patch # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/002543df392f65d95dbc127dc058ac897f2035ed -Patch84: improve-batch_async-to-release-consumed-memory-bsc-1.patch +Patch78: improve-batch_async-to-release-consumed-memory-bsc-1.patch # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54770 -Patch85: take-checksums-arg-into-account-for-postgres.datadir.patch +Patch79: take-checksums-arg-into-account-for-postgres.datadir.patch # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54077 # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/44a91c2ce6df78d93ce0ef659dedb0e41b1c2e04 -Patch86: prevent-systemd-run-description-issue-when-running-a.patch +Patch80: prevent-systemd-run-description-issue-when-running-a.patch # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/55d8a777d6a9b19c959e14a4060e5579e92cd106 -Patch87: use-current-ioloop-for-the-localclient-instance-of-b.patch +Patch81: use-current-ioloop-for-the-localclient-instance-of-b.patch # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/8378bb24a5a53973e8dba7658b8b3465d967329f -Patch88: fix-failing-unit-tests-for-batch-async.patch +Patch82: fix-failing-unit-tests-for-batch-async.patch # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54935 -Patch89: add-missing-fun-for-returns-from-wfunc-executions.patch +Patch83: add-missing-fun-for-returns-from-wfunc-executions.patch # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/179 -Patch90: adds-the-possibility-to-also-use-downloadonly-in-kwa.patch +Patch84: adds-the-possibility-to-also-use-downloadonly-in-kwa.patch # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53326 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54954 -Patch91: accumulated-changes-from-yomi-167.patch +Patch85: accumulated-changes-from-yomi-167.patch # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/180 -Patch92: fix-a-wrong-rebase-in-test_core.py-180.patch +Patch86: fix-a-wrong-rebase-in-test_core.py-180.patch # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/181 -Patch93: fix-for-older-mock-module.patch -# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/6c84612b52b5f14e74a1c44f03d78a85c6f0c5dc -Patch94: prevent-already-reading-continuous-exception-message.patch +Patch87: fix-for-older-mock-module.patch # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/182 -Patch95: remove-unnecessary-yield-causing-badyielderror-bsc-1.patch +Patch88: remove-unnecessary-yield-causing-badyielderror-bsc-1.patch # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54475 -Patch96: remove-virt.pool_delete-fast-parameter-178.patch +Patch89: remove-virt.pool_delete-fast-parameter-178.patch +# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/186 +Patch90: read-repo-info-without-using-interpolation-bsc-11356.patch +# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53293 +Patch91: prevent-test_mod_del_repo_multiline_values-to-fail.patch +Patch92: fix-for-log-checking-in-x509-test.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: logrotate @@ -377,7 +368,11 @@ BuildConflicts: python3-tornado >= 5 %endif # requirements/zeromq.txt -BuildRequires: python-pycrypto >= 2.6.1 +%if 0%{?suse_version} >= 1500 +BuildRequires: python2-M2Crypto +%else +BuildRequires: python-pycrypto >= 2.6.1 +%endif BuildRequires: python-pyzmq >= 2.2.0 %if %{with test} # requirements/dev_python27.txt @@ -430,7 +425,11 @@ Suggests: python-timelib Suggests: python-gnupg # requirements/zeromq.txt %endif +%if 0%{?suse_version} >= 1500 +Requires: python2-M2Crypto +%else Requires: python-pycrypto >= 2.6.1 +%endif Requires: python-pyzmq >= 2.2.0 # %if 0%{?suse_version} @@ -465,8 +464,12 @@ BuildRequires: python3-Jinja2 BuildRequires: python3-MarkupSafe BuildRequires: python3-msgpack-python > 0.3 BuildRequires: python3-pyzmq >= 2.2.0 +%if 0%{?suse_version} >= 1500 +BuildRequires: python3-M2Crypto +%else BuildRequires: python3-pycrypto >= 2.6.1 %endif +%endif BuildRequires: python3-PyYAML BuildRequires: python3-psutil BuildRequires: python3-requests >= 1.0.0 @@ -517,7 +520,11 @@ Requires: yum-plugin-security Requires: python3-Jinja2 Requires: python3-MarkupSafe Requires: python3-msgpack-python > 0.3 +%if 0%{?suse_version} >= 1500 +Requires: python3-M2Crypto +%else Requires: python3-pycrypto >= 2.6.1 +%endif Requires: python3-pyzmq >= 2.2.0 %endif Requires: python3-PyYAML @@ -767,7 +774,7 @@ This package adds the standalone configuration for the Salt master in order to m %prep # %setup -q -n salt-%{version} -%setup -q -n salt-2019.2.0-suse +%setup -q -n salt-2019.2.2-suse cp %{S:1} . cp %{S:5} ./.travis.yml %patch1 -p1 @@ -862,10 +869,6 @@ cp %{S:5} ./.travis.yml %patch90 -p1 %patch91 -p1 %patch92 -p1 -%patch93 -p1 -%patch94 -p1 -%patch95 -p1 -%patch96 -p1 %build %if 0%{?build_py2} diff --git a/strip-trailing-from-repo.uri-when-comparing-repos-in.patch b/strip-trailing-from-repo.uri-when-comparing-repos-in.patch index 301642e..0573e04 100644 --- a/strip-trailing-from-repo.uri-when-comparing-repos-in.patch +++ b/strip-trailing-from-repo.uri-when-comparing-repos-in.patch @@ -1,4 +1,4 @@ -From 1b6f3f2e8b88ddfaebd5bfd1ae8258d417a9f098 Mon Sep 17 00:00:00 2001 +From 1cdaeb8613132c020364b7078448834be7bbb705 Mon Sep 17 00:00:00 2001 From: Matei Albu Date: Fri, 15 Feb 2019 14:34:13 +0100 Subject: [PATCH] Strip trailing "/" from repo.uri when comparing repos @@ -23,6 +23,6 @@ index b7c1a342ef..d49a48310e 100644 if repo_matches or kw_matches: -- -2.20.1 +2.16.4 diff --git a/support-config-non-root-permission-issues-fixes-u-50.patch b/support-config-non-root-permission-issues-fixes-u-50.patch index a5aa8bf..0896c8f 100644 --- a/support-config-non-root-permission-issues-fixes-u-50.patch +++ b/support-config-non-root-permission-issues-fixes-u-50.patch @@ -1,4 +1,4 @@ -From 1113909fe9ab0509ebe439051238d6a4f95d3c54 Mon Sep 17 00:00:00 2001 +From f5d743b6a2a0dd2066e33d0a0ea13bfccc9ae9b0 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Wed, 17 Oct 2018 14:10:47 +0200 Subject: [PATCH] Support-config non-root permission issues fixes @@ -12,7 +12,7 @@ Catch overwriting exiting archive error by other users Suppress excessive tracebacks on error log level --- - salt/cli/support/collector.py | 39 ++++++++++++++++++++++++++++++++--- + salt/cli/support/collector.py | 39 ++++++++++++++++++++++++++++++++++++--- salt/utils/parsers.py | 2 +- 2 files changed, 37 insertions(+), 4 deletions(-) @@ -88,10 +88,10 @@ index 478d07e13b..a4343297b6 100644 else: self.out.warning('File {} already exists.'.format(self.config['support_archive'])) diff --git a/salt/utils/parsers.py b/salt/utils/parsers.py -index 56a8961c3a..058346a9f4 100644 +index aa13310d5a..901bbbea55 100644 --- a/salt/utils/parsers.py +++ b/salt/utils/parsers.py -@@ -1922,7 +1922,7 @@ class SaltSupportOptionParser(six.with_metaclass(OptionParserMeta, OptionParser, +@@ -1961,7 +1961,7 @@ class SaltSupportOptionParser(six.with_metaclass(OptionParserMeta, OptionParser, ''' _opts, _args = optparse.OptionParser.parse_args(self) configs = self.find_existing_configs(_opts.support_unit) @@ -101,6 +101,6 @@ index 56a8961c3a..058346a9f4 100644 return config.master_config(self.get_config_file_path(cfg)) -- -2.19.0 +2.16.4 diff --git a/switch-firewalld-state-to-use-change_interface.patch b/switch-firewalld-state-to-use-change_interface.patch index 99aaa5f..116a498 100644 --- a/switch-firewalld-state-to-use-change_interface.patch +++ b/switch-firewalld-state-to-use-change_interface.patch @@ -1,4 +1,4 @@ -From ee499612e1302b908a64dde696065b0093fe3115 Mon Sep 17 00:00:00 2001 +From d21552ca35f9f90acc12e907251ed5ded3c2a5f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Mon, 20 May 2019 11:59:39 +0100 @@ -68,6 +68,6 @@ index 4623798658..fc5b233f98 100644 ret['comment'] = 'Error: {0}'.format(err) return ret -- -2.17.1 +2.16.4 diff --git a/take-checksums-arg-into-account-for-postgres.datadir.patch b/take-checksums-arg-into-account-for-postgres.datadir.patch index 79d6cd6..1e241a7 100644 --- a/take-checksums-arg-into-account-for-postgres.datadir.patch +++ b/take-checksums-arg-into-account-for-postgres.datadir.patch @@ -1,4 +1,4 @@ -From 7ed3e99a4979a13c7142ed5ba73c09a282e03147 Mon Sep 17 00:00:00 2001 +From 34659b17ef083021c582ec0e7d225f94e409b500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Thu, 26 Sep 2019 15:57:58 +0100 @@ -36,6 +36,6 @@ index 03fb7fddfd..6f10fcf2e0 100644 ) self.assertTrue(ret) -- -2.22.0 +2.16.4 diff --git a/temporary-fix-extend-the-whitelist-of-allowed-comman.patch b/temporary-fix-extend-the-whitelist-of-allowed-comman.patch index ab06a9c..afea0f4 100644 --- a/temporary-fix-extend-the-whitelist-of-allowed-comman.patch +++ b/temporary-fix-extend-the-whitelist-of-allowed-comman.patch @@ -1,4 +1,4 @@ -From c9c50ab75b4a8a73f57e8c2eeaa24401409e8c3c Mon Sep 17 00:00:00 2001 +From 6a3a1b36ba7157a6318084bd67acda3ad9f9556e Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Thu, 24 Jan 2019 18:12:35 +0100 Subject: [PATCH] temporary fix: extend the whitelist of allowed commands @@ -8,10 +8,10 @@ Subject: [PATCH] temporary fix: extend the whitelist of allowed commands 1 file changed, 2 insertions(+) diff --git a/salt/auth/__init__.py b/salt/auth/__init__.py -index ca7168d00e..aa4c5c3670 100644 +index cf5e2deb9c..d43c57338c 100644 --- a/salt/auth/__init__.py +++ b/salt/auth/__init__.py -@@ -46,6 +46,8 @@ AUTH_INTERNAL_KEYWORDS = frozenset([ +@@ -47,6 +47,8 @@ AUTH_INTERNAL_KEYWORDS = frozenset([ 'gather_job_timeout', 'kwarg', 'match', @@ -21,6 +21,6 @@ index ca7168d00e..aa4c5c3670 100644 'print_event', 'raw', -- -2.20.1 +2.16.4 diff --git a/try-except-undefineflags-as-this-operation-is-not-su.patch b/try-except-undefineflags-as-this-operation-is-not-su.patch deleted file mode 100644 index bc5f693..0000000 --- a/try-except-undefineflags-as-this-operation-is-not-su.patch +++ /dev/null @@ -1,31 +0,0 @@ -From e0bded83fa691c3b972fa4c22b14c5ac0a7a3f13 Mon Sep 17 00:00:00 2001 -From: Jeroen Schutrup -Date: Sun, 12 Aug 2018 19:43:22 +0200 -Subject: [PATCH] Try/except undefineFlags() as this operation is not - supported on bhyve - -(cherry picked from commit 29a44aceb1a73347ac07dd241b4a64a4a38cef6e) ---- - salt/modules/virt.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/salt/modules/virt.py b/salt/modules/virt.py -index a3f625909d..423016cd90 100644 ---- a/salt/modules/virt.py -+++ b/salt/modules/virt.py -@@ -3189,7 +3189,10 @@ def purge(vm_, dirs=False, removables=None, **kwargs): - shutil.rmtree(dir_) - if getattr(libvirt, 'VIR_DOMAIN_UNDEFINE_NVRAM', False): - # This one is only in 1.2.8+ -- dom.undefineFlags(libvirt.VIR_DOMAIN_UNDEFINE_NVRAM) -+ try: -+ dom.undefineFlags(libvirt.VIR_DOMAIN_UNDEFINE_NVRAM) -+ except Exception: -+ dom.undefine() - else: - dom.undefine() - conn.close() --- -2.21.0 - - diff --git a/use-adler32-algorithm-to-compute-string-checksums.patch b/use-adler32-algorithm-to-compute-string-checksums.patch index a916c36..6f21551 100644 --- a/use-adler32-algorithm-to-compute-string-checksums.patch +++ b/use-adler32-algorithm-to-compute-string-checksums.patch @@ -1,4 +1,4 @@ -From 9d09fcb60b8babd415af76812c93d38b6cbce661 Mon Sep 17 00:00:00 2001 +From 815042712007e3bc9e5326b3a13b2880534630b9 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Sat, 28 Jul 2018 22:59:04 +0200 Subject: [PATCH] Use Adler32 algorithm to compute string checksums @@ -15,15 +15,15 @@ Choose CRC method, default to faster but less reliable "adler32", if crc is in u Add warning for Sodium. --- - salt/config/__init__.py | 7 +++++- - salt/grains/core.py | 53 +++++++++++++++++++++++++++-------------- + salt/config/__init__.py | 7 ++++++- + salt/grains/core.py | 53 ++++++++++++++++++++++++++++++++----------------- 2 files changed, 41 insertions(+), 19 deletions(-) diff --git a/salt/config/__init__.py b/salt/config/__init__.py -index 6b74b90ce0..5d0c18b5d1 100644 +index b3dfc8e43d..ee90eb3120 100644 --- a/salt/config/__init__.py +++ b/salt/config/__init__.py -@@ -1212,6 +1212,10 @@ VALID_OPTS = { +@@ -1217,6 +1217,10 @@ VALID_OPTS = { # Thorium top file location 'thorium_top': six.string_types, @@ -34,7 +34,7 @@ index 6b74b90ce0..5d0c18b5d1 100644 } # default configurations -@@ -1520,7 +1524,8 @@ DEFAULT_MINION_OPTS = { +@@ -1525,7 +1529,8 @@ DEFAULT_MINION_OPTS = { }, 'discovery': False, 'schedule': {}, @@ -45,7 +45,7 @@ index 6b74b90ce0..5d0c18b5d1 100644 DEFAULT_MASTER_OPTS = { diff --git a/salt/grains/core.py b/salt/grains/core.py -index 85a929a485..378d3cb786 100644 +index 82cd3fb657..cd7ee39d2f 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py @@ -20,6 +20,7 @@ import platform @@ -56,7 +56,7 @@ index 85a929a485..378d3cb786 100644 from errno import EACCES, EPERM import datetime import warnings -@@ -61,6 +62,7 @@ import salt.utils.path +@@ -62,6 +63,7 @@ import salt.utils.path import salt.utils.pkg.rpm import salt.utils.platform import salt.utils.stringutils @@ -64,7 +64,7 @@ index 85a929a485..378d3cb786 100644 from salt.ext import six from salt.ext.six.moves import range -@@ -2730,40 +2732,55 @@ def _hw_data(osdata): +@@ -2785,40 +2787,55 @@ def _hw_data(osdata): return grains @@ -139,6 +139,6 @@ index 85a929a485..378d3cb786 100644 def get_master(): -- -2.20.1 +2.16.4 diff --git a/use-current-ioloop-for-the-localclient-instance-of-b.patch b/use-current-ioloop-for-the-localclient-instance-of-b.patch index 945ff8b..24aa47a 100644 --- a/use-current-ioloop-for-the-localclient-instance-of-b.patch +++ b/use-current-ioloop-for-the-localclient-instance-of-b.patch @@ -1,4 +1,4 @@ -From 55d8a777d6a9b19c959e14a4060e5579e92cd106 Mon Sep 17 00:00:00 2001 +From 1947ddfd6883de285c82ba4bb6423454216e37c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Thu, 3 Oct 2019 15:19:02 +0100 @@ -31,6 +31,6 @@ index 2bb50459c8..f9e736f804 100644 self.ioloop = None gc.collect() -- -2.22.0 +2.16.4 diff --git a/use-threadpool-from-multiprocessing.pool-to-avoid-le.patch b/use-threadpool-from-multiprocessing.pool-to-avoid-le.patch index 39783b4..e8cefd3 100644 --- a/use-threadpool-from-multiprocessing.pool-to-avoid-le.patch +++ b/use-threadpool-from-multiprocessing.pool-to-avoid-le.patch @@ -1,4 +1,4 @@ -From cd8e175738f7742fbb7c9e9d329039371bc0e579 Mon Sep 17 00:00:00 2001 +From a4735644b2e6527e36796722516540f153ccabb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Tue, 30 Apr 2019 10:51:42 +0100 @@ -10,19 +10,19 @@ Subject: [PATCH] Use ThreadPool from multiprocessing.pool to avoid 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/salt/grains/core.py b/salt/grains/core.py -index 796458939d..fec7b204bc 100644 +index ac66a437fd..38b82b7f7c 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py -@@ -26,7 +26,7 @@ from errno import EACCES, EPERM - import datetime +@@ -27,7 +27,7 @@ import datetime import warnings + import time -from multiprocessing.dummy import Pool as ThreadPool +from multiprocessing.pool import ThreadPool # pylint: disable=import-error try: -@@ -2225,10 +2225,14 @@ def fqdns(): +@@ -2280,10 +2280,14 @@ def fqdns(): # Create a ThreadPool to process the underlying calls to 'socket.gethostbyaddr' in parallel. # This avoid blocking the execution when the "fqdn" is not defined for certains IP addresses, which was causing # that "socket.timeout" was reached multiple times secuencially, blocking execution for several seconds. @@ -42,6 +42,6 @@ index 796458939d..fec7b204bc 100644 for item in results: if item: -- -2.17.1 +2.16.4 diff --git a/v2019.2.0.tar.gz b/v2019.2.0.tar.gz deleted file mode 100644 index bf375cb..0000000 --- a/v2019.2.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:263b7f6fd915eb8876795714cc4d2b6bb8ccb97423858b479eefb1c5429424d5 -size 15065369 diff --git a/v2019.2.2.tar.gz b/v2019.2.2.tar.gz new file mode 100644 index 0000000..0441085 --- /dev/null +++ b/v2019.2.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aced5a5a79def23af3d4bd7a77bd9cb3e14a1e5b2dd57a72a67c5242930fa2a4 +size 14656820 diff --git a/virt-1.volume_infos-fix-for-single-vm.patch b/virt-1.volume_infos-fix-for-single-vm.patch index 7d95686..38dc525 100644 --- a/virt-1.volume_infos-fix-for-single-vm.patch +++ b/virt-1.volume_infos-fix-for-single-vm.patch @@ -1,12 +1,12 @@ -From 9fcf9a768d0f11e04e145612cc5b2c05cfbf5378 Mon Sep 17 00:00:00 2001 +From 4e32b8efa3ef393f2d19d5f06a16668a514044c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Date: Thu, 4 Apr 2019 16:18:58 +0200 Subject: [PATCH] virt.volume_infos fix for single VM virt.volume_infos: don't raise an error if there is no VM --- - salt/modules/virt.py | 8 ++++-- - tests/unit/modules/test_virt.py | 46 +++++++++++++++++++++++++++++++++ + salt/modules/virt.py | 8 +++++-- + tests/unit/modules/test_virt.py | 46 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/salt/modules/virt.py b/salt/modules/virt.py @@ -86,6 +86,6 @@ index cc62b67918..b343b9bc31 100644 ''' Test virt.volume_delete -- -2.21.0 +2.16.4 diff --git a/virt-handle-whitespaces-in-vm-names.patch b/virt-handle-whitespaces-in-vm-names.patch deleted file mode 100644 index c20ef5f..0000000 --- a/virt-handle-whitespaces-in-vm-names.patch +++ /dev/null @@ -1,243 +0,0 @@ -From fbad82a38b4460260726cb3b9456cad7986eb4cd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= -Date: Wed, 13 Mar 2019 09:43:51 +0100 -Subject: [PATCH] virt: handle whitespaces in VM names - -The disk creation code is now ready to handle whitespaces in virtual -machine name. ---- - salt/modules/virt.py | 8 +++--- - tests/unit/modules/test_virt.py | 46 ++++++++++++++++----------------- - 2 files changed, 27 insertions(+), 27 deletions(-) - -diff --git a/salt/modules/virt.py b/salt/modules/virt.py -index 423016cd90..d160f0905f 100644 ---- a/salt/modules/virt.py -+++ b/salt/modules/virt.py -@@ -760,14 +760,14 @@ def _qemu_image_create(disk, create_overlay=False, saltenv='base'): - - qcow2 = False - if salt.utils.path.which('qemu-img'): -- res = __salt__['cmd.run']('qemu-img info {}'.format(sfn)) -+ res = __salt__['cmd.run']('qemu-img info "{}"'.format(sfn)) - imageinfo = salt.utils.yaml.safe_load(res) - qcow2 = imageinfo['file format'] == 'qcow2' - try: - if create_overlay and qcow2: - log.info('Cloning qcow2 image %s using copy on write', sfn) - __salt__['cmd.run']( -- 'qemu-img create -f qcow2 -o backing_file={0} {1}' -+ 'qemu-img create -f qcow2 -o backing_file="{0}" "{1}"' - .format(sfn, img_dest).split()) - else: - log.debug('Copying %s to %s', sfn, img_dest) -@@ -778,7 +778,7 @@ def _qemu_image_create(disk, create_overlay=False, saltenv='base'): - if disk_size and qcow2: - log.debug('Resize qcow2 image to %sM', disk_size) - __salt__['cmd.run']( -- 'qemu-img resize {0} {1}M' -+ 'qemu-img resize "{0}" {1}M' - .format(img_dest, disk_size) - ) - -@@ -800,7 +800,7 @@ def _qemu_image_create(disk, create_overlay=False, saltenv='base'): - if disk_size: - log.debug('Create empty image with size %sM', disk_size) - __salt__['cmd.run']( -- 'qemu-img create -f {0} {1} {2}M' -+ 'qemu-img create -f {0} "{1}" {2}M' - .format(disk.get('format', 'qcow2'), img_dest, disk_size) - ) - else: -diff --git a/tests/unit/modules/test_virt.py b/tests/unit/modules/test_virt.py -index bbe8d813d7..cc62b67918 100644 ---- a/tests/unit/modules/test_virt.py -+++ b/tests/unit/modules/test_virt.py -@@ -1106,7 +1106,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - with patch.dict(virt.__salt__, {'cmd.run': mock_run}): # pylint: disable=no-member - - # Ensure the init() function allows creating VM without NIC and disk -- virt.init('testvm', -+ virt.init('test vm', - 2, - 1234, - nic=None, -@@ -1120,7 +1120,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - # Test case creating disks - defineMock.reset_mock() - mock_run.reset_mock() -- virt.init('testvm', -+ virt.init('test vm', - 2, - 1234, - nic=None, -@@ -1134,10 +1134,10 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - definition = ET.fromstring(defineMock.call_args_list[0][0][0]) - disk_sources = [disk.find('source').get('file') if disk.find('source') is not None else None - for disk in definition.findall('./devices/disk')] -- expected_disk_path = os.path.join(root_dir, 'testvm_system.qcow2') -+ expected_disk_path = os.path.join(root_dir, 'test vm_system.qcow2') - self.assertEqual(disk_sources, [expected_disk_path, None]) - self.assertEqual(mock_run.call_args[0][0], -- 'qemu-img create -f qcow2 {0} 10240M'.format(expected_disk_path)) -+ 'qemu-img create -f qcow2 "{0}" 10240M'.format(expected_disk_path)) - self.assertEqual(mock_chmod.call_args[0][0], expected_disk_path) - - def test_update(self): -@@ -1147,7 +1147,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - root_dir = os.path.join(salt.syspaths.ROOT_DIR, 'srv', 'salt-images') - xml = ''' - -- myvm -+ my vm - 1048576 - 1048576 - 1 -@@ -1157,7 +1157,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - - - -- -+ - - - -@@ -1165,7 +1165,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - - - -- -+ - - - -@@ -1198,7 +1198,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - - - '''.format(root_dir, os.sep) -- domain_mock = self.set_mock_vm('myvm', xml) -+ domain_mock = self.set_mock_vm('my vm', xml) - domain_mock.OSType = MagicMock(return_value='hvm') - define_mock = MagicMock(return_value=True) - self.mock_conn.defineXML = define_mock -@@ -1211,7 +1211,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - 'cpu': True, - 'disk': {'attached': [], 'detached': []}, - 'interface': {'attached': [], 'detached': []} -- }, virt.update('myvm', cpu=2)) -+ }, virt.update('my vm', cpu=2)) - setxml = ET.fromstring(define_mock.call_args[0][0]) - self.assertEqual(setxml.find('vcpu').text, '2') - self.assertEqual(setvcpus_mock.call_args[0][0], 2) -@@ -1225,7 +1225,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - 'mem': True, - 'disk': {'attached': [], 'detached': []}, - 'interface': {'attached': [], 'detached': []} -- }, virt.update('myvm', mem=2048)) -+ }, virt.update('my vm', mem=2048)) - setxml = ET.fromstring(define_mock.call_args[0][0]) - self.assertEqual(setxml.find('memory').text, '2048') - self.assertEqual(setxml.find('memory').get('unit'), 'MiB') -@@ -1240,21 +1240,21 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - mock_run = MagicMock() - with patch.dict(os.__dict__, {'chmod': mock_chmod, 'makedirs': MagicMock()}): # pylint: disable=no-member - with patch.dict(virt.__salt__, {'cmd.run': mock_run}): # pylint: disable=no-member -- ret = virt.update('myvm', disk_profile='default', disks=[ -+ ret = virt.update('my vm', disk_profile='default', disks=[ - {'name': 'cddrive', 'device': 'cdrom', 'source_file': None, 'model': 'ide'}, - {'name': 'added', 'size': 2048}]) - added_disk_path = os.path.join( -- virt.__salt__['config.get']('virt:images'), 'myvm_added.qcow2') # pylint: disable=no-member -+ virt.__salt__['config.get']('virt:images'), 'my vm_added.qcow2') # pylint: disable=no-member - self.assertEqual(mock_run.call_args[0][0], -- 'qemu-img create -f qcow2 {0} 2048M'.format(added_disk_path)) -+ 'qemu-img create -f qcow2 "{0}" 2048M'.format(added_disk_path)) - self.assertEqual(mock_chmod.call_args[0][0], added_disk_path) - self.assertListEqual( -- [None, os.path.join(root_dir, 'myvm_added.qcow2')], -+ [None, os.path.join(root_dir, 'my vm_added.qcow2')], - [ET.fromstring(disk).find('source').get('file') if str(disk).find(' -1 else None - for disk in ret['disk']['attached']]) - - self.assertListEqual( -- [os.path.join(root_dir, 'myvm_data.qcow2')], -+ [os.path.join(root_dir, 'my vm_data.qcow2')], - [ET.fromstring(disk).find('source').get('file') for disk in ret['disk']['detached']]) - self.assertEqual(devattach_mock.call_count, 2) - devdetach_mock.assert_called_once() -@@ -1271,7 +1271,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - devattach_mock.reset_mock() - devdetach_mock.reset_mock() - with patch.dict(salt.modules.config.__opts__, mock_config): # pylint: disable=no-member -- ret = virt.update('myvm', nic_profile='myprofile', -+ ret = virt.update('my vm', nic_profile='myprofile', - interfaces=[{'name': 'eth0', 'type': 'network', 'source': 'default', - 'mac': '52:54:00:39:02:b1'}, - {'name': 'eth1', 'type': 'network', 'source': 'newnet'}]) -@@ -1285,7 +1285,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - # Remove nics case - devattach_mock.reset_mock() - devdetach_mock.reset_mock() -- ret = virt.update('myvm', nic_profile=None, interfaces=[]) -+ ret = virt.update('my vm', nic_profile=None, interfaces=[]) - self.assertEqual([], ret['interface']['attached']) - self.assertEqual(2, len(ret['interface']['detached'])) - devattach_mock.assert_not_called() -@@ -1294,7 +1294,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - # Remove disks case (yeah, it surely is silly) - devattach_mock.reset_mock() - devdetach_mock.reset_mock() -- ret = virt.update('myvm', disk_profile=None, disks=[]) -+ ret = virt.update('my vm', disk_profile=None, disks=[]) - self.assertEqual([], ret['disk']['attached']) - self.assertEqual(2, len(ret['disk']['detached'])) - devattach_mock.assert_not_called() -@@ -1305,7 +1305,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - 'definition': True, - 'disk': {'attached': [], 'detached': []}, - 'interface': {'attached': [], 'detached': []} -- }, virt.update('myvm', graphics={'type': 'vnc'})) -+ }, virt.update('my vm', graphics={'type': 'vnc'})) - setxml = ET.fromstring(define_mock.call_args[0][0]) - self.assertEqual('vnc', setxml.find('devices/graphics').get('type')) - -@@ -1314,7 +1314,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - 'definition': False, - 'disk': {'attached': [], 'detached': []}, - 'interface': {'attached': [], 'detached': []} -- }, virt.update('myvm', cpu=1, mem=1024, -+ }, virt.update('my vm', cpu=1, mem=1024, - disk_profile='default', disks=[{'name': 'data', 'size': 2048}], - nic_profile='myprofile', - interfaces=[{'name': 'eth0', 'type': 'network', 'source': 'default', -@@ -1328,7 +1328,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - self.mock_conn.defineXML.side_effect = self.mock_libvirt.libvirtError("Test error") - setmem_mock.reset_mock() - with self.assertRaises(self.mock_libvirt.libvirtError): -- virt.update('myvm', mem=2048) -+ virt.update('my vm', mem=2048) - - # Failed single update failure case - self.mock_conn.defineXML = MagicMock(return_value=True) -@@ -1338,7 +1338,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - 'errors': ['Failed to live change memory'], - 'disk': {'attached': [], 'detached': []}, - 'interface': {'attached': [], 'detached': []} -- }, virt.update('myvm', mem=2048)) -+ }, virt.update('my vm', mem=2048)) - - # Failed multiple updates failure case - self.assertEqual({ -@@ -1347,7 +1347,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): - 'cpu': True, - 'disk': {'attached': [], 'detached': []}, - 'interface': {'attached': [], 'detached': []} -- }, virt.update('myvm', cpu=4, mem=2048)) -+ }, virt.update('my vm', cpu=4, mem=2048)) - - def test_mixed_dict_and_list_as_profile_objects(self): - ''' --- -2.21.0 - - diff --git a/virt.pool_running-fix-pool-start.patch b/virt.pool_running-fix-pool-start.patch deleted file mode 100644 index 054605b..0000000 --- a/virt.pool_running-fix-pool-start.patch +++ /dev/null @@ -1,582 +0,0 @@ -From 946dd98e911e62c7bc3bcdd8adc8a170645c981c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= -Date: Wed, 6 Jun 2018 09:49:36 +0200 -Subject: [PATCH] virt.pool_running: fix pool start - -Building a libvirt pool starts it. When defining a new pool, we need to -let build start it or we will get libvirt errors. - -Also backport virt states test to add test for the bug: - -cherry picked from commits: - - 451e7da55bd232546c4d30ec36d432de2d5a14ec - - 495db345a570cb14cd9b0ae96e1bb0f3fad6aef0 - - cb00a5f9b4c9a2a863da3c1107ca6458a4092c3d - - fc75872fb63e254eecc782168ff8b37157d9e514 - - 2a5f6ae5d69be71daeab6c9cbe4dd642255ff3c6 - - 2463ebe5a82b1a017004e8e0e390535485dc703e - - c7c5d6ee88fbc74d0ee0aeab41beb421d8625f05 ---- - salt/states/virt.py | 7 +- - tests/unit/states/test_virt.py | 508 ++++++++++++++++++++++++++++++++- - 2 files changed, 508 insertions(+), 7 deletions(-) - -diff --git a/salt/states/virt.py b/salt/states/virt.py -index 90693880df..d411f864cd 100644 ---- a/salt/states/virt.py -+++ b/salt/states/virt.py -@@ -780,7 +780,7 @@ def pool_running(name, - source_name=(source or {}).get('name', None), - source_format=(source or {}).get('format', None), - transient=transient, -- start=True, -+ start=False, - connection=connection, - username=username, - password=password) -@@ -795,11 +795,6 @@ def pool_running(name, - connection=connection, - username=username, - password=password) -- -- __salt__['virt.pool_start'](name, -- connection=connection, -- username=username, -- password=password) - ret['changes'][name] = 'Pool defined and started' - ret['comment'] = 'Pool {0} defined and started'.format(name) - except libvirt.libvirtError as err: -diff --git a/tests/unit/states/test_virt.py b/tests/unit/states/test_virt.py -index 2e421319ad..8022989937 100644 ---- a/tests/unit/states/test_virt.py -+++ b/tests/unit/states/test_virt.py -@@ -21,6 +21,25 @@ from tests.support.mock import ( - # Import Salt Libs - import salt.states.virt as virt - import salt.utils.files -+from salt.exceptions import CommandExecutionError -+ -+# Import 3rd-party libs -+from salt.ext import six -+ -+ -+class LibvirtMock(MagicMock): # pylint: disable=too-many-ancestors -+ ''' -+ libvirt library mockup -+ ''' -+ class libvirtError(Exception): # pylint: disable=invalid-name -+ ''' -+ libvirt error mockup -+ ''' -+ def get_error_message(self): -+ ''' -+ Fake function return error message -+ ''' -+ return six.text_type(self) - - - @skipIf(NO_MOCK, NO_MOCK_REASON) -@@ -29,7 +48,12 @@ class LibvirtTestCase(TestCase, LoaderModuleMockMixin): - Test cases for salt.states.libvirt - ''' - def setup_loader_modules(self): -- return {virt: {}} -+ self.mock_libvirt = LibvirtMock() # pylint: disable=attribute-defined-outside-init -+ self.addCleanup(delattr, self, 'mock_libvirt') -+ loader_globals = { -+ 'libvirt': self.mock_libvirt -+ } -+ return {virt: loader_globals} - - @classmethod - def setUpClass(cls): -@@ -195,3 +219,485 @@ class LibvirtTestCase(TestCase, LoaderModuleMockMixin): - locality='Los_Angeles', - organization='SaltStack', - expiration_days=700), ret) -+ -+ def test_running(self): -+ ''' -+ running state test cases. -+ ''' -+ ret = {'name': 'myvm', -+ 'changes': {}, -+ 'result': True, -+ 'comment': 'myvm is running'} -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.vm_state': MagicMock(return_value='stopped'), -+ 'virt.start': MagicMock(return_value=0), -+ }): -+ ret.update({'changes': {'myvm': 'Domain started'}, -+ 'comment': 'Domain myvm started'}) -+ self.assertDictEqual(virt.running('myvm'), ret) -+ -+ init_mock = MagicMock(return_value=True) -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.vm_state': MagicMock(side_effect=CommandExecutionError('not found')), -+ 'virt.init': init_mock, -+ 'virt.start': MagicMock(return_value=0) -+ }): -+ ret.update({'changes': {'myvm': 'Domain defined and started'}, -+ 'comment': 'Domain myvm defined and started'}) -+ self.assertDictEqual(virt.running('myvm', -+ cpu=2, -+ mem=2048, -+ image='/path/to/img.qcow2'), ret) -+ init_mock.assert_called_with('myvm', cpu=2, mem=2048, image='/path/to/img.qcow2', -+ os_type=None, arch=None, -+ disk=None, disks=None, nic=None, interfaces=None, -+ graphics=None, hypervisor=None, -+ seed=True, install=True, pub_key=None, priv_key=None, -+ connection=None, username=None, password=None) -+ -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.vm_state': MagicMock(side_effect=CommandExecutionError('not found')), -+ 'virt.init': init_mock, -+ 'virt.start': MagicMock(return_value=0) -+ }): -+ ret.update({'changes': {'myvm': 'Domain defined and started'}, -+ 'comment': 'Domain myvm defined and started'}) -+ disks = [{ -+ 'name': 'system', -+ 'size': 8192, -+ 'overlay_image': True, -+ 'pool': 'default', -+ 'image': '/path/to/image.qcow2' -+ }, -+ { -+ 'name': 'data', -+ 'size': 16834 -+ }] -+ ifaces = [{ -+ 'name': 'eth0', -+ 'mac': '01:23:45:67:89:AB' -+ }, -+ { -+ 'name': 'eth1', -+ 'type': 'network', -+ 'source': 'admin' -+ }] -+ graphics = {'type': 'spice', 'listen': {'type': 'address', 'address': '192.168.0.1'}} -+ self.assertDictEqual(virt.running('myvm', -+ cpu=2, -+ mem=2048, -+ os_type='linux', -+ arch='i686', -+ vm_type='qemu', -+ disk_profile='prod', -+ disks=disks, -+ nic_profile='prod', -+ interfaces=ifaces, -+ graphics=graphics, -+ seed=False, -+ install=False, -+ pub_key='/path/to/key.pub', -+ priv_key='/path/to/key', -+ connection='someconnection', -+ username='libvirtuser', -+ password='supersecret'), ret) -+ init_mock.assert_called_with('myvm', -+ cpu=2, -+ mem=2048, -+ os_type='linux', -+ arch='i686', -+ image=None, -+ disk='prod', -+ disks=disks, -+ nic='prod', -+ interfaces=ifaces, -+ graphics=graphics, -+ hypervisor='qemu', -+ seed=False, -+ install=False, -+ pub_key='/path/to/key.pub', -+ priv_key='/path/to/key', -+ connection='someconnection', -+ username='libvirtuser', -+ password='supersecret') -+ -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.vm_state': MagicMock(return_value='stopped'), -+ 'virt.start': MagicMock(side_effect=[self.mock_libvirt.libvirtError('libvirt error msg')]) -+ }): -+ ret.update({'changes': {}, 'result': False, 'comment': 'libvirt error msg'}) -+ self.assertDictEqual(virt.running('myvm'), ret) -+ -+ # Working update case when running -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.vm_state': MagicMock(return_value='running'), -+ 'virt.update': MagicMock(return_value={'definition': True, 'cpu': True}) -+ }): -+ ret.update({'changes': {'myvm': {'definition': True, 'cpu': True}}, -+ 'result': True, -+ 'comment': 'Domain myvm updated, restart to fully apply the changes'}) -+ self.assertDictEqual(virt.running('myvm', update=True, cpu=2), ret) -+ -+ # Working update case when stopped -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.vm_state': MagicMock(return_value='stopped'), -+ 'virt.start': MagicMock(return_value=0), -+ 'virt.update': MagicMock(return_value={'definition': True}) -+ }): -+ ret.update({'changes': {'myvm': 'Domain updated and started'}, -+ 'result': True, -+ 'comment': 'Domain myvm updated and started'}) -+ self.assertDictEqual(virt.running('myvm', update=True, cpu=2), ret) -+ -+ # Failed live update case -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.vm_state': MagicMock(return_value='running'), -+ 'virt.update': MagicMock(return_value={'definition': True, 'cpu': False, 'errors': ['some error']}) -+ }): -+ ret.update({'changes': {'myvm': {'definition': True, 'cpu': False, 'errors': ['some error']}}, -+ 'result': True, -+ 'comment': 'Domain myvm updated, but some live update(s) failed'}) -+ self.assertDictEqual(virt.running('myvm', update=True, cpu=2), ret) -+ -+ # Failed definition update case -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.vm_state': MagicMock(return_value='running'), -+ 'virt.update': MagicMock(side_effect=[self.mock_libvirt.libvirtError('error message')]) -+ }): -+ ret.update({'changes': {}, -+ 'result': False, -+ 'comment': 'error message'}) -+ self.assertDictEqual(virt.running('myvm', update=True, cpu=2), ret) -+ -+ def test_stopped(self): -+ ''' -+ stopped state test cases. -+ ''' -+ ret = {'name': 'myvm', -+ 'changes': {}, -+ 'result': True} -+ -+ shutdown_mock = MagicMock(return_value=True) -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.list_domains': MagicMock(return_value=['myvm', 'vm1']), -+ 'virt.shutdown': shutdown_mock -+ }): -+ ret.update({'changes': { -+ 'stopped': [{'domain': 'myvm', 'shutdown': True}] -+ }, -+ 'comment': 'Machine has been shut down'}) -+ self.assertDictEqual(virt.stopped('myvm'), ret) -+ shutdown_mock.assert_called_with('myvm', connection=None, username=None, password=None) -+ -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.list_domains': MagicMock(return_value=['myvm', 'vm1']), -+ 'virt.shutdown': shutdown_mock, -+ }): -+ self.assertDictEqual(virt.stopped('myvm', -+ connection='myconnection', -+ username='user', -+ password='secret'), ret) -+ shutdown_mock.assert_called_with('myvm', connection='myconnection', username='user', password='secret') -+ -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.list_domains': MagicMock(return_value=['myvm', 'vm1']), -+ 'virt.shutdown': MagicMock(side_effect=self.mock_libvirt.libvirtError('Some error')) -+ }): -+ ret.update({'changes': {'ignored': [{'domain': 'myvm', 'issue': 'Some error'}]}, -+ 'result': False, -+ 'comment': 'No changes had happened'}) -+ self.assertDictEqual(virt.stopped('myvm'), ret) -+ -+ with patch.dict(virt.__salt__, {'virt.list_domains': MagicMock(return_value=[])}): # pylint: disable=no-member -+ ret.update({'changes': {}, 'result': False, 'comment': 'No changes had happened'}) -+ self.assertDictEqual(virt.stopped('myvm'), ret) -+ -+ def test_powered_off(self): -+ ''' -+ powered_off state test cases. -+ ''' -+ ret = {'name': 'myvm', -+ 'changes': {}, -+ 'result': True} -+ -+ stop_mock = MagicMock(return_value=True) -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.list_domains': MagicMock(return_value=['myvm', 'vm1']), -+ 'virt.stop': stop_mock -+ }): -+ ret.update({'changes': { -+ 'unpowered': [{'domain': 'myvm', 'stop': True}] -+ }, -+ 'comment': 'Machine has been powered off'}) -+ self.assertDictEqual(virt.powered_off('myvm'), ret) -+ stop_mock.assert_called_with('myvm', connection=None, username=None, password=None) -+ -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.list_domains': MagicMock(return_value=['myvm', 'vm1']), -+ 'virt.stop': stop_mock, -+ }): -+ self.assertDictEqual(virt.powered_off('myvm', -+ connection='myconnection', -+ username='user', -+ password='secret'), ret) -+ stop_mock.assert_called_with('myvm', connection='myconnection', username='user', password='secret') -+ -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.list_domains': MagicMock(return_value=['myvm', 'vm1']), -+ 'virt.stop': MagicMock(side_effect=self.mock_libvirt.libvirtError('Some error')) -+ }): -+ ret.update({'changes': {'ignored': [{'domain': 'myvm', 'issue': 'Some error'}]}, -+ 'result': False, -+ 'comment': 'No changes had happened'}) -+ self.assertDictEqual(virt.powered_off('myvm'), ret) -+ -+ with patch.dict(virt.__salt__, {'virt.list_domains': MagicMock(return_value=[])}): # pylint: disable=no-member -+ ret.update({'changes': {}, 'result': False, 'comment': 'No changes had happened'}) -+ self.assertDictEqual(virt.powered_off('myvm'), ret) -+ -+ def test_snapshot(self): -+ ''' -+ snapshot state test cases. -+ ''' -+ ret = {'name': 'myvm', -+ 'changes': {}, -+ 'result': True} -+ -+ snapshot_mock = MagicMock(return_value=True) -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.list_domains': MagicMock(return_value=['myvm', 'vm1']), -+ 'virt.snapshot': snapshot_mock -+ }): -+ ret.update({'changes': { -+ 'saved': [{'domain': 'myvm', 'snapshot': True}] -+ }, -+ 'comment': 'Snapshot has been taken'}) -+ self.assertDictEqual(virt.snapshot('myvm'), ret) -+ snapshot_mock.assert_called_with('myvm', suffix=None, connection=None, username=None, password=None) -+ -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.list_domains': MagicMock(return_value=['myvm', 'vm1']), -+ 'virt.snapshot': snapshot_mock, -+ }): -+ self.assertDictEqual(virt.snapshot('myvm', -+ suffix='snap', -+ connection='myconnection', -+ username='user', -+ password='secret'), ret) -+ snapshot_mock.assert_called_with('myvm', -+ suffix='snap', -+ connection='myconnection', -+ username='user', -+ password='secret') -+ -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.list_domains': MagicMock(return_value=['myvm', 'vm1']), -+ 'virt.snapshot': MagicMock(side_effect=self.mock_libvirt.libvirtError('Some error')) -+ }): -+ ret.update({'changes': {'ignored': [{'domain': 'myvm', 'issue': 'Some error'}]}, -+ 'result': False, -+ 'comment': 'No changes had happened'}) -+ self.assertDictEqual(virt.snapshot('myvm'), ret) -+ -+ with patch.dict(virt.__salt__, {'virt.list_domains': MagicMock(return_value=[])}): # pylint: disable=no-member -+ ret.update({'changes': {}, 'result': False, 'comment': 'No changes had happened'}) -+ self.assertDictEqual(virt.snapshot('myvm'), ret) -+ -+ def test_rebooted(self): -+ ''' -+ rebooted state test cases. -+ ''' -+ ret = {'name': 'myvm', -+ 'changes': {}, -+ 'result': True} -+ -+ reboot_mock = MagicMock(return_value=True) -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.list_domains': MagicMock(return_value=['myvm', 'vm1']), -+ 'virt.reboot': reboot_mock -+ }): -+ ret.update({'changes': { -+ 'rebooted': [{'domain': 'myvm', 'reboot': True}] -+ }, -+ 'comment': 'Machine has been rebooted'}) -+ self.assertDictEqual(virt.rebooted('myvm'), ret) -+ reboot_mock.assert_called_with('myvm', connection=None, username=None, password=None) -+ -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.list_domains': MagicMock(return_value=['myvm', 'vm1']), -+ 'virt.reboot': reboot_mock, -+ }): -+ self.assertDictEqual(virt.rebooted('myvm', -+ connection='myconnection', -+ username='user', -+ password='secret'), ret) -+ reboot_mock.assert_called_with('myvm', -+ connection='myconnection', -+ username='user', -+ password='secret') -+ -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.list_domains': MagicMock(return_value=['myvm', 'vm1']), -+ 'virt.reboot': MagicMock(side_effect=self.mock_libvirt.libvirtError('Some error')) -+ }): -+ ret.update({'changes': {'ignored': [{'domain': 'myvm', 'issue': 'Some error'}]}, -+ 'result': False, -+ 'comment': 'No changes had happened'}) -+ self.assertDictEqual(virt.rebooted('myvm'), ret) -+ -+ with patch.dict(virt.__salt__, {'virt.list_domains': MagicMock(return_value=[])}): # pylint: disable=no-member -+ ret.update({'changes': {}, 'result': False, 'comment': 'No changes had happened'}) -+ self.assertDictEqual(virt.rebooted('myvm'), ret) -+ -+ def test_network_running(self): -+ ''' -+ network_running state test cases. -+ ''' -+ ret = {'name': 'mynet', 'changes': {}, 'result': True, 'comment': ''} -+ define_mock = MagicMock(return_value=True) -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.network_info': MagicMock(return_value={}), -+ 'virt.network_define': define_mock -+ }): -+ ret.update({'changes': {'mynet': 'Network defined and started'}, -+ 'comment': 'Network mynet defined and started'}) -+ self.assertDictEqual(virt.network_running('mynet', -+ 'br2', -+ 'bridge', -+ vport='openvswitch', -+ tag=180, -+ autostart=False, -+ connection='myconnection', -+ username='user', -+ password='secret'), ret) -+ define_mock.assert_called_with('mynet', -+ 'br2', -+ 'bridge', -+ 'openvswitch', -+ tag=180, -+ autostart=False, -+ start=True, -+ connection='myconnection', -+ username='user', -+ password='secret') -+ -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.network_info': MagicMock(return_value={'active': True}), -+ 'virt.network_define': define_mock, -+ }): -+ ret.update({'changes': {}, 'comment': 'Network mynet exists and is running'}) -+ self.assertDictEqual(virt.network_running('mynet', 'br2', 'bridge'), ret) -+ -+ start_mock = MagicMock(return_value=True) -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.network_info': MagicMock(return_value={'active': False}), -+ 'virt.network_start': start_mock, -+ 'virt.network_define': define_mock, -+ }): -+ ret.update({'changes': {'mynet': 'Network started'}, 'comment': 'Network mynet started'}) -+ self.assertDictEqual(virt.network_running('mynet', -+ 'br2', -+ 'bridge', -+ connection='myconnection', -+ username='user', -+ password='secret'), ret) -+ start_mock.assert_called_with('mynet', connection='myconnection', username='user', password='secret') -+ -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.network_info': MagicMock(return_value={}), -+ 'virt.network_define': MagicMock(side_effect=self.mock_libvirt.libvirtError('Some error')) -+ }): -+ ret.update({'changes': {}, 'comment': 'Some error', 'result': False}) -+ self.assertDictEqual(virt.network_running('mynet', 'br2', 'bridge'), ret) -+ -+ def test_pool_running(self): -+ ''' -+ pool_running state test cases. -+ ''' -+ ret = {'name': 'mypool', 'changes': {}, 'result': True, 'comment': ''} -+ mocks = {mock: MagicMock(return_value=True) for mock in ['define', 'autostart', 'build', 'start']} -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.pool_info': MagicMock(return_value={}), -+ 'virt.pool_define': mocks['define'], -+ 'virt.pool_build': mocks['build'], -+ 'virt.pool_start': mocks['start'], -+ 'virt.pool_set_autostart': mocks['autostart'] -+ }): -+ ret.update({'changes': {'mypool': 'Pool defined and started'}, -+ 'comment': 'Pool mypool defined and started'}) -+ self.assertDictEqual(virt.pool_running('mypool', -+ ptype='logical', -+ target='/dev/base', -+ permissions={'mode': '0770', -+ 'owner': 1000, -+ 'group': 100, -+ 'label': 'seclabel'}, -+ source={'devices': [{'path': '/dev/sda'}]}, -+ transient=True, -+ autostart=True, -+ connection='myconnection', -+ username='user', -+ password='secret'), ret) -+ mocks['define'].assert_called_with('mypool', -+ ptype='logical', -+ target='/dev/base', -+ permissions={'mode': '0770', -+ 'owner': 1000, -+ 'group': 100, -+ 'label': 'seclabel'}, -+ source_devices=[{'path': '/dev/sda'}], -+ source_dir=None, -+ source_adapter=None, -+ source_hosts=None, -+ source_auth=None, -+ source_name=None, -+ source_format=None, -+ transient=True, -+ start=False, -+ connection='myconnection', -+ username='user', -+ password='secret') -+ mocks['autostart'].assert_called_with('mypool', -+ state='on', -+ connection='myconnection', -+ username='user', -+ password='secret') -+ mocks['build'].assert_called_with('mypool', -+ connection='myconnection', -+ username='user', -+ password='secret') -+ mocks['start'].assert_not_called() -+ -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.pool_info': MagicMock(return_value={'state': 'running'}), -+ }): -+ ret.update({'changes': {}, 'comment': 'Pool mypool exists and is running'}) -+ self.assertDictEqual(virt.pool_running('mypool', -+ ptype='logical', -+ target='/dev/base', -+ source={'devices': [{'path': '/dev/sda'}]}), ret) -+ -+ for mock in mocks: -+ mocks[mock].reset_mock() -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.pool_info': MagicMock(return_value={'state': 'stopped'}), -+ 'virt.pool_build': mocks['build'], -+ 'virt.pool_start': mocks['start'] -+ }): -+ ret.update({'changes': {'mypool': 'Pool started'}, 'comment': 'Pool mypool started'}) -+ self.assertDictEqual(virt.pool_running('mypool', -+ ptype='logical', -+ target='/dev/base', -+ source={'devices': [{'path': '/dev/sda'}]}), ret) -+ mocks['start'].assert_called_with('mypool', connection=None, username=None, password=None) -+ mocks['build'].assert_not_called() -+ -+ with patch.dict(virt.__salt__, { # pylint: disable=no-member -+ 'virt.pool_info': MagicMock(return_value={}), -+ 'virt.pool_define': MagicMock(side_effect=self.mock_libvirt.libvirtError('Some error')) -+ }): -+ ret.update({'changes': {}, 'comment': 'Some error', 'result': False}) -+ self.assertDictEqual(virt.pool_running('mypool', -+ ptype='logical', -+ target='/dev/base', -+ source={'devices': [{'path': '/dev/sda'}]}), ret) --- -2.21.0 - - diff --git a/virt.volume_infos-fix-for-single-vm.patch b/virt.volume_infos-fix-for-single-vm.patch index 07a89d4..1bf83de 100644 --- a/virt.volume_infos-fix-for-single-vm.patch +++ b/virt.volume_infos-fix-for-single-vm.patch @@ -1,4 +1,4 @@ -From b0b5a78a463f7587be4f81074b182d1f4b4461be Mon Sep 17 00:00:00 2001 +From 2635b6c87a74e6c274d41a1f526166f6d347ae0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Date: Thu, 4 Apr 2019 16:18:58 +0200 Subject: [PATCH] virt.volume_infos fix for single VM @@ -7,15 +7,15 @@ _get_domain returns a domain object when only one VM has been found. virt.volume_infos needs to take care of it or it will fail to list the volumes informations if the host in such a case. --- - salt/modules/virt.py | 4 ++- - tests/unit/modules/test_virt.py | 46 +++++++++++++++++++++++++++++++++ + salt/modules/virt.py | 4 +++- + tests/unit/modules/test_virt.py | 46 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/salt/modules/virt.py b/salt/modules/virt.py -index 17039444c4..a3f625909d 100644 +index 9bb3636bd1..d160f0905f 100644 --- a/salt/modules/virt.py +++ b/salt/modules/virt.py -@@ -5047,10 +5047,12 @@ def volume_infos(pool=None, volume=None, **kwargs): +@@ -5050,10 +5050,12 @@ def volume_infos(pool=None, volume=None, **kwargs): conn = __get_conn(**kwargs) try: backing_stores = _get_all_volumes_paths(conn) @@ -30,7 +30,7 @@ index 17039444c4..a3f625909d 100644 def _volume_extract_infos(vol): ''' diff --git a/tests/unit/modules/test_virt.py b/tests/unit/modules/test_virt.py -index 14e51e1e2a..bbe8d813d7 100644 +index 6f9eea241a..cc62b67918 100644 --- a/tests/unit/modules/test_virt.py +++ b/tests/unit/modules/test_virt.py @@ -2864,6 +2864,52 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): @@ -87,6 +87,6 @@ index 14e51e1e2a..bbe8d813d7 100644 ''' Test virt.volume_delete -- -2.21.0 +2.16.4 diff --git a/virt.volume_infos-needs-to-ignore-inactive-pools-174.patch b/virt.volume_infos-needs-to-ignore-inactive-pools-174.patch index 2050f02..eb2a89b 100644 --- a/virt.volume_infos-needs-to-ignore-inactive-pools-174.patch +++ b/virt.volume_infos-needs-to-ignore-inactive-pools-174.patch @@ -1,4 +1,4 @@ -From df1caa8fa6551f880202649a7f4133343da5da0f Mon Sep 17 00:00:00 2001 +From 0cf303fb475fc35c84aba0c4b2d4708aca3c211d Mon Sep 17 00:00:00 2001 From: Cedric Bosdonnat Date: Tue, 3 Sep 2019 15:17:38 +0200 Subject: [PATCH] virt.volume_infos needs to ignore inactive pools (#174) @@ -78,6 +78,6 @@ index b343b9bc31..e644e62452 100644 with patch('salt.modules.virt._get_domain', MagicMock(return_value=mock_vms)): -- -2.20.1 +2.16.4 diff --git a/virt.volume_infos-silence-libvirt-error-message-175.patch b/virt.volume_infos-silence-libvirt-error-message-175.patch index 6ba2a46..d181409 100644 --- a/virt.volume_infos-silence-libvirt-error-message-175.patch +++ b/virt.volume_infos-silence-libvirt-error-message-175.patch @@ -1,4 +1,4 @@ -From fa621d17371ea6c8eff75460755c0040fcbf13de Mon Sep 17 00:00:00 2001 +From fa7ae6740e32adfc437923511b92aa2009b995f2 Mon Sep 17 00:00:00 2001 From: Cedric Bosdonnat Date: Tue, 3 Sep 2019 15:17:46 +0200 Subject: [PATCH] virt.volume_infos: silence libvirt error message (#175) @@ -32,6 +32,6 @@ index 0353e6a1f5..96c17bd60b 100644 except libvirt.libvirtError as err: return False -- -2.20.1 +2.16.4 diff --git a/x509-fixes-111.patch b/x509-fixes-111.patch index bb8af15..e6fe55e 100644 --- a/x509-fixes-111.patch +++ b/x509-fixes-111.patch @@ -1,4 +1,4 @@ -From c5adc0c126e593d12c9b18bcf60f96336c75e4a8 Mon Sep 17 00:00:00 2001 +From 5e2b8d7ad2c98b0ab95e96a7f2df40715af11f3d Mon Sep 17 00:00:00 2001 From: Florian Bergmann Date: Fri, 14 Sep 2018 10:30:39 +0200 Subject: [PATCH] X509 fixes (#111) @@ -34,8 +34,8 @@ PEP8: line too long * Fix unit tests --- salt/modules/publish.py | 8 +-- - salt/modules/x509.py | 132 ++++++++++++++++------------------------ - salt/states/x509.py | 22 ++++--- + salt/modules/x509.py | 132 +++++++++++++++++++----------------------------- + salt/states/x509.py | 22 +++++--- 3 files changed, 69 insertions(+), 93 deletions(-) diff --git a/salt/modules/publish.py b/salt/modules/publish.py @@ -65,10 +65,10 @@ index 62e3e98f2f..fda848d1ec 100644 def publish(tgt, fun, diff --git a/salt/modules/x509.py b/salt/modules/x509.py -index 8689bfad35..4126f34960 100644 +index 92e39a6b88..52c8024b2f 100644 --- a/salt/modules/x509.py +++ b/salt/modules/x509.py -@@ -38,14 +38,13 @@ from salt.state import STATE_INTERNAL_KEYWORDS as _STATE_INTERNAL_KEYWORDS +@@ -39,14 +39,13 @@ from salt.state import STATE_INTERNAL_KEYWORDS as _STATE_INTERNAL_KEYWORDS # Import 3rd Party Libs try: import M2Crypto @@ -86,7 +86,7 @@ index 8689bfad35..4126f34960 100644 __virtualname__ = 'x509' -@@ -83,10 +82,7 @@ def __virtual__(): +@@ -84,10 +83,7 @@ def __virtual__(): ''' only load this module if m2crypto is available ''' @@ -98,7 +98,7 @@ index 8689bfad35..4126f34960 100644 class _Ctx(ctypes.Structure): -@@ -129,10 +125,8 @@ def _new_extension(name, value, critical=0, issuer=None, _pyfree=1): +@@ -130,10 +126,8 @@ def _new_extension(name, value, critical=0, issuer=None, _pyfree=1): doesn't support getting the publickeyidentifier from the issuer to create the authoritykeyidentifier extension. ''' @@ -111,7 +111,7 @@ index 8689bfad35..4126f34960 100644 # ensure name and value are bytes name = salt.utils.stringutils.to_str(name) -@@ -147,7 +141,7 @@ def _new_extension(name, value, critical=0, issuer=None, _pyfree=1): +@@ -148,7 +142,7 @@ def _new_extension(name, value, critical=0, issuer=None, _pyfree=1): x509_ext_ptr = M2Crypto.m2.x509v3_ext_conf(None, ctx, name, value) lhash = None except AttributeError: @@ -120,7 +120,7 @@ index 8689bfad35..4126f34960 100644 ctx = M2Crypto.m2.x509v3_set_conf_lhash( lhash) # pylint: disable=no-member # ctx not zeroed -@@ -198,10 +192,8 @@ def _get_csr_extensions(csr): +@@ -199,10 +193,8 @@ def _get_csr_extensions(csr): csrtempfile.flush() csryaml = _parse_openssl_req(csrtempfile.name) csrtempfile.close() @@ -133,7 +133,7 @@ index 8689bfad35..4126f34960 100644 if not csrexts: return ret -@@ -296,7 +288,7 @@ def _get_signing_policy(name): +@@ -297,7 +289,7 @@ def _get_signing_policy(name): signing_policy = policies.get(name) if signing_policy: return signing_policy @@ -142,7 +142,7 @@ index 8689bfad35..4126f34960 100644 def _pretty_hex(hex_str): -@@ -335,9 +327,11 @@ def _text_or_file(input_): +@@ -336,9 +328,11 @@ def _text_or_file(input_): ''' if _isfile(input_): with salt.utils.files.fopen(input_) as fp_: @@ -156,7 +156,7 @@ index 8689bfad35..4126f34960 100644 def _parse_subject(subject): -@@ -355,7 +349,7 @@ def _parse_subject(subject): +@@ -356,7 +350,7 @@ def _parse_subject(subject): ret[nid_name] = val nids.append(nid_num) except TypeError as err: @@ -202,7 +202,7 @@ index 8689bfad35..4126f34960 100644 return ret -@@ -943,7 +935,7 @@ def create_crl( # pylint: disable=too-many-arguments,too-many-locals +@@ -944,7 +936,7 @@ def create_crl( # pylint: disable=too-many-arguments,too-many-locals # pyOpenSSL Note due to current limitations in pyOpenSSL it is impossible # to specify a digest For signing the CRL. This will hopefully be fixed # soon: https://github.com/pyca/pyopenssl/pull/161 @@ -211,7 +211,7 @@ index 8689bfad35..4126f34960 100644 raise salt.exceptions.SaltInvocationError( 'Could not load OpenSSL module, OpenSSL unavailable' ) -@@ -969,8 +961,7 @@ def create_crl( # pylint: disable=too-many-arguments,too-many-locals +@@ -970,8 +962,7 @@ def create_crl( # pylint: disable=too-many-arguments,too-many-locals continue if 'revocation_date' not in rev_item: @@ -221,7 +221,7 @@ index 8689bfad35..4126f34960 100644 rev_date = datetime.datetime.strptime( rev_item['revocation_date'], '%Y-%m-%d %H:%M:%S') -@@ -1011,8 +1002,9 @@ def create_crl( # pylint: disable=too-many-arguments,too-many-locals +@@ -1013,8 +1004,9 @@ def create_crl( # pylint: disable=too-many-arguments,too-many-locals try: crltext = crl.export(**export_kwargs) except (TypeError, ValueError): @@ -233,7 +233,7 @@ index 8689bfad35..4126f34960 100644 export_kwargs.pop('digest', None) crltext = crl.export(**export_kwargs) -@@ -1050,8 +1042,7 @@ def sign_remote_certificate(argdic, **kwargs): +@@ -1052,8 +1044,7 @@ def sign_remote_certificate(argdic, **kwargs): if 'signing_policy' in argdic: signing_policy = _get_signing_policy(argdic['signing_policy']) if not signing_policy: @@ -243,7 +243,7 @@ index 8689bfad35..4126f34960 100644 if isinstance(signing_policy, list): dict_ = {} -@@ -1091,6 +1082,7 @@ def get_signing_policy(signing_policy_name): +@@ -1093,6 +1084,7 @@ def get_signing_policy(signing_policy_name): signing_policy = _get_signing_policy(signing_policy_name) if not signing_policy: return 'Signing policy {0} does not exist.'.format(signing_policy_name) @@ -251,7 +251,7 @@ index 8689bfad35..4126f34960 100644 if isinstance(signing_policy, list): dict_ = {} for item in signing_policy: -@@ -1103,10 +1095,9 @@ def get_signing_policy(signing_policy_name): +@@ -1105,10 +1097,9 @@ def get_signing_policy(signing_policy_name): pass try: @@ -264,7 +264,7 @@ index 8689bfad35..4126f34960 100644 return signing_policy -@@ -1356,8 +1347,7 @@ def create_certificate( +@@ -1358,8 +1349,7 @@ def create_certificate( salt '*' x509.create_certificate path=/etc/pki/myca.crt signing_private_key='/etc/pki/myca.key' csr='/etc/pki/myca.csr'} ''' @@ -274,7 +274,7 @@ index 8689bfad35..4126f34960 100644 raise salt.exceptions.SaltInvocationError( 'Either path or text must be specified.') if path and text: -@@ -1386,8 +1376,7 @@ def create_certificate( +@@ -1388,8 +1378,7 @@ def create_certificate( # Including listen_in and preqreuired because they are not included # in STATE_INTERNAL_KEYWORDS # for salt 2014.7.2 @@ -282,9 +282,9 @@ index 8689bfad35..4126f34960 100644 - ['listen_in', 'preqrequired', '__prerequired__']: + for ignore in list(_STATE_INTERNAL_KEYWORDS) + ['listen_in', 'preqrequired', '__prerequired__']: kwargs.pop(ignore, None) - + # TODO: Make timeout configurable in Neon certs = __salt__['publish.publish']( -@@ -1500,8 +1489,7 @@ def create_certificate( +@@ -1504,8 +1493,7 @@ def create_certificate( continue # Use explicitly set values first, fall back to CSR values. @@ -294,7 +294,7 @@ index 8689bfad35..4126f34960 100644 critical = False if extval.startswith('critical '): -@@ -1623,8 +1611,8 @@ def create_csr(path=None, text=False, **kwargs): +@@ -1627,8 +1615,8 @@ def create_csr(path=None, text=False, **kwargs): if 'private_key' not in kwargs and 'public_key' in kwargs: kwargs['private_key'] = kwargs['public_key'] @@ -305,7 +305,7 @@ index 8689bfad35..4126f34960 100644 if 'private_key' not in kwargs: raise salt.exceptions.SaltInvocationError('private_key is required') -@@ -1636,11 +1624,9 @@ def create_csr(path=None, text=False, **kwargs): +@@ -1640,11 +1628,9 @@ def create_csr(path=None, text=False, **kwargs): kwargs['private_key_passphrase'] = None if 'public_key_passphrase' not in kwargs: kwargs['public_key_passphrase'] = None @@ -319,7 +319,7 @@ index 8689bfad35..4126f34960 100644 kwargs['public_key_passphrase'] = kwargs['private_key_passphrase'] csr.set_pubkey(get_public_key(kwargs['public_key'], -@@ -1684,18 +1670,10 @@ def create_csr(path=None, text=False, **kwargs): +@@ -1688,18 +1674,10 @@ def create_csr(path=None, text=False, **kwargs): extstack.push(ext) csr.add_extensions(extstack) @@ -339,7 +339,7 @@ index 8689bfad35..4126f34960 100644 def verify_private_key(private_key, public_key, passphrase=None): -@@ -1720,8 +1698,7 @@ def verify_private_key(private_key, public_key, passphrase=None): +@@ -1724,8 +1702,7 @@ def verify_private_key(private_key, public_key, passphrase=None): salt '*' x509.verify_private_key private_key=/etc/pki/myca.key \\ public_key=/etc/pki/myca.crt ''' @@ -349,7 +349,7 @@ index 8689bfad35..4126f34960 100644 def verify_signature(certificate, signing_pub_key=None, -@@ -1775,9 +1752,8 @@ def verify_crl(crl, cert): +@@ -1779,9 +1756,8 @@ def verify_crl(crl, cert): salt '*' x509.verify_crl crl=/etc/pki/myca.crl cert=/etc/pki/myca.crt ''' if not salt.utils.path.which('openssl'): @@ -361,7 +361,7 @@ index 8689bfad35..4126f34960 100644 crltext = _text_or_file(crl) crltext = get_pem_entry(crltext, pem_type='X509 CRL') crltempfile = tempfile.NamedTemporaryFile() -@@ -1798,10 +1774,7 @@ def verify_crl(crl, cert): +@@ -1802,10 +1778,7 @@ def verify_crl(crl, cert): crltempfile.close() certtempfile.close() @@ -373,7 +373,7 @@ index 8689bfad35..4126f34960 100644 def expired(certificate): -@@ -1838,8 +1811,9 @@ def expired(certificate): +@@ -1842,8 +1815,9 @@ def expired(certificate): ret['expired'] = True else: ret['expired'] = False @@ -385,7 +385,7 @@ index 8689bfad35..4126f34960 100644 return ret -@@ -1862,6 +1836,7 @@ def will_expire(certificate, days): +@@ -1866,6 +1840,7 @@ def will_expire(certificate, days): salt '*' x509.will_expire "/etc/pki/mycert.crt" days=30 ''' @@ -393,7 +393,7 @@ index 8689bfad35..4126f34960 100644 ret = {} if os.path.isfile(certificate): -@@ -1871,18 +1846,13 @@ def will_expire(certificate, days): +@@ -1875,18 +1850,13 @@ def will_expire(certificate, days): cert = _get_certificate_obj(certificate) @@ -418,7 +418,7 @@ index 8689bfad35..4126f34960 100644 return ret diff --git a/salt/states/x509.py b/salt/states/x509.py -index 209cbc6738..8c79c6d034 100644 +index d44f85db17..c83d0d6047 100644 --- a/salt/states/x509.py +++ b/salt/states/x509.py @@ -163,6 +163,7 @@ import copy @@ -492,6 +492,6 @@ index 209cbc6738..8c79c6d034 100644 return __states__['file.managed'](**file_args) -- -2.17.1 +2.16.4