From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6449247988281769984 X-Received: by 10.28.63.86 with SMTP id m83mr341021wma.21.1508442093689; Thu, 19 Oct 2017 12:41:33 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.223.145.226 with SMTP id 89ls2240956wri.10.gmail; Thu, 19 Oct 2017 12:41:33 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SieJjQX8NcQZBZnrR4izV0noQyaPqIMIwDEH1PR1gqzZWC24n7Q3PK7/DUsAczocAOkouM X-Received: by 10.28.142.2 with SMTP id q2mr332972wmd.32.1508442093430; Thu, 19 Oct 2017 12:41:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508442093; cv=none; d=google.com; s=arc-20160816; b=fmwUp9WHwEHt+E0ZCxEhZZTLyv+DxUiroYzud9lvDrh/6MY++wrBXiUnNHXGyG1Sh4 OwQkTKWzwePYEfwLCEpjkH/01CilyFMngF8XybRKseadrDo1ro7sm7Z8sacoM4VQm2xV 5S7MC7Q1Uq/6tc2TwvlDNriC0V8u1wUaSzCqH3VLwWJCsSMfmdeYCl8RQLgREsYM/u/S FRrO8ndhOdZuzXL9pR6U6Shyr/Sy/0afbxpX8G08YToYyDB50cINBwPx5khVj/l8ul3j s6mbykBKXdUllHDrA3nB2DHEKRBlwcg6EIJcz8o/7pxcuCzPTXN16gEJuj5jZ95OBByK qCgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :arc-authentication-results; bh=adOMwhe377ta/yaKy2BkUihsNcxMl1acnnKF8Z7OfdI=; b=YVESsfA+Hu4ikhldjx6reb7aTxvVGea9Sp4wNJTE5P2f96QdyofJuJCjpwVh+LOZh8 iPjUOqMc3k9DjGeNijfu2gAPJLplLtXf3/5h6Bxak85WmLjBBk2twlCBePwZUaZ76DrJ fgnK/mWuOO9wAhlQYVTwnPwjyqE2ItO+lt7Rz+6oI9ze2lAV723GYivtWBXUwBM/yI3g Z6R2upJ2t8mIDQCFxJiMhz42TsC6t/LMGLxq91X+uhrNuR6tjjQAlsO5tN2BNqeVGqzP MGvw4Ckosz/hKob9/PgQLIA8vQdenMzF/qW14JvLfmOCTDf8DPJTQb2sBitUC9A5bmA3 x4Jg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id h17si141634wmd.0.2017.10.19.12.41.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Oct 2017 12:41:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from [10.0.2.15] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id v9JJfULD028327 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 19 Oct 2017 21:41:32 +0200 Subject: Re: [PATCH 01/16] meta: ext4-img: copy and keep attributes, always copy with sudo To: Henning Schild , isar-users@googlegroups.com References: <5e98880f61dba959ada0c9bc8feca65b0a5760e5.1501582237.git.henning.schild@siemens.com> <20171019200450.75759e7e@md1em3qc> From: Alexander Smirnov Message-ID: Date: Thu, 19 Oct 2017 22:41:25 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20171019200450.75759e7e@md1em3qc> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: A0fPs9NO2hYr On 10/19/2017 09:04 PM, Henning Schild wrote: > I just wasted another hour on that guy ... again. Now i found an easy > way to reproduce the issue > > on amd64 > IMAGE_PREINSTALL += "dropbear" > > Probably something in the package hooks, update-initramfs ... But who > cares, that could have been fixed months ago. Which file this does this problem affect: kernel or initrd? > > Since my original patch touches code that Alex is currently moving The information you've provided above is very important, so I'd like to apply this as separate patch with respective commit message. Could do this tomorrow's morning. > around i hope he will fix the issue that has been ignored for too long. > According to the last our agreement in Aug, each issue should have usecase, so you've provided it only now. Alex > Henning > > On Tue, 1 Aug 2017 12:17:19 +0200 > Henning Schild wrote: > >> Some security enhancing packages can cause our initrd to be not >> readable by a normal user. So we need to copy with sudo. >> Also regular cp would destroy ownership and other attributes of files, >> possibly creating problems in the future. >> >> Signed-off-by: Henning Schild >> --- >> meta/classes/ext4-img.bbclass | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/meta/classes/ext4-img.bbclass >> b/meta/classes/ext4-img.bbclass index 65d4c11..6dc2039 100644 >> --- a/meta/classes/ext4-img.bbclass >> +++ b/meta/classes/ext4-img.bbclass >> @@ -21,16 +21,16 @@ do_ext4_image() { >> >> mkdir -p ${WORKDIR}/mnt >> sudo mount -o loop ${EXT4_IMAGE_FILE} ${WORKDIR}/mnt >> - sudo cp -r ${S}/* ${WORKDIR}/mnt >> + sudo cp -a ${S}/* ${WORKDIR}/mnt >> sudo umount ${WORKDIR}/mnt >> rm -r ${WORKDIR}/mnt >> >> if [ -n "${KERNEL_IMAGE}" ]; then >> - cp ${S}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE} >> + sudo cp -a ${S}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE} >> fi >> >> if [ -n "${INITRD_IMAGE}" ]; then >> - cp ${S}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE} >> + sudo cp -a ${S}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE} >> fi >> } >> > -- With best regards, Alexander Smirnov ilbers GmbH Baierbrunner Str. 28c D-81379 Munich +49 (89) 122 67 24-0 http://ilbers.de/ Commercial register Munich, HRB 214197 General manager: Baurzhan Ismagulov