gnu: slurm-23.02: Update to slurm-23.11.

* gnu/packages/parallel.scm (slurm-23.02, slurm-minimal-23.02):
Delete variables, replace respectively by (slurm-23.11,
slurm-minimal-23.11).
* gnu/packages/patches/slurm-23-salloc-fallback-shell.patch: Refresh
patch.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Nicolas Graves 2025-09-10 00:11:00 +02:00 committed by Ludovic Courtès
parent 6c86fd85f2
commit 917bb3ab08
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 16 additions and 29 deletions

View file

@ -339,10 +339,10 @@ minimal slurm package BASE-SLURM."
;; As noted in the link, YY.MM is the release scheme, and the 'maintenance'
;; digit does not introduce incompatibilities.
(define-public slurm-minimal-23.02
(define-public slurm-minimal-23.11
(package
(inherit slurm-minimal)
(version "23.02.6")
(version "23.11.11")
(source (origin
(inherit (package-source slurm))
(method url-fetch)
@ -353,16 +353,16 @@ minimal slurm package BASE-SLURM."
(search-patches "slurm-23-salloc-fallback-shell.patch"))
(sha256
(base32
"08rz3r1rlnb3pmfdnbh542gm44ja0fdy8rkj4vm4lclc48cvqp2a"))))))
"0pg4liysbppfgynwsj3i1lzr60rnybnvzja37x6xgyjvxgf165sa"))))))
(define-public slurm-23.02 (make-slurm slurm-minimal-23.02))
(define-public slurm-23.11 (make-slurm slurm-minimal-23.11))
(define-public slurm-minimal-22.05
(package
(inherit slurm-minimal-23.02)
(inherit slurm-minimal-23.11)
(version "22.05.1")
(source (origin
(inherit (package-source slurm-minimal-23.02))
(inherit (package-source slurm-minimal-23.11))
(method url-fetch)
(uri (string-append
"https://download.schedmd.com/slurm/slurm-"

View file

@ -8,32 +8,19 @@ instance because user code is linked against an incompatible libc.
Similar patch submitted upstream: https://bugs.schedmd.com/show_bug.cgi?id=19896
diff --git a/src/salloc/opt.c b/src/salloc/opt.c
index ffff7c8..74563ad 100644
index f535600..848f099 100644
--- a/src/salloc/opt.c
+++ b/src/salloc/opt.c
@@ -329,6 +329,7 @@ static void _opt_args(int argc, char **argv, int het_job_offset)
* NOTE: This function is NOT reentrant (see getpwuid_r if needed) */
static char *_get_shell(void)
{
+ char *shell;
struct passwd *pw_ent_ptr;
@@ -333,8 +333,10 @@ static char *_get_shell(void)
if (uid == SLURM_AUTH_NOBODY)
uid = getuid();
if (opt.uid == SLURM_AUTH_NOBODY)
@@ -336,11 +337,13 @@ static char *_get_shell(void)
else
pw_ent_ptr = getpwuid(opt.uid);
- if (!pw_ent_ptr) {
- pw_ent_ptr = getpwnam("nobody");
- warning("no user information for user %u", opt.uid);
+ if (pw_ent_ptr) {
+ shell = pw_ent_ptr->pw_shell;
+ } else {
- if (!(shell = uid_to_shell(uid)))
- fatal("no user information for user %u", uid);
+ if (!(shell = uid_to_shell(uid))) {
+ shell = getenv("SHELL") ?: "/bin/sh";
+ warning("no user information for user %u, using '%s' as the shell", opt.uid, shell);
}
- return pw_ent_ptr->pw_shell;
+ return shell;
}
+ }
static void _salloc_default_command(int *argcp, char **argvp[])
return shell;
}