From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6449247988281769984 X-Received: by 10.28.178.73 with SMTP id b70mr128189wmf.6.1501746944707; Thu, 03 Aug 2017 00:55:44 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.207.69 with SMTP id f66ls229265wmg.8.canary-gmail; Thu, 03 Aug 2017 00:55:44 -0700 (PDT) X-Received: by 10.223.154.33 with SMTP id z30mr83460wrb.2.1501746944441; Thu, 03 Aug 2017 00:55:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501746944; cv=none; d=google.com; s=arc-20160816; b=m1pU/bUE7iAXN+PBNcu7qORhjxjRjdH61Z3XF47pHCvxVSrwRzhgJZTYSlgZI8Ym1f yole2fQJi0j39VnUEnLUKMZENuP0pk/ZeH9FOCNLrFtZgnRNlzWO2lcVHVXUkEFNSUPc E8oU7hEY/s3J0BQs0RVhWLH+QB3Xa8jW5SiXF0E/dGcryIIcAZLKRsOS3AibzWqCCgIn 8hp8O5dpU6e77Fz+QZCfcjhJMARe795Ym5Urv1B96ZAM+fLPvXoqnSJIPKkpxF9Va72g vqp/jZXq6jriuNieOquN7GTIJt2uqL2XPTtBwonq4/QldxlirDuWHk7WHN52KYc8KgiU OlJQ== 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=xEIJESMcBKyjujSw68U5BRvKI6tiVdDQejDTf3bwjvI=; b=cdvECfivr+H1s+MQo3rZ0ylgX0PF///ai4a9xarHeonQ+ljywxRuSaPpkq+4k57/jZ qdfTcDEaa0fLU6S5dpnwtseSh/B3aHnOLyXRbV/h0knVTZRHwfhxc/mw8r/izzS0VdT5 yOD96OqhNB0YyIbHvYBxTzhFYWOcoK/4IfjEodxJQ7unhqyXGB2oTQYUj70hZHtXVKoI Ea3nov4n0uxeXM2oGlVJ87NFfX6ZDr7aDUjL6XSY15yvfW1TCye4OxsK48fYhsgu4DsQ jFOU0haQT2NoALLOxsF5WVqOXMlu9Hv4OT9mYtqRasLLSXjt+0LZUxN1byubAzVh5nge 1n1w== 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 z192si598288wmz.5.2017.08.03.00.55.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Aug 2017 00:55: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 v737th3D018676 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 3 Aug 2017 09:55:43 +0200 Received: from md1em3qc ([139.25.68.40]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id v737thWQ017192; Thu, 3 Aug 2017 09:55:43 +0200 Date: Thu, 3 Aug 2017 09:57: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: <20170803095738.4246eb2e@md1em3qc> In-Reply-To: <1501686182.4957.18.camel@denx.de> 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> 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: MV/TeCjJfndk 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. > > 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. Henning > > Claudius