svn commit: r438168 - head/Mk/Scripts
Dmitry Marakasov
amdmi3 at FreeBSD.org
Mon Apr 10 14:19:27 UTC 2017
Author: amdmi3
Date: Mon Apr 10 14:19:25 2017
New Revision: 438168
URL: https://svnweb.freebsd.org/changeset/ports/438168
Log:
Don't limit Q/A check for bad shebangs with just bin, sbin, libexec
and www. Scripts (with possibly incorrect shebangs) may be located
anywhere in ${PREFIX}, including, for instance, lib/ (multimedia/lives):
Error: '/usr/bin/perl' is an invalid shebang you need USES=shebangfix for 'lib/lives/plugins/effects/rendered/colour_replace'
and ${DATADIR}/ (databases/cego):
Error: '/bin/bash' is an invalid shebang you need USES=shebangfix for 'share/cego/cgbackup'
There may be some more false positives, but broken scripts are much
more severe problem. There's also whitelist mechanism which lets
you ignore shebangs for certain kinds of files (like .pm) which may
be extended to fix FPs
Approved by: portmgr (swills)
Differential Revision: D8923
Modified:
head/Mk/Scripts/qa.sh
Modified: head/Mk/Scripts/qa.sh
==============================================================================
--- head/Mk/Scripts/qa.sh Mon Apr 10 13:48:12 2017 (r438167)
+++ head/Mk/Scripts/qa.sh Mon Apr 10 14:19:25 2017 (r438168)
@@ -83,8 +83,7 @@ shebang() {
shebangonefile "${f}" || rc=1
# Use heredoc to avoid losing rc from find|while subshell
done <<-EOF
- $(find ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/sbin \
- ${STAGEDIR}${PREFIX}/libexec ${STAGEDIR}${PREFIX}/www \
+ $(find ${STAGEDIR}${PREFIX} \
-type f -perm +111 2>/dev/null)
EOF
@@ -104,8 +103,7 @@ shebang() {
fi
# Use heredoc to avoid losing rc from find|while subshell
done <<-EOF
- $(find ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/sbin \
- ${STAGEDIR}${PREFIX}/libexec ${STAGEDIR}${PREFIX}/www \
+ $(find ${STAGEDIR}${PREFIX} \
-type l -exec stat -f "%N${LF}%Y" {} + 2>/dev/null)
EOF
More information about the svn-ports-head
mailing list