@@ -53,7 +53,6 @@ use serde::{Deserialize, Serialize};
5353
5454#[ cfg( feature = "install-to-disk" ) ]
5555use self :: baseline:: InstallBlockDeviceOpts ;
56- #[ cfg( feature = "composefs-backend" ) ]
5756use crate :: bootc_composefs:: { boot:: setup_composefs_boot, repo:: initialize_composefs_repository} ;
5857use crate :: boundimage:: { BoundImage , ResolvedBoundImage } ;
5958use crate :: containerenv:: ContainerExecutionInfo ;
@@ -66,7 +65,6 @@ use crate::task::Task;
6665use crate :: utils:: sigpolicy_from_opt;
6766use bootc_kernel_cmdline:: { bytes, utf8, INITRD_ARG_PREFIX , ROOTFLAGS } ;
6867use bootc_mount:: Filesystem ;
69- #[ cfg( feature = "composefs-backend" ) ]
7068use composefs:: fsverity:: FsVerityHashValue ;
7169
7270/// The toplevel boot directory
@@ -275,7 +273,6 @@ pub(crate) struct InstallToDiskOpts {
275273
276274 #[ clap( flatten) ]
277275 #[ serde( flatten) ]
278- #[ cfg( feature = "composefs-backend" ) ]
279276 pub ( crate ) composefs_opts : InstallComposefsOpts ,
280277}
281278
@@ -353,7 +350,6 @@ pub(crate) struct InstallToFilesystemOpts {
353350 #[ clap( flatten) ]
354351 pub ( crate ) config_opts : InstallConfigOpts ,
355352
356- #[ cfg( feature = "composefs-backend" ) ]
357353 #[ clap( flatten) ]
358354 pub ( crate ) composefs_opts : InstallComposefsOpts ,
359355}
@@ -388,7 +384,6 @@ pub(crate) struct InstallToExistingRootOpts {
388384 #[ clap( default_value = ALONGSIDE_ROOT_MOUNT ) ]
389385 pub ( crate ) root_path : Utf8PathBuf ,
390386
391- #[ cfg( feature = "composefs-backend" ) ]
392387 #[ clap( flatten) ]
393388 pub ( crate ) composefs_opts : InstallComposefsOpts ,
394389}
@@ -431,7 +426,6 @@ pub(crate) struct State {
431426 pub ( crate ) composefs_required : bool ,
432427
433428 // If Some, then --composefs_native is passed
434- #[ cfg( feature = "composefs-backend" ) ]
435429 pub ( crate ) composefs_options : InstallComposefsOpts ,
436430
437431 /// Detected bootloader type for the target system
@@ -562,7 +556,7 @@ impl FromStr for MountSpec {
562556 }
563557}
564558
565- #[ cfg( all ( feature = "install-to-disk" , feature = "composefs-backend" ) ) ]
559+ #[ cfg( feature = "install-to-disk" ) ]
566560impl InstallToDiskOpts {
567561 pub ( crate ) fn validate ( & self ) -> Result < ( ) > {
568562 if !self . composefs_opts . composefs_backend {
@@ -1218,19 +1212,15 @@ async fn verify_target_fetch(
12181212}
12191213
12201214fn root_has_uki ( root : & Dir ) -> Result < bool > {
1221- #[ cfg( feature = "composefs-backend" ) ]
1222- return crate :: bootc_composefs:: boot:: container_root_has_uki ( root) ;
1223-
1224- #[ cfg( not( feature = "composefs-backend" ) ) ]
1225- Ok ( false )
1215+ crate :: bootc_composefs:: boot:: container_root_has_uki ( root)
12261216}
12271217
12281218/// Preparation for an install; validates and prepares some (thereafter immutable) global state.
12291219async fn prepare_install (
12301220 config_opts : InstallConfigOpts ,
12311221 source_opts : InstallSourceOpts ,
12321222 target_opts : InstallTargetOpts ,
1233- # [ cfg ( feature = "composefs-backend" ) ] mut composefs_options : InstallComposefsOpts ,
1223+ mut composefs_options : InstallComposefsOpts ,
12341224) -> Result < Arc < State > > {
12351225 tracing:: trace!( "Preparing install" ) ;
12361226 let rootfs = cap_std:: fs:: Dir :: open_ambient_dir ( "/" , cap_std:: ambient_authority ( ) )
@@ -1305,7 +1295,6 @@ async fn prepare_install(
13051295
13061296 tracing:: debug!( "Composefs required: {composefs_required}" ) ;
13071297
1308- #[ cfg( feature = "composefs-backend" ) ]
13091298 if composefs_required {
13101299 composefs_options. composefs_backend = true ;
13111300 }
@@ -1378,7 +1367,6 @@ async fn prepare_install(
13781367
13791368 // Determine bootloader type for the target system
13801369 // Priority: user-specified > bootupd availability > systemd-boot fallback
1381- #[ cfg( feature = "composefs-backend" ) ]
13821370 let detected_bootloader = {
13831371 if let Some ( bootloader) = composefs_options. bootloader . clone ( ) {
13841372 bootloader
@@ -1390,8 +1378,6 @@ async fn prepare_install(
13901378 }
13911379 }
13921380 } ;
1393- #[ cfg( not( feature = "composefs-backend" ) ) ]
1394- let detected_bootloader = crate :: spec:: Bootloader :: Grub ;
13951381 println ! ( "Bootloader: {detected_bootloader}" ) ;
13961382
13971383 // Create our global (read-only) state which gets wrapped in an Arc
@@ -1410,7 +1396,6 @@ async fn prepare_install(
14101396 host_is_container,
14111397 composefs_required,
14121398 detected_bootloader,
1413- #[ cfg( feature = "composefs-backend" ) ]
14141399 composefs_options,
14151400 } ) ;
14161401
@@ -1582,7 +1567,6 @@ async fn install_to_filesystem_impl(
15821567 }
15831568 }
15841569
1585- #[ cfg( feature = "composefs-backend" ) ]
15861570 if state. composefs_options . composefs_backend {
15871571 // Load a fd for the mounted target physical root
15881572
@@ -1593,9 +1577,6 @@ async fn install_to_filesystem_impl(
15931577 ostree_install ( state, rootfs, cleanup) . await ?;
15941578 }
15951579
1596- #[ cfg( not( feature = "composefs-backend" ) ) ]
1597- ostree_install ( state, rootfs, cleanup) . await ?;
1598-
15991580 // Finalize mounted filesystems
16001581 if !rootfs. skip_finalize {
16011582 let bootfs = rootfs. boot . as_ref ( ) . map ( |_| ( "boot" , "boot" ) ) ;
@@ -1615,7 +1596,6 @@ fn installation_complete() {
16151596#[ context( "Installing to disk" ) ]
16161597#[ cfg( feature = "install-to-disk" ) ]
16171598pub ( crate ) async fn install_to_disk ( mut opts : InstallToDiskOpts ) -> Result < ( ) > {
1618- #[ cfg( feature = "composefs-backend" ) ]
16191599 opts. validate ( ) ?;
16201600
16211601 // Log the disk installation operation to systemd journal
@@ -1664,7 +1644,6 @@ pub(crate) async fn install_to_disk(mut opts: InstallToDiskOpts) -> Result<()> {
16641644 opts. config_opts ,
16651645 opts. source_opts ,
16661646 opts. target_opts ,
1667- #[ cfg( feature = "composefs-backend" ) ]
16681647 opts. composefs_opts ,
16691648 )
16701649 . await ?;
@@ -1902,7 +1881,6 @@ pub(crate) async fn install_to_filesystem(
19021881 opts. config_opts ,
19031882 opts. source_opts ,
19041883 opts. target_opts ,
1905- #[ cfg( feature = "composefs-backend" ) ]
19061884 opts. composefs_opts ,
19071885 )
19081886 . await ?;
@@ -2174,7 +2152,6 @@ pub(crate) async fn install_to_existing_root(opts: InstallToExistingRootOpts) ->
21742152 source_opts : opts. source_opts ,
21752153 target_opts : opts. target_opts ,
21762154 config_opts : opts. config_opts ,
2177- #[ cfg( feature = "composefs-backend" ) ]
21782155 composefs_opts : opts. composefs_opts ,
21792156 } ;
21802157
0 commit comments