Merge pull request #91578 from markuskowa/fix-slurm

slurm: minor bugfixes
This commit is contained in:
markuskowa 2020-06-26 13:31:02 +02:00 committed by GitHub
commit 8828a1d8bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 6 deletions

View file

@ -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;

View file

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkgconfig, libtool, curl
, python, munge, perl, pam, openssl, zlib, shadow, coreutils
, python, munge, perl, pam, zlib, shadow, coreutils
, ncurses, libmysqlclient, gtk2, lua, hwloc, numactl
, readline, freeipmi, libssh2, xorg, lz4, rdma-core, nixosTests
, readline, freeipmi, xorg, lz4, rdma-core, nixosTests
# enable internal X11 support via libssh2
, enableX11 ? true
}:
@ -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"
@ -37,22 +43,20 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig libtool ];
buildInputs = [
curl python munge perl pam openssl zlib
curl python munge perl pam zlib
libmysqlclient ncurses gtk2 lz4 rdma-core
lua hwloc numactl readline freeipmi shadow.su
] ++ stdenv.lib.optionals enableX11 [ libssh2 xorg.xauth ];
] ++ stdenv.lib.optionals enableX11 [ xorg.xauth ];
configureFlags = with stdenv.lib;
[ "--with-freeipmi=${freeipmi}"
"--with-hwloc=${hwloc.dev}"
"--with-lz4=${lz4.dev}"
"--with-munge=${munge}"
"--with-ssl=${openssl.dev}"
"--with-zlib=${zlib}"
"--with-ofed=${rdma-core}"
"--sysconfdir=/etc/slurm"
] ++ (optional (gtk2 == null) "--disable-gtktest")
++ (optional enableX11 "--with-libssh2=${libssh2.dev}")
++ (optional (!enableX11) "--disable-x11");