add flux-security variant to flux-core (#37689)

This will build flux-security separately to have a flux-imp
that can be defined in a flux broker.toml. Note that the user
that wants a multi-user setup is recommended to create a view,
and then a system/broker.toml in flux config directory that
points to it.

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Co-authored-by: vsoch <vsoch@users.noreply.github.com>
This commit is contained in:
Vanessasaurus 2023-05-29 04:34:07 -06:00 committed by GitHub
parent 26107fe6b2
commit 8c97d8ad3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -115,6 +115,7 @@ class FluxCore(AutotoolsPackage):
variant("docs", default=False, description="Build flux manpages and docs") variant("docs", default=False, description="Build flux manpages and docs")
variant("cuda", default=False, description="Build dependencies with support for CUDA") variant("cuda", default=False, description="Build dependencies with support for CUDA")
variant("security", default=False, description="Build with flux-security")
# Restrict flux to Linux based platforms where builds are possible. # Restrict flux to Linux based platforms where builds are possible.
conflicts("platform=darwin", msg="flux-core does not support MacOS based platforms.") conflicts("platform=darwin", msg="flux-core does not support MacOS based platforms.")
@ -150,6 +151,12 @@ class FluxCore(AutotoolsPackage):
depends_on("asciidoc", type="build", when="+docs") depends_on("asciidoc", type="build", when="+docs")
depends_on("py-docutils", type="build", when="@0.32.0: +docs") depends_on("py-docutils", type="build", when="@0.32.0: +docs")
# Flux security variant
# Note that if you install with this variant, it is
# recommended to create a view and then a broker.toml that
# has the path to flux-imp generated by flux-security
depends_on("flux-security", type="build", when="+security")
# Need autotools when building on master: # Need autotools when building on master:
depends_on("autoconf", type="build", when="@master") depends_on("autoconf", type="build", when="@master")
depends_on("automake", type="build", when="@master") depends_on("automake", type="build", when="@master")
@ -243,6 +250,8 @@ def configure_args(self):
args = ["--enable-pylint=no"] args = ["--enable-pylint=no"]
if "+docs" not in self.spec: if "+docs" not in self.spec:
args.append("--disable-docs") args.append("--disable-docs")
if "+security" in self.spec:
args.append("--with-flux-security")
return args return args
def flag_handler(self, name, flags): def flag_handler(self, name, flags):