From nobody Fri Nov 19 21:16:53 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8022F189251E; Fri, 19 Nov 2021 21:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwqH93B5Zz3QpN; Fri, 19 Nov 2021 21:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D0467766; Fri, 19 Nov 2021 21:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AJLGr8B070475; Fri, 19 Nov 2021 21:16:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJLGr95070474; Fri, 19 Nov 2021 21:16:53 GMT (envelope-from git) Date: Fri, 19 Nov 2021 21:16:53 GMT Message-Id: <202111192116.1AJLGr95070474@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Joseph Mingrone Subject: git: 6ff48ecff7f5 - main - Mk/Scripts/qa.sh: Turn off pipefail when piping to grep -q List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ff48ecff7f5a179e16ee4aaf6e7affac69bb93e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/ports/commit/?id=6ff48ecff7f5a179e16ee4aaf6e7affac69bb93e commit 6ff48ecff7f5a179e16ee4aaf6e7affac69bb93e Author: Joseph Mingrone AuthorDate: 2021-07-17 15:55:13 +0000 Commit: Joseph Mingrone CommitDate: 2021-11-19 21:13:26 +0000 Mk/Scripts/qa.sh: Turn off pipefail when piping to grep -q The pipeline readelf -d "${dep_file}" | grep -q SONAME can fail because grep -q closes the output early resulting sigpipe being sent to readelf. Other possible solutions are to turn off pipefail for the file or remove the -q grep argument. Credit to ashish@ for the detective work to discover the root cause of this. Differential Revision: https://reviews.freebsd.org/D31211 Reviewed by: emaste Approved by: bapt (portmgr) mat (portmgr) --- Mk/Scripts/qa.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh index 13548ddb38c7..9caf01581b47 100644 --- a/Mk/Scripts/qa.sh +++ b/Mk/Scripts/qa.sh @@ -663,9 +663,13 @@ proxydeps() { # Check that the .so we need has a SONAME if [ "${dep_file_pkg}" != "${PKGORIGIN}" ]; then + # When grep -q finds a match it will close the pipe immediately. + # This may cause the test to fail when pipefail is turned on. + set +o pipefail if ! readelf -d "${dep_file}" | grep -q SONAME; then err "${file} is linked to ${dep_file} which does not have a SONAME. ${dep_file_pkg} needs to be fixed." fi + set -o pipefail fi # If we don't already depend on it, and we don't provide it