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; Tue, 11 Nov 2025 16:29:07 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-lf1-f59.google.com (mail-lf1-f59.google.com [209.85.167.59]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 5ABFT5oQ025784 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 11 Nov 2025 16:29:05 +0100 Received: by mail-lf1-f59.google.com with SMTP id 2adb3069b0e04-594259bf71asf3354562e87.3 for ; Tue, 11 Nov 2025 07:29:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1762874940; cv=pass; d=google.com; s=arc-20240605; b=NDVq7n2oADmYttYK/28hgqTiJc2XydhTXZvd5GpdmZ6KwMdcpxhTps/LC4k72sY4X9 BXwQ77KFLsSFaOpUfC7DjRtyQ8yFbIpJMOfAjuv8cJkmRZiozFKgUR84Cwu8OEcCfc57 mn0cMIyxswFQ5irO58Ma+GrHyCv6VlOaFI7D+QEyWat8ZJPEwlEO3rAG0aBJH1aRDdxi f2vTigNStAZBm6rMuaN+VQUmWX9PIGTW7dpqGGwELva7cBYAkGmOojVsZ6SEJKXcR5nm KRRbz0jkgDYnwgdDOicSUjeb8PtbSshYuzIleuStkJcNvQEVoPSMQfn6y5zKuGz48ZJv v5OQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=DwxbBe6dNIxG4nBmKti+xZJ3ZYlkerRvtBAnwO9rF/A=; fh=LTtp9mF38/XOEw7pOgqXg+NAM0CYa3TBHyT4dLmC3Ho=; b=OJrFahWUiopKZu1hSPEgfPPGZgZuWEq1VDcxgq92iGBDhPCwTJn1V9U3EgJebOhDrF FbbNCPJ+CREqkF0fEBpGzTocvbMKgSP/p4VTKiLrbgT3urv15acF4jc5Z9+RzG2wU25m 92jkxmPZh2OXAL2i2fz7h1Ose4sTfFNPxIswrBh8XluIt86yQ//bszV102OVrc9EnI7A P8QilebgAQStldP3xh/obRmFw/gcDKBQGB5zJiy3egKF4oVxjlEaCfscw9n6hG/geUQp AKefZt+Y79osIEzNtCWyeYK1tpwtkeDDLywe9QDJGABMW9wgYhfiiWNSSRDjnEaSJ3WU ZZUw==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=U+KmMY9f; spf=pass (google.com: domain of fm-1047747-20251111152855ab8678d601000207c5-__bnyo@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-1047747-20251111152855ab8678d601000207c5-__BnYo@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1762874940; x=1763479740; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=DwxbBe6dNIxG4nBmKti+xZJ3ZYlkerRvtBAnwO9rF/A=; b=TjZ5wJvwXhvT+Yl3tg7gkTpFQn1mSSqOUOc0ly2FnciC7myjbEeu6ezKKz/gEyXyik M5tuUQCfX5mhW7OXYACypPYhFR5ZYL9tZz5+ilMoS95KTnANGlr+wTMlhV6/SgRk75vZ l+XBSSyixL3Iif4u0G7yEO938CkjublJ1xMNW91I4AStyQIJzbU5ng7a0J3HYYbQCPj0 cqeTOJDw1oX8nhfX+JZOQrPZfgJAqPxCYf9O43sEgfupEDUm4Aim26cRgbsVxJs+ymMm jsubrdFpjcfQaDk/kpr3JKgt7oVQcn54qDwUTDKk1BNOOL+Il7zpVMEeak/BYyuHWEM5 MGeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762874940; x=1763479740; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:cc:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DwxbBe6dNIxG4nBmKti+xZJ3ZYlkerRvtBAnwO9rF/A=; b=RbdeUPMQ0aUHKzVPObLjoPx9f63UxwQMpVvYOtBOlbsQ+P2aQ47cSV60ymjxjDEAzu vmrn+bTWYzX3A5N4kMG2dY+hfzA+bl4LnPjmncSw/d1WF1uXdU8cEessrZeX1x5k/tKS 4Lm+cI15UjbsIWJtK+OsD25HunYgDAt3WLgXmtByvXJqxpUitw/EUbZAMtB5hnqOMOd+ Ya5RyaVqCrCnTFpsJaG2M9ILbjJ0pwelICiT/eo53S4+f0f0XT5513tDxVNyjWuoyN9y kW4tH1Gm4TpU8jy4eQbz3wvFz9NTx2n7nToDgQUBV7R1wzAkK7HpO8MbOT9/GR8wawaG yyGQ== X-Forwarded-Encrypted: i=2; AJvYcCWTrzZACisVDrvv9qM2ccxIiURaC6os+w0+63hAlyhD+K0YbBtZJKSKG1CnqZH7+XYJQ00q@ilbers.de X-Gm-Message-State: AOJu0YzIyhkg2pywwRDHJICHVq0gsPIYMOZiBvQ0ZOZst1zJhXKkL7cb 0hNUH25w45MbH4BeVX9BL67Yv9i4MWXSjBusUetu/VqywA+YL657pm/z X-Google-Smtp-Source: AGHT+IH9XMhIg0/JPhWJVIyF2cxE/nGnE9IXrjq8zVHFnJyX1QJFlzNRX7eILNRiuCku7DQCIKOpfg== X-Received: by 2002:a05:6512:3d1b:b0:592:fce6:9054 with SMTP id 2adb3069b0e04-5945f206728mr4314065e87.52.1762874939208; Tue, 11 Nov 2025 07:28:59 -0800 (PST) X-BeenThere: isar-users@googlegroups.com; h="Ae8XA+aaa8J94f9gzsNC29hNEfK5Z8xRlAStzRO3+vBfmySAWQ==" Received: by 2002:a05:651c:20d5:b0:37a:5753:74a5 with SMTP id 38308e7fff4ca-37a5de0070fls8075071fa.0.-pod-prod-03-eu; Tue, 11 Nov 2025 07:28:56 -0800 (PST) X-Received: by 2002:a05:651c:2158:b0:36b:2bde:a016 with SMTP id 38308e7fff4ca-37a7b1b9e4bmr25002851fa.2.1762874935990; Tue, 11 Nov 2025 07:28:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1762874935; cv=none; d=google.com; s=arc-20240605; b=f7LY58llx4UxzUqOfuPms7G1gWlU+Y36use374RZUUXx8qrSzG5s89E3WtUk+Hmqui MkTotutt4T7XKyjXRPSEDhymAVrqV39E5wxrbWhGgCO4RKAbbwV5+aMk732DeXcD1SmE 5gWoxB8pQa//KH5lHAL7jhhgUyVOEpa0aZYtY6A8/Xm/7c3S5ubF8kuMXXCqUvx/4tDR HesVzp3VGL38KyXi3X87ttyb3XlU/nmHz6bOiiCQHbcNwNtT7yoY8hyBl8nRr9y+lKfc lTbuGzkh/JTLHxz9OZI2qUsK4IjJj7AL2H0bqL4sDo9WGppZvP1ycyZkm8s8aoLe45ft HvUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:message-id:date :subject:cc:to:from:dkim-signature; bh=LmQP/P/UhSeQJopjZLXF8cBX/aOEgXh+xXgBFnTx4hw=; fh=nuVAnAKFXZ/c71OwrdWzSuwNyXL8JbkZbL1MQ1Fe+gs=; b=MwA4OkrBi6A5gCQz8azn40Vt9QXTJjUyUU2CEUIxYAvZbCUFHd3ztluQYMXqqA7Fdn Nem1fWdwPCmRdqvry/tWmdy4eAm8SKXlSq6BTNP0T+VFJrYFHq66lqtsC4b8yclx8Tuh Ds0kOnp9hKVk9QW9pIsPc8x+lTgplymyw7n6fngegmlVz6E5KV1Whw5uq5AGp0ArEL62 r9MXhA3pXTAtHblLf2RF7JuHAWxbpgePMjakJHun+oPJpDbEqlxDJ1lLqRiwBkRgw+V/ BmSnBkG3WnuOBzOcNiO6/FNTJSDhsXpGGlgXnWVbzavffJuf/vKBw1byUZanRahEHMkP mnKg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=U+KmMY9f; spf=pass (google.com: domain of fm-1047747-20251111152855ab8678d601000207c5-__bnyo@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-1047747-20251111152855ab8678d601000207c5-__BnYo@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-225.siemens.flowmailer.net (mta-65-225.siemens.flowmailer.net. [185.136.65.225]) by gmr-mx.google.com with ESMTPS id 38308e7fff4ca-37a5f09829csi2150661fa.2.2025.11.11.07.28.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Nov 2025 07:28:55 -0800 (PST) Received-SPF: pass (google.com: domain of fm-1047747-20251111152855ab8678d601000207c5-__bnyo@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) client-ip=185.136.65.225; Received: by mta-65-225.siemens.flowmailer.net with ESMTPSA id 20251111152855ab8678d601000207c5 for ; Tue, 11 Nov 2025 16:28:55 +0100 From: "'Clara Kowalsky' via isar-users" To: isar-users@googlegroups.com Cc: jan.kiszka@siemens.com, Clara Kowalsky Subject: [PATCH] bootstrap: remove isar-bootstrap support Date: Tue, 11 Nov 2025 16:28:44 +0100 Message-ID: <20251111152844.572788-1-clara.kowalsky@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1047747:519-21489:flowmailer X-Original-Sender: clara.kowalsky@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=U+KmMY9f; spf=pass (google.com: domain of fm-1047747-20251111152855ab8678d601000207c5-__bnyo@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-1047747-20251111152855ab8678d601000207c5-__BnYo@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Clara Kowalsky Reply-To: Clara Kowalsky 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-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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-TUID: a3sU+1vNahq5 The minimal base system for the initial schroot rootfs at build is generated by default by isar-mmdebstrap. The old-school alternative isar-bootstrap is outdated, untested by the isar testsuite and is therefore removed. The preferred provider of bootstrap-[host,target] can still be overwritten. Signed-off-by: Clara Kowalsky --- RECIPE-API-CHANGELOG.md | 8 + doc/technical_overview.md | 18 +- doc/user_manual.md | 11 +- kas/image/Kconfig | 2 +- meta-isar/conf/distro/ubuntu-common.inc | 3 - meta-isar/conf/local.conf.sample | 4 - meta/classes/image.bbclass | 8 - meta/conf/bitbake.conf | 1 - .../isar-bootstrap/isar-bootstrap-host.bb | 19 -- .../isar-bootstrap/isar-bootstrap-target.bb | 14 - .../isar-bootstrap/isar-bootstrap.inc | 242 ------------------ .../files/chroot-setup.sh | 0 .../files/locale | 0 .../isar-mmdebstrap/isar-mmdebstrap.inc | 2 - 14 files changed, 19 insertions(+), 313 deletions(-) delete mode 100644 meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb delete mode 100644 meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb delete mode 100644 meta/recipes-core/isar-bootstrap/isar-bootstrap.inc rename meta/recipes-core/{isar-bootstrap => isar-mmdebstrap}/files/chroot-setup.sh (100%) rename meta/recipes-core/{isar-bootstrap => isar-mmdebstrap}/files/locale (100%) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index fb177d4e..5237c3a0 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -838,3 +838,11 @@ instead of ``` ROOTFS_FEATURE += "no-generate-initrd" ``` + +### Remove isar-bootstrap support + +The default bootstrap procedure is performed with isar-mmdebstrap. +The alternative with isar-bootstrap is outdated and untested. It is therefore +removed. +A custom implementation still can be selected by setting +PREFERRED_PROVIDER_bootstrap-{host,target} in local.conf. diff --git a/doc/technical_overview.md b/doc/technical_overview.md index 7d045955..2b01021a 100644 --- a/doc/technical_overview.md +++ b/doc/technical_overview.md @@ -68,7 +68,7 @@ Also called sbuild chroot rootfs, because of the usage by sbuild tool. One of the key aspect of Debian philosophy claims the fact, that everything in Debian should be built within Debian environment. To follow this rule, Isar introduces the new component - schroot rootfs. Schroot rootfs is typical Debian -filesystem that is created using standard Debian tools: debootstrap/mmdebstrap, apt-get. +filesystem that is created using standard Debian tools: mmdebstrap, apt-get. The source of packages can be either official Debian repositories or custom repositories created by user. It could be one of the following type: @@ -80,8 +80,7 @@ repositories created by user. It could be one of the following type: Schroot rootfs lifecycle can be described as following: - Schroot rootfs starts out with a minimal base system that was generated by - the isar-bootstrap-{host,target}/isar-mmdebstrap-{host,target} recipe that uses - debootstrap/mmdebstrap respectively and apt-get. + the isar-mmdebstrap-{host,target} recipe that uses mmdebstrap and apt-get. - Common development packages needed for packages building are installed on top of this rootfs. @@ -95,7 +94,7 @@ architecture. Target filesystem lifecycle can be described as following: - Target filesystem starts, like the schroot rootfs, with the same minimal - base system generated by the isar-bootstrap recipe. + base system generated by the isar-mmdebstrap recipe. - According to the list of custom packages in bitbake recipes, the initial filesystem will be populated by successfully built packages from locally @@ -107,7 +106,7 @@ Target filesystem lifecycle can be described as following: Whole Isar build process can be split into the following steps: - - Generation of a minimal base system by isar-bootstrap/isar-mmdebstrap using debootstrap/mmdebstrap and + - Generation of a minimal base system by isar-mmdebstrap using mmdebstrap and apt for each configuration requested by the user (Debian distro, machine and architecture). @@ -125,27 +124,26 @@ All these steps are described in details below. ## 3.2 Minimal base system -A minimal base system is generated by the isar-bootstrap/isar-mmdebstrap recipe found here: -`meta/recipes-core/isar-bootstrap/isar-bootstrap-[host,target].bb` / +A minimal base system is generated by the isar-mmdebstrap recipe found here: `meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap-[host,target].bb` This recipe implements a few tasks that are executed in this order: 1. `do_generate_keyring`: Generates a new gpg keyring from the gpg keys specified in the `APTKEYFILES` variable. This keyring is later used by - debootstrap/mmdebstrap and apt to verify the apt repositories. + mmdebstrap and apt to verify the apt repositories. 2. `do_apt_config_prepare`: Generates aggregated apt preferences and source files based on the `DISTRO_APT_PREFERENCES` and `DISTRO_APT_SOURCES` variables. That are later deployed to the minimal base system to be used by `apt` itself. -3. `do_bootstrap`: Bootstraps a minimal debian base system using debootstrap/mmdebstrap. +3. `do_bootstrap`: Bootstraps a minimal debian base system using mmdebstrap. ## 3.3 Initial Schroot Rootfs Generation As mentioned above, initial schroot rootfs is generated using the minimal base -system generated by isar-bootstrap. The bitbake recipe which is responsible for +system generated by isar-mmdebstrap. The bitbake recipe which is responsible for schroot rootfs can be found here: `meta/recipes-devtools/sbuild-chroot/sbuild-chroot-{host,target}.bb` diff --git a/doc/user_manual.md b/doc/user_manual.md index ecb1fb2c..09b29477 100644 --- a/doc/user_manual.md +++ b/doc/user_manual.md @@ -66,8 +66,7 @@ The steps below describe how to build the images provided by default. ### Install Host Tools -The supported host system is >= buster for debootstrap and >= bullseye for -default mmdebstrap provider. +The supported host system is >= bullseye for default mmdebstrap provider. Building `debian-trixie` requires host system >= bookworm. @@ -97,12 +96,6 @@ apt install \ zstd ``` -If using isar-bootstrap provider, debootstrap should be installed instead of -mmdebstrap: -``` -apt install debootstrap -``` - If your host is bullseye or bookworm, also install the following package. ``` apt install python3-distutils @@ -1245,7 +1238,7 @@ The debug artifacts will be placed in `${CCACHE_DIR}/debug`. Isar supports caching of bitbake task artifacts using the sstate-cache feature known from OpenEmbedded. Isar caches - * the Debian bootstrap (`isar-bootstrap` recipe) + * the Debian bootstrap (`isar-mmdebstrap` recipe) * Debian packages (built with the `dpkg` or `dpkg-raw` classes) * root file systems (schroot and image rootfs) diff --git a/kas/image/Kconfig b/kas/image/Kconfig index 1e757ae4..9e8d8099 100644 --- a/kas/image/Kconfig +++ b/kas/image/Kconfig @@ -14,7 +14,7 @@ config IMAGE_BASE bool "Base image" help This is the basic Isar image with bare minimum of preinstalled packages. - It's technically close do the debootstrapped system with packages + It's technically close do the mmdebstrapped system with packages required to boot up the system. config IMAGE_DEBUG diff --git a/meta-isar/conf/distro/ubuntu-common.inc b/meta-isar/conf/distro/ubuntu-common.inc index f1e8a1d6..dbfeed4a 100644 --- a/meta-isar/conf/distro/ubuntu-common.inc +++ b/meta-isar/conf/distro/ubuntu-common.inc @@ -23,9 +23,6 @@ DISTRO_BOOTSTRAP_BASE_PACKAGES:append:jammy = " usrmerge" # kernel package name is linux-image-generic in Ubuntu KERNEL_NAME = "generic" -# that is what debootstrap_1.0.118ubuntu1 does anyways -DISTRO_DEBOOTSTRAP_SCRIPT = "/usr/share/debootstrap/scripts/gutsy" - DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh" DISTRO_KERNELS ?= " \ diff --git a/meta-isar/conf/local.conf.sample b/meta-isar/conf/local.conf.sample index 8f5efd42..53ae8de6 100644 --- a/meta-isar/conf/local.conf.sample +++ b/meta-isar/conf/local.conf.sample @@ -231,7 +231,3 @@ USER_isar[flags] += "clear-text-password" # To know more details about this variable and how to set the value refer below # https://reproducible-builds.org/docs/source-date-epoch/ #SOURCE_DATE_EPOCH = - -# Uncomment this to use old isar-bootstrap provider for rootfs prepare -#PREFERRED_PROVIDER_bootstrap-host ?= "isar-bootstrap-host" -#PREFERRED_PROVIDER_bootstrap-target ?= "isar-bootstrap-target" diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 2438059b..9aa59d77 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -419,14 +419,6 @@ do_rootfs_finalize() { -maxdepth 1 -name 'qemu-*-static' -type f -delete fi - # needed only for debootstrap, mmdebstrap leave a 0000bootstrap.list behind - if [ -e "${ROOTFSDIR}/etc/apt/sources-list" ] && \ - [ -d "${ROOTFSDIR}/etc/apt/sources.list.d" ] && \ - [ -z "$(find ${ROOTFSDIR}/etc/apt/sources.list.d -mindepth 1)" ]; then - mv "${ROOTFSDIR}/etc/apt/sources-list" \ - "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list" - fi - if [ -n "${IMAGE_LISTS}" ]; then find "${ROOTFSDIR}/etc/apt/sources.list.d/" ! -type d -exec rm -f {} \; for l in ${IMAGE_LISTS}; do diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index a06ef90e..0f84e715 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -95,7 +95,6 @@ PACKAGE_ARCH ?= "${DISTRO_ARCH}" # Isar apt repository paths REPO_ISAR_DIR = "${DEPLOY_DIR}/isar-apt/${DISTRO}-${DISTRO_ARCH}/apt" REPO_ISAR_DB_DIR = "${DEPLOY_DIR}/isar-apt/${DISTRO}-${DISTRO_ARCH}/db" -THIRD_PARTY_APT_KEYRING = "/etc/apt/trusted.gpg.d/third_party.gpg" # Base apt repository paths REPO_BASE_DIR = "${DEPLOY_DIR}/base-apt/${DISTRO}/apt" diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb b/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb deleted file mode 100644 index 12798488..00000000 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb +++ /dev/null @@ -1,19 +0,0 @@ -# Minimal host Debian root file system -# -# This software is a part of ISAR. -# Copyright (c) Siemens AG, 2018 -# -# SPDX-License-Identifier: MIT - -Description = "Minimal host Debian root file system" - -DEPLOY_ISAR_BOOTSTRAP = "${DEPLOY_DIR_BOOTSTRAP}/${HOST_DISTRO}-host_${DISTRO}-${DISTRO_ARCH}" - -PROVIDES += "bootstrap-host" - -BOOTSTRAP_FOR_HOST = "1" - -require isar-bootstrap.inc - -HOST_DISTRO_BOOTSTRAP_KEYS ?= "" -DISTRO_BOOTSTRAP_KEYS = "${HOST_DISTRO_BOOTSTRAP_KEYS}" diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb b/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb deleted file mode 100644 index 69e97b33..00000000 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb +++ /dev/null @@ -1,14 +0,0 @@ -# Minimal target Debian root file system -# -# This software is a part of ISAR. -# Copyright (c) Siemens AG, 2018 -# -# SPDX-License-Identifier: MIT - -Description = "Minimal target Debian root file system" - -DEPLOY_ISAR_BOOTSTRAP = "${DEPLOY_DIR_BOOTSTRAP}/${DISTRO}-${DISTRO_ARCH}" - -PROVIDES += "bootstrap-target" - -require isar-bootstrap.inc diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc deleted file mode 100644 index 08d61a84..00000000 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ /dev/null @@ -1,242 +0,0 @@ -# Minimal debian root file system -# -# This software is a part of ISAR. -# Copyright (c) Siemens AG, 2018-2021 -# -# SPDX-License-Identifier: MIT - -inherit bootstrap - -LICENSE = "gpl-2.0" -LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe" -PV = "1.0" - -DEBOOTSTRAP ?= "qemu-debootstrap" -ROOTFSDIR = "${WORKDIR}/rootfs" -DISTRO_BOOTSTRAP_BASE_PACKAGES += "locales" -DISTRO_BOOTSTRAP_BASE_PACKAGES:append:gnupg = " gnupg" -DISTRO_BOOTSTRAP_BASE_PACKAGES:append:https-support = " ca-certificates" - -inherit deb-dl-dir - -def get_distro_have_https_source(d): - return any(source[2].startswith("https://") for source in generate_distro_sources(d)) - -def get_distro_needs_https_support(d): - if get_distro_have_https_source(d): - return "https-support" - else: - return "" - -OVERRIDES:append = ":${@get_distro_needs_https_support(d)}" - -def get_distro_needs_gpg_support(d): - if d.getVar("DISTRO_BOOTSTRAP_KEYS") or \ - d.getVar("THIRD_PARTY_APT_KEYS") or \ - d.getVar("BASE_REPO_KEY"): - return "gnupg" - else: - return "" - -OVERRIDES:append = ":${@get_distro_needs_gpg_support(d)}" - -APT_KEYS_DIR = "${WORKDIR}/aptkeys" -DISTRO_BOOTSTRAP_KEYRING = "${WORKDIR}/distro-keyring.gpg" - -do_generate_keyrings[cleandirs] = "${APT_KEYS_DIR}" -do_generate_keyrings[dirs] = "${DL_DIR}" -do_generate_keyrings[vardeps] += "DISTRO_BOOTSTRAP_KEYS THIRD_PARTY_APT_KEYS" -do_generate_keyrings[network] = "${TASK_USE_SUDO}" -do_generate_keyrings() { - if [ -n "${@d.getVar("THIRD_PARTY_APT_KEYFILES") or ""}" ]; then - chmod 777 "${APT_KEYS_DIR}" - for keyfile in ${@d.getVar("THIRD_PARTY_APT_KEYFILES")}; do - cp "$keyfile" "${APT_KEYS_DIR}"/"$(basename "$keyfile")" - done - fi - if [ -n "${@d.getVar("DISTRO_BOOTSTRAP_KEYFILES") or ""}" ]; then - for keyfile in ${@d.getVar("DISTRO_BOOTSTRAP_KEYFILES")}; do - sudo apt-key --keyring "${DISTRO_BOOTSTRAP_KEYRING}" add $keyfile - cp "$keyfile" "${APT_KEYS_DIR}"/"$(basename "$keyfile")" - done - fi -} -addtask generate_keyrings before do_build after do_unpack - -def get_host_release(): - import platform - rel = platform.release() - return rel - -do_bootstrap[vardeps] += " \ - DISTRO_APT_PREMIRRORS \ - ISAR_ENABLE_COMPAT_ARCH \ - ${DISTRO_VARS_PREFIX}DISTRO_APT_SOURCES \ - " -do_bootstrap[dirs] = "${DEPLOY_DIR_BOOTSTRAP}" -do_bootstrap[depends] = "base-apt:do_cache isar-apt:do_cache_config" -do_bootstrap[network] = "${TASK_USE_NETWORK_AND_SUDO}" - -inherit compat - -do_bootstrap[vardeps] += "DISTRO_BOOTSTRAP_BASE_PACKAGES" -do_bootstrap() { - if [ "${ISAR_ENABLE_COMPAT_ARCH}" = "1" ]; then - if [ -z "${COMPAT_DISTRO_ARCH}" ]; then - bbfatal "${DISTRO_ARCH} does not have a compat arch" - fi - fi - debootstrap_args="--verbose --variant=minbase --include=${@','.join(d.getVar('DISTRO_BOOTSTRAP_BASE_PACKAGES').split())}" - 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 - debootstrap_args="$debootstrap_args --no-check-gpg" - fi - E="${@ isar_export_proxies(d)}" - export BOOTSTRAP_FOR_HOST debootstrap_args E - - sudo rm -rf --one-file-system "${ROOTFSDIR}" - deb_dl_dir_import "${ROOTFSDIR}" "${BOOTSTRAP_BASE_DISTRO}-${BASE_DISTRO_CODENAME}" - - sudo -E -s <<'EOSUDO' - set -e - if [ "${BOOTSTRAP_FOR_HOST}" = "0" ]; then - arch_param="--arch=${DISTRO_ARCH}" - fi - ${DEBOOTSTRAP} $debootstrap_args \ - $arch_param \ - ${@get_distro_components_argument(d)} \ - "${@get_distro_suite(d)}" \ - "${ROOTFSDIR}" \ - "${@get_distro_source(d)}" \ - ${DISTRO_DEBOOTSTRAP_SCRIPT} - - # Install apt config - mkdir -p "${ROOTFSDIR}/etc/apt/preferences.d" - 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 - line="file:///base-apt/${BOOTSTRAP_BASE_DISTRO} ${BASE_DISTRO_CODENAME} main" - if [ -z "${BASE_REPO_KEY}" ]; then - line="[trusted=yes] ${line}" - fi - echo "deb ${line}" > "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list" - line="file:///base-apt/${BASE_DISTRO} ${BASE_DISTRO_CODENAME} main" - if [ -z "${BASE_REPO_KEY}" ]; then - line="[trusted=yes] ${line}" - fi - echo "deb-src ${line}" >> "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list" - - mkdir -p ${ROOTFSDIR}/base-apt - mount -o bind,private "${REPO_BASE_DIR}" "${ROOTFSDIR}/base-apt" - else - install -v -m644 "${APTSRCS}" \ - "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list" - fi - install -v -m644 "${APTSRCS_INIT}" "${ROOTFSDIR}/etc/apt/sources-list" - rm -f "${ROOTFSDIR}/etc/apt/sources.list" - rm -rf "${ROOTFSDIR}/var/lib/apt/lists/"* - find ${APT_KEYS_DIR}/ -type f | while read keyfile - do - MY_GPGHOME="$(chroot "${ROOTFSDIR}" mktemp -d /tmp/gpghomeXXXXXXXXXX)" - echo "Created temporary directory ${MY_GPGHOME} for gpg-agent" - export GNUPGHOME="${MY_GPGHOME}" - APT_KEY_APPEND="--homedir ${MY_GPGHOME}" - - kfn="$(basename $keyfile)" - cp $keyfile "${ROOTFSDIR}/tmp/$kfn" - chroot "${ROOTFSDIR}" /usr/bin/gpg-agent --daemon -- /usr/bin/apt-key \ - --keyring ${THIRD_PARTY_APT_KEYRING} ${APT_KEY_APPEND} add "/tmp/$kfn" - rm "${ROOTFSDIR}/tmp/$kfn" - - echo "Removing ${MY_GPGHOME}" - rm -rf "${ROOTFSDIR}${MY_GPGHOME}" - done - - # Set locale - install -v -m644 "${WORKDIR}/locale" "${ROOTFSDIR}/etc/locale" - - sed -i '/en_US.UTF-8 UTF-8/s/^#//g' "${ROOTFSDIR}/etc/locale.gen" - chroot "${ROOTFSDIR}" /usr/sbin/locale-gen - - # update APT - mount -o bind,private /dev ${ROOTFSDIR}/dev - mount -o bind,private /dev/pts "${ROOTFSDIR}/dev/pts" - mount -t tmpfs none "${ROOTFSDIR}/dev/shm" - mount -t proc none ${ROOTFSDIR}/proc - mount -o bind,private /sys "${ROOTFSDIR}/sys" - mount --make-rslave ${ROOTFSDIR}/sys - - export DEBIAN_FRONTEND=noninteractive - - if [ "${BOOTSTRAP_FOR_HOST}" = "1" ]; then - chroot "${ROOTFSDIR}" /usr/bin/dpkg --add-architecture ${DISTRO_ARCH} - fi - - if [ "${ISAR_ENABLE_COMPAT_ARCH}" = "1" ]; then - chroot "${ROOTFSDIR}" /usr/bin/dpkg --add-architecture ${COMPAT_DISTRO_ARCH} - fi - - chroot "${ROOTFSDIR}" /usr/bin/apt-get update -y \ - -o APT::Update::Error-Mode=any - - chroot "${ROOTFSDIR}" /usr/bin/apt-get install -y dpkg - - # prepare setup chroot script - install -v -m755 "${WORKDIR}/chroot-setup.sh" "${ROOTFSDIR}/chroot-setup.sh" - - chroot "${ROOTFSDIR}" /usr/bin/apt-get install -y -f - chroot "${ROOTFSDIR}" /usr/bin/apt-get dist-upgrade -y \ - -o Debug::pkgProblemResolver=yes - - umount "${ROOTFSDIR}/dev/shm" - umount "${ROOTFSDIR}/dev/pts" - umount "${ROOTFSDIR}/dev" - umount "${ROOTFSDIR}/proc" - umount "${ROOTFSDIR}/sys" - mountpoint -q "${ROOTFSDIR}/base-apt" && \ - umount "${ROOTFSDIR}/base-apt" - - # Compress rootfs for compatibility - lopts="--one-file-system --exclude=var/cache/apt/archives" - tar --zstd -cf "${WORKDIR}/rootfs.tar.zst" $lopts -C "${ROOTFSDIR}" . - - # Finalize debootstrap by setting the link in deploy - ln -Tfsr "${WORKDIR}/rootfs.tar.zst" "${DEPLOY_ISAR_BOOTSTRAP}.tar.zst" -EOSUDO - deb_dl_dir_export "${ROOTFSDIR}" "${BOOTSTRAP_BASE_DISTRO}-${BASE_DISTRO_CODENAME}" - - # Cleanup apt cache - sudo -Es chroot "${ROOTFSDIR}" /usr/bin/apt-get -y clean -} - -addtask bootstrap before do_build after do_generate_keyrings - -SSTATETASKS += "do_bootstrap" -SSTATECREATEFUNCS += "bootstrap_sstate_prepare" -SSTATEPOSTINSTFUNCS += "bootstrap_sstate_finalize" - -bootstrap_sstate_prepare() { - # this runs in SSTATE_BUILDDIR, which will be deleted automatically - sudo cp -a "${WORKDIR}/rootfs.tar.zst" ./bootstrap.tar.zst - sudo chown $(id -u):$(id -g) bootstrap.tar.zst -} - -bootstrap_sstate_finalize() { - # this runs in SSTATE_INSTDIR - # we should restore symlinks after using tar - if [ -f bootstrap.tar.zst ]; then - mv bootstrap.tar.zst "${WORKDIR}/rootfs.tar.zst" - sudo ln -Tfsr "${WORKDIR}/rootfs.tar.zst" \ - "${DEPLOY_ISAR_BOOTSTRAP}.tar.zst" - fi -} - -python do_bootstrap_setscene() { - sstate_setscene(d) -} - -addtask do_bootstrap_setscene -do_bootstrap_setscene[dirs] = "${DEPLOY_DIR_BOOTSTRAP}" diff --git a/meta/recipes-core/isar-bootstrap/files/chroot-setup.sh b/meta/recipes-core/isar-mmdebstrap/files/chroot-setup.sh similarity index 100% rename from meta/recipes-core/isar-bootstrap/files/chroot-setup.sh rename to meta/recipes-core/isar-mmdebstrap/files/chroot-setup.sh diff --git a/meta/recipes-core/isar-bootstrap/files/locale b/meta/recipes-core/isar-mmdebstrap/files/locale similarity index 100% rename from meta/recipes-core/isar-bootstrap/files/locale rename to meta/recipes-core/isar-mmdebstrap/files/locale diff --git a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc index b2de61ad..6aec067f 100644 --- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc +++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc @@ -9,8 +9,6 @@ inherit bootstrap inherit compat inherit deb-dl-dir -FILESEXTRAPATHS:append = ":${LAYERDIR_core}/recipes-core/isar-bootstrap/files" - DISTRO_BOOTSTRAP_BASE_PACKAGES += "locales apt" DISTRO_BOOTSTRAP_BASE_PACKAGES:append:https-support = " ca-certificates" -- 2.51.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 visit https://groups.google.com/d/msgid/isar-users/20251111152844.572788-1-clara.kowalsky%40siemens.com.