From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7368376248872992768 X-Received: by 2002:a2e:9791:0:b0:2df:98c3:95dd with SMTP id 38308e7fff4ca-2e52005da3cmr53899871fa.22.1715583784138; 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-Google-Smtp-Source: AGHT+IH3X5oUL/JqwDDJboiDECK1bjS6WuG4vC88uyy4Vxw0NKkgJiEivzjS0Q4UPE7iX2aUYbto 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 Return-Path: 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; 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 Received: by mta-65-228.siemens.flowmailer.net with ESMTPSA id 20240513070300991d0a4e7f9383c78d for ; Mon, 13 May 2024 09:03:01 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=srinuvasan.a@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc; bh=NKxlpYqOdbOxHwJB7kBRnUVTfkb1yp3AgbjSz3AmB3w=; b=F4V/u9nweD85kYqjUsgsCRLI3OQczU0rIuPFFwksLTV+UolKPAHwJfiKAqG4lGyPUd++hZ I0hJjlnVlE4Bhk8cnD4fVX8Zc3O851nbLr4sDyyzuenIWsqNiF5XzcclI5e1h3Tfo/T/IIVR bzUNPIDu1HJNXaXvQoDhedHvWqhV8=; From: srinuvasan.a@siemens.com 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 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1324425:519-21489:flowmailer X-TUID: tbV2n2yPzSDC 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 -- 2.34.1