public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-admin/salt/files/
@ 2016-07-01  8:02 Patrice Clement
  0 siblings, 0 replies; 8+ messages in thread
From: Patrice Clement @ 2016-07-01  8:02 UTC (permalink / raw
  To: gentoo-commits

commit:     561feb61da662200590994ec719372d3991c4094
Author:     Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Thu Jun 30 17:48:13 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Fri Jul  1 07:34:27 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=561feb61

app-admin/salt: remove unused patches

Closes: https://github.com/gentoo/gentoo/pull/1802

Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 app-admin/salt/files/api-initd-3                   |  14 ---
 app-admin/salt/files/master-initd-3                |  14 ---
 app-admin/salt/files/minion-initd-3                |  15 ---
 .../salt/files/salt-2014.7.5-archive-test.patch    |  15 ---
 .../salt/files/salt-2015.5.0-archive-test.patch    |  15 ---
 ...alt-2015.5.1-skip-libvirt-test-on-nonroot.patch |  20 ----
 .../salt-2015.8.0-remove-pydsl-includes-test.patch | 107 ---------------------
 .../salt/files/salt-2015.8.4-boto-vpc-test.patch   |  13 ---
 app-admin/salt/files/syndic-initd-3                |  14 ---
 9 files changed, 227 deletions(-)

diff --git a/app-admin/salt/files/api-initd-3 b/app-admin/salt/files/api-initd-3
deleted file mode 100644
index 8a6f026..0000000
--- a/app-admin/salt/files/api-initd-3
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-command="/usr/bin/salt-api"
-command_args="${SALT_OPTS}"
-command_background="1"
-pidfile="/var/run/salt-api.pid"
-name="SALT API daemon"
-
-depend() {
-	use net logger
-}

diff --git a/app-admin/salt/files/master-initd-3 b/app-admin/salt/files/master-initd-3
deleted file mode 100644
index c0cfead..0000000
--- a/app-admin/salt/files/master-initd-3
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-command="/usr/bin/salt-master"
-command_args="${SALT_OPTS}"
-command_background="1"
-pidfile="/var/run/salt-master.pid"
-name="SALT master daemon"
-
-depend() {
-	use net logger
-}

diff --git a/app-admin/salt/files/minion-initd-3 b/app-admin/salt/files/minion-initd-3
deleted file mode 100644
index 2a1aa12..0000000
--- a/app-admin/salt/files/minion-initd-3
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-command="/usr/bin/salt-minion"
-command_args="${SALT_OPTS}"
-command_background="1"
-pidfile="/var/run/salt-minion.pid"
-name="SALT minion daemon"
-
-depend() {
-	need net
-	use logger
-}

diff --git a/app-admin/salt/files/salt-2014.7.5-archive-test.patch b/app-admin/salt/files/salt-2014.7.5-archive-test.patch
deleted file mode 100644
index f7ff561..0000000
--- a/app-admin/salt/files/salt-2014.7.5-archive-test.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/tests/unit/states/archive_test.py b/tests/unit/states/archive_test.py
-index a7f3005..bb0bc45 100644
---- a/tests/unit/states/archive_test.py
-+++ b/tests/unit/states/archive_test.py
-@@ -78,9 +78,7 @@ class ArchiveTest(TestCase):
-                         running_as = 'root'
-                     filename = os.path.join(
-                         tmp_dir,
--                        'files/test/_tmp{0}_test_archive.tar'.format(
--                            '' if running_as == 'root' else '_{0}'.format(running_as)
--                        )
-+                        'files/test/_tmp_test_archive.tar'
-                     )
-                     for test_opts, ret_opts in zip(test_tar_opts, ret_tar_opts):
-                         ret = archive.extracted(tmp_dir,

diff --git a/app-admin/salt/files/salt-2015.5.0-archive-test.patch b/app-admin/salt/files/salt-2015.5.0-archive-test.patch
deleted file mode 100644
index c474223..0000000
--- a/app-admin/salt/files/salt-2015.5.0-archive-test.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/tests/unit/states/archive_test.py b/tests/unit/states/archive_test.py
-index 588ec1a..acd53fa 100644
---- a/tests/unit/states/archive_test.py
-+++ b/tests/unit/states/archive_test.py
-@@ -78,9 +78,7 @@ class ArchiveTest(TestCase):
-                         running_as = 'root'
-                     filename = os.path.join(
-                         tmp_dir,
--                        'files/test/_tmp{0}_test_archive_.tar'.format(
--                            '' if running_as == 'root' else '_{0}'.format(running_as)
--                        )
-+                        'files/test/_tmp_test_archive_.tar'
-                     )
-                     for test_opts, ret_opts in zip(test_tar_opts, ret_tar_opts):
-                         ret = archive.extracted(tmp_dir,

diff --git a/app-admin/salt/files/salt-2015.5.1-skip-libvirt-test-on-nonroot.patch b/app-admin/salt/files/salt-2015.5.1-skip-libvirt-test-on-nonroot.patch
deleted file mode 100644
index acb8a09..0000000
--- a/app-admin/salt/files/salt-2015.5.1-skip-libvirt-test-on-nonroot.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/tests/unit/states/libvirt_test.py b/tests/unit/states/libvirt_test.py
-index ec09542..477e5c3 100644
---- a/tests/unit/states/libvirt_test.py
-+++ b/tests/unit/states/libvirt_test.py
-@@ -4,6 +4,7 @@
- '''
- # Import Python libs
- from __future__ import absolute_import
-+import os
- 
- # Import Salt Testing Libs
- from salttesting import skipIf, TestCase
-@@ -27,6 +28,7 @@ libvirt.__opts__ = {}
- 
- 
- @skipIf(NO_MOCK, NO_MOCK_REASON)
-+@skipIf(os.geteuid() != 0, 'You must be logged in as root to run this test')
- class LibvirtTestCase(TestCase):
-     '''
-     Test cases for salt.states.libvirt

diff --git a/app-admin/salt/files/salt-2015.8.0-remove-pydsl-includes-test.patch b/app-admin/salt/files/salt-2015.8.0-remove-pydsl-includes-test.patch
deleted file mode 100644
index 469e0d2..0000000
--- a/app-admin/salt/files/salt-2015.8.0-remove-pydsl-includes-test.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-diff --git a/tests/unit/pydsl_test.py b/tests/unit/pydsl_test.py
-index 2f39a41..2052f55 100644
---- a/tests/unit/pydsl_test.py
-+++ b/tests/unit/pydsl_test.py
-@@ -445,102 +445,6 @@ class PyDSLRendererTestCase(CommonTestCaseBoilerplate):
-             shutil.rmtree(dirpath, ignore_errors=True)
- 
- 
--class PyDSLRendererIncludeTestCase(CommonTestCaseBoilerplate):
--
--    def test_rendering_includes(self):
--        dirpath = tempfile.mkdtemp(dir=integration.SYS_TMP_DIR)
--        if not os.path.isdir(dirpath):
--            self.skipTest(
--                'The temporary directory {0!r} was not created'.format(
--                    dirpath
--                )
--            )
--        output = os.path.join(dirpath, 'output')
--        try:
--            write_to(os.path.join(dirpath, 'aaa.sls'), textwrap.dedent('''\
--                #!pydsl|stateconf -ps
--
--                include('xxx')
--                yyy = include('yyy')
--
--                # ensure states in xxx are run first, then those in yyy and then those in aaa last.
--                extend(state('yyy::start').stateconf.require(stateconf='xxx::goal'))
--                extend(state('.start').stateconf.require(stateconf='yyy::goal'))
--
--                extend(state('yyy::Y2').cmd.run('echo Y2 extended >> {0}'))
--
--                __pydsl__.set(ordered=True)
--
--                yyy.hello('red', 1)
--                yyy.hello('green', 2)
--                yyy.hello('blue', 3)
--                '''.format(output)))
--
--            write_to(os.path.join(dirpath, 'xxx.sls'), textwrap.dedent('''\
--                #!stateconf -os yaml . jinja
--
--                include:
--                  - yyy
--
--                extend:
--                  yyy::start:
--                    stateconf.set:
--                      - require:
--                        - stateconf: .goal
--
--                  yyy::Y1:
--                    cmd.run:
--                      - name: 'echo Y1 extended >> {0}'
--
--                .X1:
--                  cmd.run:
--                    - name: echo X1 >> {1}
--                    - cwd: /
--                .X2:
--                  cmd.run:
--                    - name: echo X2 >> {2}
--                    - cwd: /
--                .X3:
--                  cmd.run:
--                    - name: echo X3 >> {3}
--                    - cwd: /
--
--                '''.format(output, output, output, output)))
--
--            write_to(os.path.join(dirpath, 'yyy.sls'), textwrap.dedent('''\
--                #!pydsl|stateconf -ps
--
--                include('xxx')
--                __pydsl__.set(ordered=True)
--
--                state('.Y1').cmd.run('echo Y1 >> {0}', cwd='/')
--                state('.Y2').cmd.run('echo Y2 >> {1}', cwd='/')
--                state('.Y3').cmd.run('echo Y3 >> {2}', cwd='/')
--
--                def hello(color, number):
--                    state(color).cmd.run('echo hello '+color+' '+str(number)+' >> {3}', cwd='/')
--                '''.format(output, output, output, output)))
--
--            self.state_highstate({'base': ['aaa']}, dirpath)
--            expected = textwrap.dedent('''\
--                X1
--                X2
--                X3
--                Y1 extended
--                Y2 extended
--                Y3
--                hello red 1
--                hello green 2
--                hello blue 3
--                ''')
--
--            with salt.utils.fopen(output, 'r') as f:
--                self.assertEqual(sorted(f.read()), sorted(expected))
--
--        finally:
--            shutil.rmtree(dirpath, ignore_errors=True)
--
--
- def write_to(fpath, content):
-     with salt.utils.fopen(fpath, 'w') as f:
-         f.write(content)

diff --git a/app-admin/salt/files/salt-2015.8.4-boto-vpc-test.patch b/app-admin/salt/files/salt-2015.8.4-boto-vpc-test.patch
deleted file mode 100644
index ca18f47..0000000
--- a/app-admin/salt/files/salt-2015.8.4-boto-vpc-test.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/tests/unit/modules/boto_vpc_test.py b/tests/unit/modules/boto_vpc_test.py
-index 0768790..bb89d47 100644
---- a/tests/unit/modules/boto_vpc_test.py
-+++ b/tests/unit/modules/boto_vpc_test.py
-@@ -493,7 +493,7 @@ class BotoVpcTestCase(BotoVpcTestCaseBase, BotoVpcTestCaseMixin):
- 
-         vpc_properties = dict(id=vpc.id,
-                               cidr_block=six.text_type(cidr_block),
--                              is_default=False,
-+                              is_default=None,
-                               state=u'available',
-                               tags={u'Name': u'test', u'test': u'testvalue'},
-                               dhcp_options_id=u'dopt-7a8b9c2d',

diff --git a/app-admin/salt/files/syndic-initd-3 b/app-admin/salt/files/syndic-initd-3
deleted file mode 100644
index 5e9339b..0000000
--- a/app-admin/salt/files/syndic-initd-3
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-command="/usr/bin/salt-syndic"
-command_args="${SALT_OPTS}"
-command_background="1"
-pidfile="/var/run/salt-syndic.pid"
-name="SALT syndic daemon"
-
-depend() {
-	use net logger
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/salt/files/
@ 2017-09-11 22:23 Austin English
  0 siblings, 0 replies; 8+ messages in thread
From: Austin English @ 2017-09-11 22:23 UTC (permalink / raw
  To: gentoo-commits

commit:     c83c31660a642946f55a6c5cc1b998681c28e06c
Author:     Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 11 21:13:18 2017 +0000
Commit:     Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Mon Sep 11 22:22:50 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c83c3166

app-admin/salt: rebase files/salt-2015.8.13-sanitize-minion-name.patch so it actually applies

 app-admin/salt/files/salt-2015.8.13-sanitize-minion-name.patch | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-admin/salt/files/salt-2015.8.13-sanitize-minion-name.patch b/app-admin/salt/files/salt-2015.8.13-sanitize-minion-name.patch
index 6ede1399072..df9e0f66d00 100644
--- a/app-admin/salt/files/salt-2015.8.13-sanitize-minion-name.patch
+++ b/app-admin/salt/files/salt-2015.8.13-sanitize-minion-name.patch
@@ -11,7 +11,7 @@ diff --git a/salt/utils/verify.py b/salt/utils/verify.py
 index 5cac0fa651b..a3dc67db336 100644
 --- a/salt/utils/verify.py
 +++ b/salt/utils/verify.py
-@@ -480,12 +480,21 @@ def clean_path(root, path, subdir=False):
+@@ -484,12 +484,21 @@ def clean_path(root, path, subdir=False):
      return ''
  
  
@@ -31,6 +31,6 @@ index 5cac0fa651b..a3dc67db336 100644
      try:
 -        return bool(clean_path(opts['pki_dir'], id_))
 +        return bool(clean_path(opts['pki_dir'], id_)) and clean_id(id_)
-     except (AttributeError, KeyError, TypeError) as e:
+     except (AttributeError, KeyError) as e:
          return False
  


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/salt/files/
@ 2018-04-15 12:43 David Seifert
  0 siblings, 0 replies; 8+ messages in thread
From: David Seifert @ 2018-04-15 12:43 UTC (permalink / raw
  To: gentoo-commits

commit:     ee301819801928f8ec2aa3331a22e3c25558838d
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Sat Apr 14 15:56:05 2018 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Apr 15 12:43:01 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee301819

app-admin/salt: remove unused patch

Closes: https://github.com/gentoo/gentoo/pull/7990

 .../salt/files/salt-2017.7.2-fix_disk_format.patch | 48 ----------------------
 1 file changed, 48 deletions(-)

diff --git a/app-admin/salt/files/salt-2017.7.2-fix_disk_format.patch b/app-admin/salt/files/salt-2017.7.2-fix_disk_format.patch
deleted file mode 100644
index 9e58d93f7dd..00000000000
--- a/app-admin/salt/files/salt-2017.7.2-fix_disk_format.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 18fb0be96a146589ccbd642caa9244480c51140b Mon Sep 17 00:00:00 2001
-From: Matthew Summers <msummers42@gmail.com>
-Date: Mon, 9 Oct 2017 20:38:52 -0500
-Subject: [PATCH 1/2] addresses issue #43307, disk.format_ to disk.format
-
-This change fixes breakage. It appears the disk.format_ func is
-aliased to disk.format in modules/disk.py
----
- salt/states/blockdev.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/salt/states/blockdev.py b/salt/states/blockdev.py
-index 4b0dc5ca81d..e6ecfeab3f1 100644
---- a/salt/states/blockdev.py
-+++ b/salt/states/blockdev.py
-@@ -159,7 +159,7 @@ def formatted(name, fs_type='ext4', force=False, **kwargs):
-         ret['result'] = None
-         return ret
- 
--    __salt__['disk.format_'](name, fs_type, force=force, **kwargs)
-+    __salt__['disk.format'](name, fs_type, force=force, **kwargs)
- 
-     # Repeat fstype check up to 10 times with 3s sleeping between each
-     # to avoid detection failing although mkfs has succeeded
-
-From 16e1c1dfc86920b7a00dbf7c39b805c359e4d13b Mon Sep 17 00:00:00 2001
-From: Matthew Summers <matthew.summers@syapse.com>
-Date: Mon, 16 Oct 2017 09:47:40 -0500
-Subject: [PATCH 2/2] fixed test addressing issue #43307, disk.format_ to
- disk.format
-
----
- tests/unit/states/test_blockdev.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/unit/states/test_blockdev.py b/tests/unit/states/test_blockdev.py
-index e5899f1c70a..9b559dddfe5 100644
---- a/tests/unit/states/test_blockdev.py
-+++ b/tests/unit/states/test_blockdev.py
-@@ -100,7 +100,7 @@ def test_formatted(self):
- 
-             # Test state return when block device format fails
-             with patch.dict(blockdev.__salt__, {'cmd.run': MagicMock(return_value=mock_ext4),
--                                                'disk.format_': MagicMock(return_value=True)}):
-+                                                'disk.format': MagicMock(return_value=True)}):
-                 comt = ('Failed to format {0}'.format(name))
-                 ret.update({'comment': comt, 'result': False})
-                 with patch.object(salt.utils, 'which',


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/salt/files/
@ 2020-04-29  4:31 Patrick McLean
  0 siblings, 0 replies; 8+ messages in thread
From: Patrick McLean @ 2020-04-29  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     48b3a4e6ecf8e32c617a40a3574d9b5b1781ac52
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Wed Apr 29 04:31:19 2020 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Apr 29 04:31:19 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48b3a4e6

app-admin/salt: remove unused patch

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 .../salt/files/salt-2019.2.0-newer-deps.patch      | 210 ---------------------
 1 file changed, 210 deletions(-)

diff --git a/app-admin/salt/files/salt-2019.2.0-newer-deps.patch b/app-admin/salt/files/salt-2019.2.0-newer-deps.patch
deleted file mode 100644
index bdf95e21089..00000000000
--- a/app-admin/salt/files/salt-2019.2.0-newer-deps.patch
+++ /dev/null
@@ -1,210 +0,0 @@
-diff --git a/salt/modules/dockercompose.py b/salt/modules/dockercompose.py
-index 61e937536c..0f37e0d43a 100644
---- a/salt/modules/dockercompose.py
-+++ b/salt/modules/dockercompose.py
-@@ -241,7 +241,7 @@ def __load_docker_compose(path):
-                                     None, None)
-     try:
-         with salt.utils.files.fopen(file_path, 'r') as fl:
--            loaded = yaml.load(fl)
-+            loaded = yaml.safe_load(fl)
-     except EnvironmentError:
-         return None, __standardize_result(False,
-                                     'Could not read {0}'.format(file_path),
-@@ -371,7 +371,7 @@ def __load_compose_definitions(path, definition):
-                                               None, None)
-     else:
-         try:
--            loaded_definition = yaml.load(definition)
-+            loaded_definition = yaml.safe_load(definition)
-         except yaml.YAMLError as yerr:
-             msg = 'Could not parse {0} {1}'.format(definition, yerr)
-             return None, None, __standardize_result(False, msg,
-diff --git a/salt/serializers/yaml.py b/salt/serializers/yaml.py
-index c95b40e48f..2154e5dcab 100644
---- a/salt/serializers/yaml.py
-+++ b/salt/serializers/yaml.py
-@@ -72,6 +72,7 @@ def serialize(obj, **options):
-     '''
- 
-     options.setdefault('Dumper', Dumper)
-+    options.setdefault('default_flow_style', None)
-     try:
-         response = yaml.dump(obj, **options)
-         if response.endswith('\n...\n'):
-diff --git a/salt/serializers/yamlex.py b/salt/serializers/yamlex.py
-index 2e4ba6fb2b..e42634f580 100644
---- a/salt/serializers/yamlex.py
-+++ b/salt/serializers/yamlex.py
-@@ -182,6 +182,7 @@ def serialize(obj, **options):
-     '''
- 
-     options.setdefault('Dumper', Dumper)
-+    options.setdefault('default_flow_style', None)
-     try:
-         response = yaml.dump(obj, **options)
-         if response.endswith('\n...\n'):
-diff --git a/salt/utils/yamldumper.py b/salt/utils/yamldumper.py
-index 9892c87d23..3692ea324a 100644
---- a/salt/utils/yamldumper.py
-+++ b/salt/utils/yamldumper.py
-@@ -115,6 +115,7 @@ def dump(data, stream=None, **kwargs):
-     '''
-     if 'allow_unicode' not in kwargs:
-         kwargs['allow_unicode'] = True
-+    kwargs.setdefault('default_flow_style', None)
-     return yaml.dump(data, stream, **kwargs)
- 
- 
-@@ -126,4 +127,5 @@ def safe_dump(data, stream=None, **kwargs):
-     '''
-     if 'allow_unicode' not in kwargs:
-         kwargs['allow_unicode'] = True
-+    kwargs.setdefault('default_flow_style', None)
-     return yaml.dump(data, stream, Dumper=SafeOrderedDumper, **kwargs)
-diff --git a/tests/integration/utils/test_win_runas.py b/tests/integration/utils/test_win_runas.py
-index 3042a77991..d4057a4d03 100644
---- a/tests/integration/utils/test_win_runas.py
-+++ b/tests/integration/utils/test_win_runas.py
-@@ -539,7 +539,7 @@ class RunAsTest(ModuleCase):
-         win32serviceutil.StartService('test service')
-         wait_for_service('test service')
-         with salt.utils.files.fopen(RUNAS_OUT, 'r') as fp:
--            ret = yaml.load(fp)
-+            ret = yaml.safe_load(fp)
-         assert ret['retcode'] == 1, ret
- 
-     @with_system_user('test-runas', on_existing='delete', delete=True,
-@@ -560,7 +560,7 @@ class RunAsTest(ModuleCase):
-         win32serviceutil.StartService('test service')
-         wait_for_service('test service')
-         with salt.utils.files.fopen(RUNAS_OUT, 'r') as fp:
--            ret = yaml.load(fp)
-+            ret = yaml.safe_load(fp)
-         assert ret['retcode'] == 1, ret
- 
-     @with_system_user('test-runas-admin', on_existing='delete', delete=True,
-@@ -581,7 +581,7 @@ class RunAsTest(ModuleCase):
-         win32serviceutil.StartService('test service')
-         wait_for_service('test service')
-         with salt.utils.files.fopen(RUNAS_OUT, 'r') as fp:
--            ret = yaml.load(fp)
-+            ret = yaml.safe_load(fp)
-         assert ret['retcode'] == 0, ret
- 
-     @with_system_user('test-runas-admin', on_existing='delete', delete=True,
-@@ -602,7 +602,7 @@ class RunAsTest(ModuleCase):
-         win32serviceutil.StartService('test service')
-         wait_for_service('test service')
-         with salt.utils.files.fopen(RUNAS_OUT, 'r') as fp:
--            ret = yaml.load(fp)
-+            ret = yaml.safe_load(fp)
-         assert ret['retcode'] == 0, ret
- 
-     def test_runas_service_system_user(self):
-@@ -621,5 +621,5 @@ class RunAsTest(ModuleCase):
-         win32serviceutil.StartService('test service')
-         wait_for_service('test service')
-         with salt.utils.files.fopen(RUNAS_OUT, 'r') as fp:
--            ret = yaml.load(fp)
-+            ret = yaml.safe_load(fp)
-         assert ret['retcode'] == 0, ret
-diff --git a/tests/unit/serializers/test_serializers.py b/tests/unit/serializers/test_serializers.py
-index 3bf42b67d7..ea42d617d7 100644
---- a/tests/unit/serializers/test_serializers.py
-+++ b/tests/unit/serializers/test_serializers.py
-@@ -68,9 +68,24 @@ class TestSerializers(TestCase):
-         serialized = yamlex.serialize(data)
-         assert serialized == '{foo: bar}', serialized
- 
-+        serialized = yamlex.serialize(data, default_flow_style=False)
-+        assert serialized == 'foo: bar', serialized
-+
-         deserialized = yamlex.deserialize(serialized)
-         assert deserialized == data, deserialized
- 
-+        serialized = yaml.serialize(data)
-+        assert serialized == '{foo: bar}', serialized
-+
-+        deserialized = yaml.deserialize(serialized)
-+        assert deserialized == data, deserialized
-+
-+        serialized = yaml.serialize(data, default_flow_style=False)
-+        assert serialized == 'foo: bar', serialized
-+
-+        deserialized = yaml.deserialize(serialized)
-+        assert deserialized == data, deserialized
-+
-     @skipIf(not yamlex.available, SKIP_MESSAGE % 'sls')
-     def test_serialize_complex_sls(self):
-         data = OrderedDict([
-@@ -84,6 +99,12 @@ class TestSerializers(TestCase):
-         deserialized = yamlex.deserialize(serialized)
-         assert deserialized == data, deserialized
- 
-+        serialized = yaml.serialize(data)
-+        assert serialized == '{bar: 2, baz: true, foo: 1}', serialized
-+
-+        deserialized = yaml.deserialize(serialized)
-+        assert deserialized == data, deserialized
-+
-     @skipIf(not yaml.available, SKIP_MESSAGE % 'yaml')
-     @skipIf(not yamlex.available, SKIP_MESSAGE % 'sls')
-     def test_compare_sls_vs_yaml(self):
-diff --git a/tests/unit/utils/test_schema.py b/tests/unit/utils/test_schema.py
-index 677cd0778b..5c2f1fd8fd 100644
---- a/tests/unit/utils/test_schema.py
-+++ b/tests/unit/utils/test_schema.py
-@@ -5,6 +5,7 @@
- 
- # Import python libs
- from __future__ import absolute_import, print_function, unicode_literals
-+import sys
- import copy
- 
- # Import Salt Testing Libs
-@@ -506,7 +507,7 @@ class ConfigTestCase(TestCase):
-                 {'personal_access_token': 'foo'},
-                 Requirements.serialize()
-             )
--        self.assertIn('is not valid under any of the given schemas', excinfo.exception.message)
-+        self.assertIn("'ssh_key_file' is a required property", excinfo.exception.message)
- 
-     def test_boolean_config(self):
-         item = schema.BooleanItem(title='Hungry', description='Are you hungry?')
-@@ -1730,7 +1731,10 @@ class ConfigTestCase(TestCase):
- 
-         with self.assertRaises(jsonschema.exceptions.ValidationError) as excinfo:
-             jsonschema.validate({'item': {'sides': '4', 'color': 'blue'}}, TestConf.serialize())
--        self.assertIn('is not valid under any of the given schemas', excinfo.exception.message)
-+        if sys.hexversion >= 0x03000000:
-+            self.assertIn("'4' is not of type 'boolean'", excinfo.exception.message)
-+        else:
-+            self.assertIn("u'4' is not of type u'boolean'", excinfo.exception.message)
- 
-         class TestConf(schema.Schema):
-             item = schema.DictItem(
-@@ -1833,7 +1837,10 @@ class ConfigTestCase(TestCase):
- 
-         with self.assertRaises(jsonschema.exceptions.ValidationError) as excinfo:
-             jsonschema.validate({'item': ['maybe']}, TestConf.serialize())
--        self.assertIn('is not valid under any of the given schemas', excinfo.exception.message)
-+        if sys.hexversion >= 0x03000000:
-+            self.assertIn("'maybe' is not one of ['yes']", excinfo.exception.message)
-+        else:
-+            self.assertIn("u'maybe' is not one of [u'yes']", excinfo.exception.message)
- 
-         with self.assertRaises(jsonschema.exceptions.ValidationError) as excinfo:
-             jsonschema.validate({'item': 2}, TestConf.serialize())
-@@ -1885,7 +1892,10 @@ class ConfigTestCase(TestCase):
- 
-         with self.assertRaises(jsonschema.exceptions.ValidationError) as excinfo:
-             jsonschema.validate({'item': ['maybe']}, TestConf.serialize())
--        self.assertIn('is not valid under any of the given schemas', excinfo.exception.message)
-+        if sys.hexversion >= 0x03000000:
-+            self.assertIn("'maybe' is not one of ['yes']", excinfo.exception.message)
-+        else:
-+            self.assertIn("u'maybe' is not one of [u'yes']", excinfo.exception.message)
- 
-         with self.assertRaises(jsonschema.exceptions.ValidationError) as excinfo:
-             jsonschema.validate({'item': 2}, TestConf.serialize())


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/salt/files/
@ 2021-04-15 18:05 Conrad Kostecki
  0 siblings, 0 replies; 8+ messages in thread
From: Conrad Kostecki @ 2021-04-15 18:05 UTC (permalink / raw
  To: gentoo-commits

commit:     f6bd2aafcae3e74593a561c9d17200f14b31732d
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Thu Apr  8 16:48:33 2021 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Thu Apr 15 18:05:21 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6bd2aaf

app-admin/salt: remove unused files

Closes: https://github.com/gentoo/gentoo/pull/20307
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 app-admin/salt/files/api-initd-4    | 14 --------------
 app-admin/salt/files/master-initd-4 | 14 --------------
 app-admin/salt/files/minion-initd-4 | 15 ---------------
 app-admin/salt/files/syndic-initd-4 | 14 --------------
 4 files changed, 57 deletions(-)

diff --git a/app-admin/salt/files/api-initd-4 b/app-admin/salt/files/api-initd-4
deleted file mode 100644
index a0cb8265047..00000000000
--- a/app-admin/salt/files/api-initd-4
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-command="/usr/bin/salt-api"
-command_args="${SALT_OPTS}"
-command_background="1"
-pidfile="/var/run/salt-api.pid"
-name="SALT API daemon"
-retry="20"
-
-depend() {
-	use net logger
-}

diff --git a/app-admin/salt/files/master-initd-4 b/app-admin/salt/files/master-initd-4
deleted file mode 100644
index e07e72b0dae..00000000000
--- a/app-admin/salt/files/master-initd-4
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-command="/usr/bin/salt-master"
-command_args="${SALT_OPTS}"
-command_background="1"
-pidfile="/var/run/salt-master.pid"
-name="SALT master daemon"
-retry="20"
-
-depend() {
-	use net logger
-}

diff --git a/app-admin/salt/files/minion-initd-4 b/app-admin/salt/files/minion-initd-4
deleted file mode 100644
index c658ccf5c1d..00000000000
--- a/app-admin/salt/files/minion-initd-4
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-command="/usr/bin/salt-minion"
-command_args="${SALT_OPTS}"
-command_background="1"
-pidfile="/var/run/salt-minion.pid"
-name="SALT minion daemon"
-retry="20"
-
-depend() {
-	need net
-	use logger
-}

diff --git a/app-admin/salt/files/syndic-initd-4 b/app-admin/salt/files/syndic-initd-4
deleted file mode 100644
index 8908f2cfa85..00000000000
--- a/app-admin/salt/files/syndic-initd-4
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-command="/usr/bin/salt-syndic"
-command_args="${SALT_OPTS}"
-command_background="1"
-pidfile="/var/run/salt-syndic.pid"
-name="SALT syndic daemon"
-retry="20"
-
-depend() {
-	use net logger
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/salt/files/
@ 2022-06-28 20:57 Patrick McLean
  0 siblings, 0 replies; 8+ messages in thread
From: Patrick McLean @ 2022-06-28 20:57 UTC (permalink / raw
  To: gentoo-commits

commit:     12d79320dae923860ffe41801367df8336ac931c
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Thu Jun 23 19:10:17 2022 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Tue Jun 28 20:57:43 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12d79320

app-admin/salt: remove unused patch

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/26061
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 app-admin/salt/files/salt-3000.9-tests.patch | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/app-admin/salt/files/salt-3000.9-tests.patch b/app-admin/salt/files/salt-3000.9-tests.patch
deleted file mode 100644
index 9b7a1786e72a..000000000000
--- a/app-admin/salt/files/salt-3000.9-tests.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/tests/unit/modules/test_cmdmod.py b/tests/unit/modules/test_cmdmod.py
-index 2d88706b49..ec8b623f5b 100644
---- a/tests/unit/modules/test_cmdmod.py
-+++ b/tests/unit/modules/test_cmdmod.py
-@@ -509,6 +509,7 @@ class CMDMODTestCase(TestCase, LoaderModuleMockMixin):
-         self.assertEqual(ret['stdout'],
-                          salt.utils.stringutils.to_unicode(stdout))
- 
-+    @skipIf(True, "Not happy in sandbox")
-     def test_run_all_output_loglevel_debug(self):
-         '''
-         Test that specifying debug for loglevel


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/salt/files/
@ 2022-07-18 21:41 Conrad Kostecki
  0 siblings, 0 replies; 8+ messages in thread
From: Conrad Kostecki @ 2022-07-18 21:41 UTC (permalink / raw
  To: gentoo-commits

commit:     5f4adadb15d2b71a062e75f0aeb9a7f8701b216c
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Wed Jun 29 08:58:01 2022 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Mon Jul 18 21:41:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f4adadb

app-admin/salt: remove unused patches

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/26138
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 app-admin/salt/files/salt-3003-tests.patch   | 139 ------------------------
 app-admin/salt/files/salt-3003.3-jinja.patch | 155 ---------------------------
 2 files changed, 294 deletions(-)

diff --git a/app-admin/salt/files/salt-3003-tests.patch b/app-admin/salt/files/salt-3003-tests.patch
deleted file mode 100644
index c3562c5a4448..000000000000
--- a/app-admin/salt/files/salt-3003-tests.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-diff --git a/tests/integration/grains/test_core.py b/tests/integration/grains/test_core.py
-index 5f1cf11e24..8affb398ff 100644
---- a/tests/integration/grains/test_core.py
-+++ b/tests/integration/grains/test_core.py
-@@ -21,6 +21,7 @@ def _freebsd_or_openbsd():
-     return salt.utils.platform.is_freebsd() or salt.utils.platform.is_openbsd()
- 
- 
-+@pytest.mark.skip("Tests only should run on FreeBSD and OpenBSD")
- @pytest.mark.windows_whitelisted
- class TestGrainsCore(ModuleCase):
-     """
-diff --git a/tests/integration/states/test_x509.py b/tests/integration/states/test_x509.py
-index 2321689ef5..574de51e56 100644
---- a/tests/integration/states/test_x509.py
-+++ b/tests/integration/states/test_x509.py
-@@ -468,7 +468,7 @@ c9bcgp7D7xD+TxWWNj4CSXEccJgGr91StV+gFg4ARQ==
-             first_run[key]["changes"]["Certificate"]["New"]["Not After"],
-             "%Y-%m-%d %H:%M:%S",
-         )
--        self.assertEqual(29, (expiry - datetime.datetime.now()).days)
-+        self.assertEqual(30, (expiry - datetime.datetime.now()).days)
-         self.assertTrue(os.path.exists(crtfile), "Certificate was not created.")
- 
-         with salt.utils.files.fopen(crtfile, "r") as first_cert:
-@@ -485,14 +485,14 @@ c9bcgp7D7xD+TxWWNj4CSXEccJgGr91StV+gFg4ARQ==
-             },
-         )
-         self.assertEqual(
--            "Certificate needs renewal: 29 days remaining but it needs to be at least 90",
-+            "Certificate needs renewal: 30 days remaining but it needs to be at least 90",
-             second_run[key]["changes"]["Status"]["Old"],
-         )
-         expiry = datetime.datetime.strptime(
-             second_run[key]["changes"]["Certificate"]["New"]["Not After"],
-             "%Y-%m-%d %H:%M:%S",
-         )
--        self.assertEqual(179, (expiry - datetime.datetime.now()).days)
-+        self.assertEqual(180, (expiry - datetime.datetime.now()).days)
-         with salt.utils.files.fopen(crtfile, "r") as second_cert:
-             self.assertNotEqual(
-                 cert_contents,
-diff --git a/tests/pytests/unit/modules/test_cmdmod.py b/tests/pytests/unit/modules/test_cmdmod.py
-index 5424514160..0564b59593 100644
---- a/tests/pytests/unit/modules/test_cmdmod.py
-+++ b/tests/pytests/unit/modules/test_cmdmod.py
-@@ -438,6 +438,7 @@ def test_run_cwd_doesnt_exist_issue_7154():
- 
- @pytest.mark.skip_on_darwin
- @pytest.mark.skip_on_windows
-+@pytest.mark.skip("does not work in sandbox environment")
- def test_run_cwd_in_combination_with_runas():
-     """
-     cmd.run executes command in the cwd directory
-diff --git a/tests/unit/ext/test_ipaddress.py b/tests/unit/ext/test_ipaddress.py
-index 4fd87d1c3f..02585a9e4e 100644
---- a/tests/unit/ext/test_ipaddress.py
-+++ b/tests/unit/ext/test_ipaddress.py
-@@ -2682,6 +2682,7 @@ class IpaddrUnitTest(TestCase):
-             "2001:658:22a:cafe:200::1/::ffff:ffff:ffff:ffff",
-         )
- 
-+    @pytest.mark.skip("_cache no longer present in python3.8+")
-     def testNetworkElementCaching(self):
-         # V4 - make sure we're empty
-         self.assertNotIn("broadcast_address", self.ipv4_network._cache)
-diff --git a/tests/unit/utils/test_parsers.py b/tests/unit/utils/test_parsers.py
-index 907c67f477..2429d27641 100644
---- a/tests/unit/utils/test_parsers.py
-+++ b/tests/unit/utils/test_parsers.py
-@@ -5,6 +5,7 @@
- import os
- import shutil
- import tempfile
-+import pytest
- 
- import salt.config
- import salt.log.setup as log
-@@ -983,6 +984,7 @@ class SaltRunOptionParserTestCase(ParserBase, TestCase):
-         if os.path.exists(self.log_file):
-             os.unlink(self.log_file)
- 
-+    @pytest.mark.skip("Tries to write to /var")
-     def test_jid_option(self):
-         jid = salt.utils.jid.gen_jid({})
-         args = ["--jid", jid]
-@@ -991,6 +993,7 @@ class SaltRunOptionParserTestCase(ParserBase, TestCase):
-         parser.parse_args(args)
-         assert parser.options.jid == jid
- 
-+    @pytest.mark.skip("Tries to write to /var")
-     def test_jid_option_invalid(self):
-         jid = salt.utils.jid.gen_jid({}) + "A"
-         args = ["--jid", jid]
-@@ -1041,6 +1044,7 @@ class SaltSSHOptionParserTestCase(ParserBase, TestCase):
-         if os.path.exists(self.ssh_log_file):
-             os.unlink(self.ssh_log_file)
- 
-+    @pytest.mark.skip("Tries to write to /var")
-     def test_jid_option(self):
-         jid = salt.utils.jid.gen_jid({})
-         args = ["--jid", jid] + self.args
-@@ -1049,6 +1053,7 @@ class SaltSSHOptionParserTestCase(ParserBase, TestCase):
-         parser.parse_args(args)
-         assert parser.options.jid == jid
- 
-+    @pytest.mark.skip("Tries to write to /var")
-     def test_jid_option_invalid(self):
-         jid = salt.utils.jid.gen_jid({}) + "A"
-         args = ["--jid", jid] + self.args
-diff --git a/tests/unit/utils/test_vt.py b/tests/unit/utils/test_vt.py
-index 87fc6a342c..12d4c6a073 100644
---- a/tests/unit/utils/test_vt.py
-+++ b/tests/unit/utils/test_vt.py
-@@ -20,6 +20,8 @@ import subprocess
- import sys
- import time
- 
-+import pytest
-+
- # Import Salt libs
- import salt.utils
- import salt.utils.files
-@@ -274,6 +276,7 @@ class VTTestCase(TestCase):
-         salt.utils.platform.is_windows(), "Skip VT tests on windows, due to issue 54290"
-     )
-     @fixStdOutErrFileNoIfNeeded
-+    @pytest.mark.skip("Does not work in sandbox environment")
-     def test_split_multibyte_characters_unicode(self):
-         """
-             Tests that the vt correctly handles multibyte characters that are
-@@ -341,6 +344,7 @@ class VTTestCase(TestCase):
-         salt.utils.platform.is_windows(), "Skip VT tests on windows, due to issue 54290"
-     )
-     @fixStdOutErrFileNoIfNeeded
-+    @pytest.mark.skip("Does not work in sandbox environment")
-     def test_split_multibyte_characters_shiftjis(self):
-         """
-             Tests that the vt correctly handles multibyte characters that are

diff --git a/app-admin/salt/files/salt-3003.3-jinja.patch b/app-admin/salt/files/salt-3003.3-jinja.patch
deleted file mode 100644
index ec5b1ac6156f..000000000000
--- a/app-admin/salt/files/salt-3003.3-jinja.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-https://github.com/saltstack/salt/issues/61848
-https://patch-diff.githubusercontent.com/raw/saltstack/salt/pull/61856.patch
-
-Dropped a bunch of irrelevant hunks (CI files and a test not in 3003.3)
-
-From 03c2a607a0722ad5e55b6c8f8eda630be7c7fee5 Mon Sep 17 00:00:00 2001
-From: jonyhy96 <hy352144278@gmail.com>
-Date: Thu, 10 Mar 2022 10:41:48 +0800
-Subject: [PATCH 1/5] fix: jinja2 contextfuntion base on version
-
----
- salt/utils/jinja.py | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/salt/utils/jinja.py b/salt/utils/jinja.py
-index 4c430b5ccf32..9a1938c2d69b 100644
---- a/salt/utils/jinja.py
-+++ b/salt/utils/jinja.py
-@@ -707,7 +707,11 @@ def method_call(obj, f_name, *f_args, **f_kwargs):
-     return getattr(obj, f_name, lambda *args, **kwargs: None)(*f_args, **f_kwargs)
- 
- 
--@jinja2.contextfunction
-+if jinja2.__version__ < '3.0.0' :
-+    contextfunction = jinja2.contextfunction
-+else:
-+    contextfunction =  jinja2.pass_context
-+@contextfunction
- def show_full_context(ctx):
-     return salt.utils.data.simple_types_filter(
-         {key: value for key, value in ctx.items()}
-
-From 1aba938021b86732a211a899dc4c2a46afa488a2 Mon Sep 17 00:00:00 2001
-From: jonyhy96 <hy352144278@gmail.com>
-Date: Thu, 3 Mar 2022 16:21:17 +0800
-Subject: [PATCH 2/5] fix: jinja2 DeprecationWarning
-
----
- salt/utils/jinja.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/salt/utils/jinja.py b/salt/utils/jinja.py
-index 9a1938c2d69b..207a2cb77035 100644
---- a/salt/utils/jinja.py
-+++ b/salt/utils/jinja.py
-@@ -710,7 +710,7 @@ def method_call(obj, f_name, *f_args, **f_kwargs):
- if jinja2.__version__ < '3.0.0' :
-     contextfunction = jinja2.contextfunction
- else:
--    contextfunction =  jinja2.pass_context
-+    contextfunction = jinja2.pass_context
- @contextfunction
- def show_full_context(ctx):
-     return salt.utils.data.simple_types_filter(
-
-From 7f281bbfc8efda40cfe7d607c0ddebb2fb00bd5d Mon Sep 17 00:00:00 2001
-From: Megan Wilhite <mwilhite@vmware.com>
-Date: Fri, 25 Mar 2022 08:31:24 -0600
-Subject: [PATCH 3/5] Use the correct Markup from jinja for each version
-
----
- salt/utils/jinja.py | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/salt/utils/jinja.py b/salt/utils/jinja.py
-index 207a2cb77035..558f063d7206 100644
---- a/salt/utils/jinja.py
-+++ b/salt/utils/jinja.py
-@@ -26,7 +26,7 @@
- import salt.utils.stringutils
- import salt.utils.url
- import salt.utils.yaml
--from jinja2 import BaseLoader, Markup, TemplateNotFound, nodes
-+from jinja2 import BaseLoader, TemplateNotFound, nodes
- from jinja2.environment import TemplateModule
- from jinja2.exceptions import TemplateRuntimeError
- from jinja2.ext import Extension
-@@ -35,6 +35,12 @@
- from salt.utils.odict import OrderedDict
- from salt.utils.versions import LooseVersion
- 
-+try:
-+    from jinja2 import Markup
-+except ImportError:
-+    # Markup moved to markupsafe in jinja>= 3.1
-+    from markupsafe import Markup
-+
- log = logging.getLogger(__name__)
- 
- __all__ = ["SaltCacheLoader", "SerializerExtension"]
-
-diff --git a/salt/utils/jinja.py b/salt/utils/jinja.py
-index 558f063d7206..5d00b134e25f 100644
---- a/salt/utils/jinja.py
-+++ b/salt/utils/jinja.py
-@@ -713,10 +713,12 @@ def method_call(obj, f_name, *f_args, **f_kwargs):
-     return getattr(obj, f_name, lambda *args, **kwargs: None)(*f_args, **f_kwargs)
- 
- 
--if jinja2.__version__ < '3.0.0' :
-+if jinja2.__version__ < "3.0.0":
-     contextfunction = jinja2.contextfunction
- else:
-     contextfunction = jinja2.pass_context
-+
-+
- @contextfunction
- def show_full_context(ctx):
-     return salt.utils.data.simple_types_filter(
-
-From 9056e636beaea7de2e3a61876ba0345e5d390973 Mon Sep 17 00:00:00 2001
-From: Megan Wilhite <mwilhite@vmware.com>
-Date: Fri, 25 Mar 2022 11:14:01 -0600
-Subject: [PATCH 5/5] Fix requested feedback
-
----
- requirements/static/ci/docs.in               |  1 +
- requirements/static/ci/py3.10/docs.txt       |  3 ++-
- requirements/static/ci/py3.6/docs.txt        |  1 +
- requirements/static/ci/py3.7/docs.txt        |  3 ++-
- requirements/static/ci/py3.8/docs.txt        |  3 ++-
- requirements/static/ci/py3.9/docs.txt        |  3 ++-
- salt/utils/jinja.py                          | 10 +++++-----
- 8 files changed, 21 insertions(+), 10 deletions(-)
-
-diff --git a/salt/utils/jinja.py b/salt/utils/jinja.py
-index 5d00b134e25f..aa8ebe90546c 100644
---- a/salt/utils/jinja.py
-+++ b/salt/utils/jinja.py
-@@ -36,10 +36,10 @@
- from salt.utils.versions import LooseVersion
- 
- try:
--    from jinja2 import Markup
--except ImportError:
--    # Markup moved to markupsafe in jinja>= 3.1
-     from markupsafe import Markup
-+except ImportError:
-+    # jinja < 3.1
-+    from jinja2 import Markup
- 
- log = logging.getLogger(__name__)
- 
-@@ -713,9 +713,9 @@ def method_call(obj, f_name, *f_args, **f_kwargs):
-     return getattr(obj, f_name, lambda *args, **kwargs: None)(*f_args, **f_kwargs)
- 
- 
--if jinja2.__version__ < "3.0.0":
-+try:
-     contextfunction = jinja2.contextfunction
--else:
-+except AttributeError:
-     contextfunction = jinja2.pass_context
- 
- 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/salt/files/
@ 2022-11-08 23:50 Patrick McLean
  0 siblings, 0 replies; 8+ messages in thread
From: Patrick McLean @ 2022-11-08 23:50 UTC (permalink / raw
  To: gentoo-commits

commit:     02bc26438996afb8f237a92b90be0b48a2151e4f
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Tue Nov  8 06:17:45 2022 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Tue Nov  8 23:50:09 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02bc2643

app-admin/salt: remove unused patch

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/28187
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 app-admin/salt/files/salt-3004.1-jinja-3.patch | 40 --------------------------
 1 file changed, 40 deletions(-)

diff --git a/app-admin/salt/files/salt-3004.1-jinja-3.patch b/app-admin/salt/files/salt-3004.1-jinja-3.patch
deleted file mode 100644
index 98f21bc35129..000000000000
--- a/app-admin/salt/files/salt-3004.1-jinja-3.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/salt/utils/jinja.py b/salt/utils/jinja.py
-index 0cb70bf64a..322c2f7f46 100644
---- a/salt/utils/jinja.py
-+++ b/salt/utils/jinja.py
-@@ -25,10 +25,11 @@ import salt.utils.json
- import salt.utils.stringutils
- import salt.utils.url
- import salt.utils.yaml
--from jinja2 import BaseLoader, Markup, TemplateNotFound, nodes
-+from jinja2 import BaseLoader, TemplateNotFound, nodes
- from jinja2.environment import TemplateModule
- from jinja2.exceptions import TemplateRuntimeError
- from jinja2.ext import Extension
-+from markupsafe import Markup
- from salt.exceptions import TemplateError
- from salt.utils.decorators.jinja import jinja_filter, jinja_global, jinja_test
- from salt.utils.odict import OrderedDict
-@@ -706,7 +707,7 @@ def method_call(obj, f_name, *f_args, **f_kwargs):
-     return getattr(obj, f_name, lambda *args, **kwargs: None)(*f_args, **f_kwargs)
- 
- 
--@jinja2.contextfunction
-+@jinja2.pass_context
- def show_full_context(ctx):
-     return salt.utils.data.simple_types_filter(
-         {key: value for key, value in ctx.items()}
-diff --git a/tests/unit/utils/test_jinja.py b/tests/unit/utils/test_jinja.py
-index 6502831aff..dec847364a 100644
---- a/tests/unit/utils/test_jinja.py
-+++ b/tests/unit/utils/test_jinja.py
-@@ -22,7 +22,8 @@ import salt.utils.files
- import salt.utils.json
- import salt.utils.stringutils
- import salt.utils.yaml
--from jinja2 import DictLoader, Environment, Markup, exceptions
-+from jinja2 import DictLoader, Environment, exceptions
-+from markupsafe import Markup
- from salt.exceptions import SaltRenderError
- from salt.utils.decorators.jinja import JinjaFilter
- from salt.utils.jinja import (


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-11-08 23:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-11 22:23 [gentoo-commits] repo/gentoo:master commit in: app-admin/salt/files/ Austin English
  -- strict thread matches above, loose matches on Subject: below --
2022-11-08 23:50 Patrick McLean
2022-07-18 21:41 Conrad Kostecki
2022-06-28 20:57 Patrick McLean
2021-04-15 18:05 Conrad Kostecki
2020-04-29  4:31 Patrick McLean
2018-04-15 12:43 David Seifert
2016-07-01  8:02 Patrice Clement

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox