From f94ac8c77033088feece2fa085e44a4fef54e18a Mon Sep 17 00:00:00 2001 From: Vanessasaurus <814322+vsoch@users.noreply.github.com> Date: Mon, 15 May 2023 10:14:44 -0600 Subject: add new package flux-security (#37668) I will follow this up with a variant to flux-core to add flux-security, and then automation in the flux-framework/spack repository. Signed-off-by: vsoch Co-authored-by: vsoch --- .../builtin/packages/flux-security/package.py | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 var/spack/repos/builtin/packages/flux-security/package.py diff --git a/var/spack/repos/builtin/packages/flux-security/package.py b/var/spack/repos/builtin/packages/flux-security/package.py new file mode 100644 index 0000000000..e85528618f --- /dev/null +++ b/var/spack/repos/builtin/packages/flux-security/package.py @@ -0,0 +1,61 @@ +# Copyright 2013-2023 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) + +import os + +import spack.util.executable +from spack.package import * + + +class FluxSecurity(AutotoolsPackage): + """Independent project for Flux security code and APIs.""" + + homepage = "https://github.com/flux-framework/flux-security" + url = "https://github.com/flux-framework/flux-security/releases/download/v0.8.0/flux-security-0.8.0.tar.gz" + git = "https://github.com/flux-framework/flux-security.git" + tags = ["radiuss", "e4s"] + + maintainers("grondo") + + version("master", branch="master") + version("0.8.0", sha256="9963628063b4abdff6bece03208444c8f23fbfda33c20544c48b21e9f4819ce2") + + # Need autotools when building on master: + depends_on("autoconf", type="build", when="@master") + depends_on("automake", type="build", when="@master") + depends_on("libtool", type="build", when="@master") + + depends_on("pkgconfig") + depends_on("libsodium@1.0.14:") + depends_on("jansson") + depends_on("libuuid") + depends_on("munge") + depends_on("libpam") + + def setup(self): + pass + + @when("@master") + def setup(self): + with working_dir(self.stage.source_path): + # Allow git-describe to get last tag so flux-version works: + git = which("git") + # When using spack develop, this will already be unshallow + try: + git("fetch", "--unshallow") + git("config", "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*") + git("fetch", "origin") + except spack.util.executable.ProcessError: + git("fetch") + + def autoreconf(self, spec, prefix): + self.setup() + if os.path.exists(self.configure_abs_path): + return + # make sure configure doesn't get confused by the staging symlink + with working_dir(self.configure_directory): + # Bootstrap with autotools + bash = which("bash") + bash("./autogen.sh") -- cgit v1.2.3-70-g09d2