提交 9acfab12 编写于 作者: E erikj

8001942: build-infra: General permission problems on Windows/cygwin

Summary: Added sanity check for file permissions in configure
Reviewed-by: tbell, ohair
上级 36a481db
...@@ -633,6 +633,18 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK], ...@@ -633,6 +633,18 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
fi fi
]) ])
# Check that source files have basic read permissions set. This might
# not be the case in cygwin in certain conditions.
AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
[
if test x"$OPENJDK_BUILD_OS" = xwindows; then
file_to_test="$SRC_ROOT/LICENSE"
if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.])
fi
fi
])
AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES], AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
[ [
...@@ -642,6 +654,8 @@ BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT, ...@@ -642,6 +654,8 @@ BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT,
[OUTPUT_DIR_IS_LOCAL="no"]) [OUTPUT_DIR_IS_LOCAL="no"])
AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL) AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
BASIC_CHECK_SRC_PERMS
# Check if the user has any old-style ALT_ variables set. # Check if the user has any old-style ALT_ variables set.
FOUND_ALT_VARIABLES=`env | grep ^ALT_` FOUND_ALT_VARIABLES=`env | grep ^ALT_`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册