public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 00/16] fixes and introducing dpdk-bin support
@ 2017-08-01 10:17 Henning Schild
  2017-08-01 10:17 ` [PATCH 01/16] meta: ext4-img: copy and keep attributes, always copy with sudo Henning Schild
                   ` (18 more replies)
  0 siblings, 19 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

This series includes several basic fixes to isar. It replaces all the
previously posted patches by me, since it includes updated versions of
those.

I did some restructuring moving tasks to the class isar-base. Some of that
is to give structure and some to introduce dpdk-bin. dpdk-bin is a class
that packages random files on the fly, this way you can also run hooks
when installing the packages, see example in last commit.


Henning Schild (16):
  meta: ext4-img: copy and keep attributes, always copy with sudo
  meta: classes: use base.bbclass from bitbake
  meta: isar-base: remove unused function
  remove redundant variable THISDIR
  meta: conf: use bitbake.conf from bitbake and apply local changes
  meta: conf: clean up local bitbake config
  classes: use WORKDIR and get rid of BUILDROOT
  classes: move fetch and unpack into isar-base
  meta: dpdk use [dirs] directive instead of mkdir
  meta: dpkg: reorder and rename do_install to install in addtask
  meta: classes: make do_build always the end of the task-chain
  meta: dpkg rename install to install_package
  meta: classes: move install_package to isar-base
  meta: classes: rename dpkg to dpkg-src
  meta: add dpkg-bin class
  recipes-app/hello-bin: add example on how to use dpkg-bin

 .../bitbake-user-manual-execution.xml              |  2 +-
 meta-isar/recipes-app/hello-bin/files/README       |  1 +
 meta-isar/recipes-app/hello-bin/files/postinst     | 14 ++++
 meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb   | 26 +++++++
 meta-isar/recipes-app/hello/hello.bb               |  2 +-
 meta-isar/recipes-core/images/isar-image-base.bb   |  8 +--
 meta/classes/base.bbclass                          | 81 +---------------------
 meta/classes/dpkg-bin.bbclass                      | 47 +++++++++++++
 meta/classes/dpkg-src.bbclass                      | 22 ++++++
 meta/classes/ext4-img.bbclass                      |  8 ++-
 meta/classes/image.bbclass                         |  2 +-
 meta/classes/isar-base-image.bbclass               |  1 +
 meta/classes/{dpkg.bbclass => isar-base.bbclass}   | 42 +++--------
 meta/conf/bitbake.conf.sample                      | 68 ------------------
 meta/conf/isar-bitbake.conf                        | 11 +++
 meta/recipes-devtools/buildchroot/buildchroot.bb   | 10 +--
 scripts/isar-setup-builddir                        | 33 +++++++--
 17 files changed, 179 insertions(+), 199 deletions(-)
 create mode 100644 meta-isar/recipes-app/hello-bin/files/README
 create mode 100644 meta-isar/recipes-app/hello-bin/files/postinst
 create mode 100644 meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb
 mode change 100644 => 120000 meta/classes/base.bbclass
 create mode 100644 meta/classes/dpkg-bin.bbclass
 create mode 100644 meta/classes/dpkg-src.bbclass
 create mode 100644 meta/classes/isar-base-image.bbclass
 rename meta/classes/{dpkg.bbclass => isar-base.bbclass} (51%)
 delete mode 100644 meta/conf/bitbake.conf.sample
 create mode 100644 meta/conf/isar-bitbake.conf

-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 01/16] meta: ext4-img: copy and keep attributes, always copy with sudo
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
@ 2017-08-01 10:17 ` Henning Schild
  2017-08-02  7:48   ` Alexander Smirnov
  2017-10-19 18:04   ` Henning Schild
  2017-08-01 10:17 ` [PATCH 02/16] meta: classes: use base.bbclass from bitbake Henning Schild
                   ` (17 subsequent siblings)
  18 siblings, 2 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Some security enhancing packages can cause our initrd to be not readable
by a normal user. So we need to copy with sudo.
Also regular cp would destroy ownership and other attributes of files,
possibly creating problems in the future.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/ext4-img.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes/ext4-img.bbclass b/meta/classes/ext4-img.bbclass
index 65d4c11..6dc2039 100644
--- a/meta/classes/ext4-img.bbclass
+++ b/meta/classes/ext4-img.bbclass
@@ -21,16 +21,16 @@ do_ext4_image() {
 
     mkdir -p ${WORKDIR}/mnt
     sudo mount -o loop ${EXT4_IMAGE_FILE} ${WORKDIR}/mnt
-    sudo cp -r ${S}/* ${WORKDIR}/mnt
+    sudo cp -a ${S}/* ${WORKDIR}/mnt
     sudo umount ${WORKDIR}/mnt
     rm -r ${WORKDIR}/mnt
 
     if [ -n "${KERNEL_IMAGE}" ]; then
-        cp ${S}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
+        sudo cp -a ${S}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
     fi
 
     if [ -n "${INITRD_IMAGE}" ]; then
-        cp ${S}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
+        sudo cp -a ${S}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
     fi
 }
 
-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 02/16] meta: classes: use base.bbclass from bitbake
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
  2017-08-01 10:17 ` [PATCH 01/16] meta: ext4-img: copy and keep attributes, always copy with sudo Henning Schild
@ 2017-08-01 10:17 ` Henning Schild
       [not found]   ` <CAJmB2rBjBqHxPKTna-XUtgmW9i-ooQwbACyFgQTQahTqUAxHcg@mail.gmail.com>
  2017-08-01 10:17 ` [PATCH 03/16] meta: isar-base: remove unused function Henning Schild
                   ` (16 subsequent siblings)
  18 siblings, 1 reply; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Do not use our own copy of that class and move local deviations into
isar-base. That also fixes the default tasks "showdata" and "listtasks",
which probably never worked.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/base.bbclass      | 81 +-----------------------------------------
 meta/classes/dpkg.bbclass      |  2 ++
 meta/classes/ext4-img.bbclass  |  2 ++
 meta/classes/isar-base.bbclass | 15 ++++++++
 4 files changed, 20 insertions(+), 80 deletions(-)
 mode change 100644 => 120000 meta/classes/base.bbclass
 create mode 100644 meta/classes/isar-base.bbclass

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
deleted file mode 100644
index 48b6bac..0000000
--- a/meta/classes/base.bbclass
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright (C) 2003  Chris Larson
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-
-THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}"
-
-die() {
-	bbfatal "$*"
-}
-
-bbnote() {
-	echo "NOTE:" "$*"
-}
-
-bbwarn() {
-	echo "WARNING:" "$*"
-}
-
-bbfatal() {
-	echo "FATAL:" "$*"
-	exit 1
-}
-
-bbdebug() {
-	test $# -ge 2 || {
-		echo "Usage: bbdebug level \"message\""
-		exit 1
-	}
-
-	test ${@bb.msg.debug_level['default']} -ge $1 && {
-		shift
-		echo "DEBUG:" $*
-	}
-}
-
-addtask showdata
-do_showdata[nostamp] = "1"
-python do_showdata() {
-	import sys
-	# emit variables and shell functions
-	bb.data.emit_env(sys.__stdout__, d, True)
-	# emit the metadata which isnt valid shell
-	for e in bb.data.keys(d):
-		if bb.data.getVarFlag(e, 'python', d):
-			sys.__stdout__.write("\npython %s () {\n%s}\n" % (e, bb.data.getVar(e, d, 1)))
-}
-
-addtask listtasks
-do_listtasks[nostamp] = "1"
-python do_listtasks() {
-	import sys
-	for e in bb.data.keys(d):
-		if bb.data.getVarFlag(e, 'task', d):
-			sys.__stdout__.write("%s\n" % e)
-}
-
-addtask build
-do_build[dirs] = "${TOPDIR}"
-python base_do_build () {
-	bb.note("The included, default BB base.bbclass does not define a useful default task.")
-	bb.note("Try running the 'listtasks' task against a .bb to see what tasks are defined.")
-}
-
-EXPORT_FUNCTIONS do_clean do_mrproper do_build
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
new file mode 120000
index 0000000..11fe0a4
--- /dev/null
+++ b/meta/classes/base.bbclass
@@ -0,0 +1 @@
+../../bitbake/classes/base.bbclass
\ No newline at end of file
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index a0446d7..3d7aafb 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -1,6 +1,8 @@
 # This software is a part of ISAR.
 # Copyright (C) 2015-2016 ilbers GmbH
 
+inherit isar-base
+
 # Add dependency from buildchroot creation
 DEPENDS += "buildchroot"
 do_unpack[deptask] = "do_build"
diff --git a/meta/classes/ext4-img.bbclass b/meta/classes/ext4-img.bbclass
index 6dc2039..eb23d06 100644
--- a/meta/classes/ext4-img.bbclass
+++ b/meta/classes/ext4-img.bbclass
@@ -1,6 +1,8 @@
 # This software is a part of ISAR.
 # Copyright (C) 2015-2016 ilbers GmbH
 
+inherit isar-base
+
 # Extra space for rootfs in MB
 ROOTFS_EXTRA ?= "64"
 
diff --git a/meta/classes/isar-base.bbclass b/meta/classes/isar-base.bbclass
new file mode 100644
index 0000000..0432880
--- /dev/null
+++ b/meta/classes/isar-base.bbclass
@@ -0,0 +1,15 @@
+THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}"
+
+bbdebug() {
+	test $# -ge 2 || {
+		echo "Usage: bbdebug level \"message\""
+		exit 1
+	}
+
+	test ${@bb.msg.debug_level['default']} -ge $1 && {
+		shift
+		echo "DEBUG:" $*
+	}
+}
+
+do_build[nostamp] = "0"
-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 03/16] meta: isar-base: remove unused function
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
  2017-08-01 10:17 ` [PATCH 01/16] meta: ext4-img: copy and keep attributes, always copy with sudo Henning Schild
  2017-08-01 10:17 ` [PATCH 02/16] meta: classes: use base.bbclass from bitbake Henning Schild
@ 2017-08-01 10:17 ` Henning Schild
       [not found]   ` <CAJmB2rBwssbfjgqL2wAsOFfGUK7DbBY31tF_QhR09Ot0rmRVjQ@mail.gmail.com>
  2017-08-01 10:17 ` [PATCH 04/16] remove redundant variable THISDIR Henning Schild
                   ` (15 subsequent siblings)
  18 siblings, 1 reply; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/isar-base.bbclass | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/meta/classes/isar-base.bbclass b/meta/classes/isar-base.bbclass
index 0432880..25809fa 100644
--- a/meta/classes/isar-base.bbclass
+++ b/meta/classes/isar-base.bbclass
@@ -1,15 +1,3 @@
 THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}"
 
-bbdebug() {
-	test $# -ge 2 || {
-		echo "Usage: bbdebug level \"message\""
-		exit 1
-	}
-
-	test ${@bb.msg.debug_level['default']} -ge $1 && {
-		shift
-		echo "DEBUG:" $*
-	}
-}
-
 do_build[nostamp] = "0"
-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 04/16] remove redundant variable THISDIR
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (2 preceding siblings ...)
  2017-08-01 10:17 ` [PATCH 03/16] meta: isar-base: remove unused function Henning Schild
@ 2017-08-01 10:17 ` Henning Schild
  2017-08-02  8:25   ` Alexander Smirnov
  2017-08-01 10:17 ` [PATCH 05/16] meta: conf: use bitbake.conf from bitbake and apply local changes Henning Schild
                   ` (14 subsequent siblings)
  18 siblings, 1 reply; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 .../doc/bitbake-user-manual/bitbake-user-manual-execution.xml  |  2 +-
 meta-isar/recipes-core/images/isar-image-base.bb               |  8 ++++----
 meta/classes/isar-base.bbclass                                 |  2 --
 meta/recipes-devtools/buildchroot/buildchroot.bb               | 10 +++++-----
 4 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
index ec75893..b9aafd1 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
@@ -765,7 +765,7 @@
             the concept:
             <literallayout class='monospaced'>
      BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \
-         SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
+         SSTATE_DIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
          USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
          PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
          CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX"
diff --git a/meta-isar/recipes-core/images/isar-image-base.bb b/meta-isar/recipes-core/images/isar-image-base.bb
index 337c329..0810de0 100644
--- a/meta-isar/recipes-core/images/isar-image-base.bb
+++ b/meta-isar/recipes-core/images/isar-image-base.bb
@@ -27,10 +27,10 @@ do_rootfs() {
     install -d -m 755 ${WORKDIR}/hooks_multistrap
 
     # Copy config file
-    install -m 644 ${THISDIR}/files/multistrap.conf.in ${WORKDIR}/multistrap.conf
-    install -m 755 ${THISDIR}/files/${DISTRO_CONFIG_SCRIPT} ${WORKDIR}/configscript.sh
-    install -m 755 ${THISDIR}/files/setup.sh ${WORKDIR}
-    install -m 755 ${THISDIR}/files/download_dev-random ${WORKDIR}/hooks_multistrap/
+    install -m 644 ${FILESDIR}/multistrap.conf.in ${WORKDIR}/multistrap.conf
+    install -m 755 ${FILESDIR}/${DISTRO_CONFIG_SCRIPT} ${WORKDIR}/configscript.sh
+    install -m 755 ${FILESDIR}/setup.sh ${WORKDIR}
+    install -m 755 ${FILESDIR}/download_dev-random ${WORKDIR}/hooks_multistrap/
 
     # Adjust multistrap config
     sed -i 's|##IMAGE_PREINSTALL##|${IMAGE_PREINSTALL}|' ${WORKDIR}/multistrap.conf
diff --git a/meta/classes/isar-base.bbclass b/meta/classes/isar-base.bbclass
index 25809fa..33b0369 100644
--- a/meta/classes/isar-base.bbclass
+++ b/meta/classes/isar-base.bbclass
@@ -1,3 +1 @@
-THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}"
-
 do_build[nostamp] = "0"
diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb b/meta/recipes-devtools/buildchroot/buildchroot.bb
index ba1bc66..f471f5e 100644
--- a/meta/recipes-devtools/buildchroot/buildchroot.bb
+++ b/meta/recipes-devtools/buildchroot/buildchroot.bb
@@ -29,10 +29,10 @@ do_build() {
     install -d -m 755 ${WORKDIR}/hooks_multistrap
 
     # Copy config files
-    install -m 644 ${THISDIR}/files/multistrap.conf.in ${WORKDIR}/multistrap.conf
-    install -m 755 ${THISDIR}/files/configscript.sh ${WORKDIR}
-    install -m 755 ${THISDIR}/files/setup.sh ${WORKDIR}
-    install -m 755 ${THISDIR}/files/download_dev-random ${WORKDIR}/hooks_multistrap/
+    install -m 644 ${FILESDIR}/multistrap.conf.in ${WORKDIR}/multistrap.conf
+    install -m 755 ${FILESDIR}/configscript.sh ${WORKDIR}
+    install -m 755 ${FILESDIR}/setup.sh ${WORKDIR}
+    install -m 755 ${FILESDIR}/download_dev-random ${WORKDIR}/hooks_multistrap/
 
     # Adjust multistrap config
     sed -i 's|##BUILDCHROOT_PREINSTALL##|${BUILDCHROOT_PREINSTALL}|' ${WORKDIR}/multistrap.conf
@@ -51,7 +51,7 @@ do_build() {
     sudo multistrap -a ${DISTRO_ARCH} -d "${BUILDCHROOT_DIR}" -f "${WORKDIR}/multistrap.conf" || true
 
     # Install package builder script
-    sudo install -m 755 ${THISDIR}/files/build.sh ${BUILDCHROOT_DIR}
+    sudo install -m 755 ${FILESDIR}/build.sh ${BUILDCHROOT_DIR}
 
     # Configure root filesystem
     sudo chroot ${BUILDCHROOT_DIR} /configscript.sh
-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 05/16] meta: conf: use bitbake.conf from bitbake and apply local changes
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (3 preceding siblings ...)
  2017-08-01 10:17 ` [PATCH 04/16] remove redundant variable THISDIR Henning Schild
@ 2017-08-01 10:17 ` Henning Schild
  2017-08-02  8:34   ` Alexander Smirnov
  2017-08-01 10:17 ` [PATCH 06/16] meta: conf: clean up local bitbake config Henning Schild
                   ` (13 subsequent siblings)
  18 siblings, 1 reply; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

force isar to always use a bitbake.conf from its bitbake
the diff went into a file that needs to be looked at later

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/conf/bitbake.conf.sample | 68 -------------------------------------------
 meta/conf/isar-bitbake.conf   | 20 +++++++++++++
 scripts/isar-setup-builddir   | 33 ++++++++++++++++++---
 3 files changed, 49 insertions(+), 72 deletions(-)
 delete mode 100644 meta/conf/bitbake.conf.sample
 create mode 100644 meta/conf/isar-bitbake.conf

diff --git a/meta/conf/bitbake.conf.sample b/meta/conf/bitbake.conf.sample
deleted file mode 100644
index 9d7c1f4..0000000
--- a/meta/conf/bitbake.conf.sample
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright (C) 2003  Chris Larson
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-
-B = "${S}"
-CVSDIR = "${DL_DIR}/cvs"
-DEPENDS = ""
-DEPLOY_DIR = "${TMPDIR}/deploy"
-DEPLOY_DIR_DEB = "${TMPDIR}/deploy/deb/${MACHINE}"
-DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images"
-DL_DIR = "${TMPDIR}/downloads"
-SSTATE_DIR ?= "${TMPDIR}/sstate-cache"
-FILESDIR = "${@bb.which(bb.data.getVar('FILESPATH', d, 1), '.')}"
-FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
-FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}"
-GITDIR = "${DL_DIR}/git"
-IMAGE_CMD = "_NO_DEFINED_IMAGE_TYPES_"
-IMAGE_ROOTFS = "${TMPDIR}/rootfs"
-MKTEMPCMD = "mktemp -q ${TMPBASE}"
-MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
-OVERRIDES = "local:${MACHINE}:${TARGET_OS}:${TARGET_ARCH}"
-P = "${PN}-${PV}"
-PERSISTENT_DIR = "${TMPDIR}/cache"
-PF = "${PN}-${PV}-${PR}"
-PN = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[0] or 'defaultpkgname'}"
-PR = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[2] or 'r0'}"
-PROVIDES = ""
-PV = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[1] or '1.0'}"
-RESUMECOMMAND = ""
-RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 --passive-ftp -P ${DL_DIR} ${URI}"
-S = "${WORKDIR}/${P}"
-SRC_URI = "file://${FILE}"
-STAMPS_DIR ?= "${TMPDIR}/stamps"
-STAMP = "${TMPDIR}/stamps/${PF}"
-SVNDIR = "${DL_DIR}/svn"
-T = "${WORKDIR}/temp"
-TARGET_ARCH = "${BUILD_ARCH}"
-TMPDIR = "${TOPDIR}/tmp"
-UPDATECOMMAND = ""
-UPDATECOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} update ${CVSCOOPTS}"
-UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
-WORKDIR = "${TMPDIR}/work/${PF}"
-PERSISTENT_DIR = "${TMPDIR}/cache"
-BUILDCHROOT_DIR = "${TOPDIR}/tmp/work/buildchroot/${DISTRO}/rootfs"
-CACHE = "${TMPDIR}/cache"
-
-# Setup our default hash policy
-BB_SIGNATURE_HANDLER ?= "noop"
-
-include conf/local.conf
-include conf/machine/${MACHINE}.conf
-include conf/distro/${DISTRO}.conf
diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf
new file mode 100644
index 0000000..d56f3da
--- /dev/null
+++ b/meta/conf/isar-bitbake.conf
@@ -0,0 +1,20 @@
+DEPLOY_DIR_DEB = "${TMPDIR}/deploy/deb/${MACHINE}"
+SSTATE_DIR ?= "${TMPDIR}/sstate-cache"
+MKTEMPCMD = "mktemp -q ${TMPBASE}"
+MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
+RESUMECOMMAND = ""
+RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 --passive-ftp -P ${DL_DIR} ${URI}"
+STAMPS_DIR ?= "${TMPDIR}/stamps"
+UPDATECOMMAND = ""
+UPDATECOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} update ${CVSCOOPTS}"
+UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
+BUILDCHROOT_DIR = "${TOPDIR}/tmp/work/buildchroot/${DISTRO}/rootfs"
+CROSSBUILDCHROOT_DIR = "${TOPDIR}/tmp/work/crossbuildchroot/${DISTRO_ARCH}/${DISTRO}/rootfs"
+CACHE = "${TMPDIR}/cache"
+
+# Setup our default hash policy
+BB_SIGNATURE_HANDLER ?= "noop"
+
+include conf/local.conf
+include conf/machine/${MACHINE}.conf
+include conf/distro/${DISTRO}.conf
diff --git a/scripts/isar-setup-builddir b/scripts/isar-setup-builddir
index 070a316..d400694 100755
--- a/scripts/isar-setup-builddir
+++ b/scripts/isar-setup-builddir
@@ -106,10 +106,35 @@ EOM
     SHOWYPDOC=yes
 fi
 
-if [ ! -f "$BUILDDIR/conf/bitbake.conf" ]; then
-    cp "$ISARROOT/meta/conf/bitbake.conf.sample" \
-       "$BUILDDIR/conf/bitbake.conf"
-fi
+cat <<EOF > $BUILDDIR/conf/bitbake.conf
+# ********************************************
+# THIS FILE IS GENERATED! DO NOT MESS WITH IT!
+# ********************************************
+
+# ---------
+# begin original bitbake.conf
+# ---------
+
+EOF
+cat "$ISARROOT/bitbake/conf/bitbake.conf" >> \
+  "$BUILDDIR/conf/bitbake.conf"
+cat <<EOF >> $BUILDDIR/conf/bitbake.conf
+# ---------
+# end original bitbake.conf
+# ---------
+
+# ---------
+# begin isar-bitbake.conf
+# ---------
+
+EOF
+cat "$ISARROOT/meta/conf/isar-bitbake.conf" >> \
+  "$BUILDDIR/conf/bitbake.conf"
+cat <<EOF >> $BUILDDIR/conf/bitbake.conf
+# ---------
+# end isar-bitbake.conf
+# ---------
+EOF
 
 # Ending the first-time run message. Show the no documentation banner.
 if [ ! -z "$SHOWYPDOC" ]; then
