From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EBBFA13825A for ; Thu, 12 May 2016 22:10:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EF6C4E07E1; Thu, 12 May 2016 22:10:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9748AE07E1 for ; Thu, 12 May 2016 22:10:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6BAF1340AB5 for ; Thu, 12 May 2016 22:10:00 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2DCDD33F for ; Thu, 12 May 2016 22:09:58 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1463090926.9266e8e8d5709b9046e085baf3521a9e7a744d5b.vapier@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/install-qa-check.d/ X-VCS-Repository: proj/portage X-VCS-Files: bin/install-qa-check.d/10executable-issues X-VCS-Directories: bin/install-qa-check.d/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 9266e8e8d5709b9046e085baf3521a9e7a744d5b X-VCS-Branch: master Date: Thu, 12 May 2016 22:09:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b243b165-4593-4777-aaa8-73976c0089d9 X-Archives-Hash: baad36f8007839e791f956a509a2a0e5 commit: 9266e8e8d5709b9046e085baf3521a9e7a744d5b Author: Mike Frysinger gentoo org> AuthorDate: Thu May 12 22:08:46 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Thu May 12 22:08:46 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=9266e8e8 qa-checks: executable-issues: improve logic & output Use more robust shell styles for parsing strings/output, and change the QA log output to include the actual failing rpaths. This helps in debugging/tracking down problems. X-Gentoo-Bug: 582524 X-Gentoo-Bug-URL: https://bugs.gentoo.org/582524 bin/install-qa-check.d/10executable-issues | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/install-qa-check.d/10executable-issues b/bin/install-qa-check.d/10executable-issues index 066f150..b52cc93 100644 --- a/bin/install-qa-check.d/10executable-issues +++ b/bin/install-qa-check.d/10executable-issues @@ -22,26 +22,26 @@ elf_check() { # that directory won't exist on the target system. # 3) Null paths are banned because the loader will search $PWD when # it finds null paths. - local forbidden_dirs="${PORTAGE_BUILDDIR}" - if [[ -n "${ROOT}" && "${ROOT}" != "/" ]]; then - forbidden_dirs+=" ${ROOT}" + local forbidden_dirs=( "${PORTAGE_BUILDDIR}" ) + if [[ "${ROOT:-/}" != "/" ]]; then + forbidden_dirs+=( "${ROOT}" ) fi local dir l rpath_files=$(scanelf -F '%F:%r' -qBR "${ED}") f="" - for dir in ${forbidden_dirs}; do - for l in $(echo "${rpath_files}" | grep -E ":${dir}|::|: "); do - f+=" ${l%%:*}\n" + for dir in "${forbidden_dirs[@]}"; do + while read l; do + f+=" ${l/:/\n RPATH: }\n" if ! has stricter ${FEATURES}; then __vecho "Auto fixing rpaths for ${l%%:*}" TMPDIR="${dir}" scanelf -BXr "${l%%:*}" -o /dev/null fi - done + done < <(echo "${rpath_files}" | grep -F -e ":${dir}" -e "::" -e ": ") done # Reject set*id binaries with $ORIGIN in RPATH #260331 x=$( - find "${ED}" -type f \( -perm -u+s -o -perm -g+s \) -print0 | \ - xargs -0 scanelf -qyRF '%r %p' | grep '$ORIGIN' + find "${ED}" -type f '(' -perm -u+s -o -perm -g+s ')' \ + -exec scanelf -qyRF '%r %p' {} + | grep '$ORIGIN' ) # Print QA notice.