Buildroot fork.
Go to file
Yann E. MORIN 62df914ced package/meson: fix shebang in deep build trees
The meson script includes the full path to the python interpreter. In
deep build trees, this path can be more than 128 characters long, which
is the limit for how long a shebang may be.

Notice that this has been bumped to 256 since kerel 5.1, but the issue still
persists:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6eb3c3d0a52dca337e327ae8868ca1f44a712e02

In older kernels, this limit was silently ignored, leading to potential
bugs, but newer kernels enforce that limit, and refuse to execve() the
script, returning with NOEXEC.  Since the script is +x, the shell (any
bourne shell, as well as the C shell) will conclude from that situation that
they should interpret it as a shell script, which it obviously is not.

Fix the problem by replacing the shebang with a call to /usr/bin/env
which will redirect to the correct python3 interpreter found in the
PATH.

Note however that this means our meson installation can no longer be
called from outside of the meson-package infrastructure anymore (not
that we ever supported it before, but who knows what people may have
done in their br2-external), unless one does set the PATH to include
$(HOST_DIR)/bin/ earlier than a system-provided python3 would be found.

Fixes: #12331 #12461

Reported-by: Jean-pierre Cartal <jpcartal@free.fr>
Reported-by: Matthias Weißer <m.weisser.m@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-02-03 12:08:48 +01:00
arch arch/arc: explicitly set "max-page-size" for GNU LD 2019-12-25 22:09:52 +01:00
board board/ci20/genimage.cfg: drop hardcoded rootfs partition size 2020-01-22 20:50:02 +01:00
boot boot/arm-trusted-firmware: allow additional make targets 2020-02-01 23:15:41 +01:00
configs configs/raspberrypi*: bump kernel version to 64d0a98 2020-01-27 17:48:08 +01:00
docs Makefile, manual, website: Bump copyright year 2020-01-29 22:31:02 +01:00
fs fs: don't use := when not needed 2019-10-27 10:35:06 +01:00
linux linux/linux.mk: use HOST_MAKE_ENV rather than TARGET_MAKE_ENV 2020-02-02 21:02:28 +01:00
package package/meson: fix shebang in deep build trees 2020-02-03 12:08:48 +01:00
support support/testing: add python-can test case 2020-01-31 08:05:21 +01:00
system system: allow not setting a default, system-wide time zone 2019-11-27 21:48:38 +01:00
toolchain toolchain/toolchain-external: warn for untested GCC/kernel version 2020-02-02 08:53:25 +01:00
utils utils/scancpan: warn when a module is a perl core module 2020-01-08 18:16:54 +01:00
.defconfig arch: remove support for sh64 2016-09-08 22:15:15 +02:00
.flake8 .flake8: fix check for 80/132 columns 2019-04-10 12:31:33 +02:00
.gitignore update gitignore 2013-05-04 12:41:55 +02:00
.gitlab-ci.yml support/testing: add python-can test case 2020-01-31 08:05:21 +01:00
.gitlab-ci.yml.in gitlab-ci: use our updated docker base image 2019-10-27 21:52:28 +01:00
CHANGES Update for 2019.02.9 2020-01-12 21:39:09 +01:00
Config.in core: implement per-package SDK and target 2019-11-29 14:24:05 +01:00
Config.in.legacy package/celt051: drop package 2020-01-26 12:40:48 +01:00
COPYING COPYING: add exception about patch licensing 2016-02-26 19:50:13 +01:00
DEVELOPERS support/testing: add python-can test case 2020-01-31 08:05:21 +01:00
Makefile Makefile, manual, website: Bump copyright year 2020-01-29 22:31:02 +01:00
Makefile.legacy Remove BR2_DEPRECATED 2016-10-15 23:14:45 +02:00
README README: add reference to submitting-patches 2016-02-01 19:16:08 +01:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches