From patchwork Fri Sep 4 07:52:45 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aliaksei Karpovich X-Patchwork-Id: 5419 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 04 Sep 2026 09:56:05 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f61.google.com (mail-wm1-f61.google.com [209.85.128.61]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 6847txl5004183 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 4 Sep 2026 09:55:59 +0200 Received: by mail-wm1-f61.google.com with SMTP id 5b1f17b1804b1-49a1b4ea633sf7068495e9.0 for ; Fri, 04 Sep 2026 00:55:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1788508554; cv=pass; d=google.com; s=arc-20260327; b=e3dL67RoSO9wleLe5BLwPPfmGqjFGytf4Sd/+mBzGb6eBYarwtzIsPfGr5hGDBNv1u C+8k/n3KAI8Y/enBcon7N5WIofnhrF572Bf3zp2zBNtv59Vc7myGm+Dkr962YX1HfY22 oPwR6BI+9NVh9zJ0MmSDFHcYkttCU+BHkVYE5ghdYMYPQlNVyZnlgDFF8h+tnUbrDfMA Oh/JQ8CU50FWui2bS08hTt4icZh8G+iBLrIcAgwwfvE4XaMr/q8BxJeA3E5g3r9Xfh0H N8I65qpU38dL4d88ky3keGWHg+an5MEgsjVPDHXG29101aCxH+k+qf20/Vt0zBN5Pe+1 pADQ== 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=AqfTQy5XQL9YKUUJem01FRzNvJTdz7C728Xi+qMgJxk=; fh=VNQzvtSb2Ez3f6QJpWJqK5NifTFyA71R7PNj6VRLSV4=; b=rgA9z8eJ/Xao2e5T/JQcOaS+FzpNz+1ySWD1q7xubLLRvGFCQLl5x9wR8w1lHKdmVM diqbgi0CAoTqljKaP020ZD1Ui+B9QPNCh9wItwIDVOo3tDHXXC3ZDe2rMWHGeUxbqFav hniq+Or9kiSYrh/1kdIykN4EV4DuVjDOwaHDwqE41rNLNnoC3R64iLs/AHhp51kgJvSG m2JUp7Jenue0AXQ8iYnGP3JZ3uBn5xllro8vyusEq0v7VCzt1ZOBBjQUxUk3BGMp3O3/ 6TQjEu6mBZxpddLevNgcCQTimsvR5fw/U/YFwYH8Exitwzg7NFKVDp/SJpOG4QbNoi8g JR2g==; 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=1788508554; x=1789113354; 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=AqfTQy5XQL9YKUUJem01FRzNvJTdz7C728Xi+qMgJxk=; b=OPpLCk9TWYZP6iytEie2J0FHx+jg1Gq42sUkCzYc4rDC53PETCVIPV5bLaXNhaP4V+ 0p3KAkQwzr5RG+DZeb+cpCy3I03l0yOHcVSSgK20+kK0JmasSd4czHxidm5nvTsaNo4B bJlthP3RobhSxGjazebXAGhLc31ELRKT0KmmxhdI4Y8PrbSneR3lMJUFfl4ctjk8m7GR YlSHbmziEtSXFbPec/tukyyHm6x5iXb6gbBl1YqpJW27rp6EUGtKNpoT5kMj/BHF/8u0 +ENvTxAQoSmLTP+uHwP8WLVS7Cg5Uva2nS7mhXJb/YH41Todmeq78Ji/Z/pUFcVb19uD 85ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788508554; x=1789113354; 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=AqfTQy5XQL9YKUUJem01FRzNvJTdz7C728Xi+qMgJxk=; b=oFzZAnuGD8n7Q+zKN9zoxhWPdQtvS7dVKlI9ecmW3SB+3vzBP/ArhX1gEOZxKDmiN6 Urhd/HkD/g0CmIFs/+JGIb/z8A0zRCMgMpBuYpTnNINGSkJUCVuNABva1J5vRhABtP1F MzkrlvB2IDHviNSG93fFewbmJYhTN8Z5ADo+10ti8Hw4FnPWHmT1OMv7CrSeY4+7yL8c pRp2YHjm6K3wPmaJLu7H6019qNkNN8D+tGDKi2VCplf4z3T8RhwIPzJM646c8DI6p4bv TcvyqPedTDGhYs3tSZmNud9SU8vEyZR7bnlQr+XqhaiH8R+joYBELnKIOgW5H1k3JjcB 9J7g== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AKwUvByTbIZDBQtpE9DJJ1wnSrzFqoWqu9AC80DhsMR+Tt1XjtF+oR1LVEkuShpJfwVyUXahVLegUKc=@isar-build.org X-Gm-Message-State: AFuF++l20ThY22FH0Be7A2qC2dICm08amZ5AsTfz7k+NRHlyYIdWXKeC tqWluOdYiDFRgigT878DorjKgBKcHSmZ74pp0EzKKFv4gCAcY1WsL5+F X-Received: by 2002:a05:600c:1990:b0:49c:f512:2361 with SMTP id 5b1f17b1804b1-49cf82524a2mr43663205e9.14.1788508554076; Fri, 04 Sep 2026 00:55:54 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="ATskLdcUj1i7fBAPjv/2kZ9gJ1LWfMCDy8CV9l00G4jS3oGAoA==" Received: by 2002:a05:600c:1c0e:b0:495:5dfd:ff7c with SMTP id 5b1f17b1804b1-49cf6877442ls8260775e9.1.-pod-prod-02-eu; Fri, 04 Sep 2026 00:55:52 -0700 (PDT) X-Received: by 2002:a05:600c:6306:b0:49c:f5c0:aa76 with SMTP id 5b1f17b1804b1-49cf81e366amr79919135e9.5.1788508551792; Fri, 04 Sep 2026 00:55:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1788508551; cv=none; d=google.com; s=arc-20260327; b=ZezfG+Prn3UQWznSaSI0lpN4mqvKlxW09d3PWPaPV7/GNwinAkANVRAqTl3X9A4xwi AUiUMimQkmY/t+MtRM6jxaary3X2F7TSb3xMh+Lsn6vPnthhWfkbT/GTi82Vd+OzJP9D uxOtHnOfyRPEyjFnb7Yvbxw9gPFJYRkSYOpZCgzIbiCmPUSjK3JlyoZ6X3IvW0edxLs5 kmhOnwzntGcHYpR7GlnJFfBod9i2sPrssdUC5NM2S5nwY1wVcj9L+OUf5XFvtBk5KSsH uNHF96lQ3yAM8m/4WlJu53wXwmdVjm9P3zycY7m2g+/ETZNBDATD/f2ZGa/intpGYj2M z7cA== 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=G3ir034zB1T9z2HBCQOJ244dU3gGtKh1hG2Y5z66W0Q=; fh=8xvFQ9N6ENvazHnylkO2sbgzUV6bRnZQvNiaC5bb+x4=; b=kvfNXtujOfqWPBdMibdgKgpNasEOIV7Qwsd12tFvKjAAXw1TB2bXOBB8geoyOQASGx b87+35H4zQ5UT+mFmsV07NffsfYHgJphoyC2WXr+1GT3mjeKHJ52YRmV4SghYRqNbOQX e7HSU+vjD9jZq8SerP2FpI6vSl0xZyH/xtmARcvxx2/o0/1bhQGliRz+Qr/00pxVRNih E84ZA/h5gFm1m2GNHAQHLIkwWJCTzQ68v7sndh+VHXr1BXpOlDt+NeXwl4CHvDVMf92H H5+pP892TtjXzpvxCqbKHx7V694la9yql4l/UPRbJ8DnyEDzbjlnN8o+Q84+ux2MmTF1 zxIA==; 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 ffacd0b85a97d-485885d1bc8si32138f8f.6.2026.09.04.00.55.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Sep 2026 00:55:51 -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 6847tRSD004124 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 4 Sep 2026 09:55:49 +0200 From: Aliaksei Karpovich To: isar-users@googlegroups.com Cc: Uladzimir Bely , Aliaksei Karpovich , Aliaksei Laurynovich Subject: [v10 03/12] meta: Always use base-apt repo in local mode Date: Fri, 4 Sep 2026 09:52:45 +0200 Message-ID: <20260904075515.25962-4-akarpovich@ilbers.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260904075515.25962-1-akarpovich@ilbers.de> References: <20260904075515.25962-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 Signed-off-by: Aliaksei Laurynovich --- meta/classes-recipe/bootstrap.bbclass | 6 ++++-- meta/classes-recipe/rootfs.bbclass | 3 ++- meta/classes-recipe/sbuild.bbclass | 3 ++- .../isar-mmdebstrap/isar-mmdebstrap.inc | 17 ++++++++++----- meta/recipes-devtools/base-apt/base-apt.bb | 21 ++++++++++++------- 5 files changed, 34 insertions(+), 16 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 8d394b05..99328b12 100644 --- a/meta/classes-recipe/rootfs.bbclass +++ b/meta/classes-recipe/rootfs.bbclass @@ -62,7 +62,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..4d61e9be 100644 --- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc +++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc @@ -153,16 +153,21 @@ 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" - if [ -z "${BASE_REPO_KEY}" ]; then + if [ -z "${BASE_REPO_KEY}" ] || \ + [ "${ISAR_PREFETCH_BASE_APT}" = "1" ]; then + line="[trusted=yes] ${line}" fi echo "deb ${line}" > "${WORKDIR}/sources.list.d/base-apt.list" line="copy://$base_apt_tmp/${BASE_DISTRO} ${BASE_DISTRO_CODENAME} main" - if [ -z "${BASE_REPO_KEY}" ]; then + if [ -z "${BASE_REPO_KEY}" ] || \ + [ "${ISAR_PREFETCH_BASE_APT}" = "1" ]; then + line="[trusted=yes] ${line}" fi echo "deb-src ${line}" >> "${WORKDIR}/sources.list.d/base-apt.list" @@ -183,9 +188,11 @@ 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 apt-get update -y \ + chroot \$1 mv /etc/apt/sources.list.d/0000base-apt.list \ + /etc/apt/sources.list.d/base-apt.list + flock -x ${REPO_BASE_DIR}/repo.lock -c \"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 ''} && \ + ${@'-o APT::Sandbox::User=root' if d.getVar('ISAR_CHROOT_MODE') == 'unshare' else ''} \" && \ chroot \$1 apt-get install -y dpkg && \ umount \$1/base-apt && \ umount \$1/$base_apt_tmp && \ 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():