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, 04 Nov 2024 14:53:13 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-lf1-f61.google.com (mail-lf1-f61.google.com [209.85.167.61]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4A4DrC1o007795 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 4 Nov 2024 14:53:12 +0100 Received: by mail-lf1-f61.google.com with SMTP id 2adb3069b0e04-539e91e12bbsf2628964e87.2 for ; Mon, 04 Nov 2024 05:53:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1730728387; cv=pass; d=google.com; s=arc-20240605; b=hR0G3bJQVYIiRn5jC2/dSwVK8UkYvu9ubPUCFvv7vG1tevHCecvDbll0WeSzqr5FkH rBPkSHpXZ23U5Pd141zWdo1eKKKUCfYq+sqBZcc0IBMMWefa0TRLaZV6wdCnyyk3fIf/ c+j+erHaAqv0gA/tXx/ZwolbXsMaqjhA96ErQ+/5Enbc4BtfRr/K8QFTrSPYRAu+kSLC 6F6V+oyKeNpu8dCszxp78aLwFyHVhA+UcTJ2q8wBpFyaNw6AypPvOw6uI2b9twL54EDy Qhh6Per8HUELaHhJI98Uus48GG/ETFdtEitVdNN82UY+n/Vhlb0DbbSal74c08ARh+BY /Hgw== 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:user-agent :content-transfer-encoding:autocrypt:references:in-reply-to:date:to :from:subject:message-id:sender:dkim-signature; bh=itupaZdWpZcfQaO2IWIR7uWSCxLFefgtP+nARlrqip0=; fh=iAVmvyIBijlpr2TBVeuwrgfj78g884xxNui7DiRFiyU=; b=NmUw+fdlwsZDfIxP+fEfXDeaC4VSgizG2yeTRFgcW/tauvmaQcK1IeGiWLMiUuOzJ9 7pP3/4hpLJsbPu/GEv9Pq2R77LOA52OLxAAJs7+2rzsaaRhqSlFHqfelc10ojhxNaKPp XyudPNQM+jEx8YTiBeWbqsBYAdWaU8Y96iL3XHqvcAXBle/zGA1sLIeBTHyeYpyRa1LB eCW4MQAThPyqWd+OIccHdywTjuY0JokOOm5XDLxsUGXxIRGe/FkHifwnrqI9EmzlvJC4 8u+ya0O31HByatEFibbeYcagFzt2EFsKZ3/qR48afAyia+OPXcjNS9DuoCd83gPu5mIz NxkQ==; 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=1730728387; x=1731333187; 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:user-agent:content-transfer-encoding :autocrypt:references:in-reply-to:date:to:from:subject:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=itupaZdWpZcfQaO2IWIR7uWSCxLFefgtP+nARlrqip0=; b=llatx1iqvtAaYBdGDk5bPmPNxtz9VimDLmBlVXKqiVFuw754DAN/yw/GBKjloAnfs4 8xivvt4KczYTg6u9205AVuTdOTzbrgNpxzxv+8BJxrChbfpS2qzuRbNzbiL0ZAKZQjvm jy/bM/zqXlTS+4riMeMlg0PUB+02frDd6YERR9Zg2DHx+AW2UUwEw7eGuOfJJS9fBp2s i13mepQcyyxd4DzEJN/lMNIB5p4CJZgI0Yp8P+QKd1sEwLnkKm9moKlN1+FMnoERo3y/ dC63kRFZU1FCTD5S+gtmczKGSPSoOsizScGcOpCkBUtLe8qna22sz0jpZbw3/XqnpxC5 nKVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730728387; x=1731333187; 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 :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:to:from:subject:message-id:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=itupaZdWpZcfQaO2IWIR7uWSCxLFefgtP+nARlrqip0=; b=LejVPwPDKFSgAnIYnX/oSmXWaoGy8R29IaN/gx5aJbFRRp0skUNJGnIA/z0pSXAE5M S6/h0W++clanguabZVOMPwRInF/ML7ZqO19TppFZ/bduBC5+DxFHFJKfetb/cfhEbLKO EQiBqA+hYKafhAB86PsrakJDim0u6u2R5Erh0zJQPWKomW6RkuDCmfsBWZt5UyxX9rtv Fk84uikKkT/sn75Qhh6JRpjIhO12t/DYBfzFBvm/9dvnN21WNJ1dHfmBbmAWVoQ7k9Zi 8vD05KGSk3EWZayeBqfld6R4szZ0kkh4jq8gFeeGb6xbnSBhkHdcUSwvxwuDVh8SmqRx QCnA== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCWp4Inc1RMfmf7amqYJIeFJJY8E7KJIB1yzpTIKULziFU2zuO9Y/kJS/kyIJsldM9Eyis9n@ilbers.de X-Gm-Message-State: AOJu0YwhWk4HPnB4UOBQlkWw/c53EQDFvteNFMWA/KkaA5Q/zcu3hT7C IUQgWVn3rdvg1xd2VcqDjVwZQifrBYJUgE4mzEyJCCNvD0UaYTKB X-Google-Smtp-Source: AGHT+IGm7VFjdWk5oFW1EL7vDktxPl+IbAliri9FUxVNUNrzj4cpEoYxcYfAz3Coa/2nzibjwWQpQg== X-Received: by 2002:a05:6512:3084:b0:539:9155:e8d4 with SMTP id 2adb3069b0e04-53d65dcfa0bmr5386694e87.8.1730728386111; Mon, 04 Nov 2024 05:53:06 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac2:4c46:0:b0:53c:75e8:a5d5 with SMTP id 2adb3069b0e04-53c7951b91bls177147e87.2.-pod-prod-06-eu; Mon, 04 Nov 2024 05:53:04 -0800 (PST) X-Received: by 2002:a05:6512:1114:b0:536:7b74:ef50 with SMTP id 2adb3069b0e04-53d65de6e7fmr4899097e87.18.1730728383850; Mon, 04 Nov 2024 05:53:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1730728383; cv=none; d=google.com; s=arc-20240605; b=OOIO3IyUqZHLVAO+0J0rqvqad6+eAA9QV+vEWrkhBoJdUOqyiR7R4YXIMTzh8edZWB 8GvWxI6DHXbFTzc3U/WtMtnyzCazkJRdtaPrzlUY0WuREz0kVOu3Nv2O8298VVCNGrwK ycjlPm2ndNuCAzvsUDr8QtKCrqrlnwkSN9u+EOxOEu4EozsxdSHNQbbG0wmHM6PZkvIS pn3UP+m5ZvX9erApv8c1WDf2PPufv40z0dQnYuBjpW+dZmuV8kSH8zkM5Rynnt6sybwn 4OLALGh6ZlOCkar1XA4c+v/26SOeYijloyVvu9gADpnsg6qZhs4v1RbpeTvtx+DpJ2j+ bGgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:to:from:subject:message-id; bh=FQDo9sTzICvy1mhi2K8z6lLAkBnYmvWPu8AGm9gjyYc=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=NEDn07yVUE+UNueeFzBPBhaJfsIrXNPIQQ6wCRoDnQn+6QEXaB0knmsrH620BtW8ld 2G5LhK6f3A0B1S/96JCPDVNvFNhiAsPtezoQCc27CH1o8fxh9JIiprgrOEtHr7AkuJE5 J0gzzJ6BPYtzp63Y62uZ4nZJqpW7qwDYcJSu5nBi79mmlkWHJKhCfgkfnciyJRU2OSEr +JxStg+/XI1nwiTXSsGtfbdmcoyqyXVb9y9FYDryPOdx3aIjwsooXxWyzyui15f0+gie DCbhSmiTEj6ZQmskmPJpiE84y37zjINSRD/jtLjciPFNZW2UUdmed8JkKoxY8XxXvonh VnhQ==; 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 2adb3069b0e04-53c7bca1752si167602e87.7.2024.11.04.05.53.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Nov 2024 05:53:03 -0800 (PST) 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 [IPv6:::1] (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 4A4Dr0Qq007783 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 4 Nov 2024 14:53:02 +0100 Message-ID: Subject: Re: [PATCH] isar-bootstrap: Run setup-chroot.sh after dpkg upgraded From: Uladzimir Bely To: isar-users@googlegroups.com Date: Mon, 04 Nov 2024 16:53:00 +0300 In-Reply-To: <20241028073231.14162-1-ubely@ilbers.de> References: <20241028073231.14162-1-ubely@ilbers.de> Autocrypt: addr=ubely@ilbers.de; prefer-encrypt=mutual; keydata=mQENBGO2eUkBCACtT+T3OrPVSExBmqfgXT3lp9XcdxRzjYp26wezkgYjjBXaf36bxtaAf S471VoQtpar0RVeFfW7WDDdfX9ZclSj36zBQe+RVSJzoNoNQfjOXWuSHb5Z+cpAFtqBY4muxK4+ia IlLJd6CN3ejOsLHATtCeHHq8wi0z2T+KdLQO+wQRgo2hjj0Lp9pGTrKJry50HP/o7Vbdu14dOx2xq r8+wPc6SQbBIrcqaa4MqCQC00vQG7eXvo+k2MOw59FDdpMH0KR9mHgp3u/s4I+4YRBArukt9G9xz/ rsEFmxAIBC6N/a6Hzwg4puc91n7ABDsPg8Vp+X3MDraujN0dvR6OKVNtABEBAAG0IFVsYWR6aW1pc iBCZWx5IDx1YmVseUBpbGJlcnMuZGU+iQFOBBMBCAA4FiEEJqPNVhVGyk12Eh+PAUQYBM/2FkoFAm O2eUkCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQAUQYBM/2FkprlAgAmuna8Hm9EyoEtTl DBGDg6Zm4ZLp5ffvZBE946h92jepDrteoxsJ7pSzJVC2HmDLa4iZUao7lLLbDsUj5x45/iLJcqBZK k3YnAxP2r6a+kI+1VVQY1pxdG1nlJAbdNzoojm/qmezNPSrqni61KVMQKsXBCWhIjSXDSM9CsBj21 a+9qaVqfxovJGTn9lgrZO+xzKQNMKZeOouJlscVuFj21P0ww3/YENiU/nMeTSuYypO76mDtAd08Jo nc3yuHa9MJGei5ixN3wT+IrGR2aL2hdw2M6NgH7sYbL2Zi4ugD6RXHJai1Bh2yvFSVqSQ+M6QOInT 4ud7wslm1XRB065dXtA== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.1 (by Flathub.org) 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 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: /rQh+LcJbg7B On Mon, 2024-10-28 at 10:32 +0300, Uladzimir Bely wrote: > 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. >=20 > 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. >=20 > This results in following things: > =C2=A0- "real" start-stop-daemon is called in all chroots during build; > =C2=A0- start-stop-daemon is removed on target rootfs by > "rootfs_finalize". >=20 > 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. >=20 > 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. >=20 > Signed-off-by: Uladzimir Bely > --- > =C2=A0meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 11 +++++++---= - > =C2=A01 file changed, 7 insertions(+), 4 deletions(-) >=20 > 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() { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sed -i '/en_US.UTF-8 UTF= -8/s/^#//g' > "${ROOTFSDIR}/etc/locale.gen" > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 chroot "${ROOTFSDIR}" /u= sr/sbin/locale-gen > =C2=A0 > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # setup chroot > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 install -v -m755 "${WORKDIR}/= chroot-setup.sh" > "${ROOTFSDIR}/chroot-setup.sh" > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "${ROOTFSDIR}/chroot-setup.sh= " "setup" "${ROOTFSDIR}" > - > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # update APT > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mount -o bind,private /d= ev ${ROOTFSDIR}/dev > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mount -o bind,private /d= ev/pts "${ROOTFSDIR}/dev/pts" > @@ -394,6 +390,13 @@ do_bootstrap() { > =C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 chroot "${ROOTFSDIR}" /u= sr/bin/apt-get update -y \ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -o APT::Update::Error-Mode=3D= any > + > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 chroot "${ROOTFSDIR}" /usr/bi= n/apt-get install -y dpkg > + > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # setup chroot > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 install -v -m755 "${WORKDIR}/= chroot-setup.sh" > "${ROOTFSDIR}/chroot-setup.sh" > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "${ROOTFSDIR}/chroot-setup.sh= " "setup" "${ROOTFSDIR}" > + > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 chroot "${ROOTFSDIR}" /u= sr/bin/apt-get install -y -f > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 chroot "${ROOTFSDIR}" /u= sr/bin/apt-get dist-upgrade -y \ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -o Debug::pkgProblemResolver= =3Dyes > --=20 > 2.45.2 >=20 Applied to next. --=20 Best regards, Uladzimir. --=20 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 e= mail to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/= fddeea7aadf982fa07ea7e533163bb4eae12fd30.camel%40ilbers.de.