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? > > I guess the find just needs a -type . I would change it to something like this: find ${D} -path '${D}/etc/*' -type f 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 PGP key: 6FF2 E59F 00C6 BC28 31D8 64C1 1173 CB19 9808 B153 Keyserver: hkp://pool.sks-keyservers.net