aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-containers/singularity
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/singularity')
-rw-r--r--recipes-containers/singularity/singularity/0001-Use-python3.patch150
-rw-r--r--recipes-containers/singularity/singularity/0001-configure.ac-drop-2nd-AM_INIT_AUTOMAKE.patch36
-rw-r--r--recipes-containers/singularity/singularity_git.bb23
3 files changed, 195 insertions, 14 deletions
diff --git a/recipes-containers/singularity/singularity/0001-Use-python3.patch b/recipes-containers/singularity/singularity/0001-Use-python3.patch
new file mode 100644
index 00000000..5af21719
--- /dev/null
+++ b/recipes-containers/singularity/singularity/0001-Use-python3.patch
@@ -0,0 +1,150 @@
+From 758c1edc7bf3d2a023954f4fcc9ddf46fd370272 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Thu, 21 May 2020 14:14:56 +0200
+Subject: [PATCH] Use python3
+
+* without /usr/bin/python this just fails to configure with:
+ | checking for python... no
+ | configure: error: Please install python before installing.
+ | WARNING: exit code 1 from a shell command.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ configure.ac | 6 +++---
+ etc/configure_transform.py | 2 +-
+ libexec/python/helpers/json/add.py | 2 +-
+ libexec/python/helpers/json/delete.py | 2 +-
+ libexec/python/helpers/json/dump.py | 2 +-
+ libexec/python/helpers/json/get.py | 2 +-
+ libexec/python/helpers/json/inspect.py | 2 +-
+ libexec/python/import.py | 2 +-
+ libexec/python/pull.py | 2 +-
+ libexec/python/shub/api.py | 2 +-
+ libexec/python/size.py | 2 +-
+ 11 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 8ffa5ab32..71a1605b2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -251,15 +251,15 @@ fi
+ # PYTHON
+ # ---------------------------------------------------------------------
+
+-AC_CHECK_PROG(PYTHON_CHECK,python,yes)
++AC_CHECK_PROG(PYTHON_CHECK,python3,yes)
+ if test x"$PYTHON_CHECK" != x"yes" ; then
+- AC_MSG_ERROR([Please install python before installing.])
++ AC_MSG_ERROR([Please install python3 before installing.])
+ else
+
+ PYTHON_MODULES="base64 datetime glob hashlib io itertools json math multiprocessing pickle pwd re shutil signal subprocess stat sys tarfile tempfile time"
+ for PYTHON_MODULE in $PYTHON_MODULES; do
+ AC_MSG_CHECKING([for the $PYTHON_MODULE python module])
+- python_module_result=`python -c "import $PYTHON_MODULE" 2>&1`
++ python_module_result=`python3 -c "import $PYTHON_MODULE" 2>&1`
+ if test -z "$python_module_result"; then
+ AC_MSG_RESULT([yes])
+ else
+diff --git a/etc/configure_transform.py b/etc/configure_transform.py
+index a1ff5c427..9ec445d21 100755
+--- a/etc/configure_transform.py
++++ b/etc/configure_transform.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ #
+ # Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
+ #
+diff --git a/libexec/python/helpers/json/add.py b/libexec/python/helpers/json/add.py
+index b24aec75a..22abbbeb9 100644
+--- a/libexec/python/helpers/json/add.py
++++ b/libexec/python/helpers/json/add.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ '''
+
+diff --git a/libexec/python/helpers/json/delete.py b/libexec/python/helpers/json/delete.py
+index 0975e4e60..07e255228 100644
+--- a/libexec/python/helpers/json/delete.py
++++ b/libexec/python/helpers/json/delete.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ '''
+
+diff --git a/libexec/python/helpers/json/dump.py b/libexec/python/helpers/json/dump.py
+index ddba06e4a..37a8edf70 100644
+--- a/libexec/python/helpers/json/dump.py
++++ b/libexec/python/helpers/json/dump.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ '''
+
+diff --git a/libexec/python/helpers/json/get.py b/libexec/python/helpers/json/get.py
+index 355be9040..d1d822aea 100644
+--- a/libexec/python/helpers/json/get.py
++++ b/libexec/python/helpers/json/get.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ '''
+
+diff --git a/libexec/python/helpers/json/inspect.py b/libexec/python/helpers/json/inspect.py
+index 65772a4ef..61c723495 100644
+--- a/libexec/python/helpers/json/inspect.py
++++ b/libexec/python/helpers/json/inspect.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ '''
+
+diff --git a/libexec/python/import.py b/libexec/python/import.py
+index 2ec208417..1c58eda5c 100644
+--- a/libexec/python/import.py
++++ b/libexec/python/import.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ '''
+
+diff --git a/libexec/python/pull.py b/libexec/python/pull.py
+index 1cd705c90..4431023f3 100644
+--- a/libexec/python/pull.py
++++ b/libexec/python/pull.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ '''
+
+diff --git a/libexec/python/shub/api.py b/libexec/python/shub/api.py
+index 850d167e7..3c8313ad5 100644
+--- a/libexec/python/shub/api.py
++++ b/libexec/python/shub/api.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ '''
+
+diff --git a/libexec/python/size.py b/libexec/python/size.py
+index 34331fd27..99581ce52 100644
+--- a/libexec/python/size.py
++++ b/libexec/python/size.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ '''
+
diff --git a/recipes-containers/singularity/singularity/0001-configure.ac-drop-2nd-AM_INIT_AUTOMAKE.patch b/recipes-containers/singularity/singularity/0001-configure.ac-drop-2nd-AM_INIT_AUTOMAKE.patch
new file mode 100644
index 00000000..55ee83e4
--- /dev/null
+++ b/recipes-containers/singularity/singularity/0001-configure.ac-drop-2nd-AM_INIT_AUTOMAKE.patch
@@ -0,0 +1,36 @@
+From 13ee3e016490e74868b64e3a07dcccf9feafebdf Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Tue, 30 Nov 2021 05:59:06 -0800
+Subject: [PATCH] configure.ac: drop 2nd AM_INIT_AUTOMAKE
+
+* automake-1.16.5 introduced in oe-core:
+ https://git.openembedded.org/openembedded-core/commit/?id=851167b3a41b1728407d331c1666827fb730daa1
+ doesn't like this after:
+ http://git.savannah.gnu.org/cgit/automake.git/commit/?id=f4a3a70f69e1dbccb6578f39ef47835098a04624
+
+ and do_configure fails with:
+ configure.ac:38: error: AM_INIT_AUTOMAKE expanded multiple times
+
+ There is no point in upstreaming this, because singularity-2.3.1 is very old and
+ whole autotools support is removed in version 3 (currently 3.8.5) with:
+ https://github.com/hpcng/singularity/commit/a06e3d13a822080d7a9bc55085ee1bb32026a96e
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ configure.ac | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 8ffa5ab32..a5a35c43a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -35,7 +35,6 @@ AC_GNU_SOURCE
+ AC_PROG_INSTALL
+ AC_PROG_LIBTOOL
+ AC_PROG_CC
+-AM_INIT_AUTOMAKE
+ AM_PROG_CC_C_O
+ AC_ENABLE_SHARED
+ AC_PROG_LIBTOOL(libtool)
diff --git a/recipes-containers/singularity/singularity_git.bb b/recipes-containers/singularity/singularity_git.bb
index a2653529..72171b39 100644
--- a/recipes-containers/singularity/singularity_git.bb
+++ b/recipes-containers/singularity/singularity_git.bb
@@ -1,20 +1,20 @@
# Skip QA check for library symbolic links (core issue is a packaging problem within
# Singularity build / config: read up on the dev-so test for more info)
-INSANE_SKIP_${PN} += "dev-so"
+INSANE_SKIP:${PN} += "dev-so"
-RDEPENDS_${PN} += "glibc python3 ca-certificates openssl bash e2fsprogs-mke2fs"
-# Singularity expects to find python3 under the name python, therefore both
-# cannot be installed at the same time.
-RCONFLICTS_${PN} = "python"
+RDEPENDS:${PN} += "python3 ca-certificates openssl bash e2fsprogs-mke2fs"
-LICENSE = "BSD"
+LICENSE = "BSD-3-Clause | Apache-2.0"
LIC_FILES_CHKSUM = "file://COPYRIGHT.md;md5=be78c34e483dd7d8439358b1e024b294 \
file://LICENSE-LBNL.md;md5=45a007b527e1a9507aa7fa869f8d7ede \
file://LICENSE.md;md5=df4326b473db6424033f1d98a5645e30 \
file://debian/copyright;md5=ed267cf386d9b75ab1f27f407e935b10"
-SRC_URI = "git://github.com/singularityware/singularity.git;protocol=https"
-PV = "2.3.1+git${SRCPV}"
+SRC_URI = "git://github.com/singularityware/singularity.git;protocol=https;branch=master \
+ file://0001-Use-python3.patch \
+ file://0001-configure.ac-drop-2nd-AM_INIT_AUTOMAKE.patch \
+"
+PV = "2.3.1+git"
SRCREV = "e214d4ebf0a1274b1c63b095fd55ae61c7e92947"
S = "${WORKDIR}/git"
@@ -22,12 +22,7 @@ S = "${WORKDIR}/git"
inherit python3native autotools-brokensep
EXTRA_OECONF = "--prefix=/usr/local"
-pkg_postinst_${PN}() {
- # Singularity requires "python" to resolve to "python3" within the commandline.
- # This creates a symbolic link from python3 to python. A side-effect of this is
- # that scripts which expect Python 2 may fail to run correctly.
- ln -sr $D${bindir}/python3 $D${bindir}/python
-
+pkg_postinst:${PN}() {
# python3 expects CA certificates to be installed in a different place to where
# they are actually installed. These lines link the two locations.
rm -r $D${libdir}/ssl/certs