From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 25 Jul 2024 17:10:24 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-ed1-f60.google.com (mail-ed1-f60.google.com [209.85.208.60]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 46PFANLr007123 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 25 Jul 2024 17:10:23 +0200 Received: by mail-ed1-f60.google.com with SMTP id 4fb4d7f45d1cf-5a745917ef7sf400381a12.2 for ; Thu, 25 Jul 2024 08:10:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1721920218; cv=pass; d=google.com; s=arc-20160816; b=TuioHW7/EXSuymJHuqbVuuoY0l+s/CaSArBtCXloi2y+ztkWU0MSlX83HS6O1qy7xb Z4Wn4GwIg7aH/md3DQ9bHVckoJl4FbmCUJ4aTTG5X8jTyyLV8PWhT/TRqCYmHm/WyyA7 DP7nov73em7lWyTdLwqeC7QaIqO09L8ssWZG7ZfFxN/XakoXjFp/o108TwY/hQZDElsR LSt6O1V7DGzQ2dmfVTajQQiLpFngXI11JFGRJfsBBInTKX4iLOziYnqCNfPypTO6KDPS eMg/FUrrcqLOwPApBAZSybI/5D8vG8M9dqKSdrhKp2+JqiAGQA3bdEt3y6o8WQ8N0NGx naNg== 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=0xvA1hW5Z9/ytIklwpf32WE8Ug1PqI+qp2j1envBGxs=; fh=TMi7IbIprQrcKxSi27n6XEa9t3fvCXt/xdcjYeFGNGk=; b=BY32zEOIo30M6Tmgeicx3/DZRZCnF2NQ56pI6XXNgzguaHR2D9N4ebzzliwFMl/JQH IFY8Wsog+iqy7OiQg4n4qaZYYWSzh838LRVBxsXEZbPZI1Gr7ZpjSWufDqDrgrl9w6bZ 14k4+bQMmqCmo1qBJMMc9CQm0E/MncAxXvqcwFRMItpDR3q82zpNOq6VdGvY87hps6h6 Ve2OH6hDmOfVUQP3HTxKixUeeAQBbhNZl12VBIQVEbCg2s7/Hi6d8E4A2YH41hr35kt0 OOyXsuDJU16N+lf0Dn7gZA1jj01GWoM/rgoIBlruMrgZz3O9bKtRcYZxR71FYW/jcttv i21A==; 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=1721920218; x=1722525018; 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=0xvA1hW5Z9/ytIklwpf32WE8Ug1PqI+qp2j1envBGxs=; b=YhyFZLMDdEodHpEglax8fgD5/O1vBAFMWIk3Ee0U39Ju1MRLoRJQeP1OjGHXUiZl6i 2KJHL2A1voUqU34aU6X6vNDMA1UEBlflNUMsoX/NKA9zour/GQ3nK0SP0aq3W2CV7K/I ZaRrmaDnE/CwQpb6LvspEwiakqVaSz5u3hr4S6IiNOMcDh5A77h6jF4cOyU1bk8gW1MF 8fmmZOBX+iB81nto6oVMOospREVArjrVP19v5t7c9Im/mGAbKmfy1tULnT7e2etJ2lrd o74B3mX3PyTHw9jkGwCHYCs1t2utjulzO7A98SycHiG1/0rUlOZqEc2oOMtWBjt87aVC cPTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721920218; x=1722525018; 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=0xvA1hW5Z9/ytIklwpf32WE8Ug1PqI+qp2j1envBGxs=; b=XwXqRgVcLw5oY4QtBX8seQ3nizj8JyQdhH8oyT2waCvqE7KKNO+iy91KbNXJM5LXBA 8TW34mBvQ6v4Lv4Y5+LuHUZi2CTiCsB6UL15tJHmU8JUdYeCg8PE5cRlMiyBPAn9rr35 L+0rA0ZSsDDkWRo2YhWIn2mlHJVb/1UtRn9Jw4ABmc2FcxitETl2FEG4K19hHbTgOXCI Xy1U17VvVrjugfR2YAKW+F3an6qbIYx7tJ5sT4D96doSQMSRBgdVWpM3FZZwAJqxNmSY xz8zHeEQs1D8KDafLCt72ABBHdxa96iuul4MReJXo++dtHEfXtWVNTFMFf9cbqRQ6UrY FZvw== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCXr9Ys8WUDW//xbJDrCksgmgnSgZIK8oKasqvRra6/uoKFPPLrEnSTyEQS/Dztz+dji4+0+hk5JsrYBLf6tZPKisBM= X-Gm-Message-State: AOJu0Yxf6m1aS2afY4Tm6TTwxqi+JKkWCwRlpW14HtOxiAeHwLr7p7Mf eTtWVHEEtzUF8sV3/clyGPhgB5uPfB9bYXtiIWafVyhLEUv8VL93 X-Google-Smtp-Source: AGHT+IGpEpMtcBwhybEtmJnaAgNi7Wr8D0TwHz3zXA4VpZbRFkkOmg7gPQW49BRtR+QKpbkr6r3SYg== X-Received: by 2002:a50:cc98:0:b0:58b:f46f:ae45 with SMTP id 4fb4d7f45d1cf-5ac6396b221mr2302523a12.23.1721920217610; Thu, 25 Jul 2024 08:10:17 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6402:f11:b0:57c:a472:931c with SMTP id 4fb4d7f45d1cf-5ac08d42d84ls220855a12.0.-pod-prod-05-eu; Thu, 25 Jul 2024 08:10:15 -0700 (PDT) X-Received: by 2002:a50:9519:0:b0:5a7:464a:abf with SMTP id 4fb4d7f45d1cf-5ac6396b2a5mr2384555a12.24.1721920215341; Thu, 25 Jul 2024 08:10:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721920215; cv=none; d=google.com; s=arc-20160816; b=SdTFjTsxEWemJyjaPoAoUhugpVADpNjfGWJWZblt+omIPPEMCj85DwvI9MymuubRtI NAOk6qWxhthhneg9mAhcnhjGE3lmkj2Zup9tZ9MyJ7d24ynsX+EDm52VGbpGNvL6kOHx VVdBDYA8vkeDoQvnhVidSZqChPngL0Q8L12VUiook2R6OnMatJUXK0aFSPhbXgfIoc+G CqQTrJy5U2JQTIIZS5KPZyXspYp9RIZuYTRKtO9Z4Ax+cP/idozm+ODc13mLdbc7Uzri DNBpT9WIe/gGjN6RDfHGTsAGHDybfeBjkvjClEMOtk/ZCcFTwBUeJyFXXaqPOCcLOKKC V25Q== 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=n60x1HTgMm/pWI8SeNW/SFcuiWorBb8UPgyLDUIkuAc=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=UZqXKgJ4TIB77119Pb4oGXeEcYhF5aQYIuiB5HPtkzqv7NSyBENgCBVT8EuY7sLYPo LQhlpyZn8ea1VPKwJgs8M7QjguKRXD+djWzBbQ66lbjdHZrZS6CRgR3MXDVEj1C5RAIC xpGDAIqvS/2NWD4NOLM+sHVbAweesGOrZMjiM0fhlnxLRYVGjndLo1Y7SwN9rdrzRo36 q8VK83xFNrPSpbC/RO/Rhf35T3PtH10S6IQqVZ9NQKKS9ftRCxVIVZuZ+bkAkC6O+4sd mj0LcfhvvBREkoepNJAbB4RmJCFzE3kNineNma/TwjBsPSgFM2+kSXgHCkKRhXFmNpyd aROw==; 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 4fb4d7f45d1cf-5ac60cf50bbsi44335a12.0.2024.07.25.08.10.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Jul 2024 08:10:15 -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 localhost.localdomain (44-208-124-178-static.mgts.by [178.124.208.44] (may be forged)) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 46PFACKZ007063 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 25 Jul 2024 17:10:14 +0200 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v7 03/10] meta: Always use base-apt repo in local mode Date: Thu, 25 Jul 2024 18:07:35 +0300 Message-ID: <20240725151006.2129-4-ubely@ilbers.de> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240725151006.2129-1-ubely@ilbers.de> References: <20240725151006.2129-1-ubely@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_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: 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 Content-Type: text/plain; charset="UTF-8" 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-TUID: tL55qV/arcmq 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 2e091e0c..7d0bc0c8 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -54,8 +54,9 @@ rootfs_do_mounts() { mount -o bind,private '${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 12f32ff0..9fd928ad 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -47,7 +47,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() @@ -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 @@ -299,7 +301,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)}" @@ -326,7 +329,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 2766bc71..09a4509c 100644 --- a/meta/recipes-devtools/base-apt/base-apt.bb +++ b/meta/recipes-devtools/base-apt/base-apt.bb @@ -56,9 +56,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}" \ @@ -66,14 +69,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(): -- 2.44.2 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20240725151006.2129-4-ubely%40ilbers.de.