public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: srinuvasan.a@siemens.com
To: isar-users@googlegroups.com
Cc: Srinuvasan A <srinuvasan.a@siemens.com>
Subject: [PATCH] meta/*,meta-isar/*,scripts/*: make script report all potential errors
Date: Mon, 13 May 2024 12:34:52 +0530	[thread overview]
Message-ID: <20240513070452.137039-1-srinuvasan.a@siemens.com> (raw)

From: Srinuvasan A <srinuvasan.a@siemens.com>

Let us try and make sure that all bits we have are executed as expected.

Signed-off-by: Srinuvasan A <srinuvasan.a@siemens.com>
---
 .../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


             reply	other threads:[~2024-05-13  7:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-13  7:04 srinuvasan.a [this message]
2024-05-21  7:17 ` Srinuvasan Arjunan
2024-05-21  9:45 ` Jan Kiszka
2024-05-21 10:41 ` Anton Mikanovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240513070452.137039-1-srinuvasan.a@siemens.com \
    --to=srinuvasan.a@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox