2023-01-19 06:30:17 +08:00
|
|
|
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
|
2022-05-24 22:01:46 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
|
|
|
|
2022-05-29 00:55:44 +08:00
|
|
|
from spack.package import *
|
2022-05-24 22:01:46 +08:00
|
|
|
from spack.pkg.builtin.singularityce import SingularityBase
|
|
|
|
|
|
|
|
|
|
|
|
# Apptainer is the new name of Singularity, piggy-back on the original package
|
|
|
|
class Apptainer(SingularityBase):
|
|
|
|
"""Apptainer is an open source container platform designed to be simple, fast, and
|
|
|
|
secure. Many container platforms are available, but Apptainer is designed for
|
|
|
|
ease-of-use on shared systems and in high performance computing (HPC)
|
|
|
|
environments.
|
|
|
|
|
|
|
|
Needs post-install chmod/chown steps to enable full functionality.
|
|
|
|
See package definition or `spack-build-out.txt` build log for details,
|
2023-04-17 09:51:06 +08:00
|
|
|
e.g.:
|
2022-05-24 22:01:46 +08:00
|
|
|
|
|
|
|
tail -15 $(spack location -i apptainer)/.spack/spack-build-out.txt
|
2022-07-31 06:19:18 +08:00
|
|
|
"""
|
2022-05-24 22:01:46 +08:00
|
|
|
|
|
|
|
homepage = "https://apptainer.org"
|
|
|
|
url = "https://github.com/apptainer/apptainer/releases/download/v1.0.2/apptainer-1.0.2.tar.gz"
|
|
|
|
git = "https://github.com/apptainer/apptainer.git"
|
|
|
|
|
|
|
|
version("main", branch="main")
|
2023-04-17 09:51:06 +08:00
|
|
|
version("1.1.7", sha256="e6d3956a26c3965703402e17f153ba07f59bf710068806462b314d2d04e825e7")
|
|
|
|
version("1.1.6", sha256="5f32d305279a51ce8bdbe69e733c4ac12b1efdcb77758fab8ec9463e96a8fd82")
|
2023-01-24 01:53:10 +08:00
|
|
|
version("1.1.5", sha256="3eadb26b6656a89a111abe29c7e50eab0023e9a8718f1e77e46ca871398bfa67")
|
2022-12-15 09:06:22 +08:00
|
|
|
version("1.1.4", sha256="b1ab9d5842002803e66da8f456ee00f352ea2bb43436d5b668f19ef7475ed4a5")
|
2022-12-08 03:05:22 +08:00
|
|
|
version("1.1.3", sha256="c7bf7f4d5955e1868739627928238d02f94ca9fd0caf110b0243d65548427899")
|
2022-05-24 22:01:46 +08:00
|
|
|
version("1.0.2", sha256="2d7a9d0a76d5574459d249c3415e21423980d9154ce85e8c34b0600782a7dfd3")
|
|
|
|
|
2023-01-30 20:56:52 +08:00
|
|
|
depends_on("go@1.17.5:", when="@1.1.0:")
|
|
|
|
|
2022-05-24 22:01:46 +08:00
|
|
|
singularity_org = "apptainer"
|
|
|
|
singularity_name = "apptainer"
|
|
|
|
singularity_security_urls = (
|
|
|
|
"https://apptainer.org/docs/admin/main/security.html",
|
|
|
|
"https://apptainer.org/docs/admin/main/admin_quickstart.html#apptainer-security",
|
|
|
|
)
|
2022-12-08 03:05:22 +08:00
|
|
|
|
2022-12-29 16:24:41 +08:00
|
|
|
# Override config options from SingularityBase
|
|
|
|
@property
|
|
|
|
def config_options(self):
|
2023-02-21 00:39:28 +08:00
|
|
|
spec = self.spec
|
|
|
|
options = []
|
|
|
|
if spec.satisfies("@1.1.0: +suid"):
|
|
|
|
options.append("--with-suid")
|
|
|
|
return options
|