From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6484177822529093632 X-Received: by 10.159.44.153 with SMTP id w25mr3563858uaj.86.1509715295024; Fri, 03 Nov 2017 06:21:35 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.31.213.135 with SMTP id m129ls688776vkg.10.gmail; Fri, 03 Nov 2017 06:21:34 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RAo8nGLVQGRoODCaA3rL3WgEiPNHDPsAZQjwRyQGvHupKB2hijTV8rXLpGp6EcM0nfpEbc X-Received: by 10.176.11.1 with SMTP id b1mr3476151uak.34.1509715294655; Fri, 03 Nov 2017 06:21:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509715294; cv=none; d=google.com; s=arc-20160816; b=IMWMLLWfrRb5RmAnoxHYm2q6L6IxJaV80/frvbxkgKwAcG9LDDxegiMsZYma2dbC54 Z/CEWEFAK8/qKMwEh3GwTQs3skCL8M81c39AqH5n9C/sCZBXoBu4EG7h5/dIDpgSFJSk cSLLrFmskFHw3pvPPwoa1MNlb7aLx5OaMGZyoSE2EXW8aN9CfBHzJ6Y/nUuZpoJlOW4v txakJgdts3avATTvTyJuPFB2uP8WIG0plbNJb3mOjAajdfiP3ApPJvB3qRuogJZRb8Nt wMFRliRCqtW9TNqQYDBsfNxIPCZ1KKxfZPnDsmO0+Je8rdsl+87mTilPIteOeoy7b9C1 il5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=5VAcSi31xjODTfvIfKwLC2PFMQmfXF6F9dm0x0OuZ8c=; b=AsEIQaZgGyx/7l7pCkksOtUODqgzz+YN56c8i3xceMB4lFOqffkn7M1qAm6KANNFBh SS9DCiqvBXTOPFUSlXXZRiNnjx3lV7uVzldlSWtChuV+72im9QuMjxdMuTjYb9sbgqrE 4AKQ4CA8GMjxV6ltbqVWSHpY/MgZs3P9wWiDMDIv8L17XfeIYo4QwkfgA9b06u6p5Bqb 3i+gy/GgnihxaFqPshX4/xTGrqh61jq3ilccB7eRcjZnJURpHrxodD643b/sfOkvTj2Q rTiRzrQZxP2hwrLmqA5gFhO7wo2vPhd+T/FADxnT1tlFOR50rWAAFnSa/z73W1NBEl6f H6uA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id t48si577346uad.5.2017.11.03.06.21.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Nov 2017 06:21:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from localhost.localdomain ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id vA3DLB56001215 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 3 Nov 2017 14:21:21 +0100 From: Alexander Smirnov To: isar-users@googlegroups.com Cc: Alexander Smirnov Subject: [PATCH] buildchroot: Correctly mount /proc Date: Fri, 3 Nov 2017 16:21:02 +0300 Message-Id: <20171103132102.32315-1-asmirnov@ilbers.de> X-Mailer: git-send-email 2.9.5 X-TUID: F3cZcw5P/1Q5 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 --- 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