-
Notifications
You must be signed in to change notification settings - Fork 198
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
3a2818e
86b2422
6174d36
7016477
8a5c7ae
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 |
|---|---|---|
|
|
@@ -381,12 +381,28 @@ pub(crate) fn list_bootloader_entries(storage: &Storage) -> Result<Vec<Bootloade | |
| pub(crate) async fn get_container_manifest_and_config( | ||
| imgref: &String, | ||
| ) -> Result<ImgConfigManifest> { | ||
| use containers_image_proxy::{ImageProxy, ImageReference, Transport}; | ||
|
|
||
| let imgref = ImageReference::from_str(&imgref) | ||
|
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. In the caller we convert it to a string, here we convert back...
Collaborator
Author
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. The problem is they're two different types. In the caller we have
Collaborator
Author
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. We can convert it to string in
Collaborator
Author
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 ended up doing #2204, which does require bootc-dev/containers-image-proxy-rs#138 first |
||
| .context("Failed to parse '{imgref}' into ImageReference")?; | ||
|
|
||
| let mut config = crate::deploy::new_proxy_config(); | ||
| ostree_ext::container::merge_default_container_proxy_opts(&mut config)?; | ||
| let proxy = containers_image_proxy::ImageProxy::new_with_config(config).await?; | ||
|
|
||
| if imgref.transport == Transport::ContainerStorage { | ||
|
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 think this would be the second copy of this, probably worth deduplicating |
||
| // Fetching from containers-storage, may require privileges to read files | ||
| ostree_ext::container::merge_default_container_proxy_opts_with_isolation( | ||
| &mut config, | ||
| None, | ||
| )?; | ||
| } else { | ||
| // Apply our defaults to the proxy config | ||
| ostree_ext::container::merge_default_container_proxy_opts(&mut config)?; | ||
| } | ||
|
|
||
| let proxy = ImageProxy::new_with_config(config).await?; | ||
|
|
||
| let img = proxy | ||
| .open_image(&imgref) | ||
| .open_image_ref(&imgref) | ||
| .await | ||
| .with_context(|| format!("Opening image {imgref}"))?; | ||
|
|
||
|
|
||
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?