From: Jan Kiszka <jan.kiszka@siemens.com>
To: <isar-users@googlegroups.com>
Subject: Re: [PATCH] Avoid sharing of /dev/shm from the build context
Date: Fri, 18 Mar 2022 14:08:50 +0100 [thread overview]
Message-ID: <e76d4d1d-e160-c9b2-4f1a-8207f891119e@siemens.com> (raw)
In-Reply-To: <YjRNMSfsjphEIqD/@ilbers.de>
On 18.03.22 10:13, Baurzhan Ismagulov wrote:
> On Thu, Mar 17, 2022 at 07:05:16PM +0100, Jan Kiszka wrote:
>>> diff --git a/meta/classes/buildchroot.bbclass b/meta/classes/buildchroot.bbclass
>>> index dd8f4206..3b214c6c 100644
>>> --- a/meta/classes/buildchroot.bbclass
>>> +++ b/meta/classes/buildchroot.bbclass
>>> @@ -42,7 +42,8 @@ buildchroot_do_mounts() {
>>> mount --bind '${CCACHE_DIR}' '${BUILDCHROOT_DIR}/ccache'
>>> fi
>>> mountpoint -q '${BUILDCHROOT_DIR}/dev' ||
>>> - mount --rbind /dev '${BUILDCHROOT_DIR}/dev'
>>> + ( mount --rbind /dev '${BUILDCHROOT_DIR}/dev';
>>> + mount -t tmpfs none '${BUILDCHROOT_DIR}/dev/shm' )
>>> mount --make-rslave '${BUILDCHROOT_DIR}/dev'
>
> I'd personally convert that to if because I never remember the failure behavior
You mean && - sure.
> in subshells. While at it, I'd also combine to a single mount -o rbind,rslave
> to avoid potential shared mount windows.
>
> I think that mounting every directory explicitly (bind instead of rbind)
> provides more control and avoids a bunch of issues with recursive mounts.
>
Do we know what all needs to be mounted then?
>
>> Uladzimir, didn't check if this is going to be completely obsoleted by
>> sbuild. If so, this can be ignored, and we will carry it locally until
>> sbuild is merged.
>
> According to Uladzimir, ATM this is orthogonal and should be applied, we keep
> buildchroot at least for some time, as e.g. wic is using it.
>
OK.
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
next prev parent reply other threads:[~2022-03-18 13:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-17 17:37 Jan Kiszka
2022-03-17 18:05 ` Jan Kiszka
2022-03-18 9:13 ` Baurzhan Ismagulov
2022-03-18 13:08 ` Jan Kiszka [this message]
2022-03-18 14:53 ` Baurzhan Ismagulov
2022-03-18 15:46 ` Jan Kiszka
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=e76d4d1d-e160-c9b2-4f1a-8207f891119e@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=isar-users@googlegroups.com \
/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