From patchwork Wed Nov 6 08:21:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Mikanovich X-Patchwork-Id: 3898 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 06 Nov 2024 09:21:39 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-lf1-f62.google.com (mail-lf1-f62.google.com [209.85.167.62]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4A68Lcb9017043 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 6 Nov 2024 09:21:38 +0100 Received: by mail-lf1-f62.google.com with SMTP id 2adb3069b0e04-539ea3d778dsf4064694e87.1 for ; Wed, 06 Nov 2024 00:21:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1730881293; cv=pass; d=google.com; s=arc-20240605; b=gQxOe+5eKVLcfFnEM+VKNeoJ96bzWQh21Zwy8kdhxW0gtebkwK/YVWVhni+q0Ron17 gZrw6rN30Le5aEigkycQeZK7nNoq30KTn9AtaQLy8c6Eth8kS3O12QpRu5eQys4o8s8Z ZSQ8VuQbstcwF2S5kST4apyggZDTqzCC70Osw+GvPeRsujx5QnsLvn5XO+pzPDkP5FIt gxCd1lb5wzzp76dkewjptKgvco10hyqaY1uBVXIYB1BmX8ZeYeNTp9woFrVecggdLBGQ FF6Bt+dli1Da+Kh9eIAHZ8wSl4+Ga/NIFEMTsSFyDZwcvo5t8rQ0GBLKHOJbQCBSU53f c/OQ== 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=miozGLssYB6qsyrH4K0bgplURLEcdvk3KzXgSxFjNMM=; fh=DTd+Atx7bkBKchr5FZVCoSirY85txfO9oGPse2x5/A8=; b=iMpRqvPEGh1bBpKRGINPI/VVE+lqxx6v59AVvBJGlItPOHK7zQTkMes2GROWdO72/S 5juDXw61sEyQEJbX/lzivvSjknftIAKRXu3RV8z6Qnhe5ti/cjt2A/ZpanGp2bn3D/hD 1TlN0EBbkghcerwT1AHAPx60DSOXIAwtKplkhhDmMe5RMQv7IowwXB7FVnVkl5znA0Wu awPT8CNk3OBsjUuE0QYhaWxdPUYfleWmQNGdNMNGPOqSQx24VOboOJ63J5QcGutSHxL/ UMHzm2w9Byh/kyFWdQzgtdNPoDCfs1amOutZedH7N/iy3u8b7xFOHhacI+8QO6N2fDUH NMyQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1730881293; x=1731486093; 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:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=miozGLssYB6qsyrH4K0bgplURLEcdvk3KzXgSxFjNMM=; b=h3YG+vGYiiOhjnXO/pLm5Lz1WReAq4xHXpTe1FEQjiV/maMd+a0BuS0BVEpKexBHnb myPonGNNrswvyhdgrHlFhKk62I2wiYvtSayb8UFCoOnEzxN18jP6Pc3FnzB+g4AyAVhv nXMoM54c/0Y6XsIRgPDcn3EhxCIVqTXIJjxD7cqSihmFCuzjZTz/aOo9orNmbm2aFOXe RQzyaV0nlnIiFonhZpERD0z7/OfwnoXSxT4SXXGTiPigB61IZXseIji8KXaVeaXErCTg Bo3Et3r7Qq/Bk09ZfnDNjh6iTLOmum58AH5EmE1kAiUU/pG4B99gFHo4pNeKy4f1WfaA 8TRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730881293; x=1731486093; 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:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=miozGLssYB6qsyrH4K0bgplURLEcdvk3KzXgSxFjNMM=; b=jgQrENNuObOK9OM2Y4Xf8TwkoTzx8+Q4/Wz1KMis4CK+EW+OE61poZfWOI1k1l8KQN vDrCh1adxchyM9k5JT6GGeeBFR08l3CB6NwRVIaFqAw3BKltsuzI6hbXAFjgMpMsxKJo R5izWe/MeELTf7bFWsydnUquSau9HMm1J6Lc30kwkacAe7hFNBytWYp0UyVVoCwzYAFP Zurh/NDBm+EYhb2/3Hsjnk0hdLGgRzl+gPwEPBuhgWqnMbh48bgYPiaXSi3/tSlcupIv EsOhg0/nsf9sWci8Q2gbavKvdP9ExmsD4zSZtCPLkZfE8iuHyuNpb3ieFw7v7o3dqS6O hdqg== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCWKnjYz5plnjXfuyYxTH2eRkhn6jdVqUs7ml3Iy3N+KHFoTYtg5duoFQmRy5BMR8vAKWaYyOsI=@isar-build.org X-Gm-Message-State: AOJu0YzuP+GlZtqQvunNvhoaNyVzRcsKdDB6hwrDO5VP/c7wvPtUDw8+ 40UcqwUDlLZ3ZpbVWmdLzeUKJjkncpg4V0cpUJZgl8YABZN77WpI X-Google-Smtp-Source: AGHT+IFvyAO89+4YlmWaPuOt+c//aRG39A0stCMGQqdzyxE/0hlBuqYVeNCMtJwxEDFi6WI64m+3xA== X-Received: by 2002:a05:6512:b11:b0:535:d4e9:28bf with SMTP id 2adb3069b0e04-53d65e12357mr9602168e87.46.1730881292191; Wed, 06 Nov 2024 00:21:32 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:ea8:b0:53a:7e:bcd3 with SMTP id 2adb3069b0e04-53c794fdd70ls453050e87.1.-pod-prod-06-eu; Wed, 06 Nov 2024 00:21:30 -0800 (PST) X-Received: by 2002:a2e:bd08:0:b0:2fa:cf5b:1e8e with SMTP id 38308e7fff4ca-2fedb758b32mr87918751fa.2.1730881289811; Wed, 06 Nov 2024 00:21:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1730881289; cv=none; d=google.com; s=arc-20240605; b=JWXsgR7q4mg29xZ4bGL6PQEwyDfY3BG0mK49UR9bhLcgvum+L9LbWWJQ2h2iDbCnIU vcyd3XlXlgUOKJEvBZcFxBtCzF8eD2uG4G0qSnX+4trDTVzyArQCvriO6E2rft0oaCDB u/pXzCziz02YUNXdisWPmeF7yugPw5H39JsfmMOCoapp6QZra3NMYffDG7IIUroVkZTu 8Pwqg9tclbjgpw0iuSvMY8XdaE+UuZw/WkO4FWM17nyrUJiTrNbj3UrihblHpZwDdBOF DaGTYYy3ZRL5lPKbJO2Ez4Tx3ZyutV71CPl8IjmN1+xMuKpkT2Bn20y5kQzPCYluAH+g VKcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=zvbBnfT4xT0RIRGHztwdSNJYoyshqv732ubMcCz6VBo=; fh=/h9QQkzJ8EboVkWg45aWwpaUro6WMavIVd2OhN45RtE=; b=LQT9k78Sek5rn9tcA5yqM8Wq8p/OJBEgLpZY18gcr+3TiHYW48pBC8GDFIsPi3eSSY Br0+u5y2M9x2RE207D0ndrQocMnZyXgCgvUQulOmbKQTqZ0e6l6sszH8OhIh7/o7WRcH yqmoJbPVjTP11EI0r5GGNwQvw//7jF8Oqs6FfwimOF0nBL+yhS1qKjFcNFO6bNZH54wy 6graIeKu8eHFChH2ctsrqLX/MkWh4I0HbPvEfjeKxKgmTVPK81mJ/JVerZXnVOQ130c7 E9lg8k9VuMq5pyefbk6AoAEHIzHEBO2IhDQL0cdjdmLRawTSALuQb8OYdYdg99HCCtTV JTnQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 38308e7fff4ca-2fdef8aab2asi2500171fa.5.2024.11.06.00.21.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Nov 2024 00:21:29 -0800 (PST) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from user-B660.promwad.corp ([159.148.83.114]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 4A68LOju016956 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 6 Nov 2024 09:21:28 +0100 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [PATCH v11 5/8] mmdebstrap: Fix missing dpkg available Date: Wed, 6 Nov 2024 10:21:14 +0200 Message-Id: <20241106082117.1089554-6-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241106082117.1089554-1-amikan@ilbers.de> References: <20241106082117.1089554-1-amikan@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: amikan@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@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?= In some distros /var/lib/dpkg/available is required for do_rootfs_install task. The fix for it is present in jessie-or-older mmdebstrap hook in Bookworm and later, but maybe-jessie-or-older wrapper do not handle distro version check correctly. That's why we need to check and apply hook manually or create /var/lib/dpkg/available by hand for older distros. Signed-off-by: Anton Mikanovich --- meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc index 658d45be..e1c3832d 100644 --- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc +++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc @@ -17,6 +17,14 @@ DISTRO_BOOTSTRAP_BASE_PACKAGES:append:gnupg = ",gnupg" DISTRO_BOOTSTRAP_BASE_PACKAGES:append:https-support = ",ca-certificates" BOOTSTRAP_TMPDIR = "${WORKDIR}/tempdir" +# Fix for /var/lib/apt/available while maybe-jessie-or-older hook do not work +MM_HOOK_JESSIE = "/usr/share/mmdebstrap/hooks/jessie-or-older" +DPKG_HOOKS ?= "${@'--hook-dir='+d.getVar('MM_HOOK_JESSIE') \ + if os.path.isdir(d.getVar('MM_HOOK_JESSIE')) \ + else '--customize-hook=\'touch /var/lib/dpkg/available\''}" +MMHOOKS:ubuntu-focal ?= "${DPKG_HOOKS}" +MMHOOKS:debian-buster ?= "${DPKG_HOOKS}" + def get_distro_primary_source_entry(d): for source in generate_distro_sources(d): if source[0] == "deb": @@ -98,6 +106,7 @@ do_bootstrap() { sudo TMPDIR="${BOOTSTRAP_TMPDIR}" mmdebstrap $bootstrap_args \ $arch_param \ --mode=unshare \ + ${MMHOOKS} \ ${@get_distro_components_argument(d)} \ "${@get_distro_suite(d)}" \ "${WORKDIR}/rootfs.tar.zst" \