From 00dc4c3397e0a5c1139c8c4f0676c04bfe85fe2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 15 Dec 2024 15:26:47 +0100 Subject: [PATCH] Update to 3007.1 RPM packaging based on salt-3007.1-1.fc42.src. Debian adjusted manually. On Fedora 37 drop optional timelib dependency, as it isn't available there. --- 0001-Drop-versioned-dependencies.patch | 57 ++++++++++++++++++ ...1-Drop-versioned-requests-dependency.patch | 10 +--- 0002-Drop-Windows-dependencies.patch | 31 ++++++++++ contextvars.patch | 31 ++++++---- debian-pkg/debian/control | 2 + .../0001-Drop-versioned-dependencies.patch | 58 +++++++++++++++++++ .../0002-Drop-Windows-dependencies.patch | 31 ++++++++++ ...mentation_options.js-from-default-th.patch | 42 -------------- .../debian/patches/match_hostname.patch | 24 -------- debian-pkg/debian/patches/series | 4 +- match_hostname.patch | 24 -------- rel | 2 +- rpmvercmp.patch | 9 +++ salt.spec.in | 34 ++++++++--- salt.sysusers | 3 + version | 2 +- 16 files changed, 244 insertions(+), 120 deletions(-) create mode 100644 0001-Drop-versioned-dependencies.patch rename 0001-Drop-versioned-certifi-dependency.patch => 0001-Drop-versioned-requests-dependency.patch (67%) create mode 100644 0002-Drop-Windows-dependencies.patch create mode 100644 debian-pkg/debian/patches/0001-Drop-versioned-dependencies.patch create mode 100644 debian-pkg/debian/patches/0002-Drop-Windows-dependencies.patch delete mode 100644 debian-pkg/debian/patches/doc-Exclude-documentation_options.js-from-default-th.patch delete mode 100644 debian-pkg/debian/patches/match_hostname.patch delete mode 100644 match_hostname.patch create mode 100644 rpmvercmp.patch create mode 100644 salt.sysusers diff --git a/0001-Drop-versioned-dependencies.patch b/0001-Drop-versioned-dependencies.patch new file mode 100644 index 0000000..4cac27a --- /dev/null +++ b/0001-Drop-versioned-dependencies.patch @@ -0,0 +1,57 @@ +From cdc4bc6fa37e3d5173b3cad3d0f2e2d9816f8eb1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= + +Date: Sun, 15 Dec 2024 16:13:42 +0100 +Subject: [PATCH 1/2] Drop versioned dependencies + +Upstream bumps version requirements arbitrarily, in most cases without +any specific API or functional requirement. +Use package version available in the distribution instead. +--- + requirements/base.txt | 12 ++++++------ + requirements/zeromq.txt | 3 +-- + 2 files changed, 7 insertions(+), 8 deletions(-) + +diff --git a/requirements/base.txt b/requirements/base.txt +index 0061087e35..a42ff50f7d 100644 +--- a/requirements/base.txt ++++ b/requirements/base.txt +@@ -10,20 +10,20 @@ distro>=1.0.1 + psutil>=5.0.0 + packaging>=21.3 + looseversion +-tornado>=6.3.3 +-aiohttp>=3.9.0 ++tornado ++aiohttp + + # We need contextvars for salt-ssh. + # Even on python versions which ships with contextvars in the standard library! + + setproctitle>=1.2.3 +-timelib>=0.2.5 +-pyopenssl>=24.0.0 ++timelib ++pyopenssl + python-dateutil>=2.8.1 + python-gnupg>=0.4.7 + cherrypy>=18.6.1 + importlib-metadata>=3.3.0 +-cryptography>=42.0.0 ++cryptography + + # From old requirements/static/pkg/linux.in + rpm-vercmp; sys_platform == 'linux' +diff --git a/requirements/zeromq.txt b/requirements/zeromq.txt +index 4000f5eb01..ec03558d33 100644 +--- a/requirements/zeromq.txt ++++ b/requirements/zeromq.txt +@@ -1,4 +1,4 @@ + -r base.txt + -r crypto.txt + +-pyzmq>=25.1.1 ++pyzmq +-- +2.46.0 + diff --git a/0001-Drop-versioned-certifi-dependency.patch b/0001-Drop-versioned-requests-dependency.patch similarity index 67% rename from 0001-Drop-versioned-certifi-dependency.patch rename to 0001-Drop-versioned-requests-dependency.patch index 53cd0dc..c2b3956 100644 --- a/0001-Drop-versioned-certifi-dependency.patch +++ b/0001-Drop-versioned-requests-dependency.patch @@ -2,10 +2,9 @@ From 668a5a89109526e39540174b4a8a56574d0d09bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 15 Aug 2024 03:46:12 +0200 -Subject: [PATCH] Drop versioned certifi dependency +Subject: [PATCH] Drop versioned requests dependency Let it pick the version from the distribution. -Similarly for requests. --- requirements/base.txt | 2 -- 1 file changed, 2 deletions(-) @@ -14,15 +13,12 @@ diff --git a/requirements/base.txt b/requirements/base.txt index de9cbaab17..bce14bc510 100644 --- a/requirements/base.txt +++ b/requirements/base.txt -@@ -7,10 +7,7 @@ PyYAML +@@ -7,7 +7,7 @@ PyYAML msgpack>=1.0.0 PyYAML MarkupSafe --requests<2.32.0 ; python_version < '3.10' --requests>=2.32.3 ; python_version >= '3.10' +-requests>=2.25.1 +requests --certifi==2023.07.22; python_version < '3.10' --certifi>=2024.7.4; python_version >= '3.10' distro>=1.0.1 psutil>=5.0.0 packaging>=21.3 diff --git a/0002-Drop-Windows-dependencies.patch b/0002-Drop-Windows-dependencies.patch new file mode 100644 index 0000000..7c3ab18 --- /dev/null +++ b/0002-Drop-Windows-dependencies.patch @@ -0,0 +1,31 @@ +From a861b8c1b6a9f9062c42c902614800548838fe04 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= + +Date: Sun, 15 Dec 2024 16:15:47 +0100 +Subject: [PATCH 2/2] Drop Windows dependencies + +--- + requirements/base.txt | 10 ---------- + 1 file changed, 10 deletions(-) + +diff --git a/requirements/base.txt b/requirements/base.txt +index a42ff50f7d..73f058c5ff 100644 +--- a/requirements/base.txt ++++ b/requirements/base.txt +@@ -33,13 +33,3 @@ cryptography + + # From old requirements/static/pkg/linux.in + rpm-vercmp; sys_platform == 'linux' +- +-# From old windows.txt requirements file +-gitpython>=3.1.37; sys_platform == 'win32' +-lxml>=4.6.3; sys_platform == 'win32' +-pymssql>=2.2.1; sys_platform == 'win32' +-pymysql>=1.0.2; sys_platform == 'win32' +-pythonnet>=3.0.1; sys_platform == 'win32' +-pywin32>=305; sys_platform == 'win32' +-wmi>=1.5.1; sys_platform == 'win32' +-xmltodict>=0.13.0; sys_platform == 'win32' +-- +2.46.0 + diff --git a/contextvars.patch b/contextvars.patch index 25baf9f..d9cf838 100644 --- a/contextvars.patch +++ b/contextvars.patch @@ -1,15 +1,22 @@ ---- salt-3006.1/requirements/base.txt~ 2023-05-05 12:53:34.000000000 -0500 -+++ salt-3006.1/requirements/base.txt 2023-05-24 09:59:08.874838801 -0500 -@@ -9,4 +9,3 @@ - looseversion - croniter>=0.3.0,!=0.3.22; sys_platform != 'win32' - # We need contextvars for salt-ssh +Index: salt-3007.1/requirements/base.txt +=================================================================== +--- salt-3007.1.orig/requirements/base.txt 2024-11-06 20:25:51.898374912 +0100 ++++ salt-3007.1/requirements/base.txt 2024-11-06 20:26:23.586354279 +0100 +@@ -15,7 +15,6 @@ aiohttp>=3.9.0 + + # We need contextvars for salt-ssh. + # Even on python versions which ships with contextvars in the standard library! -contextvars ---- salt-3006.1/requirements/zeromq.txt~ 2023-05-05 12:53:34.000000000 -0500 -+++ salt-3006.1/requirements/zeromq.txt 2023-05-24 10:02:57.943989348 -0500 -@@ -2,5 +2,3 @@ + + setproctitle>=1.2.3 + timelib>=0.2.5 +Index: salt-3007.1/requirements/zeromq.txt +=================================================================== +--- salt-3007.1.orig/requirements/zeromq.txt 2024-11-06 20:25:51.899374912 +0100 ++++ salt-3007.1/requirements/zeromq.txt 2024-11-06 20:27:44.898301325 +0100 +@@ -1,4 +1,4 @@ + -r base.txt -r crypto.txt - pyzmq>=20.0.0 --pyzmq==25.0.2 ; sys_platform == "win32" --pyzmq==25.1.2 ; sys_platform == "darwin" +-pyzmq>=25.1.2 ++pyzmq>=25.1.1 diff --git a/debian-pkg/debian/control b/debian-pkg/debian/control index 9ac2815..c406545 100644 --- a/debian-pkg/debian/control +++ b/debian-pkg/debian/control @@ -65,6 +65,7 @@ Build-Depends: bash-completion, python3-sphinxcontrib.httpdomain, python3-sphinxcontrib.spelling, python3-toml, + python3-tornado, python3-requests (>= 1.0.0), python3-setuptools, python3-six, @@ -91,6 +92,7 @@ Depends: iproute2, python3-pkg-resources, python3-psutil, python3-requests (>= 1.0.0), + python3-tornado, python3-yaml, ${misc:Depends}, ${python3:Depends} diff --git a/debian-pkg/debian/patches/0001-Drop-versioned-dependencies.patch b/debian-pkg/debian/patches/0001-Drop-versioned-dependencies.patch new file mode 100644 index 0000000..1a6c7d4 --- /dev/null +++ b/debian-pkg/debian/patches/0001-Drop-versioned-dependencies.patch @@ -0,0 +1,58 @@ +From cdc4bc6fa37e3d5173b3cad3d0f2e2d9816f8eb1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= + +Date: Sun, 15 Dec 2024 16:13:42 +0100 +Subject: [PATCH 1/2] Drop versioned dependencies + +Upstream bumps version requirements arbitrarily, in most cases without +any specific API or functional requirement. +Use package version available in the distribution instead. +--- + requirements/base.txt | 12 ++++++------ + requirements/zeromq.txt | 3 +-- + 2 files changed, 7 insertions(+), 8 deletions(-) + +diff --git a/requirements/base.txt b/requirements/base.txt +index 0061087e35..a42ff50f7d 100644 +--- a/requirements/base.txt ++++ b/requirements/base.txt +@@ -10,21 +10,21 @@ distro>=1.0.1 + psutil>=5.0.0 + packaging>=21.3 + looseversion +-tornado>=6.3.3 +-aiohttp>=3.9.0 ++tornado ++aiohttp + + # We need contextvars for salt-ssh. + # Even on python versions which ships with contextvars in the standard library! + contextvars + + setproctitle>=1.2.3 +-timelib>=0.2.5 +-pyopenssl>=24.0.0 ++timelib ++pyopenssl + python-dateutil>=2.8.1 + python-gnupg>=0.4.7 + cherrypy>=18.6.1 + importlib-metadata>=3.3.0 +-cryptography>=42.0.0 ++cryptography + + # From old requirements/static/pkg/linux.in + rpm-vercmp; sys_platform == 'linux' +diff --git a/requirements/zeromq.txt b/requirements/zeromq.txt +index 4000f5eb01..ec03558d33 100644 +--- a/requirements/zeromq.txt ++++ b/requirements/zeromq.txt +@@ -1,4 +1,4 @@ + -r base.txt + -r crypto.txt + +-pyzmq>=25.1.2 ++pyzmq +-- +2.46.0 + diff --git a/debian-pkg/debian/patches/0002-Drop-Windows-dependencies.patch b/debian-pkg/debian/patches/0002-Drop-Windows-dependencies.patch new file mode 100644 index 0000000..7c3ab18 --- /dev/null +++ b/debian-pkg/debian/patches/0002-Drop-Windows-dependencies.patch @@ -0,0 +1,31 @@ +From a861b8c1b6a9f9062c42c902614800548838fe04 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= + +Date: Sun, 15 Dec 2024 16:15:47 +0100 +Subject: [PATCH 2/2] Drop Windows dependencies + +--- + requirements/base.txt | 10 ---------- + 1 file changed, 10 deletions(-) + +diff --git a/requirements/base.txt b/requirements/base.txt +index a42ff50f7d..73f058c5ff 100644 +--- a/requirements/base.txt ++++ b/requirements/base.txt +@@ -33,13 +33,3 @@ cryptography + + # From old requirements/static/pkg/linux.in + rpm-vercmp; sys_platform == 'linux' +- +-# From old windows.txt requirements file +-gitpython>=3.1.37; sys_platform == 'win32' +-lxml>=4.6.3; sys_platform == 'win32' +-pymssql>=2.2.1; sys_platform == 'win32' +-pymysql>=1.0.2; sys_platform == 'win32' +-pythonnet>=3.0.1; sys_platform == 'win32' +-pywin32>=305; sys_platform == 'win32' +-wmi>=1.5.1; sys_platform == 'win32' +-xmltodict>=0.13.0; sys_platform == 'win32' +-- +2.46.0 + diff --git a/debian-pkg/debian/patches/doc-Exclude-documentation_options.js-from-default-th.patch b/debian-pkg/debian/patches/doc-Exclude-documentation_options.js-from-default-th.patch deleted file mode 100644 index bd9967d..0000000 --- a/debian-pkg/debian/patches/doc-Exclude-documentation_options.js-from-default-th.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: Benjamin Drung -Date: Wed, 13 Oct 2021 17:43:43 +0200 -Subject: doc: Exclude documentation_options.js from default theme - -`documentation_options.js` from the default theme sets the option -`URL_ROOT` to: - -``` -document.getElementById("documentation_options").getAttribute('data-url_root') -``` - -This requires that the script element for `documentation_options.js` -includes the tag `id="documentation_options"` and sets the -`data-url_root` tag. Otherwise evaluating `URL_ROOT` will fail and -building the documentation during the Debian package build will fail: - -``` -dh_sphinxdoc: error: DOCUMENTATION_OPTIONS does not define URL_ROOT -``` - -The variable `DOCUMENTATION_OPTIONS` is directly set `layout.html` and -therefore `documentation_options.js` does not need to be included. So -just exclude it. - -Forwarded: https://github.com/saltstack/salt/pull/61044 -Signed-off-by: Benjamin Drung ---- - doc/_themes/saltstack/layout.html | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/doc/_themes/saltstack/layout.html b/doc/_themes/saltstack/layout.html -index 4dc5ce5..502b5f5 100644 ---- a/doc/_themes/saltstack/layout.html -+++ b/doc/_themes/saltstack/layout.html -@@ -21,6 +21,7 @@ - - {# Remove old version of jQuery #} - {% set js_blacklist = [ -+ '_static/documentation_options.js', - '_static/jquery.js', - ] %} - diff --git a/debian-pkg/debian/patches/match_hostname.patch b/debian-pkg/debian/patches/match_hostname.patch deleted file mode 100644 index 3bda7ec..0000000 --- a/debian-pkg/debian/patches/match_hostname.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/salt/ext/tornado/netutil.py~ 2023-05-05 12:53:34.000000000 -0500 -+++ b/salt/ext/tornado/netutil.py 2023-07-24 11:27:02.376824349 -0500 -@@ -54,8 +54,8 @@ - elif ssl is None: - ssl_match_hostname = SSLCertificateError = None # type: ignore - else: -- import backports.ssl_match_hostname -- ssl_match_hostname = backports.ssl_match_hostname.match_hostname -+ import urllib3.util.ssl_match_hostname -+ ssl_match_hostname = urllib3.util.ssl_match_hostname - SSLCertificateError = backports.ssl_match_hostname.CertificateError # type: ignore - - if hasattr(ssl, 'SSLContext'): ---- a/salt/ext/tornado/netutil.py~ 2023-07-24 11:50:02.836988664 -0500 -+++ b/salt/ext/tornado/netutil.py 2023-07-24 11:50:52.217539638 -0500 -@@ -56,7 +56,7 @@ - else: - import urllib3.util.ssl_match_hostname - ssl_match_hostname = urllib3.util.ssl_match_hostname -- SSLCertificateError = backports.ssl_match_hostname.CertificateError # type: ignore -+ SSLCertificateError = urllib3.util.ssl_match_hostname.CertificateError # type: ignore - - if hasattr(ssl, 'SSLContext'): - if hasattr(ssl, 'create_default_context'): diff --git a/debian-pkg/debian/patches/series b/debian-pkg/debian/patches/series index 979403e..d91e7d3 100644 --- a/debian-pkg/debian/patches/series +++ b/debian-pkg/debian/patches/series @@ -1,5 +1,4 @@ Make-the-Salt-Proxy-environment-aware.patch -doc-Exclude-documentation_options.js-from-default-th.patch remove-privacy-breach.patch #run-salt-master-as-salt-user.patch doc-fix-logo-link.patch @@ -8,4 +7,5 @@ ensure-searchtools.js-gets-included.patch dpkg_lowpkg-Do-not-access-var-lib-dpkg-info-package-.patch dpkg_lowpkg-Drop-reading-var-lib-dpkg-available-dire.patch 0002-Hide-known-DeprecationWarning-related-to-PEP-594.patch -match_hostname.patch +0001-Drop-versioned-dependencies.patch +0002-Drop-Windows-dependencies.patch diff --git a/match_hostname.patch b/match_hostname.patch deleted file mode 100644 index 3bda7ec..0000000 --- a/match_hostname.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/salt/ext/tornado/netutil.py~ 2023-05-05 12:53:34.000000000 -0500 -+++ b/salt/ext/tornado/netutil.py 2023-07-24 11:27:02.376824349 -0500 -@@ -54,8 +54,8 @@ - elif ssl is None: - ssl_match_hostname = SSLCertificateError = None # type: ignore - else: -- import backports.ssl_match_hostname -- ssl_match_hostname = backports.ssl_match_hostname.match_hostname -+ import urllib3.util.ssl_match_hostname -+ ssl_match_hostname = urllib3.util.ssl_match_hostname - SSLCertificateError = backports.ssl_match_hostname.CertificateError # type: ignore - - if hasattr(ssl, 'SSLContext'): ---- a/salt/ext/tornado/netutil.py~ 2023-07-24 11:50:02.836988664 -0500 -+++ b/salt/ext/tornado/netutil.py 2023-07-24 11:50:52.217539638 -0500 -@@ -56,7 +56,7 @@ - else: - import urllib3.util.ssl_match_hostname - ssl_match_hostname = urllib3.util.ssl_match_hostname -- SSLCertificateError = backports.ssl_match_hostname.CertificateError # type: ignore -+ SSLCertificateError = urllib3.util.ssl_match_hostname.CertificateError # type: ignore - - if hasattr(ssl, 'SSLContext'): - if hasattr(ssl, 'create_default_context'): diff --git a/rel b/rel index 00750ed..d00491f 100644 --- a/rel +++ b/rel @@ -1 +1 @@ -3 +1 diff --git a/rpmvercmp.patch b/rpmvercmp.patch new file mode 100644 index 0000000..c504558 --- /dev/null +++ b/rpmvercmp.patch @@ -0,0 +1,9 @@ +Index: salt-3007.1/requirements/base.txt +=================================================================== +--- salt-3007.1.orig/requirements/base.txt 2024-11-06 20:30:10.965206223 +0100 ++++ salt-3007.1/requirements/base.txt 2024-11-06 20:50:55.462658609 +0100 +@@ -26,4 +26,3 @@ importlib-metadata>=3.3.0 + cryptography + + # From old requirements/static/pkg/linux.in +-rpm-vercmp; sys_platform == 'linux' diff --git a/salt.spec.in b/salt.spec.in index 3ce5eb7..b456efa 100644 --- a/salt.spec.in +++ b/salt.spec.in @@ -14,7 +14,7 @@ Version: @VERSION@%{?__rc_ver} Release: @REL@%{?dist} Summary: A parallel remote execution system Group: System Environment/Daemons -License: ASL 2.0 +License: Apache-2.0 URL: https://saltproject.io/ Source0: %{pypi_source} Source1: %{name}-proxy@.service @@ -38,13 +38,19 @@ Source18: %{name}-master.fish Source19: %{name}-minion.fish Source20: %{name}-run.fish Source21: %{name}-syndic.fish +Source22: %{name}.sysusers Patch0: contextvars.patch -Patch1: match_hostname.patch Patch2: 0002-Hide-known-DeprecationWarning-related-to-PEP-594.patch -Patch3: 0001-Drop-versioned-certifi-dependency.patch +Patch3: 0001-Drop-versioned-requests-dependency.patch Patch4: 0001-Use-timezone-aware-datetime-objects-for-UTC-too.patch +# Fix urlib changes in python >= 3.12.6 +# https://github.com/saltstack/salt/issues/66898 Patch5: 0001-Fix-Python3.13-compatibility-regarding-urllib.parse-.patch +Patch6: 0001-Drop-versioned-dependencies.patch +Patch7: 0002-Drop-Windows-dependencies.patch +# Don't require rpm-vercmp, we can use python3-rpm +Patch8: rpmvercmp.patch BuildArch: noarch %ifarch %{ix86} x86_64 @@ -159,6 +165,9 @@ Supports Python 3. %prep %autosetup -p1 +%if 0%{?fedora} < 39 +sed -i '/timelib/d' requirements/base.txt +%endif %build %pyproject_wheel @@ -189,6 +198,8 @@ install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/proxy.d # Add the config files install -p -m 0640 conf/minion %{buildroot}%{_sysconfdir}/%{name}/minion install -p -m 0640 conf/master %{buildroot}%{_sysconfdir}/%{name}/master +# Use salt user on nre master installations +sed -i 's/#user: root/user: salt/g' %{buildroot}%{_sysconfdir}/%{name}/master install -p -m 0600 conf/cloud %{buildroot}%{_sysconfdir}/%{name}/cloud install -p -m 0640 conf/roster %{buildroot}%{_sysconfdir}/%{name}/roster install -p -m 0640 conf/proxy %{buildroot}%{_sysconfdir}/%{name}/proxy @@ -226,6 +237,9 @@ install -p -m 0644 %{SOURCE21} %{buildroot}%{fish_dir}/%{name}-syndic.fish mkdir -p %{buildroot}%{zsh_dir} install -p -m 0644 pkg/common/%{name}.zsh %{buildroot}%{zsh_dir}/_%{name} +# Salt user and group +install -p -D -m 0644 %{SOURCE22} %{buildroot}%{_sysusersdir}/salt.conf +mkdir -p %{buildroot}%{_sysconfdir}/%{name}/gpgkeys %check %pyproject_check_import -t @@ -236,7 +250,7 @@ install -p -m 0644 pkg/common/%{name}.zsh %{buildroot}%{zsh_dir}/_%{name} %doc README.fedora %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/bash_completion.d/%{name}.bash -%{_var}/cache/%{name} +%dir %{_var}/cache/%{name}/ %{_var}/log/%{name} %{_bindir}/spm %doc %{_mandir}/man1/spm.1* @@ -260,9 +274,11 @@ install -p -m 0644 pkg/common/%{name}.zsh %{buildroot}%{zsh_dir}/_%{name} %{_bindir}/%{name}-master %{_bindir}/%{name}-run %{_unitdir}/%{name}-master.service -%config(noreplace) %{_sysconfdir}/%{name}/master -%config(noreplace) %{_sysconfdir}/%{name}/master.d -%config(noreplace) %{_sysconfdir}/%{name}/pki/master +%{_sysusersdir}/salt.conf +%config(noreplace) %attr(0750, salt, salt) %{_sysconfdir}/%{name}/master +%config(noreplace) %attr(0750, salt, salt) %{_sysconfdir}/%{name}/master.d +%config(noreplace) %attr(0750, salt, salt) %{_sysconfdir}/%{name}/pki/master +%config(noreplace) %attr(0750, salt, salt) %{_sysconfdir}/%{name}/gpgkeys %files minion %doc %{_mandir}/man1/%{name}-call.1* @@ -314,7 +330,11 @@ install -p -m 0644 pkg/common/%{name}.zsh %{buildroot}%{zsh_dir}/_%{name} %preun api %systemd_preun %{name}-api.service +%pre master +%sysusers_create_compat %{SOURCE22} + %post master +chown salt:salt %{_sysconfdir}/%{name}/gpgkeys -R %systemd_post %{name}-master.service %post syndic diff --git a/salt.sysusers b/salt.sysusers new file mode 100644 index 0000000..20eec3c --- /dev/null +++ b/salt.sysusers @@ -0,0 +1,3 @@ +#Type Name ID GECOS Home directory Shell +u salt - "Salt" /etc/salt /bin/bash +g salt - diff --git a/version b/version index e021163..7db14f1 100644 --- a/version +++ b/version @@ -1 +1 @@ -3006.9 +3007.1