public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Anton Mikanovich <amikan@ilbers.de>
To: "Moessbauer, Felix" <felix.moessbauer@siemens.com>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Cc: "Schild, Henning" <henning.schild@siemens.com>,
	"jan.kiszka@siemens.com" <jan.kiszka@siemens.com>,
	Baurzhan Ismagulov <ibr@ilbers.de>
Subject: Re: sbuild: use build-depends from backports
Date: Tue, 9 Aug 2022 20:45:13 +0300	[thread overview]
Message-ID: <dafcc1db-4adc-d39f-e48c-14e3a432ab22@ilbers.de> (raw)
In-Reply-To: <AM9PR10MB48695E240C20071A19207BC589639@AM9PR10MB4869.EURPRD10.PROD.OUTLOOK.COM>

[-- Attachment #1: Type: text/plain, Size: 2833 bytes --]

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) ...

[-- Attachment #2: Type: text/html, Size: 5951 bytes --]

      reply	other threads:[~2022-08-09 17:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-08  8:17 Moessbauer, Felix
2022-08-09 17:45 ` Anton Mikanovich [this message]

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=dafcc1db-4adc-d39f-e48c-14e3a432ab22@ilbers.de \
    --to=amikan@ilbers.de \
    --cc=felix.moessbauer@siemens.com \
    --cc=henning.schild@siemens.com \
    --cc=ibr@ilbers.de \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.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