From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7129416509672128512 X-Received: by 2002:a05:6808:1309:b0:342:d25e:dd33 with SMTP id y9-20020a056808130900b00342d25edd33mr6323033oiv.178.1660067119436; Tue, 09 Aug 2022 10:45:19 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6871:595:b0:10e:c5cb:acd1 with SMTP id u21-20020a056871059500b0010ec5cbacd1ls3150676oan.5.-pod-prod-gmail; Tue, 09 Aug 2022 10:45:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR7QuJTU14rqsBZYHe6KT99x6Q3zAVAqyghDdCcHBxSRcCT9hKKCTIoOyHcksH2fm/Ms1jLJ X-Received: by 2002:a05:6870:4588:b0:116:a853:6f21 with SMTP id y8-20020a056870458800b00116a8536f21mr1213462oao.146.1660067118523; Tue, 09 Aug 2022 10:45:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660067118; cv=none; d=google.com; s=arc-20160816; b=q9zc0GTC8ZhTV8/MjGQLHOY1mRVT5yQBgdoCSlNvExaz60CCtued6dUIUl5BFGJMM5 VclpZh9WTiWNIZfTLGF9tUyWzclBsZYv5bCwYBlKYUI7586XBdkBvODDGrfY5QKcys4s WTRRFdGCNhekYlSsY4tpy4n5PzNPukMRuyOajc5fMTzWX2n3uMUiIEoWComYwwh4VB9i xd4UVPx6xllQzLZx71mfVlO9Got8RMo8SlH7K5Nmqw9rezQPhnPRtIEjyEiIqgcA/tBn oT8jEVUejQG4DGYsB34PWyUmEgOUV5CeYGqrvRGhWwHG85NNymlKJIrH30Z5laLvBoia ry4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id; bh=N0NEWWEZWpk1jkU98a/DwZXPbFaWSEHFe68WMIESPCE=; b=NwOIU9AuHteS3fbgrR78A6JrFeSO1C6H9t3XrEzDAkI6CWqcQVuy01rR8ccWF3r1jP /8Y8Dd605uieh7CITa/dlEDepPXk7umAyjAmc8vgQTggyuZ5bj4O4ocAvC/31+sR+MuD dT+ucLc/xWP++u3dBZFNwXnr4fwJZD5GoGt/1LdXpq2sbi/0QZCMYmufJn/7jMrd/K07 tQFhZcEK4ODxqpnbHCNJmh/67p1MkKyMDZ+T3FSqPw32C+vAaiCGVNKL521Z0xvgww04 +UadLU+S4LIPnLDemQE/ODVdKkype8c9pcDuUnjuG8iYfm/p9xqiIaSKkMx8EUb7/NaP OmtQ== 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 f65-20020aca3844000000b0033b5d43a811si16247oia.4.2022.08.09.10.45.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Aug 2022 10:45:18 -0700 (PDT) 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 279HjDDq029423 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 9 Aug 2022 19:45:15 +0200 Content-Type: multipart/alternative; boundary="------------boGJaN5IMR8aRcU5QB09n40v" Message-ID: Date: Tue, 9 Aug 2022 20:45:13 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: sbuild: use build-depends from backports Content-Language: en-US To: "Moessbauer, Felix" , "isar-users@googlegroups.com" Cc: "Schild, Henning" , "jan.kiszka@siemens.com" , Baurzhan Ismagulov References: From: Anton Mikanovich In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE 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: nlwbY7Or8ep/ This is a multi-part message in MIME format. --------------boGJaN5IMR8aRcU5QB09n40v Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 08.08.2022 11:17, Moessbauer, Felix wrote: > > Hi, > > In ISAR v0.9 we were able to use build dependencies from the backports > repository: > > 1. Add the backports repo to DISTRO_APT_SOURCES > 2. Write an apt preferences file to prefer the backports package and > add it to DISTRO_APT_PREFERENCES > > This still works for runtime dependencies, but not for build dependencies. > The sbuilder simply does not attract the package from backports as > they have "NotAutomatic: yes". > > Maybe we could work around by using ` --build-dep-resolver="apt"`. > But then more questions arise: > > - are the DISTRO_APT_SOURCES added as –external-repository? I don’t > think so > > - when creating the base-schroot: Is the repo considered (and are > DISTRO_APT_PREFERENCES active) > > - are the DISTRO_APT_PREFERENCES files added to the schroot? > > Help wanted. > > Felix > Hello Felix, I've tried to setup Debian Bullseye with backports preferred on the latest next and it supposed to work. Here are all the changes I've made: diff --git a/meta/conf/distro/debian-bullseye-backports.list b/meta/conf/distro/debian-bullseye-backports.list new file mode 100644 index 0000000..90f1c9a --- /dev/null +++ b/meta/conf/distro/debian-bullseye-backports.list @@ -0,0 +1,2 @@ +deb http://deb.debian.org/debian bullseye-backports main contrib non-free +deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free diff --git a/meta/conf/distro/debian-bullseye-backports.pref b/meta/conf/distro/debian-bullseye-backports.pref new file mode 100644 index 0000000..381ce80 --- /dev/null +++ b/meta/conf/distro/debian-bullseye-backports.pref @@ -0,0 +1,3 @@ +Package: * +Pin: release a=bullseye-backports +Pin-Priority: 1000 diff --git a/meta/conf/distro/debian-bullseye.conf b/meta/conf/distro/debian-bullseye.conf index 9e07269..e3dd079 100644 --- a/meta/conf/distro/debian-bullseye.conf +++ b/meta/conf/distro/debian-bullseye.conf @@ -10,3 +10,7 @@ DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"  DISTRO_KERNELS ?= "4kc-malta 5kc-malta 686 686-pae amd64 arm64 armmp \      armmp-lpae cloud-amd64 loongson-3 octeon powerpc64le rpi s390x marvell \      rt-686-pae rt-amd64 rt-arm64 rt-armmp" + +DISTRO_APT_SOURCES = "conf/distro/${BASE_DISTRO}-${BASE_DISTRO_CODENAME}.list conf/distro/${BASE_DISTRO}-${BASE_DISTRO_CODENAME}-backports.list" + +DISTRO_APT_PREFERENCES = "conf/distro/${BASE_DISTRO}-${BASE_DISTRO_CODENAME}-backports.pref" After that I've just built the target: $ bitbake mc:qemuamd64-bullseye:isar-image-base And see that backports package versions are actually used. For example: $ cat build/tmp/work/debian-bullseye-amd64/example-module-amd64/1.0-r0/temp/log.do_dpkg_build | grep "Setting up linux-compiler-gcc-10-x86" Setting up linux-compiler-gcc-10-x86 (5.18.14-1~bpo11+1) ... --------------boGJaN5IMR8aRcU5QB09n40v Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
08.08.2022 11:17, Moessbauer, Felix wrote:

