diff mbox series

[isar-cip-core,v2,3/3] swupdate.bbclass: Use root privileges when creating swu file

Message ID 20231026082959.16939-4-venkata.pyla@toshiba-tsip.com (mailing list archive)
State Accepted
Headers show
Series [isar-cip-core,v2,1/3] reproducible-check-ci: Include swu files in reproducible tests | expand

Commit Message

Venkata Pyla Oct. 26, 2023, 8:29 a.m. UTC
From: venkata pyla <venkata.pyla@toshiba-tsip.com>

Getting Permission denied error while creating swu file, it also causing
the reproducible build failure

```
sw-description
sw-description.sig
touch: cannot touch 'linux.efi': Permission denied
linux.efi
cip-core-image-cip-core-bookworm-qemu-amd64.squashfs
266496 blocks
DEBUG: Shell function do_image_swu finished
```

Modified to run swu file creation with root privileges.

Signed-off-by: venkata pyla <venkata.pyla@toshiba-tsip.com>
---
 classes/swupdate.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass
index 3cf17a2..38c2e0a 100644
--- a/classes/swupdate.bbclass
+++ b/classes/swupdate.bbclass
@@ -106,7 +106,7 @@  IMAGE_CMD:swu() {
     # Prepare for signing
     export sign='${@'x' if bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}'
 
-    imager_run -p -d ${PP_WORK} <<'EOIMAGER'
+    imager_run -p -d ${PP_WORK} -u root <<'EOIMAGER'
         # Fill in file check sums
         for file in ${SWU_ADDITIONAL_FILES}; do
             sed -i "s:$file-sha256:$(sha256sum "${PP_WORK}/swu/"$file | cut -f 1 -d " "):g" \