Re: Building a Linuxulator userland from source

From: Tatsuki Makino <tatsuki_makino_at_hotmail.com>
Date: Mon, 21 Aug 2023 08:40:26 UTC
Felix Palmen wrote on 2023/08/21 16:21:
> This works perfectly fine when used from within a Linux shell. Example
> from testing my new userland:
> 
> | [00:00:20] Entering interactive test mode. Type 'exit' when done.
> | root@14a-default:~ # /compat/linux/bin/bash
> | bash-5.2# ldd /bin/bash
> |         linux-vdso.so.1 (0x00007fffffffe000)
> |         libreadline.so.8 => /usr/lib64/libreadline.so.8 (0x0000000801154000)
> |         libhistory.so.8 => /usr/lib64/libhistory.so.8 (0x00000008011ad000)
> |         libncursesw.so.6 => /usr/lib64/libncursesw.so.6 (0x00000008011bb000)
> |         libc.so.6 => /usr/lib64/libc.so.6 (0x0000000801400000)
> |         /lib64/ld-linux-x86-64.so.2 (0x0000000001021000)
> | bash-5.2# 

Oh, I understand.
If we try to use it directly, the command not found if bash is not installed.

root@src-default:~ # /compat/linux/usr/bin/ldd /compat/linux/usr/bin/bash
/compat/linux/usr/bin/ldd: Command not found.
root@src-default:~ #

I am beginning to understand the logic somewhat. Thank you very much.

So here's the thing,
we want poudriere to mount real devfs to /compat/linux/dev as well, since linux binary behaves like chroot to /compat/linux.
Alternatively, pkg-plist in emulators/linux_base-c7 is creating dummy /compat/linux/dev, and removing it seems to be a workaround.

Regards.