-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 06/16] meta: conf: clean up local bitbake config
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (4 preceding siblings ...)
  2017-08-01 10:17 ` [PATCH 05/16] meta: conf: use bitbake.conf from bitbake and apply local changes Henning Schild
@ 2017-08-01 10:17 ` Henning Schild
  2017-08-02  8:35   ` Alexander Smirnov
  2017-08-01 10:17 ` [PATCH 07/16] classes: use WORKDIR and get rid of BUILDROOT Henning Schild
                   ` (12 subsequent siblings)
  18 siblings, 1 reply; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/conf/isar-bitbake.conf | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf
index d56f3da..426da7f 100644
--- a/meta/conf/isar-bitbake.conf
+++ b/meta/conf/isar-bitbake.conf
@@ -1,16 +1,7 @@
 DEPLOY_DIR_DEB = "${TMPDIR}/deploy/deb/${MACHINE}"
 SSTATE_DIR ?= "${TMPDIR}/sstate-cache"
-MKTEMPCMD = "mktemp -q ${TMPBASE}"
-MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
-RESUMECOMMAND = ""
-RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 --passive-ftp -P ${DL_DIR} ${URI}"
-STAMPS_DIR ?= "${TMPDIR}/stamps"
-UPDATECOMMAND = ""
-UPDATECOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} update ${CVSCOOPTS}"
-UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
 BUILDCHROOT_DIR = "${TOPDIR}/tmp/work/buildchroot/${DISTRO}/rootfs"
 CROSSBUILDCHROOT_DIR = "${TOPDIR}/tmp/work/crossbuildchroot/${DISTRO_ARCH}/${DISTRO}/rootfs"
-CACHE = "${TMPDIR}/cache"
 
 # Setup our default hash policy
 BB_SIGNATURE_HANDLER ?= "noop"
-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 07/16] classes: use WORKDIR and get rid of BUILDROOT
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (5 preceding siblings ...)
  2017-08-01 10:17 ` [PATCH 06/16] meta: conf: clean up local bitbake config Henning Schild
@ 2017-08-01 10:17 ` Henning Schild
  2017-08-02  9:24   ` Alexander Smirnov
  2017-08-01 10:17 ` [PATCH 08/16] classes: move fetch and unpack into isar-base Henning Schild
                   ` (11 subsequent siblings)
  18 siblings, 1 reply; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/dpkg.bbclass | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 3d7aafb..1d0132b 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -10,9 +10,7 @@ do_unpack[deptask] = "do_build"
 # Each package should have its own unique build folder, so use
 # recipe name as identifier
 PP = "/home/builder/${PN}"
-BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
-
-do_fetch[dirs] = "${DL_DIR}"
+WORKDIR = "${BUILDCHROOT_DIR}/${PP}"
 
 # Fetch package from the source link
 python do_fetch() {
@@ -28,10 +26,10 @@ python do_fetch() {
 }
 
 addtask fetch before do_build
+do_fetch[dirs] = "${DL_DIR}"
 
-do_unpack[dirs] = "${BUILDROOT}"
 do_unpack[stamp-extra-info] = "${DISTRO}"
-S ?= "${BUILDROOT}"
+S ?= "${WORKDIR}"
 
 # Unpack package and put it into working directory in buildchroot
 python do_unpack() {
@@ -39,16 +37,15 @@ python do_unpack() {
     if len(src_uri) == 0:
         return
 
-    rootdir = d.getVar('BUILDROOT', True)
-
     try:
         fetcher = bb.fetch2.Fetch(src_uri, d)
-        fetcher.unpack(rootdir)
+        fetcher.unpack(d.getVar('WORKDIR', True))
     except bb.fetch2.BBFetchException as e:
         raise bb.build.FuncFailed(e)
 }
 
 addtask unpack after do_fetch before do_build
+do_unpack[dirs] = "${WORKDIR}"
 
 do_build[stamp-extra-info] = "${DISTRO}"
 
@@ -62,7 +59,7 @@ do_install[stamp-extra-info] = "${MACHINE}"
 # Install package to dedicated deploy directory
 do_install() {
     install -d ${DEPLOY_DIR_DEB}
-    install -m 755 ${BUILDROOT}/*.deb ${DEPLOY_DIR_DEB}/
+    install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
 }
 
 addtask do_install after do_build
-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 08/16] classes: move fetch and unpack into isar-base
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (6 preceding siblings ...)
  2017-08-01 10:17 ` [PATCH 07/16] classes: use WORKDIR and get rid of BUILDROOT Henning Schild
@ 2017-08-01 10:17 ` Henning Schild
  2017-08-02  9:47   ` Alexander Smirnov
  2017-08-01 10:17 ` [PATCH 09/16] meta: dpdk use [dirs] directive instead of mkdir Henning Schild
                   ` (10 subsequent siblings)
  18 siblings, 1 reply; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

create a new base-class for images

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/dpkg.bbclass            | 34 ----------------------------------
 meta/classes/ext4-img.bbclass        |  2 +-
 meta/classes/isar-base-image.bbclass |  1 +
 meta/classes/isar-base.bbclass       | 33 +++++++++++++++++++++++++++++++++
 4 files changed, 35 insertions(+), 35 deletions(-)
 create mode 100644 meta/classes/isar-base-image.bbclass

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 1d0132b..58cee6e 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -11,42 +11,8 @@ do_unpack[deptask] = "do_build"
 # recipe name as identifier
 PP = "/home/builder/${PN}"
 WORKDIR = "${BUILDCHROOT_DIR}/${PP}"
-
-# Fetch package from the source link
-python do_fetch() {
-    src_uri = (d.getVar('SRC_URI', True) or "").split()
-    if len(src_uri) == 0:
-        return
-
-    try:
-        fetcher = bb.fetch2.Fetch(src_uri, d)
-        fetcher.download()
-    except bb.fetch2.BBFetchException as e:
-        raise bb.build.FuncFailed(e)
-}
-
-addtask fetch before do_build
-do_fetch[dirs] = "${DL_DIR}"
-
-do_unpack[stamp-extra-info] = "${DISTRO}"
 S ?= "${WORKDIR}"
 
-# Unpack package and put it into working directory in buildchroot
-python do_unpack() {
-    src_uri = (d.getVar('SRC_URI', True) or "").split()
-    if len(src_uri) == 0:
-        return
-
-    try:
-        fetcher = bb.fetch2.Fetch(src_uri, d)
-        fetcher.unpack(d.getVar('WORKDIR', True))
-    except bb.fetch2.BBFetchException as e:
-        raise bb.build.FuncFailed(e)
-}
-
-addtask unpack after do_fetch before do_build
-do_unpack[dirs] = "${WORKDIR}"
-
 do_build[stamp-extra-info] = "${DISTRO}"
 
 # Build package from sources using build script
diff --git a/meta/classes/ext4-img.bbclass b/meta/classes/ext4-img.bbclass
index eb23d06..5125d8e 100644
--- a/meta/classes/ext4-img.bbclass
+++ b/meta/classes/ext4-img.bbclass
@@ -1,7 +1,7 @@
 # This software is a part of ISAR.
 # Copyright (C) 2015-2016 ilbers GmbH
 
-inherit isar-base
+inherit isar-base-image
 
 # Extra space for rootfs in MB
 ROOTFS_EXTRA ?= "64"
diff --git a/meta/classes/isar-base-image.bbclass b/meta/classes/isar-base-image.bbclass
new file mode 100644
index 0000000..33b0369
--- /dev/null
+++ b/meta/classes/isar-base-image.bbclass
@@ -0,0 +1 @@
+do_build[nostamp] = "0"
diff --git a/meta/classes/isar-base.bbclass b/meta/classes/isar-base.bbclass
index 33b0369..3df6572 100644
--- a/meta/classes/isar-base.bbclass
+++ b/meta/classes/isar-base.bbclass
@@ -1 +1,34 @@
 do_build[nostamp] = "0"
+
+# Fetch package from the source link
+python do_fetch() {
+    src_uri = (d.getVar('SRC_URI', True) or "").split()
+    if len(src_uri) == 0:
+        return
+
+    try:
+        fetcher = bb.fetch2.Fetch(src_uri, d)
+        fetcher.download()
+    except bb.fetch2.BBFetchException as e:
+        raise bb.build.FuncFailed(e)
+}
+
+addtask fetch before do_build
+do_fetch[dirs] = "${DL_DIR}"
+
+# Unpack package and put it into working directory in buildchroot
+python do_unpack() {
+    src_uri = (d.getVar('SRC_URI', True) or "").split()
+    if len(src_uri) == 0:
+        return
+
+    try:
+        fetcher = bb.fetch2.Fetch(src_uri, d)
+        fetcher.unpack(d.getVar('WORKDIR', True))
+    except bb.fetch2.BBFetchException as e:
+        raise bb.build.FuncFailed(e)
+}
+
+addtask unpack after do_fetch before do_build
+do_unpack[dirs] = "${WORKDIR}"
+do_unpack[stamp-extra-info] = "${DISTRO}"
-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 09/16] meta: dpdk use [dirs] directive instead of mkdir
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (7 preceding siblings ...)
  2017-08-01 10:17 ` [PATCH 08/16] classes: move fetch and unpack into isar-base Henning Schild
@ 2017-08-01 10:17 ` Henning Schild
  2017-08-01 10:17 ` [PATCH 10/16] meta: dpkg: reorder and rename do_install to install in addtask Henning Schild
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/dpkg.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 58cee6e..b20a54e 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -24,8 +24,8 @@ do_install[stamp-extra-info] = "${MACHINE}"
 
 # Install package to dedicated deploy directory
 do_install() {
-    install -d ${DEPLOY_DIR_DEB}
     install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
 }
 
 addtask do_install after do_build
+do_install[dirs] = "${DEPLOY_DIR_DEB}"
-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 10/16] meta: dpkg: reorder and rename do_install to install in addtask
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (8 preceding siblings ...)
  2017-08-01 10:17 ` [PATCH 09/16] meta: dpdk use [dirs] directive instead of mkdir Henning Schild
@ 2017-08-01 10:17 ` Henning Schild
  2017-08-01 10:17 ` [PATCH 11/16] meta: classes: make do_build always the end of the task-chain Henning Schild
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/dpkg.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index b20a54e..4228b0d 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -20,12 +20,12 @@ do_build() {
     sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
 }
 
-do_install[stamp-extra-info] = "${MACHINE}"
 
 # Install package to dedicated deploy directory
 do_install() {
     install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
 }
 
-addtask do_install after do_build
+addtask install after do_build
 do_install[dirs] = "${DEPLOY_DIR_DEB}"
+do_install[stamp-extra-info] = "${MACHINE}"
-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 11/16] meta: classes: make do_build always the end of the task-chain
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (9 preceding siblings ...)
  2017-08-01 10:17 ` [PATCH 10/16] meta: dpkg: reorder and rename do_install to install in addtask Henning Schild
@ 2017-08-01 10:17 ` Henning Schild
  2017-08-02  9:54   ` Alexander Smirnov
  2017-08-01 10:17 ` [PATCH 12/16] meta: dpkg rename install to install_package Henning Schild
                   ` (7 subsequent siblings)
  18 siblings, 1 reply; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

build is bitbakes default target and queing tasks behind it is asking
for trouble
Introduce do_compile where we "build" the debian packages.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/dpkg.bbclass  | 8 ++++----
 meta/classes/image.bbclass | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 4228b0d..71c7122 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -13,19 +13,19 @@ PP = "/home/builder/${PN}"
 WORKDIR = "${BUILDCHROOT_DIR}/${PP}"
 S ?= "${WORKDIR}"
 
-do_build[stamp-extra-info] = "${DISTRO}"
-
 # Build package from sources using build script
-do_build() {
+do_compile() {
     sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
 }
 
+addtask compile after do_unpack before do_install
+do_compile[stamp-extra-info] = "${DISTRO}"
 
 # Install package to dedicated deploy directory
 do_install() {
     install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
 }
 
-addtask install after do_build
+addtask install after do_compile before do_build
 do_install[dirs] = "${DEPLOY_DIR_DEB}"
 do_install[stamp-extra-info] = "${MACHINE}"
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 3e4877c..8db3352 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -27,4 +27,4 @@ do_populate() {
 }
 
 addtask populate before do_build
-do_populate[deptask] = "do_install"
+do_populate[deptask] = "do_build"
-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 12/16] meta: dpkg rename install to install_package
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (10 preceding siblings ...)
  2017-08-01 10:17 ` [PATCH 11/16] meta: classes: make do_build always the end of the task-chain Henning Schild
@ 2017-08-01 10:17 ` Henning Schild
  2017-08-02  9:59   ` Alexander Smirnov
  2017-08-01 10:17 ` [PATCH 13/16] meta: classes: move install_package to isar-base Henning Schild
                   ` (6 subsequent siblings)
  18 siblings, 1 reply; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

install will be used by later patches to actually populate debian
packages

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/dpkg.bbclass | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 71c7122..2a1b85c 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -18,14 +18,14 @@ do_compile() {
     sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
 }
 
-addtask compile after do_unpack before do_install
+addtask compile after do_unpack before do_install_package
 do_compile[stamp-extra-info] = "${DISTRO}"
 
 # Install package to dedicated deploy directory
-do_install() {
+do_install_package() {
     install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
 }
 
-addtask install after do_compile before do_build
-do_install[dirs] = "${DEPLOY_DIR_DEB}"
-do_install[stamp-extra-info] = "${MACHINE}"
+addtask install_package after do_compile before do_build
+do_install_package[dirs] = "${DEPLOY_DIR_DEB}"
+do_install_package[stamp-extra-info] = "${MACHINE}"
-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 13/16] meta: classes: move install_package to isar-base
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (11 preceding siblings ...)
  2017-08-01 10:17 ` [PATCH 12/16] meta: dpkg rename install to install_package Henning Schild
@ 2017-08-01 10:17 ` Henning Schild
  2017-08-01 11:48   ` Claudius Heine
  2017-08-01 14:00   ` Claudius Heine
  2017-08-01 10:17 ` [PATCH 14/16] meta: classes: rename dpkg to dpkg-src Henning Schild
                   ` (5 subsequent siblings)
  18 siblings, 2 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/dpkg.bbclass      |  9 ---------
 meta/classes/isar-base.bbclass | 10 ++++++++++
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 2a1b85c..37b2c8d 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -20,12 +20,3 @@ do_compile() {
 
 addtask compile after do_unpack before do_install_package
 do_compile[stamp-extra-info] = "${DISTRO}"
-
-# Install package to dedicated deploy directory
-do_install_package() {
-    install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
-}
-
-addtask install_package after do_compile before do_build
-do_install_package[dirs] = "${DEPLOY_DIR_DEB}"
-do_install_package[stamp-extra-info] = "${MACHINE}"
diff --git a/meta/classes/isar-base.bbclass b/meta/classes/isar-base.bbclass
index 3df6572..68e2aed 100644
--- a/meta/classes/isar-base.bbclass
+++ b/meta/classes/isar-base.bbclass
@@ -32,3 +32,13 @@ python do_unpack() {
 addtask unpack after do_fetch before do_build
 do_unpack[dirs] = "${WORKDIR}"
 do_unpack[stamp-extra-info] = "${DISTRO}"
+
+
+# Install package to dedicated deploy directory
+do_install_package() {
+    install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
+}
+
+addtask install_package before do_build
+do_install_package[dirs] = "${DEPLOY_DIR_DEB}"
+do_install_package[stamp-extra-info] = "${MACHINE}"
-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 14/16] meta: classes: rename dpkg to dpkg-src
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (12 preceding siblings ...)
  2017-08-01 10:17 ` [PATCH 13/16] meta: classes: move install_package to isar-base Henning Schild
@ 2017-08-01 10:17 ` Henning Schild
  2017-08-02 10:02   ` Alexander Smirnov
  2017-08-01 10:17 ` [PATCH 15/16] meta: add dpkg-bin class Henning Schild
                   ` (4 subsequent siblings)
  18 siblings, 1 reply; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta-isar/recipes-app/hello/hello.bb            | 2 +-
 meta/classes/{dpkg.bbclass => dpkg-src.bbclass} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename meta/classes/{dpkg.bbclass => dpkg-src.bbclass} (100%)

diff --git a/meta-isar/recipes-app/hello/hello.bb b/meta-isar/recipes-app/hello/hello.bb
index 56424fb..5c5d714 100644
--- a/meta-isar/recipes-app/hello/hello.bb
+++ b/meta-isar/recipes-app/hello/hello.bb
@@ -15,4 +15,4 @@ SRCREV = "ad7065ecc4840cc436bfcdac427386dbba4ea719"
 
 SRC_DIR = "git"
 
-inherit dpkg
+inherit dpkg-src
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg-src.bbclass
similarity index 100%
rename from meta/classes/dpkg.bbclass
rename to meta/classes/dpkg-src.bbclass
-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 15/16] meta: add dpkg-bin class
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (13 preceding siblings ...)
  2017-08-01 10:17 ` [PATCH 14/16] meta: classes: rename dpkg to dpkg-src Henning Schild
@ 2017-08-01 10:17 ` Henning Schild
  2017-08-01 14:25   ` Claudius Heine
  2017-08-02 11:11   ` Claudius Heine
  2017-08-01 10:17 ` [PATCH 16/16] recipes-app/hello-bin: add example on how to use dpkg-bin Henning Schild
                   ` (3 subsequent siblings)
  18 siblings, 2 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild, Dr . Johann Pfefferl

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.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
+	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
-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* [PATCH 16/16] recipes-app/hello-bin: add example on how to use dpkg-bin
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (14 preceding siblings ...)
  2017-08-01 10:17 ` [PATCH 15/16] meta: add dpkg-bin class Henning Schild
@ 2017-08-01 10:17 ` Henning Schild
  2017-08-02  6:33   ` Jan Kiszka
  2017-08-01 10:23 ` [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (2 subsequent siblings)
  18 siblings, 1 reply; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta-isar/recipes-app/hello-bin/files/README     |  1 +
 meta-isar/recipes-app/hello-bin/files/postinst   | 14 +++++++++++++
 meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb | 26 ++++++++++++++++++++++++
 3 files changed, 41 insertions(+)
 create mode 100644 meta-isar/recipes-app/hello-bin/files/README
 create mode 100644 meta-isar/recipes-app/hello-bin/files/postinst
 create mode 100644 meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb

diff --git a/meta-isar/recipes-app/hello-bin/files/README b/meta-isar/recipes-app/hello-bin/files/README
new file mode 100644
index 0000000..6e2ce0f
--- /dev/null
+++ b/meta-isar/recipes-app/hello-bin/files/README
@@ -0,0 +1 @@
+This is an example file that we get from FILESDIR in recipe.
diff --git a/meta-isar/recipes-app/hello-bin/files/postinst b/meta-isar/recipes-app/hello-bin/files/postinst
new file mode 100644
index 0000000..2a9eab6
--- /dev/null
+++ b/meta-isar/recipes-app/hello-bin/files/postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+if ! getent group hello >/dev/null; then
+	addgroup --quiet --system hello
+fi
+
+if ! getent passwd hello >/dev/null; then
+	adduser --system --ingroup hello --home /var/lib/hello hello \
+		--gecos "My hello user"
+fi
+
+chown -R hello:hello /var/lib/hello
diff --git a/meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb b/meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb
new file mode 100644
index 0000000..5ff12d3
--- /dev/null
+++ b/meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb
@@ -0,0 +1,26 @@
+# Sample application using dpkg-bin, which turns a folder (${D}) of
+# files into a .deb 
+#
+# This software is a part of ISAR.
+
+DESCRIPTION = "Sample bin application for ISAR"
+DEBIAN_MAINTAINER = "Your name here <you@domain.com>"
+
+inherit dpkg-bin
+
+do_install() {
+	bbnote "Creating ${PN} binary"
+	echo "#!/bin/sh" > ${WORKDIR}/${PN}
+	echo "echo Hello World! ${PN}_${PV}" >> ${WORKDIR}/${PN}
+
+	bbnote "Putting ${PN} into overlay"
+	install -v -d ${D}/usr/local/bin/
+	install -v -m 755 ${WORKDIR}/${PN} ${D}/usr/local/bin/${PN}
+
+	bbnote "Now copy ${FILESDIR}/README to overlay"
+	install -v -d ${D}/usr/local/doc/
+	install -v -m 644 ${FILESDIR}/README ${D}/usr/local/doc/README-${P}
+
+	bbnote "Now for a debian hook, see dpkg-deb"
+	install -v -m 755 ${FILESDIR}/postinst ${D}/DEBIAN/postinst
+}
-- 
2.13.0


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 00/16] fixes and introducing dpdk-bin support
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (15 preceding siblings ...)
  2017-08-01 10:17 ` [PATCH 16/16] recipes-app/hello-bin: add example on how to use dpkg-bin Henning Schild
@ 2017-08-01 10:23 ` Henning Schild
  2017-08-01 11:24 ` Claudius Heine
  2017-08-11  9:15 ` Alexander Smirnov
  18 siblings, 0 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-01 10:23 UTC (permalink / raw)
  To: isar-users

The q is also available here:

https://github.com/henning-schild/isar/tree/henning/staging_on_master

Henning

Am Tue, 1 Aug 2017 12:17:18 +0200
schrieb Henning Schild <henning.schild@siemens.com>:

> This series includes several basic fixes to isar. It replaces all the
> previously posted patches by me, since it includes updated versions of
> those.
> 
> I did some restructuring moving tasks to the class isar-base. Some of
> that is to give structure and some to introduce dpdk-bin. dpdk-bin is
> a class that packages random files on the fly, this way you can also
> run hooks when installing the packages, see example in last commit.
> 
> 
> Henning Schild (16):
>   meta: ext4-img: copy and keep attributes, always copy with sudo
>   meta: classes: use base.bbclass from bitbake
>   meta: isar-base: remove unused function
>   remove redundant variable THISDIR
>   meta: conf: use bitbake.conf from bitbake and apply local changes
>   meta: conf: clean up local bitbake config
>   classes: use WORKDIR and get rid of BUILDROOT
>   classes: move fetch and unpack into isar-base
>   meta: dpdk use [dirs] directive instead of mkdir
>   meta: dpkg: reorder and rename do_install to install in addtask
>   meta: classes: make do_build always the end of the task-chain
>   meta: dpkg rename install to install_package
>   meta: classes: move install_package to isar-base
>   meta: classes: rename dpkg to dpkg-src
>   meta: add dpkg-bin class
>   recipes-app/hello-bin: add example on how to use dpkg-bin
> 
>  .../bitbake-user-manual-execution.xml              |  2 +-
>  meta-isar/recipes-app/hello-bin/files/README       |  1 +
>  meta-isar/recipes-app/hello-bin/files/postinst     | 14 ++++
>  meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb   | 26 +++++++
>  meta-isar/recipes-app/hello/hello.bb               |  2 +-
>  meta-isar/recipes-core/images/isar-image-base.bb   |  8 +--
>  meta/classes/base.bbclass                          | 81
> +---------------------
> meta/classes/dpkg-bin.bbclass                      | 47 +++++++++++++
> meta/classes/dpkg-src.bbclass                      | 22 ++++++
> meta/classes/ext4-img.bbclass                      |  8 ++-
> meta/classes/image.bbclass                         |  2 +-
> meta/classes/isar-base-image.bbclass               |  1 +
> meta/classes/{dpkg.bbclass => isar-base.bbclass}   | 42 +++--------
> meta/conf/bitbake.conf.sample                      | 68
> ------------------ meta/conf/isar-bitbake.conf
> | 11 +++ meta/recipes-devtools/buildchroot/buildchroot.bb   | 10 +--
> scripts/isar-setup-builddir                        | 33 +++++++-- 17
> files changed, 179 insertions(+), 199 deletions(-) create mode 100644
> meta-isar/recipes-app/hello-bin/files/README create mode 100644
> meta-isar/recipes-app/hello-bin/files/postinst create mode 100644
> meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb mode change 100644
> => 120000 meta/classes/base.bbclass create mode 100644
> meta/classes/dpkg-bin.bbclass create mode 100644
> meta/classes/dpkg-src.bbclass create mode 100644
> meta/classes/isar-base-image.bbclass rename
> meta/classes/{dpkg.bbclass => isar-base.bbclass} (51%) delete mode
> 100644 meta/conf/bitbake.conf.sample create mode 100644
> meta/conf/isar-bitbake.conf
> 


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 00/16] fixes and introducing dpdk-bin support
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (16 preceding siblings ...)
  2017-08-01 10:23 ` [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
@ 2017-08-01 11:24 ` Claudius Heine
  2017-08-11  9:15 ` Alexander Smirnov
  18 siblings, 0 replies; 64+ messages in thread
From: Claudius Heine @ 2017-08-01 11:24 UTC (permalink / raw)
  To: [ext] Henning Schild, isar-users

Hi,

On 08/01/2017 12:17 PM, [ext] Henning Schild wrote:
> This series includes several basic fixes to isar. It replaces all the
> previously posted patches by me, since it includes updated versions of
> those.
> 
> I did some restructuring moving tasks to the class isar-base. Some of that
> is to give structure and some to introduce dpdk-bin. dpdk-bin is a class
> that packages random files on the fly, this way you can also run hooks
> when installing the packages, see example in last commit.

Patchset looks good. I will now convert my project to this and test it.

Thanks,
Claudius

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 13/16] meta: classes: move install_package to isar-base
  2017-08-01 10:17 ` [PATCH 13/16] meta: classes: move install_package to isar-base Henning Schild
@ 2017-08-01 11:48   ` Claudius Heine
  2017-08-01 14:00   ` Claudius Heine
  1 sibling, 0 replies; 64+ messages in thread
From: Claudius Heine @ 2017-08-01 11:48 UTC (permalink / raw)
  To: [ext] Henning Schild, isar-users

On 08/01/2017 12:17 PM, [ext] Henning Schild wrote:
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>   meta/classes/dpkg.bbclass      |  9 ---------
>   meta/classes/isar-base.bbclass | 10 ++++++++++
>   2 files changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> index 2a1b85c..37b2c8d 100644
> --- a/meta/classes/dpkg.bbclass
> +++ b/meta/classes/dpkg.bbclass
> @@ -20,12 +20,3 @@ do_compile() {
>   
>   addtask compile after do_unpack before do_install_package
>   do_compile[stamp-extra-info] = "${DISTRO}"
> -
> -# Install package to dedicated deploy directory
> -do_install_package() {
> -    install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
> -}
> -
> -addtask install_package after do_compile before do_build
> -do_install_package[dirs] = "${DEPLOY_DIR_DEB}"
> -do_install_package[stamp-extra-info] = "${MACHINE}"
> diff --git a/meta/classes/isar-base.bbclass b/meta/classes/isar-base.bbclass
> index 3df6572..68e2aed 100644
> --- a/meta/classes/isar-base.bbclass
> +++ b/meta/classes/isar-base.bbclass
> @@ -32,3 +32,13 @@ python do_unpack() {
>   addtask unpack after do_fetch before do_build
>   do_unpack[dirs] = "${WORKDIR}"
>   do_unpack[stamp-extra-info] = "${DISTRO}"
> +
> +
> +# Install package to dedicated deploy directory
> +do_install_package() {
> +    install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
> +}
> +
> +addtask install_package before do_build

Add "after do_unpack" here.

> +do_install_package[dirs] = "${DEPLOY_DIR_DEB}"
> +do_install_package[stamp-extra-info] = "${MACHINE}"
> 

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 13/16] meta: classes: move install_package to isar-base
  2017-08-01 10:17 ` [PATCH 13/16] meta: classes: move install_package to isar-base Henning Schild
  2017-08-01 11:48   ` Claudius Heine
@ 2017-08-01 14:00   ` Claudius Heine
  2017-08-01 15:01     ` Henning Schild
  1 sibling, 1 reply; 64+ messages in thread
From: Claudius Heine @ 2017-08-01 14:00 UTC (permalink / raw)
  To: [ext] Henning Schild, isar-users



On 08/01/2017 12:17 PM, [ext] Henning Schild wrote:
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>   meta/classes/dpkg.bbclass      |  9 ---------
>   meta/classes/isar-base.bbclass | 10 ++++++++++
>   2 files changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> index 2a1b85c..37b2c8d 100644
> --- a/meta/classes/dpkg.bbclass
> +++ b/meta/classes/dpkg.bbclass
> @@ -20,12 +20,3 @@ do_compile() {
>   
>   addtask compile after do_unpack before do_install_package
>   do_compile[stamp-extra-info] = "${DISTRO}"
> -
> -# Install package to dedicated deploy directory
> -do_install_package() {
> -    install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
> -}
> -
> -addtask install_package after do_compile before do_build
> -do_install_package[dirs] = "${DEPLOY_DIR_DEB}"
> -do_install_package[stamp-extra-info] = "${MACHINE}"
> diff --git a/meta/classes/isar-base.bbclass b/meta/classes/isar-base.bbclass
> index 3df6572..68e2aed 100644
> --- a/meta/classes/isar-base.bbclass
> +++ b/meta/classes/isar-base.bbclass
> @@ -32,3 +32,13 @@ python do_unpack() {
>   addtask unpack after do_fetch before do_build
>   do_unpack[dirs] = "${WORKDIR}"
>   do_unpack[stamp-extra-info] = "${DISTRO}"
> +
> +
> +# Install package to dedicated deploy directory
> +do_install_package() {
> +    install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/

Since I like to use the fetcher tasks for a image recipe, I inherit from 
this class, but the image recipe does not have any 'deb' files, so 
building failes here.

So it might be more modular if this task moves into an own class.

> +}
> +
> +addtask install_package before do_build
> +do_install_package[dirs] = "${DEPLOY_DIR_DEB}"
> +do_install_package[stamp-extra-info] = "${MACHINE}"
> 

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 15/16] meta: add dpkg-bin class
  2017-08-01 10:17 ` [PATCH 15/16] meta: add dpkg-bin class Henning Schild
@ 2017-08-01 14:25   ` Claudius Heine
  2017-08-01 15:10     ` Claudius Heine
  2017-08-02 11:11   ` Claudius Heine
  1 sibling, 1 reply; 64+ messages in thread
From: Claudius Heine @ 2017-08-01 14:25 UTC (permalink / raw)
  To: [ext] Henning Schild, isar-users; +Cc: Dr . Johann Pfefferl



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.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.

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
> 

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 13/16] meta: classes: move install_package to isar-base
  2017-08-01 14:00   ` Claudius Heine
@ 2017-08-01 15:01     ` Henning Schild
  0 siblings, 0 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-01 15:01 UTC (permalink / raw)
  To: Claudius Heine; +Cc: isar-users

Am Tue, 1 Aug 2017 16:00:03 +0200
schrieb Claudius Heine <claudius.heine.ext@siemens.com>:

> On 08/01/2017 12:17 PM, [ext] Henning Schild wrote:
> > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > ---
> >   meta/classes/dpkg.bbclass      |  9 ---------
> >   meta/classes/isar-base.bbclass | 10 ++++++++++
> >   2 files changed, 10 insertions(+), 9 deletions(-)
> > 
> > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> > index 2a1b85c..37b2c8d 100644
> > --- a/meta/classes/dpkg.bbclass
> > +++ b/meta/classes/dpkg.bbclass
> > @@ -20,12 +20,3 @@ do_compile() {
> >   
> >   addtask compile after do_unpack before do_install_package
> >   do_compile[stamp-extra-info] = "${DISTRO}"
> > -
> > -# Install package to dedicated deploy directory
> > -do_install_package() {
> > -    install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
> > -}
> > -
> > -addtask install_package after do_compile before do_build
> > -do_install_package[dirs] = "${DEPLOY_DIR_DEB}"
> > -do_install_package[stamp-extra-info] = "${MACHINE}"
> > diff --git a/meta/classes/isar-base.bbclass
> > b/meta/classes/isar-base.bbclass index 3df6572..68e2aed 100644
> > --- a/meta/classes/isar-base.bbclass
> > +++ b/meta/classes/isar-base.bbclass
> > @@ -32,3 +32,13 @@ python do_unpack() {
> >   addtask unpack after do_fetch before do_build
> >   do_unpack[dirs] = "${WORKDIR}"
> >   do_unpack[stamp-extra-info] = "${DISTRO}"
> > +
> > +
> > +# Install package to dedicated deploy directory
> > +do_install_package() {
> > +    install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/  
> 
> Since I like to use the fetcher tasks for a image recipe, I inherit
> from this class, but the image recipe does not have any 'deb' files,
> so building failes here.
> 
> So it might be more modular if this task moves into an own class.

Sure, makes sense. I just started looking into the image side of isar.
Will be addressed in a V2.

Henning

> > +}
> > +
> > +addtask install_package before do_build
> > +do_install_package[dirs] = "${DEPLOY_DIR_DEB}"
> > +do_install_package[stamp-extra-info] = "${MACHINE}"
> >   


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 15/16] meta: add dpkg-bin class
  2017-08-01 14:25   ` Claudius Heine
@ 2017-08-01 15:10     ` Claudius Heine
  2017-08-02 10:11       ` Alexander Smirnov
  2017-08-02 13:40       ` Henning Schild
  0 siblings, 2 replies; 64+ messages in thread
From: Claudius Heine @ 2017-08-01 15:10 UTC (permalink / raw)
  To: [ext] Henning Schild, isar-users; +Cc: Dr . Johann Pfefferl



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.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.

> 
> 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
>>
> 

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 16/16] recipes-app/hello-bin: add example on how to use dpkg-bin
  2017-08-01 10:17 ` [PATCH 16/16] recipes-app/hello-bin: add example on how to use dpkg-bin Henning Schild
@ 2017-08-02  6:33   ` Jan Kiszka
  2017-08-02  6:55     ` Claudius Heine
  2017-08-03 18:48     ` Henning Schild
  0 siblings, 2 replies; 64+ messages in thread
From: Jan Kiszka @ 2017-08-02  6:33 UTC (permalink / raw)
  To: [ext] Henning Schild, isar-users

On 2017-08-01 12:17, [ext] Henning Schild wrote:
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>  meta-isar/recipes-app/hello-bin/files/README     |  1 +
>  meta-isar/recipes-app/hello-bin/files/postinst   | 14 +++++++++++++
>  meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb | 26 ++++++++++++++++++++++++
>  3 files changed, 41 insertions(+)
>  create mode 100644 meta-isar/recipes-app/hello-bin/files/README
>  create mode 100644 meta-isar/recipes-app/hello-bin/files/postinst
>  create mode 100644 meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb
> 
> diff --git a/meta-isar/recipes-app/hello-bin/files/README b/meta-isar/recipes-app/hello-bin/files/README
> new file mode 100644
> index 0000000..6e2ce0f
> --- /dev/null
> +++ b/meta-isar/recipes-app/hello-bin/files/README
> @@ -0,0 +1 @@
> +This is an example file that we get from FILESDIR in recipe.
> diff --git a/meta-isar/recipes-app/hello-bin/files/postinst b/meta-isar/recipes-app/hello-bin/files/postinst
> new file mode 100644
> index 0000000..2a9eab6
> --- /dev/null
> +++ b/meta-isar/recipes-app/hello-bin/files/postinst
> @@ -0,0 +1,14 @@
> +#!/bin/sh
> +
> +set -e
> +
> +if ! getent group hello >/dev/null; then
> +	addgroup --quiet --system hello
> +fi
> +
> +if ! getent passwd hello >/dev/null; then
> +	adduser --system --ingroup hello --home /var/lib/hello hello \
> +		--gecos "My hello user"
> +fi
> +
> +chown -R hello:hello /var/lib/hello

Nice.

> diff --git a/meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb b/meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb
> new file mode 100644
> index 0000000..5ff12d3
> --- /dev/null
> +++ b/meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb
> @@ -0,0 +1,26 @@
> +# Sample application using dpkg-bin, which turns a folder (${D}) of
> +# files into a .deb 
> +#
> +# This software is a part of ISAR.
> +
> +DESCRIPTION = "Sample bin application for ISAR"
> +DEBIAN_MAINTAINER = "Your name here <you@domain.com>"
> +
> +inherit dpkg-bin
> +

In contrast to OE/Yocto, we don't need to specify the files we want to
install later on here via SRC_URI? I'm not sure right now that we do not
lose some features when skipping this local fetching steps.

> +do_install() {
> +	bbnote "Creating ${PN} binary"
> +	echo "#!/bin/sh" > ${WORKDIR}/${PN}
> +	echo "echo Hello World! ${PN}_${PV}" >> ${WORKDIR}/${PN}
> +
> +	bbnote "Putting ${PN} into overlay"

Nit: Is overlay the right term here?

> +	install -v -d ${D}/usr/local/bin/
> +	install -v -m 755 ${WORKDIR}/${PN} ${D}/usr/local/bin/${PN}
> +
> +	bbnote "Now copy ${FILESDIR}/README to overlay"

In OE, FILESDIR is deprecated and has been removed already. Probably not
a good idea to introduce it here. FILESPATH is now the standard.

However:

"Usage of FILESPATH is discouraged, since it can make recipes harder
to bbappend. Instead FILESEXTRAPATHS should be used to extend the path."

> +	install -v -d ${D}/usr/local/doc/
> +	install -v -m 644 ${FILESDIR}/README ${D}/usr/local/doc/README-${P}
> +
> +	bbnote "Now for a debian hook, see dpkg-deb"
> +	install -v -m 755 ${FILESDIR}/postinst ${D}/DEBIAN/postinst

Maybe this could be automated - to avoid boilerplate logic - by defining
some DEBIAN_POSTINST var. dpkg-bin could evaluate that var and install
everything mentioned in it without requiring the user to do this here
manually.

> +}
> 

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 16/16] recipes-app/hello-bin: add example on how to use dpkg-bin
  2017-08-02  6:33   ` Jan Kiszka
@ 2017-08-02  6:55     ` Claudius Heine
  2017-08-03 18:48     ` Henning Schild
  1 sibling, 0 replies; 64+ messages in thread
From: Claudius Heine @ 2017-08-02  6:55 UTC (permalink / raw)
  To: [ext] Jan Kiszka, [ext] Henning Schild, isar-users

On 08/02/2017 08:33 AM, [ext] Jan Kiszka wrote:
> On 2017-08-01 12:17, [ext] Henning Schild wrote:
>> Signed-off-by: Henning Schild <henning.schild@siemens.com>
>> ---
>>   meta-isar/recipes-app/hello-bin/files/README     |  1 +
>>   meta-isar/recipes-app/hello-bin/files/postinst   | 14 +++++++++++++
>>   meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb | 26 ++++++++++++++++++++++++
>>   3 files changed, 41 insertions(+)
>>   create mode 100644 meta-isar/recipes-app/hello-bin/files/README
>>   create mode 100644 meta-isar/recipes-app/hello-bin/files/postinst
>>   create mode 100644 meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb
>>
>> diff --git a/meta-isar/recipes-app/hello-bin/files/README b/meta-isar/recipes-app/hello-bin/files/README
>> new file mode 100644
>> index 0000000..6e2ce0f
>> --- /dev/null
>> +++ b/meta-isar/recipes-app/hello-bin/files/README
>> @@ -0,0 +1 @@
>> +This is an example file that we get from FILESDIR in recipe.
>> diff --git a/meta-isar/recipes-app/hello-bin/files/postinst b/meta-isar/recipes-app/hello-bin/files/postinst
>> new file mode 100644
>> index 0000000..2a9eab6
>> --- /dev/null
>> +++ b/meta-isar/recipes-app/hello-bin/files/postinst
>> @@ -0,0 +1,14 @@
>> +#!/bin/sh
>> +
>> +set -e
>> +
>> +if ! getent group hello >/dev/null; then
>> +	addgroup --quiet --system hello
>> +fi
>> +
>> +if ! getent passwd hello >/dev/null; then
>> +	adduser --system --ingroup hello --home /var/lib/hello hello \
>> +		--gecos "My hello user"
>> +fi
>> +
>> +chown -R hello:hello /var/lib/hello
> 
> Nice.
> 
>> diff --git a/meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb b/meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb
>> new file mode 100644
>> index 0000000..5ff12d3
>> --- /dev/null
>> +++ b/meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb
>> @@ -0,0 +1,26 @@
>> +# Sample application using dpkg-bin, which turns a folder (${D}) of
>> +# files into a .deb
>> +#
>> +# This software is a part of ISAR.
>> +
>> +DESCRIPTION = "Sample bin application for ISAR"
>> +DEBIAN_MAINTAINER = "Your name here <you@domain.com>"
>> +
>> +inherit dpkg-bin
>> +
> 
> In contrast to OE/Yocto, we don't need to specify the files we want to
> install later on here via SRC_URI? I'm not sure right now that we do not
> lose some features when skipping this local fetching steps.

The fetch step is still there, but it doesn't do anything because 
SRC_URI is empty.

> 
>> +	install -v -d ${D}/usr/local/bin/
>> +	install -v -m 755 ${WORKDIR}/${PN} ${D}/usr/local/bin/${PN}
>> +
>> +	bbnote "Now copy ${FILESDIR}/README to overlay"
> 
> In OE, FILESDIR is deprecated and has been removed already. Probably not
> a good idea to introduce it here. FILESPATH is now the standard.

The README should be put into the SRC_URI and then fetched via the 
do_fetch step from the FILESDIR/FILESPATH into the WORKDIR.

> However:
> 
> "Usage of FILESPATH is discouraged, since it can make recipes harder
> to bbappend. Instead FILESEXTRAPATHS should be used to extend the path."
> 
>> +	install -v -d ${D}/usr/local/doc/
>> +	install -v -m 644 ${FILESDIR}/README ${D}/usr/local/doc/README-${P}
>> +
>> +	bbnote "Now for a debian hook, see dpkg-deb"
>> +	install -v -m 755 ${FILESDIR}/postinst ${D}/DEBIAN/postinst
> 
> Maybe this could be automated - to avoid boilerplate logic - by defining
> some DEBIAN_POSTINST var. dpkg-bin could evaluate that var and install
> everything mentioned in it without requiring the user to do this here
> manually.

Here is another idea, simpler but then you can put the additional steps 
easily into the recipe. Provide a variable to 
"${D}/DEBIAN/[postinst,...]" so you can simply do something like this:

cat >${DEBIAN_POSTINST_FILE} <<EOF
#!/bin/sh

set -e

if ! getent group hello >/dev/null; then
     addgroup --quiet --system hello
fi

if ! getent passwd hello >/dev/null; then
     adduser --system --ingroup hello --home /var/lib/hello hello \
             --gecos "My hello user"
fi

chown -R hello:hello /var/lib/hello
EOF

in the do_install step. This way you would have every step to setup the 
package and rootfs neatly in a single file and if this becomes to long, 
just add a file to the SRC_URI, fetch it to the workdir and copy/install 
it to this path in the do_install step.

Cheers,
Claudius

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 01/16] meta: ext4-img: copy and keep attributes, always copy with sudo
  2017-08-01 10:17 ` [PATCH 01/16] meta: ext4-img: copy and keep attributes, always copy with sudo Henning Schild
@ 2017-08-02  7:48   ` Alexander Smirnov
  2017-08-02 11:18     ` Henning Schild
  2017-10-19 18:04   ` Henning Schild
  1 sibling, 1 reply; 64+ messages in thread
From: Alexander Smirnov @ 2017-08-02  7:48 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

[-- Attachment #1: Type: text/plain, Size: 2653 bytes --]

Hi,

2017-08-01 13:17 GMT+03:00 Henning Schild <henning.schild@siemens.com>:

> Some security enhancing packages can cause our initrd to be not readable
> by a normal user. So we need to copy with sudo.
>

Please be more explicit which packages, it'd be nice to have examples here
in the commit message.
In general Isar follows the way to reduce usage of 'sudo' as much as
possible, so every new entry should have good reasons.


> Also regular cp would destroy ownership and other attributes of files,
> possibly creating problems in the future.
>

Also an example is highly appreciated.


>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>  meta/classes/ext4-img.bbclass | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/ext4-img.bbclass b/meta/classes/ext4-img.bbclass
> index 65d4c11..6dc2039 100644
> --- a/meta/classes/ext4-img.bbclass
> +++ b/meta/classes/ext4-img.bbclass
> @@ -21,16 +21,16 @@ do_ext4_image() {
>
>      mkdir -p ${WORKDIR}/mnt
>      sudo mount -o loop ${EXT4_IMAGE_FILE} ${WORKDIR}/mnt
> -    sudo cp -r ${S}/* ${WORKDIR}/mnt
> +    sudo cp -a ${S}/* ${WORKDIR}/mnt
>      sudo umount ${WORKDIR}/mnt
>      rm -r ${WORKDIR}/mnt
>
>      if [ -n "${KERNEL_IMAGE}" ]; then
> -        cp ${S}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
> +        sudo cp -a ${S}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
>

1. Ideally DEPLOY_DIR_IMAGE should not contain files with root permissions,
the only multistrap filesystems should require them. Any spread of sudo
significantly increases the probability to damage host system. Also I don't
see the reason to keep kernel image undo supervisor permissions.
2. If KERNEL_IMAGE is symbolic link, 'cp -a' will copy symlink only.


>      fi
>
>      if [ -n "${INITRD_IMAGE}" ]; then
> -        cp ${S}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
> +        sudo cp -a ${S}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
>      fi
>

I think that closed initrd is more private case than mainstream. Can we
cosider possibility to implement this as optional security feature?


>  }
>
> --
> 2.13.0
>
> --
> 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/5e98880f61dba959ada0c9bc8feca65b0a5760e5.1501582237.git.
> henning.schild%40siemens.com.
> For more options, visit https://groups.google.com/d/optout.
>

[-- Attachment #2: Type: text/html, Size: 4461 bytes --]

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 03/16] meta: isar-base: remove unused function
       [not found]   ` <CAJmB2rBwssbfjgqL2wAsOFfGUK7DbBY31tF_QhR09Ot0rmRVjQ@mail.gmail.com>
@ 2017-08-02  8:20     ` Alexander Smirnov
  0 siblings, 0 replies; 64+ messages in thread
From: Alexander Smirnov @ 2017-08-02  8:20 UTC (permalink / raw)
  To: Henning Schild, isar-users

[-- Attachment #1: Type: text/plain, Size: 1555 bytes --]

Added list to Cc

2017-08-02 11:06 GMT+03:00 Alexander Smirnov <
alex.bluesman.smirnov@gmail.com>:

> 2017-08-01 13:17 GMT+03:00 Henning Schild <henning.schild@siemens.com>:
>
>> Signed-off-by: Henning Schild <henning.schild@siemens.com>
>> ---
>>  meta/classes/isar-base.bbclass | 12 ------------
>>  1 file changed, 12 deletions(-)
>>
>> diff --git a/meta/classes/isar-base.bbclass
>> b/meta/classes/isar-base.bbclass
>> index 0432880..25809fa 100644
>> --- a/meta/classes/isar-base.bbclass
>> +++ b/meta/classes/isar-base.bbclass
>> @@ -1,15 +1,3 @@
>>  THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}"
>>
>> -bbdebug() {
>> -       test $# -ge 2 || {
>> -               echo "Usage: bbdebug level \"message\""
>> -               exit 1
>> -       }
>> -
>> -       test ${@bb.msg.debug_level['default']} -ge $1 && {
>> -               shift
>> -               echo "DEBUG:" $*
>> -       }
>> -}
>> -
>>
>
> Merge with previous patch?
>
>
>>  do_build[nostamp] = "0"
>> --
>> 2.13.0
>>
>> --
>> 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/ms
>> gid/isar-users/c78a0e5d3e93e5936133ae3292c039a3eca3a6c2.
>> 1501582237.git.henning.schild%40siemens.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

[-- Attachment #2: Type: text/html, Size: 3141 bytes --]

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 02/16] meta: classes: use base.bbclass from bitbake
       [not found]   ` <CAJmB2rBjBqHxPKTna-XUtgmW9i-ooQwbACyFgQTQahTqUAxHcg@mail.gmail.com>
@ 2017-08-02  8:21     ` Alexander Smirnov
  0 siblings, 0 replies; 64+ messages in thread
From: Alexander Smirnov @ 2017-08-02  8:21 UTC (permalink / raw)
  To: Henning Schild, isar-users

[-- Attachment #1: Type: text/plain, Size: 6362 bytes --]

Added list to Cc.

2017-08-02 11:05 GMT+03:00 Alexander Smirnov <
alex.bluesman.smirnov@gmail.com>:

> Hi,
>
> 2017-08-01 13:17 GMT+03:00 Henning Schild <henning.schild@siemens.com>:
>
>> Do not use our own copy of that class and move local deviations into
>> isar-base. That also fixes the default tasks "showdata" and "listtasks",
>> which probably never worked.
>>
>>
> Good point! Initially we forked from original base class with thougths,
> that we will completely rework it, but now I see that this didn't happen.
>
>
>> Signed-off-by: Henning Schild <henning.schild@siemens.com>
>> ---
>>  meta/classes/base.bbclass      | 81 +-----------------------------
>> ------------
>>  meta/classes/dpkg.bbclass      |  2 ++
>>  meta/classes/ext4-img.bbclass  |  2 ++
>>  meta/classes/isar-base.bbclass | 15 ++++++++
>>  4 files changed, 20 insertions(+), 80 deletions(-)
>>  mode change 100644 => 120000 meta/classes/base.bbclass
>>  create mode 100644 meta/classes/isar-base.bbclass
>>
>> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
>> deleted file mode 100644
>> index 48b6bac..0000000
>> --- a/meta/classes/base.bbclass
>> +++ /dev/null
>> @@ -1,80 +0,0 @@
>> -# Copyright (C) 2003  Chris Larson
>> -#
>> -# Permission is hereby granted, free of charge, to any person obtaining a
>> -# copy of this software and associated documentation files (the
>> "Software"),
>> -# to deal in the Software without restriction, including without
>> limitation
>> -# the rights to use, copy, modify, merge, publish, distribute,
>> sublicense,
>> -# and/or sell copies of the Software, and to permit persons to whom the
>> -# Software is furnished to do so, subject to the following conditions:
>> -#
>> -# The above copyright notice and this permission notice shall be included
>> -# in all copies or substantial portions of the Software.
>> -#
>> -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
>> EXPRESS OR
>> -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
>> MERCHANTABILITY,
>> -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
>> -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
>> -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
>> -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> -# OTHER DEALINGS IN THE SOFTWARE.
>> -
>> -THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}"
>> -
>> -die() {
>> -       bbfatal "$*"
>> -}
>> -
>> -bbnote() {
>> -       echo "NOTE:" "$*"
>> -}
>> -
>> -bbwarn() {
>> -       echo "WARNING:" "$*"
>> -}
>> -
>> -bbfatal() {
>> -       echo "FATAL:" "$*"
>> -       exit 1
>> -}
>> -
>> -bbdebug() {
>> -       test $# -ge 2 || {
>> -               echo "Usage: bbdebug level \"message\""
>> -               exit 1
>> -       }
>> -
>> -       test ${@bb.msg.debug_level['default']} -ge $1 && {
>> -               shift
>> -               echo "DEBUG:" $*
>> -       }
>> -}
>> -
>> -addtask showdata
>> -do_showdata[nostamp] = "1"
>> -python do_showdata() {
>> -       import sys
>> -       # emit variables and shell functions
>> -       bb.data.emit_env(sys.__stdout__, d, True)
>> -       # emit the metadata which isnt valid shell
>> -       for e in bb.data.keys(d):
>> -               if bb.data.getVarFlag(e, 'python', d):
>> -                       sys.__stdout__.write("\npython %s () {\n%s}\n" %
>> (e, bb.data.getVar(e, d, 1)))
>> -}
>> -
>> -addtask listtasks
>> -do_listtasks[nostamp] = "1"
>> -python do_listtasks() {
>> -       import sys
>> -       for e in bb.data.keys(d):
>> -               if bb.data.getVarFlag(e, 'task', d):
>> -                       sys.__stdout__.write("%s\n" % e)
>> -}
>> -
>> -addtask build
>> -do_build[dirs] = "${TOPDIR}"
>> -python base_do_build () {
>> -       bb.note("The included, default BB base.bbclass does not define a
>> useful default task.")
>> -       bb.note("Try running the 'listtasks' task against a .bb to see
>> what tasks are defined.")
>> -}
>> -
>> -EXPORT_FUNCTIONS do_clean do_mrproper do_build
>> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
>> new file mode 120000
>> index 0000000..11fe0a4
>> --- /dev/null
>> +++ b/meta/classes/base.bbclass
>> @@ -0,0 +1 @@
>> +../../bitbake/classes/base.bbclass
>> \ No newline at end of file
>> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
>> index a0446d7..3d7aafb 100644
>> --- a/meta/classes/dpkg.bbclass
>> +++ b/meta/classes/dpkg.bbclass
>> @@ -1,6 +1,8 @@
>>  # This software is a part of ISAR.
>>  # Copyright (C) 2015-2016 ilbers GmbH
>>
>> +inherit isar-base
>> +
>>  # Add dependency from buildchroot creation
>>  DEPENDS += "buildchroot"
>>  do_unpack[deptask] = "do_build"
>> diff --git a/meta/classes/ext4-img.bbclass b/meta/classes/ext4-img.bbclas
>> s
>> index 6dc2039..eb23d06 100644
>> --- a/meta/classes/ext4-img.bbclass
>> +++ b/meta/classes/ext4-img.bbclass
>> @@ -1,6 +1,8 @@
>>  # This software is a part of ISAR.
>>  # Copyright (C) 2015-2016 ilbers GmbH
>>
>> +inherit isar-base
>> +
>>  # Extra space for rootfs in MB
>>  ROOTFS_EXTRA ?= "64"
>>
>> diff --git a/meta/classes/isar-base.bbclass
>> b/meta/classes/isar-base.bbclass
>> new file mode 100644
>> index 0000000..0432880
>> --- /dev/null
>> +++ b/meta/classes/isar-base.bbclass
>> @@ -0,0 +1,15 @@
>>
>
> Could you please add your copyright and mention MIT license.
>
>
>> +THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}"
>> +
>> +bbdebug() {
>> +       test $# -ge 2 || {
>> +               echo "Usage: bbdebug level \"message\""
>> +               exit 1
>> +       }
>> +
>> +       test ${@bb.msg.debug_level['default']} -ge $1 && {
>> +               shift
>> +               echo "DEBUG:" $*
>> +       }
>> +}
>> +
>> +do_build[nostamp] = "0"
>> --
>> 2.13.0
>>
>> --
>> 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/ms
>> gid/isar-users/179751c2d650bde36808d0a0cfe6cdf840b171e3.
>> 1501582237.git.henning.schild%40siemens.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

[-- Attachment #2: Type: text/html, Size: 8907 bytes --]

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 04/16] remove redundant variable THISDIR
  2017-08-01 10:17 ` [PATCH 04/16] remove redundant variable THISDIR Henning Schild
@ 2017-08-02  8:25   ` Alexander Smirnov
  2017-08-02 11:20     ` Henning Schild
  0 siblings, 1 reply; 64+ messages in thread
From: Alexander Smirnov @ 2017-08-02  8:25 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

[-- Attachment #1: Type: text/plain, Size: 5181 bytes --]

2017-08-01 13:17 GMT+03:00 Henning Schild <henning.schild@siemens.com>:

> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>  .../doc/bitbake-user-manual/bitbake-user-manual-execution.xml  |  2 +-
>  meta-isar/recipes-core/images/isar-image-base.bb               |  8
> ++++----
>  meta/classes/isar-base.bbclass                                 |  2 --
>  meta/recipes-devtools/buildchroot/buildchroot.bb               | 10
> +++++-----
>  4 files changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
> b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
> index ec75893..b9aafd1 100644
> --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
> +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
> @@ -765,7 +765,7 @@
>              the concept:
>              <literallayout class='monospaced'>
>       BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH
> DL_DIR \
> -         SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME
> SHELL TERM \
> +         SSTATE_DIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
>

Does this change have any reference in upstream? We are trying to keep
bitbake tree unmodified to simplify migration to newer versions. If not,
probably we can drop this modification and apply the rest of the patch.


>           USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE
> PRSERV_HOST \
>           PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
>           CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH
> SDKPKGSUFFIX"
> diff --git a/meta-isar/recipes-core/images/isar-image-base.bb
> b/meta-isar/recipes-core/images/isar-image-base.bb
> index 337c329..0810de0 100644
> --- a/meta-isar/recipes-core/images/isar-image-base.bb
> +++ b/meta-isar/recipes-core/images/isar-image-base.bb
> @@ -27,10 +27,10 @@ do_rootfs() {
>      install -d -m 755 ${WORKDIR}/hooks_multistrap
>
>      # Copy config file
> -    install -m 644 ${THISDIR}/files/multistrap.conf.in
> ${WORKDIR}/multistrap.conf
> -    install -m 755 ${THISDIR}/files/${DISTRO_CONFIG_SCRIPT}
> ${WORKDIR}/configscript.sh
> -    install -m 755 ${THISDIR}/files/setup.sh ${WORKDIR}
> -    install -m 755 ${THISDIR}/files/download_dev-random
> ${WORKDIR}/hooks_multistrap/
> +    install -m 644 ${FILESDIR}/multistrap.conf.in
> ${WORKDIR}/multistrap.conf
> +    install -m 755 ${FILESDIR}/${DISTRO_CONFIG_SCRIPT}
> ${WORKDIR}/configscript.sh
> +    install -m 755 ${FILESDIR}/setup.sh ${WORKDIR}
> +    install -m 755 ${FILESDIR}/download_dev-random
> ${WORKDIR}/hooks_multistrap/
>
>      # Adjust multistrap config
>      sed -i 's|##IMAGE_PREINSTALL##|${IMAGE_PREINSTALL}|'
> ${WORKDIR}/multistrap.conf
> diff --git a/meta/classes/isar-base.bbclass b/meta/classes/isar-base.
> bbclass
> index 25809fa..33b0369 100644
> --- a/meta/classes/isar-base.bbclass
> +++ b/meta/classes/isar-base.bbclass
> @@ -1,3 +1 @@
> -THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}"
> -
>  do_build[nostamp] = "0"
> diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb
> b/meta/recipes-devtools/buildchroot/buildchroot.bb
> index ba1bc66..f471f5e 100644
> --- a/meta/recipes-devtools/buildchroot/buildchroot.bb
> +++ b/meta/recipes-devtools/buildchroot/buildchroot.bb
> @@ -29,10 +29,10 @@ do_build() {
>      install -d -m 755 ${WORKDIR}/hooks_multistrap
>
>      # Copy config files
> -    install -m 644 ${THISDIR}/files/multistrap.conf.in
> ${WORKDIR}/multistrap.conf
> -    install -m 755 ${THISDIR}/files/configscript.sh ${WORKDIR}
> -    install -m 755 ${THISDIR}/files/setup.sh ${WORKDIR}
> -    install -m 755 ${THISDIR}/files/download_dev-random
> ${WORKDIR}/hooks_multistrap/
> +    install -m 644 ${FILESDIR}/multistrap.conf.in
> ${WORKDIR}/multistrap.conf
> +    install -m 755 ${FILESDIR}/configscript.sh ${WORKDIR}
> +    install -m 755 ${FILESDIR}/setup.sh ${WORKDIR}
> +    install -m 755 ${FILESDIR}/download_dev-random
> ${WORKDIR}/hooks_multistrap/
>
>      # Adjust multistrap config
>      sed -i 's|##BUILDCHROOT_PREINSTALL##|${BUILDCHROOT_PREINSTALL}|'
> ${WORKDIR}/multistrap.conf
> @@ -51,7 +51,7 @@ do_build() {
>      sudo multistrap -a ${DISTRO_ARCH} -d "${BUILDCHROOT_DIR}" -f
> "${WORKDIR}/multistrap.conf" || true
>
>      # Install package builder script
> -    sudo install -m 755 ${THISDIR}/files/build.sh ${BUILDCHROOT_DIR}
> +    sudo install -m 755 ${FILESDIR}/build.sh ${BUILDCHROOT_DIR}
>
>      # Configure root filesystem
>      sudo chroot ${BUILDCHROOT_DIR} /configscript.sh
> --
> 2.13.0
>
> --
> 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/5ac96edda9115c2d1e7fd7b8c9aec563fbd07c05.1501582237.git.
> henning.schild%40siemens.com.
> For more options, visit https://groups.google.com/d/optout.
>

[-- Attachment #2: Type: text/html, Size: 7781 bytes --]

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 05/16] meta: conf: use bitbake.conf from bitbake and apply local changes
  2017-08-01 10:17 ` [PATCH 05/16] meta: conf: use bitbake.conf from bitbake and apply local changes Henning Schild
@ 2017-08-02  8:34   ` Alexander Smirnov
  2017-08-02 11:22     ` Henning Schild
  0 siblings, 1 reply; 64+ messages in thread
From: Alexander Smirnov @ 2017-08-02  8:34 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

[-- Attachment #1: Type: text/plain, Size: 6919 bytes --]

2017-08-01 13:17 GMT+03:00 Henning Schild <henning.schild@siemens.com>:

> force isar to always use a bitbake.conf from its bitbake
> the diff went into a file that needs to be looked at later
>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>  meta/conf/bitbake.conf.sample | 68 ------------------------------
> -------------
>  meta/conf/isar-bitbake.conf   | 20 +++++++++++++
>  scripts/isar-setup-builddir   | 33 ++++++++++++++++++---
>  3 files changed, 49 insertions(+), 72 deletions(-)
>  delete mode 100644 meta/conf/bitbake.conf.sample
>  create mode 100644 meta/conf/isar-bitbake.conf
>
> diff --git a/meta/conf/bitbake.conf.sample b/meta/conf/bitbake.conf.sample
> deleted file mode 100644
> index 9d7c1f4..0000000
> --- a/meta/conf/bitbake.conf.sample
> +++ /dev/null
> @@ -1,68 +0,0 @@
> -# Copyright (C) 2003  Chris Larson
> -#
> -# Permission is hereby granted, free of charge, to any person obtaining a
> -# copy of this software and associated documentation files (the
> "Software"),
> -# to deal in the Software without restriction, including without
> limitation
> -# the rights to use, copy, modify, merge, publish, distribute, sublicense,
> -# and/or sell copies of the Software, and to permit persons to whom the
> -# Software is furnished to do so, subject to the following conditions:
> -#
> -# The above copyright notice and this permission notice shall be included
> -# in all copies or substantial portions of the Software.
> -#
> -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> OR
> -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> -# OTHER DEALINGS IN THE SOFTWARE.
> -
> -B = "${S}"
> -CVSDIR = "${DL_DIR}/cvs"
> -DEPENDS = ""
> -DEPLOY_DIR = "${TMPDIR}/deploy"
> -DEPLOY_DIR_DEB = "${TMPDIR}/deploy/deb/${MACHINE}"
> -DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images"
> -DL_DIR = "${TMPDIR}/downloads"
> -SSTATE_DIR ?= "${TMPDIR}/sstate-cache"
> -FILESDIR = "${@bb.which(bb.data.getVar('FILESPATH', d, 1), '.')}"
> -FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/
> ${PN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
> -FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}"
> -GITDIR = "${DL_DIR}/git"
> -IMAGE_CMD = "_NO_DEFINED_IMAGE_TYPES_"
> -IMAGE_ROOTFS = "${TMPDIR}/rootfs"
> -MKTEMPCMD = "mktemp -q ${TMPBASE}"
> -MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
> -OVERRIDES = "local:${MACHINE}:${TARGET_OS}:${TARGET_ARCH}"
> -P = "${PN}-${PV}"
> -PERSISTENT_DIR = "${TMPDIR}/cache"
> -PF = "${PN}-${PV}-${PR}"
> -PN = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[0]
> or 'defaultpkgname'}"
> -PR = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[2]
> or 'r0'}"
> -PROVIDES = ""
> -PV = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[1]
> or '1.0'}"
> -RESUMECOMMAND = ""
> -RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 --passive-ftp -P
> ${DL_DIR} ${URI}"
> -S = "${WORKDIR}/${P}"
> -SRC_URI = "file://${FILE}"
> -STAMPS_DIR ?= "${TMPDIR}/stamps"
> -STAMP = "${TMPDIR}/stamps/${PF}"
> -SVNDIR = "${DL_DIR}/svn"
> -T = "${WORKDIR}/temp"
> -TARGET_ARCH = "${BUILD_ARCH}"
> -TMPDIR = "${TOPDIR}/tmp"
> -UPDATECOMMAND = ""
> -UPDATECOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} update ${CVSCOOPTS}"
> -UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
> -WORKDIR = "${TMPDIR}/work/${PF}"
> -PERSISTENT_DIR = "${TMPDIR}/cache"
> -BUILDCHROOT_DIR = "${TOPDIR}/tmp/work/buildchroot/${DISTRO}/rootfs"
> -CACHE = "${TMPDIR}/cache"
> -
> -# Setup our default hash policy
> -BB_SIGNATURE_HANDLER ?= "noop"
> -
> -include conf/local.conf
> -include conf/machine/${MACHINE}.conf
> -include conf/distro/${DISTRO}.conf
> diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf
> new file mode 100644
> index 0000000..d56f3da
> --- /dev/null
> +++ b/meta/conf/isar-bitbake.conf
> @@ -0,0 +1,20 @@
> +DEPLOY_DIR_DEB = "${TMPDIR}/deploy/deb/${MACHINE}"
> +SSTATE_DIR ?= "${TMPDIR}/sstate-cache"
> +MKTEMPCMD = "mktemp -q ${TMPBASE}"
> +MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
> +RESUMECOMMAND = ""
> +RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 --passive-ftp -P
> ${DL_DIR} ${URI}"
> +STAMPS_DIR ?= "${TMPDIR}/stamps"
> +UPDATECOMMAND = ""
> +UPDATECOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} update ${CVSCOOPTS}"
> +UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
> +BUILDCHROOT_DIR = "${TOPDIR}/tmp/work/buildchroot/${DISTRO}/rootfs"
> +CROSSBUILDCHROOT_DIR = "${TOPDIR}/tmp/work/crossbuildchroot/${DISTRO_
> ARCH}/${DISTRO}/rootfs"
>

This line is something new, should be intorduced in separate patch.


> +CACHE = "${TMPDIR}/cache"
> +
> +# Setup our default hash policy
> +BB_SIGNATURE_HANDLER ?= "noop"
> +
> +include conf/local.conf
> +include conf/machine/${MACHINE}.conf
> +include conf/distro/${DISTRO}.conf
> diff --git a/scripts/isar-setup-builddir b/scripts/isar-setup-builddir
> index 070a316..d400694 100755
> --- a/scripts/isar-setup-builddir
> +++ b/scripts/isar-setup-builddir
> @@ -106,10 +106,35 @@ EOM
>      SHOWYPDOC=yes
>  fi
>
> -if [ ! -f "$BUILDDIR/conf/bitbake.conf" ]; then
> -    cp "$ISARROOT/meta/conf/bitbake.conf.sample" \
> -       "$BUILDDIR/conf/bitbake.conf"
> -fi
> +cat <<EOF > $BUILDDIR/conf/bitbake.conf
> +# ********************************************
> +# THIS FILE IS GENERATED! DO NOT MESS WITH IT!
> +# ********************************************
> +
> +# ---------
> +# begin original bitbake.conf
> +# ---------
> +
> +EOF
> +cat "$ISARROOT/bitbake/conf/bitbake.conf" >> \
> +  "$BUILDDIR/conf/bitbake.conf"
> +cat <<EOF >> $BUILDDIR/conf/bitbake.conf
> +# ---------
> +# end original bitbake.conf
> +# ---------
> +
> +# ---------
> +# begin isar-bitbake.conf
> +# ---------
> +
> +EOF
> +cat "$ISARROOT/meta/conf/isar-bitbake.conf" >> \
> +  "$BUILDDIR/conf/bitbake.conf"
> +cat <<EOF >> $BUILDDIR/conf/bitbake.conf
> +# ---------
> +# end isar-bitbake.conf
> +# ---------
> +EOF
>
>  # Ending the first-time run message. Show the no documentation banner.
>  if [ ! -z "$SHOWYPDOC" ]; then
> --
> 2.13.0
>
> --
> 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/87b84dd21dce51befba81e7c2214fd62d7817899.1501582237.git.
> henning.schild%40siemens.com.
> For more options, visit https://groups.google.com/d/optout.
>

[-- Attachment #2: Type: text/html, Size: 9296 bytes --]

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 06/16] meta: conf: clean up local bitbake config
  2017-08-01 10:17 ` [PATCH 06/16] meta: conf: clean up local bitbake config Henning Schild
@ 2017-08-02  8:35   ` Alexander Smirnov
  2017-08-02 11:23     ` Henning Schild
  0 siblings, 1 reply; 64+ messages in thread
From: Alexander Smirnov @ 2017-08-02  8:35 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

[-- Attachment #1: Type: text/plain, Size: 1760 bytes --]

2017-08-01 13:17 GMT+03:00 Henning Schild <henning.schild@siemens.com>:

> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>  meta/conf/isar-bitbake.conf | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf
> index d56f3da..426da7f 100644
> --- a/meta/conf/isar-bitbake.conf
> +++ b/meta/conf/isar-bitbake.conf
> @@ -1,16 +1,7 @@
>  DEPLOY_DIR_DEB = "${TMPDIR}/deploy/deb/${MACHINE}"
>  SSTATE_DIR ?= "${TMPDIR}/sstate-cache"
> -MKTEMPCMD = "mktemp -q ${TMPBASE}"
> -MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
> -RESUMECOMMAND = ""
> -RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 --passive-ftp -P
> ${DL_DIR} ${URI}"
> -STAMPS_DIR ?= "${TMPDIR}/stamps"
> -UPDATECOMMAND = ""
> -UPDATECOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} update ${CVSCOOPTS}"
> -UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
>  BUILDCHROOT_DIR = "${TOPDIR}/tmp/work/buildchroot/${DISTRO}/rootfs"
>  CROSSBUILDCHROOT_DIR = "${TOPDIR}/tmp/work/crossbuildchroot/${DISTRO_
> ARCH}/${DISTRO}/rootfs"
> -CACHE = "${TMPDIR}/cache"
>
>
Merge with previous patch?


>  # Setup our default hash policy
>  BB_SIGNATURE_HANDLER ?= "noop"
> --
> 2.13.0
>
> --
> 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/0450af95b41e6b31b881b961e21d424df34e10ba.1501582237.git.
> henning.schild%40siemens.com.
> For more options, visit https://groups.google.com/d/optout.
>

[-- Attachment #2: Type: text/html, Size: 2997 bytes --]

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 07/16] classes: use WORKDIR and get rid of BUILDROOT
  2017-08-01 10:17 ` [PATCH 07/16] classes: use WORKDIR and get rid of BUILDROOT Henning Schild
@ 2017-08-02  9:24   ` Alexander Smirnov
  2017-08-02 11:30     ` Henning Schild
  2017-08-03 11:24     ` Henning Schild
  0 siblings, 2 replies; 64+ messages in thread
From: Alexander Smirnov @ 2017-08-02  9:24 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

[-- Attachment #1: Type: text/plain, Size: 3887 bytes --]

2017-08-01 13:17 GMT+03:00 Henning Schild <henning.schild@siemens.com>:

> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>  meta/classes/dpkg.bbclass | 15 ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> index 3d7aafb..1d0132b 100644
> --- a/meta/classes/dpkg.bbclass
> +++ b/meta/classes/dpkg.bbclass
> @@ -10,9 +10,7 @@ do_unpack[deptask] = "do_build"
>  # Each package should have its own unique build folder, so use
>  # recipe name as identifier
>  PP = "/home/builder/${PN}"
> -BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
> -
> -do_fetch[dirs] = "${DL_DIR}"
> +WORKDIR = "${BUILDCHROOT_DIR}/${PP}"
>

WORKDIR is no the only folder to fetch sources to. This folder represents
workspace for all operation with folder, for example $WORKDIR/temp contails
log files.

Initially Isar designed to follow OE/Yocto style where it's possible.
Traditionally tmp/work folder contains all the packages workspaces with:
build atifacts, patches, bitbake logs etc... So in general it looks like
(roughly speaking):

  tmp/work/toolchain/package/*

This conception ideally works with cross-compilation, when you can compile
packages out of the rootfs tree. Isar implements native compilation, so we
can't build package within current workspace. So the decision was to keep
workspace as it is but relocate build folder to buildchroot. The main
benefit of this approach, that there is a single package workspace for
bitbake metadata, while there may be many buildchroots (different Debian
distros and machines/architectures).

In my opinion this change is another step away from OE/Yocto style.

@Henning: could you please describe the motivation of this change?
@All: any opinions are highly appreciated.


>
>  # Fetch package from the source link
>  python do_fetch() {
> @@ -28,10 +26,10 @@ python do_fetch() {
>  }
>
>  addtask fetch before do_build
> +do_fetch[dirs] = "${DL_DIR}"
>
> -do_unpack[dirs] = "${BUILDROOT}"
>  do_unpack[stamp-extra-info] = "${DISTRO}"
> -S ?= "${BUILDROOT}"
> +S ?= "${WORKDIR}"
>

S folder is used for unpacking sources. WORKDIR - is whole package
workspace. S should not equal to WORKDIR, otherwise this will lead to mess
between package sources and bitbake metadata. For example Also artifacts
from FILESDIR are usually installed to the root of WORKDIR.



>
>  # Unpack package and put it into working directory in buildchroot
>  python do_unpack() {
> @@ -39,16 +37,15 @@ python do_unpack() {
>      if len(src_uri) == 0:
>          return
>
> -    rootdir = d.getVar('BUILDROOT', True)
> -
>      try:
>          fetcher = bb.fetch2.Fetch(src_uri, d)
> -        fetcher.unpack(rootdir)
> +        fetcher.unpack(d.getVar('WORKDIR', True))
>      except bb.fetch2.BBFetchException as e:
>          raise bb.build.FuncFailed(e)
>  }
>
>  addtask unpack after do_fetch before do_build
> +do_unpack[dirs] = "${WORKDIR}"
>
>  do_build[stamp-extra-info] = "${DISTRO}"
>
> @@ -62,7 +59,7 @@ do_install[stamp-extra-info] = "${MACHINE}"
>  # Install package to dedicated deploy directory
>  do_install() {
>      install -d ${DEPLOY_DIR_DEB}
> -    install -m 755 ${BUILDROOT}/*.deb ${DEPLOY_DIR_DEB}/
> +    install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
>  }
>
>  addtask do_install after do_build
> --
> 2.13.0
>
> --
> 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/048e88d5072fc038c8bd6207334e9967d5a29e0c.1501582237.git.
> henning.schild%40siemens.com.
> For more options, visit https://groups.google.com/d/optout.
>

[-- Attachment #2: Type: text/html, Size: 5655 bytes --]

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 08/16] classes: move fetch and unpack into isar-base
  2017-08-01 10:17 ` [PATCH 08/16] classes: move fetch and unpack into isar-base Henning Schild
@ 2017-08-02  9:47   ` Alexander Smirnov
  2017-08-02 11:33     ` Henning Schild
  0 siblings, 1 reply; 64+ messages in thread
From: Alexander Smirnov @ 2017-08-02  9:47 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

[-- Attachment #1: Type: text/plain, Size: 4483 bytes --]

2017-08-01 13:17 GMT+03:00 Henning Schild <henning.schild@siemens.com>:

> create a new base-class for images
>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>  meta/classes/dpkg.bbclass            | 34 ------------------------------
> ----
>  meta/classes/ext4-img.bbclass        |  2 +-
>  meta/classes/isar-base-image.bbclass |  1 +
>  meta/classes/isar-base.bbclass       | 33 ++++++++++++++++++++++++++++++
> +++
>  4 files changed, 35 insertions(+), 35 deletions(-)
>  create mode 100644 meta/classes/isar-base-image.bbclass
>
> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> index 1d0132b..58cee6e 100644
> --- a/meta/classes/dpkg.bbclass
> +++ b/meta/classes/dpkg.bbclass
> @@ -11,42 +11,8 @@ do_unpack[deptask] = "do_build"
>  # recipe name as identifier
>  PP = "/home/builder/${PN}"
>  WORKDIR = "${BUILDCHROOT_DIR}/${PP}"
> -
> -# Fetch package from the source link
> -python do_fetch() {
> -    src_uri = (d.getVar('SRC_URI', True) or "").split()
> -    if len(src_uri) == 0:
> -        return
> -
> -    try:
> -        fetcher = bb.fetch2.Fetch(src_uri, d)
> -        fetcher.download()
> -    except bb.fetch2.BBFetchException as e:
> -        raise bb.build.FuncFailed(e)
> -}
> -
> -addtask fetch before do_build
> -do_fetch[dirs] = "${DL_DIR}"
> -
> -do_unpack[stamp-extra-info] = "${DISTRO}"
>  S ?= "${WORKDIR}"
>
> -# Unpack package and put it into working directory in buildchroot
> -python do_unpack() {
> -    src_uri = (d.getVar('SRC_URI', True) or "").split()
> -    if len(src_uri) == 0:
> -        return
> -
> -    try:
> -        fetcher = bb.fetch2.Fetch(src_uri, d)
> -        fetcher.unpack(d.getVar('WORKDIR', True))
> -    except bb.fetch2.BBFetchException as e:
> -        raise bb.build.FuncFailed(e)
> -}
> -
> -addtask unpack after do_fetch before do_build
> -do_unpack[dirs] = "${WORKDIR}"
> -
>  do_build[stamp-extra-info] = "${DISTRO}"
>
>  # Build package from sources using build script
> diff --git a/meta/classes/ext4-img.bbclass b/meta/classes/ext4-img.bbclass
> index eb23d06..5125d8e 100644
> --- a/meta/classes/ext4-img.bbclass
> +++ b/meta/classes/ext4-img.bbclass
> @@ -1,7 +1,7 @@
>  # This software is a part of ISAR.
>  # Copyright (C) 2015-2016 ilbers GmbH
>
> -inherit isar-base
> +inherit isar-base-image
>
>  # Extra space for rootfs in MB
>  ROOTFS_EXTRA ?= "64"
> diff --git a/meta/classes/isar-base-image.bbclass
> b/meta/classes/isar-base-image.bbclass
> new file mode 100644
> index 0000000..33b0369
> --- /dev/null
> +++ b/meta/classes/isar-base-image.bbclass
> @@ -0,0 +1 @@
> +do_build[nostamp] = "0"
>

>From patch description it's not clear, why we need separate empty class
here with *-image name.


> diff --git a/meta/classes/isar-base.bbclass b/meta/classes/isar-base.
> bbclass
> index 33b0369..3df6572 100644
> --- a/meta/classes/isar-base.bbclass
> +++ b/meta/classes/isar-base.bbclass
> @@ -1 +1,34 @@
>  do_build[nostamp] = "0"
> +
> +# Fetch package from the source link
> +python do_fetch() {
> +    src_uri = (d.getVar('SRC_URI', True) or "").split()
> +    if len(src_uri) == 0:
> +        return
> +
> +    try:
> +        fetcher = bb.fetch2.Fetch(src_uri, d)
> +        fetcher.download()
> +    except bb.fetch2.BBFetchException as e:
> +        raise bb.build.FuncFailed(e)
> +}
> +
> +addtask fetch before do_build
> +do_fetch[dirs] = "${DL_DIR}"
> +
> +# Unpack package and put it into working directory in buildchroot
> +python do_unpack() {
> +    src_uri = (d.getVar('SRC_URI', True) or "").split()
> +    if len(src_uri) == 0:
> +        return
> +
> +    try:
> +        fetcher = bb.fetch2.Fetch(src_uri, d)
> +        fetcher.unpack(d.getVar('WORKDIR', True))
> +    except bb.fetch2.BBFetchException as e:
> +        raise bb.build.FuncFailed(e)
> +}
> +
> +addtask unpack after do_fetch before do_build
> +do_unpack[dirs] = "${WORKDIR}"
> +do_unpack[stamp-extra-info] = "${DISTRO}"
> --
> 2.13.0
>
> --
> 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/ef97842f18e67eb7140790542c0d88a04490421f.1501582237.git.
> henning.schild%40siemens.com.
> For more options, visit https://groups.google.com/d/optout.
>

[-- Attachment #2: Type: text/html, Size: 6267 bytes --]

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 11/16] meta: classes: make do_build always the end of the task-chain
  2017-08-01 10:17 ` [PATCH 11/16] meta: classes: make do_build always the end of the task-chain Henning Schild
@ 2017-08-02  9:54   ` Alexander Smirnov
  2017-08-02 12:05     ` Henning Schild
  0 siblings, 1 reply; 64+ messages in thread
From: Alexander Smirnov @ 2017-08-02  9:54 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

[-- Attachment #1: Type: text/plain, Size: 2474 bytes --]

2017-08-01 13:17 GMT+03:00 Henning Schild <henning.schild@siemens.com>:

> build is bitbakes default target and queing tasks behind it is asking
> for trouble
>

Could you please specify more details about this.


> Introduce do_compile where we "build" the debian packages.
>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>  meta/classes/dpkg.bbclass  | 8 ++++----
>  meta/classes/image.bbclass | 2 +-
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> index 4228b0d..71c7122 100644
> --- a/meta/classes/dpkg.bbclass
> +++ b/meta/classes/dpkg.bbclass
> @@ -13,19 +13,19 @@ PP = "/home/builder/${PN}"
>  WORKDIR = "${BUILDCHROOT_DIR}/${PP}"
>  S ?= "${WORKDIR}"
>
> -do_build[stamp-extra-info] = "${DISTRO}"
> -
>  # Build package from sources using build script
> -do_build() {
> +do_compile() {
>      sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
>  }
>
>
Probably it makes sense to use more evident task name like
do_dpkg-buildpackage or short version - do_buildpackage.
'dpkg-buildpackage' is exactly what is executed in this task, it's not only
about compiling.


> +addtask compile after do_unpack before do_install
> +do_compile[stamp-extra-info] = "${DISTRO}"
>
>  # Install package to dedicated deploy directory
>  do_install() {
>      install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
>  }
>
> -addtask install after do_build
> +addtask install after do_compile before do_build
>  do_install[dirs] = "${DEPLOY_DIR_DEB}"
>  do_install[stamp-extra-info] = "${MACHINE}"
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 3e4877c..8db3352 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -27,4 +27,4 @@ do_populate() {
>  }
>
>  addtask populate before do_build
> -do_populate[deptask] = "do_install"
> +do_populate[deptask] = "do_build"
> --
> 2.13.0
>
> --
> 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/32e4ef6d06af30a76fdb645a4108f817301d3007.1501582237.git.
> henning.schild%40siemens.com.
> For more options, visit https://groups.google.com/d/optout.
>

[-- Attachment #2: Type: text/html, Size: 3900 bytes --]

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 12/16] meta: dpkg rename install to install_package
  2017-08-01 10:17 ` [PATCH 12/16] meta: dpkg rename install to install_package Henning Schild
@ 2017-08-02  9:59   ` Alexander Smirnov
  0 siblings, 0 replies; 64+ messages in thread
From: Alexander Smirnov @ 2017-08-02  9:59 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

[-- Attachment #1: Type: text/plain, Size: 2073 bytes --]

2017-08-01 13:17 GMT+03:00 Henning Schild <henning.schild@siemens.com>:

> install will be used by later patches to actually populate debian
> packages
>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>  meta/classes/dpkg.bbclass | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> index 71c7122..2a1b85c 100644
> --- a/meta/classes/dpkg.bbclass
> +++ b/meta/classes/dpkg.bbclass
> @@ -18,14 +18,14 @@ do_compile() {
>      sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
>  }
>
> -addtask compile after do_unpack before do_install
> +addtask compile after do_unpack before do_install_package
>  do_compile[stamp-extra-info] = "${DISTRO}"
>
>  # Install package to dedicated deploy directory
> -do_install() {
> +do_install_package() {
>      install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
>  }
>

Keeping in mind possible integartion to OE/Yocto, probably rename task to
do_install_deb_package? Just to avoid possible user confusion with OE
internals.

In general I like the idea to rename tasks in deb building chain to some
unique names, to avoid mess with "classical" OE tasks.


>
> -addtask install after do_compile before do_build
> -do_install[dirs] = "${DEPLOY_DIR_DEB}"
> -do_install[stamp-extra-info] = "${MACHINE}"
> +addtask install_package after do_compile before do_build
> +do_install_package[dirs] = "${DEPLOY_DIR_DEB}"
> +do_install_package[stamp-extra-info] = "${MACHINE}"
> --
> 2.13.0
>
> --
> 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/448d9587745e4ce887e8f0768ddb3bbce5526751.1501582237.git.
> henning.schild%40siemens.com.
> For more options, visit https://groups.google.com/d/optout.
>

[-- Attachment #2: Type: text/html, Size: 3268 bytes --]

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 14/16] meta: classes: rename dpkg to dpkg-src
  2017-08-01 10:17 ` [PATCH 14/16] meta: classes: rename dpkg to dpkg-src Henning Schild
@ 2017-08-02 10:02   ` Alexander Smirnov
  2017-08-03 15:37     ` Henning Schild
  0 siblings, 1 reply; 64+ messages in thread
From: Alexander Smirnov @ 2017-08-02 10:02 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]

2017-08-01 13:17 GMT+03:00 Henning Schild <henning.schild@siemens.com>:

> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>  meta-isar/recipes-app/hello/hello.bb            | 2 +-
>  meta/classes/{dpkg.bbclass => dpkg-src.bbclass} | 0
>  2 files changed, 1 insertion(+), 1 deletion(-)
>  rename meta/classes/{dpkg.bbclass => dpkg-src.bbclass} (100%)
>

What was your idea to do so? Why not 'dpkg-buildpackage.bbclass'?


>
> diff --git a/meta-isar/recipes-app/hello/hello.bb
> b/meta-isar/recipes-app/hello/hello.bb
> index 56424fb..5c5d714 100644
> --- a/meta-isar/recipes-app/hello/hello.bb
> +++ b/meta-isar/recipes-app/hello/hello.bb
> @@ -15,4 +15,4 @@ SRCREV = "ad7065ecc4840cc436bfcdac427386dbba4ea719"
>
>  SRC_DIR = "git"
>
> -inherit dpkg
> +inherit dpkg-src
> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg-src.bbclass
> similarity index 100%
> rename from meta/classes/dpkg.bbclass
> rename to meta/classes/dpkg-src.bbclass
> --
> 2.13.0
>
> --
> 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/f3b8fd43828bf124f4125fb0ba4853cb8a795571.1501582237.git.
> henning.schild%40siemens.com.
> For more options, visit https://groups.google.com/d/optout.
>

[-- Attachment #2: Type: text/html, Size: 2982 bytes --]

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 15/16] meta: add dpkg-bin class
  2017-08-01 15:10     ` Claudius Heine
@ 2017-08-02 10:11       ` Alexander Smirnov
  2017-08-02 10:25         ` Henning Schild
  2017-08-02 12:31         ` Henning Schild
  2017-08-02 13:40       ` Henning Schild
  1 sibling, 2 replies; 64+ messages in thread
From: Alexander Smirnov @ 2017-08-02 10:11 UTC (permalink / raw)
  To: Claudius Heine; +Cc: [ext] Henning Schild, isar-users, Dr . Johann Pfefferl

[-- Attachment #1: Type: text/plain, Size: 3461 bytes --]

Hi colleagues,

from the patch description it's not clear what this patch stays for, seems
that I'm out of you communcation loop. Could you please annotate the
patches with more detailed description, at least with the following
information:
 - Change proposal
 - Why this change is needed. It's not about arguments to push your change,
it's more about your ideas and motivation. That's the most imporant
information which is missed.
 - Change impact to Isar, who will be affected

2017-08-01 18:10 GMT+03:00 Claudius Heine <claudius.heine.ext@siemens.com>:

>
>
> 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.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.
>
>
>> 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/ms
> gid/isar-users/1411c20e-fff4-cef4-9e15-460eebc14dab%40siemens.com.
>
> For more options, visit https://groups.google.com/d/optout.
>

[-- Attachment #2: Type: text/html, Size: 5197 bytes --]

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 15/16] meta: add dpkg-bin class
  2017-08-02 10:11       ` Alexander Smirnov
@ 2017-08-02 10:25         ` Henning Schild
  2017-08-02 12:31         ` Henning Schild
  1 sibling, 0 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-02 10:25 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: Claudius Heine, isar-users, Dr . Johann Pfefferl

Am Wed, 2 Aug 2017 13:11:47 +0300
schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:

> Hi colleagues,
> 
> from the patch description it's not clear what this patch stays for,
> seems that I'm out of you communcation loop. Could you please
> annotate the patches with more detailed description, at least with
> the following information:
>  - Change proposal
>  - Why this change is needed. It's not about arguments to push your
> change, it's more about your ideas and motivation. That's the most
> imporant information which is missed.
>  - Change impact to Isar, who will be affected

Some of that information is in the cover letter and some other things
have been discussed in threads on the list. The example patch behind
it might make it clear. But you are right that information should go
into the patches.

Thanks for the review, i will repost the series with comments
addressed.

Henning

> 2017-08-01 18:10 GMT+03:00 Claudius Heine
> <claudius.heine.ext@siemens.com>:
> 
> >
> >
> > 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.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.
> >
> >  
> >> 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/ms
> > gid/isar-users/1411c20e-fff4-cef4-9e15-460eebc14dab%40siemens.com.
> >
> > For more options, visit https://groups.google.com/d/optout.
> >  


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 15/16] meta: add dpkg-bin class
  2017-08-01 10:17 ` [PATCH 15/16] meta: add dpkg-bin class Henning Schild
  2017-08-01 14:25   ` Claudius Heine
@ 2017-08-02 11:11   ` Claudius Heine
  2017-08-02 11:17     ` Claudius Heine
  1 sibling, 1 reply; 64+ messages in thread
From: Claudius Heine @ 2017-08-02 11:11 UTC (permalink / raw)
  To: [ext] Henning Schild, isar-users; +Cc: Dr . Johann Pfefferl



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.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"

I would rather prefer:

DEBIAN_MAINTAINER ?= "${MAINTAINER}"

MAINTAINER is a variable from openembedded.

> +
> +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
> +	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
> 

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 15/16] meta: add dpkg-bin class
  2017-08-02 11:11   ` Claudius Heine
@ 2017-08-02 11:17     ` Claudius Heine
  2017-08-02 11:26       ` Claudius Heine
  0 siblings, 1 reply; 64+ messages in thread
From: Claudius Heine @ 2017-08-02 11:17 UTC (permalink / raw)
  To: [ext] Henning Schild, isar-users; +Cc: Dr . Johann Pfefferl

On 08/02/2017 01:11 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.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"
> 
> I would rather prefer:
> 
> DEBIAN_MAINTAINER ?= "${MAINTAINER}"
> 
> MAINTAINER is a variable from openembedded.

Sorry I am mistaken. 'MAINTAINER' is for machine configurations.

Maybe RECIPE_MAINTAINER, but I am not sure now.

> 
>> +
>> +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
>> +    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
>>
> 

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 01/16] meta: ext4-img: copy and keep attributes, always copy with sudo
  2017-08-02  7:48   ` Alexander Smirnov
@ 2017-08-02 11:18     ` Henning Schild
  0 siblings, 0 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-02 11:18 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Wed, 2 Aug 2017 10:48:13 +0300
schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:

> Hi,
> 
> 2017-08-01 13:17 GMT+03:00 Henning Schild
> <henning.schild@siemens.com>:
> 
> > Some security enhancing packages can cause our initrd to be not
> > readable by a normal user. So we need to copy with sudo.
> >  
> 
> Please be more explicit which packages, it'd be nice to have examples
> here in the commit message.

It is one of there packages
IMAGE_PREINSTALL += "acl adduser apparmor apt attr babeltrace
base-files base-passwd bash bridge-utils busybox bzip2 cdebconf
console-setup coreutils cpio cron cryptsetup dash dbus debconf
debian-archive-keyring debianutils debootstrap dh-python dhcpcd5
diffutils dns-root-data dnsmasq dpkg dropbear e2fsprogs ebtables
elfutils ethtool expat file findutils fuse gcc-6 gdb gettext gnupg2
grep grub2 gzip hostname init-system-helpers initramfs-tools iproute2
iptables kbd keyutils kmod less libcap2 libgcrypt20
liblocale-gettext-perl libtasn1-6 libtext-charwidth-perl
libtext-iconv-perl libtext-wrapi18n-perl libxml2 linux-base lsb lsof
ltrace lvm2 mawk mime-support netbase netcat openssl os-prober p11-kit
parted patch pciutils perl procps python2.7 python3.5 rename rsync sed
sensible-utils setserial sgml-base shared-mime-info sqlite3
squashfs-tools strace systemd tar tcpdump trace-cmd tzdata ucf usbutils
util-linux vim wget xauth xdg-user-dirs xml-core xz-utils"

I did not investigate a lot which one, because it is a waste of time.

> In general Isar follows the way to reduce usage of 'sudo' as much as
> possible, so every new entry should have good reasons.

As Andreas reported last week we have libpseudo in the making and almost
ready, so the sudo problem will go away.

> 
> > Also regular cp would destroy ownership and other attributes of
> > files, possibly creating problems in the future.
> >  
> 
> Also an example is highly appreciated.

cd /tmp
touch foobar
chgrp cron foobar
chown mail foobar
chmod 600 foobar
cp foobar bla
cp -a foobar bla2

If any debian package brings files not owned by root, plain cp will
destroy the ownership. I do not have a concrete example at hand.

Henning

> >
> > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > ---
> >  meta/classes/ext4-img.bbclass | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/meta/classes/ext4-img.bbclass
> > b/meta/classes/ext4-img.bbclass index 65d4c11..6dc2039 100644
> > --- a/meta/classes/ext4-img.bbclass
> > +++ b/meta/classes/ext4-img.bbclass
> > @@ -21,16 +21,16 @@ do_ext4_image() {
> >
> >      mkdir -p ${WORKDIR}/mnt
> >      sudo mount -o loop ${EXT4_IMAGE_FILE} ${WORKDIR}/mnt
> > -    sudo cp -r ${S}/* ${WORKDIR}/mnt
> > +    sudo cp -a ${S}/* ${WORKDIR}/mnt
> >      sudo umount ${WORKDIR}/mnt
> >      rm -r ${WORKDIR}/mnt
> >
> >      if [ -n "${KERNEL_IMAGE}" ]; then
> > -        cp ${S}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
> > +        sudo cp -a ${S}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
> >  
> 
> 1. Ideally DEPLOY_DIR_IMAGE should not contain files with root
> permissions, the only multistrap filesystems should require them. Any
> spread of sudo significantly increases the probability to damage host
> system. Also I don't see the reason to keep kernel image undo
> supervisor permissions. 2. If KERNEL_IMAGE is symbolic link, 'cp -a'
> will copy symlink only.
> 
> 
> >      fi
> >
> >      if [ -n "${INITRD_IMAGE}" ]; then
> > -        cp ${S}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
> > +        sudo cp -a ${S}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
> >      fi
> >  
> 
> I think that closed initrd is more private case than mainstream. Can
> we cosider possibility to implement this as optional security feature?
> 
> 
> >  }
> >
> > --
> > 2.13.0
> >
> > --
> > 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/5e98880f61dba959ada0c9bc8feca65b0a5760e5.1501582237.git.
> > henning.schild%40siemens.com. For more options, visit
> > https://groups.google.com/d/optout. 


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 04/16] remove redundant variable THISDIR
  2017-08-02  8:25   ` Alexander Smirnov
@ 2017-08-02 11:20     ` Henning Schild
  0 siblings, 0 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-02 11:20 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Wed, 2 Aug 2017 11:25:14 +0300
schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:

> 2017-08-01 13:17 GMT+03:00 Henning Schild
> <henning.schild@siemens.com>:
> 
> > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > ---
> >  .../doc/bitbake-user-manual/bitbake-user-manual-execution.xml  |
> > 2 +- meta-isar/recipes-core/images/isar-image-base.bb
> > |  8 ++++----
> >  meta/classes/isar-base.bbclass                                 |
> > 2 -- meta/recipes-devtools/buildchroot/buildchroot.bb
> > | 10 +++++-----
> >  4 files changed, 10 insertions(+), 12 deletions(-)
> >
> > diff --git
> > a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
> > b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
> > index ec75893..b9aafd1 100644 ---
> > a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
> > +++
> > b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
> > @@ -765,7 +765,7 @@ the concept: <literallayout class='monospaced'>
> >       BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH
> > BBPATH DL_DIR \
> > -         SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME
> > LOGNAME SHELL TERM \
> > +         SSTATE_DIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME
> > SHELL TERM \ 
> 
> Does this change have any reference in upstream? We are trying to keep
> bitbake tree unmodified to simplify migration to newer versions. If
> not, probably we can drop this modification and apply the rest of the
> patch.

Thanks, that was a mistake and will be removed from the patch.

Henning

> >           USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET
> > COREBASE PRSERV_HOST \
> >           PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN
> > PARALLEL_MAKE \ CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE
> > LICENSE_PATH SDKPKGSUFFIX"
> > diff --git a/meta-isar/recipes-core/images/isar-image-base.bb
> > b/meta-isar/recipes-core/images/isar-image-base.bb
> > index 337c329..0810de0 100644
> > --- a/meta-isar/recipes-core/images/isar-image-base.bb
> > +++ b/meta-isar/recipes-core/images/isar-image-base.bb
> > @@ -27,10 +27,10 @@ do_rootfs() {
> >      install -d -m 755 ${WORKDIR}/hooks_multistrap
> >
> >      # Copy config file
> > -    install -m 644 ${THISDIR}/files/multistrap.conf.in
> > ${WORKDIR}/multistrap.conf
> > -    install -m 755 ${THISDIR}/files/${DISTRO_CONFIG_SCRIPT}
> > ${WORKDIR}/configscript.sh
> > -    install -m 755 ${THISDIR}/files/setup.sh ${WORKDIR}
> > -    install -m 755 ${THISDIR}/files/download_dev-random
> > ${WORKDIR}/hooks_multistrap/
> > +    install -m 644 ${FILESDIR}/multistrap.conf.in
> > ${WORKDIR}/multistrap.conf
> > +    install -m 755 ${FILESDIR}/${DISTRO_CONFIG_SCRIPT}
> > ${WORKDIR}/configscript.sh
> > +    install -m 755 ${FILESDIR}/setup.sh ${WORKDIR}
> > +    install -m 755 ${FILESDIR}/download_dev-random
> > ${WORKDIR}/hooks_multistrap/
> >
> >      # Adjust multistrap config
> >      sed -i 's|##IMAGE_PREINSTALL##|${IMAGE_PREINSTALL}|'
> > ${WORKDIR}/multistrap.conf
> > diff --git a/meta/classes/isar-base.bbclass
> > b/meta/classes/isar-base. bbclass
> > index 25809fa..33b0369 100644
> > --- a/meta/classes/isar-base.bbclass
> > +++ b/meta/classes/isar-base.bbclass
> > @@ -1,3 +1 @@
> > -THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}"
> > -
> >  do_build[nostamp] = "0"
> > diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb
> > b/meta/recipes-devtools/buildchroot/buildchroot.bb
> > index ba1bc66..f471f5e 100644
> > --- a/meta/recipes-devtools/buildchroot/buildchroot.bb
> > +++ b/meta/recipes-devtools/buildchroot/buildchroot.bb
> > @@ -29,10 +29,10 @@ do_build() {
> >      install -d -m 755 ${WORKDIR}/hooks_multistrap
> >
> >      # Copy config files
> > -    install -m 644 ${THISDIR}/files/multistrap.conf.in
> > ${WORKDIR}/multistrap.conf
> > -    install -m 755 ${THISDIR}/files/configscript.sh ${WORKDIR}
> > -    install -m 755 ${THISDIR}/files/setup.sh ${WORKDIR}
> > -    install -m 755 ${THISDIR}/files/download_dev-random
> > ${WORKDIR}/hooks_multistrap/
> > +    install -m 644 ${FILESDIR}/multistrap.conf.in
> > ${WORKDIR}/multistrap.conf
> > +    install -m 755 ${FILESDIR}/configscript.sh ${WORKDIR}
> > +    install -m 755 ${FILESDIR}/setup.sh ${WORKDIR}
> > +    install -m 755 ${FILESDIR}/download_dev-random
> > ${WORKDIR}/hooks_multistrap/
> >
> >      # Adjust multistrap config
> >      sed -i
> > 's|##BUILDCHROOT_PREINSTALL##|${BUILDCHROOT_PREINSTALL}|'
> > ${WORKDIR}/multistrap.conf @@ -51,7 +51,7 @@ do_build() {
> >      sudo multistrap -a ${DISTRO_ARCH} -d "${BUILDCHROOT_DIR}" -f
> > "${WORKDIR}/multistrap.conf" || true
> >
> >      # Install package builder script
> > -    sudo install -m 755 ${THISDIR}/files/build.sh
> > ${BUILDCHROOT_DIR}
> > +    sudo install -m 755 ${FILESDIR}/build.sh ${BUILDCHROOT_DIR}
> >
> >      # Configure root filesystem
> >      sudo chroot ${BUILDCHROOT_DIR} /configscript.sh
> > --
> > 2.13.0
> >
> > --
> > 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/5ac96edda9115c2d1e7fd7b8c9aec563fbd07c05.1501582237.git.
> > henning.schild%40siemens.com. For more options, visit
> > https://groups.google.com/d/optout. 


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 05/16] meta: conf: use bitbake.conf from bitbake and apply local changes
  2017-08-02  8:34   ` Alexander Smirnov
@ 2017-08-02 11:22     ` Henning Schild
  0 siblings, 0 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-02 11:22 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Wed, 2 Aug 2017 11:34:03 +0300
schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:

> 2017-08-01 13:17 GMT+03:00 Henning Schild
> <henning.schild@siemens.com>:
> 
> > force isar to always use a bitbake.conf from its bitbake
> > the diff went into a file that needs to be looked at later
> >
> > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > ---
> >  meta/conf/bitbake.conf.sample | 68 ------------------------------
> > -------------
> >  meta/conf/isar-bitbake.conf   | 20 +++++++++++++
> >  scripts/isar-setup-builddir   | 33 ++++++++++++++++++---
> >  3 files changed, 49 insertions(+), 72 deletions(-)
> >  delete mode 100644 meta/conf/bitbake.conf.sample
> >  create mode 100644 meta/conf/isar-bitbake.conf
> >
> > diff --git a/meta/conf/bitbake.conf.sample
> > b/meta/conf/bitbake.conf.sample deleted file mode 100644
> > index 9d7c1f4..0000000
> > --- a/meta/conf/bitbake.conf.sample
> > +++ /dev/null
> > @@ -1,68 +0,0 @@
> > -# Copyright (C) 2003  Chris Larson
> > -#
> > -# Permission is hereby granted, free of charge, to any person
> > obtaining a -# copy of this software and associated documentation
> > files (the "Software"),
> > -# to deal in the Software without restriction, including without
> > limitation
> > -# the rights to use, copy, modify, merge, publish, distribute,
> > sublicense, -# and/or sell copies of the Software, and to permit
> > persons to whom the -# Software is furnished to do so, subject to
> > the following conditions: -#
> > -# The above copyright notice and this permission notice shall be
> > included -# in all copies or substantial portions of the Software.
> > -#
> > -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> > EXPRESS OR
> > -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> > MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND
> > NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT
> > HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY,
> > WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING
> > FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -#
> > OTHER DEALINGS IN THE SOFTWARE. -
> > -B = "${S}"
> > -CVSDIR = "${DL_DIR}/cvs"
> > -DEPENDS = ""
> > -DEPLOY_DIR = "${TMPDIR}/deploy"
> > -DEPLOY_DIR_DEB = "${TMPDIR}/deploy/deb/${MACHINE}"
> > -DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images"
> > -DL_DIR = "${TMPDIR}/downloads"
> > -SSTATE_DIR ?= "${TMPDIR}/sstate-cache"
> > -FILESDIR = "${@bb.which(bb.data.getVar('FILESPATH', d, 1), '.')}"
> > -FILESPATH =
> > "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/
> > ${PN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}" -FILE_DIRNAME =
> > "${@os.path.dirname(bb.data.getVar('FILE', d))}" -GITDIR =
> > "${DL_DIR}/git" -IMAGE_CMD = "_NO_DEFINED_IMAGE_TYPES_"
> > -IMAGE_ROOTFS = "${TMPDIR}/rootfs"
> > -MKTEMPCMD = "mktemp -q ${TMPBASE}"
> > -MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
> > -OVERRIDES = "local:${MACHINE}:${TARGET_OS}:${TARGET_ARCH}"
> > -P = "${PN}-${PV}"
> > -PERSISTENT_DIR = "${TMPDIR}/cache"
> > -PF = "${PN}-${PV}-${PR}"
> > -PN =
> > "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[0]
> > or 'defaultpkgname'}" -PR =
> > "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[2]
> > or 'r0'}" -PROVIDES = ""
> > -PV =
> > "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[1]
> > or '1.0'}" -RESUMECOMMAND = ""
> > -RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 --passive-ftp -P
> > ${DL_DIR} ${URI}"
> > -S = "${WORKDIR}/${P}"
> > -SRC_URI = "file://${FILE}"
> > -STAMPS_DIR ?= "${TMPDIR}/stamps"
> > -STAMP = "${TMPDIR}/stamps/${PF}"
> > -SVNDIR = "${DL_DIR}/svn"
> > -T = "${WORKDIR}/temp"
> > -TARGET_ARCH = "${BUILD_ARCH}"
> > -TMPDIR = "${TOPDIR}/tmp"
> > -UPDATECOMMAND = ""
> > -UPDATECOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} update
> > ${CVSCOOPTS}" -UPDATECOMMAND_svn = "/usr/bin/env svn update
> > ${SVNCOOPTS}" -WORKDIR = "${TMPDIR}/work/${PF}"
> > -PERSISTENT_DIR = "${TMPDIR}/cache"
> > -BUILDCHROOT_DIR = "${TOPDIR}/tmp/work/buildchroot/${DISTRO}/rootfs"
> > -CACHE = "${TMPDIR}/cache"
> > -
> > -# Setup our default hash policy
> > -BB_SIGNATURE_HANDLER ?= "noop"
> > -
> > -include conf/local.conf
> > -include conf/machine/${MACHINE}.conf
> > -include conf/distro/${DISTRO}.conf
> > diff --git a/meta/conf/isar-bitbake.conf
> > b/meta/conf/isar-bitbake.conf new file mode 100644
> > index 0000000..d56f3da
> > --- /dev/null
> > +++ b/meta/conf/isar-bitbake.conf
> > @@ -0,0 +1,20 @@
> > +DEPLOY_DIR_DEB = "${TMPDIR}/deploy/deb/${MACHINE}"
> > +SSTATE_DIR ?= "${TMPDIR}/sstate-cache"
> > +MKTEMPCMD = "mktemp -q ${TMPBASE}"
> > +MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
> > +RESUMECOMMAND = ""
> > +RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 --passive-ftp -P
> > ${DL_DIR} ${URI}"
> > +STAMPS_DIR ?= "${TMPDIR}/stamps"
> > +UPDATECOMMAND = ""
> > +UPDATECOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} update
> > ${CVSCOOPTS}" +UPDATECOMMAND_svn = "/usr/bin/env svn update
> > ${SVNCOOPTS}" +BUILDCHROOT_DIR =
> > "${TOPDIR}/tmp/work/buildchroot/${DISTRO}/rootfs"
> > +CROSSBUILDCHROOT_DIR =
> > "${TOPDIR}/tmp/work/crossbuildchroot/${DISTRO_
> > ARCH}/${DISTRO}/rootfs" 
> 
> This line is something new, should be intorduced in separate patch.

Thanks, that slipped in because the patches where developed on another
branch ... Will remove it.

> 
> > +CACHE = "${TMPDIR}/cache"
> > +
> > +# Setup our default hash policy
> > +BB_SIGNATURE_HANDLER ?= "noop"
> > +
> > +include conf/local.conf
> > +include conf/machine/${MACHINE}.conf
> > +include conf/distro/${DISTRO}.conf
> > diff --git a/scripts/isar-setup-builddir
> > b/scripts/isar-setup-builddir index 070a316..d400694 100755
> > --- a/scripts/isar-setup-builddir
> > +++ b/scripts/isar-setup-builddir
> > @@ -106,10 +106,35 @@ EOM
> >      SHOWYPDOC=yes
> >  fi
> >
> > -if [ ! -f "$BUILDDIR/conf/bitbake.conf" ]; then
> > -    cp "$ISARROOT/meta/conf/bitbake.conf.sample" \
> > -       "$BUILDDIR/conf/bitbake.conf"
> > -fi
> > +cat <<EOF > $BUILDDIR/conf/bitbake.conf
> > +# ********************************************
> > +# THIS FILE IS GENERATED! DO NOT MESS WITH IT!
> > +# ********************************************
> > +
> > +# ---------
> > +# begin original bitbake.conf
> > +# ---------
> > +
> > +EOF
> > +cat "$ISARROOT/bitbake/conf/bitbake.conf" >> \
> > +  "$BUILDDIR/conf/bitbake.conf"
> > +cat <<EOF >> $BUILDDIR/conf/bitbake.conf
> > +# ---------
> > +# end original bitbake.conf
> > +# ---------
> > +
> > +# ---------
> > +# begin isar-bitbake.conf
> > +# ---------
> > +
> > +EOF
> > +cat "$ISARROOT/meta/conf/isar-bitbake.conf" >> \
> > +  "$BUILDDIR/conf/bitbake.conf"
> > +cat <<EOF >> $BUILDDIR/conf/bitbake.conf
> > +# ---------
> > +# end isar-bitbake.conf
> > +# ---------
> > +EOF
> >
> >  # Ending the first-time run message. Show the no documentation
> > banner. if [ ! -z "$SHOWYPDOC" ]; then
> > --
> > 2.13.0
> >
> > --
> > 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/87b84dd21dce51befba81e7c2214fd62d7817899.1501582237.git.
> > henning.schild%40siemens.com. For more options, visit
> > https://groups.google.com/d/optout. 


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 06/16] meta: conf: clean up local bitbake config
  2017-08-02  8:35   ` Alexander Smirnov
@ 2017-08-02 11:23     ` Henning Schild
  0 siblings, 0 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-02 11:23 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Wed, 2 Aug 2017 11:35:22 +0300
schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:

> 2017-08-01 13:17 GMT+03:00 Henning Schild
> <henning.schild@siemens.com>:
> 
> > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > ---
> >  meta/conf/isar-bitbake.conf | 9 ---------
> >  1 file changed, 9 deletions(-)
> >
> > diff --git a/meta/conf/isar-bitbake.conf
> > b/meta/conf/isar-bitbake.conf index d56f3da..426da7f 100644
> > --- a/meta/conf/isar-bitbake.conf
> > +++ b/meta/conf/isar-bitbake.conf
> > @@ -1,16 +1,7 @@
> >  DEPLOY_DIR_DEB = "${TMPDIR}/deploy/deb/${MACHINE}"
> >  SSTATE_DIR ?= "${TMPDIR}/sstate-cache"
> > -MKTEMPCMD = "mktemp -q ${TMPBASE}"
> > -MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
> > -RESUMECOMMAND = ""
> > -RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 --passive-ftp -P
> > ${DL_DIR} ${URI}"
> > -STAMPS_DIR ?= "${TMPDIR}/stamps"
> > -UPDATECOMMAND = ""
> > -UPDATECOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} update
> > ${CVSCOOPTS}" -UPDATECOMMAND_svn = "/usr/bin/env svn update
> > ${SVNCOOPTS}" BUILDCHROOT_DIR =
> > "${TOPDIR}/tmp/work/buildchroot/${DISTRO}/rootfs"
> > CROSSBUILDCHROOT_DIR =
> > "${TOPDIR}/tmp/work/crossbuildchroot/${DISTRO_
> > ARCH}/${DISTRO}/rootfs" -CACHE = "${TMPDIR}/cache"
> >
> >  
> Merge with previous patch?

One patch is changing structure and the other is chaning logic, i think
it should stay 2.

Henning

> 
> >  # Setup our default hash policy
> >  BB_SIGNATURE_HANDLER ?= "noop"
> > --
> > 2.13.0
> >
> > --
> > 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/0450af95b41e6b31b881b961e21d424df34e10ba.1501582237.git.
> > henning.schild%40siemens.com. For more options, visit
> > https://groups.google.com/d/optout. 


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 15/16] meta: add dpkg-bin class
  2017-08-02 11:17     ` Claudius Heine
@ 2017-08-02 11:26       ` Claudius Heine
  0 siblings, 0 replies; 64+ messages in thread
From: Claudius Heine @ 2017-08-02 11:26 UTC (permalink / raw)
  To: [ext] Henning Schild, isar-users; +Cc: Dr . Johann Pfefferl

On 08/02/2017 01:17 PM, [ext] Claudius Heine wrote:
> On 08/02/2017 01:11 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.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"
>>
>> I would rather prefer:
>>
>> DEBIAN_MAINTAINER ?= "${MAINTAINER}"
>>
>> MAINTAINER is a variable from openembedded.
> 
> Sorry I am mistaken. 'MAINTAINER' is for machine configurations.
> 
> Maybe RECIPE_MAINTAINER, but I am not sure now.

I took a look at how openembedded does it, they use the MAINTAINER variable:

https://github.com/openembedded/openembedded/blob/master/classes/package_deb.bbclass#L160

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 07/16] classes: use WORKDIR and get rid of BUILDROOT
  2017-08-02  9:24   ` Alexander Smirnov
@ 2017-08-02 11:30     ` Henning Schild
  2017-08-03 11:24     ` Henning Schild
  1 sibling, 0 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-02 11:30 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Wed, 2 Aug 2017 12:24:29 +0300
schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:

> 2017-08-01 13:17 GMT+03:00 Henning Schild
> <henning.schild@siemens.com>:
> 
> > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > ---
> >  meta/classes/dpkg.bbclass | 15 ++++++---------
> >  1 file changed, 6 insertions(+), 9 deletions(-)
> >
> > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> > index 3d7aafb..1d0132b 100644
> > --- a/meta/classes/dpkg.bbclass
> > +++ b/meta/classes/dpkg.bbclass
> > @@ -10,9 +10,7 @@ do_unpack[deptask] = "do_build"
> >  # Each package should have its own unique build folder, so use
> >  # recipe name as identifier
> >  PP = "/home/builder/${PN}"
> > -BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
> > -
> > -do_fetch[dirs] = "${DL_DIR}"
> > +WORKDIR = "${BUILDCHROOT_DIR}/${PP}"
> >  
> 
> WORKDIR is no the only folder to fetch sources to. This folder
> represents workspace for all operation with folder, for example
> $WORKDIR/temp contails log files.
> 
> Initially Isar designed to follow OE/Yocto style where it's possible.
> Traditionally tmp/work folder contains all the packages workspaces
> with: build atifacts, patches, bitbake logs etc... So in general it
> looks like (roughly speaking):
> 
>   tmp/work/toolchain/package/*
> 
> This conception ideally works with cross-compilation, when you can
> compile packages out of the rootfs tree. Isar implements native
> compilation, so we can't build package within current workspace. So
> the decision was to keep workspace as it is but relocate build folder
> to buildchroot. The main benefit of this approach, that there is a
> single package workspace for bitbake metadata, while there may be
> many buildchroots (different Debian distros and
> machines/architectures).
> 
> In my opinion this change is another step away from OE/Yocto style.
> 
> @Henning: could you please describe the motivation of this change?

I did not understand all that of Isar when i applied that change. The
motivation was to use well-known names instead of inventing new ones. I
will drop that patch from the q.

Henning

> @All: any opinions are highly appreciated.
> 
> 
> >
> >  # Fetch package from the source link
> >  python do_fetch() {
> > @@ -28,10 +26,10 @@ python do_fetch() {
> >  }
> >
> >  addtask fetch before do_build
> > +do_fetch[dirs] = "${DL_DIR}"
> >
> > -do_unpack[dirs] = "${BUILDROOT}"
> >  do_unpack[stamp-extra-info] = "${DISTRO}"
> > -S ?= "${BUILDROOT}"
> > +S ?= "${WORKDIR}"
> >  
> 
> S folder is used for unpacking sources. WORKDIR - is whole package
> workspace. S should not equal to WORKDIR, otherwise this will lead to
> mess between package sources and bitbake metadata. For example Also
> artifacts from FILESDIR are usually installed to the root of WORKDIR.
> 
> 
> 
> >
> >  # Unpack package and put it into working directory in buildchroot
> >  python do_unpack() {
> > @@ -39,16 +37,15 @@ python do_unpack() {
> >      if len(src_uri) == 0:
> >          return
> >
> > -    rootdir = d.getVar('BUILDROOT', True)
> > -
> >      try:
> >          fetcher = bb.fetch2.Fetch(src_uri, d)
> > -        fetcher.unpack(rootdir)
> > +        fetcher.unpack(d.getVar('WORKDIR', True))
> >      except bb.fetch2.BBFetchException as e:
> >          raise bb.build.FuncFailed(e)
> >  }
> >
> >  addtask unpack after do_fetch before do_build
> > +do_unpack[dirs] = "${WORKDIR}"
> >
> >  do_build[stamp-extra-info] = "${DISTRO}"
> >
> > @@ -62,7 +59,7 @@ do_install[stamp-extra-info] = "${MACHINE}"
> >  # Install package to dedicated deploy directory
> >  do_install() {
> >      install -d ${DEPLOY_DIR_DEB}
> > -    install -m 755 ${BUILDROOT}/*.deb ${DEPLOY_DIR_DEB}/
> > +    install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
> >  }
> >
> >  addtask do_install after do_build
> > --
> > 2.13.0
> >
> > --
> > 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/048e88d5072fc038c8bd6207334e9967d5a29e0c.1501582237.git.
> > henning.schild%40siemens.com. For more options, visit
> > https://groups.google.com/d/optout. 


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 08/16] classes: move fetch and unpack into isar-base
  2017-08-02  9:47   ` Alexander Smirnov
@ 2017-08-02 11:33     ` Henning Schild
  0 siblings, 0 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-02 11:33 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Wed, 2 Aug 2017 12:47:09 +0300
schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:

> 2017-08-01 13:17 GMT+03:00 Henning Schild
> <henning.schild@siemens.com>:
> 
> > create a new base-class for images
> >
> > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > ---
> >  meta/classes/dpkg.bbclass            | 34
> > ------------------------------ ----
> >  meta/classes/ext4-img.bbclass        |  2 +-
> >  meta/classes/isar-base-image.bbclass |  1 +
> >  meta/classes/isar-base.bbclass       | 33
> > ++++++++++++++++++++++++++++++ +++
> >  4 files changed, 35 insertions(+), 35 deletions(-)
> >  create mode 100644 meta/classes/isar-base-image.bbclass
> >
> > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> > index 1d0132b..58cee6e 100644
> > --- a/meta/classes/dpkg.bbclass
> > +++ b/meta/classes/dpkg.bbclass
> > @@ -11,42 +11,8 @@ do_unpack[deptask] = "do_build"
> >  # recipe name as identifier
> >  PP = "/home/builder/${PN}"
> >  WORKDIR = "${BUILDCHROOT_DIR}/${PP}"
> > -
> > -# Fetch package from the source link
> > -python do_fetch() {
> > -    src_uri = (d.getVar('SRC_URI', True) or "").split()
> > -    if len(src_uri) == 0:
> > -        return
> > -
> > -    try:
> > -        fetcher = bb.fetch2.Fetch(src_uri, d)
> > -        fetcher.download()
> > -    except bb.fetch2.BBFetchException as e:
> > -        raise bb.build.FuncFailed(e)
> > -}
> > -
> > -addtask fetch before do_build
> > -do_fetch[dirs] = "${DL_DIR}"
> > -
> > -do_unpack[stamp-extra-info] = "${DISTRO}"
> >  S ?= "${WORKDIR}"
> >
> > -# Unpack package and put it into working directory in buildchroot
> > -python do_unpack() {
> > -    src_uri = (d.getVar('SRC_URI', True) or "").split()
> > -    if len(src_uri) == 0:
> > -        return
> > -
> > -    try:
> > -        fetcher = bb.fetch2.Fetch(src_uri, d)
> > -        fetcher.unpack(d.getVar('WORKDIR', True))
> > -    except bb.fetch2.BBFetchException as e:
> > -        raise bb.build.FuncFailed(e)
> > -}
> > -
> > -addtask unpack after do_fetch before do_build
> > -do_unpack[dirs] = "${WORKDIR}"
> > -
> >  do_build[stamp-extra-info] = "${DISTRO}"
> >
> >  # Build package from sources using build script
> > diff --git a/meta/classes/ext4-img.bbclass
> > b/meta/classes/ext4-img.bbclass index eb23d06..5125d8e 100644
> > --- a/meta/classes/ext4-img.bbclass
> > +++ b/meta/classes/ext4-img.bbclass
> > @@ -1,7 +1,7 @@
> >  # This software is a part of ISAR.
> >  # Copyright (C) 2015-2016 ilbers GmbH
> >
> > -inherit isar-base
> > +inherit isar-base-image
> >
> >  # Extra space for rootfs in MB
> >  ROOTFS_EXTRA ?= "64"
> > diff --git a/meta/classes/isar-base-image.bbclass
> > b/meta/classes/isar-base-image.bbclass
> > new file mode 100644
> > index 0000000..33b0369
> > --- /dev/null
> > +++ b/meta/classes/isar-base-image.bbclass
> > @@ -0,0 +1 @@
> > +do_build[nostamp] = "0"
> >  
> 
> From patch description it's not clear, why we need separate empty
> class here with *-image name.

I do not know what this line acutally does. It is there to keep the
semantics because this line always was part of images. As Claudio
suggested i will introduce a class isar-base with the fetcher and
unpacker, from that isar-package-base and isar-image-base could be
derived. Still not clear about the names, any suggestions?

Henning

> 
> > diff --git a/meta/classes/isar-base.bbclass
> > b/meta/classes/isar-base. bbclass
> > index 33b0369..3df6572 100644
> > --- a/meta/classes/isar-base.bbclass
> > +++ b/meta/classes/isar-base.bbclass
> > @@ -1 +1,34 @@
> >  do_build[nostamp] = "0"
> > +
> > +# Fetch package from the source link
> > +python do_fetch() {
> > +    src_uri = (d.getVar('SRC_URI', True) or "").split()
> > +    if len(src_uri) == 0:
> > +        return
> > +
> > +    try:
> > +        fetcher = bb.fetch2.Fetch(src_uri, d)
> > +        fetcher.download()
> > +    except bb.fetch2.BBFetchException as e:
> > +        raise bb.build.FuncFailed(e)
> > +}
> > +
> > +addtask fetch before do_build
> > +do_fetch[dirs] = "${DL_DIR}"
> > +
> > +# Unpack package and put it into working directory in buildchroot
> > +python do_unpack() {
> > +    src_uri = (d.getVar('SRC_URI', True) or "").split()
> > +    if len(src_uri) == 0:
> > +        return
> > +
> > +    try:
> > +        fetcher = bb.fetch2.Fetch(src_uri, d)
> > +        fetcher.unpack(d.getVar('WORKDIR', True))
> > +    except bb.fetch2.BBFetchException as e:
> > +        raise bb.build.FuncFailed(e)
> > +}
> > +
> > +addtask unpack after do_fetch before do_build
> > +do_unpack[dirs] = "${WORKDIR}"
> > +do_unpack[stamp-extra-info] = "${DISTRO}"
> > --
> > 2.13.0
> >
> > --
> > 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/ef97842f18e67eb7140790542c0d88a04490421f.1501582237.git.
> > henning.schild%40siemens.com. For more options, visit
> > https://groups.google.com/d/optout. 


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 11/16] meta: classes: make do_build always the end of the task-chain
  2017-08-02  9:54   ` Alexander Smirnov
@ 2017-08-02 12:05     ` Henning Schild
  0 siblings, 0 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-02 12:05 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Wed, 2 Aug 2017 12:54:46 +0300
schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:

> 2017-08-01 13:17 GMT+03:00 Henning Schild
> <henning.schild@siemens.com>:
> 
> > build is bitbakes default target and queing tasks behind it is
> > asking for trouble
> >  
> 
> Could you please specify more details about this.

If you run "bitbake <component>" what actually happens is "bitbake
<component> -c build". So keeping all the tasks before a possibly empty
do_build makes sure that manual invokations of bitbake always run all
tasks. I am not sure whether [deptask] defaults to build as well.
I would see it like the "all" target of a Makefile.

But thinking about it the "cp *.dep ..." could be seen like "make
install" and could be allowed to happen after the default task.

It is a matter of taste i guess. How should we proceed? Put
do_install_package after do_build or keep it in front?

Henning

> 
> > Introduce do_compile where we "build" the debian packages.
> >
> > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > ---
> >  meta/classes/dpkg.bbclass  | 8 ++++----
> >  meta/classes/image.bbclass | 2 +-
> >  2 files changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> > index 4228b0d..71c7122 100644
> > --- a/meta/classes/dpkg.bbclass
> > +++ b/meta/classes/dpkg.bbclass
> > @@ -13,19 +13,19 @@ PP = "/home/builder/${PN}"
> >  WORKDIR = "${BUILDCHROOT_DIR}/${PP}"
> >  S ?= "${WORKDIR}"
> >
> > -do_build[stamp-extra-info] = "${DISTRO}"
> > -
> >  # Build package from sources using build script
> > -do_build() {
> > +do_compile() {
> >      sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
> >  }
> >
> >  
> Probably it makes sense to use more evident task name like
> do_dpkg-buildpackage or short version - do_buildpackage.
> 'dpkg-buildpackage' is exactly what is executed in this task, it's
> not only about compiling.

I wanted to choose names that can be reused in other contexts, classes
later and stay close to gentoo/OE. But i do not care much about names
and will apply your suggestion.

Henning

> 
> > +addtask compile after do_unpack before do_install
> > +do_compile[stamp-extra-info] = "${DISTRO}"
> >
> >  # Install package to dedicated deploy directory
> >  do_install() {
> >      install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
> >  }
> >
> > -addtask install after do_build
> > +addtask install after do_compile before do_build
> >  do_install[dirs] = "${DEPLOY_DIR_DEB}"
> >  do_install[stamp-extra-info] = "${MACHINE}"
> > diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> > index 3e4877c..8db3352 100644
> > --- a/meta/classes/image.bbclass
> > +++ b/meta/classes/image.bbclass
> > @@ -27,4 +27,4 @@ do_populate() {
> >  }
> >
> >  addtask populate before do_build
> > -do_populate[deptask] = "do_install"
> > +do_populate[deptask] = "do_build"
> > --
> > 2.13.0
> >
> > --
> > 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/32e4ef6d06af30a76fdb645a4108f817301d3007.1501582237.git.
> > henning.schild%40siemens.com. For more options, visit
> > https://groups.google.com/d/optout. 


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 15/16] meta: add dpkg-bin class
  2017-08-02 10:11       ` Alexander Smirnov
  2017-08-02 10:25         ` Henning Schild
@ 2017-08-02 12:31         ` Henning Schild
  2017-08-02 12:50           ` Jan Kiszka
  1 sibling, 1 reply; 64+ messages in thread
From: Henning Schild @ 2017-08-02 12:31 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: Claudius Heine, isar-users, Dr . Johann Pfefferl

Am Wed, 2 Aug 2017 13:11:47 +0300
schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:

> Hi colleagues,
> 
> from the patch description it's not clear what this patch stays for,
> seems that I'm out of you communcation loop. Could you please
> annotate the patches with more detailed description, at least with
> the following information:
>  - Change proposal

This patch introduces a way to turn any file-collection into a debian
package on the fly.
It further enables executing scripts in the rootfs for configuration
purposes.
It allows recipes to pull in debian packages as deps, allowing the
creation of "meta-packages" (empty packages which just carry deps)

>  - Why this change is needed. It's not about arguments to push your
> change, it's more about your ideas and motivation. That's the most
> imporant information which is missed.

Customization of the image.
Configuration of the rootfs on a per package basis.
dep installation on a per package basis.
no IMAGE_PREINSTALL += in image.bb anymore, just IMAGE_INSTALL and the
packages take care of pulling their deps.

eventually replace the configure.sh with packages that
 - replace fstab
 - set rootpw ...


>  - Change impact to Isar, who will be affected

Improve Isar and enable better customization using Debian-tooling, for
everyone ;).

Henning

> 2017-08-01 18:10 GMT+03:00 Claudius Heine
> <claudius.heine.ext@siemens.com>:
> 
> >
> >
> > 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.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.
> >
> >  
> >> 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/ms
> > gid/isar-users/1411c20e-fff4-cef4-9e15-460eebc14dab%40siemens.com.
> >
> > For more options, visit https://groups.google.com/d/optout.
> >  


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 15/16] meta: add dpkg-bin class
  2017-08-02 12:31         ` Henning Schild
@ 2017-08-02 12:50           ` Jan Kiszka
  0 siblings, 0 replies; 64+ messages in thread
From: Jan Kiszka @ 2017-08-02 12:50 UTC (permalink / raw)
  To: [ext] Henning Schild, Alexander Smirnov
  Cc: Claudius Heine, isar-users, Dr . Johann Pfefferl

On 2017-08-02 14:31, [ext] Henning Schild wrote:
> Am Wed, 2 Aug 2017 13:11:47 +0300
> schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:
> 
>> Hi colleagues,
>>
>> from the patch description it's not clear what this patch stays for,
>> seems that I'm out of you communcation loop. Could you please
>> annotate the patches with more detailed description, at least with
>> the following information:
>>  - Change proposal
> 
> This patch introduces a way to turn any file-collection into a debian
> package on the fly.
> It further enables executing scripts in the rootfs for configuration
> purposes.
> It allows recipes to pull in debian packages as deps, allowing the
> creation of "meta-packages" (empty packages which just carry deps)
> 
>>  - Why this change is needed. It's not about arguments to push your
>> change, it's more about your ideas and motivation. That's the most
>> imporant information which is missed.
> 
> Customization of the image.
> Configuration of the rootfs on a per package basis.
> dep installation on a per package basis.
> no IMAGE_PREINSTALL += in image.bb anymore, just IMAGE_INSTALL and the
> packages take care of pulling their deps.
> 
> eventually replace the configure.sh with packages that
>  - replace fstab
>  - set rootpw ...
> 
> 
>>  - Change impact to Isar, who will be affected
> 
> Improve Isar and enable better customization using Debian-tooling, for
> everyone ;).
> 

Yeah! :D

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 15/16] meta: add dpkg-bin class
  2017-08-01 15:10     ` Claudius Heine
  2017-08-02 10:11       ` Alexander Smirnov
@ 2017-08-02 13:40       ` Henning Schild
  2017-08-02 15:03         ` Claudius Heine
  1 sibling, 1 reply; 64+ messages in thread
From: Henning Schild @ 2017-08-02 13:40 UTC (permalink / raw)
  To: Claudius Heine; +Cc: isar-users, Dr . Johann Pfefferl

Am Tue, 1 Aug 2017 17:10:00 +0200
schrieb Claudius Heine <claudius.heine.ext@siemens.com>:

> 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.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
> >>  
> >   


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 15/16] meta: add dpkg-bin class
  2017-08-02 13:40       ` Henning Schild
@ 2017-08-02 15:03         ` Claudius Heine
  2017-08-03  7:57           ` Henning Schild
  0 siblings, 1 reply; 64+ messages in thread
From: Claudius Heine @ 2017-08-02 15:03 UTC (permalink / raw)
  To: Henning Schild, Claudius Heine; +Cc: isar-users, Dr . Johann Pfefferl

[-- Attachment #1: Type: text/plain, Size: 3191 bytes --]

On Wed, 2017-08-02 at 15:40 +0200, Henning Schild wrote:
> Am Tue, 1 Aug 2017 17:10:00 +0200
> schrieb Claudius Heine <claudius.heine.ext@siemens.com>:
> 
> > 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.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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 15/16] meta: add dpkg-bin class
  2017-08-02 15:03         ` Claudius Heine
@ 2017-08-03  7:57           ` Henning Schild
  2017-08-03 10:39             ` Claudius Heine
  0 siblings, 1 reply; 64+ messages in thread
From: Henning Schild @ 2017-08-03  7:57 UTC (permalink / raw)
  To: Claudius Heine; +Cc: Claudius Heine, isar-users, Dr . Johann Pfefferl

Am Wed, 2 Aug 2017 17:03:02 +0200
schrieb Claudius Heine <ch@denx.de>:

> On Wed, 2017-08-02 at 15:40 +0200, Henning Schild wrote:
> > Am Tue, 1 Aug 2017 17:10:00 +0200
> > schrieb Claudius Heine <claudius.heine.ext@siemens.com>:
> >   
> > > 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.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


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 15/16] meta: add dpkg-bin class
  2017-08-03  7:57           ` Henning Schild
@ 2017-08-03 10:39             ` Claudius Heine
  2017-08-03 14:17               ` Henning Schild
  0 siblings, 1 reply; 64+ messages in thread
From: Claudius Heine @ 2017-08-03 10:39 UTC (permalink / raw)
  To: Henning Schild, Claudius Heine; +Cc: isar-users, Dr . Johann Pfefferl

On 08/03/2017 09:57 AM, Henning Schild wrote:
> Am Wed, 2 Aug 2017 17:03:02 +0200
> schrieb Claudius Heine <ch@denx.de>:
> 
>> On Wed, 2017-08-02 at 15:40 +0200, Henning Schild wrote:
>>> Am Tue, 1 Aug 2017 17:10:00 +0200
>>> schrieb Claudius Heine <claudius.heine.ext@siemens.com>:
>>>    
>>>> 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.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



^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 07/16] classes: use WORKDIR and get rid of BUILDROOT
  2017-08-02  9:24   ` Alexander Smirnov
  2017-08-02 11:30     ` Henning Schild
@ 2017-08-03 11:24     ` Henning Schild
  1 sibling, 0 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-03 11:24 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Wed, 2 Aug 2017 12:24:29 +0300
schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:

> 2017-08-01 13:17 GMT+03:00 Henning Schild
> <henning.schild@siemens.com>:
> 
> > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > ---
> >  meta/classes/dpkg.bbclass | 15 ++++++---------
> >  1 file changed, 6 insertions(+), 9 deletions(-)
> >
> > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> > index 3d7aafb..1d0132b 100644
> > --- a/meta/classes/dpkg.bbclass
> > +++ b/meta/classes/dpkg.bbclass
> > @@ -10,9 +10,7 @@ do_unpack[deptask] = "do_build"
> >  # Each package should have its own unique build folder, so use
> >  # recipe name as identifier
> >  PP = "/home/builder/${PN}"
> > -BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
> > -
> > -do_fetch[dirs] = "${DL_DIR}"
> > +WORKDIR = "${BUILDCHROOT_DIR}/${PP}"
> >  

Initially i wanted to drop that patch from the q because i did not
really understand all of your points. But now i think i can not drop it
and we need to clarify. The next version i send will contain a
workaround where the unpacker will unpack to BUILDROOT, so we can
progress with merging the patches while we still talk concepts.

First off the motivation behind the change:
The fetcher and unpacker are required for all sorts of classes, my
queue introduces fetch/unpack in the new dpkg-bin package and Claudius
is already using the fetcher in other classes to solve different
issues. Each basic image and package class should provide
fetch/unpack, not just dpkg.

 
> WORKDIR is no the only folder to fetch sources to. This folder
> represents workspace for all operation with folder, for example
> $WORKDIR/temp contails log files.

The files are fetched to DL_DIR just like before.

> Initially Isar designed to follow OE/Yocto style where it's possible.
> Traditionally tmp/work folder contains all the packages workspaces
> with: build atifacts, patches, bitbake logs etc... So in general it
> looks like (roughly speaking):
> 
>   tmp/work/toolchain/package/*

Yes bitbake.conf says 
WORKDIR = "${TMPDIR}/work/${PF}"
PF = "${PN}-${PV}-${PR}"

Looks like toolchain is missing in the default WORKDIR

> This conception ideally works with cross-compilation, when you can
> compile packages out of the rootfs tree. Isar implements native
> compilation, so we can't build package within current workspace. So
> the decision was to keep workspace as it is but relocate build folder
> to buildchroot. The main benefit of this approach, that there is a
> single package workspace for bitbake metadata, while there may be
> many buildchroots (different Debian distros and
> machines/architectures).

I guess i understand now. In that case i would suggest to have

MY_WORKDIR = WORKDIR/ARCH/DISTRO/... and keep the multiple versions
still under the original WORKDIR. Because as the name suggests, that is
where work should be done.

> In my opinion this change is another step away from OE/Yocto style.

I do not know OE too much but it is supposed to be a clone of gentoo.
And in gentoo you do all your work in WORKDIR and do not break out.

Henning

> @Henning: could you please describe the motivation of this change?
> @All: any opinions are highly appreciated.
> 
> 
> >
> >  # Fetch package from the source link
> >  python do_fetch() {
> > @@ -28,10 +26,10 @@ python do_fetch() {
> >  }
> >
> >  addtask fetch before do_build
> > +do_fetch[dirs] = "${DL_DIR}"
> >
> > -do_unpack[dirs] = "${BUILDROOT}"
> >  do_unpack[stamp-extra-info] = "${DISTRO}"
> > -S ?= "${BUILDROOT}"
> > +S ?= "${WORKDIR}"
> >  
> 
> S folder is used for unpacking sources. WORKDIR - is whole package
> workspace. S should not equal to WORKDIR, otherwise this will lead to
> mess between package sources and bitbake metadata. For example Also
> artifacts from FILESDIR are usually installed to the root of WORKDIR.
> 
> 
> 
> >
> >  # Unpack package and put it into working directory in buildchroot
> >  python do_unpack() {
> > @@ -39,16 +37,15 @@ python do_unpack() {
> >      if len(src_uri) == 0:
> >          return
> >
> > -    rootdir = d.getVar('BUILDROOT', True)
> > -
> >      try:
> >          fetcher = bb.fetch2.Fetch(src_uri, d)
> > -        fetcher.unpack(rootdir)
> > +        fetcher.unpack(d.getVar('WORKDIR', True))
> >      except bb.fetch2.BBFetchException as e:
> >          raise bb.build.FuncFailed(e)
> >  }
> >
> >  addtask unpack after do_fetch before do_build
> > +do_unpack[dirs] = "${WORKDIR}"
> >
> >  do_build[stamp-extra-info] = "${DISTRO}"
> >
> > @@ -62,7 +59,7 @@ do_install[stamp-extra-info] = "${MACHINE}"
> >  # Install package to dedicated deploy directory
> >  do_install() {
> >      install -d ${DEPLOY_DIR_DEB}
> > -    install -m 755 ${BUILDROOT}/*.deb ${DEPLOY_DIR_DEB}/
> > +    install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
> >  }
> >
> >  addtask do_install after do_build
> > --
> > 2.13.0
> >
> > --
> > 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/048e88d5072fc038c8bd6207334e9967d5a29e0c.1501582237.git.
> > henning.schild%40siemens.com. For more options, visit
> > https://groups.google.com/d/optout. 


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 15/16] meta: add dpkg-bin class
  2017-08-03 10:39             ` Claudius Heine
@ 2017-08-03 14:17               ` Henning Schild
  0 siblings, 0 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-03 14:17 UTC (permalink / raw)
  To: Claudius Heine; +Cc: Claudius Heine, isar-users, Dr . Johann Pfefferl

Am Thu, 3 Aug 2017 12:39:44 +0200
schrieb Claudius Heine <claudius.heine.ext@siemens.com>:

> On 08/03/2017 09:57 AM, Henning Schild wrote:
> > Am Wed, 2 Aug 2017 17:03:02 +0200
> > schrieb Claudius Heine <ch@denx.de>:
> >   
> >> On Wed, 2017-08-02 at 15:40 +0200, Henning Schild wrote:  
> >>> Am Tue, 1 Aug 2017 17:10:00 +0200
> >>> schrieb Claudius Heine <claudius.heine.ext@siemens.com>:
> >>>      
> >>>> 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.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 am not sure what that means. The updated version will allow you to
overwrite the automatic configfiles generation. And disable it that
way. I would not want to take it out because it seems to have value,
but the heuristic should probably be tuned later.

Henning

> >>> 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
> 
> 


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 14/16] meta: classes: rename dpkg to dpkg-src
  2017-08-02 10:02   ` Alexander Smirnov
@ 2017-08-03 15:37     ` Henning Schild
  2017-08-03 15:45       ` Jan Kiszka
  0 siblings, 1 reply; 64+ messages in thread
From: Henning Schild @ 2017-08-03 15:37 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Wed, 2 Aug 2017 13:02:10 +0300
schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:

> 2017-08-01 13:17 GMT+03:00 Henning Schild
> <henning.schild@siemens.com>:
> 
> > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > ---
> >  meta-isar/recipes-app/hello/hello.bb            | 2 +-
> >  meta/classes/{dpkg.bbclass => dpkg-src.bbclass} | 0
> >  2 files changed, 1 insertion(+), 1 deletion(-)
> >  rename meta/classes/{dpkg.bbclass => dpkg-src.bbclass} (100%)
> >  
> 
> What was your idea to do so? Why not 'dpkg-buildpackage.bbclass'?

The idea is to have source and binary packages at the end. How they are
constructed should not be in the name of the class. That way you could
switch the tooling in the future.

Maybe we will never switch the tools but the names should be used to
abstract from implementation.

Henning
 
> >
> > diff --git a/meta-isar/recipes-app/hello/hello.bb
> > b/meta-isar/recipes-app/hello/hello.bb
> > index 56424fb..5c5d714 100644
> > --- a/meta-isar/recipes-app/hello/hello.bb
> > +++ b/meta-isar/recipes-app/hello/hello.bb
> > @@ -15,4 +15,4 @@ SRCREV =
> > "ad7065ecc4840cc436bfcdac427386dbba4ea719"
> >
> >  SRC_DIR = "git"
> >
> > -inherit dpkg
> > +inherit dpkg-src
> > diff --git a/meta/classes/dpkg.bbclass
> > b/meta/classes/dpkg-src.bbclass similarity index 100%
> > rename from meta/classes/dpkg.bbclass
> > rename to meta/classes/dpkg-src.bbclass
> > --
> > 2.13.0
> >
> > --
> > 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/f3b8fd43828bf124f4125fb0ba4853cb8a795571.1501582237.git.
> > henning.schild%40siemens.com. For more options, visit
> > https://groups.google.com/d/optout. 


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 14/16] meta: classes: rename dpkg to dpkg-src
  2017-08-03 15:37     ` Henning Schild
@ 2017-08-03 15:45       ` Jan Kiszka
  0 siblings, 0 replies; 64+ messages in thread
From: Jan Kiszka @ 2017-08-03 15:45 UTC (permalink / raw)
  To: [ext] Henning Schild, Alexander Smirnov; +Cc: isar-users

On 2017-08-03 17:37, [ext] Henning Schild wrote:
> Am Wed, 2 Aug 2017 13:02:10 +0300
> schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:
> 
>> 2017-08-01 13:17 GMT+03:00 Henning Schild
>> <henning.schild@siemens.com>:
>>
>>> Signed-off-by: Henning Schild <henning.schild@siemens.com>
>>> ---
>>>  meta-isar/recipes-app/hello/hello.bb            | 2 +-
>>>  meta/classes/{dpkg.bbclass => dpkg-src.bbclass} | 0
>>>  2 files changed, 1 insertion(+), 1 deletion(-)
>>>  rename meta/classes/{dpkg.bbclass => dpkg-src.bbclass} (100%)
>>>  
>>
>> What was your idea to do so? Why not 'dpkg-buildpackage.bbclass'?
> 
> The idea is to have source and binary packages at the end. How they are
> constructed should not be in the name of the class. That way you could
> switch the tooling in the future.
> 
> Maybe we will never switch the tools but the names should be used to
> abstract from implementation.

Sounds reasonable to me.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 16/16] recipes-app/hello-bin: add example on how to use dpkg-bin
  2017-08-02  6:33   ` Jan Kiszka
  2017-08-02  6:55     ` Claudius Heine
@ 2017-08-03 18:48     ` Henning Schild
  1 sibling, 0 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-03 18:48 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: isar-users

Am Wed, 2 Aug 2017 08:33:33 +0200
schrieb Jan Kiszka <jan.kiszka@siemens.com>:

> On 2017-08-01 12:17, [ext] Henning Schild wrote:
> > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > ---
> >  meta-isar/recipes-app/hello-bin/files/README     |  1 +
> >  meta-isar/recipes-app/hello-bin/files/postinst   | 14 +++++++++++++
> >  meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb | 26
> > ++++++++++++++++++++++++ 3 files changed, 41 insertions(+)
> >  create mode 100644 meta-isar/recipes-app/hello-bin/files/README
> >  create mode 100644 meta-isar/recipes-app/hello-bin/files/postinst
> >  create mode 100644 meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb
> > 
> > diff --git a/meta-isar/recipes-app/hello-bin/files/README
> > b/meta-isar/recipes-app/hello-bin/files/README new file mode 100644
> > index 0000000..6e2ce0f
> > --- /dev/null
> > +++ b/meta-isar/recipes-app/hello-bin/files/README
> > @@ -0,0 +1 @@
> > +This is an example file that we get from FILESDIR in recipe.
> > diff --git a/meta-isar/recipes-app/hello-bin/files/postinst
> > b/meta-isar/recipes-app/hello-bin/files/postinst new file mode
> > 100644 index 0000000..2a9eab6
> > --- /dev/null
> > +++ b/meta-isar/recipes-app/hello-bin/files/postinst
> > @@ -0,0 +1,14 @@
> > +#!/bin/sh
> > +
> > +set -e
> > +
> > +if ! getent group hello >/dev/null; then
> > +	addgroup --quiet --system hello
> > +fi
> > +
> > +if ! getent passwd hello >/dev/null; then
> > +	adduser --system --ingroup hello --home /var/lib/hello
> > hello \
> > +		--gecos "My hello user"
> > +fi
> > +
> > +chown -R hello:hello /var/lib/hello  
> 
> Nice.
> 
> > diff --git a/meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb
> > b/meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb new file mode
> > 100644 index 0000000..5ff12d3
> > --- /dev/null
> > +++ b/meta-isar/recipes-app/hello-bin/hello-bin_0.1.bb
> > @@ -0,0 +1,26 @@
> > +# Sample application using dpkg-bin, which turns a folder (${D}) of
> > +# files into a .deb 
> > +#
> > +# This software is a part of ISAR.
> > +
> > +DESCRIPTION = "Sample bin application for ISAR"
> > +DEBIAN_MAINTAINER = "Your name here <you@domain.com>"
> > +
> > +inherit dpkg-bin
> > +  
> 
> In contrast to OE/Yocto, we don't need to specify the files we want to
> install later on here via SRC_URI? I'm not sure right now that we do
> not lose some features when skipping this local fetching steps.

We lose caching cleaning and dep-tracking, you are right. Changed that.

> > +do_install() {
> > +	bbnote "Creating ${PN} binary"
> > +	echo "#!/bin/sh" > ${WORKDIR}/${PN}
> > +	echo "echo Hello World! ${PN}_${PV}" >> ${WORKDIR}/${PN}
> > +
> > +	bbnote "Putting ${PN} into overlay"  
> 
> Nit: Is overlay the right term here?

Corrected!

> > +	install -v -d ${D}/usr/local/bin/
> > +	install -v -m 755 ${WORKDIR}/${PN} ${D}/usr/local/bin/${PN}
> > +
> > +	bbnote "Now copy ${FILESDIR}/README to overlay"  
> 
> In OE, FILESDIR is deprecated and has been removed already. Probably
> not a good idea to introduce it here. FILESPATH is now the standard.
> 
> However:
> 
> "Usage of FILESPATH is discouraged, since it can make recipes harder
> to bbappend. Instead FILESEXTRAPATHS should be used to extend the
> path."

All that is done by SRC_URI now.

> > +	install -v -d ${D}/usr/local/doc/
> > +	install -v -m 644 ${FILESDIR}/README
> > ${D}/usr/local/doc/README-${P} +
> > +	bbnote "Now for a debian hook, see dpkg-deb"
> > +	install -v -m 755 ${FILESDIR}/postinst
> > ${D}/DEBIAN/postinst  
> 
> Maybe this could be automated - to avoid boilerplate logic - by
> defining some DEBIAN_POSTINST var. dpkg-bin could evaluate that var
> and install everything mentioned in it without requiring the user to
> do this here manually.

Sure, but now we are talking improvements on something that i would
like to see getting merged in a first version. So lets hold that for
later.

Henning

> > +}
> >   
> 
> Jan
> 


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 00/16] fixes and introducing dpdk-bin support
  2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
                   ` (17 preceding siblings ...)
  2017-08-01 11:24 ` Claudius Heine
@ 2017-08-11  9:15 ` Alexander Smirnov
  2017-08-11 10:35   ` Henning Schild
  18 siblings, 1 reply; 64+ messages in thread
From: Alexander Smirnov @ 2017-08-11  9:15 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

[-- Attachment #1: Type: text/plain, Size: 831 bytes --]

Hello,

here is brief summary:

Applied with minor changes:
 - meta: isar-base: remove unused function
 - meta: conf: use bitbake.conf from bitbake and apply local changes
 - meta: conf: clean up local bitbake config
 - classes: move fetch and unpack into isar-base (only unpack)
 - meta: dpdk use [dirs] directive instead of mkdir
 - meta: dpkg: reorder and rename do_install to install in addtask
 - package_write_deb: change access rights on .debs

Dropped:
 - meta: classes: use base.bbclass from bitbake
 - meta: dpkg rename install to package_write_deb

Need further investigation:
 - remove redundant variable THISDIR
 - meta: classes: move package_write_deb to new class isar-base-dpkg
 - meta: classes: rename dpkg to dpkg-src
 - meta: add dpkg-bin class
 - recipes-app/hello-bin: add example on how to use dpkg-bin

Alex

[-- Attachment #2: Type: text/html, Size: 2813 bytes --]

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 00/16] fixes and introducing dpdk-bin support
  2017-08-11  9:15 ` Alexander Smirnov
@ 2017-08-11 10:35   ` Henning Schild
  0 siblings, 0 replies; 64+ messages in thread
From: Henning Schild @ 2017-08-11 10:35 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Fri, 11 Aug 2017 12:15:19 +0300
schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:

> Hello,
> 
> here is brief summary:
> 
> Applied with minor changes:
>  - meta: isar-base: remove unused function
>  - meta: conf: use bitbake.conf from bitbake and apply local changes
>  - meta: conf: clean up local bitbake config
>  - classes: move fetch and unpack into isar-base (only unpack)

Nobody needs to unpack if they can not fetch and the other way around,
please drop or remove me as author.

>  - meta: dpdk use [dirs] directive instead of mkdir
>  - meta: dpkg: reorder and rename do_install to install in addtask
>  - package_write_deb: change access rights on .debs
>
> Dropped:
>  - meta: classes: use base.bbclass from bitbake
>  - meta: dpkg rename install to package_write_deb
> 
> Need further investigation:
>  - remove redundant variable THISDIR
>  - meta: classes: move package_write_deb to new class isar-base-dpkg
>  - meta: classes: rename dpkg to dpkg-src
>  - meta: add dpkg-bin class

This is the one that matters!

Henning

>  - recipes-app/hello-bin: add example on how to use dpkg-bin

> Alex


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 01/16] meta: ext4-img: copy and keep attributes, always copy with sudo
  2017-08-01 10:17 ` [PATCH 01/16] meta: ext4-img: copy and keep attributes, always copy with sudo Henning Schild
  2017-08-02  7:48   ` Alexander Smirnov
@ 2017-10-19 18:04   ` Henning Schild
  2017-10-19 19:41     ` Alexander Smirnov
  1 sibling, 1 reply; 64+ messages in thread
From: Henning Schild @ 2017-10-19 18:04 UTC (permalink / raw)
  To: isar-users, Alexander Smirnov, Baurzhan Ismagulov

I just wasted another hour on that guy ... again. Now i found an easy
way to reproduce the issue

on amd64
IMAGE_PREINSTALL += "dropbear"

Probably something in the package hooks, update-initramfs ... But who
cares, that could have been fixed months ago.

Since my original patch touches code that Alex is currently moving
around i hope he will fix the issue that has been ignored for too long.

Henning

On Tue, 1 Aug 2017 12:17:19 +0200
Henning Schild <henning.schild@siemens.com> wrote:

> Some security enhancing packages can cause our initrd to be not
> readable by a normal user. So we need to copy with sudo.
> Also regular cp would destroy ownership and other attributes of files,
> possibly creating problems in the future.
> 
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>  meta/classes/ext4-img.bbclass | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/classes/ext4-img.bbclass
> b/meta/classes/ext4-img.bbclass index 65d4c11..6dc2039 100644
> --- a/meta/classes/ext4-img.bbclass
> +++ b/meta/classes/ext4-img.bbclass
> @@ -21,16 +21,16 @@ do_ext4_image() {
>  
>      mkdir -p ${WORKDIR}/mnt
>      sudo mount -o loop ${EXT4_IMAGE_FILE} ${WORKDIR}/mnt
> -    sudo cp -r ${S}/* ${WORKDIR}/mnt
> +    sudo cp -a ${S}/* ${WORKDIR}/mnt
>      sudo umount ${WORKDIR}/mnt
>      rm -r ${WORKDIR}/mnt
>  
>      if [ -n "${KERNEL_IMAGE}" ]; then
> -        cp ${S}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
> +        sudo cp -a ${S}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
>      fi
>  
>      if [ -n "${INITRD_IMAGE}" ]; then
> -        cp ${S}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
> +        sudo cp -a ${S}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
>      fi
>  }
>  


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PATCH 01/16] meta: ext4-img: copy and keep attributes, always copy with sudo
  2017-10-19 18:04   ` Henning Schild
@ 2017-10-19 19:41     ` Alexander Smirnov
  0 siblings, 0 replies; 64+ messages in thread
From: Alexander Smirnov @ 2017-10-19 19:41 UTC (permalink / raw)
  To: Henning Schild, isar-users

On 10/19/2017 09:04 PM, Henning Schild wrote:
> I just wasted another hour on that guy ... again. Now i found an easy
> way to reproduce the issue
> 
> on amd64
> IMAGE_PREINSTALL += "dropbear"
> 
> Probably something in the package hooks, update-initramfs ... But who
> cares, that could have been fixed months ago.

Which file this does this problem affect: kernel or initrd?

>  > Since my original patch touches code that Alex is currently moving

The information you've provided above is very important, so I'd like to 
apply this as separate patch with respective commit message. Could do 
this tomorrow's morning.

> around i hope he will fix the issue that has been ignored for too long.
> 

According to the last our agreement in Aug, each issue should have 
usecase, so you've provided it only now.

Alex

> Henning
> 
> On Tue, 1 Aug 2017 12:17:19 +0200
> Henning Schild <henning.schild@siemens.com> wrote:
> 
>> Some security enhancing packages can cause our initrd to be not
>> readable by a normal user. So we need to copy with sudo.
>> Also regular cp would destroy ownership and other attributes of files,
>> possibly creating problems in the future.
>>
>> Signed-off-by: Henning Schild <henning.schild@siemens.com>
>> ---
>>   meta/classes/ext4-img.bbclass | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/meta/classes/ext4-img.bbclass
>> b/meta/classes/ext4-img.bbclass index 65d4c11..6dc2039 100644
>> --- a/meta/classes/ext4-img.bbclass
>> +++ b/meta/classes/ext4-img.bbclass
>> @@ -21,16 +21,16 @@ do_ext4_image() {
>>   
>>       mkdir -p ${WORKDIR}/mnt
>>       sudo mount -o loop ${EXT4_IMAGE_FILE} ${WORKDIR}/mnt
>> -    sudo cp -r ${S}/* ${WORKDIR}/mnt
>> +    sudo cp -a ${S}/* ${WORKDIR}/mnt
>>       sudo umount ${WORKDIR}/mnt
>>       rm -r ${WORKDIR}/mnt
>>   
>>       if [ -n "${KERNEL_IMAGE}" ]; then
>> -        cp ${S}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
>> +        sudo cp -a ${S}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
>>       fi
>>   
>>       if [ -n "${INITRD_IMAGE}" ]; then
>> -        cp ${S}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
>> +        sudo cp -a ${S}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
>>       fi
>>   }
>>   
> 

-- 
With best regards,
Alexander Smirnov

ilbers GmbH
Baierbrunner Str. 28c
D-81379 Munich
+49 (89) 122 67 24-0
http://ilbers.de/
Commercial register Munich, HRB 214197
General manager: Baurzhan Ismagulov

^ permalink raw reply	[flat|nested] 64+ messages in thread

end of thread, other threads:[~2017-10-19 19:41 UTC | newest]

Thread overview: 64+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-01 10:17 [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
2017-08-01 10:17 ` [PATCH 01/16] meta: ext4-img: copy and keep attributes, always copy with sudo Henning Schild
2017-08-02  7:48   ` Alexander Smirnov
2017-08-02 11:18     ` Henning Schild
2017-10-19 18:04   ` Henning Schild
2017-10-19 19:41     ` Alexander Smirnov
2017-08-01 10:17 ` [PATCH 02/16] meta: classes: use base.bbclass from bitbake Henning Schild
     [not found]   ` <CAJmB2rBjBqHxPKTna-XUtgmW9i-ooQwbACyFgQTQahTqUAxHcg@mail.gmail.com>
2017-08-02  8:21     ` Alexander Smirnov
2017-08-01 10:17 ` [PATCH 03/16] meta: isar-base: remove unused function Henning Schild
     [not found]   ` <CAJmB2rBwssbfjgqL2wAsOFfGUK7DbBY31tF_QhR09Ot0rmRVjQ@mail.gmail.com>
2017-08-02  8:20     ` Alexander Smirnov
2017-08-01 10:17 ` [PATCH 04/16] remove redundant variable THISDIR Henning Schild
2017-08-02  8:25   ` Alexander Smirnov
2017-08-02 11:20     ` Henning Schild
2017-08-01 10:17 ` [PATCH 05/16] meta: conf: use bitbake.conf from bitbake and apply local changes Henning Schild
2017-08-02  8:34   ` Alexander Smirnov
2017-08-02 11:22     ` Henning Schild
2017-08-01 10:17 ` [PATCH 06/16] meta: conf: clean up local bitbake config Henning Schild
2017-08-02  8:35   ` Alexander Smirnov
2017-08-02 11:23     ` Henning Schild
2017-08-01 10:17 ` [PATCH 07/16] classes: use WORKDIR and get rid of BUILDROOT Henning Schild
2017-08-02  9:24   ` Alexander Smirnov
2017-08-02 11:30     ` Henning Schild
2017-08-03 11:24     ` Henning Schild
2017-08-01 10:17 ` [PATCH 08/16] classes: move fetch and unpack into isar-base Henning Schild
2017-08-02  9:47   ` Alexander Smirnov
2017-08-02 11:33     ` Henning Schild
2017-08-01 10:17 ` [PATCH 09/16] meta: dpdk use [dirs] directive instead of mkdir Henning Schild
2017-08-01 10:17 ` [PATCH 10/16] meta: dpkg: reorder and rename do_install to install in addtask Henning Schild
2017-08-01 10:17 ` [PATCH 11/16] meta: classes: make do_build always the end of the task-chain Henning Schild
2017-08-02  9:54   ` Alexander Smirnov
2017-08-02 12:05     ` Henning Schild
2017-08-01 10:17 ` [PATCH 12/16] meta: dpkg rename install to install_package Henning Schild
2017-08-02  9:59   ` Alexander Smirnov
2017-08-01 10:17 ` [PATCH 13/16] meta: classes: move install_package to isar-base Henning Schild
2017-08-01 11:48   ` Claudius Heine
2017-08-01 14:00   ` Claudius Heine
2017-08-01 15:01     ` Henning Schild
2017-08-01 10:17 ` [PATCH 14/16] meta: classes: rename dpkg to dpkg-src Henning Schild
2017-08-02 10:02   ` Alexander Smirnov
2017-08-03 15:37     ` Henning Schild
2017-08-03 15:45       ` Jan Kiszka
2017-08-01 10:17 ` [PATCH 15/16] meta: add dpkg-bin class Henning Schild
2017-08-01 14:25   ` Claudius Heine
2017-08-01 15:10     ` Claudius Heine
2017-08-02 10:11       ` Alexander Smirnov
2017-08-02 10:25         ` Henning Schild
2017-08-02 12:31         ` Henning Schild
2017-08-02 12:50           ` Jan Kiszka
2017-08-02 13:40       ` Henning Schild
2017-08-02 15:03         ` Claudius Heine
2017-08-03  7:57           ` Henning Schild
2017-08-03 10:39             ` Claudius Heine
2017-08-03 14:17               ` Henning Schild
2017-08-02 11:11   ` Claudius Heine
2017-08-02 11:17     ` Claudius Heine
2017-08-02 11:26       ` Claudius Heine
2017-08-01 10:17 ` [PATCH 16/16] recipes-app/hello-bin: add example on how to use dpkg-bin Henning Schild
2017-08-02  6:33   ` Jan Kiszka
2017-08-02  6:55     ` Claudius Heine
2017-08-03 18:48     ` Henning Schild
2017-08-01 10:23 ` [PATCH 00/16] fixes and introducing dpdk-bin support Henning Schild
2017-08-01 11:24 ` Claudius Heine
2017-08-11  9:15 ` Alexander Smirnov
2017-08-11 10:35   ` Henning Schild

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox