From patchwork Thu Nov 21 12:55:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Moessbauer X-Patchwork-Id: 3958 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 21 Nov 2024 13:56:01 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-pj1-f63.google.com (mail-pj1-f63.google.com [209.85.216.63]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4ALCtxBD012406 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 21 Nov 2024 13:56:00 +0100 Received: by mail-pj1-f63.google.com with SMTP id 98e67ed59e1d1-2ea5bf5354fsf1063436a91.3 for ; Thu, 21 Nov 2024 04:56:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1732193754; cv=pass; d=google.com; s=arc-20240605; b=ClTnChWIBmU//aWz3yUNQbDyudQwf+imjeBbBX/Vx0jmeXYktIWcnHQnGV2CXCaffr A6B92r9RKo9dzBn6rN2N5vpCmF8PaVAjzmCxqTTqyI4ZWdTmTMHN9ODL7IycSsZfqoo8 jBPoJCCmvxLt3kSvPbGdLtvFgdR9ElZyA7SHPSTob2nwZtypo+cuSphkSaPAj1dpJkfi wywMi6PzT8WhTBL7OtazhSsttLiPHUWTK1dMYeT9uBJenAOtAFfwUPP1PFNylySIefsO 5i3iVT2CNtFkG9JqX3uWP1jAs0/3V0d+8Aefx/wqqdBp8aQXuIxV0dp6zbOtjySEVoYn 5i/Q== 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=n+OV+Z9ABl/S0301P85cCJI9YxrQWEGKztp1fduoE+w=; fh=bL7xXb/Ks1xZOiIw9aahFV9nKDedrOCteYcdD7zSjp8=; b=DwIodBOA7I7aElPTF32dr9Yvh7WreRS48wt9oWCZneBgrG6493EmlugVyT5I2Ia2DB ZJF/HhMdI/QjMXK7nQbDFFh88ZspuMxERwMw6XRAVUlx3FgqycH8J1Rz9yLBdClnCPVV onUAJpHHtzzTxhwBU2ka/tFeoQxTuldPF9iNxL4oIYYpRZVcdoDIqBihohqSO3p1pMiH ArORyO82lSs9V6J5YDbCaE9DGnznHE9GsyNrAi0yvnVlsTnsbcVZHJNrglrs+oxn4ySt YcpW8Fo5M2OaiYBY+5CQ9wULe7rPb0pO4CURgjWnKEzpLyP2lr/pxie7zino6o2iauCZ hqfQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=YXnCi7c1; spf=pass (google.com: domain of fm-1321639-20241121125548276cfea9d7e134392a-c8kdlo@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-1321639-20241121125548276cfea9d7e134392a-c8kdLO@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=1732193754; x=1732798554; darn=isar-build.org; 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=n+OV+Z9ABl/S0301P85cCJI9YxrQWEGKztp1fduoE+w=; b=jyu5EbXSn5/A+fP/0HToi9G6y2rK6EWVkLVQM314BFV8tnOc5x4294vqJncmvWHvIb 6HMg/CvrQAO8iCJo6RPXX3psqSjyNql3wajmdMnRxL1lrmuIQN4yIHQcpZ1XqjUUIufo xEXmtd8SrJwpldPBbQkBC1fYPmK2Wyk5zX90BOgi69NUcTOdSoQG0n3clDK/gMV+sEH8 HyjrUUxOh7WWi3EWFPoNLY1pKlQP+PlycjoWeFEnSA/8E78JlWuAq7PLFsFMhM2hQgQb ajpAr9J5spLDSd1NjDoOZjC1EoVH5JItbG/wbeVEMftKunfb3KTAw2QzyEcsbVfat2EY 4xbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732193754; x=1732798554; 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=n+OV+Z9ABl/S0301P85cCJI9YxrQWEGKztp1fduoE+w=; b=q3Lt/GOTsqQk1wchz8PZvjC3cX9q839z3/dGx9RNl55zQluiecS4LVhXT0Okcytt28 SdzHG0x28pTpGOABJtnHutKOdU2KGQkFXIVhuMwDh8WDAHvQx7eIsY1p4b1wbG8rioCJ oS+Tjr60CnNDItozpE+oL/Z8b867WE/OcHhvYyea/T4+tY0AY5AFr1IbSpeSM5AubjMn j5+2skYpsqz6D9m/14g5mnxhs4WR7S7zGImCuwAIFLWLN6JureImHpN6eBAQvuImFwZn FNEbP/e6WdeJdwwnuksQGsu/T2dyinvmwYWboRtRnoZjxM3bjy6X94RcDGdbA/9zkOic 8wQQ== X-Forwarded-Encrypted: i=2; AJvYcCWi8M4nEkAvX4UTzA5AAOF/Ny3vx9P++dNpQpvn5vWlOipa9jhghiPnZDCqbQUrwIF8dk12uAw=@isar-build.org X-Gm-Message-State: AOJu0Yy3lz5DpEh0gM4Ujh5ydsNfhc2j0tKD3DH+4YYeUc6P0foK74FZ 4vuRNzbgp7b4qDWkhXw73a4nNsyNWx16AsnxD49tswu5O72wLgJR X-Google-Smtp-Source: AGHT+IFv8oB6ZTINrKiZ7aMVw3MXKdES3zQdqdYfnrvaP7L57lHCYmRWkHQTSBfjndJLVlJ2gi+c0w== X-Received: by 2002:a17:90b:288e:b0:2ea:8efd:48ad with SMTP id 98e67ed59e1d1-2eaca70999emr8163271a91.9.1732193753950; Thu, 21 Nov 2024 04:55:53 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90a:ff18:b0:2e2:c421:c45 with SMTP id 98e67ed59e1d1-2eaebc4ababls728467a91.2.-pod-prod-07-us; Thu, 21 Nov 2024 04:55:52 -0800 (PST) X-Received: by 2002:a17:902:e751:b0:211:fcad:d6ea with SMTP id d9443c01a7336-2126a42e5c1mr73557645ad.45.1732193751650; Thu, 21 Nov 2024 04:55:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732193751; cv=none; d=google.com; s=arc-20240605; b=UCwySRqR/AHdmNf3uo5OdFl/pL7zEdKXFlA13yAueAklINRnBKi6cSJ2dp5at7TgWX DMLpcdg1XET79yohMNr9kI85ORMi5xmHRm5xlOg2SAflgszn8RwTrtAqdc1ZlV1cGjB1 OcODRBXyWLWD0GTEWQw13jFZwMejvWihWunntVzz2OaRz9B/+Tc88NIsh5iaH5fiAnQw 7AGZ7tvaHWN0zF7aCyQC15D2BweUqS478YvnsOw6Lzwn0e+kjCRoK8x7pwVT9AthrMUf DTwcc50BnNsGSMNtWY7KSkthqMtAP+/f6q9AAthbyyaDYiBQN9YJKtoxBFbMAF3ewM8p 46hA== 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=3Q8IGyi4ZGLNx3wyEd6kVs8jhRbA8hlaDRPImVIdxek=; fh=Z5k1exbni5v+JcdUGD2NBeFrUIRufbX72+RV8jfXD4U=; b=HG6q5qbm1p8sjzMIRIOQKCi1mp/CWWeEfhu0rY1S4qswO/JChQcJqJs6cQ7J+fW9CY 4yyhyWqf50fC+oXNUXdTpy/CkMIzv12kQiFQSePXm8UsmZgHNOo3tlcyeu993MnKTW5/ KkNQol89kBxkBgKUNvPQulR/ntaV7Z6n/05CS2tw4jX5LCNHzZU/WnFLbOezEUV6GDgy cJWd2z1DMR1jziIKyG+sg6RnkPTbVN8pisw5kefE6L2M/TcGmNcYV+JhmAugvov8V6H4 +E6UcM9mlCP5VSRB9iNSR4TE7KWEGWbUE+k939jMKsmBuu++YPtvY6Unj353S25S9pfT z8vg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=YXnCi7c1; spf=pass (google.com: domain of fm-1321639-20241121125548276cfea9d7e134392a-c8kdlo@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-1321639-20241121125548276cfea9d7e134392a-c8kdLO@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net. [185.136.64.226]) by gmr-mx.google.com with ESMTPS id d9443c01a7336-21288c1d985si576355ad.12.2024.11.21.04.55.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Nov 2024 04:55:51 -0800 (PST) Received-SPF: pass (google.com: domain of fm-1321639-20241121125548276cfea9d7e134392a-c8kdlo@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) client-ip=185.136.64.226; Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 20241121125548276cfea9d7e134392a for ; Thu, 21 Nov 2024 13:55:49 +0100 X-Patchwork-Original-From: "'Felix Moessbauer' via isar-users" From: Felix Moessbauer To: isar-users@googlegroups.com Cc: amikan@ilbers.de, Felix Moessbauer Subject: [PATCH 1/1] add apt options to mmdebstrap Date: Thu, 21 Nov 2024 13:55:28 +0100 Message-Id: <20241121125528.1370018-1-felix.moessbauer@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1321639:519-21489:flowmailer X-Original-Sender: felix.moessbauer@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=YXnCi7c1; spf=pass (google.com: domain of fm-1321639-20241121125548276cfea9d7e134392a-c8kdlo@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-1321639-20241121125548276cfea9d7e134392a-c8kdLO@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Felix Moessbauer Reply-To: Felix Moessbauer 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= In contrast to deboostrap, mmdebstrap supports apt options. By that, we finally can inject the config needed to have reliable builds against the debian snapshot mirrors. Technically we need the options in two different formats, hence use a function to generate them accordingly. Signed-off-by: Felix Moessbauer --- .../isar-mmdebstrap/isar-mmdebstrap.inc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc index 1043f2d1..97ee4431 100644 --- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc +++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc @@ -24,6 +24,19 @@ MMHOOKS:debian-buster ?= "${DPKG_HOOKS}" DISTRO_BOOTSTRAP_KEYRING = "${WORKDIR}/distro-keyring.gpg" +def get_apt_opts(d, param): + opts = [] + retries = d.getVar('ISAR_APT_RETRIES') or "3" + opts.append(f'Acquire::Retries="{retries}"') + max_delay = d.getVar('ISAR_APT_DELAY_MAX') + if max_delay: + opts.append(f'Acquire::Retries::Delay::Maximum="{max_delay}"') + dl_limit = d.getVar('ISAR_APT_DL_LIMIT') + if dl_limit: + opts.append(f'Acquire::http::Dl-Limit="{dl_limit}"') + opts.append(f'Acquire::https::Dl-Limit="{dl_limit}"') + return ' '.join([f'{param} {o}' for o in opts]) + do_generate_keyrings[cleandirs] = "${WORKDIR}/trusted.gpg.d" do_generate_keyrings[dirs] = "${DEBDIR}" do_generate_keyrings[vardeps] += "DISTRO_BOOTSTRAP_KEYS THIRD_PARTY_APT_KEYS" @@ -126,7 +139,8 @@ do_bootstrap() { -o Dir::State="$1/var/lib/apt" \ -o Dir::Etc="$1/etc/apt" \ -o Dir::Cache="$1/var/cache/apt" \ - -o Apt::Architecture="${BOOTSTRAP_DISTRO_ARCH}"' + -o Apt::Architecture="${BOOTSTRAP_DISTRO_ARCH}" \ + ${@get_apt_opts(d, '-o')}' extra_essential="$extra_essential && $syncout" extra_customize="$syncout" fi @@ -173,6 +187,7 @@ do_bootstrap() { --customize-hook='chroot "$1" /usr/bin/apt-get -y clean' \ --skip=cleanup/apt \ --skip=download/empty \ + ${@get_apt_opts(d, '--aptopt')} \ ${@get_distro_components_argument(d)} \ "${@get_distro_suite(d)}" \ "${WORKDIR}/rootfs.tar.zst" \