@@ -30,6 +30,7 @@ pub(crate) fn build_ukify(
3030 rootfs : & Utf8Path ,
3131 extra_kargs : & [ String ] ,
3232 args : & [ OsString ] ,
33+ allow_missing_fsverity : bool ,
3334) -> Result < ( ) > {
3435 // Warn if --karg is used (temporary workaround)
3536 if !extra_kargs. is_empty ( ) {
@@ -83,7 +84,11 @@ pub(crate) fn build_ukify(
8384 let mut cmdline = crate :: bootc_kargs:: get_kargs_in_root ( & root, std:: env:: consts:: ARCH ) ?;
8485
8586 // Add the composefs digest
86- let composefs_param = format ! ( "{COMPOSEFS_CMDLINE}={composefs_digest}" ) ;
87+ let composefs_param = if allow_missing_fsverity {
88+ format ! ( "{COMPOSEFS_CMDLINE}=?{composefs_digest}" )
89+ } else {
90+ format ! ( "{COMPOSEFS_CMDLINE}={composefs_digest}" )
91+ } ;
8792 cmdline. extend ( & Cmdline :: from ( composefs_param) ) ;
8893
8994 // Add any extra kargs provided via --karg
@@ -129,7 +134,7 @@ mod tests {
129134 let tempdir = tempfile:: tempdir ( ) . unwrap ( ) ;
130135 let path = Utf8Path :: from_path ( tempdir. path ( ) ) . unwrap ( ) ;
131136
132- let result = build_ukify ( path, & [ ] , & [ ] ) ;
137+ let result = build_ukify ( path, & [ ] , & [ ] , false ) ;
133138 assert ! ( result. is_err( ) ) ;
134139 let err = format ! ( "{:#}" , result. unwrap_err( ) ) ;
135140 assert ! (
@@ -147,7 +152,7 @@ mod tests {
147152 fs:: create_dir_all ( tempdir. path ( ) . join ( "boot/EFI/Linux" ) ) . unwrap ( ) ;
148153 fs:: write ( tempdir. path ( ) . join ( "boot/EFI/Linux/test.efi" ) , b"fake uki" ) . unwrap ( ) ;
149154
150- let result = build_ukify ( path, & [ ] , & [ ] ) ;
155+ let result = build_ukify ( path, & [ ] , & [ ] , false ) ;
151156 assert ! ( result. is_err( ) ) ;
152157 let err = format ! ( "{:#}" , result. unwrap_err( ) ) ;
153158 assert ! (
0 commit comments