@@ -372,6 +372,14 @@ pub(crate) struct InstallToFilesystemOpts {
372
372
373
373
#[ clap( flatten) ]
374
374
pub ( crate ) config_opts : InstallConfigOpts ,
375
+
376
+ #[ clap( long) ]
377
+ #[ cfg( feature = "composefs-backend" ) ]
378
+ pub ( crate ) composefs_native : bool ,
379
+
380
+ #[ cfg( feature = "composefs-backend" ) ]
381
+ #[ clap( flatten) ]
382
+ pub ( crate ) compoesfs_opts : InstallComposefsOpts ,
375
383
}
376
384
377
385
#[ derive( Debug , Clone , clap:: Parser , PartialEq , Eq ) ]
@@ -993,6 +1001,7 @@ pub(crate) fn exec_in_host_mountns(args: &[std::ffi::OsString]) -> Result<()> {
993
1001
Err ( Command :: new ( cmd) . args ( args) . arg0 ( bootc_utils:: NAME ) . exec ( ) ) . context ( "exec" ) ?
994
1002
}
995
1003
1004
+ #[ derive( Debug ) ]
996
1005
pub ( crate ) struct RootSetup {
997
1006
#[ cfg( feature = "install-to-disk" ) ]
998
1007
luks_device : Option < String > ,
@@ -1536,6 +1545,9 @@ async fn install_to_filesystem_impl(
1536
1545
}
1537
1546
}
1538
1547
1548
+ println ! ( "state: {state:#?}" ) ;
1549
+ println ! ( "root_setup: {rootfs:#?}" ) ;
1550
+
1539
1551
#[ cfg( feature = "composefs-backend" ) ]
1540
1552
if state. composefs_options . is_some ( ) {
1541
1553
// Load a fd for the mounted target physical root
@@ -1572,6 +1584,8 @@ pub(crate) async fn install_to_disk(mut opts: InstallToDiskOpts) -> Result<()> {
1572
1584
#[ cfg( feature = "composefs-backend" ) ]
1573
1585
opts. validate ( ) ?;
1574
1586
1587
+ println ! ( "install to disk opts: {opts:#?}" ) ;
1588
+
1575
1589
// Log the disk installation operation to systemd journal
1576
1590
const INSTALL_DISK_JOURNAL_ID : & str = "8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2" ;
1577
1591
let source_image = opts
@@ -1856,12 +1870,28 @@ pub(crate) async fn install_to_filesystem(
1856
1870
target_path
1857
1871
) ;
1858
1872
1873
+ println ! ( "opts: {opts:#?}" ) ;
1874
+
1859
1875
// Gather global state, destructuring the provided options.
1860
1876
// IMPORTANT: We might re-execute the current process in this function (for SELinux among other things)
1861
1877
// IMPORTANT: and hence anything that is done before MUST BE IDEMPOTENT.
1862
1878
// IMPORTANT: In practice, we should only be gathering information before this point,
1863
1879
// IMPORTANT: and not performing any mutations at all.
1864
- let state = prepare_install ( opts. config_opts , opts. source_opts , opts. target_opts , None ) . await ?;
1880
+ let state = prepare_install (
1881
+ opts. config_opts ,
1882
+ opts. source_opts ,
1883
+ opts. target_opts ,
1884
+ #[ cfg( feature = "composefs-backend" ) ]
1885
+ if opts. composefs_native {
1886
+ Some ( opts. compoesfs_opts )
1887
+ } else {
1888
+ None
1889
+ } ,
1890
+ #[ cfg( not( feature = "composefs-backend" ) ) ]
1891
+ None ,
1892
+ )
1893
+ . await ?;
1894
+
1865
1895
// And the last bit of state here is the fsopts, which we also destructure now.
1866
1896
let mut fsopts = opts. filesystem_opts ;
1867
1897
@@ -2129,6 +2159,13 @@ pub(crate) async fn install_to_existing_root(opts: InstallToExistingRootOpts) ->
2129
2159
source_opts : opts. source_opts ,
2130
2160
target_opts : opts. target_opts ,
2131
2161
config_opts : opts. config_opts ,
2162
+ #[ cfg( feature = "composefs-backend" ) ]
2163
+ composefs_native : false ,
2164
+ #[ cfg( feature = "composefs-backend" ) ]
2165
+ compoesfs_opts : InstallComposefsOpts {
2166
+ insecure : false ,
2167
+ bootloader : Bootloader :: Grub ,
2168
+ } ,
2132
2169
} ;
2133
2170
2134
2171
install_to_filesystem ( opts, true , cleanup) . await
0 commit comments