Skip to content

Commit bd8a926

Browse files
committed
lbi: Add --remove-signatures to install time lbi copy
We are unable to copy a signed image from c/storage -> c/storage while preserving the signature. See https://github.com/containers/image/issues/2599 fixes #812 Signed-off-by: Chris Kyrouac <[email protected]>
1 parent 1212f32 commit bd8a926

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

lib/src/imgstorage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ impl Storage {
296296
let storage_dest = &format!(
297297
"containers-storage:[overlay@{STORAGE_ALIAS_DIR}+/proc/self/fd/{STORAGE_RUN_FD}]"
298298
);
299-
cmd.args(["image", "push", image])
299+
cmd.args(["image", "push", "--remove-signatures", image])
300300
.arg(format!("{storage_dest}{image}"));
301301
let mut cmd = AsyncCommand::from(cmd);
302302
cmd.run().await?;

tests/booted/test-logically-bound-install.nu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ print "IMAGES:"
66
podman --storage-opt=additionalimagestore=/usr/lib/bootc/storage images # for debugging
77
assert ($images | any {|item| $item.column1 == "quay.io/curl/curl"})
88
assert ($images | any {|item| $item.column1 == "quay.io/curl/curl-base"})
9+
assert ($images | any {|item| $item.column1 == "registry.redhat.io/ubi9/podman"}) # this image is signed
910

1011
tap ok

tests/containerfiles/lbi/Containerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ FROM localhost/bootc
33
COPY ./usr/. /usr
44

55
RUN ln -s /usr/share/containers/systemd/curl.container /usr/lib/bootc/bound-images.d/curl.container && \
6-
ln -s /usr/share/containers/systemd/curl-base.image /usr/lib/bootc/bound-images.d/curl-base.image
6+
ln -s /usr/share/containers/systemd/curl-base.image /usr/lib/bootc/bound-images.d/curl-base.image && \
7+
ln -s /usr/share/containers/systemd/podman.image /usr/lib/bootc/bound-images.d/podman.image
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[Image]
2+
Image=registry.redhat.io/ubi9/podman:latest

xtask/src/xtask.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ use fn_error_context::context;
1111
use xshell::{cmd, Shell};
1212

1313
const NAME: &str = "bootc";
14-
const TEST_IMAGES: &[&str] = &["quay.io/curl/curl-base:latest", "quay.io/curl/curl:latest"];
14+
const TEST_IMAGES: &[&str] = &[
15+
"quay.io/curl/curl-base:latest",
16+
"quay.io/curl/curl:latest",
17+
"registry.redhat.io/ubi9/podman:latest",
18+
];
1519

1620
fn main() {
1721
if let Err(e) = try_main() {

0 commit comments

Comments
 (0)