@@ -295,6 +295,16 @@ pub(crate) enum InternalsOpts {
295
295
PrintJsonSchema ,
296
296
/// Perform cleanup actions
297
297
Cleanup ,
298
+ /// Proxy frontend for the `ostree-ext` CLI.
299
+ OstreeExt {
300
+ #[ clap( allow_hyphen_values = true ) ]
301
+ args : Vec < OsString > ,
302
+ } ,
303
+ /// Proxy frontend for the legacy `ostree container` CLI.
304
+ OstreeContainer {
305
+ #[ clap( allow_hyphen_values = true ) ]
306
+ args : Vec < OsString > ,
307
+ } ,
298
308
}
299
309
300
310
#[ derive( Debug , clap:: Subcommand , PartialEq , Eq ) ]
@@ -931,6 +941,17 @@ async fn run_from_opt(opt: Opt) -> Result<()> {
931
941
let unit_dir = & Dir :: open_ambient_dir ( normal_dir, cap_std:: ambient_authority ( ) ) ?;
932
942
crate :: generator:: generator ( root, unit_dir)
933
943
}
944
+ InternalsOpts :: OstreeExt { args } => {
945
+ ostree_ext:: cli:: run_from_iter ( [ "ostree-ext" . into ( ) ] . into_iter ( ) . chain ( args) ) . await
946
+ }
947
+ InternalsOpts :: OstreeContainer { args } => {
948
+ ostree_ext:: cli:: run_from_iter (
949
+ [ "ostree-ext" . into ( ) , "container" . into ( ) ]
950
+ . into_iter ( )
951
+ . chain ( args) ,
952
+ )
953
+ . await
954
+ }
934
955
InternalsOpts :: FixupEtcFstab => crate :: deploy:: fixup_etc_fstab ( & root) ,
935
956
InternalsOpts :: PrintJsonSchema => {
936
957
let schema = schema_for ! ( crate :: spec:: Host ) ;
@@ -1005,3 +1026,11 @@ fn test_parse_generator() {
1005
1026
Opt :: Internals ( InternalsOpts :: SystemdGenerator { .. } )
1006
1027
) ) ;
1007
1028
}
1029
+
1030
+ #[ test]
1031
+ fn test_parse_ostree_ext ( ) {
1032
+ assert ! ( matches!(
1033
+ Opt :: parse_including_static( [ "bootc" , "internals" , "ostree-container" ] ) ,
1034
+ Opt :: Internals ( InternalsOpts :: OstreeContainer { .. } )
1035
+ ) ) ;
1036
+ }
0 commit comments