diff options
author | Markus Kowalewski <markus.kowalewski@gmail.com> | 2020-06-23 13:08:55 +0200 |
---|---|---|
committer | Markus Kowalewski <markus.kowalewski@gmail.com> | 2020-06-26 11:18:50 +0200 |
commit | b8703b4a92980a8fddd65baa3f32ed22f590f8e5 (patch) | |
tree | 3c87434dca7640e5fb51cc991c0d13fe4dfc629f /pkgs/servers/computing | |
parent | 335c4876866db69867870f470fb313d52f9b9868 (diff) |
slurm: add patch to allow full path lengths in --get-user-env
Fix fallout from https://github.com/NixOS/nixpkgs/pull/90041
and 5d8f61f3bfb8f93751c1e455f51393f10d507e0f, which fixes
the crash of slurmd but "sbatch --get-user-env" did not work
properly.
Diffstat (limited to 'pkgs/servers/computing')
-rw-r--r-- | pkgs/servers/computing/slurm/common-env-echo.patch | 13 | ||||
-rw-r--r-- | pkgs/servers/computing/slurm/default.nix | 6 |
2 files changed, 19 insertions, 0 deletions
diff --git a/pkgs/servers/computing/slurm/common-env-echo.patch b/pkgs/servers/computing/slurm/common-env-echo.patch new file mode 100644 index 000000000000..4236421a63d2 --- /dev/null +++ b/pkgs/servers/computing/slurm/common-env-echo.patch @@ -0,0 +1,13 @@ +diff --git a/src/common/env.c b/src/common/env.c +index 987846d..73d3b3b 100644 +--- a/src/common/env.c ++++ b/src/common/env.c +@@ -1941,7 +1941,7 @@ char **env_array_user_default(const char *username, int timeout, int mode, + char **env = NULL; + char *starttoken = "XXXXSLURMSTARTPARSINGHEREXXXX"; + char *stoptoken = "XXXXSLURMSTOPPARSINGHEREXXXXX"; +- char cmdstr[256], *env_loc = NULL; ++ char cmdstr[MAXPATHLEN], *env_loc = NULL; + char *stepd_path = NULL; + int fd1, fd2, fildes[2], found, fval, len, rc, timeleft; + int buf_read, buf_rem, config_timeout; diff --git a/pkgs/servers/computing/slurm/default.nix b/pkgs/servers/computing/slurm/default.nix index 4c7e68359a0d..1ec807f0bf82 100644 --- a/pkgs/servers/computing/slurm/default.nix +++ b/pkgs/servers/computing/slurm/default.nix @@ -22,6 +22,12 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; + patches = [ + # increase string length to allow for full + # path of 'echo' in nix store + ./common-env-echo.patch + ]; + prePatch = '' substituteInPlace src/common/env.c \ --replace "/bin/echo" "${coreutils}/bin/echo" |