-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #300 from mariux64/add-apptainer-1.3.4
apptainer: add version 1.3.4 and supporting tools
- Loading branch information
Showing
1 changed file
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |