diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/computing')
4 files changed, 70 insertions, 26 deletions
diff --git a/nixpkgs/pkgs/servers/computing/slurm/common-env-echo.patch b/nixpkgs/pkgs/servers/computing/slurm/common-env-echo.patch new file mode 100644 index 00000000000..4236421a63d --- /dev/null +++ b/nixpkgs/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/nixpkgs/pkgs/servers/computing/slurm/default.nix b/nixpkgs/pkgs/servers/computing/slurm/default.nix index 1554fb69f19..2b06671e4e0 100644 --- a/nixpkgs/pkgs/servers/computing/slurm/default.nix +++ b/nixpkgs/pkgs/servers/computing/slurm/default.nix @@ -1,14 +1,15 @@ { stdenv, fetchFromGitHub, pkgconfig, libtool, curl -, python, munge, perl, pam, openssl, zlib +, python3, munge, perl, pam, zlib, shadow, coreutils , ncurses, libmysqlclient, gtk2, lua, hwloc, numactl -, readline, freeipmi, libssh2, xorg, lz4, rdma-core +, readline, freeipmi, xorg, lz4, rdma-core, nixosTests +, pmix # enable internal X11 support via libssh2 , enableX11 ? true }: stdenv.mkDerivation rec { pname = "slurm"; - version = "19.05.5.1"; + version = "20.02.4.1"; # N.B. We use github release tags instead of https://www.schedmd.com/downloads.php # because the latter does not keep older releases. @@ -17,39 +18,50 @@ stdenv.mkDerivation rec { repo = "slurm"; # The release tags use - instead of . rev = "${pname}-${builtins.replaceStrings ["."] ["-"] version}"; - sha256 = "0f0gv3sirp6sxdrbwydsbcqicjbmrpm58yhgbsar8v6nx3g6y3hx"; + sha256 = "071lwny7cj4idq0h03mmvkk4f4i6fgl3c5q8cvbh7z8px6k50cfp"; }; outputs = [ "out" "dev" ]; - prePatch = stdenv.lib.optional enableX11 '' + patches = [ + # increase string length to allow for full + # path of 'echo' in nix store + ./common-env-echo.patch + # Required for configure to pick up the right dlopen path + ./pmix-configure.patch + ]; + + 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 # this doesn't fix tests completely at least makes slurmd to launch hardeningDisable = [ "bindnow" ]; - nativeBuildInputs = [ pkgconfig libtool ]; + nativeBuildInputs = [ pkgconfig libtool python3 ]; buildInputs = [ - curl python munge perl pam openssl zlib + curl python3 munge perl pam zlib libmysqlclient ncurses gtk2 lz4 rdma-core - lua hwloc numactl readline freeipmi - ] ++ stdenv.lib.optionals enableX11 [ libssh2 xorg.xauth ]; + lua hwloc numactl readline freeipmi shadow.su + pmix + ] ++ 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" + "--with-pmix=${pmix}" ] ++ (optional (gtk2 == null) "--disable-gtktest") - ++ (optional enableX11 "--with-libssh2=${libssh2.dev}") ++ (optional (!enableX11) "--disable-x11"); @@ -64,6 +76,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + passthru.tests.slurm = nixosTests.slurm; + meta = with stdenv.lib; { homepage = "http://www.schedmd.com/"; description = "Simple Linux Utility for Resource Management"; diff --git a/nixpkgs/pkgs/servers/computing/slurm/pmix-configure.patch b/nixpkgs/pkgs/servers/computing/slurm/pmix-configure.patch new file mode 100644 index 00000000000..21c2197c3ff --- /dev/null +++ b/nixpkgs/pkgs/servers/computing/slurm/pmix-configure.patch @@ -0,0 +1,13 @@ +diff --git a/configure b/configure +index 1cf53bc..ab68441 100755 +--- a/configure ++++ b/configure +@@ -21207,7 +21207,7 @@ rm -f conftest.err conftest.i conftest.$ac_ext + as_fn_error $? "error processing $x_ac_cv_pmix_libdir: PMIx v3.x was already found in one of the previous paths" "$LINENO" 5 + fi + _x_ac_pmix_v3_found="1" +- PMIX_V3_CPPFLAGS="-I$x_ac_cv_pmix_dir/include" ++ PMIX_V3_CPPFLAGS="-I$x_ac_cv_pmix_dir/include -DPMIXP_V3_LIBPATH=\\\"$x_ac_cv_pmix_libdir\\\"" + if test "$ac_with_rpath" = "yes"; then + PMIX_V3_LDFLAGS="-Wl,-rpath -Wl,$x_ac_cv_pmix_libdir -L$x_ac_cv_pmix_libdir" + else diff --git a/nixpkgs/pkgs/servers/computing/storm/default.nix b/nixpkgs/pkgs/servers/computing/storm/default.nix index d55dd14601e..b8ae0bc4e85 100644 --- a/nixpkgs/pkgs/servers/computing/storm/default.nix +++ b/nixpkgs/pkgs/servers/computing/storm/default.nix @@ -1,24 +1,27 @@ { stdenv, lib, fetchurl, zip, unzip -, jzmq, jdk, python -, confFile ? "", extraLibraryPaths ? [], extraJars ? [] }: +, jdk, python +, confFile ? "" +, extraLibraryPaths ? [] +, extraJars ? [] +}: stdenv.mkDerivation rec { - name = "apache-storm-" + version; - version = "1.2.1"; + pname = "apache-storm"; + version = "2.1.0"; + name = "${pname}-${version}"; + src = fetchurl { - url = - "mirror://apache/storm/${name}/${name}.tar.gz"; - sha256 = "177dqgbviagrpvalg8h67mwiwwgmiqsg0hh97hcqqcjg71ypnjkv"; + url = "mirror://apache/storm/${name}/${name}.tar.gz"; + sha256 = "1i3z08rfy7aavshrbrskv9dmlhx1fjgrhhqm0pczfam4vnas8yg2"; }; - buildInputs = [ zip unzip jzmq ]; + buildInputs = [ zip unzip ]; installPhase = '' mkdir -p $out/share/${name} mv public $out/docs mv examples $out/share/${name}/. - rm -f lib/jzmq* || exit 1 mv external extlib* lib $out/. mv conf bin $out/. mv log4j2 $out/conf/. @@ -35,21 +38,22 @@ stdenv.mkDerivation rec { -e "s|STORM_CONF_DIR = .*|STORM_CONF_DIR = os.getenv('STORM_CONF_DIR','$out/conf')|" \ -e 's|STORM_LOG4J2_CONF_DIR =.*|STORM_LOG4J2_CONF_DIR = os.path.join(STORM_CONF_DIR, "log4j2")|' \ $out/bin/storm.py + # Default jdk location sed -i -e 's|#.*export JAVA_HOME=.*|export JAVA_HOME="${jdk.home}"|' \ $out/conf/storm-env.sh - unzip $out/lib/storm-core-${version}.jar defaults.yaml; - zip -d $out/lib/storm-core-${version}.jar defaults.yaml; + ls -lh $out/lib + unzip $out/lib/storm-client-${version}.jar defaults.yaml; + zip -d $out/lib/storm-client-${version}.jar defaults.yaml; sed -i \ - -e 's|java.library.path: .*|java.library.path: "${jzmq}/lib:${lib.concatStringsSep ":" extraLibraryPaths}"|' \ + -e 's|java.library.path: .*|java.library.path: "${lib.concatStringsSep ":" extraLibraryPaths}"|' \ -e 's|storm.log4j2.conf.dir: .*|storm.log4j2.conf.dir: "conf/log4j2"|' \ defaults.yaml ${if confFile != "" then ''cat ${confFile} >> defaults.yaml'' else ""} mv defaults.yaml $out/conf; - # Link to jzmq jar and extra jars + # Link to extra jars cd $out/lib; - ln -s ${jzmq}/share/java/*.jar; ${lib.concatMapStrings (jar: "ln -s ${jar};\n") extraJars} ''; |