From patchwork Thu Mar 14 07:27:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzimir Bely X-Patchwork-Id: 3403 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 14 Mar 2024 08:31:27 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-ed1-f55.google.com (mail-ed1-f55.google.com [209.85.208.55]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 42E7V2Y0021562 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Mar 2024 08:31:02 +0100 Received: by mail-ed1-f55.google.com with SMTP id 4fb4d7f45d1cf-5689df8fbcasf406438a12.0 for ; Thu, 14 Mar 2024 00:31:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710401456; cv=pass; d=google.com; s=arc-20160816; b=eD9yxpVn7pCPKp98W4+Fb2GHVdsm8lFr7/Am7ORi9ajWDt7ZZhgzzPg/YHZRadFS8R VzJQPr4YTXjlg+rvwlHBrk7lumkPbu5vyu4SqFaFHDfxIVAuh7+EN5Q/jXjdw7IRK8Yl OHs/uyQY/RI/QoLwkKctkK5gEKtw2EGtd7c0GiGpDf0Su5WwUnMFb3KXZxkDUUEgxMG8 ZbOH1EZBzH9M66sk82oCkLXUnyYYnkLbpC+xzCCbCly+QKHobuG/FC8kkhc4tEoRcK0H TYjhIxtkS3JPiGKRXkQZZ53H+rHh1tkXAwrW2+K+J0zYl8AFugE00cWOFpjB8XEMZ68J h47Q== 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:references:in-reply-to :message-id:date:subject:to:from:sender:dkim-signature; bh=zrHv2K/qJX5SN7tIpvu/qbmXRVnXIAo6ATaArTUJU2U=; fh=YIgrIgo5UWDsDfiG4kJwwYejdL1gl2eIAslZLqgsdyA=; b=HlE4KZkobxO4JBI3TnLTin1PqUNMQf0JSshsLiptaL0WjZFmLKYiGwbUbsLcpax9jH gOqTJ9LNsmzolJXkwsgS+BNE3+0+D9SJnh24m8WIqlCGssflzXI9WKt/0moGjsWEkgE7 ps9cFV9FHKd2lqMcaLSov5V2tQu1/VZ3LOzJ0ROUW+YWbs0IO0UR3APzlM2KiIgKsoFz bjYzYbOgCxPpF9+oH+iJV38eTkYL+APbC988v4p4froKGzAsiQEnLL+hq5AAWLPSA4DL ai3Fvfa11VoZEnorPa2dRSPyUSIoP+5hrh8dsYArLALclm+2SU3l3dfG58iAl4zmzk9K S5Tg==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1710401456; x=1711006256; darn=isar-build.org; 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:references:in-reply-to:message-id :date:subject:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=zrHv2K/qJX5SN7tIpvu/qbmXRVnXIAo6ATaArTUJU2U=; b=ZD/5N1+RjPQXa0Po4i++cuqiMWeRg6mWPyp/a3QI/XTJT0LbvXOnb+5eN2WS+rTSl8 1T46Po89JUEhAVNgcMmUO4+1dtvKW2YjRUrj2tWMMeQQvmeI6DvxPrEfWLnGlhzEupcj uRFMQAop0QCyfwnRweiIi9qrdcW/Jrd8tDM4iwJ+dwmbw5tblUwNymJq7MtAlI3Z4Zi0 Yv886CyzomBVXmRlkEIDj6BwUj8kAbnvVrDf9OkfQ+nkAWxNFkFG7nvlVSeviI8OP+6p 3okeMOiIprPLmxmYbY5IrkK1AbIe2EeKZxrzF9RaL6obqEXTr/vYYtlkw+lQVjkXTrle legw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710401456; x=1711006256; 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 :references:in-reply-to:message-id:date:subject:to:from:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=zrHv2K/qJX5SN7tIpvu/qbmXRVnXIAo6ATaArTUJU2U=; b=rnSs5nWFKqwiJUlv6EKvsvbbbicm+DLCQDGmTlM/02Dlq4UgFXY8CAJoxe+XzXqJKF WbvOQ49wDqhA6itwTJvnW9zu8yYukbZXDKwI8CSrgdMgwGz8GoBD4puBpY9SmayAeA50 CPdDXmJQPfJWWZlBJvp+lZNVGqrD/GXZw7j6SyuG7XPbrdvMGfA0oD+QHUHi5KcsLnGd fyBqryZ1b4vNcWxeZHvtdMURmAmwe4YZCqIspPfYUjSsK3oVPWxXCL6hOMsJL+XZKL0W qj3JF3k5zW8wYwQG9CMfJNT10yjFplGlMGNac7il814dYw5COqYgnYMMmrc4DfE4Ze+P 0AKQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCUZkDmgxF9phdo782NbQKpHpYXe77K6PB60DtB5qOUaxY+3A++6Po2nuyD3ED/xq1arMD/KCOieEFjdLaexoj4L0Xo4S5I= X-Gm-Message-State: AOJu0YxGwGkVhJ1uYSpRBcvYUrN7n9AnEBmApVLH1ikcCaQYfJGzA+S/ vzgQGv+BsGdGrRPA7iYGdJUCU9TGKuKjBjbq7xfnC1+YJfGpcpVr X-Google-Smtp-Source: AGHT+IE6A1qhiy7AKN6uPweFioHAcZcbdGTKROe5PfCEJFYU9EsRML/Ias8m5oogR1uDQn8C0QbUbA== X-Received: by 2002:aa7:d998:0:b0:568:a088:e472 with SMTP id u24-20020aa7d998000000b00568a088e472mr579219eds.6.1710401456041; Thu, 14 Mar 2024 00:30:56 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6402:380e:b0:568:2764:b455 with SMTP id es14-20020a056402380e00b005682764b455ls451849edb.1.-pod-prod-00-eu; Thu, 14 Mar 2024 00:30:54 -0700 (PDT) X-Received: by 2002:a17:906:d0c7:b0:a46:6df5:3511 with SMTP id bq7-20020a170906d0c700b00a466df53511mr1296600ejb.4.1710401453640; Thu, 14 Mar 2024 00:30:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710401453; cv=none; d=google.com; s=arc-20160816; b=q23RFpyE3S0qw9e5e8XcaauxWmYrB5PZlQAELZd65u4/C6y7PZ0VtZBBiI+my4c5zr BmnnudEUbCKvAHIE9kvuIHurP94R4daev2TLN+JV8qOgvhKNqI6ZlwRST7cSNoX3jVyx +YWqA5fTlzJs4GbcKc6Kp99f3du+zrwKqqAfdSDViBzJCDzIju7d+lCPUl0KjDE0+duE 1uT7l08Izfje81eGHaNpn3LJci7sXyAphy5GQEiBnPRV/Q4JPkzlz3gxi5O4vc5VrhPp W5JvoQ0sVx8IWDB+97DEDuIHd0Y1morI8tzQ2rUQyWnisGXWxPPW35/nScljvvPWG72q OY7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=UD5y/dXcMVuvvSNV4kUevqVtox3oeo0vurNRka5Fm2g=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=kLgoWUTO7aZFVzaLgJ/zjKhAwg52dy+eWvg/+yztpA8ytzY+54SDRGWg3tkB49dOOY iPQ4k7WKPuz5GXtwmgazge5smyKmCXIlcnFpu8KRZ4ojQ5c1yqFhsGZPks2xPglpg/fE pKxbzng0VA4fbTzHDyd/3yvR61bHv86dz5bZj5RNK4UJ+ao+9kRmPXrY9+X0btFRdW0d 6fHpl1DnY5ZL3V2gUCpNKXbgfDGbcHuJIDiFsespOK31LZXiZZNkEAkEAaKIfvhUG4Gh hoG1PNfHQfiTwqE9EGIXNgqtt9jsQmctzxvjVBG+DYQh5EG3lUgbqafMfXqMLYrRvdcm LQSg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id bc4-20020a056402204400b00568a42a7564si4948edb.0.2024.03.14.00.30.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Mar 2024 00:30:53 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from hp15.localdomain (mm-209-185-213-37.mogilev.dynamic.pppoe.byfly.by [37.213.185.209]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 42E7Uo9w021482 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Mar 2024 08:30:52 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v6 03/11] meta: Always use base-apt repo in local mode Date: Thu, 14 Mar 2024 10:27:20 +0300 Message-ID: <20240314073047.29465-4-ubely@ilbers.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240314073047.29465-1-ubely@ilbers.de> References: <20240314073047.29465-1-ubely@ilbers.de> MIME-Version: 1.0 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-Original-Sender: ubely@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= This means only local URLs in apt sources.list* are present during the build. Any installation of packages is done from local base-apt. So, base-apt should be always mounted in *_do_mounts since now. Signed-off-by: Uladzimir Bely --- meta/classes/rootfs.bbclass | 5 +++-- .../isar-bootstrap/isar-bootstrap.inc | 12 +++++++---- meta/recipes-devtools/base-apt/base-apt.bb | 21 ++++++++++++------- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass index 498fbfd6..ddc5d12c 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -54,8 +54,9 @@ rootfs_do_mounts() { mount --bind '${REPO_ISAR_DIR}/${DISTRO}' '${ROOTFSDIR}/isar-apt' fi - # Mount base-apt if 'ISAR_USE_CACHED_BASE_REPO' is set - if [ "${@repr(bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')))}" = 'True' ] + # Mount base-apt if 'ISAR_PREFETCH_BASE_APT' or 'ISAR_USE_CACHED_BASE_REPO' is set + if [ "${@repr(bb.utils.to_boolean(d.getVar('ISAR_PREFETCH_BASE_APT')))}" = 'True' ] || \ + [ "${@repr(bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')))}" = 'True' ] then mkdir -p '${ROOTFSDIR}/base-apt' mountpoint -q '${ROOTFSDIR}/base-apt' || \ diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index 17f19fd8..05c80308 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -42,7 +42,8 @@ python () { # installation afterwards. However, debootstrap will include the key into # the rootfs automatically thus the right place is distro_bootstrap_keys. - if bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')): + if bb.utils.to_boolean(d.getVar('ISAR_PREFETCH_BASE_APT')) or \ + bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')) : own_pub_key = d.getVar("BASE_REPO_KEY") if own_pub_key: distro_bootstrap_keys += own_pub_key.split() @@ -110,7 +111,8 @@ def parse_aptsources_list_line(source_list_line): def get_apt_source_mirror(d, aptsources_entry_list): import re - if bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')): + if bb.utils.to_boolean(d.getVar('ISAR_PREFETCH_BASE_APT')) or \ + bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')) : premirrors = "\S* file://${REPO_BASE_DIR}/${BOOTSTRAP_BASE_DISTRO}\n" else: premirrors = d.getVar('DISTRO_APT_PREMIRRORS') or "" @@ -283,7 +285,8 @@ do_bootstrap() { if [ -f "${DISTRO_BOOTSTRAP_KEYRING}" ]; then debootstrap_args="$debootstrap_args --keyring=${DISTRO_BOOTSTRAP_KEYRING}" fi - if [ "${ISAR_USE_CACHED_BASE_REPO}" = "1" -a -z "${BASE_REPO_KEY}" ]; then + if [ "${ISAR_PREFETCH_BASE_APT}" = "1" -a -z "${BASE_REPO_KEY}" ] || \ + [ "${ISAR_USE_CACHED_BASE_REPO}" = "1" -a -z "${BASE_REPO_KEY}" ]; then debootstrap_args="$debootstrap_args --no-check-gpg" fi E="${@ isar_export_proxies(d)}" @@ -314,7 +317,8 @@ do_bootstrap() { install -v -m644 "${APTPREFS}" \ "${ROOTFSDIR}/etc/apt/preferences.d/bootstrap" mkdir -p "${ROOTFSDIR}/etc/apt/sources.list.d" - if [ "${ISAR_USE_CACHED_BASE_REPO}" = "1" ]; then + if [ "${ISAR_PREFETCH_BASE_APT}" = "1" ] || \ + [ "${ISAR_USE_CACHED_BASE_REPO}" = "1" ]; then line="file:///base-apt/${BOOTSTRAP_BASE_DISTRO} ${BASE_DISTRO_CODENAME} main" if [ -z "${BASE_REPO_KEY}" ]; then line="[trusted=yes] ${line}" diff --git a/meta/recipes-devtools/base-apt/base-apt.bb b/meta/recipes-devtools/base-apt/base-apt.bb index ea885fe6..e62958d1 100644 --- a/meta/recipes-devtools/base-apt/base-apt.bb +++ b/meta/recipes-devtools/base-apt/base-apt.bb @@ -57,9 +57,12 @@ repo() { "${BASE_DISTRO_CODENAME}" \ "${WORKDIR}/distributions.in" \ "${KEYFILES}" - populate_base_apt "${BASE_DISTRO}" - repo_sanity_test "${REPO_BASE_DIR}"/"${BASE_DISTRO}" \ - "${REPO_BASE_DB_DIR}"/"${BASE_DISTRO}" + if [ "${ISAR_USE_CACHED_BASE_REPO}" = "1" ] && \ + [ "${ISAR_PREFETCH_BASE_APT}" != "1" ]; then + populate_base_apt "${BASE_DISTRO}" + repo_sanity_test "${REPO_BASE_DIR}"/"${BASE_DISTRO}" \ + "${REPO_BASE_DB_DIR}"/"${BASE_DISTRO}" + fi if [ '${BASE_DISTRO}' != '${HOST_BASE_DISTRO}' ]; then repo_create "${REPO_BASE_DIR}"/"${HOST_BASE_DISTRO}" \ @@ -67,14 +70,18 @@ repo() { "${BASE_DISTRO_CODENAME}" \ "${WORKDIR}/distributions.in" \ "${KEYFILES}" - populate_base_apt "${HOST_BASE_DISTRO}" - repo_sanity_test "${REPO_BASE_DIR}"/"${HOST_BASE_DISTRO}" \ - "${REPO_BASE_DB_DIR}"/"${HOST_BASE_DISTRO}" + if [ "${ISAR_USE_CACHED_BASE_REPO}" = "1" ] && \ + [ "${ISAR_PREFETCH_BASE_APT}" != "1" ]; then + populate_base_apt "${HOST_BASE_DISTRO}" + repo_sanity_test "${REPO_BASE_DIR}"/"${HOST_BASE_DISTRO}" \ + "${REPO_BASE_DB_DIR}"/"${HOST_BASE_DISTRO}" + fi fi } python do_cache() { - if not bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')): + if not bb.utils.to_boolean(d.getVar('ISAR_PREFETCH_BASE_APT')) and \ + not bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')): return 0 for key in d.getVar('BASE_REPO_KEY').split():