public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Zhihang Wei <wzh@ilbers.de>
To: Felix Moessbauer <felix.moessbauer@siemens.com>,
	isar-users@googlegroups.com
Subject: Re: [PATCH 1/1] fix(rootfs): create dev fd links under rootless
Date: Mon, 24 Aug 2026 11:44:14 +0200	[thread overview]
Message-ID: <24a90ea3-57c4-4012-b779-d4d0cd5a0d60@ilbers.de> (raw)
In-Reply-To: <20260819114328.759528-1-felix.moessbauer@siemens.com>

Applied to next, thanks.

Zhihang

On 8/19/26 13:43, 'Felix Moessbauer' via isar-users wrote:
> The /dev/std{in,out.err} and /dev/fd entries are links into proc. While
> these are not explicitly required by any Debian policy, mmdebstrap
> creates them and they are used when installing systemd units under dracut.
>
> We only observed warnings regarding the missing entries, but no issues
> so far. Nonetheless, we now create them on-the-fly to behave similar to
> mmdebstrap.
>
> Fixes: 4fedb1ae ("add support for fully rootless builds")
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
>   meta/classes-global/base.bbclass | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
> index f074eee6..e2fc77dc 100644
> --- a/meta/classes-global/base.bbclass
> +++ b/meta/classes-global/base.bbclass
> @@ -401,6 +401,10 @@ def insert_isar_mounts(d, rootfs, mounts):
>           lines.append('mount -o bind /dev/random {}/dev/random'.format(rootfs))
>           lines.append('mount -o bind /dev/urandom {}/dev/urandom'.format(rootfs))
>           lines.append('mount -t proc none {}/proc'.format(rootfs))
> +        lines.append('ln -sfn /proc/self/fd {}/dev/fd'.format(rootfs))
> +        lines.append('ln -sfn /proc/self/fd/0 {}/dev/stdin'.format(rootfs))
> +        lines.append('ln -sfn /proc/self/fd/1 {}/dev/stdout'.format(rootfs))
> +        lines.append('ln -sfn /proc/self/fd/2 {}/dev/stderr'.format(rootfs))
>           # we do not unshare the network namespace, so we cannot create a sysfs, hence bind-mount
>           lines.append('mount -o rbind /sys {}/sys'.format(rootfs))
>   
> @@ -417,7 +421,8 @@ def insert_isar_umounts(d, rootfs, mounts):
>       remove the mountpoints.
>       """
>       lines = []
> -    to_unlink = ['/dev/null', '/dev/random', '/dev/urandom', '/dev/ptmx']
> +    to_unlink = ['/dev/null', '/dev/random', '/dev/urandom', '/dev/ptmx',
> +                 '/dev/stdin', '/dev/stdout', '/dev/stderr', '/dev/fd']
>       to_rmdir = ['/dev/pts', '/dev/shm']
>       if d.getVar('ISAR_CHROOT_MODE') == 'unshare':
>           lines.append('rm -f ' + ' '.join(['{}/{}'.format(rootfs, f) for f in to_unlink]))

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/24a90ea3-57c4-4012-b779-d4d0cd5a0d60%40ilbers.de.

      reply	other threads:[~2026-08-24  9:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 11:43 'Felix Moessbauer' via isar-users
2026-08-24  9:44 ` Zhihang Wei [this message]

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=24a90ea3-57c4-4012-b779-d4d0cd5a0d60@ilbers.de \
    --to=wzh@ilbers.de \
    --cc=felix.moessbauer@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