From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6610281096522235904 X-Received: by 2002:a19:d70c:: with SMTP id o12-v6mr359442lfg.0.1539080905422; Tue, 09 Oct 2018 03:28:25 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:1602:: with SMTP id m2-v6ls96808lfi.23.gmail; Tue, 09 Oct 2018 03:28:25 -0700 (PDT) X-Google-Smtp-Source: ACcGV627KKJObs91wzqRF425qOInRJGzAJeWjDWtCJoMN87SH4uM+mOwVdzUqMZjdi8Bi495ojZt X-Received: by 2002:a19:750a:: with SMTP id y10-v6mr735430lfe.10.1539080905005; Tue, 09 Oct 2018 03:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539080904; cv=none; d=google.com; s=arc-20160816; b=l7c05H3wkNu3msLJPrRmw+zvZp4TinrvPg7oiGjnKCOLci2GOqZROfsQLnohwHrmgI Ls+j6Ux3483MSKD7zxefCmqD01F+9MLDIAfmwtUQb2vo70oNZzKF1RXbsa8RefA5JPMo 7J0fhYWwV1EHVAFia4WievH9X9/ndrnsYwwixD6+QkAc/Qknfg9c7+Z6o1YEbPgzvo7h 64TWnN3ZevF5lAsZkhFe0NajQHc+zJl/1z2LTiSVzL+L88fZhiSa0BgBbvLKivr8rgx1 t6r1DamZpQIaCSaJMDp+fZuh+HTuUPaFCnYi+UIgIIUtEfTKjxE75D7lB7EuYUJ/8p83 jP+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id; bh=ExzzBgtoOvfGF62tNLLGV3pad8Okt8OmplmAJ0BtKYQ=; b=Rt0uyF8Et+3d8i1/Zx012iLqc5hZ7KinI3vCht9668pp6vKgs/ekw+5ntgd5k22OIw LpZS9ADkxiAUKN9nN291lODFuTV6kEAhuSO/if6covTtTPB7YR6HlBWsgnA90asePDV+ MmcLz+jhzOFJBsIjSKU+g4+uaHRJ/OAfYM3blDPbstFXmkGUo9HlYHsD3hoPNFWnNHL7 z/qbtglbkpCRLG9llV4PJ7HZ+HRKLBsjw1qAKRv/vH51wOpn8bEzQOcr4sGj74+h9CSY SXy1NM95g9xWKTIdNsAOYC4BFbO/ZHECl3C9rk1mv6ToA/L88aSMtUh+CPVOynUdy/4W 3dIw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of hws@denx.de) smtp.mailfrom=hws@denx.de Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id h192-v6si882105lfg.1.2018.10.09.03.28.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Oct 2018 03:28:24 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of hws@denx.de) client-ip=212.18.0.9; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of hws@denx.de) smtp.mailfrom=hws@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 42Ttjh3Dq0z1qxQ4; Tue, 9 Oct 2018 12:28:24 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 42Ttjh34Cjz1qtdv; Tue, 9 Oct 2018 12:28:24 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id C9hYduGQeeGt; Tue, 9 Oct 2018 12:28:23 +0200 (CEST) X-Auth-Info: 8QDPw8kyi+on4huDzzbdCIaVHz5lBGrMbbN2lZZAdwk= Received: from sandvich (p5B04CDC9.dip0.t-ipconnect.de [91.4.205.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 9 Oct 2018 12:28:23 +0200 (CEST) Message-ID: <158f4ad6a1cda4cca01e820a4279c11807b281a5.camel@denx.de> Subject: Re: [PATCH] dpkg-raw: Fix rebuilding recipes From: Harald Seiler To: Jan Kiszka , isar-users@googlegroups.com Date: Tue, 09 Oct 2018 12:28:22 +0200 In-Reply-To: <9e705dc1-53cd-28d1-8d8d-a832fb887d16@siemens.com> References: <23f5cd40400ecfc4074e0fb0185902fccd7bae2e.camel@denx.de> <9e705dc1-53cd-28d1-8d8d-a832fb887d16@siemens.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUID: eEn9BqJJojEr On Tue, 2018-10-09 at 12:05 +0200, Jan Kiszka wrote: > On 09.10.18 11:06, Harald Seiler wrote: > > Rebuilding dpkg-raw packages fails because the > > DEBIAN directories' ownership is transferred to > > root in dpkg_runbuild. This commit ensures the > > ownership is reset before attempting to write > > metadata. > > > > Signed-off-by: Harald Seiler > > --- > > meta/classes/dpkg-raw.bbclass | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/meta/classes/dpkg-raw.bbclass b/meta/classes/dpkg-raw.bbclass > > index c848f3d..806a2d4 100644 > > --- a/meta/classes/dpkg-raw.bbclass > > +++ b/meta/classes/dpkg-raw.bbclass > > @@ -18,7 +18,8 @@ addtask install after do_unpack before do_prepare_build > > > > deb_package_prepare() { > > sudo rm -rf ${D}/DEBIAN > > - mkdir -p ${D}/DEBIAN > > + sudo mkdir -p ${D}/DEBIAN > > + sudo chown ${USER}:${USER} ${D}/DEBIAN > > That makes no sense to me: We remove that folder first, and then create it under > the name of the current user. These two changes are redundant in that light. > > Can you describe in more details what you did and how the error messages looked > like? I frequently rebuild dpkg-raw packages and never saw such an issue recently. Sure, the error message is the following: mkdir: cannot create directory `[...]/image//DEBIAN`: Permission denied This makes sense, because image/ seems to somewhere get changed to be owned by root. Because of this, the unprivileged mkdir fails when rebuilding. The change I made is to run mkdir as root and then change the ownership of the created directory. I chose this solutuion because I did not want to touch the permissions of image/. I have seen this error with a lot of different packages so I am pretty certain that it is not a bug in the recipes I tested. Harald > > cat<<-__EOF__ > ${D}/DEBIAN/control > > Package: ${PN} > > Architecture: ${DISTRO_ARCH} > >