From patchwork Mon Jul 27 11:26:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aliaksei Karpovich X-Patchwork-Id: 5287 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Mon, 27 Jul 2026 13:29:13 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f191.google.com (mail-lj1-f191.google.com [209.85.208.191]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 66RBTCG7001012 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 27 Jul 2026 13:29:12 +0200 Received: by mail-lj1-f191.google.com with SMTP id 38308e7fff4ca-39c742c87bcsf1049751fa.0 for ; Mon, 27 Jul 2026 04:29:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1785151746; cv=pass; d=google.com; s=arc-20260327; b=OvbSf42PzojK4QiNLEtVx/0QTCqVlgdDR3FRhWIXv4lZR2+2biVCaiopN5QKpvvF81 2479QsBeDgH7lUF3KYKbWvXGekniPvq4OgC8IXpm7eadPPMUcBvKcUsL5yfk1qacelxP MHrkwpDKyaooESSB8RGDtEHIXip9R2pkQwPHuYWsri13unRFmYM0LKM/wfVVtDF++Ami rfMuJMfKfvxXCZ8NrtiXaHiamgEjZoNmMxR7KpnAJjY+R/Tl5/rrN9lyjVgwaPivUqo+ yvhtN131+P8RSD5y/iBqsbMqN9HZkQC7O5JAFyeUXqB7GiwtXz9vvATFCB21GWh2V72d aNdA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; 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:cc:to:from:sender:dkim-signature; bh=E8ZIuMj9KR83MqifttSWOam59Lx7taqtTaHwqi6oW7Q=; fh=MZrv7z1IPbIykNrfQitSth6ZqvEpwFH03Q596LwrtvU=; b=h1ebIh2CAKpREdV6QLbTp6yfEfFUF3iSHT7x45eV7uD0csX6QDyMpjmY9FOyU3F8gN 9XgEm0jtbcXhPv9z5G8Hpnhj0yXWlV2GPCfUJRd9QiUkzey1s/x3nqImzMkNeZkPUs2u jUJeX/SresBNKHv4Gyrra0IbaLbWtfdOQIjD52ljtdfT6H1oHt4GJwFZBNFSQmA5bE1z hu8Iv5iO/1yw0n9cVUsMQ7YupFo/eqrUx+G708CBykIPvG3Cp2OmwNk2tHsmDVXfBm3i uoT9VmlNJGABGHexSamnTJfJwTBaesaEOLS++JF10TfBwY4HnVfUCdvdIvixBKZ2nuA6 HG8A==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of akarpovich@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=akarpovich@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20251104; t=1785151746; x=1785756546; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:content-type :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :from:to:cc:subject:date:message-id:reply-to:content-type; bh=E8ZIuMj9KR83MqifttSWOam59Lx7taqtTaHwqi6oW7Q=; b=mD7QSb8fdhxWRySLl8b/AGJYCYhUg7g6ckL+n4wKrEkzWxeOD6M9jHed4wOHHpsBAy Q5hWVEOLU4YC6m/At5BeCTydA/Tu8ch1Ke+FSjISE3YPK8DLnFv7CJd2I0quaOfgoXWE FJPYNppoH/b26NdWAlFj4CyosDxZYrvWwnfsf4h2EPIwchXf56+qidA7Pcd+Y3yUB7DO 23inRqc3PSkEofi9nVBvPIyDQrpYk6XY5p1QHRdFzaJoArJycvrXJO5UJzyQHAovbq97 DU8ju8c8Ss0YL/CDlJbwCUInrnpUKmHjV59PGpDBSLQnGxpuqzSKsTqYJ6LTth4Z0LuQ wwAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785151746; x=1785756546; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :content-type:x-original-authentication-results:x-original-sender :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to:content-type; bh=E8ZIuMj9KR83MqifttSWOam59Lx7taqtTaHwqi6oW7Q=; b=VKx+UFI2cm4bfWfmvtlqBL9Uy3Lzah7TiWRugOC4vF6aXYI7v9pvNyBRB4kMOg2tp6 D03Ot6RAFN/fjIinAhgVKQ9RoZHxt7Q5Uih0f/tprOk2bA46uax1tFxq1DaDhy2L5iGz MVjuPp6nePXYhXbS2Smi2Xs4LArrPulqrzYORoPbJePaME3wbm1r5LY1uUQK0t8Cj0Hh EwP1sKzMnYFBLZwGETooFukkIM9++iWtvrpFPixkk8Mi8p4+DfC+/lv8djffiFVU6TPv SXiU5Ahen0G3DO6KoBzyT7NNKkhknadNK3QuGK4b4jqIkOIRH5/OriInB5JmVCMEOU4x 23RQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AHgh+RotkzduEvSOor1O+a4XOxsJmxVHzFSEDWVqDf05lsQxVOGP4GtCc7pfYCOfwU0UIIXaz0XZJ7o=@isar-build.org X-Gm-Message-State: AOJu0YzbZhmeAM4gGa8pxznQPi+B+Q7RP3HHlSb6Gw4k6OO09Aj3Q+aQ KKpnFnXnnhzjVsTesqo41wmbKJ65LYtJAKqOubx6iNukvH//v3adrtkh X-Received: by 2002:a2e:a9a0:0:b0:39c:a0a2:fe93 with SMTP id 38308e7fff4ca-39f287e8ffbmr8320061fa.1.1785151745866; Mon, 27 Jul 2026 04:29:05 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="Aa7YSPROj12Kf7dS6kgPnI9HefkuUczgs+GJELULN2qQPjICHA==" Received: by 2002:a2e:87cc:0:b0:39b:a0d:b8d6 with SMTP id 38308e7fff4ca-39f064c57adls14275951fa.2.-pod-prod-04-eu; Mon, 27 Jul 2026 04:29:03 -0700 (PDT) X-Received: by 2002:a05:6512:1593:b0:5ae:c563:f611 with SMTP id 2adb3069b0e04-5b2c1b522f6mr1468158e87.36.1785151743137; Mon, 27 Jul 2026 04:29:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1785151743; cv=none; d=google.com; s=arc-20260327; b=NKqGC+Ue2IztfnPTHUbvY6H5FJjxqC6f23zSxSgp6qaMdGU8kAob2fVo8oz1t3WYvV p0DDiov8H0CUdcwySii0hWo8IYoR88kdmyTm01TdWKf/Eb5rnvldS2k7R69Bq4UeVfqF 0xv8P4hRXYqEYQQsOIMCiQoGJLlFz7hP+O7+Cv1CPi5piVeDMw23s5lbGjMLDC/Wmr37 MNgnG57dDiokZ0ak/vEKQFX4Oh1NVvZ4NPi2OslXPUfC3+102RpV75nJnfAngfwq2d5s A4OqBfBHsy4u+F7VRCmYQAertg7UP0cchNH1PpMFEmIwLFGoutT23Swvay45w0LHDUUR 586A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=DzyERn8Fh8eguxt1SGsCgvQ/cnxZ8bNfsR8aDCGuhvU=; fh=IIbR0JxonYgzdrHDdB9TmZniSh/o1z0HofhfbmLXp8s=; b=dQtkrOyQM0dE4aq0mErAM4cU5vYW3DFCB5uCye+3yedvXRE39FKRfHADIvl7aXVyGb XUNqxvWSznNmfEg4zJqwrFhuj6xz+ti8ufB36SYscIptyvEz6ec5vaCOPt/fj9eqQ104 grqdLuoCpH/4hEp4/CF57dV8Vt79LViUMHZJULH/pZJZl5VSK/+XVmXS+eSP8MbXTbVZ kQ+5IGl8H+j3AOa6hCtRhdQPUTAalLe47sw4R4/bIfF3i3/2kv3bCNavSmVtLdpX8uhL d1CRyuwPuKJgq6X+gzqCQXmgIz5ZvQDfvVwYYdtXORO55HYcfaiESRHe4uG7E88qQV5N 11dQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of akarpovich@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=akarpovich@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 2adb3069b0e04-5b2be09a942si108215e87.4.2026.07.27.04.29.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Jul 2026 04:29:03 -0700 (PDT) Received-SPF: pass (google.com: domain of akarpovich@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from akarpovich-Victus-by-HP-Laptop-16-e0xxx.promwad.corp (62.122.174.6.serverel.net [62.122.174.6] (may be forged)) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 66RBSjdT000930 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Jul 2026 13:29:01 +0200 From: Aliaksei Karpovich To: isar-users@googlegroups.com Cc: Uladzimir Bely , Aliaksei Karpovich Subject: [v8 03/14] meta: Always use base-apt repo in local mode Date: Mon, 27 Jul 2026 13:26:21 +0200 Message-ID: <20260727112812.2255297-4-akarpovich@ilbers.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260727112812.2255297-1-akarpovich@ilbers.de> References: <20260727112812.2255297-1-akarpovich@ilbers.de> MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,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: akarpovich@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of akarpovich@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=akarpovich@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?= From: Uladzimir Bely 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 Signed-off-by: Aliaksei Karpovich --- meta/classes-recipe/bootstrap.bbclass | 6 ++++-- meta/classes-recipe/rootfs.bbclass | 3 ++- meta/classes-recipe/sbuild.bbclass | 3 ++- .../isar-mmdebstrap/isar-mmdebstrap.inc | 5 ++++- meta/recipes-devtools/base-apt/base-apt.bb | 21 ++++++++++++------- 5 files changed, 26 insertions(+), 12 deletions(-) diff --git a/meta/classes-recipe/bootstrap.bbclass b/meta/classes-recipe/bootstrap.bbclass index c1a59fd2..f853a932 100644 --- a/meta/classes-recipe/bootstrap.bbclass +++ b/meta/classes-recipe/bootstrap.bbclass @@ -39,7 +39,8 @@ python () { # installation afterwards. However, bootstrap 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() @@ -121,7 +122,8 @@ def get_apt_source_mirror(d, aptsources_entry_list): # this is executed during parsing. No error checking possible use_snapshot = bb.utils.to_boolean(d.getVar('ISAR_USE_APT_SNAPSHOT')) snapshot_mirror = d.getVar('DISTRO_APT_SNAPSHOT_PREMIRROR') - 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" elif use_snapshot and snapshot_mirror: premirrors = snapshot_mirror diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-recipe/rootfs.bbclass index 77e6aefc..80731c49 100644 --- a/meta/classes-recipe/rootfs.bbclass +++ b/meta/classes-recipe/rootfs.bbclass @@ -61,7 +61,8 @@ ROOTFS_MOUNTS ??= "${REPO_ISAR_DIR}/${DISTRO}:/isar-apt ${WORKDIR}:/isar-work" python () { mounts = d.getVar('ROOTFS_MOUNTS', False) - if bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')) and not ':/base-apt' in mounts: + if (bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')) or + bb.utils.to_boolean(d.getVar('ISAR_PREFETCH_BASE_APT'))) and not ':/base-apt' in mounts: base_apt = '{}:/base-apt'.format(d.getVar('REPO_BASE_DIR')) d.setVar('ROOTFS_MOUNTS', '{} {}'.format(mounts, base_apt)) } diff --git a/meta/classes-recipe/sbuild.bbclass b/meta/classes-recipe/sbuild.bbclass index 6db29251..29a8dd71 100644 --- a/meta/classes-recipe/sbuild.bbclass +++ b/meta/classes-recipe/sbuild.bbclass @@ -44,7 +44,8 @@ EOF cp -rf "${SCHROOT_CONF}/sbuild" "${SBUILD_CONF_DIR}" sbuild_fstab="${SBUILD_CONF_DIR}/fstab" - if [ "${ISAR_USE_CACHED_BASE_REPO}" = "1" ]; then + if [ "${ISAR_USE_CACHED_BASE_REPO}" = "1" ] || \ + [ "${ISAR_PREFETCH_BASE_APT}" = "1" ]; then fstab_baseapt="${REPO_BASE_DIR} /base-apt none rw,bind,private 0 0" grep -qxF "${fstab_baseapt}" ${sbuild_fstab} || echo "${fstab_baseapt}" >> ${sbuild_fstab} fi diff --git a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc index 994da174..6f2e47ac 100644 --- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc +++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc @@ -153,7 +153,8 @@ do_bootstrap() { fi E="${@ isar_export_proxies(d)}" - if [ "${ISAR_USE_CACHED_BASE_REPO}" = "1" ]; then + if [ "${ISAR_PREFETCH_BASE_APT}" = "1" ] || \ + [ "${ISAR_USE_CACHED_BASE_REPO}" = "1" ]; then base_apt_tmp="$(mktemp -d /tmp/isar-base-aptXXXXXXXXXX)" bootstrap_list="${WORKDIR}/sources.list.d/base-apt.list" line="copy://$base_apt_tmp/${BOOTSTRAP_BASE_DISTRO} ${BASE_DISTRO_CODENAME} main" @@ -183,6 +184,8 @@ do_bootstrap() { \$1/etc/apt/sources.list.d/*.list && \ mkdir -p \$1/base-apt && \ mount -o bind,private '${REPO_BASE_DIR}' \$1/base-apt && \ + chroot \$1 mv /etc/apt/sources.list.d/0000base-apt.list \ + /etc/apt/sources.list.d/base-apt.list chroot \$1 apt-get update -y \ -o APT::Update::Error-Mode=any \ ${@'-o APT::Sandbox::User=root' if d.getVar('ISAR_CHROOT_MODE') == 'unshare' else ''} && \ diff --git a/meta/recipes-devtools/base-apt/base-apt.bb b/meta/recipes-devtools/base-apt/base-apt.bb index 06b1f6c8..05ef9741 100644 --- a/meta/recipes-devtools/base-apt/base-apt.bb +++ b/meta/recipes-devtools/base-apt/base-apt.bb @@ -59,9 +59,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}" \ @@ -69,14 +72,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():