From 5d8f61f3bfb8f93751c1e455f51393f10d507e0f Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Wed, 10 Jun 2020 10:55:05 +0200 Subject: [PATCH] slurm: bugifx, add su/echo paths slurmd requires su and echo to work with "--get-user-env". If slurmd does not find /bin/su or /bin/echo, it crashes. --- pkgs/servers/computing/slurm/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/computing/slurm/default.nix b/pkgs/servers/computing/slurm/default.nix index cd0d67ecfed..9e610579d73 100644 --- a/pkgs/servers/computing/slurm/default.nix +++ b/pkgs/servers/computing/slurm/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, pkgconfig, libtool, curl -, python, munge, perl, pam, openssl, zlib +, python, munge, perl, pam, openssl, zlib, shadow, coreutils , ncurses, libmysqlclient, gtk2, lua, hwloc, numactl , readline, freeipmi, libssh2, xorg, lz4, rdma-core # enable internal X11 support via libssh2 @@ -22,10 +22,13 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - prePatch = stdenv.lib.optional enableX11 '' + prePatch = '' + substituteInPlace src/common/env.c \ + --replace "/bin/echo" "${coreutils}/bin/echo" + '' + (stdenv.lib.optionalString enableX11 '' substituteInPlace src/common/x11_util.c \ --replace '"/usr/bin/xauth"' '"${xorg.xauth}/bin/xauth"' - ''; + ''); # nixos test fails to start slurmd with 'undefined symbol: slurm_job_preempt_mode' # https://groups.google.com/forum/#!topic/slurm-devel/QHOajQ84_Es @@ -36,7 +39,7 @@ stdenv.mkDerivation rec { buildInputs = [ curl python munge perl pam openssl zlib libmysqlclient ncurses gtk2 lz4 rdma-core - lua hwloc numactl readline freeipmi + lua hwloc numactl readline freeipmi shadow.su ] ++ stdenv.lib.optionals enableX11 [ libssh2 xorg.xauth ]; configureFlags = with stdenv.lib;