public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] image: copy INITRD_IMAGE out with sudo
@ 2017-10-30 16:55 Henning Schild
  2017-10-30 16:57 ` Henning Schild
  0 siblings, 1 reply; 3+ messages in thread
From: Henning Schild @ 2017-10-30 16:55 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Issue: do_copy_boot_files can fail to read initrd if certain packages
are installed in the image. One example package causing that issue is
"dropbear", it is probably connected with the initrd being rebuild
during installation. The file will have mode 0600 instead of the
expected 0644.

Fix: use sudo to copy the file

Impact: There is one more sudo in the Isar codebase. People that faced
the issue are now be able to build their images, others will not see a
difference.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 4bfd39c..2c2bafc 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -92,7 +92,7 @@ do_copy_boot_files() {
 
     INITRD_IMAGE=${@get_image_name(d, 'initrd.img')}
     if [ -n "${INITRD_IMAGE}" ]; then
-        cp -f ${IMAGE_ROOTFS}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
+        sudo cp -f ${IMAGE_ROOTFS}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
     fi
 }
 
-- 
2.13.6


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-31 15:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-30 16:55 [PATCH] image: copy INITRD_IMAGE out with sudo Henning Schild
2017-10-30 16:57 ` Henning Schild
2017-10-31 15:26   ` Alexander Smirnov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox