[arch-commits] Commit in salt/repos/community-any (7 files)
Evangelos Foutras
foutrelis at gemini.archlinux.org
Tue May 24 13:19:13 UTC 2022
Date: Tuesday, May 24, 2022 @ 13:19:13
Author: foutrelis
Revision: 1210206
archrelease: copy trunk to community-any
Added:
salt/repos/community-any/PKGBUILD
(from rev 1210205, salt/trunk/PKGBUILD)
salt/repos/community-any/jinja-3.1.patch
(from rev 1210205, salt/trunk/jinja-3.1.patch)
salt/repos/community-any/salt.install
(from rev 1210205, salt/trunk/salt.install)
salt/repos/community-any/salt.logrotate
(from rev 1210205, salt/trunk/salt.logrotate)
Deleted:
salt/repos/community-any/PKGBUILD
salt/repos/community-any/salt.install
salt/repos/community-any/salt.logrotate
-----------------+
PKGBUILD | 184 +++++++++++++++++++++++++++---------------------------
jinja-3.1.patch | 62 ++++++++++++++++++
salt.install | 44 ++++++------
salt.logrotate | 24 +++----
4 files changed, 189 insertions(+), 125 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2022-05-24 13:19:08 UTC (rev 1210205)
+++ PKGBUILD 2022-05-24 13:19:13 UTC (rev 1210206)
@@ -1,91 +0,0 @@
-# Maintainer: Johannes Löthberg <johannes at kyriasis.com>
-# Maintainer: Morten Linderud <foxboron at archlinux.org>
-# Contributor: Sébastien Luttringer
-# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
-# Contributor: Christer Edwards <christer.edwards at gmail.com>
-# Contributor: zer0def <zer0def at github>
-
-pkgname=salt
-pkgver=3004.1
-pkgrel=2
-
-pkgdesc='Central system and configuration manager'
-arch=('any')
-url='http://saltstack.org/'
-license=('Apache')
-
-replaces=('salt-zmq' 'salt-raet')
-conflicts=('salt-zmq' 'salt-raet')
-
-depends=('python-jinja'
- 'python-msgpack'
- 'python-yaml'
- 'python-markupsafe'
- 'python-requests'
- 'python-pyzmq'
- 'python-m2crypto'
- 'python-systemd'
- 'python-distro'
- 'python-importlib-metadata'
- 'python-pycryptodomex')
-optdepends=('dmidecode: decode SMBIOS/DMI tables'
- 'python-pygit2: gitfs support')
-#checkdepends=('python-pytest' 'python-psutil')
-
-backup=('etc/logrotate.d/salt'
- 'etc/salt/master'
- 'etc/salt/minion')
-
-install=salt.install
-source=("https://pypi.io/packages/source/s/salt/salt-$pkgver.tar.gz"
- "patch-requirements.patch::https://github.com/saltstack/salt/commit/be9879c5d5b30ea0997b1cfca9ad830a54a900b0.patch"
- salt.logrotate)
-
-sha256sums=('7f344a2432648a4f078daa5accc68dcdffe1095cea13ec21e50413560f04c298'
- '84e9f80f684a3d7059e8a3636ec67f3d088c6250643ee17e58fb0032f2ef84a0'
- 'abecc3c1be124c4afffaaeb3ba32b60dfee8ba6dc32189edfa2ad154ecb7a215')
-
-prepare() {
- cd salt-$pkgver
- patch -Np1 < "$srcdir/patch-requirements.patch"
- sed -i '/^contextvars/d' requirements/base.txt
-
- # remove version requirements for pyzmq, there's no point in it
- # we only have one version and the "python_version <=> *" checks are discarded
- # so pyzmq<=20.0.0 ends up in the final requirements.txt
- echo -e '-r crypto.txt\n\npyzmq' > requirements/zeromq.txt
-}
-
-build() {
- cd salt-$pkgver
- python setup.py build
-}
-
-# TODO: Missing salt-factories, pytest-tempdir
-# check() {
-# cd salt-$pkgver
-# python setup.py install --root="$PWD/tmp_install" --optimize=1
-# PYTHONPATH="$PWD/tmp_install/usr/lib/python3.10/site-packages:$PYTHONPATH" py.test
-# }
-
-package() {
- install -Dm644 salt.logrotate "$pkgdir"/etc/logrotate.d/salt
-
- cd salt-$pkgver
-
- python setup.py --salt-pidfile-dir="/run/salt" install --root="$pkgdir" --optimize=1 --skip-build
-
- # default config
- install -v -Dm644 conf/master "$pkgdir/etc/salt/master"
- install -v -Dm644 conf/minion "$pkgdir/etc/salt/minion"
-
- # systemd services
- for _svc in salt-master.service salt-syndic.service salt-minion.service salt-api.service; do
- install -v -Dm644 pkg/$_svc "$pkgdir/usr/lib/systemd/system/$_svc"
- done
- install -v -Dm644 pkg/salt.bash "$pkgdir/usr/share/bash-completion/completions/salt"
- install -v -Dm644 pkg/salt.zsh "$pkgdir/usr/share/zsh/site-functions/_salt"
- install -v -Dm644 -t "$pkgdir/usr/share/fish/vendor_completions.d" pkg/fish-completions/*
-}
-
-# vim:set ts=2 sw=2 et:
Copied: salt/repos/community-any/PKGBUILD (from rev 1210205, salt/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2022-05-24 13:19:13 UTC (rev 1210206)
@@ -0,0 +1,93 @@
+# Maintainer: Johannes Löthberg <johannes at kyriasis.com>
+# Maintainer: Morten Linderud <foxboron at archlinux.org>
+# Contributor: Sébastien Luttringer
+# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
+# Contributor: Christer Edwards <christer.edwards at gmail.com>
+# Contributor: zer0def <zer0def at github>
+
+pkgname=salt
+pkgver=3004.1
+pkgrel=3
+
+pkgdesc='Central system and configuration manager'
+arch=('any')
+url='http://saltstack.org/'
+license=('Apache')
+
+replaces=('salt-zmq' 'salt-raet')
+conflicts=('salt-zmq' 'salt-raet')
+
+depends=('python-jinja'
+ 'python-msgpack'
+ 'python-yaml'
+ 'python-markupsafe'
+ 'python-requests'
+ 'python-pyzmq'
+ 'python-m2crypto'
+ 'python-systemd'
+ 'python-distro'
+ 'python-importlib-metadata'
+ 'python-pycryptodomex')
+optdepends=('dmidecode: decode SMBIOS/DMI tables'
+ 'python-pygit2: gitfs support')
+#checkdepends=('python-pytest' 'python-psutil')
+
+backup=('etc/logrotate.d/salt'
+ 'etc/salt/master'
+ 'etc/salt/minion')
+
+install=salt.install
+source=("https://pypi.io/packages/source/s/salt/salt-$pkgver.tar.gz"
+ jinja-3.1.patch
+ salt.logrotate)
+
+sha256sums=('7f344a2432648a4f078daa5accc68dcdffe1095cea13ec21e50413560f04c298'
+ 'bfce486e45a37c6e78af545cd653f932da20c6d13c2bbbc874686924838fbcdf'
+ 'abecc3c1be124c4afffaaeb3ba32b60dfee8ba6dc32189edfa2ad154ecb7a215')
+
+prepare() {
+ cd salt-$pkgver
+ sed -i '/^contextvars/d' requirements/base.txt
+
+ # https://github.com/saltstack/salt/pull/61856
+ patch -Np1 -i ../jinja-3.1.patch
+
+ # remove version requirements for pyzmq, there's no point in it
+ # we only have one version and the "python_version <=> *" checks are discarded
+ # so pyzmq<=20.0.0 ends up in the final requirements.txt
+ echo -e '-r crypto.txt\n\npyzmq' > requirements/zeromq.txt
+}
+
+build() {
+ cd salt-$pkgver
+ python setup.py build
+}
+
+# TODO: Missing salt-factories, pytest-tempdir
+# check() {
+# cd salt-$pkgver
+# python setup.py install --root="$PWD/tmp_install" --optimize=1
+# PYTHONPATH="$PWD/tmp_install/usr/lib/python3.10/site-packages:$PYTHONPATH" py.test
+# }
+
+package() {
+ install -Dm644 salt.logrotate "$pkgdir"/etc/logrotate.d/salt
+
+ cd salt-$pkgver
+
+ python setup.py --salt-pidfile-dir="/run/salt" install --root="$pkgdir" --optimize=1 --skip-build
+
+ # default config
+ install -v -Dm644 conf/master "$pkgdir/etc/salt/master"
+ install -v -Dm644 conf/minion "$pkgdir/etc/salt/minion"
+
+ # systemd services
+ for _svc in salt-master.service salt-syndic.service salt-minion.service salt-api.service; do
+ install -v -Dm644 pkg/$_svc "$pkgdir/usr/lib/systemd/system/$_svc"
+ done
+ install -v -Dm644 pkg/salt.bash "$pkgdir/usr/share/bash-completion/completions/salt"
+ install -v -Dm644 pkg/salt.zsh "$pkgdir/usr/share/zsh/site-functions/_salt"
+ install -v -Dm644 -t "$pkgdir/usr/share/fish/vendor_completions.d" pkg/fish-completions/*
+}
+
+# vim:set ts=2 sw=2 et:
Copied: salt/repos/community-any/jinja-3.1.patch (from rev 1210205, salt/trunk/jinja-3.1.patch)
===================================================================
--- jinja-3.1.patch (rev 0)
+++ jinja-3.1.patch 2022-05-24 13:19:13 UTC (rev 1210206)
@@ -0,0 +1,62 @@
+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()}
Deleted: salt.install
===================================================================
--- salt.install 2022-05-24 13:19:08 UTC (rev 1210205)
+++ salt.install 2022-05-24 13:19:13 UTC (rev 1210206)
@@ -1,22 +0,0 @@
-#!/bin/bash
-
-# arg 1: the new package version
-# arg 2: the old package version
-post_upgrade() {
- if [[ "$(vercmp $2 2014.1.1-1)" -le 0 ]]; then
- cat << EOF
-==> Since version 2014.1.1-2, salt-master runs by default as root user.
-==> You need to manually update your configuration and remove the salt user and
-==> group to follow the new default behavior.
-EOF
- fi
-
- if [[ "$(vercmp $2 2016.3.3-1)" -le 0 ]]; then
- cat << EOF
-==> Since version 2016.3.3-2 RAET is no longer supported. Please switch to either
-==> zeromq or tcp for transport instead.
-EOF
- fi
-}
-
-# vim:set ts=2 sw=2 ft=sh et:
Copied: salt/repos/community-any/salt.install (from rev 1210205, salt/trunk/salt.install)
===================================================================
--- salt.install (rev 0)
+++ salt.install 2022-05-24 13:19:13 UTC (rev 1210206)
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ if [[ "$(vercmp $2 2014.1.1-1)" -le 0 ]]; then
+ cat << EOF
+==> Since version 2014.1.1-2, salt-master runs by default as root user.
+==> You need to manually update your configuration and remove the salt user and
+==> group to follow the new default behavior.
+EOF
+ fi
+
+ if [[ "$(vercmp $2 2016.3.3-1)" -le 0 ]]; then
+ cat << EOF
+==> Since version 2016.3.3-2 RAET is no longer supported. Please switch to either
+==> zeromq or tcp for transport instead.
+EOF
+ fi
+}
+
+# vim:set ts=2 sw=2 ft=sh et:
Deleted: salt.logrotate
===================================================================
--- salt.logrotate 2022-05-24 13:19:08 UTC (rev 1210205)
+++ salt.logrotate 2022-05-24 13:19:13 UTC (rev 1210206)
@@ -1,12 +0,0 @@
-/var/log/salt/master
-/var/log/salt/minion
-/var/log/salt/key
-/var/log/salt/cloud
-/var/log/salt/ssh
- {
- compress
- copytruncate
- missingok
- notifempty
- rotate 7
-}
Copied: salt/repos/community-any/salt.logrotate (from rev 1210205, salt/trunk/salt.logrotate)
===================================================================
--- salt.logrotate (rev 0)
+++ salt.logrotate 2022-05-24 13:19:13 UTC (rev 1210206)
@@ -0,0 +1,12 @@
+/var/log/salt/master
+/var/log/salt/minion
+/var/log/salt/key
+/var/log/salt/cloud
+/var/log/salt/ssh
+ {
+ compress
+ copytruncate
+ missingok
+ notifempty
+ rotate 7
+}
More information about the arch-commits
mailing list