From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6449247988281769984 X-Received: by 10.46.88.26 with SMTP id m26mr283314ljb.32.1501769745116; Thu, 03 Aug 2017 07:15:45 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.184.67 with SMTP id i64ls372519wmf.4.canary-gmail; Thu, 03 Aug 2017 07:15:44 -0700 (PDT) X-Received: by 10.28.130.213 with SMTP id e204mr303658wmd.12.1501769744781; Thu, 03 Aug 2017 07:15:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501769744; cv=none; d=google.com; s=arc-20160816; b=Z+ozaMiWukOnrEO+YBo8r0C53lTdX7FcHYv46ayFG3kvLwY1XWrxyJodgobD7U2WDM PJ/3yGZS2WPlspd6rRkiL3pjYijku0QcwLjBc7hzlK0yFys3bPcwdiIJkvIaPnckE4pA b4edkOBIQdzxCdnexwppfmD/kIngB2NIERl6EGtPj0DfrYDGgKZaTeKIxaPwevbef9n/ eo4QS5x6vDjPMvhJh4Vc8pGHxchsSNMO25Q1sROIIS4d/9RjIf7pCEpRYTNjAdfYy4Kk pdO7JMEXWS0I6X7opGjG+LtlYzgDBuCqtsdDrAiNbc3ABwXSjRPucjxFl9WxXHGaXYUo EO6Q== 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:arc-authentication-results; bh=Fr234Jrdn3H2xYr9AiHPN/j7eQRYYtAd5y8rSTJVR1A=; b=LHBc780qcLbtAWar3Z50Q8pvztR1J4ma+sm5Vy7J6uUIUeEPjLbMRw8FAIAeojUc2N oJmyIXpKPOzFtsRSRNHbVp2/HLmgJFsAqIzxaZXW7iZEL/MdyzVZpZfP2fVm9IPckoGN rAQ3G7TX+0m9z3voIvKK3+3RFl7J4VesBKdXDj0yevseLkcsNLQ4foLX1djxMEMvaGy7 o9dfNm2y/deaYCMkzHzLNTM5J+StapJ5IjMAHjD9v1qQmcQ75awjYlJq2ft/L2XWucWa 2f9fYpa4zHrrhbEX+UEbDhc0T44hTTscuOreTVlHyyoEaq7ggeBKMxQYLYrFSVyrr9ag k15A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.28 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) 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 r83si863033wma.9.2017.08.03.07.15.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Aug 2017 07:15:44 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.28 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.28 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) smtp.mailfrom=henning.schild@siemens.com Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id v73EFiUc013679 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 3 Aug 2017 16:15:44 +0200 Received: from md1em3qc ([139.25.68.40]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id v73EFhtE011160; Thu, 3 Aug 2017 16:15:44 +0200 Date: Thu, 3 Aug 2017 16:17:38 +0200 From: Henning Schild To: Claudius Heine Cc: Claudius Heine , , "Dr . Johann Pfefferl" Subject: Re: [PATCH 15/16] meta: add dpkg-bin class Message-ID: <20170803161738.3078d234@md1em3qc> In-Reply-To: <0f0e2dba-c383-e4f1-69c0-12821432b4ea@siemens.com> References: <45a900737baed2ceb30b5eef22eb5a53f64ae020.1501582237.git.henning.schild@siemens.com> <85893014-c2cf-9bde-abf4-ddecf5c2682b@siemens.com> <1411c20e-fff4-cef4-9e15-460eebc14dab@siemens.com> <20170802154025.3f130597@md1em3qc> <1501686182.4957.18.camel@denx.de> <20170803095738.4246eb2e@md1em3qc> <0f0e2dba-c383-e4f1-69c0-12821432b4ea@siemens.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: Kz7Wsf9SSfI3 Am Thu, 3 Aug 2017 12:39:44 +0200 schrieb Claudius Heine : > On 08/03/2017 09:57 AM, Henning Schild wrote: > > Am Wed, 2 Aug 2017 17:03:02 +0200 > > schrieb Claudius Heine : > > > >> On Wed, 2017-08-02 at 15:40 +0200, Henning Schild wrote: > >>> Am Tue, 1 Aug 2017 17:10:00 +0200 > >>> schrieb Claudius Heine : > >>> > >>>> On 08/01/2017 04:25 PM, [ext] Claudius Heine wrote: > >>>>> > >>>>> > >>>>> On 08/01/2017 12:17 PM, [ext] Henning Schild wrote: > >>>>>> Signed-off-by: Henning Schild > >>>>>> --- > >>>>>> meta/classes/dpkg-bin.bbclass | 47 > >>>>>> +++++++++++++++++++++++++++++++++++++++++++ > >>>>>> 1 file changed, 47 insertions(+) > >>>>>> create mode 100644 meta/classes/dpkg-bin.bbclass > >>>>>> > >>>>>> diff --git a/meta/classes/dpkg-bin.bbclass > >>>>>> b/meta/classes/dpkg-bin.bbclass > >>>>>> new file mode 100644 > >>>>>> index 0000000..1e96bd1 > >>>>>> --- /dev/null > >>>>>> +++ b/meta/classes/dpkg-bin.bbclass > >>>>>> @@ -0,0 +1,47 @@ > >>>>>> +inherit isar-base > >>>>>> + > >>>>>> +DEBIAN_DEPENDS ?= "" > >>>>>> +DEBIAN_MAINTAINER ?= "FIXME Unknown maintainer" > >>>>>> + > >>>>>> +D = "${WORKDIR}/image/" > >>>>>> + > >>>>>> +# Populate folder that will be picked up as package > >>>>>> +do_install() { > >>>>>> + bbnote "Put your files for this package in ${D}" > >>>>>> +} > >>>>>> + > >>>>>> +addtask install after do_unpack before do_deb_package_prepare > >>>>>> +# so we can put hooks in there already > >>>>>> +do_install[dirs] = "${D}/DEBIAN" > >>>>>> + > >>>>>> +do_deb_package_prepare() { > >>>>>> + cat<<-__EOF__ > ${D}/DEBIAN/control > >>>>>> + Package: ${PN} > >>>>>> + Architecture: `dpkg --print-architecture` > >>>>>> + Section: misc > >>>>>> + Priority: optional > >>>>>> + Maintainer: ${DEBIAN_MAINTAINER} > >>>>>> + Depends: `echo ${DEBIAN_DEPENDS} | tr '[:blank:]' > >>>>>> ','` > >>>>>> + Version: ${PV}+isar > >>>>>> + Description: ${DESCRIPTION} > >>>>>> + __EOF__ > >>>>>> + CONFFILES=${D}/DEBIAN/conffiles > >>>>>> + find ${D} -path '*/etc/*' | sed -e 's|^${D}||' > > >>>>>> $CONFFILES > >>>>> > >>>>> I package a container root file system and now the files in the > >>>>> etc > >>>>> directory of this rfs is mentioned in the conffiles file. > >>>> > >>>> It also adds directories into the conffiles file. dpkg does not > >>>> like > >>>> this. > >>> > >>> Ok, maybe we should require the author of the recipe to create a > >>> valid > >>> conffiles instead of using magic guessing. But in that case they > >>> might > >>> forget to mark the files as config. > >>> > >>> Directories are not acceptable, are configs inside your container > >>> not a > >>> feature? Say you change that file with vim and install > >>> container-2.0.deb later. I would expect debian magic asking you to > >>> merge the config, would that not be nice? > > > > You did not answer this question, i still do not understand why > > that is problematic. > > When installing dpkg complained: > > Unpacking container (0.0.1+isar) ... > dpkg: error processing archive /deb/container_0.0.1+isar_amd64.deb > (--install): > unable to create > '/var/lib/lxc/container/rootfs/etc/alternatives/README.dpkg-new' (while > processing './var/lib/lxc/container/rootfs/etc/alternatives/README'): > No such file or directory > dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) I am not sure what that means. The updated version will allow you to overwrite the automatic configfiles generation. And disable it that way. I would not want to take it out because it seems to have value, but the heuristic should probably be tuned later. Henning > >>> I guess the find just needs a -type . > >> > >> I would change it to something like this: > >> > >> find ${D} -path '${D}/etc/*' -type f > > > > You might also want to catch /usr/local/etc/, /opt/etc/ ... > > > > And it should use >> to write to the file, allowing people to add > > custom files in do_install before find applies its guessing. > > Maybe also a flag to disable it. > > Cheers, > Claudius > >