-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add short option for initrd kernel version #3543
Open
keszybz
wants to merge
3
commits into
systemd:main
Choose a base branch
from
keszybz:initrd-version-short-option
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -1298,57 +1298,57 @@ def finalize_default_initrd( | |||||
# Default values are assigned via the parser so we go via the argument parser to construct | ||||||
# the config for the initrd. | ||||||
cmdline = [ | ||||||
"--directory", "", | ||||||
"--distribution", str(config.distribution), | ||||||
"--release", config.release, | ||||||
"--architecture", str(config.architecture), | ||||||
*(["--mirror", config.mirror] if config.mirror else []), | ||||||
"--repository-key-check", str(config.repository_key_check), | ||||||
"--repository-key-fetch", str(config.repository_key_fetch), | ||||||
"--directory=", | ||||||
f"--distribution={config.distribution}", | ||||||
f"--release={config.release}", | ||||||
f"--architecture={config.architecture}", | ||||||
*([f"--mirror={config.mirror}"] if config.mirror else []), | ||||||
f"--repository-key-check={config.repository_key_check}", | ||||||
f"--repository-key-fetch={config.repository_key_fetch}", | ||||||
*([f"--repositories={repository}" for repository in config.repositories]), | ||||||
*([f"--sandbox-tree={tree}" for tree in config.sandbox_trees]), | ||||||
# Note that when compress_output == Compression.none == 0 we don't pass --compress-output | ||||||
# which means the default compression will get picked. This is exactly what we want so that | ||||||
# initrds are always compressed. | ||||||
*(["--compress-output", str(config.compress_output)] if config.compress_output else []), | ||||||
"--compress-level", str(config.compress_level), | ||||||
"--with-network", str(config.with_network), | ||||||
"--cache-only", str(config.cacheonly), | ||||||
*(["--output-directory", os.fspath(output_dir)] if output_dir else []), | ||||||
*(["--workspace-directory", os.fspath(config.workspace_dir)] if config.workspace_dir else []), | ||||||
*(["--cache-directory", os.fspath(config.cache_dir)] if config.cache_dir else []), | ||||||
"--cache-key", config.cache_key or '-', | ||||||
*(["--package-cache-directory", os.fspath(config.package_cache_dir)] if config.package_cache_dir else []), # noqa: E501 | ||||||
*(["--local-mirror", str(config.local_mirror)] if config.local_mirror else []), | ||||||
"--incremental", str(config.incremental), | ||||||
*([f"--compress-output={p}"] if (p := config.compress_output) else []), | ||||||
f"--compress-level={config.compress_level}", | ||||||
f"--with-network={config.with_network}", | ||||||
f"--cache-only={config.cacheonly}", | ||||||
*([f"--output-directory={os.fspath(output_dir)}"] if output_dir else []), | ||||||
*([f"--workspace-directory={os.fspath(config.workspace_dir)}"] if config.workspace_dir else []), | ||||||
*([f"--cache-directory={os.fspath(config.cache_dir)}"] if config.cache_dir else []), | ||||||
f"--cache-key={config.cache_key or '-'}", | ||||||
*([f"--package-cache-directory={os.fspath(p)}"] if (p := config.package_cache_dir) else []), | ||||||
*([f"--local-mirror={config.local_mirror}"] if config.local_mirror else []), | ||||||
f"--incremental={config.incremental}", | ||||||
*(f"--package={package}" for package in config.initrd_packages), | ||||||
*(f"--volatile-package={package}" for package in config.initrd_volatile_packages), | ||||||
*(f"--package-directory={d}" for d in config.package_directories), | ||||||
*(f"--volatile-package-directory={d}" for d in config.volatile_package_directories), | ||||||
"--output", "initrd", | ||||||
*(["--image-id", config.image_id] if config.image_id else []), | ||||||
*(["--image-version", config.image_version] if config.image_version else []), | ||||||
"--output=initrd", | ||||||
*([f"--image-id={config.image_id}"] if config.image_id else []), | ||||||
*([f"--image-version={config.image_version}"] if config.image_version else []), | ||||||
*( | ||||||
["--source-date-epoch", str(config.source_date_epoch)] | ||||||
[f"--source-date-epoch={config.source_date_epoch}"] | ||||||
if config.source_date_epoch is not None else | ||||||
[] | ||||||
), | ||||||
*(["--locale", config.locale] if config.locale else []), | ||||||
*(["--locale-messages", config.locale_messages] if config.locale_messages else []), | ||||||
*(["--keymap", config.keymap] if config.keymap else []), | ||||||
*(["--timezone", config.timezone] if config.timezone else []), | ||||||
*(["--hostname", config.hostname] if config.hostname else []), | ||||||
*(["--root-password", rootpwopt] if rootpwopt else []), | ||||||
*([f"--locale={config.locale}"] if config.locale else []), | ||||||
*([f"--locale-messages={config.locale_messages}"] if config.locale_messages else []), | ||||||
*([f"--keymap={config.keymap}"] if config.keymap else []), | ||||||
*([f"--timezone={config.timezone}"] if config.timezone else []), | ||||||
*([f"--hostname={config.hostname}"] if config.hostname else []), | ||||||
*([f"--root-password={rootpwopt}"] if rootpwopt else []), | ||||||
*([f"--environment={k}='{v}'" for k, v in config.environment.items()]), | ||||||
*(["--tools-tree", os.fspath(config.tools_tree)] if config.tools_tree and tools else []), | ||||||
"--tools-tree-certificates", str(config.tools_tree_certificates), | ||||||
*([f"--tools-tree={os.fspath(config.tools_tree)}"] if config.tools_tree and tools else []), | ||||||
f"--tools-tree-certificates={config.tools_tree_certificates}", | ||||||
*([f"--extra-search-path={os.fspath(p)}" for p in config.extra_search_paths]), | ||||||
*(["--proxy-url", config.proxy_url] if config.proxy_url else []), | ||||||
*([f"--proxy-url={config.proxy_url}"] if config.proxy_url else []), | ||||||
*([f"--proxy-exclude={host}" for host in config.proxy_exclude]), | ||||||
*(["--proxy-peer-certificate", os.fspath(p)] if (p := config.proxy_peer_certificate) else []), | ||||||
*(["--proxy-client-certificate", os.fspath(p)] if (p := config.proxy_client_certificate) else []), | ||||||
*(["--proxy-client-key", os.fspath(p)] if (p := config.proxy_client_key) else []), | ||||||
"--selinux-relabel", str(relabel), | ||||||
*([f"--proxy-peer-certificate={os.fspath(p)}"] if (p := config.proxy_peer_certificate) else []), | ||||||
*([f"--proxy-client-certificate={os.fspath(p)}"] if (p := config.proxy_client_certificate) else []), | ||||||
*([f"--proxy-client-key={os.fspath(p)}"] if (p := config.proxy_client_key) else []), | ||||||
f"--selinux-relabel={relabel}", | ||||||
"--include=mkosi-initrd", | ||||||
] # fmt: skip | ||||||
|
||||||
|
@@ -4501,35 +4501,35 @@ def finalize_default_tools(config: Config, *, resources: Path) -> Config: | |||||
) | ||||||
|
||||||
cmdline = [ | ||||||
"--directory", "", | ||||||
"--distribution", str(config.tools_tree_distribution), | ||||||
*(["--release", config.tools_tree_release] if config.tools_tree_release else []), | ||||||
"--directory=", | ||||||
f"--distribution={config.tools_tree_distribution}", | ||||||
*([f"--release={config.tools_tree_release}"] if config.tools_tree_release else []), | ||||||
*([f"--profile={profile}" for profile in config.tools_tree_profiles]), | ||||||
*(["--mirror", config.tools_tree_mirror] if config.tools_tree_mirror else []), | ||||||
*([f"--mirror={config.tools_tree_mirror}"] if config.tools_tree_mirror else []), | ||||||
*([f"--repositories={repository}" for repository in config.tools_tree_repositories]), | ||||||
*([f"--sandbox-tree={tree}" for tree in config.tools_tree_sandbox_trees]), | ||||||
"--repository-key-check", str(config.repository_key_check), | ||||||
"--repository-key-fetch", str(config.repository_key_fetch), | ||||||
"--cache-only", str(config.cacheonly), | ||||||
*(["--output-directory", os.fspath(config.output_dir)] if config.output_dir else []), | ||||||
*(["--workspace-directory", os.fspath(config.workspace_dir)] if config.workspace_dir else []), | ||||||
*(["--cache-directory", os.fspath(config.cache_dir)] if config.cache_dir else []), | ||||||
f"--repository-key-check={config.repository_key_check}", | ||||||
f"--repository-key-fetch={config.repository_key_fetch}", | ||||||
f"--cache-only={config.cacheonly}", | ||||||
*([f"--output-directory={os.fspath(p)}"] if (p := config.output_dir) else []), | ||||||
*([f"--workspace-directory={os.fspath(p)}"] if (p := config.workspace_dir) else []), | ||||||
*([f"--cache-directory={os.fspath(p)}"] if (p := config.cache_dir) else []), | ||||||
"--cache-key=tools", | ||||||
*(["--package-cache-directory", os.fspath(config.package_cache_dir)] if config.package_cache_dir else []), # noqa: E501 | ||||||
"--incremental", str(config.incremental), | ||||||
*([f"--package-cache-directory={os.fspath(p)}"] if (p := config.package_cache_dir) else []), | ||||||
f"--incremental={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"--build-sources-ephemeral={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"--source-date-epoch={p}"] if (p := config.source_date_epoch) is not None else []), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
*([f"--environment={k}='{v}'" for k, v in config.environment.items()]), | ||||||
*(["--proxy-url", config.proxy_url] if config.proxy_url else []), | ||||||
*([f"--proxy-url={config.proxy_url}"] if config.proxy_url else []), | ||||||
*([f"--proxy-exclude={host}" for host in config.proxy_exclude]), | ||||||
*(["--proxy-peer-certificate", os.fspath(p)] if (p := config.proxy_peer_certificate) else []), | ||||||
*(["--proxy-client-certificate", os.fspath(p)] if (p := config.proxy_client_certificate) else []), | ||||||
*(["--proxy-client-key", os.fspath(p)] if (p := config.proxy_client_key) else []), | ||||||
*([f"--proxy-peer-certificate={os.fspath(p)}"] if (p := config.proxy_peer_certificate) else []), | ||||||
*([f"--proxy-client-certificate={os.fspath(p)}"] if (p := config.proxy_client_certificate) else []), | ||||||
*([f"--proxy-client-key={os.fspath(p)}"] if (p := config.proxy_client_key) else []), | ||||||
] # fmt: skip | ||||||
|
||||||
_, [tools] = parse_config( | ||||||
|
@@ -4961,7 +4961,7 @@ def run_verb(args: Args, images: Sequence[Config], *, resources: Path) -> None: | |||||
|
||||||
if args.verb == Verb.dependencies: | ||||||
_, [deps] = parse_config( | ||||||
["--directory", "", "--repositories", "", *args.cmdline, "--include=mkosi-tools", "build"], | ||||||
["--directory=", "--repositories=", *args.cmdline, "--include=mkosi-tools", "build"], | ||||||
resources=resources, | ||||||
) | ||||||
|
||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.