@@ -355,6 +355,14 @@ pub(crate) struct InstallToFilesystemOpts {
355
355
356
356
#[ clap( flatten) ]
357
357
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 ,
358
366
}
359
367
360
368
#[ derive( Debug , Clone , clap:: Parser , PartialEq , Eq ) ]
@@ -976,6 +984,7 @@ pub(crate) fn exec_in_host_mountns(args: &[std::ffi::OsString]) -> Result<()> {
976
984
Err ( Command :: new ( cmd) . args ( args) . arg0 ( bootc_utils:: NAME ) . exec ( ) ) . context ( "exec" ) ?
977
985
}
978
986
987
+ #[ derive( Debug ) ]
979
988
pub ( crate ) struct RootSetup {
980
989
#[ cfg( feature = "install-to-disk" ) ]
981
990
luks_device : Option < String > ,
@@ -1519,6 +1528,9 @@ async fn install_to_filesystem_impl(
1519
1528
}
1520
1529
}
1521
1530
1531
+ println ! ( "state: {state:#?}" ) ;
1532
+ println ! ( "root_setup: {rootfs:#?}" ) ;
1533
+
1522
1534
#[ cfg( feature = "composefs-backend" ) ]
1523
1535
if state. composefs_options . is_some ( ) {
1524
1536
// Load a fd for the mounted target physical root
@@ -1555,6 +1567,8 @@ pub(crate) async fn install_to_disk(mut opts: InstallToDiskOpts) -> Result<()> {
1555
1567
#[ cfg( feature = "composefs-backend" ) ]
1556
1568
opts. validate ( ) ?;
1557
1569
1570
+ println ! ( "install to disk opts: {opts:#?}" ) ;
1571
+
1558
1572
// Log the disk installation operation to systemd journal
1559
1573
const INSTALL_DISK_JOURNAL_ID : & str = "8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2" ;
1560
1574
let source_image = opts
@@ -1839,12 +1853,28 @@ pub(crate) async fn install_to_filesystem(
1839
1853
target_path
1840
1854
) ;
1841
1855
1856
+ println ! ( "opts: {opts:#?}" ) ;
1857
+
1842
1858
// Gather global state, destructuring the provided options.
1843
1859
// IMPORTANT: We might re-execute the current process in this function (for SELinux among other things)
1844
1860
// IMPORTANT: and hence anything that is done before MUST BE IDEMPOTENT.
1845
1861
// IMPORTANT: In practice, we should only be gathering information before this point,
1846
1862
// 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
+
1848
1878
// And the last bit of state here is the fsopts, which we also destructure now.
1849
1879
let mut fsopts = opts. filesystem_opts ;
1850
1880
@@ -2112,6 +2142,13 @@ pub(crate) async fn install_to_existing_root(opts: InstallToExistingRootOpts) ->
2112
2142
source_opts : opts. source_opts ,
2113
2143
target_opts : opts. target_opts ,
2114
2144
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
+ } ,
2115
2152
} ;
2116
2153
2117
2154
install_to_filesystem ( opts, true , cleanup) . await
0 commit comments