[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.12-95-g4028723

Shawn Moore shawn at bestpractical.com
Mon Jan 4 12:52:07 EST 2016


The branch, 4.2-trunk has been updated
       via  4028723fee8d7a6b0e21694492d260942e662f69 (commit)
      from  27062ef0e8ad32466177f123a9cf6307455bf59c (commit)

Summary of changes:
 Makefile.in  |  4 +---
 configure.ac | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 4028723fee8d7a6b0e21694492d260942e662f69
Author: Andreas Metzler <ametzler at debian.org>
Date:   Mon Jan 4 12:49:06 2016 -0500

    Have configure test which `find -perm` syntax to use
    
    Fixes: I#31308

diff --git a/Makefile.in b/Makefile.in
index b5ebfb9..7404770 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -302,9 +302,7 @@ fixperms:
 
 	# Make upgrade scripts executable if they are in the source.
 	#
-	# Note that we use the deprecated (by GNU/POSIX find) -perm +0NNN syntax
-	# instead of -perm /0NNN since BSD find doesn't support the latter.
-	( cd etc/upgrade && find . -type f -not -name '*.in' -perm +0111 -print ) | while read file ; do \
+	( cd etc/upgrade && find . -type f -not -name '*.in' -perm @FINDPERM at 0111 -print ) | while read file ; do \
 		chmod a+x "$(DESTDIR)$(RT_ETC_PATH)/upgrade/$$file" ; \
 	done
 
diff --git a/configure.ac b/configure.ac
index e0a686b..44f5384 100755
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,24 @@ if test "$PERL" = 'not found'; then
 	AC_MSG_ERROR([cannot use $PACKAGE_NAME without perl])
 fi
 
+dnl BSD find uses -perm +xxxx, GNU find has deprecated this syntax in favour of
+dnl -perm /xxx.
+AC_MSG_CHECKING([whether find supports -perm /x or find -perm +x])
+if find -perm /0100 -not -perm /0100
+then
+	FINDPERM="/"
+elif
+	find -perm +0100 -not -perm +0100
+then
+	FINDPERM="+"
+else
+	FINDPERM="na"
+fi
+AC_MSG_RESULT([${FINDPERM}])
+if test "x$FINDPERM" = "xna" ; then
+	AC_MSG_WARN([local find program supports neither -perm /0111 nor -perm +0111, make fixperms will not work])
+fi
+AC_SUBST([FINDPERM])
 
 dnl WEB_HANDLER
 AC_ARG_WITH(web-handler,

-----------------------------------------------------------------------


More information about the rt-commit mailing list