summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2025-09-10 00:11:00 +0200
committerLudovic Courtès <ludo@gnu.org>2025-09-14 18:13:08 +0200
commit917bb3ab08a7d20bae4be215eb35e3e0e439274d (patch)
tree09c46fa8d6847761878df55af89a5c1294de34c0 /gnu
parent6c86fd85f2c26872b92ca6dabd8e2bd542516a32 (diff)
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>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/parallel.scm12
-rw-r--r--gnu/packages/patches/slurm-23-salloc-fallback-shell.patch33
2 files changed, 16 insertions, 29 deletions
diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm
index 8402b5cc0bb..a2e8cb7a705 100644
--- a/gnu/packages/parallel.scm
+++ b/gnu/packages/parallel.scm
@@ -339,10 +339,10 @@ minimal slurm package BASE-SLURM."
339;; As noted in the link, YY.MM is the release scheme, and the 'maintenance' 339;; As noted in the link, YY.MM is the release scheme, and the 'maintenance'
340;; digit does not introduce incompatibilities. 340;; digit does not introduce incompatibilities.
341 341
342(define-public slurm-minimal-23.02 342(define-public slurm-minimal-23.11
343 (package 343 (package
344 (inherit slurm-minimal) 344 (inherit slurm-minimal)
345 (version "23.02.6") 345 (version "23.11.11")
346 (source (origin 346 (source (origin
347 (inherit (package-source slurm)) 347 (inherit (package-source slurm))
348 (method url-fetch) 348 (method url-fetch)
@@ -353,16 +353,16 @@ minimal slurm package BASE-SLURM."
353 (search-patches "slurm-23-salloc-fallback-shell.patch")) 353 (search-patches "slurm-23-salloc-fallback-shell.patch"))
354 (sha256 354 (sha256
355 (base32 355 (base32
356 "08rz3r1rlnb3pmfdnbh542gm44ja0fdy8rkj4vm4lclc48cvqp2a")))))) 356 "0pg4liysbppfgynwsj3i1lzr60rnybnvzja37x6xgyjvxgf165sa"))))))
357 357
358(define-public slurm-23.02 (make-slurm slurm-minimal-23.02)) 358(define-public slurm-23.11 (make-slurm slurm-minimal-23.11))
359 359
360(define-public slurm-minimal-22.05 360(define-public slurm-minimal-22.05
361 (package 361 (package
362 (inherit slurm-minimal-23.02) 362 (inherit slurm-minimal-23.11)
363 (version "22.05.1") 363 (version "22.05.1")
364 (source (origin 364 (source (origin
365 (inherit (package-source slurm-minimal-23.02)) 365 (inherit (package-source slurm-minimal-23.11))
366 (method url-fetch) 366 (method url-fetch)
367 (uri (string-append 367 (uri (string-append
368 "https://download.schedmd.com/slurm/slurm-" 368 "https://download.schedmd.com/slurm/slurm-"
diff --git a/gnu/packages/patches/slurm-23-salloc-fallback-shell.patch b/gnu/packages/patches/slurm-23-salloc-fallback-shell.patch
index 53605bf3aed..daaeb9358fb 100644
--- a/gnu/packages/patches/slurm-23-salloc-fallback-shell.patch
+++ b/gnu/packages/patches/slurm-23-salloc-fallback-shell.patch
@@ -8,32 +8,19 @@ instance because user code is linked against an incompatible libc.
8Similar patch submitted upstream: https://bugs.schedmd.com/show_bug.cgi?id=19896 8Similar patch submitted upstream: https://bugs.schedmd.com/show_bug.cgi?id=19896
9 9
10diff --git a/src/salloc/opt.c b/src/salloc/opt.c 10diff --git a/src/salloc/opt.c b/src/salloc/opt.c
11index ffff7c8..74563ad 100644 11index f535600..848f099 100644
12--- a/src/salloc/opt.c 12--- a/src/salloc/opt.c
13+++ b/src/salloc/opt.c 13+++ b/src/salloc/opt.c
14@@ -329,6 +329,7 @@ static void _opt_args(int argc, char **argv, int het_job_offset) 14@@ -333,8 +333,10 @@ static char *_get_shell(void)
15 * NOTE: This function is NOT reentrant (see getpwuid_r if needed) */ 15 if (uid == SLURM_AUTH_NOBODY)
16 static char *_get_shell(void) 16 uid = getuid();
17 {
18+ char *shell;
19 struct passwd *pw_ent_ptr;
20 17
21 if (opt.uid == SLURM_AUTH_NOBODY) 18- if (!(shell = uid_to_shell(uid)))
22@@ -336,11 +337,13 @@ static char *_get_shell(void) 19- fatal("no user information for user %u", uid);
23 else 20+ if (!(shell = uid_to_shell(uid))) {
24 pw_ent_ptr = getpwuid(opt.uid);
25
26- if (!pw_ent_ptr) {
27- pw_ent_ptr = getpwnam("nobody");
28- warning("no user information for user %u", opt.uid);
29+ if (pw_ent_ptr) {
30+ shell = pw_ent_ptr->pw_shell;
31+ } else {
32+ shell = getenv("SHELL") ?: "/bin/sh"; 21+ shell = getenv("SHELL") ?: "/bin/sh";
33+ warning("no user information for user %u, using '%s' as the shell", opt.uid, shell); 22+ warning("no user information for user %u, using '%s' as the shell", opt.uid, shell);
34 } 23+ }
35- return pw_ent_ptr->pw_shell;
36+ return shell;
37 }
38 24
39 static void _salloc_default_command(int *argcp, char **argvp[]) 25 return shell;
26 }