@@ -355,6 +355,14 @@ pub(crate) struct InstallToFilesystemOpts {
355355
356356 #[ clap( flatten) ]
357357 pub ( crate ) config_opts : InstallConfigOpts ,
358+
359+ #[ clap( long) ]
360+ #[ cfg( feature = "composefs-backend" ) ]
361+ pub ( crate ) composefs_native : bool ,
362+
363+ #[ cfg( feature = "composefs-backend" ) ]
364+ #[ clap( flatten) ]
365+ pub ( crate ) compoesfs_opts : InstallComposefsOpts ,
358366}
359367
360368#[ derive( Debug , Clone , clap:: Parser , PartialEq , Eq ) ]
@@ -976,6 +984,7 @@ pub(crate) fn exec_in_host_mountns(args: &[std::ffi::OsString]) -> Result<()> {
976984 Err ( Command :: new ( cmd) . args ( args) . arg0 ( bootc_utils:: NAME ) . exec ( ) ) . context ( "exec" ) ?
977985}
978986
987+ #[ derive( Debug ) ]
979988pub ( crate ) struct RootSetup {
980989 #[ cfg( feature = "install-to-disk" ) ]
981990 luks_device : Option < String > ,
@@ -1519,6 +1528,9 @@ async fn install_to_filesystem_impl(
15191528 }
15201529 }
15211530
1531+ println ! ( "state: {state:#?}" ) ;
1532+ println ! ( "root_setup: {rootfs:#?}" ) ;
1533+
15221534 #[ cfg( feature = "composefs-backend" ) ]
15231535 if state. composefs_options . is_some ( ) {
15241536 // Load a fd for the mounted target physical root
@@ -1555,6 +1567,8 @@ pub(crate) async fn install_to_disk(mut opts: InstallToDiskOpts) -> Result<()> {
15551567 #[ cfg( feature = "composefs-backend" ) ]
15561568 opts. validate ( ) ?;
15571569
1570+ println ! ( "install to disk opts: {opts:#?}" ) ;
1571+
15581572 // Log the disk installation operation to systemd journal
15591573 const INSTALL_DISK_JOURNAL_ID : & str = "8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2" ;
15601574 let source_image = opts
@@ -1839,12 +1853,28 @@ pub(crate) async fn install_to_filesystem(
18391853 target_path
18401854 ) ;
18411855
1856+ println ! ( "opts: {opts:#?}" ) ;
1857+
18421858 // Gather global state, destructuring the provided options.
18431859 // IMPORTANT: We might re-execute the current process in this function (for SELinux among other things)
18441860 // IMPORTANT: and hence anything that is done before MUST BE IDEMPOTENT.
18451861 // IMPORTANT: In practice, we should only be gathering information before this point,
18461862 // IMPORTANT: and not performing any mutations at all.
1847- let state = prepare_install ( opts. config_opts , opts. source_opts , opts. target_opts , None ) . await ?;
1863+ let state = prepare_install (
1864+ opts. config_opts ,
1865+ opts. source_opts ,
1866+ opts. target_opts ,
1867+ #[ cfg( feature = "composefs-backend" ) ]
1868+ if opts. composefs_native {
1869+ Some ( opts. compoesfs_opts )
1870+ } else {
1871+ None
1872+ } ,
1873+ #[ cfg( not( feature = "composefs-backend" ) ) ]
1874+ None ,
1875+ )
1876+ . await ?;
1877+
18481878 // And the last bit of state here is the fsopts, which we also destructure now.
18491879 let mut fsopts = opts. filesystem_opts ;
18501880
@@ -2112,6 +2142,13 @@ pub(crate) async fn install_to_existing_root(opts: InstallToExistingRootOpts) ->
21122142 source_opts : opts. source_opts ,
21132143 target_opts : opts. target_opts ,
21142144 config_opts : opts. config_opts ,
2145+ #[ cfg( feature = "composefs-backend" ) ]
2146+ composefs_native : false ,
2147+ #[ cfg( feature = "composefs-backend" ) ]
2148+ compoesfs_opts : InstallComposefsOpts {
2149+ insecure : false ,
2150+ bootloader : Bootloader :: Grub ,
2151+ } ,
21152152 } ;
21162153
21172154 install_to_filesystem ( opts, true , cleanup) . await
0 commit comments