Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure: Check that the build directory is on a normal writable file system #38256

Merged
merged 3 commits into from
Jul 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,19 @@ AC_CONFIG_COMMANDS(mkdirs,
AC_MSG_NOTICE([[creating symbolic link lib64 -> lib]])
ln -s lib "$SAGE_LOCAL/lib64"
fi
dnl Check that the file system is sufficiently functional
if test -z "$SAGE_BUILD_DIR"; then
SAGE_BUILD_DIR="$SAGE_LOCAL/var/tmp/sage/build"
fi
AC_MSG_NOTICE([creating directory $SAGE_BUILD_DIR])
mkdir -p "$SAGE_BUILD_DIR" || AC_MSG_ERROR([error creating directory $SAGE_BUILD_DIR (SAGE_BUILD_DIR)])
rm -f "$SAGE_BUILD_DIR"/conftest
touch "$SAGE_BUILD_DIR"/conftest || AC_MSG_ERROR([error creating a file in $SAGE_BUILD_DIR])
chmod +x "$SAGE_BUILD_DIR"/conftest || AC_MSG_ERROR([error setting file permissions +x in $SAGE_BUILD_DIR])
test -x "$SAGE_BUILD_DIR"/conftest || AC_MSG_ERROR([file permissions +x did not persist in $SAGE_BUILD_DIR])
chmod -x "$SAGE_BUILD_DIR"/conftest || AC_MSG_ERROR([error setting file permissions -x in $SAGE_BUILD_DIR])
test -x "$SAGE_BUILD_DIR"/conftest && AC_MSG_ERROR([file permissions -x did not persist in $SAGE_BUILD_DIR])
rm -f "$SAGE_BUILD_DIR"/conftest
],
[
SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
Expand Down
Loading