From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7298651895968563200 X-Received: by 2002:a05:6512:4026:b0:507:a16d:cf55 with SMTP id br38-20020a056512402600b00507a16dcf55mr31368597lfb.68.1699356026345; Tue, 07 Nov 2023 03:20:26 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:6919:0:b0:4f9:5599:26a with SMTP id e25-20020a196919000000b004f95599026als826388lfc.2.-pod-prod-08-eu; Tue, 07 Nov 2023 03:20:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2YjnMqxEDFkSUcd7me747UoB/qrzBwTyraChI1UwQNmUy3tRt98i1VmljcG6bVARWnGM9 X-Received: by 2002:a05:6512:2393:b0:509:30d4:ea92 with SMTP id c19-20020a056512239300b0050930d4ea92mr20224992lfv.52.1699356023976; Tue, 07 Nov 2023 03:20:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699356023; cv=none; d=google.com; s=arc-20160816; b=y8wz0gi6towI1KAx2quNhl45Gw8iWXIFb4KSDwo52/vntMMDlx7uOUjxP1b9s3jV54 lKUsLjhHfE4GL9GGPmx83D1cyIgOH/hktPGd8TNOhTqSY7c3SdTzPV6I1r/9KJnDx6ea dygm0cVZ5Pzajacm+gqCnMks7GFfOP25n6mJ0NRme+1zMIx1471jXu7OJmolCMnzvGgM ENRTfFgF93sNF9cZfhWl/QIRMfzfq4j6ivqX3EWViep/+1m52QN8h66XMT0x463mPEof dXs++OA2DpqkUQLcmQkFevyRfzjfD4xB8x4w+Eg+N0DgABUFcMoPWFRxHqZGeIlU8fi/ mwag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id; bh=hVEqZgQH0cInoym/OkMRL6nFQWNYjLuw1Fv7JZyITfg=; fh=0zTvXV5XVTk++0d6r5DXwAMDnM03URK/gQ79HSr97sY=; b=eJ2/lrBtUuZ7LJi/fXfhicH6D0iMzWy45GM++Q9hZoIDXWEctD9SA8C/QzEehy7C8h gRMxJlYPVQupcjRjyjtwYZ9xwApo6GVkcdlh+dOXTeh1uDhlC/CTSbHOxV7sXvIxLfJF fclWmcFs96gs03B/fFAP9AkemQV1lKqXcsvwPz1XDRa+jPNj4dRWBXp/AMuXWPYPWjaJ rzp+rAJLL0D3q3Mwvnz0V5jtsGe4KINfl2RJIC+bPi4lv4DfIBL4eibWZGV2KUgjlGZB usV3j/gIlUrMIKmZ42U37V2fu2m3mQ93ppb2NpSuhUAtJp5LOwnAD70hGgQkFxN5icKn PoDg== 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 Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id s17-20020a05600c45d100b00401df7502b6si804103wmo.1.2023.11.07.03.20.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Nov 2023 03:20:23 -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; 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 Received: from [127.0.0.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 3A7BKL3a005817 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 7 Nov 2023 12:20:22 +0100 Message-ID: <30a376fe-bae5-4506-9723-4c3bf8e77087@ilbers.de> Date: Tue, 7 Nov 2023 13:20:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Migration to SCHROOT To: srinu , isar-users References: Content-Language: en-US, ru-RU From: Anton Mikanovich In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED 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-TUID: jLH3NXg/nhbI 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 /<> > 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 /<> > 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 > .