Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
pkg-scripts/apptainer-1.3.4-0.build.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
94 lines (65 sloc)
2.59 KB
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
#! /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 |