public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Unify work space for packages
@ 2017-09-08 15:56 Alexander Smirnov
  2017-09-08 15:56 ` [PATCH v2 1/5] image: Unify path to image rootfs Alexander Smirnov
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Alexander Smirnov @ 2017-09-08 15:56 UTC (permalink / raw)
  To: isar-users; +Cc: Alexander Smirnov

Hi all,

this series does the following:
 - Simplifies folders structure for multiconfig.
 - Unifies work space for packages.
 - Use unified canonical names for  build artifacts.

The overal build tree with multiconfig looks like the following:
$ ls -1 tmp/work/
 debian-jessie-amd64
 debian-jessie-armhf
 debian-jessie-i386
 debian-stretch-amd64
 debian-stretch-armhf
 debian-stretch-i386
 debian-wheezy-armhf
 raspbian-jessie-armhf

Package workdir looks now like the following:
$ ls -1 tmp/work/debian-jessie-amd64/hello-0.1+g7f35942-1-r0/
git
hello_0.1+g7f35942-1_amd64.changes
hello_0.1+g7f35942-1_amd64.deb
hello_0.1+g7f35942-1.dsc
hello_0.1+g7f35942-1.tar.gz
temp

Changes since v1:
 - Split first patch into pieces.
 - Use variable in multistrap config.
 - Rename ext4 image to unified cacnonical name (patch 4).

With best regards,
Alex

Alexander Smirnov (5):
  image: Unify path to image rootfs
  isar: Change build folders tree
  stamps: Name stamps canonicaly and unified
  image: Name image canonicaly and unified
  class/dpkg: Unify workplace for packages

 meta-isar/classes/rpi-sdimg.bbclass              |  2 +-
 meta-isar/recipes-core/images/isar-image-base.bb | 18 ++++++++----------
 meta/classes/dpkg.bbclass                        | 15 +++++++++------
 meta/classes/ext4-img.bbclass                    | 12 ++++++------
 meta/classes/image.bbclass                       | 11 ++++++-----
 meta/conf/isar-bitbake.conf                      |  5 ++++-
 meta/recipes-devtools/buildchroot/buildchroot.bb |  8 ++++----
 scripts/start_vm                                 |  2 +-
 8 files changed, 39 insertions(+), 34 deletions(-)

-- 
2.1.4


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

* [PATCH v2 1/5] image: Unify path to image rootfs
  2017-09-08 15:56 [PATCH v2 0/5] Unify work space for packages Alexander Smirnov
@ 2017-09-08 15:56 ` Alexander Smirnov
  2017-09-08 16:00   ` Henning Schild
  2017-09-08 15:56 ` [PATCH v2 2/5] isar: Change build folders tree Alexander Smirnov
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Alexander Smirnov @ 2017-09-08 15:56 UTC (permalink / raw)
  To: isar-users; +Cc: Alexander Smirnov

Use dedicated variable to point to generated image rooot filesystem.

Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 meta-isar/classes/rpi-sdimg.bbclass              | 2 +-
 meta-isar/recipes-core/images/isar-image-base.bb | 8 +++-----
 meta/classes/ext4-img.bbclass                    | 8 ++++----
 meta/classes/image.bbclass                       | 9 +++++----
 4 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/meta-isar/classes/rpi-sdimg.bbclass b/meta-isar/classes/rpi-sdimg.bbclass
