From 73605e9f2d6a7e43a171f8043374fda7d63c29dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eric=20M=C3=BCller?= <mueller@kip.uni-heidelberg.de>
Date: Thu, 26 Aug 2021 09:54:34 +0200
Subject: [PATCH] Chore: Update go (used for singularity build) from 1.11.5 to
 1.17

Change-Id: Icdf35f993fe7ae4ef5836846d7ad3af719aedef2
---
 .ci/install_singularity_as_root.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/.ci/install_singularity_as_root.sh b/.ci/install_singularity_as_root.sh
index a1ad3025..b0b8bfc4 100755
--- a/.ci/install_singularity_as_root.sh
+++ b/.ci/install_singularity_as_root.sh
@@ -12,7 +12,7 @@ SINGULARITY_REPO="https://github.com/electronicvisions/singularity.git"
 SINGULARITY_BRANCH="bugfix/for_EINCHosts"  # temporary branch with hotfixes for sschmitt as well as newer kernels
 
 GO_INSTALL_PATH=/opt/go
-GO_VERSION=1.11.5
+GO_VERSION=1.17
 OS=linux
 ARCH=amd64
 
@@ -58,7 +58,8 @@ if [ ! -d "${GOPATH}}" ]; then
 fi
 
 # build singularity
-# golang is a bit finicky about where things are placed. Here is the correct way to build Singularity from source.
+# this is a go 1.11-based install flow which probably should be adjusted for
+# modern go (no need to build from source within the gopath folder anymore)
 SINGULARITY_INSTALL_PATH="${GOPATH}/src/github.com/sylabs/singularity"
 mkdir -p "${SINGULARITY_INSTALL_PATH}/../"
 git clone -b "${SINGULARITY_BRANCH}" \
@@ -72,7 +73,7 @@ pushd "${SINGULARITY_INSTALL_PATH}"
     --sysconfdir=/etc
 
 pushd "${SPACK_TMPDIR}/singularity-builddir"
-make && make install
+GO111MODULE=auto make && make install
 popd
 
 popd
-- 
GitLab