summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Tiniuc <tiniuc.alexandru@gmail.com>2017-08-25 13:27:01 +0100
committerBruce Ashfield <bruce.ashfield@windriver.com>2017-08-29 08:42:24 -0400
commit06bc17d1f0650ad2cb134b09b25133bcd641d473 (patch)
tree5b9f1dbf638ee84b868d9876ba37a242fa03b66b
parent70a36aa0880c4495517445286831a52f7c332aa0 (diff)
downloadmeta-virtualization-06bc17d1f0650ad2cb134b09b25133bcd641d473.tar.gz
Added recipe for the Singularity container platform.
Singularity is a container platform built on the principle of mobility of compute. It is designed to be used on HPC clusters and, unlike Docker, it does not require root access to mount an image. In addition, it can use Docker images out-of-the-box and it can pull them from the Docker Hub. For more information, see singularity.lbl.gov This recipe enables building the Singularity container platform. Additionally, it creates a symlink from /usr/bin/python3 to /usr/bin/python, as well as a symlink to where python3 expects CA certificates to be. I have tested it on a Raspberry Pi 3: I successfully built and run arm32v7 images from Docker Hub. Make sure you have the right image for your CPU architecture: it defaults to amd64. Signed-off-by: Alexandru Tiniuc <tiniuc.alexandru at gmail dot com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--recipes-containers/singularity/singularity_git.bb35
1 files changed, 35 insertions, 0 deletions
diff --git a/recipes-containers/singularity/singularity_git.bb b/recipes-containers/singularity/singularity_git.bb
new file mode 100644
index 00000000..d0fbeb95
--- /dev/null
+++ b/recipes-containers/singularity/singularity_git.bb
@@ -0,0 +1,35 @@
1# Skip QA check for library symbolic links (core issue is a packaging problem within
2# Singularity build / config: read up on the dev-so test for more info)
3INSANE_SKIP_${PN} += "dev-so"
4
5RDEPENDS_${PN} += "glibc python3 ca-certificates openssl"
6# Singularity expects to find python3 under the name python, therefore both
7# cannot be installed at the same time.
8RCONFLICTS_${PN} = "python"
9
10LICENSE = "BSD"
11LIC_FILES_CHKSUM = "file://COPYRIGHT.md;md5=be78c34e483dd7d8439358b1e024b294 \
12 file://LICENSE-LBNL.md;md5=45a007b527e1a9507aa7fa869f8d7ede \
13 file://LICENSE.md;md5=df4326b473db6424033f1d98a5645e30 \
14 file://debian/copyright;md5=ed267cf386d9b75ab1f27f407e935b10"
15
16SRC_URI = "git://github.com/singularityware/singularity.git;protocol=https"
17PV = "2.3.1+git${SRCPV}"
18SRCREV = "e214d4ebf0a1274b1c63b095fd55ae61c7e92947"
19
20S = "${WORKDIR}/git"
21
22inherit pythonnative autotools-brokensep
23EXTRA_OECONF = "--prefix=/usr/local"
24
25pkg_postinst_${PN}() {
26 # Singularity requires "python" to resolve to "python3" within the commandline.
27 # This creates a symbolic link from python3 to python. A side-effect of this is
28 # that scripts which expect Python 2 may fail to run correctly.
29 ln -sr $D${bindir}/python3 $D${bindir}/python
30
31 # python3 expects CA certificates to be installed in a different place to where
32 # they are actually installed. These lines link the two locations.
33 rm -r $D${libdir}/ssl-1.1/certs
34 ln -sr $D${sysconfdir}/ssl/certs $D${libdir}/ssl-1.1
35}