"--incremental", str(config.incremental),
*([f"--package={package}" for package in config.tools_tree_packages]),
*([f"--package-directory={os.fspath(directory)}" for directory in config.tools_tree_package_directories]), # noqa: E501
+ *([f"--build-sources={tree}" for tree in config.build_sources]),
+ "--build-sources-ephemeral", str(config.build_sources_ephemeral),
+ *([f"--prepare-script={os.fspath(script)}" for script in config.tools_tree_prepare_scripts]),
"--output=tools",
*(["--source-date-epoch", str(config.source_date_epoch)] if config.source_date_epoch is not None else []), # noqa: E501
*([f"--environment={k}='{v}'" for k, v in config.environment.items()]),
tools_tree_sandbox_trees: list[ConfigTree]
tools_tree_packages: list[str]
tools_tree_package_directories: list[Path]
+ tools_tree_prepare_scripts: list[Path]
tools_tree_certificates: bool
extra_search_paths: list[Path]
incremental: Incremental
parse=config_make_list_parser(delimiter=",", parse=make_path_parser()),
help="Specify a directory containing extra tools tree packages",
),
+ ConfigSetting(
+ dest="tools_tree_prepare_scripts",
+ long="--tools-tree-prepare-script",
+ metavar="PATH",
+ section="Build",
+ parse=config_make_list_parser(delimiter=",", parse=make_path_parser()),
+ paths=("mkosi.tools.prepare", "mkosi.tools.prepare.chroot"),
+ recursive_paths=("mkosi.tools.prepare.d/*",),
+ help="Prepare script to run inside the tools tree before it is cached",
+ ),
ConfigSetting(
dest="tools_tree_certificates",
metavar="BOOL",
Tools Tree Sandbox Trees: {line_join_list(config.tools_tree_sandbox_trees)}
Tools Tree Packages: {line_join_list(config.tools_tree_packages)}
Tools Tree Package Directories: {line_join_list(config.tools_tree_package_directories)}
+ Tools Tree Prepare Scripts: {line_join_list(config.tools_tree_prepare_scripts)}
Tools Tree Certificates: {yes_no(config.tools_tree_certificates)}
Extra Search Paths: {line_join_list(config.extra_search_paths)}
`ToolsTreePackageDirectories=`, `--tools-tree-package-directory=`
: Same as `PackageDirectories=`, but for the default tools tree.
+`ToolsTreePrepareScripts=`, `--tools-tree-prepare-script=`
+: Same as `PrepareScripts=`, but for the default tools tree.
+
`ToolsTreeCertificates=`, `--tools-tree-certificates=`
: Specify whether to use certificates and keys from the tools tree.
Enabled by default. If enabled, `/etc/pki`, `/etc/ssl`,
"/abc"
],
"ToolsTreePackages": [],
+ "ToolsTreePrepareScripts": [
+ "/prepare"
+ ],
"ToolsTreeRelease": null,
"ToolsTreeRepositories": [
"abc"
tools_tree_mirror=None,
tools_tree_package_directories=[Path("/abc")],
tools_tree_packages=[],
+ tools_tree_prepare_scripts=[Path("/prepare")],
tools_tree_release=None,
tools_tree_repositories=["abc"],
tools_tree_sandbox_trees=[ConfigTree(Path("/a/b/c"), Path("/"))],