From: "Arjunan, Srinu" <srinuvasan.a@siemens.com>
To: Anton Mikanovich <amikan@ilbers.de>,
isar-users <isar-users@googlegroups.com>
Subject: RE: Migration to SCHROOT
Date: Tue, 7 Nov 2023 12:41:53 +0000 [thread overview]
Message-ID: <PUZPR06MB5747F003DE798732C0907D6188A9A@PUZPR06MB5747.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <30a376fe-bae5-4506-9723-4c3bf8e77087@ilbers.de>
Hi Anton,
Thanks for the update, I understood this one, but in my case I need to install the custom packages in persistent sbuildchroot , because this packages details referred multiple places in different classes for some processing meta data before image creation.
I don't' want the session kind of approach at least for achieving the above criteria, hence I used the old buildchroot style of configuration like "configure_isar_apt" in sbuildchroot.
In this way I can able to install few custom packages in sbuildchroot, most of the things are working fine, but in some packages am facing build failure
Because sbuild automatically do the apt-get upgrade , this will upgrade the base-files packages already installed in buildchroot.
When we bootstrap we normally do the upgrade and get the latest version of the packages installed in the chroot, this can be carry over to the buildchroot, again I don't want to do the apt-get upgrade, but sbuild does by default.
I used --no-apt-upgrade , but this one sporadically throws the dpkg error as I mentioned in the below thread, but some the clean build works fine.
Can you please suggest how to disable the schroot upgrade step in sbuild like how we did --no-apt-update previously in sbuild?
Thanks,
Srinu
-----Original Message-----
From: Anton Mikanovich <amikan@ilbers.de>
Sent: 07 November 2023 16:50
To: Arjunan, Srinu (DI CTO FDS CES LX PBU RSOL) <srinuvasan.a@siemens.com>; isar-users <isar-users@googlegroups.com>
Subject: Re: Migration to SCHROOT
Hello Srinuvasan,
It looks like you are mixing up two different steps where schroot is used:
1) Package building with sbuild
On this step sbuild takes care of schroot session creation and overlay removing.
Packages that are needed for building should be controlled with Build-Depends field of debian/control (or DEBIAN_BUILD_DEPENDS option).
2) Image preparation
On this step schroot session is created by Isar, so imager_run API can be used to execute several commands inside one session. But this schroot session is not persisted and all the changes will be lost after exit.
Sbuild is not used on this stage.
Packages that are needed for image preparation are set with IMAGER_INSTALL option (or WIC_IMAGER_INSTALL for WIC). If some of those packages need to be build with Isar, they should be also added to IMAGER_BUILD_DEPS.
Anyway there is no need in manual package installation. And also all rootfs changes done during package build and image prepare will be lost with no influence on target rootfs.
07/11/2023 11:36, 'srinu' via isar-users wrote:
> Hi All,
>
> Recently we are migrating one of our downstream layer from
> BUILDCHROOT to SBUILDCHROOT.
>
> My understanding follows:
> Schroot is the light weight chroot and it's contains the bare-metal
> packages which will be used across all the recipes, it has common list
> of the packages installed in minimum Debian file system.
>
> In ISAR we have imager_run function, which is mostly used in the
> imager creation part, it will start the session using sbuildchroot and
> do the necessary shell commands then remove the sessions.
>
> I used this imager_run for my downstream layer specifically for imager
> part, but apart from i have some other scenario as well
>
> In the existing implementation, we install our few custom packages in
> buildchroot and later this will referenced for processing the image
> creation, but this is not possible with the session kind of chroot.
>
> Hence i revert back the few configuration like "configure_isar_apt",
> now i have bootstrap.list as well as the isar-apt.list in
> /etc/apt/source.list.d, in this scenario i can able to install my
> custom packages in persistent schroot, later this package refer for
> some other purposes.
>
> With this changes most of the things are working fine, but in
> simatic-vmm recipe it getting failed.
>
> When i enable the logs in sbuild, by default it's doing apt-get
> upgrade , hence we have two list and isar-apt list is the highest
> priority, actually we need some version changes in base-files
> therefore we make this as a custom package.
>
> Sbuild by default doing the apt-get upgrade in this time already
> base-files installed in the bootstrap (debian upstream version), and
> it is upgraded from isar-apt, but i don't want to upgrade here for
> just building the packages.
>
> i disable the apt-get upgrade but again my build get failed for first
> time, when i retrigger it's getting passed.
>
> I hope the Dpkg::Option::=--force-confold to be the reason.
>
>
> *My requirements:*
>
> 1. How to install the custom packages in persistent schroot , other
> than what is used method here 2.In Old buildchroot it is upgraded in
> the bootstrap stage itself, not buildchroot stage, how to disable
> upgrade packages in sbuild?, i used --no-apt-upgrade but not works.
>
>
> Logs when i disable apt-get upgrade:
>
> D: Running command: schroot -d / -c
> mel-mandovi-c0b2ad7f-cc62-434e-8f59-8a4441c185ee-1288637-69a848ac-1e41-4f06-a047-90d272df6b9a
> --run-session -q -u root -p -- apt-cache gencaches
> E: dpkg was interrupted, you must manually run 'dpkg --configure -a'
> to correct the problem.
> E: Updating apt archive failed
> D: Setting This Time=0
> I: schroot -d / -c
> mel-mandovi-c0b2ad7f-cc62-434e-8f59-8a4441c185ee-1288637-69a848ac-1e41-4f06-a047-90d272df6b9a
> --run-session -q -u root -p -- test -d /<<PKGBUILDDIR>>
> D: Running command: schroot -d / -c
> mel-mandovi-c0b2ad7f-cc62-434e-8f59-8a4441c185ee-1288637-69a848ac-1e41-4f06-a047-90d272df6b9a
> --run-session -q -u root -p -- test -d /<<PKGBUILDDIR>>
> D: Setting This Space=-1
> D: Error run_fetch_install_packages(): Package build dependencies not
> satisfied; skippingD: Setting Pkg Status=failed
> D: Setting Pkg Fail Stage=install-deps
> I: schroot -d / -c
> mel-mandovi-c0b2ad7f-cc62-434e-8f59-8a4441c185ee-1288637-69a848ac-1e41-4f06-a047-90d272df6b9a
> --run-session -q -u root -p -- apt-get --purge -o
> DPkg::Options::=--force-confold -o
> DPkg::Options::=--refuse-remove-essential -o
> APT::Install-Recommends=false -o Dpkg::Use-Pty=false -q --simulate
> install sbuild-build-depends-main-dummy
> -oDebug::pkgProblemResolver=true -oDebug::pkgDepCache::Marker=1
> -oDebug::pkgDepCache::AutoInstall=1 -oDebug::BuildDeps=1
> D: Running command: schroot -d / -c
> mel-mandovi-c0b2ad7f-cc62-434e-8f59-8a4441c185ee-1288637-69a848ac-1e41-4f06-a047-90d272df6b9a
> --run-session -q -u root -p -- apt-get --purge -o
> DPkg::Options::=--force-confold -o
> DPkg::Options::=--refuse-remove-essential -o
> APT::Install-Recommends=false -o Dpkg::Use-Pty=false -q --simulate
> install sbuild-build-depends-main-dummy
> -oDebug::pkgProblemResolver=true -oDebug::pkgDepCache::Marker=1
> -oDebug::pkgDepCache::AutoInstall=1 -oDebug::BuildDeps=1
> Reading package lists...
> Building dependency tree...
> Reading state information...
> MarkInstall sbuild-build-depends-main-dummy:amd64 < none ->
> 0.invalid.0 @un puN Ib > FU=1
> Installing linux-headers-ipc:amd64 as Depends of
> sbuild-build-depends-main-dummy:amd64
> MarkInstall linux-headers-ipc:amd64 < none ->
> 4:6.1.54-cip6-rt3+ind2-1 @un puN > FU=0
> MarkInstall libc6:amd64 < 2.36-9+deb12u3 @ii pK > FU=0
> MarkInstall libgcc-s1:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall gcc-12-base:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall libssl3:amd64 < 3.0.11-1~deb12u2 @ii pK > FU=0
> MarkInstall build-essential:amd64 < 12.9 @ii pK > FU=0
> MarkInstall libc6-dev:amd64 < 2.36-9+deb12u3 @ii pK > FU=0
> MarkInstall linux-libc-dev:amd64 < 6.1.55-1 @ii pK > FU=0
> MarkInstall libcrypt-dev:amd64 < 1:4.4.33-2 @ii pK > FU=0
> MarkInstall libcrypt1:amd64 < 1:4.4.33-2 @ii pK > FU=0
> MarkInstall libnsl-dev:amd64 < 1.3.0-2 @ii pK > FU=0
> MarkInstall libnsl2:amd64 < 1.3.0-2 @ii pK > FU=0
> MarkInstall libtirpc3:amd64 < 1.3.3+ds-1 @ii pK > FU=0
> MarkInstall libgssapi-krb5-2:amd64 < 1.20.1-2+deb12u1
> @ii pK > FU=0
> MarkInstall libcom-err2:amd64 < 1.47.0-2 @ii pK > FU=0
> MarkInstall libk5crypto3:amd64 < 1.20.1-2+deb12u1 @ii
> pK > FU=0
> MarkInstall libkrb5support0:amd64 < 1.20.1-2+deb12u1
> @ii pK > FU=0
> MarkInstall libkrb5-3:amd64 < 1.20.1-2+deb12u1 @ii pK
> > FU=0
> MarkInstall libkeyutils1:amd64 < 1.6.3-2 @ii pK > FU=0
> MarkInstall libtirpc-common:amd64 < 1.3.3+ds-1 @ii pK > FU=0
> MarkInstall libtirpc-dev:amd64 < 1.3.3+ds-1 @ii pK > FU=0
> MarkInstall gcc:amd64 < 4:12.2.0-3 @ii pK > FU=0
> MarkInstall cpp:amd64 < 4:12.2.0-3 @ii pK > FU=0
> MarkInstall cpp-12:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall libgmp10:amd64 < 2:6.2.1+dfsg1-1.1 @ii pK > FU=0
> MarkInstall libisl23:amd64 < 0.25-1 @ii pK > FU=0
> MarkInstall libmpc3:amd64 < 1.3.1-1 @ii pK > FU=0
> MarkInstall libmpfr6:amd64 < 4.2.0-1 @ii pK > FU=0
> MarkInstall libzstd1:amd64 < 1.5.4+dfsg2-5 @ii pK > FU=0
> MarkInstall zlib1g:amd64 < 1:1.2.13.dfsg-1 @ii pK > FU=0
> MarkInstall gcc-12:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall libcc1-0:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall libstdc++6:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall binutils:amd64 < 2.40-2 @ii pK > FU=0
> MarkInstall binutils-common:amd64 < 2.40-2 @ii pK > FU=0
> MarkInstall libbinutils:amd64 < 2.40-2 @ii pK > FU=0
> MarkInstall binutils-x86-64-linux-gnu:amd64 < 2.40-2 @ii
> pK > FU=0
> MarkInstall libctf-nobfd0:amd64 < 2.40-2 @ii pK > FU=0
> MarkInstall libctf0:amd64 < 2.40-2 @ii pK > FU=0
> MarkInstall libgprofng0:amd64 < 2.40-2 @ii pK > FU=0
> MarkInstall libjansson4:amd64 < 2.14-2 @ii pK > FU=0
> MarkInstall libgcc-12-dev:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall libgomp1:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall libitm1:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall libatomic1:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall libasan8:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall liblsan0:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall libtsan2:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall libubsan1:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall libquadmath0:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall g++:amd64 < 4:12.2.0-3 @ii pK > FU=0
> MarkInstall g++-12:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall libstdc++-12-dev:amd64 < 12.2.0-14 @ii pK > FU=0
> MarkInstall dpkg-dev:amd64 < 1.21.22 @ii pK > FU=0
> MarkInstall libdpkg-perl:amd64 < 1.21.22 @ii pK > FU=0
> Starting pkgProblemResolver with broken count: 0
> Starting 2 pkgProblemResolver with broken count
>
> Many thanks,
> Srinuvasan.A
>
>
> --
> 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 on the web visit
> https://groups.google.com/d/msgid/isar-users/ccaa8407-8a3d-4b7e-8f2e-9bea16c5993en%40googlegroups.com
> <https://groups.google.com/d/msgid/isar-users/ccaa8407-8a3d-4b7e-8f2e-9bea16c5993en%40googlegroups.com?utm_medium=email&utm_source=footer>.
next prev parent reply other threads:[~2023-11-07 12:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-07 9:36 srinu
2023-11-07 11:20 ` Anton Mikanovich
2023-11-07 12:41 ` Arjunan, Srinu [this message]
2023-11-07 13:25 ` Jan Kiszka
2023-11-08 5:21 ` Arjunan, Srinu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PUZPR06MB5747F003DE798732C0907D6188A9A@PUZPR06MB5747.apcprd06.prod.outlook.com \
--to=srinuvasan.a@siemens.com \
--cc=amikan@ilbers.de \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox