summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/libjwt/package.py24
-rw-r--r--var/spack/repos/builtin/packages/slurm/package.py14
2 files changed, 38 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libjwt/package.py b/var/spack/repos/builtin/packages/libjwt/package.py
new file mode 100644
index 0000000000..c37fbb0b19
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libjwt/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Libjwt(AutotoolsPackage):
+ """libjwt JSON Web Token C Library"""
+
+ homepage = "https://github.com/benmcollins/libjwt"
+ git = "https://github.com/benmcollins/libjwt"
+ url = "https://github.com/benmcollins/libjwt/archive/v1.12.0.tar.gz"
+
+ maintainers = ['bollig']
+
+ version('1.12.0', sha256='eaf5d8b31d867c02dde767efa2cf494840885a415a3c9a62680bf870a4511bee')
+
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+ depends_on('m4', type='build')
+ depends_on('jansson')
diff --git a/var/spack/repos/builtin/packages/slurm/package.py b/var/spack/repos/builtin/packages/slurm/package.py
index ed69d08a77..de89d80544 100644
--- a/var/spack/repos/builtin/packages/slurm/package.py
+++ b/var/spack/repos/builtin/packages/slurm/package.py
@@ -24,6 +24,7 @@ class Slurm(AutotoolsPackage):
homepage = 'https://slurm.schedmd.com'
url = 'https://github.com/SchedMD/slurm/archive/slurm-19-05-6-1.tar.gz'
+ version('20-02-4-1', sha256='d32a39df20a99430973de6692870269f38443d8b963c32b4d6475c9d5e92cd73')
version('19-05-6-1', sha256='1b83bce4260af06d644253b1f2ec2979b80b4418c631e9c9f48c2729ae2c95ba')
version('19-05-5-1', sha256='e53e67bd0bb4c37a9c481998764a746467a96bc41d6527569080514f36452c07')
version('18-08-9-1', sha256='32eb0b612ca18ade1e35c3c9d3b4d71aba2b857446841606a9e54d0a417c3b03')
@@ -40,6 +41,7 @@ class Slurm(AutotoolsPackage):
variant('pmix', default=False, description='Enable PMIx support')
variant('sysconfdir', default='PREFIX/etc', values=any,
description='Set system configuration path (possibly /etc/slurm)')
+ variant('restd', default=False, description='Enable the slurmrestd server')
# TODO: add variant for BG/Q and Cray support
@@ -63,6 +65,10 @@ class Slurm(AutotoolsPackage):
depends_on('mariadb', when='+mariadb')
depends_on('pmix', when='+pmix')
+ depends_on('http-parser', when='+restd')
+ depends_on('libyaml', when='+restd')
+ depends_on('libjwt', when='+restd')
+
def flag_handler(self, name, flags):
wrapper_flags = None
@@ -98,6 +104,14 @@ class Slurm(AutotoolsPackage):
else:
args.append('--without-hdf5')
+ if '+restd' in spec:
+ args.append('--enable-slurmrestd')
+ args.append('--with-http-parser={0}'.format(
+ spec['http-parser'].prefix))
+ args.append('--with-jwt={0}'.format(spec['libjwt'].prefix))
+ else:
+ args.append('--disable-slurmrestd')
+
if '+hwloc' in spec:
args.append('--with-hwloc={0}'.format(spec['hwloc'].prefix))
else: