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; Mon, 28 Oct 2024 08:32:58 +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 49S7WoKk004758 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 28 Oct 2024 08:32:50 +0100 Received: by mail-lf1-f62.google.com with SMTP id 2adb3069b0e04-539f5f33333sf2725653e87.1 for ; Mon, 28 Oct 2024 00:32:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1730100765; cv=pass; d=google.com; s=arc-20240605; b=SeAp6TMtdPJDCTltGZvgvQOyhknoR0lAD2UHMeshyUrqU/nDs6B8/hShiIf6ZnBUBl MvFFS7oyGjTHQnTuD8wJN7mCr9HHJKKXgCmdGBVN9Nnr1bra5X915WrOTTafpYavr1SW qi91fCRmSgitL1LocYsn+4kNLWkgyCgXSkkBElfgNveHPdvCJTwsu3qahRZiXc7GW4i0 XZudbEoN1lroJWDIrg9v4LdpJzQvTcbjPGLn0KVctr40P41JyUxmh5wodXBOWlHwg22j x7i3DtEZmexktnAxqGZ45sBOIBwHjh742YFsXnk/CPrqpNWKIROSmJpKPK0DTn3EMjS9 qy7Q== 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:message-id:date :subject:to:from:sender:dkim-signature; bh=Rr4A7Awzc8tZw6CHYhMNO0XF9m9L/bTVK+Gf1kJqVO4=; fh=dd3TUouO2nRR+t7eRaLXr/B/qc+6k+U3u96mCZyClwA=; b=auvAfolHS5v4arwM3IYcNjY/FwqN8qydmjuod9Bgar8S84bVB4VRuO6pHteFXfra1P 6BR5Kf2wwiRdnbB+qt6KoHpoxf7T56L/QePkMooKc0vFRo6HY6hrIjuYOQEUcAdUzLNc YwEhh1wU2AlpDT8Z9bNV0XD0VUdqfKEmG6wWbb95B+uTupNUerdwBmZsGZpbAM4WiNcC iZ9Gr/wBCzqf5gsBrMZhf3MX7zdpKWoS8uLUJPhB7ihGLAs26B5bLbXp5l28Mo/88N8u 22uBjpLzwvSRa88j9q0w74TXPV7rWoS9+MpDaaHlL8cnD+1B1LPyx45YqixyqNn7fgAq +bFQ==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1730100765; x=1730705565; darn=ilbers.de; 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:message-id:date:subject:to:from :sender:from:to:cc:subject:date:message-id:reply-to; bh=Rr4A7Awzc8tZw6CHYhMNO0XF9m9L/bTVK+Gf1kJqVO4=; b=tfzgmJ+JKAFO/lEUZmM5W5VcYOelVjskEq/sxqzuL1J+F6XGgrwWO9TLyln5yajhIS KLmVNeiu65z0LbjdVwzK4yLPHl7IXGulXiP/N8c+ZaPMYS2rmbNXyFAAc697SZte7N5B 2nAJY2On1vESe7zhZsLJQPQGmORGZRTbItOK/BElyEGmKwnJT0otQprv9xVi4nnKqLq5 yNjRJnVsO1FrKrYdCMRJCa6ywY4lhKyJD8Wapnt5vYekQ4PEy9Uk9w3IWb5plzbAYOay jo6zbYzeql6lfy962jDPPF+7HJHuqp+HelcDh5DPFWU2rTfz0K2KkxRDWG49v8L3qd8v D8jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730100765; x=1730705565; 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 :message-id:date:subject:to:from:x-beenthere:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=Rr4A7Awzc8tZw6CHYhMNO0XF9m9L/bTVK+Gf1kJqVO4=; b=ELSeFZPoXyEsngCGKNBKxDT/s3kONGtIALKAgGIYi8CXTTSfUxuGwqIE9k16WVABsS Z2haVScY1shyMupye5DIWP70RhFGvfYZpxhTrrpwcyQjQBfiJ2G1ZjZ7N2+2kYEoc1qh ryo61iVCHBP52V6uli9NXYPo5nGUsixhK1cMHTjYTYEzk/7QVdZW5sxGjrVQk6E2T8Mj ZZxl0NUutrK007c8hSHeMC+z6bV8+BI4HpWq+rPh0Anp96p4ehBA2lAZxqnNCryGBY8o JnUcXp9T84fL4HVgW7pzExd7HTWfXbBfHw/BN3lK1/0lyEk8495YP7lGUAwjVAbrsMat 0mtQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCVKQcTZbHflI6wH+swQHE69Bmt3EFRuczFJTO/56Ooqt1ECx083zrLsG3sOeAAJY9FG37ZF@ilbers.de X-Gm-Message-State: AOJu0YzCnb9/UzxhvCaD04PdvPWU8diA+l97dHvBIQ87yBGIBCkOZXbe 1+LVx+fEfz8VttuumM13NAJ2old15qDnY5aG3cJpk8LMU6kMe+SO X-Google-Smtp-Source: AGHT+IH2FPD/RsDjQWQNGAAlLbRWxXAWdKGv60alf++kt6RTDaFXs2MVCT9d+yQFyrCL15l5+bGZkQ== X-Received: by 2002:a05:6512:1104:b0:536:a275:9d61 with SMTP id 2adb3069b0e04-53b348ceaafmr2800240e87.21.1730100764028; Mon, 28 Oct 2024 00:32:44 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:1116:b0:539:e021:5376 with SMTP id 2adb3069b0e04-53b2148fbb0ls1571075e87.1.-pod-prod-04-eu; Mon, 28 Oct 2024 00:32:41 -0700 (PDT) X-Received: by 2002:a05:6512:2388:b0:53b:1526:3a63 with SMTP id 2adb3069b0e04-53b34a33f5bmr2421370e87.56.1730100761530; Mon, 28 Oct 2024 00:32:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730100761; cv=none; d=google.com; s=arc-20240605; b=Jne1VAl9VHQ1kXogBSOB1O7NNji2FfSkdsHDkFz3NdFTu1H5zBUpjdjVIUjKPs2cJY 0PY8rVkXLRYviZFc+VUCev/SEr2UwH+24vtiCLAUh9OBPHLaguJ0vFPs2vV6R5YdVhcN WHmVMlFMoGRwj8i19/7y93WPjQQCr22dWucgmEDYD5wsZv/PBi2hDGGPipe4PZoChoWT xYl4Bx9iFfgMBDEpQun/T9xfmaCb9P5VYayAtHhRhjTSJruKX210VT9wjEoInfzorBhn x7CeFMIweEW7k169t4jl0FQpDYxwgRGtGEddFFKYsFMYeF/K8SlOadaPQgRa95FwJ2V5 UzAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from; bh=ntQ3zWtSofqzTypMINaliQfFsWJ1N8HhwIqlctM9qL0=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=Bf7dRpv1jgkmapHQ/XyLlt87cf8FV1Q6NM9DH/p+oCPmqnYp2j/j0fqdMavXhANxK/ FGZLUVxXFxSWOJAUB5PoUNT5WvzvKQI75xXHn3otE4xERfJ11PnG6AdXFElbvjgx41XW Tbn6nG8QPbrfT/nZloRqTRXhTDepokgcfhl07ZG/J8/M6G+Vfl9a1r0qCe0gvHxYkwZ5 vhu/xCbQLpSp8XMfSiq9W9FBqQRnMy3tZ4RCS7Yk9ipY1QHn9K62aQXb8uZ9dKS6CnYP g8nSl79RuhdqnFOfC596Pha0WEDOQEEsRjNzNMIjwuxS5iHFKairNLo0/1U7W9Stg7Vv saSA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-4317d02bc69si9206575e9.0.2024.10.28.00.32.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Oct 2024 00:32:41 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from home.localdomain (44-208-124-178-static.mgts.by [178.124.208.44] (may be forged)) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 49S7Wahh004744 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 28 Oct 2024 08:32:36 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH] isar-bootstrap: Run setup-chroot.sh after dpkg upgraded Date: Mon, 28 Oct 2024 10:32:24 +0300 Message-ID: <20241028073231.14162-1-ubely@ilbers.de> X-Mailer: git-send-email 2.45.2 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: ubely@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de 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-TUID: 1XVVVvsCy3nD By calling "chroot-setup.sh setup" right after debootstrap we do dpkg-divert for `/usr/sbin/start-stop-daemon`. This replaces the original script with a stub that is called during the build. At the end of the build, in "rootfs_finalize" task for target image, the original file is restored so package installation on a real target should be full-functional. But if `apt-get update` followed by debootstrap stage requires an upgrade of "dpkg" package itself (e.g. if new version exists in "-updates"), this may lead for diversion reset and original script gets restored. This results in following things: - "real" start-stop-daemon is called in all chroots during build; - start-stop-daemon is removed on target rootfs by "rootfs_finalize". Currently, it happens only for rpi-bookworm targets where debootsrapped "dpkg_1.21.22_arm64.deb" package is upgraded with a newer version "dpkg_1.22.6~bpo12+rpt3_arm64.deb" at "apt-get update" stage. With this change, we run "chroot-setup.sh" after explicite upgrade of "dpkg". Thus we guarantee start-stop-daemon stub is used during build and undirsion is done only at the end of the rootfs creation. Signed-off-by: Uladzimir Bely --- meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index 92974eb5..e155aade 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -370,10 +370,6 @@ do_bootstrap() { sed -i '/en_US.UTF-8 UTF-8/s/^#//g' "${ROOTFSDIR}/etc/locale.gen" chroot "${ROOTFSDIR}" /usr/sbin/locale-gen - # setup chroot - install -v -m755 "${WORKDIR}/chroot-setup.sh" "${ROOTFSDIR}/chroot-setup.sh" - "${ROOTFSDIR}/chroot-setup.sh" "setup" "${ROOTFSDIR}" - # update APT mount -o bind,private /dev ${ROOTFSDIR}/dev mount -o bind,private /dev/pts "${ROOTFSDIR}/dev/pts" @@ -394,6 +390,13 @@ do_bootstrap() { chroot "${ROOTFSDIR}" /usr/bin/apt-get update -y \ -o APT::Update::Error-Mode=any + + chroot "${ROOTFSDIR}" /usr/bin/apt-get install -y dpkg + + # setup chroot + install -v -m755 "${WORKDIR}/chroot-setup.sh" "${ROOTFSDIR}/chroot-setup.sh" + "${ROOTFSDIR}/chroot-setup.sh" "setup" "${ROOTFSDIR}" + chroot "${ROOTFSDIR}" /usr/bin/apt-get install -y -f chroot "${ROOTFSDIR}" /usr/bin/apt-get dist-upgrade -y \ -o Debug::pkgProblemResolver=yes -- 2.45.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/20241028073231.14162-1-ubely%40ilbers.de.