From patchwork Mon May 13 07:04:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "srinuvasan.a" X-Patchwork-Id: 3549 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Mon, 13 May 2024 09:03:17 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f190.google.com (mail-lj1-f190.google.com [209.85.208.190]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 44D73AJx024998 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 13 May 2024 09:03:10 +0200 Received: by mail-lj1-f190.google.com with SMTP id 38308e7fff4ca-2e4e02ca1cesf712641fa.2 for ; Mon, 13 May 2024 00:03:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715583784; cv=pass; d=google.com; s=arc-20160816; b=vPDWmDBr96ufjaqwTg+eYz9ucRWlrACk6nUCJB7OGHJUGmBFLV2lQDKdzfn9qsH/9O xTPBsh9iC5XjVRTxnhh0CnfaiqcVBX8c4zE9RPq4OUUB6QEWGQNwINUowLwOJNrb8vf1 zujMjSCq+DEjBeG7dFyXrI9VJqUJI33MKKJCz0OmPVW9cZm7OEfUZ5Gf5L/MjYlx5lYT pewNFdb2LxHrbUPyQpaWctuKj218jVblxtXeqb7zLhdXnh4unJsb4JI569P7+UDIioYM Pgu4DJQfLCIgwtjmUSBKsd/8Hq0yZbCiyxO88uRLchXtCb17/IyFzWWdYjQW5V9rdCt6 BkSA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Kd0jL8ie1oX4/vahz+7sgeDjBaHoDd7AOthIpUuEXf0=; fh=yBYnlbKsnbfaq8XHUx1s1PJgq8pMpuQzSgO37tW+bJQ=; b=KePy2H0CNnSVEm/y0/aY3rXBzJVTa5QmwxEtanHytXAwiFGNOiKNWKnM98UqbJyTc6 qiLE4KTzpOgK2IIdP7YZMJzs3ws7He4M3ZvOx4WjvBdWeDIkYWYvy+/ll3qxDzqekB+4 8thnvoc04gI7TSRfr+5BA9zj5zExJudmrE1tQUf1BIdX/JhTP+a4JmSr4Dr1sutSOtYX 2bJLnvJM1k4Ojt9YogBbGDdaTWL/CI88gxgC54x0SJDHxNOFuRBBpbNfP2faKSFqqKz8 4BL2XatLKd0oZAM13VJ3GwOaGIBC8slVz3C6NQRqL7FLXPY818CsEwhokCMj/AsKUm/u ct2Q==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="F4V/u9nw"; spf=pass (google.com: domain of fm-1324425-20240513070300991d0a4e7f9383c78d-crc9wi@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) smtp.mailfrom=fm-1324425-20240513070300991d0a4e7f9383c78d-crC9Wi@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1715583784; x=1716188584; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=Kd0jL8ie1oX4/vahz+7sgeDjBaHoDd7AOthIpUuEXf0=; b=rJ7lHpGTUfqy+VJkFEnk+YECIFF9Y0hNEkW+hgwoiXdoZNWWNIQ+f8RBdKtDBFNvPf xLlqybJ6KCpyP8oKn9FNThAyfvRcbx/xZrE5pyDqok/5vCA8bO0QnOY4VcAY4msmrNyA DMc3AYqNNwLCre78OJ9Vue9b6ZJKVFABMjx+glkOI9H4037C8/2Q7A4WLwsouDcZ4Oje 97EIMAiu913kpBlSMzDAMDLNVtub40YL09AK/B15seB0n6tOZzLcwYCECPxkyRKYCEDH y2Qpi6YjtDFk82FW3i2PTxAo2GhkhQMs2AFFvDJMPcfqe8LhDKmuzHCYl450UWUThX7S JGaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715583784; x=1716188584; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:cc:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Kd0jL8ie1oX4/vahz+7sgeDjBaHoDd7AOthIpUuEXf0=; b=KE+OZusQQxD0FY8UsHh41Na1odXeH4tkTeTgfbPBeBPWj/vL2MQio0qaKdk0OO3qqP 7GOxF0+VpSeIZfM9HPB0V/8WWRnQ6z6rxtNe1lHVn1T0khT/iE2RO5cmzpMd0+bBS7qz juSBhoS+CbnVROijh3vxYz7GUB6pq+OFVlTj5vJMON+1AeIwdoCbPUlbvv4x9FHmVRgX 7LQ+XRwHdUcCh6PdPLXcEdQjzTVtPsQk+AuKBr70Xh6Om8NbcuMqmNGGvRRGI3t95Ooi kFCEEc9Dvayunv0ejnfn2xbH71We6wgj5+HiZ34cmxnZaR/CZAj1JxDSNoGEbwhcmBkb vOHw== X-Forwarded-Encrypted: i=2; AJvYcCUyu3x4DBNY1FPFI/Og4kfc6LeyOcBEesf8GgHSii9JF6W5U7jr+em7x08H4G3SoiJe6W/aozuhbdbxLGExnLaUUFfFQBY= X-Gm-Message-State: AOJu0Yygll+PZRFNLCy4WaSi9VdtqouKlv9hDWFgaVokZeWh3YJPcNQe brnTG9Al9Oy7W9/oEOz+OuM0bbVpJrav0q0jMew/sisxdWrEhu/W X-Google-Smtp-Source: AGHT+IHJeuuIOvWmGFpjaUEu7/qcDfCbMRt8zbrEdnBLS5Zbs6gQp61joZe41NnZj0QkG8+A/W6UYA== X-Received: by 2002:a2e:2e03:0:b0:2de:42d0:faf8 with SMTP id 38308e7fff4ca-2e52082c658mr48979891fa.5.1715583784035; Mon, 13 May 2024 00:03:04 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:3311:0:b0:2e2:bb0f:38c8 with SMTP id 38308e7fff4ca-2e4b6e5651cls378851fa.1.-pod-prod-09-eu; Mon, 13 May 2024 00:03:02 -0700 (PDT) X-Received: by 2002:a05:651c:50f:b0:2df:7ac1:b27 with SMTP id 38308e7fff4ca-2e52006399cmr66758311fa.28.1715583781926; Mon, 13 May 2024 00:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715583781; cv=none; d=google.com; s=arc-20160816; b=z/0lLMaL5/n04ueuu3PZlgfN4yPARaOJp4CoVuY6RqDkss/BWri3pAA0j4KXR+GHhQ p1Z2XeyT7xRDx5gnyO4Hc16lvnYShJSmuf7pK9L1lalU8FrKCX8XJ42CTyAAVZyLJ+tz /iL3Yj7HruX9ZnJUPLNinN1BPUZbTfvnupPRLK7uy8PgJGZwl5d6/DoWcXnDVN7i3R/M XOAomYc3uGtX6u5ly2rGYJqlA5RKPlQNJBxHwotl0HYB33yKCLChTIcM9ulFBPHZGqTY mFoFD2FNu9TZwaCKXhJUSuqpw6RIwAjVLnDLYblVpVIEOX2ZU9YIohvDxzjRZz/11JFI AWJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:message-id:date :subject:cc:to:from:dkim-signature; bh=NKxlpYqOdbOxHwJB7kBRnUVTfkb1yp3AgbjSz3AmB3w=; fh=q34A+PDu/veyKhQmJ8Sf9YPiZusI+h3MND2WD1Gk9tg=; b=P5wD8o/deVTynJbRycTcnOUFZ01PzuTPaV5nhpJidh75cNo5OiFgf6pnscTYJiqkMQ IOwRLdIh2KezSEv9SWbKfNKwm6zk6DTWuiq1K9L02BSbPjQEoFx0a5rg35/6ypJq13HZ zwaswdQfxkOPBvD9JiprL6X5ajtgm1G6YFSJ+aTIeBoos8uQeEcLEeHRuwNhm5lda/ba vU9tQiuvw9osl6QSNOTa+rO7hcJ6ZL5yfOzjX5zHEaantBohBsrkaE6fkpEuxvG7n9L8 yY1VAVKTAF3UCxQz1erb48eGtDyNcURu5DaFK/2Pbvk6qN/zcsP7W3Z+8bXmDJTTSHUE 3CIA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="F4V/u9nw"; spf=pass (google.com: domain of fm-1324425-20240513070300991d0a4e7f9383c78d-crc9wi@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) smtp.mailfrom=fm-1324425-20240513070300991d0a4e7f9383c78d-crC9Wi@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-228.siemens.flowmailer.net (mta-65-228.siemens.flowmailer.net. [185.136.65.228]) by gmr-mx.google.com with ESMTPS id 38308e7fff4ca-2e4d1836a6dsi2424331fa.7.2024.05.13.00.03.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2024 00:03:01 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1324425-20240513070300991d0a4e7f9383c78d-crc9wi@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) client-ip=185.136.65.228; Received: by mta-65-228.siemens.flowmailer.net with ESMTPSA id 20240513070300991d0a4e7f9383c78d for ; Mon, 13 May 2024 09:03:01 +0200 X-Patchwork-Original-From: "srinuvasan.a via isar-users" From: "srinuvasan.a" To: isar-users@googlegroups.com Cc: Srinuvasan A Subject: [PATCH] meta/*,meta-isar/*,scripts/*: make script report all potential errors Date: Mon, 13 May 2024 12:34:52 +0530 Message-Id: <20240513070452.137039-1-srinuvasan.a@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1324425:519-21489:flowmailer X-Original-Sender: srinuvasan.a@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="F4V/u9nw"; spf=pass (google.com: domain of fm-1324425-20240513070300991d0a4e7f9383c78d-crc9wi@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) smtp.mailfrom=fm-1324425-20240513070300991d0a4e7f9383c78d-crC9Wi@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: srinuvasan.a@siemens.com Reply-To: srinuvasan.a@siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Srinuvasan A Let us try and make sure that all bits we have are executed as expected. Signed-off-by: Srinuvasan A --- .../recipes-initramfs/initramfs-example/files/example.hook | 2 ++ .../recipes-initramfs/initramfs-example/files/example.script | 2 ++ meta/recipes-core/isar-bootstrap/files/chroot-setup.sh | 2 ++ .../initramfs-tee-ftpm-hook/files/tee-ftpm.hook | 3 +++ .../initramfs-tee-ftpm-hook/files/tee-ftpm.script | 3 +++ .../initramfs-tee-supplicant-hook/files/tee-supplicant.hook | 3 +++ .../initramfs-tee-supplicant-hook/files/tee-supplicant.script | 3 +++ meta/recipes-support/enable-fsck/files/postinst | 2 ++ .../initramfs-fsck-hook/files/initramfs.fsck.ext4.hook | 3 +++ meta/recipes-support/isar-exclude-docs/files/postinst | 2 ++ scripts/isar-buildenv-internal | 3 +++ scripts/isar-setup-builddir | 2 ++ scripts/vm_smoke_test | 2 ++ 13 files changed, 32 insertions(+) diff --git a/meta-isar/recipes-initramfs/initramfs-example/files/example.hook b/meta-isar/recipes-initramfs/initramfs-example/files/example.hook index 0d84e7a9..ba848c92 100644 --- a/meta-isar/recipes-initramfs/initramfs-example/files/example.hook +++ b/meta-isar/recipes-initramfs/initramfs-example/files/example.hook @@ -3,6 +3,8 @@ # # See "HOOK SCRIPTS" in initramfs-tools(7) for details. +set -e + PREREQ="" prereqs() { diff --git a/meta-isar/recipes-initramfs/initramfs-example/files/example.script b/meta-isar/recipes-initramfs/initramfs-example/files/example.script index 784fad9c..c55e9ea7 100644 --- a/meta-isar/recipes-initramfs/initramfs-example/files/example.script +++ b/meta-isar/recipes-initramfs/initramfs-example/files/example.script @@ -3,6 +3,8 @@ # # See "BOOT SCRIPTS" in initramfs-tools(7) for details. +set -e + PREREQ="" prereqs() { diff --git a/meta/recipes-core/isar-bootstrap/files/chroot-setup.sh b/meta/recipes-core/isar-bootstrap/files/chroot-setup.sh index 41500110..f451f525 100644 --- a/meta/recipes-core/isar-bootstrap/files/chroot-setup.sh +++ b/meta/recipes-core/isar-bootstrap/files/chroot-setup.sh @@ -15,6 +15,8 @@ # # SPDX-License-Identifier: GPL-2.0 +set -e + usage() { cat <<-EOF 1>&2 Script to setup and cleanup chroot environments. diff --git a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.hook b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.hook index b7f78592..e80f00b4 100644 --- a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.hook +++ b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.hook @@ -6,6 +6,9 @@ # # SPDX-License-Identifier: MIT # + +set -e + PREREQ="tee-supplicant" prereqs() { diff --git a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.script b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.script index 053fb046..3355a7e0 100644 --- a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.script +++ b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.script @@ -6,6 +6,9 @@ # # SPDX-License-Identifier: MIT # + +set -e + PREREQ="tee-supplicant" prereqs() { diff --git a/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.hook b/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.hook index 0af277b1..3e6adbed 100644 --- a/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.hook +++ b/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.hook @@ -6,6 +6,9 @@ # # SPDX-License-Identifier: MIT # + +set -e + PREREQ="" prereqs() { diff --git a/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.script b/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.script index fcb84817..ac01d7ec 100644 --- a/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.script +++ b/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.script @@ -6,6 +6,9 @@ # # SPDX-License-Identifier: MIT # + +set -e + PREREQ="" prereqs() { diff --git a/meta/recipes-support/enable-fsck/files/postinst b/meta/recipes-support/enable-fsck/files/postinst index 1c4c3bdb..67c51fc5 100644 --- a/meta/recipes-support/enable-fsck/files/postinst +++ b/meta/recipes-support/enable-fsck/files/postinst @@ -1,3 +1,5 @@ #!/bin/sh +set -e + systemctl enable enable-fsck.service diff --git a/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook b/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook index 1bccc817..259b73b4 100644 --- a/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook +++ b/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook @@ -4,6 +4,9 @@ # SPDX-License-Identifier: MIT #!/bin/sh + +set -e + PREREQ="" prereqs() diff --git a/meta/recipes-support/isar-exclude-docs/files/postinst b/meta/recipes-support/isar-exclude-docs/files/postinst index 78e5d583..21b817d8 100644 --- a/meta/recipes-support/isar-exclude-docs/files/postinst +++ b/meta/recipes-support/isar-exclude-docs/files/postinst @@ -3,5 +3,7 @@ # time and do not need to be "the first" package # what we delete needs to be in sync with the dpkg configuration we ship +set -e + find /usr/share/man/ ! -type d -exec rm -f {} \; find /usr/share/doc/ ! -type d ! -name "copyright" ! -name "changelog.*" -exec rm -f {} \; diff --git a/scripts/isar-buildenv-internal b/scripts/isar-buildenv-internal index 1f609a5e..817387cf 100755 --- a/scripts/isar-buildenv-internal +++ b/scripts/isar-buildenv-internal @@ -20,6 +20,9 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # It is assumed ISARROOT is already defined when this is called + +set -e + if [ -z "$ISARROOT" ]; then echo >&2 "Error: ISARROOT is not defined!" return 1 diff --git a/scripts/isar-setup-builddir b/scripts/isar-setup-builddir index e5939b47..79179a01 100755 --- a/scripts/isar-setup-builddir +++ b/scripts/isar-setup-builddir @@ -19,6 +19,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +set -e + if [ -z "$BUILDDIR" ]; then echo >&2 "Error: The build directory (BUILDDIR) must be set!" exit 1 diff --git a/scripts/vm_smoke_test b/scripts/vm_smoke_test index 5c16d863..f69b05c2 100755 --- a/scripts/vm_smoke_test +++ b/scripts/vm_smoke_test @@ -3,6 +3,8 @@ # This software is a part of ISAR. # Copyright (C) 2015-2018 ilbers GmbH +set -e + VERBOSE="--show=test" TIMEOUT=300