From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6623002413686063104 X-Received: by 2002:aa7:c687:: with SMTP id n7-v6mr561214edq.11.1542210237407; Wed, 14 Nov 2018 07:43:57 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a50:f4d0:: with SMTP id v16ls474097edm.13.gmail; Wed, 14 Nov 2018 07:43:57 -0800 (PST) X-Google-Smtp-Source: AJdET5dYvQVPkltxF+GH7x7f/oSJh65+gD34cokd2IKrjME4fuMyGL6yXD1TxvtQT1Kb8xS3X4bj X-Received: by 2002:a50:cb48:: with SMTP id h8-v6mr562426edi.3.1542210236989; Wed, 14 Nov 2018 07:43:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542210236; cv=none; d=google.com; s=arc-20160816; b=PXNrDY9gFZmWoGEe9hhFlE++C+J5qCzV8whEDFDrqD3FMxFWvkIzJVVTk04aqfEowv Kv7iQQa47SPBElwmEMTA46Ir1XYnTN1e2rqnLMJwQOImZ3IO6M9RdtTy3owU6mPCy+tu eaInId5pf4+uKWj3XPp5T+TpmPER/GNaYIh95q568XX36Rvd83rS5sAXaYiIiSa2yHbt RLoeQaaIMoWIepD3hd2PNZ/YsxEV0MZFoupNGUg0WWE2MxQSFvLZiH5Igr0FXYdnpDpf UFXTNv/5iqa1/33Yj7zCZwjo1VAEcS52nV+xTh8zOWIrLX20wfU/m/6n3Yowg7CvYxof tkeQ== 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=EJY/j6nkbtRiPdYRuuW9tQT2hq7IP+XoTteQWR+eCLg=; b=GASDeW255U1nTL+4EPoKTVbiPuI1XJBg+mAbXIgKkjTr5NYx5/AnsvCJUTb4SahLxO XzhjXqhv8LpGYdW728WVd6KqB8Qk+oRho7pua0D0zqeCAiz/XvZuvfsIdwW2wbOKqeIB nnjiTyBFo+t0RGbYUDliL8jTTDjigeZtGKa5gA1FdRLhrz8I/ZYt1r/bkZ7lNoQR0ty+ NSSa6dbajTW88IjrWBZCAFRrXOcii7JW//cJn86QucBg7wlrvltjxRWsVXRB4M09Cir1 2iOM+fh5YQHW6WJlza53ifaqBOq+ePotwzKjWS9oJPVZkuzofveU+uTiVQHvErlKhuYD GUbw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id h28si175230edh.4.2018.11.14.07.43.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 07:43:56 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id wAEFhue3001715 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 14 Nov 2018 16:43:56 +0100 Received: from md1za8fc.ad001.siemens.net ([139.25.0.37]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id wAEFhuU8023948; Wed, 14 Nov 2018 16:43:56 +0100 Date: Wed, 14 Nov 2018 16:43:55 +0100 From: Henning Schild To: Jan Kiszka Cc: isar-users Subject: Re: [PATCH 2/3] Revert "Change ownership of WORKDIR prior to unpacking" Message-ID: <20181114164355.742be0bd@md1za8fc.ad001.siemens.net> In-Reply-To: <20181114151139.6ff01f5a@md1za8fc.ad001.siemens.net> References: <20181112155149.24215-1-henning.schild@siemens.com> <20181112155149.24215-3-henning.schild@siemens.com> <6852a6f3-79a6-7320-abae-5a168fcada59@siemens.com> <06ac3f88-0104-6bd0-711c-f75fec4e4a6f@siemens.com> <1b49699a-e4a5-83fb-f631-de56c7ee266a@siemens.com> <20181114151139.6ff01f5a@md1za8fc.ad001.siemens.net> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-TUID: bVJSuP/s8SWA Am Wed, 14 Nov 2018 15:11:39 +0100 schrieb "[ext] Henning Schild" : > Am Wed, 14 Nov 2018 14:58:57 +0100 > schrieb Jan Kiszka : >=20 > > On 14.11.18 14:23, Jan Kiszka wrote: =20 > > > On 14.11.18 14:10, Jan Kiszka wrote: =20 > > >> On 12.11.18 16:51, Henning Schild wrote: =20 > > >>> We do not build as root anymore and the non-root uid/gid are now > > >>> in sync between inside and outside the chroot. > > >>> > > >>> This reverts commit 624b7c484bf59940ac2a4114018f7d56892dc05e. > > >>> --- > > >>> =C2=A0=C2=A0 meta/classes/base.bbclass | 5 ----- > > >>> =C2=A0=C2=A0 1 file changed, 5 deletions(-) > > >>> > > >>> diff --git a/meta/classes/base.bbclass > > >>> b/meta/classes/base.bbclass index fce1084..d4082de 100644 > > >>> --- a/meta/classes/base.bbclass > > >>> +++ b/meta/classes/base.bbclass > > >>> @@ -120,17 +120,12 @@ do_unpack[stamp-extra-info] =3D > > >>> "${DISTRO}-${DISTRO_ARCH}" # Unpack package and put it into > > >>> working directory python do_unpack() { > > >>> -=C2=A0=C2=A0=C2=A0 import subprocess > > >>> - > > >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 src_uri =3D (d.getVar('SRC_URI= ', True) or "").split() > > >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if len(src_uri) =3D=3D 0: > > >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return > > >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rootdir =3D d.getVar('WORKDIR'= , True) > > >>> -=C2=A0=C2=A0=C2=A0 uid =3D str(os.getuid()) > > >>> -=C2=A0=C2=A0=C2=A0 subprocess.call('sudo chown -R ' + uid + ' ' + = rootdir, > > >>> shell=3DTrue) - > > >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 try: > > >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fetche= r =3D bb.fetch2.Fetch(src_uri, d) > > >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fetche= r.unpack(rootdir) > > >>> =20 > > >> > > >> This possibly causes this regression: > > >> > > >> ERROR: expand-on-first-boot-1.0-r0 do_install: Function failed: > > >> do_install (log file is located at=20 > > >> /work/build/tmp/work/ebsy-arm64/expand-on-first-boot-1.0-r0/temp/log= .do_install.263)=20 > > >> > > >> ERROR: Logfile of failure stored in:=20 > > >> /work/build/tmp/work/ebsy-arm64/expand-on-first-boot-1.0-r0/temp/log= .do_install.263=20 > > >> > > >> Log data follows: > > >> | DEBUG: Executing shell function do_install > > >> | install: cannot remove=20 > > >> '/work/build/tmp/work/ebsy-arm64/expand-on-first-boot-1.0-r0/image//= lib/systemd/system/expand-on-first-boot.service':=20 > > >> Permission denied > > >> | WARNING: exit code 1 from a shell command. > > >> | ERROR: Function failed: do_install (log file is located at=20 > > >> /work/build/tmp/work/ebsy-arm64/expand-on-first-boot-1.0-r0/temp/log= .do_install.263)=20 > > >> > > >> =20 > > >=20 > > > OK, that wasn't a "clean" re-build (rather a rebuild after the > > > Isar update). Retesting with the same Isar version for build 1 > > > and 2.=20 >=20 > Arghh ... on a side-note. I have a few Isar-CI partial rebuild patches > in a queue, they target both dpkg and dpkg-raw. >=20 > > It persists, at least for dpkg-raw, and that is likely because of > > the chroot we do for that package. =20 >=20 > Yes. That actually revealed that we kept collecting changes in ${D} and never cleaned it before install. I just sent a patch fixing that. Next step will probably be to make the raw class use standard debian/rules and just take the long dpkg-buildpkg route. Should not be too hard to just write a debian/ folder that just does "make install". Will look into that ... Henning > > How does normal dpkg get away without chroot now and still produce > > the right ownership when installing a package? Can we adopt that? =20 >=20 > Probably fakeroot, i will look into using that for creating the raw > package. >=20 > Henning >=20 > > Jan > > =20 >=20