public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Patrick McLean" <chutzpah@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/salt/files/, app-admin/salt/
Date: Tue, 27 Aug 2024 19:15:05 +0000 (UTC)	[thread overview]
Message-ID: <1724786101.5a6b913cd0e47de25f201bdbeacd2380bfd24d4a.chutzpah@gentoo> (raw)

commit:     5a6b913cd0e47de25f201bdbeacd2380bfd24d4a
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 27 19:14:20 2024 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Tue Aug 27 19:15:01 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a6b913c

app-admin/salt: Add patch for pam module

Also fix annoying error in logs when running under py312

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 app-admin/salt/files/salt-3006.9-pam-module.patch           | 13 +++++++++++++
 .../salt/{salt-3006.9-r1.ebuild => salt-3006.9-r2.ebuild}   |  1 +
 .../salt/{salt-3007.1.ebuild => salt-3007.1-r1.ebuild}      |  9 +++++++++
 3 files changed, 23 insertions(+)

diff --git a/app-admin/salt/files/salt-3006.9-pam-module.patch b/app-admin/salt/files/salt-3006.9-pam-module.patch
new file mode 100644
index 000000000000..c0af2ee5210f
--- /dev/null
+++ b/app-admin/salt/files/salt-3006.9-pam-module.patch
@@ -0,0 +1,13 @@
+diff --git a/salt/auth/pam.py b/salt/auth/pam.py
+index 6e179deb7c..935c523606 100644
+--- a/salt/auth/pam.py
++++ b/salt/auth/pam.py
+@@ -228,7 +228,7 @@ def authenticate(username, password):
+     env["SALT_PAM_PASSWORD"] = password
+     env["SALT_PAM_SERVICE"] = __opts__.get("auth.pam.service", "login")
+     env["SALT_PAM_ENCODING"] = __salt_system_encoding__
+-    pyexe = pathlib.Path(__opts__.get("auth.pam.python", "/usr/bin/python3")).resolve()
++    pyexe = pathlib.Path(__opts__.get("auth.pam.python", f"/usr/bin/{os.environ['EPYTHON']}")).resolve()
+     pyfile = pathlib.Path(__file__).resolve()
+     if not pyexe.exists():
+         log.error("Error 'auth.pam.python' config value does not exist: %s", pyexe)

diff --git a/app-admin/salt/salt-3006.9-r1.ebuild b/app-admin/salt/salt-3006.9-r2.ebuild
similarity index 99%
rename from app-admin/salt/salt-3006.9-r1.ebuild
rename to app-admin/salt/salt-3006.9-r2.ebuild
index 52019c14af26..f81dd7ade71d 100644
--- a/app-admin/salt/salt-3006.9-r1.ebuild
+++ b/app-admin/salt/salt-3006.9-r2.ebuild
@@ -138,6 +138,7 @@ RESTRICT="!test? ( test ) x86? ( test )"
 PATCHES=(
 	"${FILESDIR}/salt-3003-gentoolkit-revdep.patch"
 	"${FILESDIR}/salt-3005.1-no-entry-points.patch"
+	"${FILESDIR}/salt-3006.9-pam-module.patch"
 )
 
 python_prepare_all() {

diff --git a/app-admin/salt/salt-3007.1.ebuild b/app-admin/salt/salt-3007.1-r1.ebuild
similarity index 99%
rename from app-admin/salt/salt-3007.1.ebuild
rename to app-admin/salt/salt-3007.1-r1.ebuild
index d8b9533aac5e..4a31938ecc9e 100644
--- a/app-admin/salt/salt-3007.1.ebuild
+++ b/app-admin/salt/salt-3007.1-r1.ebuild
@@ -142,6 +142,7 @@ RESTRICT="
 
 PATCHES=(
 	"${FILESDIR}/salt-3003-gentoolkit-revdep.patch"
+	"${FILESDIR}/salt-3006.9-pam-module.patch"
 )
 
 python_prepare_all() {
@@ -398,6 +399,14 @@ python_prepare_all() {
 	distutils-r1_python_prepare_all
 }
 
+python_prepare() {
+	if [[ ${EPYTHON#*.} -ge 12 ]]; then
+		# stop annoying warning from spamming logs
+		grep -Rl datetime.datetime.utcnow salt \
+			| xargs sed -i 's:datetime.datetime.utcnow():datetime.datetime.now(datetime.UTC):'
+	fi
+}
+
 python_install_all() {
 	local -x USE_SETUPTOOLS=1
 	distutils-r1_python_install_all


             reply	other threads:[~2024-08-27 19:15 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27 19:15 Patrick McLean [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-02-28  3:07 [gentoo-commits] repo/gentoo:master commit in: app-admin/salt/files/, app-admin/salt/ Patrick McLean
2023-04-01 17:43 Michał Górny
2022-11-02 23:40 Patrick McLean
2022-07-25 18:52 Patrick McLean
2022-06-28 18:24 Patrick McLean
2022-06-28 18:24 Patrick McLean
2022-03-31 16:47 Patrick McLean
2022-03-31  2:23 Patrick McLean
2022-03-31  1:28 Patrick McLean
2021-09-08  1:01 Patrick McLean
2021-06-24 18:17 Patrick McLean
2021-04-03  4:20 Patrick McLean
2021-04-03  4:20 Patrick McLean
2021-02-27  2:32 Patrick McLean
2021-01-01  0:47 Michał Górny
2020-12-17  5:45 Patrick McLean
2020-10-31  1:36 Patrick McLean
2020-07-13 22:33 Patrick McLean
2020-05-01  1:07 Patrick McLean
2020-04-30 18:59 Patrick McLean
2020-04-30  5:24 Patrick McLean
2020-04-29 20:36 Patrick McLean
2019-08-27 21:38 Patrick McLean
2019-02-28  2:45 Patrick McLean
2018-07-03 21:18 Patrick McLean
2018-04-04 22:02 Patrick McLean
2018-02-08 19:56 Patrick McLean
2017-01-31 23:22 Patrick McLean
2017-01-31 23:22 Patrick McLean
2016-12-02  0:50 Patrick McLean
2016-09-09 21:06 Patrick McLean
2016-07-29 19:12 Patrick McLean
2016-06-16 18:48 Patrick McLean
2015-09-11  1:13 Patrick McLean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1724786101.5a6b913cd0e47de25f201bdbeacd2380bfd24d4a.chutzpah@gentoo \
    --to=chutzpah@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox