From owner-svn-ports-head@freebsd.org Wed Nov 11 13:29:57 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 627AE2E9F54; Wed, 11 Nov 2020 13:29:57 +0000 (UTC) (envelope-from mat@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CWQZY2PnPz4mRJ; Wed, 11 Nov 2020 13:29:57 +0000 (UTC) (envelope-from mat@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45844152DF; Wed, 11 Nov 2020 13:29:57 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0ABDTvCu035795; Wed, 11 Nov 2020 13:29:57 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0ABDTqUD035770; Wed, 11 Nov 2020 13:29:52 GMT (envelope-from mat@FreeBSD.org) Message-Id: <202011111329.0ABDTqUD035770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Wed, 11 Nov 2020 13:29:52 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r554893 - head/Mk/Scripts X-SVN-Group: ports-head X-SVN-Commit-Author: mat X-SVN-Commit-Paths: head/Mk/Scripts X-SVN-Commit-Revision: 554893 X-SVN-Commit-Repository: ports 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.34 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: Wed, 11 Nov 2020 13:29:57 -0000 Author: mat Date: Wed Nov 11 13:29:52 2020 New Revision: 554893 URL: https://svnweb.freebsd.org/changeset/ports/554893 Log: Add set pipefail in most framework scripts. set pipefail changes the pipeline return status from being the return status of the last command to the last non 0 exit status of any command in the pipeline. This is needed to make sure all the commands in a pipeline did actually return a non 0 status and not only the last one. PR: 250723 Exp-run by: antoine Reviewed by: bapt Approved by: bapt Differential Revision: https://reviews.freebsd.org/D27007 Modified: head/Mk/Scripts/check-desktop-entries.sh (contents, props changed) head/Mk/Scripts/check-stagedir.sh (contents, props changed) head/Mk/Scripts/check-vulnerable.sh (contents, props changed) head/Mk/Scripts/check_leftovers.sh (contents, props changed) head/Mk/Scripts/checksum.sh (contents, props changed) head/Mk/Scripts/create-manifest.sh (contents, props changed) head/Mk/Scripts/depends-list.sh (contents, props changed) head/Mk/Scripts/desktop-categories.sh (contents, props changed) head/Mk/Scripts/dialog4ports.sh (contents, props changed) head/Mk/Scripts/do-depends.sh (contents, props changed) head/Mk/Scripts/do-fetch.sh (contents, props changed) head/Mk/Scripts/do-patch.sh (contents, props changed) head/Mk/Scripts/do-users-groups.sh (contents, props changed) head/Mk/Scripts/find-lib.sh (contents, props changed) head/Mk/Scripts/generate-symbols.sh (contents, props changed) head/Mk/Scripts/install-desktop-entries.sh (contents, props changed) head/Mk/Scripts/makesum.sh (contents, props changed) head/Mk/Scripts/plist_sub_sed_sort.sh (contents, props changed) head/Mk/Scripts/ports_env.sh (contents, props changed) head/Mk/Scripts/qa.sh (contents, props changed) head/Mk/Scripts/rust-compat11-canary.sh (contents, props changed) head/Mk/Scripts/smart_makepatch.sh (contents, props changed) Modified: head/Mk/Scripts/check-desktop-entries.sh ============================================================================== --- head/Mk/Scripts/check-desktop-entries.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/check-desktop-entries.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set -o pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/check-stagedir.sh ============================================================================== --- head/Mk/Scripts/check-stagedir.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/check-stagedir.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -12,6 +12,7 @@ # c. Files in plist which are owned by dependencies/MTREEs set -e +set -o pipefail . ${SCRIPTSDIR}/functions.sh Modified: head/Mk/Scripts/check-vulnerable.sh ============================================================================== --- head/Mk/Scripts/check-vulnerable.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/check-vulnerable.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set -o pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/check_leftovers.sh ============================================================================== --- head/Mk/Scripts/check_leftovers.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/check_leftovers.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -23,6 +23,8 @@ # The PLIST_SUB feature can be disabled by setting PLIST_SUB_SED= # in environment. +set -o pipefail + [ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_CHECK_LEFTOVERS}" ] && set -x origin="$1" Modified: head/Mk/Scripts/checksum.sh ============================================================================== --- head/Mk/Scripts/checksum.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/checksum.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set -o pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/create-manifest.sh ============================================================================== --- head/Mk/Scripts/create-manifest.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/create-manifest.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set -o pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/depends-list.sh ============================================================================== --- head/Mk/Scripts/depends-list.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/depends-list.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -3,6 +3,7 @@ # $FreeBSD$ set -e +set -o pipefail . ${dp_SCRIPTSDIR}/functions.sh Modified: head/Mk/Scripts/desktop-categories.sh ============================================================================== --- head/Mk/Scripts/desktop-categories.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/desktop-categories.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set -o pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/dialog4ports.sh ============================================================================== --- head/Mk/Scripts/dialog4ports.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/dialog4ports.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -2,6 +2,7 @@ # $FreeBSD$ # Maintainer: portmgr@FreeBSD.org set -e +set -o pipefail [ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DIALOG4PORTS}" ] && set -x Modified: head/Mk/Scripts/do-depends.sh ============================================================================== --- head/Mk/Scripts/do-depends.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/do-depends.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set -o pipefail . ${dp_SCRIPTSDIR}/functions.sh Modified: head/Mk/Scripts/do-fetch.sh ============================================================================== --- head/Mk/Scripts/do-fetch.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/do-fetch.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set -o pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/do-patch.sh ============================================================================== --- head/Mk/Scripts/do-patch.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/do-patch.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set -o pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/do-users-groups.sh ============================================================================== --- head/Mk/Scripts/do-users-groups.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/do-users-groups.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set -o pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/find-lib.sh ============================================================================== --- head/Mk/Scripts/find-lib.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/find-lib.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -2,6 +2,8 @@ # MAINTAINER: portmgr@FreeBSD.org # $FreeBSD$ +set -o pipefail + [ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_FIND_LIB}" ] && set -x if [ -z "${LIB_DIRS}" -o -z "${LOCALBASE}" ]; then Modified: head/Mk/Scripts/generate-symbols.sh ============================================================================== --- head/Mk/Scripts/generate-symbols.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/generate-symbols.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -9,6 +9,8 @@ # /usr/local/bin/ssh -> /usr/local/lib/debug/usr/local/bin/ssh.debug LIB_DIR_PREFIX="${LOCALBASE}/lib/debug" +set -o pipefail + msg() { echo "====> $*" } Modified: head/Mk/Scripts/install-desktop-entries.sh ============================================================================== --- head/Mk/Scripts/install-desktop-entries.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/install-desktop-entries.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set -o pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/makesum.sh ============================================================================== --- head/Mk/Scripts/makesum.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/makesum.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set -o pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/plist_sub_sed_sort.sh ============================================================================== --- head/Mk/Scripts/plist_sub_sed_sort.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/plist_sub_sed_sort.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -5,6 +5,8 @@ # # PLIST_SUB_SED helper to sort by longest value first. +set -o pipefail + awk '{ while (match($0, /s![^!]*![^!]*!g;/)) { sedp=substr($0, RSTART, RLENGTH) Modified: head/Mk/Scripts/ports_env.sh ============================================================================== --- head/Mk/Scripts/ports_env.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/ports_env.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -3,6 +3,8 @@ # MAINTAINER: portmgr@FreeBSD.org # $FreeBSD$ +set -o pipefail + if [ -z "${SCRIPTSDIR}" ]; then echo "Must set SCRIPTSDIR" >&2 exit 1 Modified: head/Mk/Scripts/qa.sh ============================================================================== --- head/Mk/Scripts/qa.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/qa.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -2,6 +2,8 @@ # MAINTAINER: portmgr@FreeBSD.org # $FreeBSD$ +set -o pipefail + if [ -z "${STAGEDIR}" -o -z "${PREFIX}" -o -z "${LOCALBASE}" ]; then echo "STAGEDIR, PREFIX, LOCALBASE required in environment." >&2 exit 1 Modified: head/Mk/Scripts/rust-compat11-canary.sh ============================================================================== --- head/Mk/Scripts/rust-compat11-canary.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/rust-compat11-canary.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -2,6 +2,7 @@ # MAINTAINER: rust@FreeBSD.org # $FreeBSD$ set -eu +set -o pipefail if [ "${OPSYS}" != FreeBSD ] || [ "${OSVERSION}" -lt 1200000 ]; then exit 0 Modified: head/Mk/Scripts/smart_makepatch.sh ============================================================================== --- head/Mk/Scripts/smart_makepatch.sh Wed Nov 11 13:24:31 2020 (r554892) +++ head/Mk/Scripts/smart_makepatch.sh Wed Nov 11 13:29:52 2020 (r554893) @@ -25,6 +25,8 @@ # if those targets modify source files (e.g. with sed). You may also # want to disable EXTRA_PATCHES as well if that is being used. +set -o pipefail + [ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_SMART_MAKEPATCH}" ] && set -x if [ -z "${PATCHDIR}" -o -z "${PATCH_WRKSRC}" -o -z "${WRKDIR}" ]; then