Fix Apptainer (#34329)

* Fix Apptainer
* Add comments
This commit is contained in:
Sam Grayson 2022-12-07 12:05:22 -07:00 committed by GitHub
parent 8ba0faa9ee
commit 9b0e79fcab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,6 +27,8 @@ class Apptainer(SingularityBase):
git = "https://github.com/apptainer/apptainer.git" git = "https://github.com/apptainer/apptainer.git"
version("main", branch="main") version("main", branch="main")
version("1.1.3", sha256="c7bf7f4d5955e1868739627928238d02f94ca9fd0caf110b0243d65548427899")
version("1.0.2", sha256="2d7a9d0a76d5574459d249c3415e21423980d9154ce85e8c34b0600782a7dfd3") version("1.0.2", sha256="2d7a9d0a76d5574459d249c3415e21423980d9154ce85e8c34b0600782a7dfd3")
singularity_org = "apptainer" singularity_org = "apptainer"
@ -35,3 +37,16 @@ class Apptainer(SingularityBase):
"https://apptainer.org/docs/admin/main/security.html", "https://apptainer.org/docs/admin/main/security.html",
"https://apptainer.org/docs/admin/main/admin_quickstart.html#apptainer-security", "https://apptainer.org/docs/admin/main/admin_quickstart.html#apptainer-security",
) )
# This overrides SingularityBase (found in ../singularityce/package.py)
# Because Apptainer's mconfig has no option `--without-conmon`
# https://github.com/apptainer/apptainer/blob/v1.0.2/mconfig
def edit(self, spec, prefix):
with working_dir(self.build_directory):
confstring = "./mconfig --prefix=%s" % prefix
if "~suid" in spec:
confstring += " --without-suid"
if "~network" in spec:
confstring += " --without-network"
configure = Executable(confstring)
configure()