@@ -20,7 +20,7 @@ use ostree_container::store::PrepareResult;
20
20
use ostree_ext:: composefs:: fsverity;
21
21
use ostree_ext:: composefs:: fsverity:: FsVerityHashValue ;
22
22
use ostree_ext:: container as ostree_container;
23
- use ostree_ext:: container_utils:: { composefs_booted , ostree_booted} ;
23
+ use ostree_ext:: container_utils:: ostree_booted;
24
24
use ostree_ext:: keyfileext:: KeyFileExt ;
25
25
use ostree_ext:: ostree;
26
26
use schemars:: schema_for;
@@ -36,7 +36,7 @@ use crate::progress_jsonl::{ProgressWriter, RawProgressFd};
36
36
use crate :: spec:: Host ;
37
37
use crate :: spec:: ImageReference ;
38
38
use crate :: status:: composefs_deployment_status;
39
- use crate :: utils:: sigpolicy_from_opt;
39
+ use crate :: utils:: { composefs_booted , sigpolicy_from_opt} ;
40
40
41
41
/// Shared progress options
42
42
#[ derive( Debug , Parser , PartialEq , Eq ) ]
@@ -798,13 +798,29 @@ async fn upgrade_composefs(_opts: UpgradeOpts) -> Result<()> {
798
798
} ;
799
799
800
800
let boot_type = BootType :: from ( & entry) ;
801
+ let mut boot_digest = None ;
801
802
802
803
match boot_type {
803
- BootType :: Bls => setup_composefs_bls_boot ( BootSetupType :: Upgrade , repo, & id, entry) ,
804
- BootType :: Uki => setup_composefs_uki_boot ( BootSetupType :: Upgrade , repo, & id, entry) ,
805
- } ?;
804
+ BootType :: Bls => {
805
+ boot_digest = Some ( setup_composefs_bls_boot (
806
+ BootSetupType :: Upgrade ,
807
+ repo,
808
+ & id,
809
+ entry,
810
+ ) ?)
811
+ }
806
812
807
- write_composefs_state ( & Utf8PathBuf :: from ( "/sysroot" ) , id, imgref, true , boot_type) ?;
813
+ BootType :: Uki => setup_composefs_uki_boot ( BootSetupType :: Upgrade , repo, & id, entry) ?,
814
+ } ;
815
+
816
+ write_composefs_state (
817
+ & Utf8PathBuf :: from ( "/sysroot" ) ,
818
+ id,
819
+ imgref,
820
+ true ,
821
+ boot_type,
822
+ boot_digest,
823
+ ) ?;
808
824
809
825
Ok ( ( ) )
810
826
}
@@ -966,18 +982,27 @@ async fn switch_composefs(opts: SwitchOpts) -> Result<()> {
966
982
} ;
967
983
968
984
let boot_type = BootType :: from ( & entry) ;
985
+ let mut boot_digest = None ;
969
986
970
987
match boot_type {
971
- BootType :: Bls => setup_composefs_bls_boot ( BootSetupType :: Upgrade , repo, & id, entry) ,
972
- BootType :: Uki => setup_composefs_uki_boot ( BootSetupType :: Upgrade , repo, & id, entry) ,
973
- } ?;
988
+ BootType :: Bls => {
989
+ boot_digest = Some ( setup_composefs_bls_boot (
990
+ BootSetupType :: Upgrade ,
991
+ repo,
992
+ & id,
993
+ entry,
994
+ ) ?)
995
+ }
996
+ BootType :: Uki => setup_composefs_uki_boot ( BootSetupType :: Upgrade , repo, & id, entry) ?,
997
+ } ;
974
998
975
999
write_composefs_state (
976
1000
& Utf8PathBuf :: from ( "/sysroot" ) ,
977
1001
id,
978
1002
& target_imgref,
979
1003
true ,
980
1004
boot_type,
1005
+ boot_digest,
981
1006
) ?;
982
1007
983
1008
Ok ( ( ) )
0 commit comments