Merge pull request #91578 from markuskowa/fix-slurm
slurm: minor bugfixes
This commit is contained in:
commit
8828a1d8bc
2 changed files with 23 additions and 6 deletions
13
pkgs/servers/computing/slurm/common-env-echo.patch
Normal file
13
pkgs/servers/computing/slurm/common-env-echo.patch
Normal 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;
|
|
@ -1,7 +1,7 @@
|
||||||
{ stdenv, fetchFromGitHub, pkgconfig, libtool, curl
|
{ 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
|
, 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
|
# enable internal X11 support via libssh2
|
||||||
, enableX11 ? true
|
, enableX11 ? true
|
||||||
}:
|
}:
|
||||||
|
@ -22,6 +22,12 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# increase string length to allow for full
|
||||||
|
# path of 'echo' in nix store
|
||||||
|
./common-env-echo.patch
|
||||||
|
];
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
substituteInPlace src/common/env.c \
|
substituteInPlace src/common/env.c \
|
||||||
--replace "/bin/echo" "${coreutils}/bin/echo"
|
--replace "/bin/echo" "${coreutils}/bin/echo"
|
||||||
|
@ -37,22 +43,20 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig libtool ];
|
nativeBuildInputs = [ pkgconfig libtool ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
curl python munge perl pam openssl zlib
|
curl python munge perl pam zlib
|
||||||
libmysqlclient ncurses gtk2 lz4 rdma-core
|
libmysqlclient ncurses gtk2 lz4 rdma-core
|
||||||
lua hwloc numactl readline freeipmi shadow.su
|
lua hwloc numactl readline freeipmi shadow.su
|
||||||
] ++ stdenv.lib.optionals enableX11 [ libssh2 xorg.xauth ];
|
] ++ stdenv.lib.optionals enableX11 [ xorg.xauth ];
|
||||||
|
|
||||||
configureFlags = with stdenv.lib;
|
configureFlags = with stdenv.lib;
|
||||||
[ "--with-freeipmi=${freeipmi}"
|
[ "--with-freeipmi=${freeipmi}"
|
||||||
"--with-hwloc=${hwloc.dev}"
|
"--with-hwloc=${hwloc.dev}"
|
||||||
"--with-lz4=${lz4.dev}"
|
"--with-lz4=${lz4.dev}"
|
||||||
"--with-munge=${munge}"
|
"--with-munge=${munge}"
|
||||||
"--with-ssl=${openssl.dev}"
|
|
||||||
"--with-zlib=${zlib}"
|
"--with-zlib=${zlib}"
|
||||||
"--with-ofed=${rdma-core}"
|
"--with-ofed=${rdma-core}"
|
||||||
"--sysconfdir=/etc/slurm"
|
"--sysconfdir=/etc/slurm"
|
||||||
] ++ (optional (gtk2 == null) "--disable-gtktest")
|
] ++ (optional (gtk2 == null) "--disable-gtktest")
|
||||||
++ (optional enableX11 "--with-libssh2=${libssh2.dev}")
|
|
||||||
++ (optional (!enableX11) "--disable-x11");
|
++ (optional (!enableX11) "--disable-x11");
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue