From owner-svn-ports-head@freebsd.org Mon Oct 19 16:59:50 2015 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7488EA181A0; Mon, 19 Oct 2015 16:59:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CE31EB0; Mon, 19 Oct 2015 16:59:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9JGxngB062158; Mon, 19 Oct 2015 16:59:49 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JGxnQq062157; Mon, 19 Oct 2015 16:59:49 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510191659.t9JGxnQq062157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 19 Oct 2015 16:59:49 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r399699 - head/Mk/Scripts X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2015 16:59:50 -0000 Author: bdrewery Date: Mon Oct 19 16:59:49 2015 New Revision: 399699 URL: https://svnweb.freebsd.org/changeset/ports/399699 Log: Switch strip test to using readelf(1) instead of file(1) to identify symbols. This has been slightly faster in my tests since readelf(1) will fail on the file much quicker if it doesn't find the ELF headers. This also more directly finds the symbol table. With hat: portmgr Modified: head/Mk/Scripts/qa.sh Modified: head/Mk/Scripts/qa.sh ============================================================================== --- head/Mk/Scripts/qa.sh Mon Oct 19 16:45:51 2015 (r399698) +++ head/Mk/Scripts/qa.sh Mon Oct 19 16:59:49 2015 (r399699) @@ -173,15 +173,13 @@ stripped() { [ -n "${STRIP}" ] || return 0 # Split file and result into 2 lines and read separately to ensure # files with spaces are kept intact. - find ${STAGEDIR} -type f \ - -exec /usr/bin/file --exclude ascii -nNF "${LF}" {} + | + # Using readelf -h ... /ELF Header:/ will match on all ELF files. + find ${STAGEDIR} -type f ! -name '*.a' \ + -exec readelf -S {} + 2>/dev/null | awk '\ + /File:/ {sub(/File: /, "", $0); file=$0} \ + /SYMTAB/ {print file}' | while read f; do - read output - case "${output}" in - *ELF\ *\ executable,\ *FreeBSD*,\ not\ stripped*|*ELF\ *\ shared\ object,\ *FreeBSD*,\ not\ stripped*) - warn "'${f#${STAGEDIR}${PREFIX}/}' is not stripped consider trying INSTALL_TARGET=install-strip or using \${STRIP_CMD}" - ;; - esac + warn "'${f#${STAGEDIR}${PREFIX}/}' is not stripped consider trying INSTALL_TARGET=install-strip or using \${STRIP_CMD}" done }