diff mbox series

[meta-security] dm-verity-img.bbclass: set sparse as "never" during initial file copy

Message ID 20250217145420.270694-1-arena.lor@gmail.com
State New
Headers show
Series [meta-security] dm-verity-img.bbclass: set sparse as "never" during initial file copy | expand

Commit Message

Lorenzo Arena Feb. 17, 2025, 2:54 p.m. UTC
This is needed when a verity image is used in conjunction with tools
like a WIC and a bmap file, as avoiding writing "sparse" sectors
can result in errors in the signature verification.

Signed-off-by: Lorenzo Arena <arena.lor@gmail.com>
---
 classes/dm-verity-img.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/classes/dm-verity-img.bbclass b/classes/dm-verity-img.bbclass
index 296020a..47f698c 100644
--- a/classes/dm-verity-img.bbclass
+++ b/classes/dm-verity-img.bbclass
@@ -146,7 +146,7 @@  verity_setup() {
         HASH_OFFSET="--hash-offset="$SIZE
     fi
 
-    cp -a $INPUT $OUTPUT
+    cp -a --sparse=never $INPUT $OUTPUT
 
     SETUP_ARGS=" \
         ${DM_VERITY_SETUP_ARGS} \