diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2024-08-27 12:14:20 -0700 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2024-08-27 12:15:01 -0700 |
commit | 5a6b913cd0e47de25f201bdbeacd2380bfd24d4a (patch) | |
tree | 5c5e3784e6ea74f24a7a69e50f6c5a2f03104a82 /app-admin | |
parent | app-containers/docker-cli: add 27.1.2 (diff) | |
download | gentoo-5a6b913cd0e47de25f201bdbeacd2380bfd24d4a.tar.gz gentoo-5a6b913cd0e47de25f201bdbeacd2380bfd24d4a.tar.bz2 gentoo-5a6b913cd0e47de25f201bdbeacd2380bfd24d4a.zip |
app-admin/salt: Add patch for pam module
Also fix annoying error in logs when running under py312
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/salt/files/salt-3006.9-pam-module.patch | 13 | ||||
-rw-r--r-- | app-admin/salt/salt-3006.9-r2.ebuild (renamed from app-admin/salt/salt-3006.9-r1.ebuild) | 1 | ||||
-rw-r--r-- | app-admin/salt/salt-3007.1-r1.ebuild (renamed from app-admin/salt/salt-3007.1.ebuild) | 9 |
3 files changed, 23 insertions, 0 deletions
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 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 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 |