
Use full length commit sha instead of short prefixes, to improve reproducibility (future clashes) and guard against compromised repos and man in the middle attacks. Abbreviated commit shas are expanded to full length, to guard against future clashes on short hash. It also guards against compromised repos and man in the middle attacks, where attackers can easily fabricate a malicious commit with a shasum prefix collision. Versions with just tags now also get a commit sha, which can later be used to check for retagged commits.
63 lines
2.2 KiB
Python
63 lines
2.2 KiB
Python
# 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)
|
|
|
|
from spack.package import *
|
|
from spack.util.environment import is_system_path
|
|
|
|
|
|
class Procps(AutotoolsPackage):
|
|
"""Command line and full screen utilities for browsing procfs, a "pseudo"
|
|
file system dynamically generated by the kernel to provide information
|
|
about the status of entries in its process table."""
|
|
|
|
homepage = "https://gitlab.com/procps-ng/procps"
|
|
git = "https://gitlab.com/procps-ng/procps.git"
|
|
|
|
version("master", branch="master")
|
|
version("3.3.15", tag="v3.3.15", commit="7bb949bcba13c107fa0f45d2d0298b1ad6b6d6cc")
|
|
|
|
variant("nls", default=True, description="Enable Native Language Support.")
|
|
|
|
depends_on("autoconf", type="build")
|
|
depends_on("automake", type="build")
|
|
depends_on("libtool", type="build")
|
|
depends_on("m4", type="build")
|
|
depends_on("pkgconfig@0.9.0:", type="build")
|
|
depends_on("dejagnu", type="test")
|
|
depends_on("iconv")
|
|
depends_on("gettext", type="build")
|
|
depends_on("gettext", when="+nls")
|
|
depends_on("ncurses")
|
|
|
|
conflicts("platform=darwin", msg="procps is linux-only")
|
|
|
|
# Need to tell the build to use the tools it already has to find
|
|
# libintl (if appropriate).
|
|
patch("libintl.patch")
|
|
|
|
def autoreconf(self, spec, prefix):
|
|
sh = which("sh")
|
|
sh("autogen.sh")
|
|
|
|
def configure_args(self):
|
|
spec = self.spec
|
|
args = ["--with-ncurses"]
|
|
|
|
if "+nls" in spec:
|
|
args.append("--enable-nls")
|
|
if "intl" not in spec["gettext"].libs.names:
|
|
args.append("--without-libintl-prefix")
|
|
elif not is_system_path(spec["gettext"].prefix):
|
|
args.append("--with-libintl-prefix=" + spec["gettext"].prefix)
|
|
else:
|
|
args.append("--disable-nls")
|
|
|
|
if spec["iconv"].name == "libc":
|
|
args.append("--without-libiconv-prefix")
|
|
elif not is_system_path(spec["iconv"].prefix):
|
|
args.append("--with-libiconv-prefix={0}".format(spec["iconv"].prefix))
|
|
|
|
return args
|