Hello community, here is the log from the commit of package salt for openSUSE:Factory checked in at 2020-11-25 19:27:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/salt (Old) and /work/SRC/openSUSE:Factory/.salt.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "salt" Wed Nov 25 19:27:34 2020 rev:112 rq:850470 version:3000.3 Changes: -------- --- /work/SRC/openSUSE:Factory/salt/salt.changes 2020-11-06 23:43:27.719452453 +0100 +++ /work/SRC/openSUSE:Factory/.salt.new.5913/salt.changes 2020-11-25 19:27:38.642361253 +0100 @@ -1,0 +2,34 @@ +Mon Nov 16 09:48:45 UTC 2020 - Pablo Suárez Hernández <[email protected]> + +- Fix syntax error on pkgrepo state with Python 2.7 +- transactional_update: unify with chroot.call + +- Added: + * pkgrepo-support-python-2.7-function-call-295.patch + * transactional_update-unify-with-chroot.call.patch + +------------------------------------------------------------------- +Tue Nov 10 15:43:09 UTC 2020 - Jochen Breuer <[email protected]> + +- Add "migrated" state and GPG key management functions + +- Added: + * add-migrated-state-and-gpg-key-management-functions-.patch + +------------------------------------------------------------------- +Tue Nov 10 15:09:16 UTC 2020 - Jochen Breuer <[email protected]> + +- Master can read grains + +- Added: + * grains-master-can-read-grains.patch + +------------------------------------------------------------------- +Tue Nov 10 14:03:22 UTC 2020 - Jochen Breuer <[email protected]> + +- Fix for broken psutil (bsc#1102248) + +- Added: + * fix-for-bsc-1102248-psutil-is-broken-and-so-process-.patch + +------------------------------------------------------------------- New: ---- add-migrated-state-and-gpg-key-management-functions-.patch fix-for-bsc-1102248-psutil-is-broken-and-so-process-.patch grains-master-can-read-grains.patch pkgrepo-support-python-2.7-function-call-295.patch transactional_update-unify-with-chroot.call.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ salt.spec ++++++ --- /var/tmp/diff_new_pack.uztuTe/_old 2020-11-25 19:27:40.842364023 +0100 +++ /var/tmp/diff_new_pack.uztuTe/_new 2020-11-25 19:27:40.846364029 +0100 @@ -371,6 +371,17 @@ Patch143: fix-cve-2020-25592-and-add-tests-bsc-1178319.patch # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/293 Patch144: set-passphrase-for-salt-ssh-keys-to-empty-string-293.patch +# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/279 +Patch145: fix-for-bsc-1102248-psutil-is-broken-and-so-process-.patch +# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/58520 +# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/286 +Patch146: grains-master-can-read-grains.patch +# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/58784 +Patch147: add-migrated-state-and-gpg-key-management-functions-.patch +# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/292 +Patch148: transactional_update-unify-with-chroot.call.patch +# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/295 +Patch149: pkgrepo-support-python-2.7-function-call-295.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: logrotate @@ -1022,6 +1033,11 @@ %patch142 -p1 %patch143 -p1 %patch144 -p1 +%patch145 -p1 +%patch146 -p1 +%patch147 -p1 +%patch148 -p1 +%patch149 -p1 %build # Putting /usr/bin at the front of $PATH is needed for RHEL/RES 7. Without this ++++++ _lastrevision ++++++ --- /var/tmp/diff_new_pack.uztuTe/_old 2020-11-25 19:27:40.910364110 +0100 +++ /var/tmp/diff_new_pack.uztuTe/_new 2020-11-25 19:27:40.910364110 +0100 @@ -1 +1 @@ -24bd64b440c2c3f0f154a1b7f7216de20dc07df8 \ No newline at end of file +1a73678e768b896323b9d2d1f903a400e48e51e1 \ No newline at end of file ++++++ add-migrated-state-and-gpg-key-management-functions-.patch ++++++ ++++ 1556 lines (skipped) ++++++ fix-for-bsc-1102248-psutil-is-broken-and-so-process-.patch ++++++ ++++ 738 lines (skipped) ++++++ grains-master-can-read-grains.patch ++++++ From 0b6106815b708bc4cf25b4a02ebc8b7ebf299b39 Mon Sep 17 00:00:00 2001 From: Alberto Planas <[email protected]> Date: Tue, 27 Oct 2020 13:16:37 +0100 Subject: [PATCH] grains: master can read grains --- salt/grains/extra.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/salt/grains/extra.py b/salt/grains/extra.py index 6a26aece77..f80061ff4e 100644 --- a/salt/grains/extra.py +++ b/salt/grains/extra.py @@ -94,8 +94,14 @@ def __secure_boot(): enabled = False sboot = glob.glob("/sys/firmware/efi/vars/SecureBoot-*/data") if len(sboot) == 1: - with salt.utils.files.fopen(sboot[0], "rb") as fd: - enabled = fd.read()[-1:] == b"\x01" + # The minion is usually running as a privileged user, but is + # not the case for the master. Seems that the master can also + # pick the grains, and this file can only be readed by "root" + try: + with salt.utils.files.fopen(sboot[0], "rb") as fd: + enabled = fd.read()[-1:] == b"\x01" + except PermissionError: + pass return enabled -- 2.29.1 ++++++ pkgrepo-support-python-2.7-function-call-295.patch ++++++ From a487f19e6a0ed6b4b7e987e5b6d90852050eb2d9 Mon Sep 17 00:00:00 2001 From: Alberto Planas <[email protected]> Date: Mon, 16 Nov 2020 10:37:29 +0100 Subject: [PATCH] pkgrepo: support Python 2.7 function call (#295) --- salt/states/pkgrepo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/states/pkgrepo.py b/salt/states/pkgrepo.py index 6c42d17d32..504f1425c7 100644 --- a/salt/states/pkgrepo.py +++ b/salt/states/pkgrepo.py @@ -818,7 +818,7 @@ def migrated(name, keys=True, drop=False, method=None, **kwargs): if method == "copy": _copy_repository_to(name) else: - __salt__["pkg.mod_repo"](repo, **dict(repo_info), root=name) + __salt__["pkg.mod_repo"](repo, root=name, **dict(repo_info)) for repo, _ in repos_to_drop: __salt__["pkg.del_repo"](repo, root=name) -- 2.28.0 ++++++ transactional_update-unify-with-chroot.call.patch ++++++ From 383cb53b9936b8ff1d8707c74daf5001add2dd20 Mon Sep 17 00:00:00 2001 From: Alberto Planas <[email protected]> Date: Wed, 4 Nov 2020 16:34:47 +0100 Subject: [PATCH] transactional_update: unify with chroot.call Return for both .call() "retcode" when fail --- salt/modules/chroot.py | 5 +++-- salt/modules/transactional_update.py | 4 ++-- tests/unit/modules/test_chroot.py | 6 ++++-- tests/unit/modules/test_transactional_update.py | 12 ++++++++++-- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/salt/modules/chroot.py b/salt/modules/chroot.py index 5e890b5c35..fbec3ea788 100644 --- a/salt/modules/chroot.py +++ b/salt/modules/chroot.py @@ -192,10 +192,11 @@ def call(root, function, *args, **kwargs): if isinstance(local, dict) and 'retcode' in local: __context__['retcode'] = local['retcode'] return local.get('return', data) - except (KeyError, ValueError): + except ValueError: return { 'result': False, - 'comment': "Can't parse container command output" + 'retcode': ret['retcode'], + 'comment': {'stdout': ret['stdout'], 'stderr': ret['stderr']}, } finally: __utils__['files.rm_rf'](thin_dest_path) diff --git a/salt/modules/transactional_update.py b/salt/modules/transactional_update.py index 9b14557e07..7bbdb697b8 100644 --- a/salt/modules/transactional_update.py +++ b/salt/modules/transactional_update.py @@ -988,8 +988,8 @@ def call(function, *args, **kwargs): if isinstance(local, dict) and "retcode" in local: __context__["retcode"] = local["retcode"] return local.get("return", data) - except (KeyError, ValueError): - return {"result": False, "comment": ret_stdout} + except ValueError: + return {"result": False, "retcode": 1, "comment": ret_stdout} finally: __utils__["files.rm_rf"](thin_dest_path) diff --git a/tests/unit/modules/test_chroot.py b/tests/unit/modules/test_chroot.py index 045d56c5b0..eb7b8cb4aa 100644 --- a/tests/unit/modules/test_chroot.py +++ b/tests/unit/modules/test_chroot.py @@ -145,13 +145,14 @@ class ChrootTestCase(TestCase, LoaderModuleMockMixin): utils_mock = { 'thin.gen_thin': MagicMock(return_value='/salt-thin.tgz'), 'files.rm_rf': MagicMock(), - 'json.find_json': MagicMock(return_value={'return': {}}) + 'json.find_json': MagicMock(side_effect=ValueError()) } salt_mock = { 'cmd.run': MagicMock(return_value=''), 'config.option': MagicMock(), 'cmd.run_chroot': MagicMock(return_value={ 'retcode': 1, + 'stdout': '', 'stderr': 'Error', }), } @@ -159,7 +160,8 @@ class ChrootTestCase(TestCase, LoaderModuleMockMixin): patch.dict(chroot.__salt__, salt_mock): self.assertEqual(chroot.call('/chroot', 'test.ping'), { 'result': False, - 'comment': "Can't parse container command output" + 'retcode': 1, + 'comment': {'stdout': '', 'stderr': 'Error'}, }) utils_mock['thin.gen_thin'].assert_called_once() salt_mock['config.option'].assert_called() diff --git a/tests/unit/modules/test_transactional_update.py b/tests/unit/modules/test_transactional_update.py index b42734a53d..4616e0968f 100644 --- a/tests/unit/modules/test_transactional_update.py +++ b/tests/unit/modules/test_transactional_update.py @@ -372,7 +372,11 @@ class TransactionalUpdateTestCase(TestCase, LoaderModuleMockMixin): with patch.dict(tu.__utils__, utils_mock), patch.dict( tu.__opts__, opts_mock ), patch.dict(tu.__salt__, salt_mock): - assert tu.call("test.ping") == {"result": False, "comment": "Error"} + assert tu.call("test.ping") == { + "result": False, + "retcode": 1, + "comment": "Error", + } utils_mock["thin.gen_thin"].assert_called_once() salt_mock["config.option"].assert_called() @@ -424,7 +428,11 @@ class TransactionalUpdateTestCase(TestCase, LoaderModuleMockMixin): with patch.dict(tu.__utils__, utils_mock), patch.dict( tu.__opts__, opts_mock ), patch.dict(tu.__salt__, salt_mock): - assert tu.call("test.ping") == {"result": False, "comment": "Not found"} + assert tu.call("test.ping") == { + "result": False, + "retcode": 1, + "comment": "Not found", + } utils_mock["thin.gen_thin"].assert_called_once() salt_mock["config.option"].assert_called() -- 2.29.1 _______________________________________________ openSUSE Commits mailing list -- [email protected] To unsubscribe, email [email protected] List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/[email protected]
