logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: b0a2747ada52a6f2486d202e15f9f4db01f5caff
parent 445628d722e6e4aeb9a67e909b5ad7b49bb55484
Author: fosslinux <fosslinux@aussies.space>
Date:   Fri, 14 Apr 2023 02:05:48 +0000

Merge pull request #279 from eduardosm/external-sources-without-net

Pass `--unshare-net` to bwrap when building with `--external-sources`

Diffstat:

Mlib/utils.py2+-
Mrootfs.py2++
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/utils.py b/lib/utils.py @@ -14,7 +14,7 @@ import sys def run(*args, **kwargs): """A small wrapper around subprocess.run""" - arguments = [str(arg) for arg in args] + arguments = [str(arg) for arg in args if arg is not None] if kwargs.pop('verbose', False): print(arguments) diff --git a/rootfs.py b/rootfs.py @@ -181,6 +181,7 @@ print(shutil.which('chroot')) run('bwrap', '--unshare-user', '--uid', '0', '--gid', '0', + '--unshare-net', '--clearenv', '--setenv', 'PATH', '/usr/bin', '--bind', system_a.tmp_dir, '/', @@ -194,6 +195,7 @@ print(shutil.which('chroot')) run('bwrap', '--unshare-user', '--uid', '0', '--gid', '0', + '--unshare-net' if args.external_sources else None, '--clearenv', '--setenv', 'PATH', '/usr/bin', '--bind', system_a.tmp_dir + "/sysc_image", '/',