stage: use path meta info to run the stage
Now that the `Stage` contains the `ModuleInfo`, which contains the path the to executable, this can directly be used to execute the stage. To do so, the path to the executable is bind-mounted to a well known path inside the sandbox (`/run/osbuild/bin/$id`) and this is then supplied to the build root as executable to run.
This commit is contained in:
parent
7a6c2df910
commit
de021b468a
1 changed files with 5 additions and 2 deletions
|
|
@ -74,7 +74,10 @@ class Stage:
|
|||
}
|
||||
}
|
||||
|
||||
ro_binds = [f"{sources_output}:/run/osbuild/sources"]
|
||||
ro_binds = [
|
||||
f"{self.info.path}:/run/osbuild/bin/{self.name}",
|
||||
f"{sources_output}:/run/osbuild/sources"
|
||||
]
|
||||
|
||||
api = API(args, monitor)
|
||||
build_root.register_api(api)
|
||||
|
|
@ -85,7 +88,7 @@ class Stage:
|
|||
sources_output)
|
||||
build_root.register_api(src)
|
||||
|
||||
r = build_root.run([f"/run/osbuild/lib/stages/{self.name}"],
|
||||
r = build_root.run([f"/run/osbuild/bin/{self.name}"],
|
||||
monitor,
|
||||
binds=[os.fspath(tree) + ":/run/osbuild/tree"],
|
||||
readonly_binds=ro_binds)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue