From patchwork Thu Aug 20 13:29:19 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aliaksei Karpovich X-Patchwork-Id: 5391 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 20 Aug 2026 15:42:06 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f185.google.com (mail-lj1-f185.google.com [209.85.208.185]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 67KDg4HZ013718 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 20 Aug 2026 15:42:05 +0200 Received: by mail-lj1-f185.google.com with SMTP id 38308e7fff4ca-39c6d2d3930sf754311fa.2 for ; Thu, 20 Aug 2026 06:42:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1787233319; cv=pass; d=google.com; s=arc-20260327; b=gHEWnPPqbJSwlfcxh0NN3LHzf5h7IM86hWtUAtnaHsRIr9fQoZB/qq1/qy/taC9pj2 eP6ofDdAbNZ62DmNzysjou74Kp37QFssP+rVe96/2BGc9hKo9CXm9okNbvVuKkmklzH6 4sgE8XqkSWWaVQOtdl7gH36JYKvMgQtBpwUQG3VU5evOvCKBDfVz7aD+NBDdl0JR5XNO EnLczcZi6gdabsDUAat1ogRBHYHNZoksB6qiCX/KplfdFIXmQZ+HRWONOdl8Rdka5hoI eoyei2jFFND8ygXkD7CQXRGMY2q8RUwzGYdIzVp4H74V7qypdGCBcmGN2e7/fSTg7mHs cAMw== 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=+G+QoYq7ba7tWY47v5XooyHI/syF2V+0pi89A6IyMcc=; fh=HlrPHeUEUjKZSmTw7P/K89ao/1yLhsusSNhAXfQ0uV4=; b=qF6YjYMocqvVivPNfwhGyO/UewQRSjerJ3JzSOOP76EZWawaSnUbVwnMI0SdVodRmD cKLc5GqY2d5npdXEBDfMAG2gwFybcwFYRsgs6Ir3e5OXfykOJqgmItjPUwBsBdTSyyr7 A9F8+MKGzgpQVusocurRsqemg2nKlD/5hmyHTyzOGM+svCqaO6CEIb4Gxb5RcnF47Pbr Qu73G3rALTY7ezeAtOcgFPk74NnWnmRqfXw/jMvIa970cMg+ydFmse9zlxUPt0ABkFPt nz0j4UAYwN8wl146jgNyDQRzimv+3Pk3/NuIHS67tHgs/JzTM7ni72ptK07N2G5M6FyV NFvQ==; 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=1787233319; x=1787838119; 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=+G+QoYq7ba7tWY47v5XooyHI/syF2V+0pi89A6IyMcc=; b=PXwQfytFjsNaz38c3kZajR0OjMey2LZbm+TQI6NyXFyE52nMytUyQMq8n8S6s7HCO0 VbRA7TJ4gz4h0wqhRv7eLX+0RMzVKofVdOZIzHDNy78b9EOiXc5flAAEqsemB0Ifn73m +DMgDY9TyUqlQskjqRlSm9b3n/SFTo6/M8686QTlHDa0pkDJ3rq/bMH30a0eBCM1hmh/ qqC+nxrQDDQnJE7J21dI61hFgrb5l7yzoZd9N6RFkenivA51QiXgssFv2OObJJ9A36IN RroLqmfjz0lNtgZeENxjMbHD84kFD9c8s9M14XYBjVpo4ir7snEDTKBOW66eKN9kbgbU nYIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787233319; x=1787838119; 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=+G+QoYq7ba7tWY47v5XooyHI/syF2V+0pi89A6IyMcc=; b=jRdsx8cgET8qyQQ6pjppaKKCO4cktQCV7MwsD3rR9oZ00X6i6fRnGZCgLgUlBrjaDg FSo9P87SIrDEDriSW+2yb4T/+x9o/cA2Qo1CThz8mJeSCDxs+lMIV2h+k+lxhA3kpTtA IT593xQ0A7Q7FQJK4u4m+7ghULRRWRha40hp0pf2pLwul8MXEutj9A4crDQ9lqRg8WhI G4qddKYMOXpBN9UzvZPFMs5mgO1wuM+kNiFRSnyhEMP39dJ2ej1+242pHJQzI/aCuKWj +aUt2g5l4blWjvw3+bvY9F3kwR7YeyBWZWIvkhqVspceR9X8RO6ZZHjAgCoMFCEI0FFI 8+eg== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AHgh+Ro6e7IBeIXp+cqdMlJ/Awc3FrNlEnWIGvcMvwSPRL6BZHfxuhL3RuaxYEG6F+jT7j7siztYVj0=@isar-build.org X-Gm-Message-State: AOJu0YywjXxlrjzgdGnUnWGd37i1KtjkLxBaVj09IzxiarnK7WKWmOsv /oyMMmkhRr8uVM6gNUhq7lZVt1R3qIUJKbX+yrUl5NJXBOJZod4kirMm X-Received: by 2002:ac2:51c6:0:b0:5b1:5e89:30f6 with SMTP id 2adb3069b0e04-5b478bcb669mr2267310e87.3.1787233317755; Thu, 20 Aug 2026 06:41:57 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="ATskLddzaO97rLVGv+7KTPhJnBRlG1kyp3+QzypKvvu4N/H5UQ==" Received: by 2002:a05:6512:1543:10b0:5b4:583f:9f16 with SMTP id 2adb3069b0e04-5b47d51c1acls260833e87.0.-pod-prod-08-eu; Thu, 20 Aug 2026 06:41:55 -0700 (PDT) X-Received: by 2002:a05:6512:3093:b0:5ae:befc:97a7 with SMTP id 2adb3069b0e04-5b478cfdcd6mr4197557e87.13.1787233315260; Thu, 20 Aug 2026 06:41:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1787233315; cv=none; d=google.com; s=arc-20260327; b=RsofreuedphDg2bJW2kCV6S9vR/0SdhodGjDyeO3HI8EofkWt6J+GPiQxOftUGQ5f4 J4K+oa0ogB5vTWPu9HTI5iqWpaHWZW3+n7MbqFQdLGcOT6RQr/fH79z9BqtrRZnr5RrV YNlKNOEEhXQnmogPYblSD4jbOex5+bEBxOEqKO5x3f90eM2lBeaTQ2OQleNb25OV1O5E +6tMwRsm1sos4B9qgQ59N1ZqQQ4J1HtC9BjfxYnw2WL8hNSby4BAlN6q8zIZwkILqlcb 9izD6SOZECJUjrXLLArbWRuXGbfTeqsN0en1HDOaqj1mcfGvA0kGbmpbUFPErtyFD9eX f5oQ== 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=c7tUl8Ha9JUC7r7/gBbyym43wDKTBFWPjeZIpPemO9E=; fh=IIbR0JxonYgzdrHDdB9TmZniSh/o1z0HofhfbmLXp8s=; b=IHtF0mktTmLm6gpBMBVYZp+AmCSXHr9Puy7k+MaGzBQry/8kuKVp07MyapQ2wLstG9 G7YNm7hZfmHUIyr7lN6QBTlxI4upA/PNJc/cKQBH5TurRy8UZZycMwEVgcGn3EsRDUwZ ULibUUSpjtAtdWWZzIo6f+6Qpsq3/bXI5g4lPcVuEgP8V56c7DYtv/Mxqz+1I2UI9CXM xMCxjmYMnahhklXRKLutwgsdsApJlVr3whqlCeIHZsVbiDW67A2VzrYsJ9dHvfqrYFq4 5L7q2Bkmfs2EYea5aTKbWEGueMxranLJ2QHDtt41OrJ+gAjFz/+jc7pjMsdpih85Zj3T O2bA==; 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-5b47881f116si108241e87.0.2026.08.20.06.41.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Aug 2026 06:41:55 -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 67KDf8lR013513 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Aug 2026 15:41:53 +0200 From: Aliaksei Karpovich To: isar-users@googlegroups.com Cc: Uladzimir Bely , Aliaksei Karpovich Subject: [v9 04/13] meta: Use cached base-apt repo to bootstrap Date: Thu, 20 Aug 2026 15:29:19 +0200 Message-ID: <20260820133934.383231-5-akarpovich@ilbers.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260820133934.383231-1-akarpovich@ilbers.de> References: <20260820133934.383231-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 patch makes local base-apt repo to be created before bootstrap task. So, bootstrap is then done from it. The required packages are downloaded via python-apt and reprepro creates debian-like repository from .deb files. For debian targets host keyring is used while ubuntu/raspbian targets use keys specified by DISTRO_BOOTSTRAP_KEYS variable. The goal is have workable base-apt repo before first build completed. Signed-off-by: Uladzimir Bely Signed-off-by: Aliaksei Karpovich --- meta/classes-recipe/bootstrap.bbclass | 44 +++++++++++++++++++ .../isar-mmdebstrap/isar-mmdebstrap-host.bb | 2 + .../isar-mmdebstrap/isar-mmdebstrap.inc | 2 + 3 files changed, 48 insertions(+) diff --git a/meta/classes-recipe/bootstrap.bbclass b/meta/classes-recipe/bootstrap.bbclass index f853a932..10cb23be 100644 --- a/meta/classes-recipe/bootstrap.bbclass +++ b/meta/classes-recipe/bootstrap.bbclass @@ -16,6 +16,7 @@ BOOTSTRAP_FOR_HOST ?= "0" APTPREFS = "${WORKDIR}/apt-preferences" APTSRCS = "${WORKDIR}/apt-sources" +APTSRCS_INIT = "${WORKDIR}/apt-sources-init" DISTRO_BOOTSTRAP_KEYFILES = "" THIRD_PARTY_APT_KEYFILES = "" DISTRO_BOOTSTRAP_KEYS ?= "" @@ -223,8 +224,51 @@ python do_apt_config_prepare() { aggregate_files(d, apt_preferences_list, apt_preferences_out) apt_sources_out = d.getVar("APTSRCS") + apt_sources_init_out = d.getVar("APTSRCS_INIT") apt_sources_list = get_aptsources_list(d) + aggregate_files(d, apt_sources_list, apt_sources_init_out) aggregate_aptsources_list(d, apt_sources_list, apt_sources_out) } addtask apt_config_prepare before do_bootstrap after do_unpack + +inherit debrepo + +debrepo_bootstrap_prepare() { + [ "${ISAR_PREFETCH_BASE_APT}" != "1" ] && return + [ "${ISAR_USE_CACHED_BASE_REPO}" = "1" ] && return + + debrepo_args="" + if [ "${BASE_DISTRO}" != "debian" ]; then + if [ "${BASE_DISTRO}" != "raspbian" ] && [ "${BASE_DISTRO}" != "raspios" ] || [ "${BOOTSTRAP_FOR_HOST}" = "0" ]; then + debrepo_args="$debrepo_args --keydir=${WORKDIR}" + fi + else + if [ "${BASE_DISTRO_CODENAME}" = "sid" ]; then + debrepo_args="$debrepo_args --keydir=${WORKDIR}" + fi + fi + if [ "${ISAR_ENABLE_COMPAT_ARCH}" = "1" ]; then + debrepo_args="$debrepo_args --compatarch=${COMPAT_DISTRO_ARCH}" + fi + + if [ "${BOOTSTRAP_FOR_HOST}" = "1" ]; then + debrepo_args="$debrepo_args --crossarch=${DISTRO_ARCH}" + fi + + if [ -n "${GNUPGHOME}" ]; then + export GNUPGHOME="${GNUPGHOME}" + fi + + ${SCRIPTSDIR}/deb-repo --init \ + --workdir="${DEBREPO_WORKDIR}" \ + --aptsrcsfile="${APTSRCS_INIT}" \ + --repodir="${REPO_BASE_DIR}" \ + --repodbdir="${REPO_BASE_DB_DIR}" \ + --mirror="${@get_distro_source(d)}" \ + --arch="${BOOTSTRAP_DISTRO_ARCH}" \ + --distro="${BOOTSTRAP_BASE_DISTRO}" \ + --codename="${BASE_DISTRO_CODENAME}" \ + ${debrepo_args} \ + ${DISTRO_BOOTSTRAP_BASE_PACKAGES} +} diff --git a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap-host.bb b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap-host.bb index fa4b76a6..52563d33 100644 --- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap-host.bb +++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap-host.bb @@ -17,3 +17,5 @@ require isar-mmdebstrap.inc HOST_DISTRO_BOOTSTRAP_KEYS ?= "" DISTRO_BOOTSTRAP_KEYS = "${HOST_DISTRO_BOOTSTRAP_KEYS}" + +DEBREPO_WORKDIR = "${DEBREPO_HOST_DIR}" diff --git a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc index 4d61e9be..c452035f 100644 --- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc +++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc @@ -147,6 +147,8 @@ do_bootstrap() { fi fi bootstrap_args="--verbose --variant=minbase --include=${@','.join(d.getVar('DISTRO_BOOTSTRAP_BASE_PACKAGES').split())}" + debrepo_bootstrap_prepare + if [ -f "${DISTRO_BOOTSTRAP_KEYRING}" ]; then bootstrap_args="$bootstrap_args --keyring=${DISTRO_BOOTSTRAP_KEYRING}" cp "${DISTRO_BOOTSTRAP_KEYRING}" "${WORKDIR}/trusted.gpg.d/"