From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6521574339082452992 X-Received: by 10.28.237.21 with SMTP id l21mr912487wmh.32.1518697251040; Thu, 15 Feb 2018 04:20:51 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.47.71 with SMTP id v68ls3809wmv.6.gmail; Thu, 15 Feb 2018 04:20:50 -0800 (PST) X-Google-Smtp-Source: AH8x225/czbzn4H0+oTzP8CdVoqXn33ODyLKK64BUazBRsyQZ1IRxNSxGWSgQFUFVhqTTqVGZUub X-Received: by 10.28.45.201 with SMTP id t192mr872712wmt.26.1518697250555; Thu, 15 Feb 2018 04:20:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518697250; cv=none; d=google.com; s=arc-20160816; b=PhcFuwTyi/uNBOlPKa/P7N+kc8z/Lagn+U+8bLeTtuWlQnbQDjATHxj7Wh4MWKy5sQ W5lpnG2FL31bt6ODRLGoP7qtyZrqz0irCsluhPDCDmW/fgk98mFS2kh4B5HrPziDgHGO AI8PKWUTf0vZXfupuTiAwKl9ldTpsxdSd4zAJM1Xn/nZWMBC27WcC5De5LyDCAhPJmG/ zjAXYyXtLX01TB373b12sy/OpSTeyAxx+Ksefc0VP7/uybhj4eQHN6g/NYH99ot8fbzP j4st1Mwot5t+bELr9N+YS4qEFrnw74R3pdVYH54KI0+kNvq3iARhTxOIlJHnxXvIzu44 a2Xg== 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=xMXx7BXZopyKY22vHx+Iih1FOHn28wzTtuy4KkcJJho=; b=vL9SNjnqeLZuQLqWjBYgm7mcpye0BzySE5MLftlrm857UoRNlZd3FCb1CxTRctUyrq zhybPbsxYW2w8LrGskIzExhZutj9ninhGFiB5G6M8llKdmgT5hwtTeLiZrsngzSWloYE iIImA3MTXF297WTBBTcHvNUXPqHSSNK7tUl5ez8NBzyxxvuhjEPfPxOlRvDzO+/tc9Cz 6+VZtKrwUup/1aHFerTetXwAhfwDM4QfJIxY0pWv4ihYEMmvGV3K6Svg5GXlZgGo4GtM rz7rQ1wfu12CQLewvsQ3WdU1f60iJ3KN8Y/BDOjVawkd8szOemTLfdbYCevQOX7MlSw3 BKaA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id t15si36345wmh.1.2018.02.15.04.20.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Feb 2018 04:20:50 -0800 (PST) Received-SPF: pass (google.com: domain of claudius.heine.ext@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 claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=claudius.heine.ext@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 w1FCKowX001670 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Feb 2018 13:20:50 +0100 Received: from [139.25.68.223] (linux-ses-ext02.ppmd.siemens.net [139.25.68.223]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id w1FCKnCr017772; Thu, 15 Feb 2018 13:20:49 +0100 Subject: Re: [PATCH v2 7/9] dpkg-raw: Clean DEBIAN dir prior to filling it To: Alexander Smirnov , Jan Kiszka , isar-users References: From: Claudius Heine Message-ID: <7664005b-5ec6-7b9a-7466-0616f83dc63b@siemens.com> Date: Thu, 15 Feb 2018 13:20:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: MkMM9KZSCTOR Hi, On 02/15/2018 11:30 AM, Alexander Smirnov wrote: > > > On 02/15/2018 01:26 PM, Claudius Heine wrote: >> On 02/15/2018 10:18 AM, Jan Kiszka wrote: >>> On 2018-02-15 10:14, Claudius Heine wrote: >>>> Hi Jan, >>>> >>>> On 02/13/2018 09:05 PM, [ext] Jan Kiszka wrote: >>>>> From: Jan Kiszka >>>>> >>>>> When we run unprivileged, writing files in that directory will not >>>>> work >>>>> after the first run because everything is root-owned at the end. >>>>> >>>>> Signed-off-by: Jan Kiszka >>>>> --- >>>>>    meta/classes/dpkg-raw.bbclass | 5 ++--- >>>>>    1 file changed, 2 insertions(+), 3 deletions(-) >>>>> >>>>> diff --git a/meta/classes/dpkg-raw.bbclass >>>>> b/meta/classes/dpkg-raw.bbclass >>>>> index 44aa078..e3ae9e8 100644 >>>>> --- a/meta/classes/dpkg-raw.bbclass >>>>> +++ b/meta/classes/dpkg-raw.bbclass >>>>> @@ -16,10 +16,9 @@ do_install() { >>>>>    do_install[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}" >>>>>    addtask install after do_unpack before do_deb_package_prepare >>>>>    -# so we can put hooks etc. in there already >>>>> -do_install[dirs] = "${D}/DEBIAN" >>>>> - >>>>>    do_deb_package_prepare() { >>>>> +    sudo rm -rf ${D}/DEBIAN >>>>> +    mkdir ${D}/DEBIAN >>>>>        cat<<-__EOF__ > ${D}/DEBIAN/control >>>>>            Package: ${PN} >>>>>            Architecture: ${DISTRO_ARCH} >>>>> >>>> >>>> This: >>>> >>>>    do_install() { >>>>      sudo install -v -m 755 ${WORKDIR}/postinst ${D}/DEBIAN/postinst >>>>    } >>>> >>>> causes now: >>>> >>>>    install: cannot create regular file ‘/[...]/DEBIAN/postinst’: No >>>> such >>>> file or directory >>>> >>>> How should that be fixed? >>> >>> Simply by removing the install above. "dpkg-raw: Install hooks >>> automatically" makes it obsolete. >> >> Thx! But now it shows: >> >>    DEBUG: Executing shell function do_deb_package_prepare >>    mkdir: cannot create directory ‘/[...]/DEBIAN’: No such file or >> directory >> >> I suppose it needs "mkdir -p ${D}/DEBIAN". > > BTW: this series is already in next and it has passed all CI tests. > Which git head you use? I rebased my own branch to next (e7e40a68adbfa60), and my stuff broke. AFAIK next is there to test stuff with our own setup and provide feedback, so that commits can be fixed there with sometimes even some history rewriting. I wouldn't be against squashing Jans patch into this one on next. regards, Claudius -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de