make kernel fails with the following error when /usr/src is mounted with option noexec. This is FreeBSD desk.server.mydomain.nl 11.0-CURRENT FreeBSD 11.0-CURRENT #8 r299158: ... ===> bhnd (all) machine -> /usr/src/sys/amd64/include x86 -> /usr/src/sys/x86/include /usr/src/sys/dev/bhnd/tools/nvram_map_gen.sh /usr/src/sys/dev/bhnd/nvram/nvram_map -h make[4]: exec(/usr/src/sys/dev/bhnd/tools/nvram_map_gen.sh) failed (Permission denied)
A commit references this bug: Author: dim Date: Fri May 13 16:35:38 UTC 2016 New revision: 299684 URL: https://svnweb.freebsd.org/changeset/base/299684 Log: After r299241, which added bhnd(4), use sh to run the shell scripts for generating nvram maps, to allow a noexec-mounted source directory. Reported by: Johan Hendriks <joh.hendriks@gmail.com> PR: 209435 Changes: head/sys/conf/files head/sys/conf/kmod.mk
Johan, can you please verify that a kernel now also builds successfully for you, even if you mount /usr/src noexec?
Hey Dmitry, You'll also need the nvram_map_gen.sh changes from D6312 (https://reviews.freebsd.org/D6312#d5a8eee4) With that, I can confirm the build completes successfully with `noexec`
A commit references this bug: Author: emaste Date: Fri May 13 18:56:56 UTC 2016 New revision: 299692 URL: https://svnweb.freebsd.org/changeset/base/299692 Log: Use awk to run bhnd's awk script, to allow noexec src dir PR: 209435 Submitted by: Landon Fuller <landonf@landonf.org> Differential Revision: https://reviews.freebsd.org/D6312 Changes: head/sys/dev/bhnd/tools/nvram_map_gen.sh
(In reply to Dimitry Andric from comment #2) I just set exec=off on my /usr/src zfs dataset and did an svnupdate. Now the buildworld goes fine. Thanks. regards Johan
Thanks for the confirmation!