Hi,

 

In ISAR v0.9 we were able to use build dependencies from the backports repository:

 

  1. Add the backports repo to DISTRO_APT_SOURCES  
  2. Write an apt preferences file to prefer the backports package and add it to DISTRO_APT_PREFERENCES

 

This still works for runtime dependencies, but not for build dependencies.
The sbuilder simply does not attract the package from backports as they have "NotAutomatic: yes".

 

Maybe we could work around by using ` --build-dep-resolver="apt"`.
But then more questions arise:

- are the DISTRO_APT_SOURCES added as –external-repository? I don’t think so

- when creating the base-schroot: Is the repo considered (and are DISTRO_APT_PREFERENCES active)

- are the DISTRO_APT_PREFERENCES files added to the schroot?

 

Help wanted.

 

Felix

Hello Felix,

I've tried to setup Debian Bullseye with backports preferred on the latest next and it supposed to work.
Here are all the changes I've made:

diff --git a/meta/conf/distro/debian-bullseye-backports.list b/meta/conf/distro/debian-bullseye-backports.list
new file mode 100644
index 0000000..90f1c9a
--- /dev/null
+++ b/meta/conf/distro/debian-bullseye-backports.list
@@ -0,0 +1,2 @@
+deb    http://deb.debian.org/debian bullseye-backports main contrib non-free
+deb-src        http://deb.debian.org/debian bullseye-backports main contrib non-free
diff --git a/meta/conf/distro/debian-bullseye-backports.pref b/meta/conf/distro/debian-bullseye-backports.pref
new file mode 100644
index 0000000..381ce80
--- /dev/null
+++ b/meta/conf/distro/debian-bullseye-backports.pref
@@ -0,0 +1,3 @@
+Package: *
+Pin: release a=bullseye-backports
+Pin-Priority: 1000
diff --git a/meta/conf/distro/debian-bullseye.conf b/meta/conf/distro/debian-bullseye.conf
index 9e07269..e3dd079 100644
--- a/meta/conf/distro/debian-bullseye.conf
+++ b/meta/conf/distro/debian-bullseye.conf
@@ -10,3 +10,7 @@ DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"
 DISTRO_KERNELS ?= "4kc-malta 5kc-malta 686 686-pae amd64 arm64 armmp \
     armmp-lpae cloud-amd64 loongson-3 octeon powerpc64le rpi s390x marvell \
     rt-686-pae rt-amd64 rt-arm64 rt-armmp"
+
+DISTRO_APT_SOURCES = "conf/distro/${BASE_DISTRO}-${BASE_DISTRO_CODENAME}.list conf/distro/${BASE_DISTRO}-${BASE_DISTRO_CODENAME}-backports.list"
+
+DISTRO_APT_PREFERENCES = "conf/distro/${BASE_DISTRO}-${BASE_DISTRO_CODENAME}-backports.pref"

After that I've just built the target:

$ bitbake mc:qemuamd64-bullseye:isar-image-base

And see that backports package versions are actually used. For example:

$ cat build/tmp/work/debian-bullseye-amd64/example-module-amd64/1.0-r0/temp/log.do_dpkg_build | grep "Setting up linux-compiler-gcc-10-x86"
Setting up linux-compiler-gcc-10-x86 (5.18.14-1~bpo11+1) ...

--------------boGJaN5IMR8aRcU5QB09n40v--