public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Alexander Smirnov <asmirnov@ilbers.de>
To: isar-users@googlegroups.com
Cc: Alexander Smirnov <asmirnov@ilbers.de>
Subject: [PATCH] buildchroot: Correctly mount /proc
Date: Fri,  3 Nov 2017 16:21:02 +0300	[thread overview]
Message-ID: <20171103132102.32315-1-asmirnov@ilbers.de> (raw)

The variable IMAGE_ROOTFS doesn't provide correct path, so the
BUILDCHROOT_DIR should be used instead.

This patch also fixes the issue when after building the following target:

 multiconfig:qemuarm-wheezy:isar-image-base

the folder:

  tmp/work/debian-wheezy-armhf/buildchroot/rootfs/run/shm

stays mounted. This issue is caused by initscripts.postinst script. During
execution this script performs check whether it's running under chroot
environment using ischroot command (it checks for chroot via proc). So chroot
is not found and initscripts.postinst continues setup like for host.

Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 meta/recipes-devtools/buildchroot/buildchroot.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb b/meta/recipes-devtools/buildchroot/buildchroot.bb
index 3e5c0ac..67825b1 100644
--- a/meta/recipes-devtools/buildchroot/buildchroot.bb
+++ b/meta/recipes-devtools/buildchroot/buildchroot.bb
@@ -51,8 +51,8 @@ do_build() {
         -e 's|##DIR_HOOKS##|./'"$WORKDIR_REL"'/hooks_multistrap|g' \
            "${WORKDIR}/multistrap.conf.in" > "${WORKDIR}/multistrap.conf"
 
-    install -d -m 555 ${IMAGE_ROOTFS}/proc
-    sudo mount -t proc none ${IMAGE_ROOTFS}/proc
+    install -d -m 555 ${BUILDCHROOT_DIR}/proc
+    sudo mount -t proc none ${BUILDCHROOT_DIR}/proc
 
     # Create root filesystem
     sudo multistrap -a ${DISTRO_ARCH} -d "${BUILDCHROOT_DIR}" -f "${WORKDIR}/multistrap.conf"
@@ -62,5 +62,5 @@ do_build() {
 
     # Configure root filesystem
     sudo chroot ${BUILDCHROOT_DIR} /configscript.sh
-    sudo umount ${IMAGE_ROOTFS}/proc
+    sudo umount ${BUILDCHROOT_DIR}/proc
 }
-- 
2.1.4


                 reply	other threads:[~2017-11-03 13:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171103132102.32315-1-asmirnov@ilbers.de \
    --to=asmirnov@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox