@@ -333,8 +333,6 @@ pub(crate) struct SourceInfo {
333
333
pub ( crate ) selinux : bool ,
334
334
/// Whether the source is available in the host mount namespace
335
335
pub ( crate ) in_host_mountns : bool ,
336
- /// Whether we were invoked with -v /var/lib/containers:/var/lib/containers
337
- pub ( crate ) have_host_container_storage : bool ,
338
336
}
339
337
340
338
// Shared read-only global state
@@ -516,38 +514,13 @@ impl SourceInfo {
516
514
tracing:: debug!( "Finding digest for image ID {}" , container_info. imageid) ;
517
515
let digest = crate :: podman:: imageid_to_digest ( & container_info. imageid ) ?;
518
516
519
- let have_host_container_storage = Utf8Path :: new ( crate :: podman:: CONTAINER_STORAGE )
520
- . try_exists ( ) ?
521
- && ostree_ext:: mountutil:: is_mountpoint (
522
- & root,
523
- crate :: podman:: CONTAINER_STORAGE . trim_start_matches ( '/' ) ,
524
- ) ?
525
- . unwrap_or_default ( ) ;
526
-
527
- // Verify up front we can do the fetch
528
- if have_host_container_storage {
529
- tracing:: debug!( "Host container storage found" ) ;
530
- } else {
531
- tracing:: debug!(
532
- "No {} mount available, checking skopeo" ,
533
- crate :: podman:: CONTAINER_STORAGE
534
- ) ;
535
- require_skopeo_with_containers_storage ( ) ?;
536
- }
537
-
538
- Self :: new (
539
- imageref,
540
- Some ( digest) ,
541
- root,
542
- true ,
543
- have_host_container_storage,
544
- )
517
+ Self :: new ( imageref, Some ( digest) , root, true )
545
518
}
546
519
547
520
#[ context( "Creating source info from a given imageref" ) ]
548
521
pub ( crate ) fn from_imageref ( imageref : & str , root : & Dir ) -> Result < Self > {
549
522
let imageref = ostree_container:: ImageReference :: try_from ( imageref) ?;
550
- Self :: new ( imageref, None , root, false , false )
523
+ Self :: new ( imageref, None , root, false )
551
524
}
552
525
553
526
fn have_selinux_from_repo ( root : & Dir ) -> Result < bool > {
@@ -573,7 +546,6 @@ impl SourceInfo {
573
546
digest : Option < String > ,
574
547
root : & Dir ,
575
548
in_host_mountns : bool ,
576
- have_host_container_storage : bool ,
577
549
) -> Result < Self > {
578
550
let selinux = if Path :: new ( "/ostree/repo" ) . try_exists ( ) ? {
579
551
Self :: have_selinux_from_repo ( root) ?
@@ -585,7 +557,6 @@ impl SourceInfo {
585
557
digest,
586
558
selinux,
587
559
in_host_mountns,
588
- have_host_container_storage,
589
560
} )
590
561
}
591
562
}
@@ -716,19 +687,7 @@ async fn install_container(
716
687
}
717
688
} ;
718
689
719
- // We need to fetch the container image from the root mount namespace. If
720
- // we don't have /var/lib/containers mounted in this image, fork off skopeo
721
- // in the host mountnfs.
722
- let skopeo_cmd = if !state. source . have_host_container_storage {
723
- Some ( run_in_host_mountns ( "skopeo" ) )
724
- } else {
725
- None
726
- } ;
727
- let proxy_cfg = ostree_container:: store:: ImageProxyConfig {
728
- skopeo_cmd,
729
- ..Default :: default ( )
730
- } ;
731
-
690
+ let proxy_cfg = ostree_container:: store:: ImageProxyConfig :: default ( ) ;
732
691
( src_imageref, Some ( proxy_cfg) )
733
692
} ;
734
693
let src_imageref = ostree_container:: OstreeImageReference {
@@ -895,32 +854,6 @@ pub(crate) fn exec_in_host_mountns(args: &[std::ffi::OsString]) -> Result<()> {
895
854
Err ( Command :: new ( cmd) . args ( args) . exec ( ) ) . context ( "exec" ) ?
896
855
}
897
856
898
- #[ context( "Querying skopeo version" ) ]
899
- fn require_skopeo_with_containers_storage ( ) -> Result < ( ) > {
900
- let out = Task :: new_cmd ( "skopeo --version" , run_in_host_mountns ( "skopeo" ) )
901
- . args ( [ "--version" ] )
902
- . quiet ( )
903
- . read ( )
904
- . context ( "Failed to run skopeo (it currently must be installed in the host root)" ) ?;
905
- let mut v = out
906
- . strip_prefix ( "skopeo version " )
907
- . map ( |v| v. split ( '.' ) )
908
- . ok_or_else ( || anyhow:: anyhow!( "Unexpected output from skopeo version" ) ) ?;
909
- let major = v
910
- . next ( )
911
- . ok_or_else ( || anyhow:: anyhow!( "Missing major version" ) ) ?;
912
- let minor = v
913
- . next ( )
914
- . ok_or_else ( || anyhow:: anyhow!( "Missing minor version" ) ) ?;
915
- let ( major, minor) = ( major. parse :: < u64 > ( ) ?, minor. parse :: < u64 > ( ) ?) ;
916
- let supported = major > 1 || minor > 10 ;
917
- if supported {
918
- Ok ( ( ) )
919
- } else {
920
- anyhow:: bail!( "skopeo >= 1.11 is required on host" )
921
- }
922
- }
923
-
924
857
pub ( crate ) struct RootSetup {
925
858
luks_device : Option < String > ,
926
859
device_info : crate :: blockdev:: PartitionTable ,
0 commit comments