From a3671bcd228bba0373a8e7cbf2ec4370be0d6942 Mon Sep 17 00:00:00 2001 From: thomas Date: Thu, 10 Oct 2024 10:43:54 +0200 Subject: [PATCH] apptainer: add version 1.3.4 and supporting tools Included in the update are: - gocryptfs - fuse-overlayfs These are used by apptainer when found in the system. This way the functionality of apptainer is improved. see: https://github.com/rfjakob/gocryptfs https://github.com/containers/fuse-overlayfs --- apptainer-1.3.4-0.build.sh | 94 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100755 apptainer-1.3.4-0.build.sh diff --git a/apptainer-1.3.4-0.build.sh b/apptainer-1.3.4-0.build.sh new file mode 100755 index 0000000..bb2dce8 --- /dev/null +++ b/apptainer-1.3.4-0.build.sh @@ -0,0 +1,94 @@ +#! /bin/sh + +# COOKIE=$(mcookie|cut -c-8); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 0.3; exec bash /dev/shm/runme-$COOKIE.sh +# TESTING=1 + +set -xe +umask 022 + +PKG=apptainer +VERSION=1.3.4 +BUILD=0 + +PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/package/bin +PREFIX=/pkg/$PKG-$VERSION-$BUILD +if [ -n "$TESTING" ]; then PREFIX=/scratch/local2/$PKG-$VERSION-$BUILD ; fi + +mkdir -p $PREFIX +cat >$PREFIX/profile <<-EOF + PATH=$PREFIX/bin:\$PATH + if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi +EOF + +source $PREFIX/profile + +BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD.$USER.build.tmp +test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR ) +mkdir -p $BUILD_TMPDIR/home +export TMPDIR=$BUILD_TMPDIR +export HOME=$BUILD_TMPDIR/home + +BUILD=$PREFIX/build +mkdir -p $BUILD + +cd $BUILD + +mkdir -p fuse-overlayfs +cd fuse-overlayfs + + # orig: https://github.com/containers/fuse-overlayfs/archive/refs/tags/v1.14.tar.gz + BEEHIVE=https://beehive.molgen.mpg.de/90e428d875f56e3ea3ecb83c3245a8c2/fuse-overlayfs-1.14.tar.gz + + test -e fuse-overlayfs-1.14.tar.gz || wget --no-verbose $BEEHIVE + test -d fuse-overlayfs-1.14 || tar -xf fuse-overlayfs-1.14.tar.gz + + cd fuse-overlayfs-1.14 + ./autogen.sh + ./configure --prefix=$PREFIX + make + + make install + +cd $BUILD + +mkdir -p gocryptfs +cd gocryptfs + + # orig: https://github.com/rfjakob/gocryptfs/releases/download/v2.4.0/gocryptfs_v2.4.0_src-deps.tar.gz + BEEHIVE=https://beehive.molgen.mpg.de/9c90fae342cf9170f188ce5d88b370a9/gocryptfs_v2.4.0_src-deps.tar.gz + + test -e gocryptfs_v2.4.0_src-deps.tar.gz || wget --no-verbose $BEEHIVE + test -d gocryptfs_v2.4.0_src-deps || tar -xf gocryptfs_v2.4.0_src-deps.tar.gz + + cd gocryptfs_v2.4.0_src-deps + ./build.bash + + cp -p gocryptfs $PREFIX/bin + install -D -m0755 gocryptfs $PREFIX/bin/gocryptfs + install -D -m0755 gocryptfs-xray/gocryptfs-xray $PREFIX/bin/gocryptfs-xray + install -D -m0644 Documentation/gocryptfs.1 $PREFIX/share/man/man1/gocryptfs.1 + install -D -m0644 Documentation/gocryptfs-xray.1 $PREFIX/share/man/man1/gocryptfs-xray.1 + +cd $BUILD + +mkdir -p apptainer +cd apptainer + + # orig: https://github.com/apptainer/apptainer/releases/download/v1.3.4/apptainer-1.3.4.tar.gz + BEEHIVE=https://beehive.molgen.mpg.de/21b56a1e30ddd5854a2f930db1c607b0/apptainer-1.3.4.tar.gz + + test -e apptainer-$VERSION.tar.gz || wget --no-verbose $BEEHIVE + test -d apptainer-$VERSION || tar -xf apptainer-$VERSION.tar.gz + + cd apptainer-$VERSION + + ./mconfig -b ./build -p $PREFIX + mkdir -p build + cd build + make + + make install + +cd $BUILD + +exit 0