public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: isar-users@googlegroups.com
Cc: Henning Schild <henning.schild@siemens.com>
Subject: [PATCH] image: copy INITRD_IMAGE out with sudo
Date: Mon, 30 Oct 2017 17:55:34 +0100	[thread overview]
Message-ID: <20171030165534.2642-1-henning.schild@siemens.com> (raw)

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


             reply	other threads:[~2017-10-30 16:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-30 16:55 Henning Schild [this message]
2017-10-30 16:57 ` Henning Schild
2017-10-31 15:26   ` Alexander Smirnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171030165534.2642-1-henning.schild@siemens.com \
    --to=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox