From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6449247988281769984 X-Received: by 10.28.141.8 with SMTP id p8mr375844wmd.31.1501681111879; Wed, 02 Aug 2017 06:38:31 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.7.66 with SMTP id i2ls34099ljd.24.gmail; Wed, 02 Aug 2017 06:38:31 -0700 (PDT) X-Received: by 10.25.211.77 with SMTP id k74mr442438lfg.2.1501681111547; Wed, 02 Aug 2017 06:38:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501681111; cv=none; d=google.com; s=arc-20160816; b=Y1g3ZIFpfJY2GHgDWnVpd9m3IZNwALyd736t9pXgk2uJf0Y2/aNbd0hgkE1Z7dPec+ xCRf7wlxgLPZxEocByYySZfgnN/PRTEvVkg50tyAqcqAucCaAsXMvmjqtn/cpUCa5CDT Zw9K5tuy8XL+CX4hKNNSl8A89+HlEd2VZ0aGCa4rv10i52qphO7JNOZlhdXwanOvxSzo RP8Jw5owxj7n82REz2eYyHE8hhIxy8qz6hIlgkyZyk0oM5pRrOZasoDkqRRA9gvdCSbF CO5s+7BMHB/TqeI0J0sd+lX4hQqDhTiU1FxUYk+QwDBT8Yh7IBteytBIHzstdQwo2lW6 2ppw== 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=2O1CRZ2zum7SR8gVdf/zaFoeCJL1qnvfZUk1mcDGF1c=; b=rTfduwKU3NZzNmRJurgqqHF0D7W++CaUubJQiqofQRK6org2OJ7O63Wt6MnhvhcnG0 dCL35Ks1qYV92wbIIJz4gG7TMwlL/PLauCTdlxzHvWuHR9xfnTWGJ/EZqNjfRaJC1tLB Bo8sMVWNs/pgW/7r1VfRaXzghJIwhlAqAS1IQm/K3Hg1VPU+6arSG/YPtf+sIwD/jBUC quFpiIIggxPyb40st72t4HOglxJ1k/B7Jz/TKenNpnfLX77Z7WUoi8CUVbBl6+ZPXmOf u0kSoWGFFdThDZsGnUuTycVNHpgTmXrzu70JrzTyGcA4umCTMKOOzu8wo6ve73vNnFfy ZS+w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.14 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 david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id t129si999725wmt.2.2017.08.02.06.38.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Aug 2017 06:38:31 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.14 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 david.siemens.de (8.15.2/8.15.2) with ESMTPS id v72DcVVM023216 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 2 Aug 2017 15:38:31 +0200 Received: from md1em3qc ([139.25.68.40]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id v72DcVJu000758; Wed, 2 Aug 2017 15:38:31 +0200 Date: Wed, 2 Aug 2017 15:40:25 +0200 From: Henning Schild To: Claudius Heine Cc: , "Dr . Johann Pfefferl" Subject: Re: [PATCH 15/16] meta: add dpkg-bin class Message-ID: <20170802154025.3f130597@md1em3qc> In-Reply-To: <1411c20e-fff4-cef4-9e15-460eebc14dab@siemens.com> References: <45a900737baed2ceb30b5eef22eb5a53f64ae020.1501582237.git.henning.schild@siemens.com> <85893014-c2cf-9bde-abf4-ddecf5c2682b@siemens.com> <1411c20e-fff4-cef4-9e15-460eebc14dab@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: j1KCxuPjLNV3 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? I guess the find just needs a -type . Henning > > > > Maybe add an option to disable this here? > > > >> + test -s $CONFFILES || rm $CONFFILES > >> + for t in pre post > >> + do > >> + for a in inst rm > >> + do > >> + chmod -f +x ${D}/DEBIAN/${t}${a} || true > >> + done > >> + done > >> +} > >> + > >> +addtask deb_package_prepare after do_install before > >> do_install_package + > >> +do_deb_package() { > >> + sudo chown -R root:root ${D}/DEBIAN/ > >> + sudo dpkg-deb --build ${D} ${WORKDIR} > >> +} > >> + > >> +addtask deb_package after do_deb_package_prepare before > >> do_install_package > >> > >