From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6808879013169201152 X-Received: by 2002:adf:a319:: with SMTP id c25mr888875wrb.197.1585335685188; Fri, 27 Mar 2020 12:01:25 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:e983:: with SMTP id h3ls1095778wrm.7.gmail; Fri, 27 Mar 2020 12:01:24 -0700 (PDT) X-Google-Smtp-Source: ADFU+vteBOZisSBj4pDaDg29fxyN0t8KRPoe5dyWF0jW5vTtoASC5VwHr9mbP6vHrmwsnMUxYR0d X-Received: by 2002:adf:83c4:: with SMTP id 62mr951950wre.105.1585335684676; Fri, 27 Mar 2020 12:01:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585335684; cv=none; d=google.com; s=arc-20160816; b=oOhG/T9dwzPPUPNy4IwyBUYBH91FTI197/eqDz+gg5B+GWxyH7WU6k2GW/k+I6hGP1 RaZt5KLI8cn+zopFrnq+c9zNUEIZunqmW/dB/2X4e9hJW9jrvbBMiZMn6JWU0dFkpqh+ nplD+GCNsQjy5mg2J2CinO45/jazMNc1CUZOEqJ4K02DiLSw91byeCnGzS44yoq/YY1a /3lhhZfvW5YnMVnjWwRT+W0uJ/apcHRh+PPUcxd8WvTlnLQ5aReI+X0+9vt+m47J73qO D766QVRJZ/sGvq0dgU2YAk4GEm0BGjgBfsuGL/dYA2yQWaRl8dnmirjoapDdOo5QKqCm CcPQ== 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:cc:to:from:date; bh=Mj4hDyZkwlxCv3X+JJ02IS1DvF24i/xcqY255J+RThU=; b=awLc3IIdj9yhdnjRuUliDqxMgGYc3PePiZgYy5Ot43e0hAHolIPAtembltfvCWl3bv ZsBU1FWvclTl6xVlddEW1C5sFfCqOHPC6MlPR9PbwVcjcwF2QnQp6a16h+GZzkkqJgoc wt+jufqx6sQ8eeDu+STP9aQdi/g3hXKpq/QfQmRoMUYI2GJdsTuZPMjtfRBcg6lk46SB ih0oEMSpp2hvLse7sj00mZO7rx6S5Yg+T7XUNVw+yIW0dY4E/AAECzG09F0U+/hJok4y /TpnLLiZ1Vxcq+ZEij02T4w4ancrng49khN/qdADC0zmdJRQd+1VS1bpjxA4C3RuEwRz wAOw== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id y83si188007wmb.1.2020.03.27.12.01.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Mar 2020 12:01:24 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id 02RJ1OB7016856 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 27 Mar 2020 20:01:24 +0100 Received: from md1za8fc.ad001.siemens.net ([167.87.0.5]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 02RJ1Nh9008280; Fri, 27 Mar 2020 20:01:24 +0100 Date: Fri, 27 Mar 2020 20:01:21 +0100 From: Henning Schild To: "[ext] Q. Gylstorff" Cc: , Michael Adler Subject: Re: [PATCH 3/3] meta/classes: add cpiogz-img Message-ID: <20200327200121.46c96f14@md1za8fc.ad001.siemens.net> In-Reply-To: <20200327132801.19835-4-Quirin.Gylstorff@siemens.com> References: <20200327132801.19835-1-Quirin.Gylstorff@siemens.com> <20200327132801.19835-4-Quirin.Gylstorff@siemens.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: 2+l49eAlBHGh On Fri, 27 Mar 2020 14:28:01 +0100 "[ext] Q. Gylstorff" wrote: > From: Quirin Gylstorff > > to create a initramfs like filesystem. > > Signed-off-by: Michael Adler > Signed-off-by: Quirin Gylstorff > --- > meta/classes/cpiogz-img.bbclass | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > create mode 100644 meta/classes/cpiogz-img.bbclass > > diff --git a/meta/classes/cpiogz-img.bbclass > b/meta/classes/cpiogz-img.bbclass new file mode 100644 > index 0000000..f665bcd > --- /dev/null > +++ b/meta/classes/cpiogz-img.bbclass > @@ -0,0 +1,19 @@ > +# This software is a part of ISAR. > +# Copyright (C) 2020 Siemens AG > +# > +# SPDX-License-Identifier: MIT > + > +CPIOGZ_FNAME ?= "${IMAGE_FULLNAME}.cpio.gz" > +CPIOGZ_IMAGE_FILE = "${DEPLOY_DIR_IMAGE}/${CPIOGZ_FNAME}" > +IMAGER_INSTALL += "cpio" > + > +do_cpiogz_image() { > + sudo rm -f ${CPIOGZ_IMAGE_FILE} "${DEPLOY_DIR_IMAGE}/${CPIOGZ_FNAME}" and drop the variable > + image_do_mounts > + sudo chroot --userspec=$(id -u):$(id -g) ${BUILDCHROOT_DIR} \ I am not sure we really need to use the tools from the buildchroot here, but that is fair. The targz image does not go that far but cpio does not seem to be an essential package so might not be available. But you are going in as regular user, so you will fail to read root-owned content, and probably mess up permissions. > + sh -c "cd ${PP_ROOTFS}; /usr/bin/find . | \ > + /usr/bin/cpio -H newc -o | /usr/bin/gzip -9 > > \ > + ${PP_DEPLOY}/${CPIOGZ_FNAME}" Say you drop the userspec, you will need the chown seen in targz because the file in DEPLOY should be owned by who is building. Henning > +} > + > +addtask cpiogz_image before do_image after do_image_tools