It also adds directories into the conffiles file. dpkg does not like this.
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 <henning.schild@siemens.com>
---
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.bbclas s
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.
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
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com .
To post to this group, send email to isar-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/1411c20e-fff4- .cef4-9e15-460eebc14dab%40sieme ns.com