clang
unvendor
This commit is contained in:
parent
9a4b261179
commit
404aa8ebbb
139 changed files with 8091 additions and 1178 deletions
18
06/helpers/chroot
Executable file
18
06/helpers/chroot
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Run a command chrooted inside $DESTDIR w/o network, with /dev/null, outline:
|
||||
#
|
||||
# [helpers/chroot, outer script]
|
||||
# / unshare
|
||||
# | -n # without network
|
||||
# | -r # with EUID=EGID=0
|
||||
# \ -m # separate mount namespace
|
||||
# [helpers/chroot-inner, this script]
|
||||
# mount --bind /dev/null $DESTDIR/dev/null # unprivileged /dev/null!
|
||||
# &&
|
||||
# env -i # with env unset
|
||||
# chroot $DESTDIR # unprivileged chroot!
|
||||
|
||||
set -uex
|
||||
|
||||
exec unshare -nrm helpers/chroot-inner "$@"
|
Loading…
Add table
Add a link
Reference in a new issue