public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Ross Burton <Ross.Burton@arm.com>
To: ChenQi <Qi.Chen@windriver.com>
Cc: "michalwsieron@gmail.com" <michalwsieron@gmail.com>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH] sanity.bbclass: raise_sanity_error if /tmp is noexec
Date: Wed, 21 Feb 2024 09:48:32 +0000	[thread overview]
Message-ID: <461776CF-3A33-4053-9FCA-009B4BA98246@arm.com> (raw)
In-Reply-To: <b128ef22-03b4-ebd7-1b2d-40b2d8ab2201@windriver.com>

On 21 Feb 2024, at 07:18, ChenQi <Qi.Chen@windriver.com> wrote:
> I just noticed the change. I can't find the V2 in my mailbox, so I'm going to reply here.
> I'm a little concerned about forcing such requirement here. It does not seem *necessary*.
> As far as I know, the whole oe-core does not need /tmp to be exec. The commit message says 'old meson', this means the current version of meson works well, right?
> Also, why is there 'no simple way to workaround'? Is the recipe hardcoding '/tmp' instead of using API or command? Does exporting TMPDIR work?
> e.g.,
> export TMPDIR="${B}/tmp”

You _can_ export TMPDIR but that has to be done on a per-recipe/class basis very carefully as TMPDIR means something else to Bitbake.

The problem is recipes that use mktemp to write files and execute them (be it shell scripts, or as a place to write C and then compile in the same directory).  These will be in /tmp (again, we can’t set TMPDIR because for foolish historical reasons, TMPDIR is used by bitbake).

We first noticed this with Meson where noexec /tmp meant the configure tests failed. We worked around it at the time by assigning TMPDIR when calling Meson, but since them Meson writes to its own build tree now.  This has been seen before though, but luckily noexec /tmp is fairly unusual so I doubt this will break many builds.

Ross

  reply	other threads:[~2024-02-21  9:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-09 14:09 [PATCH] sanity.bbclass: raise_sanity_error if /tmp is noexec Michal Sieron
2024-02-09 15:57 ` [OE-core] " Ross Burton
2024-02-21  7:18   ` ChenQi
2024-02-21  9:48     ` Ross Burton [this message]
2024-02-21 10:08       ` Alexander Kanavin
2024-02-21 21:36         ` Randy MacLeod
2024-02-22  9:41           ` michalwsieron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=461776CF-3A33-4053-9FCA-009B4BA98246@arm.com \
    --to=ross.burton@arm.com \
    --cc=Qi.Chen@windriver.com \
    --cc=michalwsieron@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox