@@ -348,6 +348,14 @@ pub(crate) struct InstallToFilesystemOpts {
348
348
349
349
#[ clap( flatten) ]
350
350
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 ,
351
359
}
352
360
353
361
#[ derive( Debug , Clone , clap:: Parser , PartialEq , Eq ) ]
@@ -969,6 +977,7 @@ pub(crate) fn exec_in_host_mountns(args: &[std::ffi::OsString]) -> Result<()> {
969
977
Err ( Command :: new ( cmd) . args ( args) . arg0 ( bootc_utils:: NAME ) . exec ( ) ) . context ( "exec" ) ?
970
978
}
971
979
980
+ #[ derive( Debug ) ]
972
981
pub ( crate ) struct RootSetup {
973
982
#[ cfg( feature = "install-to-disk" ) ]
974
983
luks_device : Option < String > ,
@@ -1512,6 +1521,9 @@ async fn install_to_filesystem_impl(
1512
1521
}
1513
1522
}
1514
1523
1524
+ println ! ( "state: {state:#?}" ) ;
1525
+ println ! ( "root_setup: {rootfs:#?}" ) ;
1526
+
1515
1527
#[ cfg( feature = "composefs-backend" ) ]
1516
1528
if state. composefs_options . is_some ( ) {
1517
1529
// Load a fd for the mounted target physical root
@@ -1548,6 +1560,8 @@ pub(crate) async fn install_to_disk(mut opts: InstallToDiskOpts) -> Result<()> {
1548
1560
#[ cfg( feature = "composefs-backend" ) ]
1549
1561
opts. validate ( ) ?;
1550
1562
1563
+ println ! ( "install to disk opts: {opts:#?}" ) ;
1564
+
1551
1565
// Log the disk installation operation to systemd journal
1552
1566
const INSTALL_DISK_JOURNAL_ID : & str = "8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2" ;
1553
1567
let source_image = opts
@@ -1832,12 +1846,28 @@ pub(crate) async fn install_to_filesystem(
1832
1846
target_path
1833
1847
) ;
1834
1848
1849
+ println ! ( "opts: {opts:#?}" ) ;
1850
+
1835
1851
// Gather global state, destructuring the provided options.
1836
1852
// IMPORTANT: We might re-execute the current process in this function (for SELinux among other things)
1837
1853
// IMPORTANT: and hence anything that is done before MUST BE IDEMPOTENT.
1838
1854
// IMPORTANT: In practice, we should only be gathering information before this point,
1839
1855
// 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
+
1841
1871
// And the last bit of state here is the fsopts, which we also destructure now.
1842
1872
let mut fsopts = opts. filesystem_opts ;
1843
1873
@@ -2105,6 +2135,13 @@ pub(crate) async fn install_to_existing_root(opts: InstallToExistingRootOpts) ->
2105
2135
source_opts : opts. source_opts ,
2106
2136
target_opts : opts. target_opts ,
2107
2137
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
+ } ,
2108
2145
} ;
2109
2146
2110
2147
install_to_filesystem ( opts, true , cleanup) . await
0 commit comments