index 2614c41..91b09cd 100644
--- a/meta-isar/classes/rpi-sdimg.bbclass
+++ b/meta-isar/classes/rpi-sdimg.bbclass
@@ -47,7 +47,7 @@ do_rpi_sdimg () {
     BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
     rm -f ${WORKDIR}/boot.img
     mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
-    mcopy -i ${WORKDIR}/boot.img -s ${S}/boot/* ::/
+    mcopy -i ${WORKDIR}/boot.img -s ${IMAGE_ROOTFS}/boot/* ::/
 
     # Burn Partitions
     dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
diff --git a/meta-isar/recipes-core/images/isar-image-base.bb b/meta-isar/recipes-core/images/isar-image-base.bb
index b679d97..94cbc9e 100644
--- a/meta-isar/recipes-core/images/isar-image-base.bb
+++ b/meta-isar/recipes-core/images/isar-image-base.bb
@@ -18,8 +18,6 @@ IMAGE_PREINSTALL += "apt \
                      dbus"
 
 WORKDIR = "${TMPDIR}/work/${PN}/${MACHINE}/${DISTRO}"
-S = "${WORKDIR}/rootfs"
-IMAGE_ROOTFS = "${S}"
 
 do_rootfs[stamp-extra-info] = "${MACHINE}-${DISTRO}"
 
@@ -46,12 +44,12 @@ do_rootfs() {
     cd ${TOPDIR}
 
     # Create root filesystem
-    sudo multistrap -a ${DISTRO_ARCH} -d "${S}" -f "${WORKDIR}/multistrap.conf" || true
+    sudo multistrap -a ${DISTRO_ARCH} -d "${IMAGE_ROOTFS}" -f "${WORKDIR}/multistrap.conf" || true
 
     # Configure root filesystem
-    sudo chroot ${S} /configscript.sh ${MACHINE_SERIAL} ${BAUDRATE_TTY} \
+    sudo chroot ${IMAGE_ROOTFS} /configscript.sh ${MACHINE_SERIAL} ${BAUDRATE_TTY} \
         ${ROOTFS_DEV}
-    sudo rm ${S}/configscript.sh
+    sudo rm ${IMAGE_ROOTFS}/configscript.sh
 }
 
 addtask rootfs before do_populate
diff --git a/meta/classes/ext4-img.bbclass b/meta/classes/ext4-img.bbclass
index 8588626..f493037 100644
--- a/meta/classes/ext4-img.bbclass
+++ b/meta/classes/ext4-img.bbclass
@@ -14,23 +14,23 @@ do_ext4_image() {
 
     rm -f ${EXT4_IMAGE_FILE}
 
-    ROOTFS_SIZE=`sudo du -sm ${S} |  awk '{print $1 + ${ROOTFS_EXTRA};}'`
+    ROOTFS_SIZE=`sudo du -sm ${IMAGE_ROOTFS} |  awk '{print $1 + ${ROOTFS_EXTRA};}'`
     dd if=/dev/zero of=${EXT4_IMAGE_FILE} bs=1M count=${ROOTFS_SIZE}
 
     sudo mkfs.ext4 -F ${EXT4_IMAGE_FILE}
 
     mkdir -p ${WORKDIR}/mnt
     sudo mount -o loop ${EXT4_IMAGE_FILE} ${WORKDIR}/mnt
-    sudo cp -r ${S}/* ${WORKDIR}/mnt
+    sudo cp -r ${IMAGE_ROOTFS}/* ${WORKDIR}/mnt
     sudo umount ${WORKDIR}/mnt
     rm -r ${WORKDIR}/mnt
 
     if [ -n "${KERNEL_IMAGE}" ]; then
-        cp ${S}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
+        cp ${IMAGE_ROOTFS}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
     fi
 
     if [ -n "${INITRD_IMAGE}" ]; then
-        cp ${S}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
+        cp ${IMAGE_ROOTFS}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
     fi
 }
 
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index a7f0d74..dff2705 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -6,6 +6,7 @@ INITRD_IMAGE ?= ""
 
 IMAGE_INSTALL ?= ""
 IMAGE_TYPE    ?= "ext4-img"
+IMAGE_ROOTFS   = "${WORKDIR}/rootfs"
 
 inherit ${IMAGE_TYPE}
 
@@ -14,15 +15,15 @@ do_populate[stamp-extra-info] = "${MACHINE}-${DISTRO}"
 # Install Debian packages, that were built from sources
 do_populate() {
     if [ -n "${IMAGE_INSTALL}" ]; then
-        sudo mkdir -p ${S}/deb
+        sudo mkdir -p ${IMAGE_ROOTFS}/deb
 
         for p in ${IMAGE_INSTALL}; do
-            sudo cp ${DEPLOY_DIR_DEB}/${p}_*.deb ${S}/deb
+            sudo cp ${DEPLOY_DIR_DEB}/${p}_*.deb ${IMAGE_ROOTFS}/deb
         done
 
-        sudo chroot ${S} /usr/bin/dpkg -i -R /deb
+        sudo chroot ${IMAGE_ROOTFS} /usr/bin/dpkg -i -R /deb
 
-        sudo rm -rf ${S}/deb
+        sudo rm -rf ${IMAGE_ROOTFS}/deb
     fi
 }
 
-- 
2.1.4


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

* [PATCH v2 2/5] isar: Change build folders tree
  2017-09-08 15:56 [PATCH v2 0/5] Unify work space for packages Alexander Smirnov
  2017-09-08 15:56 ` [PATCH v2 1/5] image: Unify path to image rootfs Alexander Smirnov
@ 2017-09-08 15:56 ` Alexander Smirnov
  2017-09-08 16:04   ` Henning Schild
  2017-09-08 15:56 ` [PATCH v2 3/5] stamps: Name stamps canonicaly and unified Alexander Smirnov
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Alexander Smirnov @ 2017-09-08 15:56 UTC (permalink / raw)
  To: isar-users; +Cc: Alexander Smirnov

Differentiate folders tree, that are generated during build on
the highest possible level. So the overal tree now looks like the
following:

 tmp/work/${DISTRO}-${DISTRO_ARCH}/${PF}

This approach eliminates lots of subfolders to diffirentiate
buildchroot and image for multiconfig builds. Now each configuration
has private tree.

Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 meta-isar/recipes-core/images/isar-image-base.bb | 8 ++++----
 meta/conf/isar-bitbake.conf                      | 5 ++++-
 meta/recipes-devtools/buildchroot/buildchroot.bb | 8 ++++----
 3 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/meta-isar/recipes-core/images/isar-image-base.bb b/meta-isar/recipes-core/images/isar-image-base.bb
index 94cbc9e..cde506e 100644
--- a/meta-isar/recipes-core/images/isar-image-base.bb
+++ b/meta-isar/recipes-core/images/isar-image-base.bb
@@ -17,7 +17,7 @@ DEPENDS += "${IMAGE_INSTALL}"
 IMAGE_PREINSTALL += "apt \
                      dbus"
 
-WORKDIR = "${TMPDIR}/work/${PN}/${MACHINE}/${DISTRO}"
+WORKDIR_NAME = "${PN}"
 
 do_rootfs[stamp-extra-info] = "${MACHINE}-${DISTRO}"
 
@@ -36,9 +36,9 @@ do_rootfs() {
     sed -i 's|##DISTRO_APT_SOURCE##|${DISTRO_APT_SOURCE}|' ${WORKDIR}/multistrap.conf
     sed -i 's|##DISTRO_SUITE##|${DISTRO_SUITE}|' ${WORKDIR}/multistrap.conf
     sed -i 's|##DISTRO_COMPONENTS##|${DISTRO_COMPONENTS}|' ${WORKDIR}/multistrap.conf
-    sed -i 's|##CONFIG_SCRIPT##|./tmp/work/${PN}/${MACHINE}/${DISTRO}/configscript.sh|' ${WORKDIR}/multistrap.conf
-    sed -i 's|##SETUP_SCRIPT##|./tmp/work/${PN}/${MACHINE}/${DISTRO}/setup.sh|' ${WORKDIR}/multistrap.conf
-    sed -i 's|##DIR_HOOKS##|./tmp/work/${PN}/${MACHINE}/${DISTRO}/hooks_multistrap|' ${WORKDIR}/multistrap.conf
+    sed -i 's|##CONFIG_SCRIPT##|./${WORKDIR_RELATIVE}/configscript.sh|' ${WORKDIR}/multistrap.conf
+    sed -i 's|##SETUP_SCRIPT##|./${WORKDIR_RELATIVE}/setup.sh|' ${WORKDIR}/multistrap.conf
+    sed -i 's|##DIR_HOOKS##|./${WORKDIR_RELATIVE}/hooks_multistrap|' ${WORKDIR}/multistrap.conf
 
     # Multistrap config use relative paths, so ensure that we are in the right folder
     cd ${TOPDIR}
diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf
index f85f5cc..9f3ab27 100644
--- a/meta/conf/isar-bitbake.conf
+++ b/meta/conf/isar-bitbake.conf
@@ -18,9 +18,12 @@
 # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 # OTHER DEALINGS IN THE SOFTWARE.
 
+WORKDIR_NAME ?= "${PF}"
+WORKDIR_RELATIVE = "tmp/work/${DISTRO}-${DISTRO_ARCH}/${WORKDIR_NAME}"
+WORKDIR = "${TOPDIR}/${WORKDIR_RELATIVE}"
 DEPLOY_DIR_DEB = "${TMPDIR}/deploy/deb/${MACHINE}"
 SSTATE_DIR ?= "${TMPDIR}/sstate-cache"
-BUILDCHROOT_DIR = "${TOPDIR}/tmp/work/buildchroot/${DISTRO}-${DISTRO_ARCH}/rootfs"
+BUILDCHROOT_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot/rootfs"
 
 # Setup our default hash policy
 BB_SIGNATURE_HANDLER ?= "noop"
diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb b/meta/recipes-devtools/buildchroot/buildchroot.bb
index ccba683..3587aa1 100644
--- a/meta/recipes-devtools/buildchroot/buildchroot.bb
+++ b/meta/recipes-devtools/buildchroot/buildchroot.bb
@@ -21,7 +21,7 @@ BUILDCHROOT_PREINSTALL ?= "gcc \
                            apt \
                            automake"
 
-WORKDIR = "${TMPDIR}/work/${PF}/${DISTRO}"
+WORKDIR_NAME = "buildchroot"
 
 do_build[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
 
@@ -40,9 +40,9 @@ do_build() {
     sed -i 's|##DISTRO_APT_SOURCE##|${DISTRO_APT_SOURCE}|' ${WORKDIR}/multistrap.conf
     sed -i 's|##DISTRO_SUITE##|${DISTRO_SUITE}|' ${WORKDIR}/multistrap.conf
     sed -i 's|##DISTRO_COMPONENTS##|${DISTRO_COMPONENTS}|' ${WORKDIR}/multistrap.conf
-    sed -i 's|##CONFIG_SCRIPT##|./tmp/work/${PF}/${DISTRO}/configscript.sh|' ${WORKDIR}/multistrap.conf
-    sed -i 's|##SETUP_SCRIPT##|./tmp/work/${PF}/${DISTRO}/setup.sh|' ${WORKDIR}/multistrap.conf
-    sed -i 's|##DIR_HOOKS##|./tmp/work/${PF}/${DISTRO}/hooks_multistrap|' ${WORKDIR}/multistrap.conf
+    sed -i 's|##CONFIG_SCRIPT##|./${WORKDIR_RELATIVE}/configscript.sh|' ${WORKDIR}/multistrap.conf
+    sed -i 's|##SETUP_SCRIPT##|./${WORKDIR_RELATIVE}/setup.sh|' ${WORKDIR}/multistrap.conf
+    sed -i 's|##DIR_HOOKS##|./${WORKDIR_RELATIVE}/hooks_multistrap|' ${WORKDIR}/multistrap.conf
 
     # Multistrap config use relative paths, so ensure that we are in the right folder
     cd ${TOPDIR}
-- 
2.1.4


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

* [PATCH v2 3/5] stamps: Name stamps canonicaly and unified
  2017-09-08 15:56 [PATCH v2 0/5] Unify work space for packages Alexander Smirnov
  2017-09-08 15:56 ` [PATCH v2 1/5] image: Unify path to image rootfs Alexander Smirnov
  2017-09-08 15:56 ` [PATCH v2 2/5] isar: Change build folders tree Alexander Smirnov
@ 2017-09-08 15:56 ` Alexander Smirnov
  2017-09-08 15:56 ` [PATCH v2 4/5] image: Name image " Alexander Smirnov
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Alexander Smirnov @ 2017-09-08 15:56 UTC (permalink / raw)
  To: isar-users; +Cc: Alexander Smirnov

Name task stamps canonically according to the build folders structure:
${DISTRO}-${DISTRO_ARCH} or ${DISTRO}-${MACHINE}.

Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 meta-isar/recipes-core/images/isar-image-base.bb | 2 +-
 meta/classes/ext4-img.bbclass                    | 2 +-
 meta/classes/image.bbclass                       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta-isar/recipes-core/images/isar-image-base.bb b/meta-isar/recipes-core/images/isar-image-base.bb
index cde506e..2e33ca0 100644
--- a/meta-isar/recipes-core/images/isar-image-base.bb
+++ b/meta-isar/recipes-core/images/isar-image-base.bb
@@ -19,7 +19,7 @@ IMAGE_PREINSTALL += "apt \
 
 WORKDIR_NAME = "${PN}"
 
-do_rootfs[stamp-extra-info] = "${MACHINE}-${DISTRO}"
+do_rootfs[stamp-extra-info] = "${DISTRO}-${MACHINE}"
 
 do_rootfs() {
     install -d -m 755 ${WORKDIR}/hooks_multistrap
diff --git a/meta/classes/ext4-img.bbclass b/meta/classes/ext4-img.bbclass
index f493037..9af781f 100644
--- a/meta/classes/ext4-img.bbclass
+++ b/meta/classes/ext4-img.bbclass
@@ -6,7 +6,7 @@ ROOTFS_EXTRA ?= "64"
 
 EXT4_IMAGE_FILE = "${DEPLOY_DIR_IMAGE}/${PN}-${MACHINE}-${DISTRO}.ext4.img"
 
-do_ext4_image[stamp-extra-info] = "${MACHINE}-${DISTRO}"
+do_ext4_image[stamp-extra-info] = "${DISTRO}-${MACHINE}"
 
 # Generate ext4 filesystem image
 do_ext4_image() {
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index dff2705..590725c 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -10,7 +10,7 @@ IMAGE_ROOTFS   = "${WORKDIR}/rootfs"
 
 inherit ${IMAGE_TYPE}
 
-do_populate[stamp-extra-info] = "${MACHINE}-${DISTRO}"
+do_populate[stamp-extra-info] = "${DISTRO}-${MACHINE}"
 
 # Install Debian packages, that were built from sources
 do_populate() {
-- 
2.1.4


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

* [PATCH v2 4/5] image: Name image canonicaly and unified
  2017-09-08 15:56 [PATCH v2 0/5] Unify work space for packages Alexander Smirnov
                   ` (2 preceding siblings ...)
  2017-09-08 15:56 ` [PATCH v2 3/5] stamps: Name stamps canonicaly and unified Alexander Smirnov
@ 2017-09-08 15:56 ` Alexander Smirnov
  2017-09-08 15:56 ` [PATCH v2 5/5] class/dpkg: Unify workplace for packages Alexander Smirnov
  2017-09-08 16:06 ` [PATCH v2 0/5] Unify work space " Henning Schild
  5 siblings, 0 replies; 17+ messages in thread
From: Alexander Smirnov @ 2017-09-08 15:56 UTC (permalink / raw)
  To: isar-users; +Cc: Alexander Smirnov

Name images according to the build folders structure:
${DISTRO}-${MACHINE}.

Now all the build artifacts have the same unified names.

Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 meta/classes/ext4-img.bbclass | 2 +-
 scripts/start_vm              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/ext4-img.bbclass b/meta/classes/ext4-img.bbclass
index 9af781f..3e3768b 100644
--- a/meta/classes/ext4-img.bbclass
+++ b/meta/classes/ext4-img.bbclass
@@ -4,7 +4,7 @@
 # Extra space for rootfs in MB
 ROOTFS_EXTRA ?= "64"
 
-EXT4_IMAGE_FILE = "${DEPLOY_DIR_IMAGE}/${PN}-${MACHINE}-${DISTRO}.ext4.img"
+EXT4_IMAGE_FILE = "${DEPLOY_DIR_IMAGE}/${PN}-${DISTRO}-${MACHINE}.ext4.img"
 
 do_ext4_image[stamp-extra-info] = "${DISTRO}-${MACHINE}"
 
diff --git a/scripts/start_vm b/scripts/start_vm
index 32d4864..1ce84b7 100755
--- a/scripts/start_vm
+++ b/scripts/start_vm
@@ -109,7 +109,7 @@ eval "$(egrep 'MACHINE_SERIAL' $MACHINE_CONF |bb2sh)"
 
 readonly CONFIG_CONF=$ISARROOT/meta-isar/conf/multiconfig/qemu$ARCH-$DISTRO.conf
 eval "$(egrep '(KERNEL|INITRD)_IMAGE|ROOTFS_DEV|QEMU_' $CONFIG_CONF |bb2sh)"
-readonly ROOTFS_IMAGE=isar-image-base-qemu$ARCH-debian-$DISTRO.ext4.img
+readonly ROOTFS_IMAGE=isar-image-base-debian-$DISTRO-qemu$ARCH.ext4.img
 
 QCPU=
 [ -n "$QEMU_CPU" ] && QCPU="-cpu $QEMU_CPU"
-- 
2.1.4


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

* [PATCH v2 5/5] class/dpkg: Unify workplace for packages
  2017-09-08 15:56 [PATCH v2 0/5] Unify work space for packages Alexander Smirnov
                   ` (3 preceding siblings ...)
  2017-09-08 15:56 ` [PATCH v2 4/5] image: Name image " Alexander Smirnov
@ 2017-09-08 15:56 ` Alexander Smirnov
  2017-09-11 16:47   ` Henning Schild
  2017-09-08 16:06 ` [PATCH v2 0/5] Unify work space " Henning Schild
  5 siblings, 1 reply; 17+ messages in thread
From: Alexander Smirnov @ 2017-09-08 15:56 UTC (permalink / raw)
  To: isar-users; +Cc: Alexander Smirnov

Get rid of splitting package's data between WORKDIR and BUILDCHROOT.
Now everything is stored into WORKDIR, and BUILDCHROOT is used for
compilation only.

Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 meta/classes/dpkg.bbclass | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 360a95c..f1a29aa 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -3,12 +3,11 @@
 
 # Add dependency from buildchroot creation
 DEPENDS += "buildchroot"
-do_unpack[deptask] = "do_build"
+do_build[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}"
 
@@ -27,9 +26,8 @@ python do_fetch() {
 
 addtask fetch before do_unpack
 
-do_unpack[dirs] = "${BUILDROOT}"
+do_unpack[dirs] = "${WORKDIR}"
 do_unpack[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
-S ?= "${BUILDROOT}"
 
 # Unpack package and put it into working directory in buildchroot
 python do_unpack() {
@@ -37,7 +35,7 @@ python do_unpack() {
     if len(src_uri) == 0:
         return
 
-    rootdir = d.getVar('BUILDROOT', True)
+    rootdir = d.getVar('WORKDIR', True)
 
     try:
         fetcher = bb.fetch2.Fetch(src_uri, d)
@@ -48,17 +46,22 @@ python do_unpack() {
 
 addtask unpack after do_fetch before do_build
 
+BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
 do_build[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
 
 # Build package from sources using build script
 do_build() {
+    mkdir -p ${BUILDROOT}
+    sudo mount --bind ${WORKDIR} ${BUILDROOT}
     sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
+    sudo umount ${BUILDROOT}
+    rm -rf ${BUILDROOT}
 }
 
 
 # Install package to dedicated deploy directory
 do_install() {
-    install -m 644 ${BUILDROOT}/*.deb ${DEPLOY_DIR_DEB}/
+    install -m 644 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
 }
 
 addtask install after do_build
-- 
2.1.4


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

* Re: [PATCH v2 1/5] image: Unify path to image rootfs
  2017-09-08 15:56 ` [PATCH v2 1/5] image: Unify path to image rootfs Alexander Smirnov
@ 2017-09-08 16:00   ` Henning Schild
  0 siblings, 0 replies; 17+ messages in thread
From: Henning Schild @ 2017-09-08 16:00 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Fri, 8 Sep 2017 18:56:02 +0300
schrieb Alexander Smirnov <asmirnov@ilbers.de>:

> Use dedicated variable to point to generated image rooot filesystem.

root

Henning

> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
> ---
>  meta-isar/classes/rpi-sdimg.bbclass              | 2 +-
>  meta-isar/recipes-core/images/isar-image-base.bb | 8 +++-----
>  meta/classes/ext4-img.bbclass                    | 8 ++++----
>  meta/classes/image.bbclass                       | 9 +++++----
>  4 files changed, 13 insertions(+), 14 deletions(-)
> 
> diff --git a/meta-isar/classes/rpi-sdimg.bbclass
> b/meta-isar/classes/rpi-sdimg.bbclass index 2614c41..91b09cd 100644
> --- a/meta-isar/classes/rpi-sdimg.bbclass
> +++ b/meta-isar/classes/rpi-sdimg.bbclass
> @@ -47,7 +47,7 @@ do_rpi_sdimg () {
>      BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/
> 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') rm -f
> ${WORKDIR}/boot.img mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C
> ${WORKDIR}/boot.img $BOOT_BLOCKS
> -    mcopy -i ${WORKDIR}/boot.img -s ${S}/boot/* ::/
> +    mcopy -i ${WORKDIR}/boot.img -s ${IMAGE_ROOTFS}/boot/* ::/
>  
>      # Burn Partitions
>      dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1
> bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync diff
> --git a/meta-isar/recipes-core/images/isar-image-base.bb
> b/meta-isar/recipes-core/images/isar-image-base.bb index
> b679d97..94cbc9e 100644 ---
> a/meta-isar/recipes-core/images/isar-image-base.bb +++
> b/meta-isar/recipes-core/images/isar-image-base.bb @@ -18,8 +18,6 @@
> IMAGE_PREINSTALL += "apt \ dbus" 
>  WORKDIR = "${TMPDIR}/work/${PN}/${MACHINE}/${DISTRO}"
> -S = "${WORKDIR}/rootfs"
> -IMAGE_ROOTFS = "${S}"
>  
>  do_rootfs[stamp-extra-info] = "${MACHINE}-${DISTRO}"
>  
> @@ -46,12 +44,12 @@ do_rootfs() {
>      cd ${TOPDIR}
>  
>      # Create root filesystem
> -    sudo multistrap -a ${DISTRO_ARCH} -d "${S}" -f
> "${WORKDIR}/multistrap.conf" || true
> +    sudo multistrap -a ${DISTRO_ARCH} -d "${IMAGE_ROOTFS}" -f
> "${WORKDIR}/multistrap.conf" || true 
>      # Configure root filesystem
> -    sudo chroot ${S} /configscript.sh ${MACHINE_SERIAL}
> ${BAUDRATE_TTY} \
> +    sudo chroot ${IMAGE_ROOTFS} /configscript.sh ${MACHINE_SERIAL}
> ${BAUDRATE_TTY} \ ${ROOTFS_DEV}
> -    sudo rm ${S}/configscript.sh
> +    sudo rm ${IMAGE_ROOTFS}/configscript.sh
>  }
>  
>  addtask rootfs before do_populate
> diff --git a/meta/classes/ext4-img.bbclass
> b/meta/classes/ext4-img.bbclass index 8588626..f493037 100644
> --- a/meta/classes/ext4-img.bbclass
> +++ b/meta/classes/ext4-img.bbclass
> @@ -14,23 +14,23 @@ do_ext4_image() {
>  
>      rm -f ${EXT4_IMAGE_FILE}
>  
> -    ROOTFS_SIZE=`sudo du -sm ${S} |  awk '{print $1 +
> ${ROOTFS_EXTRA};}'`
> +    ROOTFS_SIZE=`sudo du -sm ${IMAGE_ROOTFS} |  awk '{print $1 +
> ${ROOTFS_EXTRA};}'` dd if=/dev/zero of=${EXT4_IMAGE_FILE} bs=1M
> count=${ROOTFS_SIZE} 
>      sudo mkfs.ext4 -F ${EXT4_IMAGE_FILE}
>  
>      mkdir -p ${WORKDIR}/mnt
>      sudo mount -o loop ${EXT4_IMAGE_FILE} ${WORKDIR}/mnt
> -    sudo cp -r ${S}/* ${WORKDIR}/mnt
> +    sudo cp -r ${IMAGE_ROOTFS}/* ${WORKDIR}/mnt
>      sudo umount ${WORKDIR}/mnt
>      rm -r ${WORKDIR}/mnt
>  
>      if [ -n "${KERNEL_IMAGE}" ]; then
> -        cp ${S}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
> +        cp ${IMAGE_ROOTFS}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
>      fi
>  
>      if [ -n "${INITRD_IMAGE}" ]; then
> -        cp ${S}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
> +        cp ${IMAGE_ROOTFS}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
>      fi
>  }
>  
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index a7f0d74..dff2705 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -6,6 +6,7 @@ INITRD_IMAGE ?= ""
>  
>  IMAGE_INSTALL ?= ""
>  IMAGE_TYPE    ?= "ext4-img"
> +IMAGE_ROOTFS   = "${WORKDIR}/rootfs"
>  
>  inherit ${IMAGE_TYPE}
>  
> @@ -14,15 +15,15 @@ do_populate[stamp-extra-info] =
> "${MACHINE}-${DISTRO}" # Install Debian packages, that were built
> from sources do_populate() {
>      if [ -n "${IMAGE_INSTALL}" ]; then
> -        sudo mkdir -p ${S}/deb
> +        sudo mkdir -p ${IMAGE_ROOTFS}/deb
>  
>          for p in ${IMAGE_INSTALL}; do
> -            sudo cp ${DEPLOY_DIR_DEB}/${p}_*.deb ${S}/deb
> +            sudo cp ${DEPLOY_DIR_DEB}/${p}_*.deb ${IMAGE_ROOTFS}/deb
>          done
>  
> -        sudo chroot ${S} /usr/bin/dpkg -i -R /deb
> +        sudo chroot ${IMAGE_ROOTFS} /usr/bin/dpkg -i -R /deb
>  
> -        sudo rm -rf ${S}/deb
> +        sudo rm -rf ${IMAGE_ROOTFS}/deb
>      fi
>  }
>  


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

* Re: [PATCH v2 2/5] isar: Change build folders tree
  2017-09-08 15:56 ` [PATCH v2 2/5] isar: Change build folders tree Alexander Smirnov
@ 2017-09-08 16:04   ` Henning Schild
  0 siblings, 0 replies; 17+ messages in thread
From: Henning Schild @ 2017-09-08 16:04 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Fri, 8 Sep 2017 18:56:03 +0300
schrieb Alexander Smirnov <asmirnov@ilbers.de>:

> Differentiate folders tree, that are generated during build on
> the highest possible level. So the overal tree now looks like the
> following:
> 
>  tmp/work/${DISTRO}-${DISTRO_ARCH}/${PF}
> 
> This approach eliminates lots of subfolders to diffirentiate
> buildchroot and image for multiconfig builds. Now each configuration
> has private tree.
> 
> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
> ---
>  meta-isar/recipes-core/images/isar-image-base.bb | 8 ++++----
>  meta/conf/isar-bitbake.conf                      | 5 ++++-
>  meta/recipes-devtools/buildchroot/buildchroot.bb | 8 ++++----
>  3 files changed, 12 insertions(+), 9 deletions(-)
> 
> diff --git a/meta-isar/recipes-core/images/isar-image-base.bb
> b/meta-isar/recipes-core/images/isar-image-base.bb index
> 94cbc9e..cde506e 100644 ---
> a/meta-isar/recipes-core/images/isar-image-base.bb +++
> b/meta-isar/recipes-core/images/isar-image-base.bb @@ -17,7 +17,7 @@
> DEPENDS += "${IMAGE_INSTALL}" IMAGE_PREINSTALL += "apt \
>                       dbus"
>  
> -WORKDIR = "${TMPDIR}/work/${PN}/${MACHINE}/${DISTRO}"
> +WORKDIR_NAME = "${PN}"
>  
>  do_rootfs[stamp-extra-info] = "${MACHINE}-${DISTRO}"
>  
> @@ -36,9 +36,9 @@ do_rootfs() {
>      sed -i 's|##DISTRO_APT_SOURCE##|${DISTRO_APT_SOURCE}|'
> ${WORKDIR}/multistrap.conf sed -i
> 's|##DISTRO_SUITE##|${DISTRO_SUITE}|' ${WORKDIR}/multistrap.conf sed
> -i 's|##DISTRO_COMPONENTS##|${DISTRO_COMPONENTS}|'
> ${WORKDIR}/multistrap.conf
> -    sed -i
> 's|##CONFIG_SCRIPT##|./tmp/work/${PN}/${MACHINE}/${DISTRO}/configscript.sh|'
> ${WORKDIR}/multistrap.conf
> -    sed -i
> 's|##SETUP_SCRIPT##|./tmp/work/${PN}/${MACHINE}/${DISTRO}/setup.sh|'
> ${WORKDIR}/multistrap.conf
> -    sed -i
> 's|##DIR_HOOKS##|./tmp/work/${PN}/${MACHINE}/${DISTRO}/hooks_multistrap|'
> ${WORKDIR}/multistrap.conf
> +    sed -i
> 's|##CONFIG_SCRIPT##|./${WORKDIR_RELATIVE}/configscript.sh|'
> ${WORKDIR}/multistrap.conf
> +    sed -i 's|##SETUP_SCRIPT##|./${WORKDIR_RELATIVE}/setup.sh|'
> ${WORKDIR}/multistrap.conf
> +    sed -i 's|##DIR_HOOKS##|./${WORKDIR_RELATIVE}/hooks_multistrap|'
> ${WORKDIR}/multistrap.conf 
>      # Multistrap config use relative paths, so ensure that we are in
> the right folder cd ${TOPDIR}
> diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf
> index f85f5cc..9f3ab27 100644
> --- a/meta/conf/isar-bitbake.conf
> +++ b/meta/conf/isar-bitbake.conf
> @@ -18,9 +18,12 @@
>  # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
> OR # OTHER DEALINGS IN THE SOFTWARE.
>  
> +WORKDIR_NAME ?= "${PF}"
> +WORKDIR_RELATIVE =
> "tmp/work/${DISTRO}-${DISTRO_ARCH}/${WORKDIR_NAME}" +WORKDIR =
> "${TOPDIR}/${WORKDIR_RELATIVE}" DEPLOY_DIR_DEB =
> "${TMPDIR}/deploy/deb/${MACHINE}" SSTATE_DIR ?=
> "${TMPDIR}/sstate-cache" -BUILDCHROOT_DIR =
> "${TOPDIR}/tmp/work/buildchroot/${DISTRO}-${DISTRO_ARCH}/rootfs"
> +BUILDCHROOT_DIR =
> "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot/rootfs" # Setup
> our default hash policy BB_SIGNATURE_HANDLER ?= "noop"
> diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb
> b/meta/recipes-devtools/buildchroot/buildchroot.bb index
> ccba683..3587aa1 100644 ---
> a/meta/recipes-devtools/buildchroot/buildchroot.bb +++
> b/meta/recipes-devtools/buildchroot/buildchroot.bb @@ -21,7 +21,7 @@
> BUILDCHROOT_PREINSTALL ?= "gcc \ apt \
>                             automake"
>  
> -WORKDIR = "${TMPDIR}/work/${PF}/${DISTRO}"
> +WORKDIR_NAME = "buildchroot"

= ${PN} ?

Henning

>  do_build[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
>  
> @@ -40,9 +40,9 @@ do_build() {
>      sed -i 's|##DISTRO_APT_SOURCE##|${DISTRO_APT_SOURCE}|'
> ${WORKDIR}/multistrap.conf sed -i
> 's|##DISTRO_SUITE##|${DISTRO_SUITE}|' ${WORKDIR}/multistrap.conf sed
> -i 's|##DISTRO_COMPONENTS##|${DISTRO_COMPONENTS}|'
> ${WORKDIR}/multistrap.conf
> -    sed -i
> 's|##CONFIG_SCRIPT##|./tmp/work/${PF}/${DISTRO}/configscript.sh|'
> ${WORKDIR}/multistrap.conf
> -    sed -i 's|##SETUP_SCRIPT##|./tmp/work/${PF}/${DISTRO}/setup.sh|'
> ${WORKDIR}/multistrap.conf
> -    sed -i
> 's|##DIR_HOOKS##|./tmp/work/${PF}/${DISTRO}/hooks_multistrap|'
> ${WORKDIR}/multistrap.conf
> +    sed -i
> 's|##CONFIG_SCRIPT##|./${WORKDIR_RELATIVE}/configscript.sh|'
> ${WORKDIR}/multistrap.conf
> +    sed -i 's|##SETUP_SCRIPT##|./${WORKDIR_RELATIVE}/setup.sh|'
> ${WORKDIR}/multistrap.conf
> +    sed -i 's|##DIR_HOOKS##|./${WORKDIR_RELATIVE}/hooks_multistrap|'
> ${WORKDIR}/multistrap.conf 
>      # Multistrap config use relative paths, so ensure that we are in
> the right folder cd ${TOPDIR}


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

* Re: [PATCH v2 0/5] Unify work space for packages
  2017-09-08 15:56 [PATCH v2 0/5] Unify work space for packages Alexander Smirnov
                   ` (4 preceding siblings ...)
  2017-09-08 15:56 ` [PATCH v2 5/5] class/dpkg: Unify workplace for packages Alexander Smirnov
@ 2017-09-08 16:06 ` Henning Schild
  2017-09-08 16:10   ` Alexander Smirnov
  5 siblings, 1 reply; 17+ messages in thread
From: Henning Schild @ 2017-09-08 16:06 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Looks good, except for the minor things i just found.

Henning

Am Fri, 8 Sep 2017 18:56:01 +0300
schrieb Alexander Smirnov <asmirnov@ilbers.de>:

> Hi all,
> 
> this series does the following:
>  - Simplifies folders structure for multiconfig.
>  - Unifies work space for packages.
>  - Use unified canonical names for  build artifacts.
> 
> The overal build tree with multiconfig looks like the following:
> $ ls -1 tmp/work/
>  debian-jessie-amd64
>  debian-jessie-armhf
>  debian-jessie-i386
>  debian-stretch-amd64
>  debian-stretch-armhf
>  debian-stretch-i386
>  debian-wheezy-armhf
>  raspbian-jessie-armhf
> 
> Package workdir looks now like the following:
> $ ls -1 tmp/work/debian-jessie-amd64/hello-0.1+g7f35942-1-r0/
> git
> hello_0.1+g7f35942-1_amd64.changes
> hello_0.1+g7f35942-1_amd64.deb
> hello_0.1+g7f35942-1.dsc
> hello_0.1+g7f35942-1.tar.gz
> temp
> 
> Changes since v1:
>  - Split first patch into pieces.
>  - Use variable in multistrap config.
>  - Rename ext4 image to unified cacnonical name (patch 4).
> 
> With best regards,
> Alex
> 
> Alexander Smirnov (5):
>   image: Unify path to image rootfs
>   isar: Change build folders tree
>   stamps: Name stamps canonicaly and unified
>   image: Name image canonicaly and unified
>   class/dpkg: Unify workplace for packages
> 
>  meta-isar/classes/rpi-sdimg.bbclass              |  2 +-
>  meta-isar/recipes-core/images/isar-image-base.bb | 18
> ++++++++---------- meta/classes/dpkg.bbclass                        |
> 15 +++++++++------ meta/classes/ext4-img.bbclass                    |
> 12 ++++++------ meta/classes/image.bbclass                       | 11
> ++++++----- meta/conf/isar-bitbake.conf                      |  5
> ++++- meta/recipes-devtools/buildchroot/buildchroot.bb |  8 ++++----
>  scripts/start_vm                                 |  2 +-
>  8 files changed, 39 insertions(+), 34 deletions(-)
> 


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

* Re: [PATCH v2 0/5] Unify work space for packages
  2017-09-08 16:06 ` [PATCH v2 0/5] Unify work space " Henning Schild
@ 2017-09-08 16:10   ` Alexander Smirnov
  2017-09-08 16:12     ` Alexander Smirnov
  2017-09-08 16:15     ` Henning Schild
  0 siblings, 2 replies; 17+ messages in thread
From: Alexander Smirnov @ 2017-09-08 16:10 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

On 09/08/2017 07:06 PM, Henning Schild wrote:
> Looks good, except for the minor things i just found.

Thanks for the quick response. Will fix according to your comments. 
Could you please re-base your series on top of this?

Alex

> 
> Henning
> 
> Am Fri, 8 Sep 2017 18:56:01 +0300
> schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> 
>> Hi all,
>>
>> this series does the following:
>>   - Simplifies folders structure for multiconfig.
>>   - Unifies work space for packages.
>>   - Use unified canonical names for  build artifacts.
>>
>> The overal build tree with multiconfig looks like the following:
>> $ ls -1 tmp/work/
>>   debian-jessie-amd64
>>   debian-jessie-armhf
>>   debian-jessie-i386
>>   debian-stretch-amd64
>>   debian-stretch-armhf
>>   debian-stretch-i386
>>   debian-wheezy-armhf
>>   raspbian-jessie-armhf
>>
>> Package workdir looks now like the following:
>> $ ls -1 tmp/work/debian-jessie-amd64/hello-0.1+g7f35942-1-r0/
>> git
>> hello_0.1+g7f35942-1_amd64.changes
>> hello_0.1+g7f35942-1_amd64.deb
>> hello_0.1+g7f35942-1.dsc
>> hello_0.1+g7f35942-1.tar.gz
>> temp
>>
>> Changes since v1:
>>   - Split first patch into pieces.
>>   - Use variable in multistrap config.
>>   - Rename ext4 image to unified cacnonical name (patch 4).
>>
>> With best regards,
>> Alex
>>
>> Alexander Smirnov (5):
>>    image: Unify path to image rootfs
>>    isar: Change build folders tree
>>    stamps: Name stamps canonicaly and unified
>>    image: Name image canonicaly and unified
>>    class/dpkg: Unify workplace for packages
>>
>>   meta-isar/classes/rpi-sdimg.bbclass              |  2 +-
>>   meta-isar/recipes-core/images/isar-image-base.bb | 18
>> ++++++++---------- meta/classes/dpkg.bbclass                        |
>> 15 +++++++++------ meta/classes/ext4-img.bbclass                    |
>> 12 ++++++------ meta/classes/image.bbclass                       | 11
>> ++++++----- meta/conf/isar-bitbake.conf                      |  5
>> ++++- meta/recipes-devtools/buildchroot/buildchroot.bb |  8 ++++----
>>   scripts/start_vm                                 |  2 +-
>>   8 files changed, 39 insertions(+), 34 deletions(-)
>>
> 

-- 
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] 17+ messages in thread

* Re: [PATCH v2 0/5] Unify work space for packages
  2017-09-08 16:10   ` Alexander Smirnov
@ 2017-09-08 16:12     ` Alexander Smirnov
  2017-09-08 16:15     ` Henning Schild
  1 sibling, 0 replies; 17+ messages in thread
From: Alexander Smirnov @ 2017-09-08 16:12 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

On 09/08/2017 07:10 PM, Alexander Smirnov wrote:
> On 09/08/2017 07:06 PM, Henning Schild wrote:
>> Looks good, except for the minor things i just found.
> 
> Thanks for the quick response. Will fix according to your comments. 
> Could you please re-base your series on top of this?
> 

P.S. to apply patches which move unpack and fetch to base class.

> Alex
> 
>>
>> Henning
>>
>> Am Fri, 8 Sep 2017 18:56:01 +0300
>> schrieb Alexander Smirnov <asmirnov@ilbers.de>:
>>
>>> Hi all,
>>>
>>> this series does the following:
>>>   - Simplifies folders structure for multiconfig.
>>>   - Unifies work space for packages.
>>>   - Use unified canonical names for  build artifacts.
>>>
>>> The overal build tree with multiconfig looks like the following:
>>> $ ls -1 tmp/work/
>>>   debian-jessie-amd64
>>>   debian-jessie-armhf
>>>   debian-jessie-i386
>>>   debian-stretch-amd64
>>>   debian-stretch-armhf
>>>   debian-stretch-i386
>>>   debian-wheezy-armhf
>>>   raspbian-jessie-armhf
>>>
>>> Package workdir looks now like the following:
>>> $ ls -1 tmp/work/debian-jessie-amd64/hello-0.1+g7f35942-1-r0/
>>> git
>>> hello_0.1+g7f35942-1_amd64.changes
>>> hello_0.1+g7f35942-1_amd64.deb
>>> hello_0.1+g7f35942-1.dsc
>>> hello_0.1+g7f35942-1.tar.gz
>>> temp
>>>
>>> Changes since v1:
>>>   - Split first patch into pieces.
>>>   - Use variable in multistrap config.
>>>   - Rename ext4 image to unified cacnonical name (patch 4).
>>>
>>> With best regards,
>>> Alex
>>>
>>> Alexander Smirnov (5):
>>>    image: Unify path to image rootfs
>>>    isar: Change build folders tree
>>>    stamps: Name stamps canonicaly and unified
>>>    image: Name image canonicaly and unified
>>>    class/dpkg: Unify workplace for packages
>>>
>>>   meta-isar/classes/rpi-sdimg.bbclass              |  2 +-
>>>   meta-isar/recipes-core/images/isar-image-base.bb | 18
>>> ++++++++---------- meta/classes/dpkg.bbclass                        |
>>> 15 +++++++++------ meta/classes/ext4-img.bbclass                    |
>>> 12 ++++++------ meta/classes/image.bbclass                       | 11
>>> ++++++----- meta/conf/isar-bitbake.conf                      |  5
>>> ++++- meta/recipes-devtools/buildchroot/buildchroot.bb |  8 ++++----
>>>   scripts/start_vm                                 |  2 +-
>>>   8 files changed, 39 insertions(+), 34 deletions(-)
>>>
>>
> 

-- 
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] 17+ messages in thread

* Re: [PATCH v2 0/5] Unify work space for packages
  2017-09-08 16:10   ` Alexander Smirnov
  2017-09-08 16:12     ` Alexander Smirnov
@ 2017-09-08 16:15     ` Henning Schild
  2017-09-11  7:36       ` Alexander Smirnov
  1 sibling, 1 reply; 17+ messages in thread
From: Henning Schild @ 2017-09-08 16:15 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Fri, 8 Sep 2017 19:10:37 +0300
schrieb Alexander Smirnov <asmirnov@ilbers.de>:

> On 09/08/2017 07:06 PM, Henning Schild wrote:
> > Looks good, except for the minor things i just found.  
> 
> Thanks for the quick response. Will fix according to your comments. 

You are welcome.

> Could you please re-base your series on top of this?

Sure. But i would prefer to do this rebase together with addressing
issues found in the review. So please provide reviews to all patches,
catch up on the nameing discussions etc. and give me a green light by
replying here again.

Henning

> Alex
> 
> > 
> > Henning
> > 
> > Am Fri, 8 Sep 2017 18:56:01 +0300
> > schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> >   
> >> Hi all,
> >>
> >> this series does the following:
> >>   - Simplifies folders structure for multiconfig.
> >>   - Unifies work space for packages.
> >>   - Use unified canonical names for  build artifacts.
> >>
> >> The overal build tree with multiconfig looks like the following:
> >> $ ls -1 tmp/work/
> >>   debian-jessie-amd64
> >>   debian-jessie-armhf
> >>   debian-jessie-i386
> >>   debian-stretch-amd64
> >>   debian-stretch-armhf
> >>   debian-stretch-i386
> >>   debian-wheezy-armhf
> >>   raspbian-jessie-armhf
> >>
> >> Package workdir looks now like the following:
> >> $ ls -1 tmp/work/debian-jessie-amd64/hello-0.1+g7f35942-1-r0/
> >> git
> >> hello_0.1+g7f35942-1_amd64.changes
> >> hello_0.1+g7f35942-1_amd64.deb
> >> hello_0.1+g7f35942-1.dsc
> >> hello_0.1+g7f35942-1.tar.gz
> >> temp
> >>
> >> Changes since v1:
> >>   - Split first patch into pieces.
> >>   - Use variable in multistrap config.
> >>   - Rename ext4 image to unified cacnonical name (patch 4).
> >>
> >> With best regards,
> >> Alex
> >>
> >> Alexander Smirnov (5):
> >>    image: Unify path to image rootfs
> >>    isar: Change build folders tree
> >>    stamps: Name stamps canonicaly and unified
> >>    image: Name image canonicaly and unified
> >>    class/dpkg: Unify workplace for packages
> >>
> >>   meta-isar/classes/rpi-sdimg.bbclass              |  2 +-
> >>   meta-isar/recipes-core/images/isar-image-base.bb | 18
> >> ++++++++----------
> >> meta/classes/dpkg.bbclass                        | 15
> >> +++++++++------ meta/classes/ext4-img.bbclass                    |
> >> 12 ++++++------ meta/classes/image.bbclass                       |
> >> 11 ++++++----- meta/conf/isar-bitbake.conf                      |
> >> 5 ++++- meta/recipes-devtools/buildchroot/buildchroot.bb |  8
> >> ++++---- scripts/start_vm                                 |  2 +-
> >> 8 files changed, 39 insertions(+), 34 deletions(-) 
> >   
> 


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

* Re: [PATCH v2 0/5] Unify work space for packages
  2017-09-08 16:15     ` Henning Schild
@ 2017-09-11  7:36       ` Alexander Smirnov
  2017-09-11  8:00         ` Henning Schild
  0 siblings, 1 reply; 17+ messages in thread
From: Alexander Smirnov @ 2017-09-11  7:36 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users



On 09/08/2017 07:15 PM, Henning Schild wrote:
> Am Fri, 8 Sep 2017 19:10:37 +0300
> schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> 
>> On 09/08/2017 07:06 PM, Henning Schild wrote:
>>> Looks good, except for the minor things i just found.
>>
>> Thanks for the quick response. Will fix according to your comments.
> 
> You are welcome.
> 
>> Could you please re-base your series on top of this?
> 
> Sure. But i would prefer to do this rebase together with addressing
> issues found in the review. So please provide reviews to all patches,
> catch up on the nameing discussions etc. and give me a green light by
> replying here again.
> 

There is nothing more from me. Only one possible topic - names of the 
classes. Eventually we will have at least three pipelines:

  - Build package in chroot (current Isar flow).
  - Pack custom files (your proposal).
  - Cross-compilation for custom packages.

So, probably we can use following names (respectively):

  - dpkg-native.bbclass
  - dpkg-pack.bbclass
  - dpkg-cross.bbclass

Alex

>>>
>>> Am Fri, 8 Sep 2017 18:56:01 +0300
>>> schrieb Alexander Smirnov <asmirnov@ilbers.de>:
>>>    
>>>> Hi all,
>>>>
>>>> this series does the following:
>>>>    - Simplifies folders structure for multiconfig.
>>>>    - Unifies work space for packages.
>>>>    - Use unified canonical names for  build artifacts.
>>>>
>>>> The overal build tree with multiconfig looks like the following:
>>>> $ ls -1 tmp/work/
>>>>    debian-jessie-amd64
>>>>    debian-jessie-armhf
>>>>    debian-jessie-i386
>>>>    debian-stretch-amd64
>>>>    debian-stretch-armhf
>>>>    debian-stretch-i386
>>>>    debian-wheezy-armhf
>>>>    raspbian-jessie-armhf
>>>>
>>>> Package workdir looks now like the following:
>>>> $ ls -1 tmp/work/debian-jessie-amd64/hello-0.1+g7f35942-1-r0/
>>>> git
>>>> hello_0.1+g7f35942-1_amd64.changes
>>>> hello_0.1+g7f35942-1_amd64.deb
>>>> hello_0.1+g7f35942-1.dsc
>>>> hello_0.1+g7f35942-1.tar.gz
>>>> temp
>>>>
>>>> Changes since v1:
>>>>    - Split first patch into pieces.
>>>>    - Use variable in multistrap config.
>>>>    - Rename ext4 image to unified cacnonical name (patch 4).
>>>>
>>>> With best regards,
>>>> Alex
>>>>
>>>> Alexander Smirnov (5):
>>>>     image: Unify path to image rootfs
>>>>     isar: Change build folders tree
>>>>     stamps: Name stamps canonicaly and unified
>>>>     image: Name image canonicaly and unified
>>>>     class/dpkg: Unify workplace for packages
>>>>
>>>>    meta-isar/classes/rpi-sdimg.bbclass              |  2 +-
>>>>    meta-isar/recipes-core/images/isar-image-base.bb | 18
>>>> ++++++++----------
>>>> meta/classes/dpkg.bbclass                        | 15
>>>> +++++++++------ meta/classes/ext4-img.bbclass                    |
>>>> 12 ++++++------ meta/classes/image.bbclass                       |
>>>> 11 ++++++----- meta/conf/isar-bitbake.conf                      |
>>>> 5 ++++- meta/recipes-devtools/buildchroot/buildchroot.bb |  8
>>>> ++++---- scripts/start_vm                                 |  2 +-
>>>> 8 files changed, 39 insertions(+), 34 deletions(-)
>>>    
>>
> 

-- 
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] 17+ messages in thread

* Re: [PATCH v2 0/5] Unify work space for packages
  2017-09-11  7:36       ` Alexander Smirnov
@ 2017-09-11  8:00         ` Henning Schild
  2017-09-11  8:19           ` Alexander Smirnov
  0 siblings, 1 reply; 17+ messages in thread
From: Henning Schild @ 2017-09-11  8:00 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Mon, 11 Sep 2017 10:36:02 +0300
schrieb Alexander Smirnov <asmirnov@ilbers.de>:

> On 09/08/2017 07:15 PM, Henning Schild wrote:
> > Am Fri, 8 Sep 2017 19:10:37 +0300
> > schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> >   
> >> On 09/08/2017 07:06 PM, Henning Schild wrote:  
> >>> Looks good, except for the minor things i just found.  
> >>
> >> Thanks for the quick response. Will fix according to your
> >> comments.  
> > 
> > You are welcome.
> >   
> >> Could you please re-base your series on top of this?  
> > 
> > Sure. But i would prefer to do this rebase together with addressing
> > issues found in the review. So please provide reviews to all
> > patches, catch up on the nameing discussions etc. and give me a
> > green light by replying here again.
> >   
> 
> There is nothing more from me. Only one possible topic - names of the 
> classes. Eventually we will have at least three pipelines:
> 
>   - Build package in chroot (current Isar flow).
>   - Pack custom files (your proposal).
>   - Cross-compilation for custom packages.
> 
> So, probably we can use following names (respectively):
> 
>   - dpkg-native.bbclass

Would that be the current dpkg.bbclass? In that case i do not like the
name since we cross-compile with it as well.

>   - dpkg-pack.bbclass
>   - dpkg-cross.bbclass

If we ever decide to add custom building i think it would go into the
class my patches introduce.

So i think we will have a debian and a custom way of building debian
packages, hence the names currently suggested. Maybe best discuss this
in the thread already opened for that.

Henning
 
> Alex
> 
> >>>
> >>> Am Fri, 8 Sep 2017 18:56:01 +0300
> >>> schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> >>>      
> >>>> Hi all,
> >>>>
> >>>> this series does the following:
> >>>>    - Simplifies folders structure for multiconfig.
> >>>>    - Unifies work space for packages.
> >>>>    - Use unified canonical names for  build artifacts.
> >>>>
> >>>> The overal build tree with multiconfig looks like the following:
> >>>> $ ls -1 tmp/work/
> >>>>    debian-jessie-amd64
> >>>>    debian-jessie-armhf
> >>>>    debian-jessie-i386
> >>>>    debian-stretch-amd64
> >>>>    debian-stretch-armhf
> >>>>    debian-stretch-i386
> >>>>    debian-wheezy-armhf
> >>>>    raspbian-jessie-armhf
> >>>>
> >>>> Package workdir looks now like the following:
> >>>> $ ls -1 tmp/work/debian-jessie-amd64/hello-0.1+g7f35942-1-r0/
> >>>> git
> >>>> hello_0.1+g7f35942-1_amd64.changes
> >>>> hello_0.1+g7f35942-1_amd64.deb
> >>>> hello_0.1+g7f35942-1.dsc
> >>>> hello_0.1+g7f35942-1.tar.gz
> >>>> temp
> >>>>
> >>>> Changes since v1:
> >>>>    - Split first patch into pieces.
> >>>>    - Use variable in multistrap config.
> >>>>    - Rename ext4 image to unified cacnonical name (patch 4).
> >>>>
> >>>> With best regards,
> >>>> Alex
> >>>>
> >>>> Alexander Smirnov (5):
> >>>>     image: Unify path to image rootfs
> >>>>     isar: Change build folders tree
> >>>>     stamps: Name stamps canonicaly and unified
> >>>>     image: Name image canonicaly and unified
> >>>>     class/dpkg: Unify workplace for packages
> >>>>
> >>>>    meta-isar/classes/rpi-sdimg.bbclass              |  2 +-
> >>>>    meta-isar/recipes-core/images/isar-image-base.bb | 18
> >>>> ++++++++----------
> >>>> meta/classes/dpkg.bbclass                        | 15
> >>>> +++++++++------ meta/classes/ext4-img.bbclass
> >>>> | 12 ++++++------
> >>>> meta/classes/image.bbclass                       | 11
> >>>> ++++++----- meta/conf/isar-bitbake.conf                      | 5
> >>>> ++++- meta/recipes-devtools/buildchroot/buildchroot.bb |  8
> >>>> ++++---- scripts/start_vm                                 |  2
> >>>> +- 8 files changed, 39 insertions(+), 34 deletions(-)  
> >>>      
> >>  
> >   
> 


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

* Re: [PATCH v2 0/5] Unify work space for packages
  2017-09-11  8:00         ` Henning Schild
@ 2017-09-11  8:19           ` Alexander Smirnov
  0 siblings, 0 replies; 17+ messages in thread
From: Alexander Smirnov @ 2017-09-11  8:19 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users



On 09/11/2017 11:00 AM, Henning Schild wrote:
> Am Mon, 11 Sep 2017 10:36:02 +0300
> schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> 
>> On 09/08/2017 07:15 PM, Henning Schild wrote:
>>> Am Fri, 8 Sep 2017 19:10:37 +0300
>>> schrieb Alexander Smirnov <asmirnov@ilbers.de>:
>>>    
>>>> On 09/08/2017 07:06 PM, Henning Schild wrote:
>>>>> Looks good, except for the minor things i just found.
>>>>
>>>> Thanks for the quick response. Will fix according to your
>>>> comments.
>>>
>>> You are welcome.
>>>    
>>>> Could you please re-base your series on top of this?
>>>
>>> Sure. But i would prefer to do this rebase together with addressing
>>> issues found in the review. So please provide reviews to all
>>> patches, catch up on the nameing discussions etc. and give me a
>>> green light by replying here again.
>>>    
>>
>> There is nothing more from me. Only one possible topic - names of the
>> classes. Eventually we will have at least three pipelines:
>>
>>    - Build package in chroot (current Isar flow).
>>    - Pack custom files (your proposal).
>>    - Cross-compilation for custom packages.
>>
>> So, probably we can use following names (respectively):
>>
>>    - dpkg-native.bbclass
> 
> Would that be the current dpkg.bbclass? In that case i do not like the
> name since we cross-compile with it as well.
> 
>>    - dpkg-pack.bbclass
>>    - dpkg-cross.bbclass
> 
> If we ever decide to add custom building i think it would go into the
> class my patches introduce.
> 
> So i think we will have a debian and a custom way of building debian > packages, hence the names currently suggested. Maybe best discuss this
> in the thread already opened for that.

Ok.

> 
> Henning
>   
>> Alex
>>
>>>>>
>>>>> Am Fri, 8 Sep 2017 18:56:01 +0300
>>>>> schrieb Alexander Smirnov <asmirnov@ilbers.de>:
>>>>>       
>>>>>> Hi all,
>>>>>>
>>>>>> this series does the following:
>>>>>>     - Simplifies folders structure for multiconfig.
>>>>>>     - Unifies work space for packages.
>>>>>>     - Use unified canonical names for  build artifacts.
>>>>>>
>>>>>> The overal build tree with multiconfig looks like the following:
>>>>>> $ ls -1 tmp/work/
>>>>>>     debian-jessie-amd64
>>>>>>     debian-jessie-armhf
>>>>>>     debian-jessie-i386
>>>>>>     debian-stretch-amd64
>>>>>>     debian-stretch-armhf
>>>>>>     debian-stretch-i386
>>>>>>     debian-wheezy-armhf
>>>>>>     raspbian-jessie-armhf
>>>>>>
>>>>>> Package workdir looks now like the following:
>>>>>> $ ls -1 tmp/work/debian-jessie-amd64/hello-0.1+g7f35942-1-r0/
>>>>>> git
>>>>>> hello_0.1+g7f35942-1_amd64.changes
>>>>>> hello_0.1+g7f35942-1_amd64.deb
>>>>>> hello_0.1+g7f35942-1.dsc
>>>>>> hello_0.1+g7f35942-1.tar.gz
>>>>>> temp
>>>>>>
>>>>>> Changes since v1:
>>>>>>     - Split first patch into pieces.
>>>>>>     - Use variable in multistrap config.
>>>>>>     - Rename ext4 image to unified cacnonical name (patch 4).
>>>>>>
>>>>>> With best regards,
>>>>>> Alex
>>>>>>
>>>>>> Alexander Smirnov (5):
>>>>>>      image: Unify path to image rootfs
>>>>>>      isar: Change build folders tree
>>>>>>      stamps: Name stamps canonicaly and unified
>>>>>>      image: Name image canonicaly and unified
>>>>>>      class/dpkg: Unify workplace for packages
>>>>>>
>>>>>>     meta-isar/classes/rpi-sdimg.bbclass              |  2 +-
>>>>>>     meta-isar/recipes-core/images/isar-image-base.bb | 18
>>>>>> ++++++++----------
>>>>>> meta/classes/dpkg.bbclass                        | 15
>>>>>> +++++++++------ meta/classes/ext4-img.bbclass
>>>>>> | 12 ++++++------
>>>>>> meta/classes/image.bbclass                       | 11
>>>>>> ++++++----- meta/conf/isar-bitbake.conf                      | 5
>>>>>> ++++- meta/recipes-devtools/buildchroot/buildchroot.bb |  8
>>>>>> ++++---- scripts/start_vm                                 |  2
>>>>>> +- 8 files changed, 39 insertions(+), 34 deletions(-)
>>>>>       
>>>>   
>>>    
>>
> 

-- 
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] 17+ messages in thread

* Re: [PATCH v2 5/5] class/dpkg: Unify workplace for packages
  2017-09-08 15:56 ` [PATCH v2 5/5] class/dpkg: Unify workplace for packages Alexander Smirnov
@ 2017-09-11 16:47   ` Henning Schild
  2017-09-11 18:10     ` Alexander Smirnov
  0 siblings, 1 reply; 17+ messages in thread
From: Henning Schild @ 2017-09-11 16:47 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Fri, 8 Sep 2017 18:56:06 +0300
schrieb Alexander Smirnov <asmirnov@ilbers.de>:

> Get rid of splitting package's data between WORKDIR and BUILDCHROOT.
> Now everything is stored into WORKDIR, and BUILDCHROOT is used for
> compilation only.
> 
> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
> ---
>  meta/classes/dpkg.bbclass | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> index 360a95c..f1a29aa 100644
> --- a/meta/classes/dpkg.bbclass
> +++ b/meta/classes/dpkg.bbclass
> @@ -3,12 +3,11 @@
>  
>  # Add dependency from buildchroot creation
>  DEPENDS += "buildchroot"
> -do_unpack[deptask] = "do_build"
> +do_build[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}"
>  
> @@ -27,9 +26,8 @@ python do_fetch() {
>  
>  addtask fetch before do_unpack
>  
> -do_unpack[dirs] = "${BUILDROOT}"
> +do_unpack[dirs] = "${WORKDIR}"
>  do_unpack[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
> -S ?= "${BUILDROOT}"
>  
>  # Unpack package and put it into working directory in buildchroot
>  python do_unpack() {
> @@ -37,7 +35,7 @@ python do_unpack() {
>      if len(src_uri) == 0:
>          return
>  
> -    rootdir = d.getVar('BUILDROOT', True)
> +    rootdir = d.getVar('WORKDIR', True)

This change is in conflict with the comment, please fix the comment of
do_unpack.

Henning

>      try:
>          fetcher = bb.fetch2.Fetch(src_uri, d)
> @@ -48,17 +46,22 @@ python do_unpack() {
>  
>  addtask unpack after do_fetch before do_build
>  
> +BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
>  do_build[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
>  
>  # Build package from sources using build script
>  do_build() {
> +    mkdir -p ${BUILDROOT}
> +    sudo mount --bind ${WORKDIR} ${BUILDROOT}
>      sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
> +    sudo umount ${BUILDROOT}
> +    rm -rf ${BUILDROOT}
>  }
>  
>  
>  # Install package to dedicated deploy directory
>  do_install() {
> -    install -m 644 ${BUILDROOT}/*.deb ${DEPLOY_DIR_DEB}/
> +    install -m 644 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
>  }
>  
>  addtask install after do_build


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

* Re: [PATCH v2 5/5] class/dpkg: Unify workplace for packages
  2017-09-11 16:47   ` Henning Schild
@ 2017-09-11 18:10     ` Alexander Smirnov
  0 siblings, 0 replies; 17+ messages in thread
From: Alexander Smirnov @ 2017-09-11 18:10 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users



On 09/11/2017 07:47 PM, Henning Schild wrote:
> Am Fri, 8 Sep 2017 18:56:06 +0300
> schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> 
>> Get rid of splitting package's data between WORKDIR and BUILDCHROOT.
>> Now everything is stored into WORKDIR, and BUILDCHROOT is used for
>> compilation only.
>>
>> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
>> ---
>>   meta/classes/dpkg.bbclass | 15 +++++++++------
>>   1 file changed, 9 insertions(+), 6 deletions(-)
>>
>> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
>> index 360a95c..f1a29aa 100644
>> --- a/meta/classes/dpkg.bbclass
>> +++ b/meta/classes/dpkg.bbclass
>> @@ -3,12 +3,11 @@
>>   
>>   # Add dependency from buildchroot creation
>>   DEPENDS += "buildchroot"
>> -do_unpack[deptask] = "do_build"
>> +do_build[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}"
>>   
>> @@ -27,9 +26,8 @@ python do_fetch() {
>>   
>>   addtask fetch before do_unpack
>>   
>> -do_unpack[dirs] = "${BUILDROOT}"
>> +do_unpack[dirs] = "${WORKDIR}"
>>   do_unpack[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
>> -S ?= "${BUILDROOT}"
>>   
>>   # Unpack package and put it into working directory in buildchroot
>>   python do_unpack() {
>> @@ -37,7 +35,7 @@ python do_unpack() {
>>       if len(src_uri) == 0:
>>           return
>>   
>> -    rootdir = d.getVar('BUILDROOT', True)
>> +    rootdir = d.getVar('WORKDIR', True)
> 
> This change is in conflict with the comment, please fix the comment of
> do_unpack.
> 

Aah, yes. Thanks!

> Henning
> 
>>       try:
>>           fetcher = bb.fetch2.Fetch(src_uri, d)
>> @@ -48,17 +46,22 @@ python do_unpack() {
>>   
>>   addtask unpack after do_fetch before do_build
>>   
>> +BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
>>   do_build[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
>>   
>>   # Build package from sources using build script
>>   do_build() {
>> +    mkdir -p ${BUILDROOT}
>> +    sudo mount --bind ${WORKDIR} ${BUILDROOT}
>>       sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
>> +    sudo umount ${BUILDROOT}
>> +    rm -rf ${BUILDROOT}
>>   }
>>   
>>   
>>   # Install package to dedicated deploy directory
>>   do_install() {
>> -    install -m 644 ${BUILDROOT}/*.deb ${DEPLOY_DIR_DEB}/
>> +    install -m 644 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
>>   }
>>   
>>   addtask install after do_build
> 

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

end of thread, other threads:[~2017-09-11 18:10 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-08 15:56 [PATCH v2 0/5] Unify work space for packages Alexander Smirnov
2017-09-08 15:56 ` [PATCH v2 1/5] image: Unify path to image rootfs Alexander Smirnov
2017-09-08 16:00   ` Henning Schild
2017-09-08 15:56 ` [PATCH v2 2/5] isar: Change build folders tree Alexander Smirnov
2017-09-08 16:04   ` Henning Schild
2017-09-08 15:56 ` [PATCH v2 3/5] stamps: Name stamps canonicaly and unified Alexander Smirnov
2017-09-08 15:56 ` [PATCH v2 4/5] image: Name image " Alexander Smirnov
2017-09-08 15:56 ` [PATCH v2 5/5] class/dpkg: Unify workplace for packages Alexander Smirnov
2017-09-11 16:47   ` Henning Schild
2017-09-11 18:10     ` Alexander Smirnov
2017-09-08 16:06 ` [PATCH v2 0/5] Unify work space " Henning Schild
2017-09-08 16:10   ` Alexander Smirnov
2017-09-08 16:12     ` Alexander Smirnov
2017-09-08 16:15     ` Henning Schild
2017-09-11  7:36       ` Alexander Smirnov
2017-09-11  8:00         ` Henning Schild
2017-09-11  8:19           ` Alexander Smirnov

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