summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Solberg <odoublewen@users.noreply.github.com>2019-09-12 13:45:00 -0700
committerPeter Scheibel <scheibel1@llnl.gov>2019-09-12 13:45:00 -0700
commit78f3f4c309335576686525339c22c029ddb6e86f (patch)
tree345cc83213b9d8668cf551021c5df6e2cfa653b3
parent660887674769ca5c0c48c7769f6a7d5c3bfa9bff (diff)
downloadspack-78f3f4c309335576686525339c22c029ddb6e86f.tar.gz
spack-78f3f4c309335576686525339c22c029ddb6e86f.tar.bz2
spack-78f3f4c309335576686525339c22c029ddb6e86f.tar.xz
spack-78f3f4c309335576686525339c22c029ddb6e86f.zip
Singularity package: add version 3.4.0 (#12785)
This version in combination with the included patch can install without root.
-rw-r--r--var/spack/repos/builtin/packages/singularity/package.py8
-rw-r--r--var/spack/repos/builtin/packages/singularity/singularity_v3.4.0_remove_root_check.patch17
2 files changed, 22 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/singularity/package.py b/var/spack/repos/builtin/packages/singularity/package.py
index d7e3ada566..1b030cff23 100644
--- a/var/spack/repos/builtin/packages/singularity/package.py
+++ b/var/spack/repos/builtin/packages/singularity/package.py
@@ -25,9 +25,8 @@ class Singularity(MakefilePackage):
git = "https://github.com/sylabs/singularity.git"
version('develop', branch='master')
- # TODO: 3.4.0 requires cryptsetup (both build and run) which still needs
- # packaging
- # version('3.4.0', sha256='eafb27f1ffbed427922ebe2b5b95d1c9c09bfeb897518867444fe230e3e35e41')
+
+ version('3.4.0', sha256='eafb27f1ffbed427922ebe2b5b95d1c9c09bfeb897518867444fe230e3e35e41')
version('3.3.0', sha256='070530a472e7e78492f1f142c8d4b77c64de4626c4973b0589f0d18e1fcf5b4f')
version('3.2.1', sha256='d4388fb5f7e0083f0c344354c9ad3b5b823e2f3f27980e56efa7785140c9b616')
version('3.1.1', '158f58a79db5337e1d655ee0159b641e42ea7435')
@@ -38,6 +37,9 @@ class Singularity(MakefilePackage):
depends_on('squashfs', type='run')
depends_on('git', when='@develop') # mconfig uses it for version info
depends_on('shadow', type='run', when='@3.3:')
+ depends_on('cryptsetup', type=('build', 'run'), when='@3.4:')
+
+ patch('singularity_v3.4.0_remove_root_check.patch', level=0, when='@3.4.0')
# Go has novel ideas about how projects should be organized.
# We'll point GOPATH at the stage dir, and move the unpacked src
diff --git a/var/spack/repos/builtin/packages/singularity/singularity_v3.4.0_remove_root_check.patch b/var/spack/repos/builtin/packages/singularity/singularity_v3.4.0_remove_root_check.patch
new file mode 100644
index 0000000000..ee91b72985
--- /dev/null
+++ b/var/spack/repos/builtin/packages/singularity/singularity_v3.4.0_remove_root_check.patch
@@ -0,0 +1,17 @@
+--- mlocal/frags/build_runtime_suid.mk 2019-08-30 20:43:13.000000000 -0700
++++ mlocal/frags/build_runtime_suid.mk 2019-09-10 12:21:09.120567773 -0700
+@@ -11,10 +11,10 @@
+ -o $@ $(SOURCEDIR)/cmd/starter/main_linux.go
+
+ $(starter_suid_INSTALL): $(starter_suid)
+- @if [ `id -u` -ne 0 -a -z "${RPM_BUILD_ROOT}" ] ; then \
+- echo "SUID binary requires to execute make install as root, use sudo make install to finish installation"; \
+- exit 1 ; \
+- fi
++# @if [ `id -u` -ne 0 -a -z "${RPM_BUILD_ROOT}" ] ; then \
++# echo "SUID binary requires to execute make install as root, use sudo make install to finish installation"; \
++# exit 1 ; \
++# fi
+ @echo " INSTALL SUID" $@
+ $(V)install -d $(@D)
+ $(V)install -m 4755 $(starter_suid) $(starter_suid_INSTALL)