diff options
author | rillig <rillig> | 2006-11-02 02:44:17 +0000 |
---|---|---|
committer | rillig <rillig> | 2006-11-02 02:44:17 +0000 |
commit | 23af6fe3e2b6fc586c2631fbcd416a4c8196e769 (patch) | |
tree | a4cfa8dd9161939c0eead64f3dc1a335abd91efd /mk | |
parent | 00202c6d0d937996bd798d33dd3117096fb7a2c6 (diff) | |
download | pkgsrc-23af6fe3e2b6fc586c2631fbcd416a4c8196e769.tar.gz |
Adjusted the check-perms target to the recent update of
sysutils/checkperms.
Regular files are now checked if they needlessly have the executable bit
set.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/check/check-perms.mk | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/mk/check/check-perms.mk b/mk/check/check-perms.mk index 91337a1ff7c..941139464bf 100644 --- a/mk/check/check-perms.mk +++ b/mk/check/check-perms.mk @@ -1,4 +1,4 @@ -# $NetBSD: check-perms.mk,v 1.2 2006/10/21 11:13:10 rillig Exp $ +# $NetBSD: check-perms.mk,v 1.3 2006/11/02 02:44:17 rillig Exp $ # # This file checks that after installation of a package, all files and # directories of that package have sensible permissions set. @@ -22,6 +22,8 @@ CHECK_PERMS?= yes CHECK_PERMS?= no .endif +CHECK_PERMS_SKIP?= # none + #.if !empty(CHECK_PERMS:M[Yy][Ee][Ss]) #_POST_INSTALL_CHECKS+= check-perms #.endif @@ -39,27 +41,25 @@ _CHECK_PERMS_GETDIRS_AWK= \ } \ } -CHECK_PERMS_SKIP?= # none -_CHECK_PERMS_SKIP_FILTER= case "$$file" in -_CHECK_PERMS_SKIP_FILTER+= ${CHECK_PERMS_SKIP:@.pattern.@${PREFIX}/${.pattern.}|${.pattern.}) continue ;;@} -_CHECK_PERMS_SKIP_FILTER+= *) ;; -_CHECK_PERMS_SKIP_FILTER+= esac - .PHONY: check-perms check-perms: @${STEP_MSG} "Checking file permissions in ${PKGNAME}" ${_PKG_SILENT}${_PKG_DEBUG} set -eu; \ - if [ ! -x ${_CHECK_PERMS_CMD:Q}"" ]; then \ + ${PKG_INFO} -qe "checkperms>=1.1" \ + || { \ ${WARNING_MSG} "[check-perms.mk] Skipping file permissions check."; \ ${WARNING_MSG} "[check-perms.mk] Install sysutils/checkperms to enable this check."; \ exit 0; \ - fi; \ + }; \ ${PKG_FILELIST_CMD} \ | sort \ | sed -e 's,\\,\\\\,g' \ | while read file; do \ - ${_CHECK_PERMS_SKIP_FILTER}; \ + case "$$file" in \ + ${CHECK_PERMS_SKIP:@p@${PREFIX}/${p}|${p}) continue ;;@}\ + *) ;; \ + esac; \ printf "%s\\n" "$$file"; \ done \ | awk ${_CHECK_PERMS_GETDIRS_AWK:Q} \ - | ${_CHECK_PERMS_CMD} + | ${_CHECK_PERMS_CMD} -c |