kbuild: deb-pkg: Remove blank first line from maint scripts
authorAaron Thompson <dev@aaront.org>
Fri, 4 Oct 2024 07:52:45 +0000 (07:52 +0000)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 6 Oct 2024 17:36:38 +0000 (02:36 +0900)
The blank line causes execve() to fail:

  # strace ./postinst
  execve("./postinst", ...) = -1 ENOEXEC (Exec format error)
  strace: exec: Exec format error
  +++ exited with 1 +++

However running the scripts via shell does work (at least with bash)
because the shell attempts to execute the file as a shell script when
execve() fails.

Fixes: b611daae5efc ("kbuild: deb-pkg: split image and debug objects staging out into functions")
Signed-off-by: Aaron Thompson <dev@aaront.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/package/builddeb

index c1757db6aa8a8030f07c53ebf22b4b43fe4d3c80..404587fc71fe1474d5a4e3879fcab38bfd04d478 100755 (executable)
@@ -74,7 +74,6 @@ install_linux_image () {
 
                mkdir -p "${pdir}/DEBIAN"
                cat <<-EOF > "${pdir}/DEBIAN/${script}"
-
                #!/bin/sh
 
                set -e