Skip to content

Commit

Permalink
slurm: bugifx, add su/echo paths
Browse files Browse the repository at this point in the history
slurmd requires su and echo to work with "--get-user-env". If slurmd
does not find /bin/su or /bin/echo, it crashes.

(cherry picked from commit 5d8f61f)
  • Loading branch information
markuskowa committed Jun 10, 2020
1 parent 118e07c commit 8946799
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions 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
# enable internal X11 support via libssh2
Expand All @@ -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
Expand All @@ -36,7 +39,7 @@ stdenv.mkDerivation rec {
buildInputs = [
curl python munge perl pam openssl zlib
libmysqlclient ncurses gtk2 lz4
lua hwloc numactl readline freeipmi
lua hwloc numactl readline freeipmi shadow.su
] ++ stdenv.lib.optionals enableX11 [ libssh2 xorg.xauth ];

configureFlags = with stdenv.lib;
Expand Down

0 comments on commit 8946799

Please sign in to comment.