util/chroot: rename context class to ChrootProcDevSys
Rename the context class to better describe what it's doing. It doesn't run anything in a chroot, but it prepares the tree for it.
This commit is contained in:
parent
618ec9db2c
commit
69625505cf
3 changed files with 5 additions and 5 deletions
|
|
@ -2,7 +2,7 @@ import os
|
|||
import subprocess
|
||||
|
||||
|
||||
class Chroot:
|
||||
class ChrootProcDevSys:
|
||||
"""
|
||||
Sets up mounts for the virtual filesystems inside a root tree, preparing it for running commands using chroot. This
|
||||
should be used whenever a stage needs to run a command against the root tree but doesn't support a --root option or
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import subprocess
|
|||
import sys
|
||||
|
||||
import osbuild.api
|
||||
from osbuild.util.chroot import Chroot
|
||||
from osbuild.util.chroot import ChrootProcDevSys
|
||||
|
||||
|
||||
def yesno(name: str, value: bool) -> str:
|
||||
|
|
@ -83,7 +83,7 @@ def main(tree, options):
|
|||
if initoverlayfs:
|
||||
initfs_bin = "/usr/bin/initoverlayfs-install"
|
||||
|
||||
with Chroot(tree):
|
||||
with ChrootProcDevSys(tree):
|
||||
subprocess.run(["/usr/sbin/chroot", tree, initfs_bin,
|
||||
"--no-hostonly",
|
||||
"--kver", kver]
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ import subprocess
|
|||
import sys
|
||||
|
||||
from osbuild import api
|
||||
from osbuild.util.chroot import Chroot
|
||||
from osbuild.util.chroot import ChrootProcDevSys
|
||||
|
||||
|
||||
def main(tree, options):
|
||||
policy = options["policy"]
|
||||
|
||||
with Chroot(tree):
|
||||
with ChrootProcDevSys(tree):
|
||||
# update-crypto-polciies uses /proc/self/mountinfo to find and verify that fips paths have been mounted to their
|
||||
# expected locations by searching for the following path suffixes:
|
||||
# /crypto-policies/default-fips-config
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue