[cip-dev][isar-cip-core][PATCH 3/3] verity.bbclass: exclude unit information from verity data

Quirin Gylstorff <[email protected]> Thu, 16 Jul 2026 15:07:44 +0200
Newsgroups org.cip-project.lists.cip-dev
Message-ID <[email protected]>
From: Quirin Gylstorff <[email protected]>

In newer versions of cryptsetup (see https://gitlab.com/cryptsetup/cryptsetup/-/commit/f8788f347ebfa5ba5df860b2c599e66f312a0693) the unit of the data and hash blocks is
displayed, e.g. in case of the default bytes. To avoid the following
error during opening a verity partition with the collected metadata
remove the unit information.

```
veritysetup: invalid numeric value
```

Signed-off-by: Quirin Gylstorff <[email protected]>
---
 classes-recipe/verity.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/classes-recipe/verity.bbclass b/classes-recipe/verity.bbclass
index c3b89ec..56e4f4e 100644
--- a/classes-recipe/verity.bbclass
+++ b/classes-recipe/verity.bbclass
@@ -63,7 +63,7 @@ create_verity_env_file() {
     while read KEY VAL; do
         printf '%s=%s\n' \
             "$(echo "$KEY" | tr '[:lower:]' '[:upper:]' | sed 's/ /_/g')" \
-            "$(echo "$VAL" | tr -d ' \t')" >> $ENV
+            "$(echo "$VAL" | tr -d ' \t' | sed -e 's/\[.*\]//' )" >> $ENV
     done < $input
 }
 
-- 
2.53.0