From patchwork Fri Oct 2 07:01:07 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: akarpovich X-Patchwork-Id: 5515 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 02 Oct 2026 09:05:08 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f184.google.com (mail-lj1-f184.google.com [209.85.208.184]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 692756fa003873 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 2 Oct 2026 09:05:06 +0200 Received: by mail-lj1-f184.google.com with SMTP id 38308e7fff4ca-3a7fd50de8dsf6943861fa.1 for ; Fri, 02 Oct 2026 00:05:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1790924701; cv=pass; d=google.com; s=arc-20260327; b=PBWJoDo2an2LyV+1zEmiStMdxfbrU5ZeLa/bIPTRClYiGTSamlSYc+cIv7vEMGrvOA HTPioKhxBO4Y1OgqGYKbcjmT81aXGi0FCoK32/2CRLyRp6weYIn/swg3rRvtQHs4Z8GF jV7oJQc39qjIkpPXQgpvt/G5oK+YCuG8kmT2SY+C+G1hNwOUParQUUSJRT4SUtLAY6T+ hvGjrdRuHa/AUi1sp7LuhR5B8wV4cO24dqExxLwjFhTz64z18Wltb2xo+E2ufYP11EOS 49aoCYGQP7VEk7EcTs2/Q408PF4itiuKNkOLgguiwtpN/vKp9PT3tibnGIVNcWVg5vMp zkTg== 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=iwQf0aUDJla2BrBRF9q8VTbfCrkoHSujW9JZmx9X4/0=; fh=0KtSdw0s/0z2Hf1TAC/USyys1Qq3K0jbN2K+2i8x4kc=; b=LVXJFJaoXZGsjpZHRvVf85nTSpe1ntwYtNppXucM5EmRJiuKYTr3c7XwsD/inFF5fk 7ivbbMbC6Rc4zj2yrwt1ftdcm0OpYXHPldxsDViGJ7SeFvUSHzjT6Ki5M2Pwa0FJzXTU NAuwmZ4lsfWJcPGXEWi+NYps6lBnM+YqpYNa/XTmDJGqBv5kfRVFSnoch1X6R3e4By0w RHMmd1zOrzb1eHFLiWg+BG8ffjS7qYklLRUMMHgAXEMn+QcVkqNKDgqd23A8qMqnoUEW INbAvQM54FglFG8JL0CVvNFjIdIdV9UoNZ50gtEOxOOza7TbnMxlMVDzzN1YWg6Ux0GF df7Q==; 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=1790924701; x=1791529501; 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=iwQf0aUDJla2BrBRF9q8VTbfCrkoHSujW9JZmx9X4/0=; b=XJD1TC3TpM9hsESMRWixvBa9Y8VTPHieudk6m9kHYFNkSvYYa/y8NrJNOgGl6x4OLQ p2Jz12jyMliVkvvPGrVSPoOACPOPVXfCeDDmum5jTCQ2bshGCBUCvJxur73T1SLH4DhI z/NkjXAORyz6dMNRV5HyvACJitq1XVZyDGRR4S10dzV/uDL36agyoFBwnwgEHjzrxWT8 2fT9umgo/ugigJFKf1tLduXG0ULtZnhsmmSkSfS1nS/PmDY7cmyF+jxYPkOe9aDlo9W1 34JSb0BptuFsPzSkCOuj7qp1E9d3Y6UCf2fkUbTLNB1kytefxBvLwbKGe9J/9/JjxtVo bFeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790924701; x=1791529501; 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=iwQf0aUDJla2BrBRF9q8VTbfCrkoHSujW9JZmx9X4/0=; b=0xWp1ABlak80UQxGW3w7/p1us5wHPzb64cy1b4KhFaTOgFjAzi/5StWhD6vQ5oMO60 6n40VVZjzCRZdOBIpURJui70No4nAZ2GvK0bcZTuWmUSEnIfu8RBRvt3TOW8S0ppG5GX zFPVLIdGOQtoA3vzETsoOrIdAIxbDeXxJ7I6cauls/3Ipb0mFIMJh2HE7L46ooL8WnYn uxtFY1Np07Uj+PTtd+mUDp/1Pqx3sG7faf/+fPYGv0mXcuORLdqhFVIlkOeBcBxqTZ6o wloKH/wQYRMo/MKO/ycCNGcQZmuyVrrifmDqdo3se7/YbsCpzYjS+fLtR/zAKIsp/AOs Gwpw== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AKwUvBxRDzR8kuQow/DGG2u+e16B3iBGOSjAomQnfzey3r8zfUSBMRVOuQs4sfJLxFHExB26SUTQGlc=@isar-build.org X-Gm-Message-State: AFq9FYJ2CMZfxf22U9T5P59LHmqLUnJ0aBeqClFOjXXewrX63rIlWF60 MmkzZGAfJSdXF4AkFL/uOnvLsrpMDg7pB0BMrmdcB3raeCXpudl6LWhi X-Received: by 2002:a05:651c:2121:b0:3a8:7b84:be9b with SMTP id 38308e7fff4ca-3a8877b73a8mr4024701fa.5.1790924700642; Fri, 02 Oct 2026 00:05:00 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="ATskLdcwpLNaLWm1BOA+fxG/DJ7SHIrBSdIPpJRhv4SlY/MyUA==" Received: by 2002:a05:651c:2343:20b0:3a2:c29b:9103 with SMTP id 38308e7fff4ca-3a8a8659059ls614541fa.1.-pod-prod-01-eu; Fri, 02 Oct 2026 00:04:58 -0700 (PDT) X-Received: by 2002:a2e:a58d:0:b0:3a9:6ebd:5ad3 with SMTP id 38308e7fff4ca-3a96ebd5d9dmr990801fa.6.1790924698158; Fri, 02 Oct 2026 00:04:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1790924698; cv=none; d=google.com; s=arc-20260327; b=UAz/JFYZ6+SWexMN0FUHT26OUIyLCAxZaunP46nk3x1Y1IKRg6OLvjEs7BkA4z7XEw w/ynUybx+5XaNaMunGnd1sT1sLbmrfZ1bbNBz2guoN1WiibJzL9yk1AdJP0oG7nDOf1C PP+HOGkDhdD2SvyHvv5yk8VIUk1DewPBlyiJlpM2W45LxUkP+BXL4SHHl5+Kir2nxipd cNd+td7RnB9bw6c9yzP7j3cUc1qquZW7Pjjtslo2J1HbYRhCwPeZtv2qlizy0nM+81fF 7P6XkwlZ93Os2MmaBBgrIlK8k8m+2Z1LGmH8u5ASCDt/ngEEkQ6iJWklqBCtnmHBybwm ehvw== 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=q8x5tKfd44tXVgXzz/BPxTximXki/DZXYrr5OBDTACA=; fh=IIbR0JxonYgzdrHDdB9TmZniSh/o1z0HofhfbmLXp8s=; b=UhCHmZB+FGl/yXSa5eyRGdoAdJ5UCDBn0Tucp3bx9VwjhazMgVd2nx4cWCDeVUkC+o Zcw4mhhlWMSLOdbzxlyXzxnk9GGU9Hjd3Yhl1kF+5ENWCoOrZ+q7iYlXpG/33oxcEqkI HhJgHBP80Cw6spgghd5CMo5uHnUW4bFUczUBXq8x8vU1utbPeV3IgOYSkzp1HcTBt/CJ RBwp5qXCNWP12q18wwZTJCmtKHoy4YTqOR/3LjtD1VXLyPbe94fD2eek+sYrQEhTG+5o zTTvWESLArjXc8Latvzfkx6CerxsX4KF0FjZzlaRZMBvcnkrOy2KsJFh1mIGbzl31E00 aFqg==; 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 38308e7fff4ca-3a87e348be0si309551fa.9.2026.10.02.00.04.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Oct 2026 00:04:58 -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 laptop-0xxx (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 69274a1j003799 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 2 Oct 2026 09:04:56 +0200 From: akarpovich To: isar-users@googlegroups.com Cc: Uladzimir Bely , Aliaksei Karpovich Subject: [v11 04/12] meta: Use cached base-apt repo to bootstrap Date: Fri, 2 Oct 2026 09:01:07 +0200 Message-ID: <20261002070335.26526-5-akarpovich@ilbers.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261002070335.26526-1-akarpovich@ilbers.de> References: <20261002070335.26526-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 9423ee72..01ec56e7 100644 --- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc +++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc @@ -151,6 +151,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/"