[arch-commits] Commit in salt/trunk (PKGBUILD jinja-3.1.patch)

Morten Linderud foxboron at gemini.archlinux.org
Mon Jul 4 17:28:13 UTC 2022


    Date: Monday, July 4, 2022 @ 17:28:13
  Author: foxboron
Revision: 1243941

upgpkg: salt 3004.2-1

Modified:
  salt/trunk/PKGBUILD
Deleted:
  salt/trunk/jinja-3.1.patch

-----------------+
 PKGBUILD        |   14 ++++++------
 jinja-3.1.patch |   62 ------------------------------------------------------
 2 files changed, 7 insertions(+), 69 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-07-04 17:19:16 UTC (rev 1243940)
+++ PKGBUILD	2022-07-04 17:28:13 UTC (rev 1243941)
@@ -6,8 +6,8 @@
 # Contributor: zer0def <zer0def at github>
 
 pkgname=salt
-pkgver=3004.1
-pkgrel=3
+pkgver=3004.2
+pkgrel=1
 
 pkgdesc='Central system and configuration manager'
 arch=('any')
@@ -38,11 +38,11 @@
 
 install=salt.install
 source=("https://pypi.io/packages/source/s/salt/salt-$pkgver.tar.gz"
-        jinja-3.1.patch
+        "zmq-23.patch::https://github.com/saltstack/salt/commit/6ec8b90e402ff3fa8f27c7da70ece898592416bc.patch"
         salt.logrotate)
 
-sha256sums=('7f344a2432648a4f078daa5accc68dcdffe1095cea13ec21e50413560f04c298'
-            'bfce486e45a37c6e78af545cd653f932da20c6d13c2bbbc874686924838fbcdf'
+sha256sums=('2fa644f6200d4e36b55846cb372b6e67b6ca0fbec0697f1d8d73e771b665ed70'
+            'a82dcec84d7f2eb5b136ef8112397a1dc1234392741dc6a6db66c868c495eb76'
             'abecc3c1be124c4afffaaeb3ba32b60dfee8ba6dc32189edfa2ad154ecb7a215')
 
 prepare() {
@@ -49,8 +49,8 @@
   cd salt-$pkgver
   sed -i '/^contextvars/d' requirements/base.txt
 
-  # https://github.com/saltstack/salt/pull/61856
-  patch -Np1 -i ../jinja-3.1.patch
+  # https://bugs.archlinux.org/task/75114#comment209320
+  patch -Np1 < "$srcdir/zmq-23.patch"
 
   # remove version requirements for pyzmq, there's no point in it
   # we only have one version and the "python_version <=> *" checks are discarded

Deleted: jinja-3.1.patch
===================================================================
--- jinja-3.1.patch	2022-07-04 17:19:16 UTC (rev 1243940)
+++ jinja-3.1.patch	2022-07-04 17:28:13 UTC (rev 1243941)
@@ -1,62 +0,0 @@
-From 240e165ebcd06370a1aa47f37c6842581c82e3f8 Mon Sep 17 00:00:00 2001
-From: Megan Wilhite <mwilhite at vmware.com>
-Date: Fri, 25 Mar 2022 08:31:24 -0600
-Subject: [PATCH] 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"]
-
-From 2c39d8626527d1d753f5447753855bc7e265874b Mon Sep 17 00:00:00 2001
-From: jonyhy96 <hy352144278 at gmail.com>
-Date: Thu, 10 Mar 2022 10:41:48 +0800
-Subject: [PATCH] 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)
- 
- 
-- at jinja2.contextfunction
-+if jinja2.__version__ < '3.0.0' :
-+    contextfunction = jinja2.contextfunction
-+else:
-+    contextfunction =  jinja2.pass_context
-+ at contextfunction
- def show_full_context(ctx):
-     return salt.utils.data.simple_types_filter(
-         {key: value for key, value in ctx.items()}



More information about the arch-commits mailing list