Message ID | 20241103143751.756123-1-romain.naour@smile.fr |
---|---|
State | Accepted |
Headers | show |
Series | board/mender/x86_64/post-image-efi.sh: use bash for genimage.sh | expand |
On 03/11/2024 15:37, Romain Naour via buildroot wrote: > mender_x86_64_efi_defconfig started failing to build since 2024.08 in > our Gitlab-ci since the board/mender/x86_64/post-image-efi.sh is > calling support/scripts/genimage.sh with the host default shell. > > There is no problem if the default shell is bash but our docker > image uses dash as default shell. Since support/scripts/genimage.sh > is actually a bash script it's not going to work if bashisms are used: > > support/scripts/genimage.sh: 57: Syntax error: redirection unexpected > > Indeed bashisms have been added recently in > support/scripts/genimage.sh by the commit introducing bmap image > support [1]. > > Remove "sh" before support/scripts/genimage.sh and rely on > "/usr/bin/env bash" to find the bash interpreter. > > Fixes: > https://gitlab.com/buildroot.org/buildroot/-/jobs/8233226891 > > [1] 6889056f1eb4293de67c28b1ff6ee34be05d2ee4 > > Signed-off-by: Romain Naour <romain.naour@smile.fr> Applied to master. Thanks! > --- > I checked if "sh support/scripts/genimage.sh" is used somewhere else. > --- > board/mender/x86_64/post-image-efi.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/board/mender/x86_64/post-image-efi.sh > b/board/mender/x86_64/post-image-efi.sh > index 073b18c972..ab12386076 100755 > --- a/board/mender/x86_64/post-image-efi.sh > +++ b/board/mender/x86_64/post-image-efi.sh > @@ -54,7 +54,7 @@ generate_mender_image() { > } > > generate_image() { > - sh support/scripts/genimage.sh -c "${BOARD_DIR}/genimage-efi.cfg" > + support/scripts/genimage.sh -c "${BOARD_DIR}/genimage-efi.cfg" > } > > # Main function. > -- > 2.45.0 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot
diff --git a/board/mender/x86_64/post-image-efi.sh b/board/mender/x86_64/post-image-efi.sh index 073b18c972..ab12386076 100755 --- a/board/mender/x86_64/post-image-efi.sh +++ b/board/mender/x86_64/post-image-efi.sh @@ -54,7 +54,7 @@ generate_mender_image() { } generate_image() { - sh support/scripts/genimage.sh -c "${BOARD_DIR}/genimage-efi.cfg" + support/scripts/genimage.sh -c "${BOARD_DIR}/genimage-efi.cfg" } # Main function.
mender_x86_64_efi_defconfig started failing to build since 2024.08 in our Gitlab-ci since the board/mender/x86_64/post-image-efi.sh is calling support/scripts/genimage.sh with the host default shell. There is no problem if the default shell is bash but our docker image uses dash as default shell. Since support/scripts/genimage.sh is actually a bash script it's not going to work if bashisms are used: support/scripts/genimage.sh: 57: Syntax error: redirection unexpected Indeed bashisms have been added recently in support/scripts/genimage.sh by the commit introducing bmap image support [1]. Remove "sh" before support/scripts/genimage.sh and rely on "/usr/bin/env bash" to find the bash interpreter. Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/8233226891 [1] 6889056f1eb4293de67c28b1ff6ee34be05d2ee4 Signed-off-by: Romain Naour <romain.naour@smile.fr> --- I checked if "sh support/scripts/genimage.sh" is used somewhere else. --- board/mender/x86_64/post-image-efi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)