@@ -348,6 +348,14 @@ pub(crate) struct InstallToFilesystemOpts {
348348
349349 #[ clap( flatten) ]
350350 pub ( crate ) config_opts : InstallConfigOpts ,
351+
352+ #[ clap( long) ]
353+ #[ cfg( feature = "composefs-backend" ) ]
354+ pub ( crate ) composefs_native : bool ,
355+
356+ #[ cfg( feature = "composefs-backend" ) ]
357+ #[ clap( flatten) ]
358+ pub ( crate ) compoesfs_opts : InstallComposefsOpts ,
351359}
352360
353361#[ derive( Debug , Clone , clap:: Parser , PartialEq , Eq ) ]
@@ -969,6 +977,7 @@ pub(crate) fn exec_in_host_mountns(args: &[std::ffi::OsString]) -> Result<()> {
969977 Err ( Command :: new ( cmd) . args ( args) . arg0 ( bootc_utils:: NAME ) . exec ( ) ) . context ( "exec" ) ?
970978}
971979
980+ #[ derive( Debug ) ]
972981pub ( crate ) struct RootSetup {
973982 #[ cfg( feature = "install-to-disk" ) ]
974983 luks_device : Option < String > ,
@@ -1512,6 +1521,9 @@ async fn install_to_filesystem_impl(
15121521 }
15131522 }
15141523
1524+ println ! ( "state: {state:#?}" ) ;
1525+ println ! ( "root_setup: {rootfs:#?}" ) ;
1526+
15151527 #[ cfg( feature = "composefs-backend" ) ]
15161528 if state. composefs_options . is_some ( ) {
15171529 // Load a fd for the mounted target physical root
@@ -1548,6 +1560,8 @@ pub(crate) async fn install_to_disk(mut opts: InstallToDiskOpts) -> Result<()> {
15481560 #[ cfg( feature = "composefs-backend" ) ]
15491561 opts. validate ( ) ?;
15501562
1563+ println ! ( "install to disk opts: {opts:#?}" ) ;
1564+
15511565 // Log the disk installation operation to systemd journal
15521566 const INSTALL_DISK_JOURNAL_ID : & str = "8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2" ;
15531567 let source_image = opts
@@ -1832,12 +1846,28 @@ pub(crate) async fn install_to_filesystem(
18321846 target_path
18331847 ) ;
18341848
1849+ println ! ( "opts: {opts:#?}" ) ;
1850+
18351851 // Gather global state, destructuring the provided options.
18361852 // IMPORTANT: We might re-execute the current process in this function (for SELinux among other things)
18371853 // IMPORTANT: and hence anything that is done before MUST BE IDEMPOTENT.
18381854 // IMPORTANT: In practice, we should only be gathering information before this point,
18391855 // IMPORTANT: and not performing any mutations at all.
1840- let state = prepare_install ( opts. config_opts , opts. source_opts , opts. target_opts , None ) . await ?;
1856+ let state = prepare_install (
1857+ opts. config_opts ,
1858+ opts. source_opts ,
1859+ opts. target_opts ,
1860+ #[ cfg( feature = "composefs-backend" ) ]
1861+ if opts. composefs_native {
1862+ Some ( opts. compoesfs_opts )
1863+ } else {
1864+ None
1865+ } ,
1866+ #[ cfg( not( feature = "composefs-backend" ) ) ]
1867+ None ,
1868+ )
1869+ . await ?;
1870+
18411871 // And the last bit of state here is the fsopts, which we also destructure now.
18421872 let mut fsopts = opts. filesystem_opts ;
18431873
@@ -2105,6 +2135,13 @@ pub(crate) async fn install_to_existing_root(opts: InstallToExistingRootOpts) ->
21052135 source_opts : opts. source_opts ,
21062136 target_opts : opts. target_opts ,
21072137 config_opts : opts. config_opts ,
2138+ #[ cfg( feature = "composefs-backend" ) ]
2139+ composefs_native : false ,
2140+ #[ cfg( feature = "composefs-backend" ) ]
2141+ compoesfs_opts : InstallComposefsOpts {
2142+ insecure : false ,
2143+ bootloader : Bootloader :: Grub ,
2144+ } ,
21082145 } ;
21092146
21102147 install_to_filesystem ( opts, true , cleanup) . await
0 commit comments