From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6482748637851942912 X-Received: by 10.28.12.206 with SMTP id 197mr598439wmm.10.1509382657637; Mon, 30 Oct 2017 09:57:37 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.50.138 with SMTP id y132ls1962550wmy.9.gmail; Mon, 30 Oct 2017 09:57:37 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QRj5gvh8wZ2yK3Nuaylu6kTF1yY+w9vOLmbMUspmr+a4s0wzO9pSCJjrkr0yg4Xo6iFbDV X-Received: by 10.28.12.206 with SMTP id 197mr598437wmm.10.1509382657299; Mon, 30 Oct 2017 09:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509382657; cv=none; d=google.com; s=arc-20160816; b=pf2pg4drZrkvWs/Pvqt/U72e1I7dl611adCTsyyTUDWOiV3OnauHslU8o9AAizaOjM GrSXtPnA7Yo2xOg0YA6zbVeDr9cUuJRuU4i0F5n4slbKEo8zOZMCiElofFMU/UeNSCGb Rnx1Q/9MM/Klxq0VSf6Ui2apFd+iSH95LLmFCQun1DB24UFNybWs2VZbPMRgSnVS7Nxc gzdBnz7v1nGpBMpJS2GLD7BDh4YuBPV6ALlkD4Ppumuj2OPwRkDOD32OuQJH9q6I2tCy nEZ69UaW6DfLtNhtoQ6/A+d+aeowwZarXx+klOdHOOq/tRPDAb84u/zLqdkVWQkEx4DM joow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:to:from:date:arc-authentication-results; bh=OUvfJ9o7qT8aAlq6enx5ydpG+lrH5oc5IvQoA8hdGO0=; b=NaT85LfUBoUoK+gXqZTISb5xcHdsTBrZAjnjdEjjH4jZLvYwIR8hkoW+psyJOh11hc daAA0QG+YDKBP6qTEN8B/9ZjQ/UDtHrIa+9eJXkvkPtHSmJSAoh47F8/qn9AS0lkvbwK iIs+ohfndpJxiQYLJwA2Obshl7w8RWYYCFx/Ou4TBuQot6g028UAS+FyIHY6CpWXxYfs AdhzVIEi5zwSJc3jf58WpiPK7owxUEWZ/dBX924ADOxrAKjRJs46k9PNm3vCJl2pEU6H pJAGpqG9PanxEMelQ7PFk+Exu9hUId7RBx1x969VvQtw+6RAY5KqOGzEOt6Gp2cqxy4t CrYQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id k11si297163wmi.1.2017.10.30.09.57.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Oct 2017 09:57:37 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id v9UGva2K014415 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 30 Oct 2017 17:57:37 +0100 Received: from md1em3qc ([139.25.68.40]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id v9UGva6r013940 for ; Mon, 30 Oct 2017 17:57:36 +0100 Date: Mon, 30 Oct 2017 17:57:35 +0100 From: Henning Schild To: Subject: Re: [PATCH] image: copy INITRD_IMAGE out with sudo Message-ID: <20171030175735.0dcf3070@md1em3qc> In-Reply-To: <20171030165534.2642-1-henning.schild@siemens.com> References: <20171030165534.2642-1-henning.schild@siemens.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: asbraXzVn9PG 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 : > 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 > --- > 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 > } >