-
Notifications
You must be signed in to change notification settings - Fork 199
UKI Cleanup #2200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
UKI Cleanup #2200
Changes from all commits
3c75c5a
0c291cd
c2caca8
f4fb7b9
fa0221b
20e2fed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -442,6 +442,19 @@ pub(crate) enum ContainerOpts { | |
| #[clap(long)] | ||
| write_dumpfile_to: Option<Utf8PathBuf>, | ||
|
|
||
| /// The kernel version. | ||
| /// Required if kernel is passed | ||
| #[clap(long, requires = "kernel")] | ||
| kver: Option<String>, | ||
|
|
||
| /// Path to the kernel | ||
| #[clap(long, requires = "initramfs", requires = "kver")] | ||
| kernel: Option<Utf8PathBuf>, | ||
|
Collaborator
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. What I am thinking here is we could make this That solves three problems:
|
||
|
|
||
| /// Path to the initramfs | ||
| #[clap(long, requires = "kernel")] | ||
| initramfs: Option<Utf8PathBuf>, | ||
|
|
||
| /// Additional arguments to pass to ukify (after `--`). | ||
| #[clap(last = true)] | ||
| args: Vec<OsString>, | ||
|
|
@@ -1902,12 +1915,37 @@ async fn run_from_opt(opt: Opt) -> Result<()> { | |
| kargs, | ||
| allow_missing_verity, | ||
| write_dumpfile_to, | ||
| kernel, | ||
| kver, | ||
| initramfs, | ||
| args, | ||
| } => { | ||
| let kernel = match (kernel, initramfs) { | ||
| (Some(path), Some(initramfs)) => Some(crate::kernel::KernelInternal { | ||
| kernel: crate::kernel::Kernel { | ||
| unified: false, | ||
| version: kver | ||
| .ok_or_else(|| anyhow::anyhow!("Expected kver to be present"))?, | ||
| }, | ||
| k_type: crate::kernel::KernelType::Vmlinuz { path, initramfs }, | ||
| }), | ||
|
|
||
| (None, None) => { | ||
| eprintln!( | ||
|
Collaborator
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. I am having second thoughts, it should not be too onerous for us to just continue to support what we shipped before. I think we can drop the |
||
| "Warning: `bootc container ukify` without --kernel and --initramfs parameters is deprecated and will be removed in a future version" | ||
| ); | ||
| None | ||
| } | ||
|
|
||
| // Shouldn't happen due to clap constraints but for sanity | ||
| _ => anyhow::bail!("--kernel and --initramfs must be provided together"), | ||
| }; | ||
|
|
||
| crate::ukify::build_ukify( | ||
| &rootfs, | ||
| &kargs, | ||
| &args, | ||
| kernel, | ||
| allow_missing_verity, | ||
| write_dumpfile_to.as_deref(), | ||
| ) | ||
|
|
||
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.
Since this one would end up being closer to user-facing, I would prefer to streamline this more.
I think what would work best is to have our "base" build process be a stage that generates a single intermediate image with
/rootfsand/kernelor so. This could be part ofbootc-base-imagectl, or we could have it be part of something more likebootc container split-root-and-uki?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.
sgtm. By the "base" build process, are you referring to the Dockerfile (in bootc) or is it about something else?
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.
The pattern we apply to this should generalize to https://github.com/cgwalters/rhel-bootc-examples/tree/sealed/sealing as well etc.