From f821d0a974a3f48cd3ca60feea2e2263a0626407 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 18 Oct 2021 10:04:32 +0200 Subject: [PATCH 1/2] check whether location for temporary directories for build container has support for extended attributes --- start_build_node_env.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/start_build_node_env.sh b/start_build_node_env.sh index 930e838b91..0848a5b391 100755 --- a/start_build_node_env.sh +++ b/start_build_node_env.sh @@ -5,6 +5,21 @@ if [ $# -ne 1 ]; then exit 1 fi export EESSI_TMPDIR=$1 + +# make sure that specified location has support for extended attributes, +# since that's required by CernVM-FS +command -v attr &> /dev/null +if [ $? -eq 0 ]; then + testfile=$(mktemp -p $EESSI_TMPDIR) + attr -s test -V test $testfile > /dev/null + if [ $? -ne 0 ]; then + echo "ERROR: $EESSI_TMPDIR does not support extended attributes!" >&2 + exit 2 + else + rm $testfile + fi +fi + echo "Using $EESSI_TMPDIR as parent for temporary directories..." # create temporary directories From 90b73a0fcf068818896b89d3eac9c82e5db821d4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 20 Oct 2021 08:43:01 +0200 Subject: [PATCH 2/2] print warning when 'attr' command is not available --- start_build_node_env.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/start_build_node_env.sh b/start_build_node_env.sh index 0848a5b391..79028f86b5 100755 --- a/start_build_node_env.sh +++ b/start_build_node_env.sh @@ -18,6 +18,8 @@ if [ $? -eq 0 ]; then else rm $testfile fi +else + echo "WARNING: 'attr' command not available, so can't check support for extended attributes..." >&2 fi echo "Using $EESSI_TMPDIR as parent for temporary directories..."