From owner-svn-ports-all@freebsd.org Thu Nov 5 16:42:40 2020 Return-Path: Delivered-To: svn-ports-all@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 E3E2446BDC6; Thu, 5 Nov 2020 16:42:40 +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 4CRq7h65PLz4sfl; Thu, 5 Nov 2020 16:42:40 +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 C3D9F16B61; Thu, 5 Nov 2020 16:42:40 +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 0A5Gge89097617; Thu, 5 Nov 2020 16:42:40 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5Ggaga097596; Thu, 5 Nov 2020 16:42:36 GMT (envelope-from mat@FreeBSD.org) Message-Id: <202011051642.0A5Ggaga097596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Thu, 5 Nov 2020 16:42:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r554139 - head/Mk/Scripts X-SVN-Group: ports-head X-SVN-Commit-Author: mat X-SVN-Commit-Paths: head/Mk/Scripts X-SVN-Commit-Revision: 554139 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 16:42:40 -0000 Author: mat Date: Thu Nov 5 16:42:35 2020 New Revision: 554139 URL: https://svnweb.freebsd.org/changeset/ports/554139 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. 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 Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/check-desktop-entries.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/check-stagedir.sh ============================================================================== --- head/Mk/Scripts/check-stagedir.sh Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/check-stagedir.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -12,6 +12,7 @@ # c. Files in plist which are owned by dependencies/MTREEs set -e +set pipefail . ${SCRIPTSDIR}/functions.sh Modified: head/Mk/Scripts/check-vulnerable.sh ============================================================================== --- head/Mk/Scripts/check-vulnerable.sh Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/check-vulnerable.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/check_leftovers.sh ============================================================================== --- head/Mk/Scripts/check_leftovers.sh Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/check_leftovers.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -23,6 +23,8 @@ # The PLIST_SUB feature can be disabled by setting PLIST_SUB_SED= # in environment. +set 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 Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/checksum.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/create-manifest.sh ============================================================================== --- head/Mk/Scripts/create-manifest.sh Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/create-manifest.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/depends-list.sh ============================================================================== --- head/Mk/Scripts/depends-list.sh Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/depends-list.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -3,6 +3,7 @@ # $FreeBSD$ set -e +set pipefail . ${dp_SCRIPTSDIR}/functions.sh Modified: head/Mk/Scripts/desktop-categories.sh ============================================================================== --- head/Mk/Scripts/desktop-categories.sh Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/desktop-categories.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/dialog4ports.sh ============================================================================== --- head/Mk/Scripts/dialog4ports.sh Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/dialog4ports.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -2,6 +2,7 @@ # $FreeBSD$ # Maintainer: portmgr@FreeBSD.org set -e +set 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 Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/do-depends.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set pipefail . ${dp_SCRIPTSDIR}/functions.sh Modified: head/Mk/Scripts/do-fetch.sh ============================================================================== --- head/Mk/Scripts/do-fetch.sh Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/do-fetch.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/do-patch.sh ============================================================================== --- head/Mk/Scripts/do-patch.sh Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/do-patch.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/do-users-groups.sh ============================================================================== --- head/Mk/Scripts/do-users-groups.sh Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/do-users-groups.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/find-lib.sh ============================================================================== --- head/Mk/Scripts/find-lib.sh Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/find-lib.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -2,6 +2,8 @@ # MAINTAINER: portmgr@FreeBSD.org # $FreeBSD$ +set 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 Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/generate-symbols.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -9,6 +9,8 @@ # /usr/local/bin/ssh -> /usr/local/lib/debug/usr/local/bin/ssh.debug LIB_DIR_PREFIX="${LOCALBASE}/lib/debug" +set pipefail + msg() { echo "====> $*" } Modified: head/Mk/Scripts/install-desktop-entries.sh ============================================================================== --- head/Mk/Scripts/install-desktop-entries.sh Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/install-desktop-entries.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/makesum.sh ============================================================================== --- head/Mk/Scripts/makesum.sh Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/makesum.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -4,6 +4,7 @@ # MAINTAINER: portmgr@FreeBSD.org set -e +set pipefail . "${dp_SCRIPTSDIR}/functions.sh" Modified: head/Mk/Scripts/plist_sub_sed_sort.sh ============================================================================== --- head/Mk/Scripts/plist_sub_sed_sort.sh Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/plist_sub_sed_sort.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -5,6 +5,8 @@ # # PLIST_SUB_SED helper to sort by longest value first. +set 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 Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/ports_env.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -3,6 +3,8 @@ # MAINTAINER: portmgr@FreeBSD.org # $FreeBSD$ +set pipefail + if [ -z "${SCRIPTSDIR}" ]; then echo "Must set SCRIPTSDIR" >&2 exit 1 Modified: head/Mk/Scripts/qa.sh ============================================================================== --- head/Mk/Scripts/qa.sh Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/qa.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -2,6 +2,8 @@ # MAINTAINER: portmgr@FreeBSD.org # $FreeBSD$ +set 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 Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/rust-compat11-canary.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -2,6 +2,7 @@ # MAINTAINER: rust@FreeBSD.org # $FreeBSD$ set -eu +set pipefail if [ "${OPSYS}" != FreeBSD ] || [ "${OSVERSION}" -lt 1200000 ]; then exit 0 Modified: head/Mk/Scripts/smart_makepatch.sh ============================================================================== --- head/Mk/Scripts/smart_makepatch.sh Thu Nov 5 16:18:48 2020 (r554138) +++ head/Mk/Scripts/smart_makepatch.sh Thu Nov 5 16:42:35 2020 (r554139) @@ -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 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