@@ -25,7 +25,7 @@ use ostree_ext::sysroot::SysrootLock;
2525use ostree_ext:: tokio_util:: spawn_blocking_cancellable_flatten;
2626
2727use crate :: progress_jsonl:: { Event , ProgressWriter , SubTaskBytes , SubTaskStep } ;
28- use crate :: spec:: ImageReference ;
28+ use crate :: spec:: ImageReferenceSig ;
2929use crate :: spec:: { BootOrder , HostSpec } ;
3030use crate :: status:: labels_of_config;
3131use crate :: store:: Storage ;
@@ -49,7 +49,7 @@ const BOOTC_DERIVED_KEY: &str = "bootc.derived";
4949
5050/// Variant of HostSpec but required to be filled out
5151pub ( crate ) struct RequiredHostSpec < ' a > {
52- pub ( crate ) image : & ' a ImageReference ,
52+ pub ( crate ) image : & ' a ImageReferenceSig ,
5353}
5454
5555/// State of a locally fetched image
@@ -389,7 +389,7 @@ fn check_disk_space_inner(
389389 fd : impl AsFd ,
390390 bytes_to_fetch : u64 ,
391391 min_free : u64 ,
392- imgref : & ImageReference ,
392+ imgref : & ImageReferenceSig ,
393393) -> Result < ( ) > {
394394 let stat = rustix:: fs:: fstatvfs ( fd) ?;
395395 let bytes_avail = stat. f_bsize . checked_mul ( stat. f_bavail ) . unwrap_or ( u64:: MAX ) ;
@@ -412,7 +412,7 @@ fn check_disk_space_inner(
412412pub ( crate ) fn check_disk_space_ostree (
413413 repo : & ostree:: Repo ,
414414 image_meta : & PreparedImportMeta ,
415- imgref : & ImageReference ,
415+ imgref : & ImageReferenceSig ,
416416) -> Result < ( ) > {
417417 let min_free = repo. min_free_space_bytes ( ) . unwrap_or ( 0 ) ;
418418 check_disk_space_inner (
@@ -428,7 +428,7 @@ pub(crate) fn check_disk_space_ostree(
428428pub ( crate ) fn check_disk_space_unified (
429429 cfs : & crate :: store:: ComposefsRepository ,
430430 image_meta : & PreparedImportMeta ,
431- imgref : & ImageReference ,
431+ imgref : & ImageReferenceSig ,
432432) -> Result < ( ) > {
433433 check_disk_space_inner ( cfs. objects_dir ( ) ?, image_meta. bytes_to_fetch , 0 , imgref)
434434}
@@ -438,7 +438,7 @@ pub(crate) fn check_disk_space_unified(
438438pub ( crate ) fn check_disk_space_composefs (
439439 cfs : & crate :: store:: ComposefsRepository ,
440440 manifest : & ostree_ext:: oci_spec:: image:: ImageManifest ,
441- imgref : & ImageReference ,
441+ imgref : & ImageReferenceSig ,
442442) -> Result < ( ) > {
443443 let bytes_to_fetch: u64 = manifest
444444 . layers ( )
@@ -465,7 +465,7 @@ pub(crate) enum PreparedPullResult {
465465
466466pub ( crate ) async fn prepare_for_pull (
467467 repo : & ostree:: Repo ,
468- imgref : & ImageReference ,
468+ imgref : & ImageReferenceSig ,
469469 target_imgref : Option < & OstreeImageReference > ,
470470 booted_deployment : Option < & ostree:: Deployment > ,
471471) -> Result < PreparedPullResult > {
@@ -512,7 +512,7 @@ pub(crate) async fn prepare_for_pull(
512512/// Returns true if the image exists in bootc storage.
513513pub ( crate ) async fn image_exists_in_unified_storage (
514514 store : & Storage ,
515- imgref : & ImageReference ,
515+ imgref : & ImageReferenceSig ,
516516) -> Result < bool > {
517517 let imgstore = store. get_ensure_imgstore ( ) ?;
518518 let image_ref_str = imgref. to_transport_image ( ) ?;
@@ -523,7 +523,7 @@ pub(crate) async fn image_exists_in_unified_storage(
523523/// This reuses the same infrastructure as LBIs.
524524pub ( crate ) async fn prepare_for_pull_unified (
525525 repo : & ostree:: Repo ,
526- imgref : & ImageReference ,
526+ imgref : & ImageReferenceSig ,
527527 target_imgref : Option < & OstreeImageReference > ,
528528 store : & Storage ,
529529 booted_deployment : Option < & ostree:: Deployment > ,
@@ -549,7 +549,7 @@ pub(crate) async fn prepare_for_pull_unified(
549549
550550 // Now create a containers-storage reference to read from bootc storage
551551 tracing:: info!( "Unified pull: now importing from containers-storage transport" ) ;
552- let containers_storage_imgref = ImageReference {
552+ let containers_storage_imgref = ImageReferenceSig {
553553 transport : "containers-storage" . to_string ( ) ,
554554 image : imgref. image . clone ( ) ,
555555 signature : imgref. signature . clone ( ) ,
@@ -615,7 +615,7 @@ pub(crate) async fn prepare_for_pull_unified(
615615/// Unified pull: Use podman to pull to containers-storage, then read from there
616616pub ( crate ) async fn pull_unified (
617617 repo : & ostree:: Repo ,
618- imgref : & ImageReference ,
618+ imgref : & ImageReferenceSig ,
619619 target_imgref : Option < & OstreeImageReference > ,
620620 quiet : bool ,
621621 prog : ProgressWriter ,
@@ -643,7 +643,7 @@ pub(crate) async fn pull_unified(
643643 imgref,
644644 ) ?;
645645 // To avoid duplicate success logs, pass a containers-storage imgref to the importer
646- let cs_imgref = ImageReference {
646+ let cs_imgref = ImageReferenceSig {
647647 transport : "containers-storage" . to_string ( ) ,
648648 image : imgref. image . clone ( ) ,
649649 signature : imgref. signature . clone ( ) ,
@@ -655,7 +655,7 @@ pub(crate) async fn pull_unified(
655655
656656#[ context( "Pulling" ) ]
657657pub ( crate ) async fn pull_from_prepared (
658- imgref : & ImageReference ,
658+ imgref : & ImageReferenceSig ,
659659 quiet : bool ,
660660 prog : ProgressWriter ,
661661 mut prepared_image : PreparedImportMeta ,
@@ -730,7 +730,7 @@ pub(crate) async fn pull_from_prepared(
730730/// Wrapper for pulling a container image, wiring up status output.
731731pub ( crate ) async fn pull (
732732 repo : & ostree:: Repo ,
733- imgref : & ImageReference ,
733+ imgref : & ImageReferenceSig ,
734734 target_imgref : Option < & OstreeImageReference > ,
735735 quiet : bool ,
736736 prog : ProgressWriter ,
@@ -923,7 +923,7 @@ async fn deploy(
923923}
924924
925925#[ context( "Generating origin" ) ]
926- fn origin_from_imageref ( imgref : & ImageReference ) -> Result < glib:: KeyFile > {
926+ fn origin_from_imageref ( imgref : & ImageReferenceSig ) -> Result < glib:: KeyFile > {
927927 let origin = glib:: KeyFile :: new ( ) ;
928928 let imgref = OstreeImageReference :: from ( imgref. clone ( ) ) ;
929929 origin. set_string (
@@ -1216,7 +1216,7 @@ fn find_newest_deployment_name(deploysdir: &Dir) -> Result<String> {
12161216}
12171217
12181218// Implementation of `bootc switch --in-place`
1219- pub ( crate ) fn switch_origin_inplace ( root : & Dir , imgref : & ImageReference ) -> Result < String > {
1219+ pub ( crate ) fn switch_origin_inplace ( root : & Dir , imgref : & ImageReferenceSig ) -> Result < String > {
12201220 // Log the in-place switch operation to systemd journal
12211221 const SWITCH_INPLACE_JOURNAL_ID : & str = "3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7" ;
12221222
@@ -1386,7 +1386,7 @@ mod tests {
13861386 builder,
13871387 ) ?;
13881388 let deploydir = & td. open_dir ( deploydir) ?;
1389- let orig_imgref = ImageReference {
1389+ let orig_imgref = ImageReferenceSig {
13901390 image : "quay.io/exampleos/original:sometag" . into ( ) ,
13911391 transport : "registry" . into ( ) ,
13921392 signature : None ,
@@ -1399,7 +1399,7 @@ mod tests {
13991399 ) ?;
14001400 }
14011401
1402- let target_imgref = ImageReference {
1402+ let target_imgref = ImageReferenceSig {
14031403 image : "quay.io/someother/otherimage:latest" . into ( ) ,
14041404 transport : "registry" . into ( ) ,
14051405 signature : None ,
@@ -1466,7 +1466,7 @@ UUID=6907-17CA /boot/efi vfat umask=0077,shortname=win
14661466 #[ test]
14671467 fn test_check_disk_space_inner ( ) -> Result < ( ) > {
14681468 let td = cap_std_ext:: cap_tempfile:: TempDir :: new ( cap_std:: ambient_authority ( ) ) ?;
1469- let imgref = ImageReference {
1469+ let imgref = ImageReferenceSig {
14701470 image : "quay.io/exampleos/exampleos:latest" . into ( ) ,
14711471 transport : "registry" . into ( ) ,
14721472 signature : None ,
0 commit comments