diff options
| author | Stephan Wurm <stephan.wurm@a-eberle.de> | 2026-01-07 14:37:34 +0100 |
|---|---|---|
| committer | Scott Murray <scott.murray@konsulko.com> | 2026-01-18 16:48:52 +0200 |
| commit | 18c6a7b5d836cc35c5131e33449b786111eceaf5 (patch) | |
| tree | d16a56ddf4bd400213f139d4b5e1fc836829a078 | |
| parent | 252f97af420cd170c37f3c33c2c1e86afeaa25f5 (diff) | |
| download | meta-security-whinlatter-next.tar.gz | |
dm-verity-img.bbclass: filter units from value partwhinlatter-nextwhinlatter
This is necessary for cryptsetup starting from v2.8.0 which introduced
"[units]" in its output breaking the parsing of veritysetup output.
VERITY header information for image-poky-20250701085433.squashfs-zst.verity.
UUID: 5dc16c55-79b8-4988-9d79-900f8e143f98
Hash type: 1
Data blocks: 40091
Data block size: 4096 [bytes]
Hash blocks: 318
Hash block size: 4096 [bytes]
Hash algorithm: sha256
Salt: f670bf67a32f4f5a22e052d7bf84830f8d35ea24e2d52f585f6275207899153b
Root hash: a7eab55b7933e347650671611e4b2a10571f2a28a1fb0fc8eae409f7a0d86693
This extends the value filter to remove the "[units]" from the .env file,
while retaining compatibility to older cryptsetup releases.
Signed-off-by: Stephan Wurm <stephan.wurm@a-eberle.de>
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
| -rw-r--r-- | classes/dm-verity-img.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/dm-verity-img.bbclass b/classes/dm-verity-img.bbclass index 47f698c..48557e9 100644 --- a/classes/dm-verity-img.bbclass +++ b/classes/dm-verity-img.bbclass | |||
| @@ -71,12 +71,12 @@ process_verity() { | |||
| 71 | # two parts into separate variables and process them separately. For the | 71 | # two parts into separate variables and process them separately. For the |
| 72 | # key part: convert the names to upper case and replace spaces with | 72 | # key part: convert the names to upper case and replace spaces with |
| 73 | # underscores to create correct shell variable names. For the value part: | 73 | # underscores to create correct shell variable names. For the value part: |
| 74 | # just trim all white-spaces. | 74 | # just trim all white-spaces and remove units. |
| 75 | IFS=":" | 75 | IFS=":" |
| 76 | while read KEY VAL; do | 76 | while read KEY VAL; do |
| 77 | printf '%s=%s\n' \ | 77 | printf '%s=%s\n' \ |
| 78 | "$(echo "$KEY" | tr '[:lower:]' '[:upper:]' | sed 's/ /_/g')" \ | 78 | "$(echo "$KEY" | tr '[:lower:]' '[:upper:]' | sed 's/ /_/g')" \ |
| 79 | "$(echo "$VAL" | tr -d ' \t')" >> $ENV | 79 | "$(echo "$VAL" | tr -d ' \t' | sed 's/\[.*\]//')" >> $ENV |
| 80 | done | 80 | done |
| 81 | 81 | ||
| 82 | # Add partition size | 82 | # Add partition size |
