Attempt to have fchroot call "/bin/su --login" or "/bin/bash --login" automatically, as thiswill initialize the environment within the fchroot properly. Without this, PATH can be
defined but not properly exported, so commands like "which which" will fail, and things like
bzip2 will not be found by Portage, etc.
I am adding functionality to allow specifying additionalbind mounts using the --bind=src:dest option, where src
is an absolute path to bind-mount within the fchroot at
dest. I'm adding this so that I can jettison the
bind-mount management code in metro and just rely on
fchroot to manage all of it. This is a lot safer and
more convenient.
Update semantics of run_verbose() to allow a badval value. This isneeded for lazy unmounting which can return a non-zero value even
upon "success". Now return a boolean indicating success or failure
instead of the actual return value.
FL-9849: (fixed commit to use fchroot.in):use lazy unmount for fchroot. Also clean up
fchroot-simple which had bugs, and we want to move to
real fchroot anyway.
Always compile the QEMU wrapper, and feed it any custom CPU settingwe want. This ensures it's always current. Don't statically cache
QEMU wrappers, compile them within the fchroot path. Also a big reorg
to use more common code to allow us to see the actual compile command.
Improve debug output. Add --verbose/-v option to enable debug output.Deprecate simple_mode. Fix copying of /etc/resolv.conf into place --
it was overly indented. Fix unmounting of bind mounts (logic was
hosed.) Add --preserve-env option to preserve environment if desired.
Add environment whitelist and add TERM to it. This env var will
always be inherited from current environment.
FL-9681: fix returncode (I had this wrong.) Also add a bunch of coolstuff. First, let's clear the environment for an fchroot by default,
and let's set a custom fchroot prompt so we know we're chrooted. Also
let's parse args properly, and get ready to add a --cpu option to
pass directly to qemu. Also reorganize modules.