From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7194452795414544384 X-Received: by 2002:a05:6512:3a88:b0:4a2:4b43:9aad with SMTP id q8-20020a0565123a8800b004a24b439aadmr5115791lfu.213.1675089075357; Mon, 30 Jan 2023 06:31:15 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:1146:b0:4cf:ff9f:bbfd with SMTP id m6-20020a056512114600b004cfff9fbbfdls2198154lfg.1.-pod-prod-gmail; Mon, 30 Jan 2023 06:31:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXtf9Xo0bN5Dr9hTneBu29OjA4TlOSxIUFDbTrw6RvxqV0CmWU99vkTt8W8Ay8IqMErYarJ9 X-Received: by 2002:ac2:51dc:0:b0:4d2:c97e:6762 with SMTP id u28-20020ac251dc000000b004d2c97e6762mr11383663lfm.0.1675089073701; Mon, 30 Jan 2023 06:31:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675089073; cv=none; d=google.com; s=arc-20160816; b=L0lZT3ur++/lafVcE6EvAwTEbNDDbc+ti7U7GDioD9GQugqVK1ADqEFKN2gq0jV/IG d1kNQQiF5J/GFx6Vx+GolDg59yX9U9HRblk6qvzv/K+qUHbAhL8LuGil97HYYuSBQf52 8Uvx54xzwmZxx+gCSwlJOMZkCK61WBqEM2bPQGix8L7ADs8Lc44uOmmSh6PMe7vMOC23 PXxqHq/i3pWiI5b/g0GV8WeCEizcDY0f/ZVofNTnU7RLAORg3GClKQer3xcutmllr3Yk Z8T1pxrdeYEhCSxO2xl0TvMEePPmOYginqWsjST9W6dFihWouhP/kXFifGLxerZkSi8s id4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=LYh6z+cFS5gj760hCecSvxGazT5BjGgIPsGWIzbFXNA=; b=z7TKQyGSp17PScH3Ka+lwgOwzw+fT7u9dez4tPQt6Exv2cYPpupseTYxg2ryjCXI3f BX1YoQTG7XjbYt2alykFxv1DYVjLJHBgJWTHgWgzXH+Xno/WfBg/mZlo3WKNkR7vfx9b UN+OzSS/h3sH1USr6ZP5Q6lnnzenZ0ldGiL59Y7I204py+oYvGvUOiDoBeFnoNQk2mti ZEzH243bQe1NdxNvvW+Z5gesyYnqlaFSzESnbjGGg2ozpmAQNhTrW0Mq8lOMZkELoaWJ X1RwEQHgD8rnkfvnCaUxjsnIixhtznAsSLKOlegOlGNlUwGD8k38P2pCH6dXBdrp8nut HSYA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of roberto.foglietta@linuxteam.org designates 5.144.164.170 as permitted sender) smtp.mailfrom=roberto.foglietta@linuxteam.org Return-Path: Received: from m-r1.th.seeweb.it (m-r1.th.seeweb.it. [5.144.164.170]) by gmr-mx.google.com with ESMTPS id n6-20020a2ebd06000000b0028ffa3d673asi460012ljq.3.2023.01.30.06.31.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 06:31:13 -0800 (PST) Received-SPF: pass (google.com: domain of roberto.foglietta@linuxteam.org designates 5.144.164.170 as permitted sender) client-ip=5.144.164.170; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of roberto.foglietta@linuxteam.org designates 5.144.164.170 as permitted sender) smtp.mailfrom=roberto.foglietta@linuxteam.org Received: from localhost.localdomain (unknown [IPv6:2a02:8071:3187:7b80:8e08:83d9:3ec2:cbf4]) by m-r1.th.seeweb.it (Postfix) with ESMTPA id 5A4BF1F686; Mon, 30 Jan 2023 15:31:12 +0100 (CET) From: roberto.foglietta@linuxteam.org To: isar-users@googlegroups.com Cc: roberto.foglietta@gmail.com Subject: [PATCH v2] do_bootstrap if {HOST,ROOTFS,DISTRO}_ARCH is not set warns v2 Date: Mon, 30 Jan 2023 15:31:09 +0100 Message-Id: <20230130143109.2356633-1-roberto.foglietta@linuxteam.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: 7ZJU7EI84zKX From: "Roberto A. Foglietta" isar-debootstrap, do_bootstrap(): configuration warning added These variables determine which debootstrap command to use because in the general case the qemu-debootstrap should be used but it is a slower choice when the host/target architectures match. This is obviously managed by ISAR but the machine configuration file set by the user could miss to properly set one of these 3 values. So it is necessary to warn about unless the ISAR layer will properly fix the user shortage. Also, the day the ISAR layer will correctly address any lack, a double-check reminder/warning would be useful because fixed things could be broken again in the future. v.2: the bootstrap type is set coherently with the host and target architectures + the warning is provided whatever debootstrap is choosen because it is related to missing values on arches. Signed-off-by: Roberto A. Foglietta --- v.2: the bootstrap type is set coherently with the host and target architectures + the warning is provided whatever debootstrap is choosen because it is related to missing values on arches. meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index faba73fe..b805e417 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -15,7 +15,7 @@ PV = "1.0" BOOTSTRAP_FOR_HOST ?= "0" -DEBOOTSTRAP ?= "qemu-debootstrap" +DEBOOTSTRAP ?= "${@'qemu-debootstrap' if d.getVar('BOOTSTRAP_FOR_HOST') == '1' else 'debootstrap'}" ROOTFSDIR = "${WORKDIR}/rootfs" APTPREFS = "${WORKDIR}/apt-preferences" APTSRCS = "${WORKDIR}/apt-sources" @@ -291,6 +291,10 @@ do_bootstrap() { sudo rm -rf --one-file-system "${ROOTFSDIR}" deb_dl_dir_import "${ROOTFSDIR}" "${BOOTSTRAP_BASE_DISTRO}-${BASE_DISTRO_CODENAME}" + test -z "${HOST_ARCH}" -o -z "${ROOTFS_ARCH}" -o -z "${DISTRO_ARCH}" && \ + bbwarn "*** ATTENTION *** BOOTSTRAP_FOR_HOST=0, DEBOOTSTRAP=${DEBOOTSTRAP},"\ + "HOST_ARCH=${HOST_ARCH}, ROOTFS_ARCH=${ROOTFS_ARCH}, DISTRO_ARCH=${DISTRO_ARCH}." + sudo -E -s <<'EOSUDO' set -e if [ "${BOOTSTRAP_FOR_HOST}" = "0" ]; then -- 2.34.1