* [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
* Re: [PATCH] image: copy INITRD_IMAGE out with sudo
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
0 siblings, 1 reply; 3+ messages in thread
From: Henning Schild @ 2017-10-30 16:57 UTC (permalink / raw)
To: isar-users
This patch was previously discussed as
[PATCH] meta: ext4-img: copy and keep attributes, always copy with sudo
This time it is just the sudo for the initrd. No "cp -a" and nothing
else is copied with sudo. And dropbear is provided as an example.
Henning
Am Mon, 30 Oct 2017 17:55:34 +0100
schrieb Henning Schild <henning.schild@siemens.com>:
> 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
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] image: copy INITRD_IMAGE out with sudo
2017-10-30 16:57 ` Henning Schild
@ 2017-10-31 15:26 ` Alexander Smirnov
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Smirnov @ 2017-10-31 15:26 UTC (permalink / raw)
To: Henning Schild; +Cc: isar-users
On 10/30/2017 07:57 PM, Henning Schild wrote:
> This patch was previously discussed as
> [PATCH] meta: ext4-img: copy and keep attributes, always copy with sudo
>
> This time it is just the sudo for the initrd. No "cp -a" and nothing
> else is copied with sudo. And dropbear is provided as an example.
Tested and applied to next, thanks!
^ 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