From patchwork Mon Jan 30 14:31:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: roberto.foglietta@linuxteam.org X-Patchwork-Id: 2569 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Mon, 30 Jan 2023 15:31:21 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f192.google.com (mail-lj1-f192.google.com [209.85.208.192]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 30UEVKTa017319 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 Jan 2023 15:31:21 +0100 Received: by mail-lj1-f192.google.com with SMTP id o2-20020a2ebd82000000b0029051ecb8d2sf691771ljq.20; Mon, 30 Jan 2023 06:31:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1675089075; cv=pass; d=google.com; s=arc-20160816; b=S9FcD9rajyMTAKSELvPmXc/6Chl1tz0d67dMsrVzYpIqrQZiveHXrbLVZel/oFYh9R 61jbmPi+hWRvoOYRyP3PJzL3JUZSbzCyY+T+RCKtiRibyuXba4tNEPPoVhL1nvUvsLFL n/PqQcVrEiIUmCq3S3pKlNebRzXuzQzdOHVOhvlcHjQmbnySiiaGmYr1pi7rYA2oaGZX 19ZRRcrkN65jJvO7hbC2p/k/V7NZ0HWjMmk06taoVPqMZRTRLT+Ur8ihflWD6N1xycWO JzEwY37fIv3IZ8SaDCD1lztOsDMO1QIEGXgMROmezzpFJdGJ0I2k5vAA/BdNWEEz9hbh m0uQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=ofEj8ta6yERzN65icTWDJz2PqLh92ZMZ0MOAxggm46I=; b=rXhMMr15+UFyfzsH5g7+Vny1JMZcftT8ZYYTwt+RaxXz7jPFBFu4ffIdODQMaP1eo4 nPMXqWjN1zCZgtXva5kELMkkpKiUR8UUWpeaPBVhAB1/8tJNwHBF7ZtOIO+rmPdscnZn Tb/Tgu4drG3zs1pLl577vJckgqVY7NetOiUrrRitIrzlhXEudKdPIceXb3K+Suq2Uv0E Lty+LZUnFoKpHQR9tMgnZ78MpUPHxGwcyACSOHO3dvtufJzm2cifEWxYN9nW3WwwZvFU mIARtWGelxat61cB2Jnkr3OjbKJZQ/37qXkCdIcLXTM82TeZvaSwR3DdaW8V63+rgWvD iSkw== ARC-Authentication-Results: i=2; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :sender:from:to:cc:subject:date:message-id:reply-to; bh=ofEj8ta6yERzN65icTWDJz2PqLh92ZMZ0MOAxggm46I=; b=Cw7uBCNPHmRRyPIb2lUWR2ANhO4PR9Ggr8A163RZPMdRHIS8c2kwtamDJl2BWKuj5A TbFtm8EXLRr8mR6moCxiDQd0Z7+bOGqYpIGUGQe3BJa7u3pios0tChZ9O3H+U4zgg7OA e2YViAnLeEz7mO2TpA4165XBK3j7L1bp64GfbX9hdaeEre4Eiw8YSlwdSBbslvuEy3um GJEke7/8y7r1Z2tgHQik9h420hU4PeN0x4Vo3DgkwY4JmuDcUgEbRE13JWE5v/L0U+Me vQuYnCycUuNOrosoy+uV60V2/jmbRNBw14gtwS7iNbnKH4yXttY4n3W7xp4pQpuTCOtr oN1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=ofEj8ta6yERzN65icTWDJz2PqLh92ZMZ0MOAxggm46I=; b=uJHvt6ynfkq+YAMX3jSnkjx11wpW0InDiBGzESt/gd38kSkTfrbYXNUyoG7o1bC79d 7FRqcHGhcjtnMvt9r+jEVoKaWa6kSPDdx2l4Lj6yhJMKV7nB0cVNhI77iQJRhe6C4hOv ron8X/5hjgR34ss1AW0U4un13DmyCVEI0pw1sTiCsIJfSL1G94MyB4hdAL1ByVxBd6Ww b2MA6tGVDzckpZa/b426Sh41Q9/fSg3sXE3vP9URBqr2jzXjAhLu2lKczf2kO71mieGQ Qan6vc3An0Bvg09r4BZpBAHXOMUvh+fhN7CP/aFanvXwUqx2Riq6BJ0Qrz81U6yPSE8R EK7Q== Sender: isar-users@googlegroups.com X-Gm-Message-State: AO0yUKVrDQcjlvyu+NYlOk8tY1xezjp10J+0/z2WWZZ1q6HW1ZKEftvb 9e1SGBeOFxPfWU8I8SON/uM= X-Google-Smtp-Source: AK7set8dwl0Bp3D12G+Ii2Ap5C2yyx9u76ZgGOY6MwozoJigxHpxHQJmcSh8DglEd5qNFDfXcgzeLw== X-Received: by 2002:a2e:9b8f:0:b0:290:4f23:8360 with SMTP id z15-20020a2e9b8f000000b002904f238360mr954146lji.121.1675089075286; 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-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 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; 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 X-Original-Sender: roberto.foglietta@linuxteam.org X-Original-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 Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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