poky/meta/files
Moritz Haase 7c77eacfa7 meta: Enable '-o pipefail' for the SDK installer
When testing a Yocto SDK installer on Alpine 3.21, we recently ended up with a
broken SDK. One of the commands the relocation script calls in a piped
multi-command chain failed (see [0]), but the installer did not realize that -
since it doesn't use 'set -o pipefail'. Thus, the error was never reported to
the user and the installer claimed to have set up the SDK correctly - which
wasn't the case.

Given that the SDK installer is a POSIX-compliant shell script and that the
'pipefail' option used to be missing from the standard, it's not surprising that
it isn't used. Thankfully however, in June of 2024, a new version of POSIX
(POSIX.1-2024) was released - and that one finally includes the 'pipefail'
option (see [1]). A number of shells already support it, so let's enable it if
available to make the SDK installer more robust.

The change has been tested locally using SDK installers for internal projects,
based on both Kirkstone and Scarthgap.

[0]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/16797
[1]: https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/utilities/V3_chap02.html#set

(From OE-Core rev: 1cb4b41c7faf77fcc347b1276d86d4288968c926)

(From OE-Core rev: 1de469f1ffb1680e3a75da2c3895fb1e4f43859f)

Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 10dce263f0)
Signed-off-by: Akash Hadke <akash.hadke27@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-03-04 08:46:02 -08:00
..
common-licenses common-licenses: Backport missing license 2024-04-05 07:23:59 -07:00
ptest-perl ptest-perl/run-ptest: address failures caused by perl 5.32.1 2021-03-02 14:15:33 +00:00
device_table-minimal.txt files/device_table-minimal.txt: cleanup 2014-04-25 17:19:20 +01:00
ext-sdk-prepare.py populate_sdk_ext: Add support for PR service 2021-03-31 00:06:23 +01:00
fs-perms-persistent-log.txt fs-perms: Ensure /usr/src/debug/ file modes are correct 2020-11-24 10:27:45 +00:00
fs-perms.txt fs-perms: Ensure /usr/src/debug/ file modes are correct 2020-11-24 10:27:45 +00:00
overlayfs-all-overlays.service.in overlayfs: move templates to files directory 2021-12-12 11:27:24 +00:00
overlayfs-create-dirs.service.in files: overlayfs-create-dirs: split ExecStart into two commands 2022-02-25 12:41:24 +00:00
overlayfs-etc-preinit.sh.in overlayfs-etc: add option to skip creation of mount dirs 2024-11-02 06:32:36 -07:00
overlayfs-unit.mount.in overlayfs: move templates to files directory 2021-12-12 11:27:24 +00:00
spdx-licenses.json spdx-licenses.json: Use 3.14 tagged version 2021-09-28 17:55:04 +01:00
toolchain-shar-extract.sh meta: Enable '-o pipefail' for the SDK installer 2025-03-04 08:46:02 -08:00
toolchain-shar-relocate.sh sdk: fix search for dynamic loader 2022-02-12 17:05:35 +00:00