@@ -24,7 +24,7 @@ use ostree_ext::sysroot::SysrootLock;
2424use ostree_ext:: tokio_util:: spawn_blocking_cancellable_flatten;
2525
2626use crate :: progress_jsonl:: { Event , ProgressWriter , SubTaskBytes , SubTaskStep } ;
27- use crate :: spec:: ImageReference ;
27+ use crate :: spec:: ImageReferenceSig ;
2828use crate :: spec:: { BootOrder , HostSpec } ;
2929use crate :: status:: labels_of_config;
3030use crate :: store:: Storage ;
@@ -48,7 +48,7 @@ const BOOTC_DERIVED_KEY: &str = "bootc.derived";
4848
4949/// Variant of HostSpec but required to be filled out
5050pub ( crate ) struct RequiredHostSpec < ' a > {
51- pub ( crate ) image : & ' a ImageReference ,
51+ pub ( crate ) image : & ' a ImageReferenceSig ,
5252}
5353
5454/// State of a locally fetched image
@@ -388,7 +388,7 @@ fn check_disk_space_inner(
388388 fd : impl AsFd ,
389389 bytes_to_fetch : u64 ,
390390 min_free : u64 ,
391- imgref : & ImageReference ,
391+ imgref : & ImageReferenceSig ,
392392) -> Result < ( ) > {
393393 let stat = rustix:: fs:: fstatvfs ( fd) ?;
394394 let bytes_avail = stat. f_bsize . checked_mul ( stat. f_bavail ) . unwrap_or ( u64:: MAX ) ;
@@ -411,7 +411,7 @@ fn check_disk_space_inner(
411411pub ( crate ) fn check_disk_space_ostree (
412412 repo : & ostree:: Repo ,
413413 image_meta : & PreparedImportMeta ,
414- imgref : & ImageReference ,
414+ imgref : & ImageReferenceSig ,
415415) -> Result < ( ) > {
416416 let min_free = repo. min_free_space_bytes ( ) . unwrap_or ( 0 ) ;
417417 check_disk_space_inner (
@@ -427,7 +427,7 @@ pub(crate) fn check_disk_space_ostree(
427427pub ( crate ) fn check_disk_space_unified (
428428 cfs : & crate :: store:: ComposefsRepository ,
429429 image_meta : & PreparedImportMeta ,
430- imgref : & ImageReference ,
430+ imgref : & ImageReferenceSig ,
431431) -> Result < ( ) > {
432432 check_disk_space_inner ( cfs. objects_dir ( ) ?, image_meta. bytes_to_fetch , 0 , imgref)
433433}
@@ -437,7 +437,7 @@ pub(crate) fn check_disk_space_unified(
437437pub ( crate ) fn check_disk_space_composefs (
438438 cfs : & crate :: store:: ComposefsRepository ,
439439 manifest : & ostree_ext:: oci_spec:: image:: ImageManifest ,
440- imgref : & ImageReference ,
440+ imgref : & ImageReferenceSig ,
441441) -> Result < ( ) > {
442442 let bytes_to_fetch: u64 = manifest
443443 . layers ( )
@@ -464,7 +464,7 @@ pub(crate) enum PreparedPullResult {
464464
465465pub ( crate ) async fn prepare_for_pull (
466466 repo : & ostree:: Repo ,
467- imgref : & ImageReference ,
467+ imgref : & ImageReferenceSig ,
468468 target_imgref : Option < & OstreeImageReference > ,
469469 booted_deployment : Option < & ostree:: Deployment > ,
470470) -> Result < PreparedPullResult > {
@@ -511,7 +511,7 @@ pub(crate) async fn prepare_for_pull(
511511/// Returns true if the image exists in bootc storage.
512512pub ( crate ) async fn image_exists_in_unified_storage (
513513 store : & Storage ,
514- imgref : & ImageReference ,
514+ imgref : & ImageReferenceSig ,
515515) -> Result < bool > {
516516 let imgstore = store. get_ensure_imgstore ( ) ?;
517517 let image_ref_str = imgref. to_transport_image ( ) ?;
@@ -522,7 +522,7 @@ pub(crate) async fn image_exists_in_unified_storage(
522522/// This reuses the same infrastructure as LBIs.
523523pub ( crate ) async fn prepare_for_pull_unified (
524524 repo : & ostree:: Repo ,
525- imgref : & ImageReference ,
525+ imgref : & ImageReferenceSig ,
526526 target_imgref : Option < & OstreeImageReference > ,
527527 store : & Storage ,
528528 booted_deployment : Option < & ostree:: Deployment > ,
@@ -548,7 +548,7 @@ pub(crate) async fn prepare_for_pull_unified(
548548
549549 // Now create a containers-storage reference to read from bootc storage
550550 tracing:: info!( "Unified pull: now importing from containers-storage transport" ) ;
551- let containers_storage_imgref = ImageReference {
551+ let containers_storage_imgref = ImageReferenceSig {
552552 transport : "containers-storage" . to_string ( ) ,
553553 image : imgref. image . clone ( ) ,
554554 signature : imgref. signature . clone ( ) ,
@@ -614,7 +614,7 @@ pub(crate) async fn prepare_for_pull_unified(
614614/// Unified pull: Use podman to pull to containers-storage, then read from there
615615pub ( crate ) async fn pull_unified (
616616 repo : & ostree:: Repo ,
617- imgref : & ImageReference ,
617+ imgref : & ImageReferenceSig ,
618618 target_imgref : Option < & OstreeImageReference > ,
619619 quiet : bool ,
620620 prog : ProgressWriter ,
@@ -642,7 +642,7 @@ pub(crate) async fn pull_unified(
642642 imgref,
643643 ) ?;
644644 // To avoid duplicate success logs, pass a containers-storage imgref to the importer
645- let cs_imgref = ImageReference {
645+ let cs_imgref = ImageReferenceSig {
646646 transport : "containers-storage" . to_string ( ) ,
647647 image : imgref. image . clone ( ) ,
648648 signature : imgref. signature . clone ( ) ,
@@ -654,7 +654,7 @@ pub(crate) async fn pull_unified(
654654
655655#[ context( "Pulling" ) ]
656656pub ( crate ) async fn pull_from_prepared (
657- imgref : & ImageReference ,
657+ imgref : & ImageReferenceSig ,
658658 quiet : bool ,
659659 prog : ProgressWriter ,
660660 mut prepared_image : PreparedImportMeta ,
@@ -729,7 +729,7 @@ pub(crate) async fn pull_from_prepared(
729729/// Wrapper for pulling a container image, wiring up status output.
730730pub ( crate ) async fn pull (
731731 repo : & ostree:: Repo ,
732- imgref : & ImageReference ,
732+ imgref : & ImageReferenceSig ,
733733 target_imgref : Option < & OstreeImageReference > ,
734734 quiet : bool ,
735735 prog : ProgressWriter ,
@@ -922,7 +922,7 @@ async fn deploy(
922922}
923923
924924#[ context( "Generating origin" ) ]
925- fn origin_from_imageref ( imgref : & ImageReference ) -> Result < glib:: KeyFile > {
925+ fn origin_from_imageref ( imgref : & ImageReferenceSig ) -> Result < glib:: KeyFile > {
926926 let origin = glib:: KeyFile :: new ( ) ;
927927 let imgref = OstreeImageReference :: from ( imgref. clone ( ) ) ;
928928 origin. set_string (
@@ -1215,7 +1215,7 @@ fn find_newest_deployment_name(deploysdir: &Dir) -> Result<String> {
12151215}
12161216
12171217// Implementation of `bootc switch --in-place`
1218- pub ( crate ) fn switch_origin_inplace ( root : & Dir , imgref : & ImageReference ) -> Result < String > {
1218+ pub ( crate ) fn switch_origin_inplace ( root : & Dir , imgref : & ImageReferenceSig ) -> Result < String > {
12191219 // Log the in-place switch operation to systemd journal
12201220 const SWITCH_INPLACE_JOURNAL_ID : & str = "3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7" ;
12211221
@@ -1385,7 +1385,7 @@ mod tests {
13851385 builder,
13861386 ) ?;
13871387 let deploydir = & td. open_dir ( deploydir) ?;
1388- let orig_imgref = ImageReference {
1388+ let orig_imgref = ImageReferenceSig {
13891389 image : "quay.io/exampleos/original:sometag" . into ( ) ,
13901390 transport : "registry" . into ( ) ,
13911391 signature : None ,
@@ -1398,7 +1398,7 @@ mod tests {
13981398 ) ?;
13991399 }
14001400
1401- let target_imgref = ImageReference {
1401+ let target_imgref = ImageReferenceSig {
14021402 image : "quay.io/someother/otherimage:latest" . into ( ) ,
14031403 transport : "registry" . into ( ) ,
14041404 signature : None ,
@@ -1465,7 +1465,7 @@ UUID=6907-17CA /boot/efi vfat umask=0077,shortname=win
14651465 #[ test]
14661466 fn test_check_disk_space_inner ( ) -> Result < ( ) > {
14671467 let td = cap_std_ext:: cap_tempfile:: TempDir :: new ( cap_std:: ambient_authority ( ) ) ?;
1468- let imgref = ImageReference {
1468+ let imgref = ImageReferenceSig {
14691469 image : "quay.io/exampleos/exampleos:latest" . into ( ) ,
14701470 transport : "registry" . into ( ) ,
14711471 signature : None ,
0 commit comments