Mount a few missing device nodes in chroot bootstrap modes

The gap between the chroot and non-chroot bootstrap modes started in,
7ecad37 because BuildStream's sandbox was missing some device nodes.

With the latest version of buildbox-run-bubblewrap, a few of the
missing devices were made available to BuildStream's sandbox and
there is no longer a need to keep this gap. In fact, compatibilty
with newer BuildStream versions now requires these devices to be
present.

This change also partially reverts d0a5221, which had to remove
/dev/ptmx as a consequence of the aforementioned gap.
This commit is contained in:
Dor Askayo 2023-07-15 11:54:22 +03:00
parent b3ffe8bb19
commit 2227a2053a
3 changed files with 16 additions and 10 deletions

View file

@ -197,6 +197,8 @@ print(shutil.which('chroot'))
'--dev-bind', '/dev/zero', '/dev/zero',
'--dev-bind', '/dev/random', '/dev/random',
'--dev-bind', '/dev/urandom', '/dev/urandom',
'--dev-bind', '/dev/ptmx', '/dev/ptmx',
'--dev-bind', '/dev/tty', '/dev/tty',
init)
if not args.internal_ci or args.internal_ci == "pass2" or args.internal_ci == "pass3":
@ -214,6 +216,8 @@ print(shutil.which('chroot'))
'--dev-bind', '/dev/zero', '/dev/zero',
'--dev-bind', '/dev/random', '/dev/random',
'--dev-bind', '/dev/urandom', '/dev/urandom',
'--dev-bind', '/dev/ptmx', '/dev/ptmx',
'--dev-bind', '/dev/tty', '/dev/tty',
'--tmpfs', '/dev/shm',
'--proc', '/proc',
'--bind', '/sys', '/sys',