From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6449247988281769984 X-Received: by 10.46.0.32 with SMTP id 32mr224790lja.20.1501756785615; Thu, 03 Aug 2017 03:39:45 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.218.85 with SMTP id r82ls298661wmg.12.gmail; Thu, 03 Aug 2017 03:39:45 -0700 (PDT) X-Received: by 10.28.111.200 with SMTP id c69mr159475wmi.27.1501756785305; Thu, 03 Aug 2017 03:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501756785; cv=none; d=google.com; s=arc-20160816; b=ymklot8GO7gu/UtSihdjasHVeBNz4CISx8+yLcUPXh9p4WwTCMMABNhI3JLyVwBI7v DJ89uISJq74CJXPeab/CoAzvoy0nsMC1Kw4ZqzpT1F89EP1e8TQFWgvewcmO4J9Io8RS A0fHAkujwyF9cK7Ct+pVCf4PzCJfKjTrDnInsvgZpyvX0Yo9uDBRoZfGGMhq7JRI1ZOC s6NgCi0qCqbrfZNW80UFI93S3xhj4mPSm+fEf+SUn52nh/3dAtW0QbTbgz0v7ducL8Cf w3iIgOnJhSZ2iqosjo+kbOCZcnLz/mINF+4ic/2XdAZn8hx5PvRyS5eUwhxVnVjE6BhI 77GA== 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:cc:to:subject :arc-authentication-results; bh=iYwC2cmjXBi3cluIc1FZZDYMxTxkMPRUIVunpDs87e4=; b=GBnxLUOBkEEpDqJ1oRJ5uTAi36WE6KMHbX380XcTQyrQcXZZ5Fx5owA21GBXPGpZX4 wAduYmhNZVpFVrJLpdvMN916WDZOvdcx8Fu36r8Cut3Aqq0J6aeG9dWrkwzP9VqbLvHw hrS0AWoF1g8hpglD7sTdkttvFCssiUaJnwzX5SMVWxQXwMV8Bl453hq3VoM0pHt0EOE+ wvIkCwDaFIy5UbhL578Yn32NsWl6GzGP6l1Q7+ad12j1xEGN+svKl7GCTvFGO/5P3o1K ny6qPIMQlEcWrojy6FmTIdLirqvYZZ4AWLi1LsMVreAGb+OlK9XhYPFm8UjwIwYSwjD/ 7qhw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.2 is neither permitted nor denied by best guess record for domain of claudius.heine.ext@siemens.com) 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 n5si691563wme.5.2017.08.03.03.39.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Aug 2017 03:39:45 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.2 is neither permitted nor denied by best guess record for domain of claudius.heine.ext@siemens.com) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.2 is neither permitted nor denied by best guess record for domain of claudius.heine.ext@siemens.com) 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 v73Adi4l013944 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 3 Aug 2017 12:39:44 +0200 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 v73AdiPB028888; Thu, 3 Aug 2017 12:39:44 +0200 Subject: Re: [PATCH 15/16] meta: add dpkg-bin class To: Henning Schild , Claudius Heine Cc: isar-users@googlegroups.com, "Dr . Johann Pfefferl" 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> From: Claudius Heine Message-ID: <0f0e2dba-c383-e4f1-69c0-12821432b4ea@siemens.com> Date: Thu, 3 Aug 2017 12:39:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170803095738.4246eb2e@md1em3qc> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: vZFBuFm6PsN+ 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 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