Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Nov 2020 16:42:36 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r554139 - head/Mk/Scripts
Message-ID:  <202011051642.0A5Ggaga097596@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011051642.0A5Ggaga097596>