public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Felix Moessbauer <felix.moessbauer@siemens.com>, jan.kiszka@siemens.com
Cc: isar-users@googlegroups.com
Subject: Re: [PATCH v2 1/1] fix: mount pts into rootfs
Date: Wed, 4 May 2022 17:53:38 +0200	[thread overview]
Message-ID: <20220504175338.6d37d23a@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20220504123802.3544809-2-felix.moessbauer@siemens.com>

Am Wed,  4 May 2022 14:38:02 +0200
schrieb Felix Moessbauer <felix.moessbauer@siemens.com>:

> This fixes a regression introduced in 4e1dacc.

I wonder whether we should not instead look into reverting 4e1dacc and
finding a solution for just the sub-mount it was written for.

i.e.
mount --rbind /dev dev && umount dev/shm && mount -t tmpfs none dev/shm

seems to work just fine, leaving dev/pts mounted and also dev/mqueue
which was also removed by 4e1dacc or dev/hugepages which i found on
another host

Who knows what all those sub-mounts are for and what else has been left
out. But the commit message ends with the recursion having been removed
on purpose.

> Pseudo ttys might be required during package building
> as well as package installation
> (e.g. to make expect work).
> 
> The patch recursively mounts all pts from the host.
> 
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
>  meta/classes/buildchroot.bbclass                    | 3 ++-
>  meta/classes/rootfs.bbclass                         | 3 ++-
>  meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 2 ++
>  3 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/buildchroot.bbclass
> b/meta/classes/buildchroot.bbclass index 3d2211b9..527f8ded 100644
> --- a/meta/classes/buildchroot.bbclass
> +++ b/meta/classes/buildchroot.bbclass
> @@ -43,7 +43,8 @@ buildchroot_do_mounts() {
>          fi
>          mountpoint -q '${BUILDCHROOT_DIR}/dev' ||
>              ( mount --bind /dev '${BUILDCHROOT_DIR}/dev' &&
> -              mount -t tmpfs none '${BUILDCHROOT_DIR}/dev/shm' )
> +              mount -t tmpfs none '${BUILDCHROOT_DIR}/dev/shm' &&
> +              mount --rbind /dev/pts '${BUILDCHROOT_DIR}/dev/pts' )

if recursion was removed on purpose we should probably mount "-t
devpts" and not "--rbind"

Henning

>          mountpoint -q '${BUILDCHROOT_DIR}/proc' ||
>              mount -t proc none '${BUILDCHROOT_DIR}/proc'
>          mountpoint -q '${BUILDCHROOT_DIR}/sys' ||
> diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
> index 7e9fb0f3..9f3ec0e3 100644
> --- a/meta/classes/rootfs.bbclass
> +++ b/meta/classes/rootfs.bbclass
> @@ -35,7 +35,8 @@ rootfs_do_mounts() {
>          set -e
>          mountpoint -q '${ROOTFSDIR}/dev' || \
>              ( mount --bind /dev '${ROOTFSDIR}/dev' &&
> -              mount -t tmpfs none '${ROOTFSDIR}/dev/shm' )
> +              mount -t tmpfs none '${ROOTFSDIR}/dev/shm' &&
> +              mount --rbind /dev/pts '${ROOTFSDIR}/dev/pts' )
>          mountpoint -q '${ROOTFSDIR}/proc' || \
>              mount -t proc none '${ROOTFSDIR}/proc'
>          mountpoint -q '${ROOTFSDIR}/sys' || \
> diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index
> 145d5e87..ba8ad094 100644 ---
> a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++
> b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -362,6
> +362,7 @@ do_bootstrap() { 
>          # update APT
>          mount --bind /dev ${ROOTFSDIR}/dev
> +        mount --rbind /dev/pts ${ROOTFSDIR}/dev/pts
>          mount -t tmpfs none "${ROOTFSDIR}/dev/shm"
>          mount -t proc none ${ROOTFSDIR}/proc
>          mount --rbind /sys ${ROOTFSDIR}/sys
> @@ -383,6 +384,7 @@ do_bootstrap() {
>                                  -o Debug::pkgProblemResolver=yes
>  
>          umount -l "${ROOTFSDIR}/dev/shm"
> +        umount -l "${ROOTFSDIR}/dev/pts"
>          umount -l "${ROOTFSDIR}/dev"
>          umount -l "${ROOTFSDIR}/proc"
>          umount -l "${ROOTFSDIR}/sys"


  reply	other threads:[~2022-05-04 15:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04 12:38 [PATCH v2 0/1] " Felix Moessbauer
2022-05-04 12:38 ` [PATCH v2 1/1] " Felix Moessbauer
2022-05-04 15:53   ` Henning Schild [this message]
2022-05-09 14:34     ` Moessbauer, Felix
2022-05-10  6:34       ` Anton Mikanovich
2022-05-11  8:03       ` Baurzhan Ismagulov
2022-05-11  9:30         ` Moessbauer, Felix

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=20220504175338.6d37d23a@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.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