Skip to content

Commit

Permalink
lbi: Add --remove-signatures to install time lbi copy
Browse files Browse the repository at this point in the history
We are unable to copy a signed image from c/storage -> c/storage while
preserving the signature. See
containers/image#2599

fixes #812

Signed-off-by: Chris Kyrouac <[email protected]>
  • Loading branch information
ckyrouac committed Oct 15, 2024
1 parent 1212f32 commit bd8a926
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/src/imgstorage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ impl Storage {
let storage_dest = &format!(
"containers-storage:[overlay@{STORAGE_ALIAS_DIR}+/proc/self/fd/{STORAGE_RUN_FD}]"
);
cmd.args(["image", "push", image])
cmd.args(["image", "push", "--remove-signatures", image])
.arg(format!("{storage_dest}{image}"));
let mut cmd = AsyncCommand::from(cmd);
cmd.run().await?;
Expand Down
1 change: 1 addition & 0 deletions tests/booted/test-logically-bound-install.nu
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ print "IMAGES:"
podman --storage-opt=additionalimagestore=/usr/lib/bootc/storage images # for debugging
assert ($images | any {|item| $item.column1 == "quay.io/curl/curl"})
assert ($images | any {|item| $item.column1 == "quay.io/curl/curl-base"})
assert ($images | any {|item| $item.column1 == "registry.redhat.io/ubi9/podman"}) # this image is signed

tap ok
3 changes: 2 additions & 1 deletion tests/containerfiles/lbi/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ FROM localhost/bootc
COPY ./usr/. /usr

RUN ln -s /usr/share/containers/systemd/curl.container /usr/lib/bootc/bound-images.d/curl.container && \
ln -s /usr/share/containers/systemd/curl-base.image /usr/lib/bootc/bound-images.d/curl-base.image
ln -s /usr/share/containers/systemd/curl-base.image /usr/lib/bootc/bound-images.d/curl-base.image && \
ln -s /usr/share/containers/systemd/podman.image /usr/lib/bootc/bound-images.d/podman.image
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Image]
Image=registry.redhat.io/ubi9/podman:latest
6 changes: 5 additions & 1 deletion xtask/src/xtask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ use fn_error_context::context;
use xshell::{cmd, Shell};

const NAME: &str = "bootc";
const TEST_IMAGES: &[&str] = &["quay.io/curl/curl-base:latest", "quay.io/curl/curl:latest"];
const TEST_IMAGES: &[&str] = &[
"quay.io/curl/curl-base:latest",
"quay.io/curl/curl:latest",
"registry.redhat.io/ubi9/podman:latest",
];

fn main() {
if let Err(e) = try_main() {
Expand Down

0 comments on commit bd8a926

Please sign in to comment.