Date: Friday, April 7, 2023 @ 11:37:50
Author: felixonmars
Revision: 1441096
archrelease: copy trunk to community-staging-any
Added:
salt/repos/community-staging-any/
salt/repos/community-staging-any/PKGBUILD
(from rev 1441095, salt/trunk/PKGBUILD)
salt/repos/community-staging-any/salt-importlib.patch
(from rev 1441095, salt/trunk/salt-importlib.patch)
salt/repos/community-staging-any/salt.install
(from rev 1441095, salt/trunk/salt.install)
salt/repos/community-staging-any/salt.logrotate
(from rev 1441095, salt/trunk/salt.logrotate)
----------------------+
PKGBUILD | 88 +++++++++++++++++++++++++++++++++++++++++++++++++
salt-importlib.patch | 29 ++++++++++++++++
salt.install | 22 ++++++++++++
salt.logrotate | 12 ++++++
4 files changed, 151 insertions(+)
Copied: salt/repos/community-staging-any/PKGBUILD (from rev 1441095,
salt/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-07 11:37:50 UTC (rev 1441096)
@@ -0,0 +1,88 @@
+# Maintainer: Johannes Löthberg <[email protected]>
+# Maintainer: Morten Linderud <[email protected]>
+# Contributor: Sébastien Luttringer
+# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
+# Contributor: Christer Edwards <[email protected]>
+# Contributor: zer0def <zer0def@github>
+
+pkgname=salt
+pkgver=3005.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')
+makedepends=('python-setuptools')
+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"
+ "salt-importlib.patch"
+ salt.logrotate)
+sha256sums=('fa14c5d873f863b50950121d7e23a2449502745490c7c48c0cf045406cfe57c1'
+ '10703afd392e2af87cd06bdb6bcc3322c44825ef57cdc6e67d47a53b72514623'
+ 'abecc3c1be124c4afffaaeb3ba32b60dfee8ba6dc32189edfa2ad154ecb7a215')
+
+prepare() {
+ cd salt-$pkgver
+ 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
+
+ patch -Np1 < "$srcdir/salt-importlib.patch"
+}
+
+build() {
+ cd salt-$pkgver
+ python setup.py build
+}
+
+# TODO: Missing salt-factories, pytest-tempdir
+# check() {
+# local site_packages=$(python -c "import site;
print(site.getsitepackages()[0])")
+# cd salt-$pkgver
+# python setup.py install --root="$PWD/tmp_install" --optimize=1
+# PYTHONPATH="$PWD/tmp_install/$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-staging-any/salt-importlib.patch (from rev
1441095, salt/trunk/salt-importlib.patch)
===================================================================
--- community-staging-any/salt-importlib.patch (rev 0)
+++ community-staging-any/salt-importlib.patch 2023-04-07 11:37:50 UTC (rev
1441096)
@@ -0,0 +1,29 @@
+diff --git a/salt/utils/entrypoints.py b/salt/utils/entrypoints.py
+index 3effa0b494..9452878ade 100644
+--- a/salt/utils/entrypoints.py
++++ b/salt/utils/entrypoints.py
+@@ -38,13 +38,20 @@ def iter_entry_points(group, name=None):
+ entry_points_listing = []
+ entry_points = importlib_metadata.entry_points()
+
+- for entry_point_group, entry_points_list in entry_points.items():
+- if entry_point_group != group:
+- continue
+- for entry_point in entry_points_list:
++ try:
++ for entry_point in entry_points.select(group=group):
+ if name is not None and entry_point.name != name:
+ continue
+ entry_points_listing.append(entry_point)
++ except AttributeError:
++ # importlib-metadata<5.0.0
++ for entry_point_group, entry_points_list in entry_points.items():
++ if entry_point_group != group:
++ continue
++ for entry_point in entry_points_list:
++ if name is not None and entry_point.name != name:
++ continue
++ entry_points_listing.append(entry_point)
+
+ return entry_points_listing
+
Copied: salt/repos/community-staging-any/salt.install (from rev 1441095,
salt/trunk/salt.install)
===================================================================
--- community-staging-any/salt.install (rev 0)
+++ community-staging-any/salt.install 2023-04-07 11:37:50 UTC (rev 1441096)
@@ -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:
Copied: salt/repos/community-staging-any/salt.logrotate (from rev 1441095,
salt/trunk/salt.logrotate)
===================================================================
--- community-staging-any/salt.logrotate (rev 0)
+++ community-staging-any/salt.logrotate 2023-04-07 11:37:50 UTC (rev
1441096)
@@ -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
+}