osbuild: do not set up API VFS in the target tree
Some stages will be chrooting into the target to run things there,
and they will require the standard API VFS to be mounted. Some
tools do that themselves, other do not. In all cases, we would like
to discourage running things in the target tree.
For these reasons do not pre-mount the API VFS, but require the
stages who need it to do the mounting themselves. This is a partial
revert of f6023ed78b.
This commit is contained in:
parent
78c8a176c9
commit
d557784c8c
2 changed files with 13 additions and 4 deletions
|
|
@ -16,6 +16,19 @@ def main(tree, repos, packages, releasever, cache=None):
|
|||
if not cache:
|
||||
cache = f"/tmp/dnf-cache"
|
||||
|
||||
script = f"""
|
||||
set -e
|
||||
mkdir -p {tree}/dev {tree}/sys {tree}/proc
|
||||
mount -t devtmpfs none {tree}/dev
|
||||
mount -t sysfs none {tree}/sys
|
||||
mount -t proc none {tree}/proc
|
||||
"""
|
||||
returncode = subprocess.run(["/bin/sh", "-c", script]).returncode
|
||||
|
||||
if returncode != 0:
|
||||
print(f"setting up API VFS in target tree failed: {returncode}")
|
||||
return returncode
|
||||
|
||||
cmd = [
|
||||
"dnf", "-yv",
|
||||
"--installroot", tree,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue