Skip to content

Commit

Permalink
add new package flux-security
Browse files Browse the repository at this point in the history
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 <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed May 14, 2023
1 parent 6e07bf1 commit d1062dc
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions var/spack/repos/builtin/packages/flux-security/package.py
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit d1062dc

Please sign in to comment.