* Migration to SCHROOT
@ 2023-11-07 9:36 srinu
2023-11-07 11:20 ` Anton Mikanovich
0 siblings, 1 reply; 5+ messages in thread
From: srinu @ 2023-11-07 9:36 UTC (permalink / raw)
To: isar-users
[-- Attachment #1.1: Type: text/plain, Size: 8154 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 9669 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Migration to SCHROOT
2023-11-07 9:36 Migration to SCHROOT srinu
@ 2023-11-07 11:20 ` Anton Mikanovich
2023-11-07 12:41 ` Arjunan, Srinu
0 siblings, 1 reply; 5+ messages in thread
From: Anton Mikanovich @ 2023-11-07 11:20 UTC (permalink / raw)
To: srinu, isar-users
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>.
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Migration to SCHROOT
2023-11-07 11:20 ` Anton Mikanovich
@ 2023-11-07 12:41 ` Arjunan, Srinu
2023-11-07 13:25 ` Jan Kiszka
0 siblings, 1 reply; 5+ messages in thread
From: Arjunan, Srinu @ 2023-11-07 12:41 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
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>.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Migration to SCHROOT
2023-11-07 12:41 ` Arjunan, Srinu
@ 2023-11-07 13:25 ` Jan Kiszka
2023-11-08 5:21 ` Arjunan, Srinu
0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2023-11-07 13:25 UTC (permalink / raw)
To: Arjunan, Srinu, Anton Mikanovich, isar-users
On 07.11.23 13:41, 'Arjunan, Srinu' via isar-users wrote:
> 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.
Have a look at SBUILD_CHROOT_PREINSTALL_EXTRA, but maybe not to override
for everyone. Here is an example to create an extended SBUILD_FLAVOR:
meta-isar/recipes-app/hello-isar/hello-isar.bb
meta-isar/recipes-app/libhello/libhello.bb
meta-isar/recipes-devtools/sbuild-chroot/sbuild-chroot-host-db2m.bb
meta-isar/recipes-devtools/sbuild-chroot/sbuild-chroot-target-db2m.bb
>
> 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.
Only if there are living replacements in isar-apt. We do not update
base-apt packages.
> 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?
>
I suspect there are additional, local changes on your side involved
causing the issues. If you don't think so, please demonstrate the
issue(s) with vanilla Isar.
Jan
--
Siemens AG, Technology
Linux Expert Center
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Migration to SCHROOT
2023-11-07 13:25 ` Jan Kiszka
@ 2023-11-08 5:21 ` Arjunan, Srinu
0 siblings, 0 replies; 5+ messages in thread
From: Arjunan, Srinu @ 2023-11-08 5:21 UTC (permalink / raw)
To: Kiszka, Jan, Anton Mikanovich, isar-users
Hi Jan,
Thanks for the suggestion, let me check this one is fitting for my requirements, and meanwhile I will do some POC on vanilla ISAR too.
Many thanks,
Srinuvasan.A
-----Original Message-----
From: Kiszka, Jan (T CED) <jan.kiszka@siemens.com>
Sent: 07 November 2023 18:56
To: Arjunan, Srinu (DI CTO FDS CES LX PBU RSOL) <srinuvasan.a@siemens.com>; Anton Mikanovich <amikan@ilbers.de>; isar-users <isar-users@googlegroups.com>
Subject: Re: Migration to SCHROOT
On 07.11.23 13:41, 'Arjunan, Srinu' via isar-users wrote:
> 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.
Have a look at SBUILD_CHROOT_PREINSTALL_EXTRA, but maybe not to override for everyone. Here is an example to create an extended SBUILD_FLAVOR:
meta-isar/recipes-app/hello-isar/hello-isar.bb
meta-isar/recipes-app/libhello/libhello.bb
meta-isar/recipes-devtools/sbuild-chroot/sbuild-chroot-host-db2m.bb
meta-isar/recipes-devtools/sbuild-chroot/sbuild-chroot-target-db2m.bb
>
> 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.
Only if there are living replacements in isar-apt. We do not update base-apt packages.
> 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?
>
I suspect there are additional, local changes on your side involved causing the issues. If you don't think so, please demonstrate the
issue(s) with vanilla Isar.
Jan
--
Siemens AG, Technology
Linux Expert Center
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-08 5:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-07 9:36 Migration to SCHROOT srinu
2023-11-07 11:20 ` Anton Mikanovich
2023-11-07 12:41 ` Arjunan, Srinu
2023-11-07 13:25 ` Jan Kiszka
2023-11-08 5:21 ` Arjunan, Srinu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox