From: "'cedric.hombourger@siemens.com' via isar-users" <isar-users@googlegroups.com>
To: "isar-users@googlegroups.com" <isar-users@googlegroups.com>,
"Kiszka, Jan" <jan.kiszka@siemens.com>
Subject: Re: [PATCH 1/1] dpkg-raw: make sure do_install gets called for -compat/-native builds
Date: Fri, 13 Sep 2024 08:29:09 +0000 [thread overview]
Message-ID: <c147d4428dc8ad963af75ad1c9f392d5787d0f1f.camel@siemens.com> (raw)
In-Reply-To: <ed6c6869-9c77-4ede-89fe-882cbdc4e520@siemens.com>
On Fri, 2024-09-13 at 10:08 +0200, Jan Kiszka wrote:
> On 12.09.24 17:11, 'Cedric Hombourger' via isar-users wrote:
> > With sources being built only once, do_prepare_build (and its
> > dependencies)
> > are skipped when building -compat or -native packages. This
> > unfortunately
> > means that do_install is not executed and is causing the package
> > build
> > to fail as the install step is not finding any files in
> > ${PP}/image. To
> > avoid changing how do_install is scheduled in the normal case, it
> > is simply
> > added as an extra dependency to do_dpkg_build to make sure it gets
> > executed
> > prior to the build of the binary package.
>
> What is the use case for raw-compat and -native? Are you actually
> having
> a case with different binaries then?
For my specific case, I had wished -native would not be built because
my dpkg-raw package has DPKG_ARCH set to "all". In that case, we should
not have a separate build for -native
The issue will occur for any "dpkg" package being built for -native
when it DEPENDS on a "dpkg-raw" package because our native class
automatically changes all dependencies to -native
While most "dpkg-raw" packages should have DPKG_ARCH = "all", many
recipes did not bother setting this (in most downstream layers that I
have seen) and will end up with different binary packages in their -
native builds when HOST_ARCH != DISTRO_ARCH
To reproduce the issue that I have seen (and which should be fixed
IMO):
1. bitbake mc:qemuarm64-bookworm:example-raw
2. bitbake mc:qemuarm64-bookworm:example-raw-native
PS: I am planning to investigate how to suppress the duplicate build of
"dpkg-raw" package that has DPKG_ARCH set to "all" when a dependent
"dpkg" package is built for both variants
I believe the issue demonstrated with the above scenario needs fixing
(the error message you otherwise get as a user is rather cryptic)
>
> >
> > Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
> > ---
> > meta/classes/dpkg-raw.bbclass | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/meta/classes/dpkg-raw.bbclass b/meta/classes/dpkg-
> > raw.bbclass
> > index dd7b761f..94aba1aa 100644
> > --- a/meta/classes/dpkg-raw.bbclass
> > +++ b/meta/classes/dpkg-raw.bbclass
> > @@ -15,6 +15,12 @@ do_install() {
> > do_install[cleandirs] = "${D}"
> > addtask install after do_patch do_transform_template before
> > do_prepare_build
> >
> > +# make sure do_install gets executed when building -compat / -
> > native packages
> > +# are built since do_prepare_build would be skipped for those
> > (sources are
> > +# built only once). To avoid changing how do_install is scheduled
> > in the normal
> > +# case, it is simply added as an extra dependency to do_dpkg_build
> > +do_dpkg_build[depends] += "${PN}:do_install"
> > +
>
> So, this class would then violate the rule of shared, identical
> "source"
> packages? Does not feel correct.
No same sources are used between non-native and -native. See below
Tasks for example-raw:
$ cat build-test-raw-native/tmp/work/debian-bookworm-arm64/example-
raw/0.3-r0/temp/log.task_order
20240912-143135.942912 do_fetch (171631): log.do_fetch.171631
20240912-143135.967641 do_get_reference_env (171636):
log.do_get_reference_env.171636
20240912-143144.778512 do_unpack (171697): log.do_unpack.171697
20240912-143145.280183 do_adjust_git (171767): log.do_adjust_git.171767
20240912-143145.369652 do_transform_template (171780):
log.do_transform_template.171780
20240912-143145.477501 do_patch (171793): log.do_patch.171793
20240912-143145.964197 do_install (171849): log.do_install.171849
20240912-143146.108066 do_prepare_build (171883):
log.do_prepare_build.171883
20240912-143146.247279 do_dpkg_source (172015):
log.do_dpkg_source.172015
20240912-143146.303464 do_local_isarapt (172169):
log.do_local_isarapt.172169
20240912-143146.517836 do_deploy_source (172513):
log.do_deploy_source.172513
20240912-143457.684464 do_dpkg_build (195129): log.do_dpkg_build.195129
20240912-143527.279878 do_deploy_deb (197150): log.do_deploy_deb.197150
Tasks for example-raw-native (with my changes):
$ cat build-test-raw-native/tmp/work/debian-bookworm-arm64/example-raw-
native/0.3-r0/temp/log.task_order
20240912-143632.541485 do_fetch (197337): log.do_fetch.197337
20240912-143632.548091 do_get_reference_env (197338):
log.do_get_reference_env.197338
20240912-143632.555547 do_local_isarapt (197341):
log.do_local_isarapt.197341
20240912-143639.819570 do_unpack (197499): log.do_unpack.197499
20240912-143640.047376 do_adjust_git (197743): log.do_adjust_git.197743
20240912-143640.160769 do_transform_template (198038):
log.do_transform_template.198038
20240912-143640.267071 do_patch (198156): log.do_patch.198156
20240912-143640.593967 do_install (198222): log.do_install.198222
20240912-143742.934586 do_fetch_common_source (210951):
log.do_fetch_common_source.210951
20240912-143743.720108 do_dpkg_build (211215): log.do_dpkg_build.211215
20240912-143748.362105 do_deploy_deb (212659): log.do_deploy_deb.212659
Without my changes, do_install would not be executed and do_dpkg_build
would fail miserably.
run.do_dpkg_build will find the source package (more specifically the
.dsc file) in the work tree and use it
I therefore believe that identical sources are used between -native and
non-native
Am I missing something?
>
> > do_prepare_build[cleandirs] += "${S}/debian"
> > do_prepare_build() {
> > cd ${D}
>
> Jan
>
--
Cedric Hombourger
Siemens AG
www.siemens.com
--
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/c147d4428dc8ad963af75ad1c9f392d5787d0f1f.camel%40siemens.com.
next prev parent reply other threads:[~2024-09-13 8:29 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 15:11 [PATCH 0/1] " 'Cedric Hombourger' via isar-users
2024-09-12 15:11 ` [PATCH 1/1] " 'Cedric Hombourger' via isar-users
2024-09-13 8:08 ` 'Jan Kiszka' via isar-users
2024-09-13 8:29 ` 'cedric.hombourger@siemens.com' via isar-users [this message]
2024-09-13 10:45 ` 'Jan Kiszka' via isar-users
2024-09-13 10:52 ` 'cedric.hombourger@siemens.com' via isar-users
2024-09-13 11:04 ` 'Jan Kiszka' via isar-users
2024-09-13 11:12 ` 'cedric.hombourger@siemens.com' via isar-users
2024-09-13 11:33 ` 'cedric.hombourger@siemens.com' via isar-users
2024-09-13 12:28 ` 'Jan Kiszka' via isar-users
2024-09-13 12:39 ` 'cedric.hombourger@siemens.com' via isar-users
2024-09-17 7:00 ` [PATCH v2 0/2] do not build -compat/-native for dpkg-raw packages 'Cedric Hombourger' via isar-users
2024-09-17 7:00 ` [PATCH v2 1/2] multiarch: avoid separate builds when DPKG_ARCH is all 'Cedric Hombourger' via isar-users
2024-09-25 16:09 ` 'Jan Kiszka' via isar-users
2024-09-17 7:00 ` [PATCH v2 2/2] dpkg-raw: change DPKG_ARCH to all 'Cedric Hombourger' via isar-users
2024-09-25 16:11 ` 'Jan Kiszka' via isar-users
2024-09-26 3:39 ` [PATCH v3 0/3] do not build -compat/-native for dpkg-raw packages 'Cedric Hombourger' via isar-users
2024-09-26 3:39 ` [PATCH v3 1/3] multiarch: introduce some helpers to later handle corner cases 'Cedric Hombourger' via isar-users
2024-10-04 12:28 ` 'Jan Kiszka' via isar-users
2024-09-26 3:39 ` [PATCH v3 2/3] multiarch: avoid separate builds when DPKG_ARCH is all 'Cedric Hombourger' via isar-users
2024-09-26 3:39 ` [PATCH v3 3/3] dpkg-raw: change DPKG_ARCH to all 'Cedric Hombourger' via isar-users
2024-10-04 12:31 ` 'Jan Kiszka' via isar-users
2024-10-04 13:11 ` [PATCH 1/3] dpkg-raw: use weak assignments for DPKG_ARCH and DEBIAN_MULTI_ARCH 'Cedric Hombourger' via isar-users
2024-10-04 13:11 ` [PATCH 2/3] multiarch: use "if not" vs "if cond is False" for consistency 'Cedric Hombourger' via isar-users
2024-10-04 13:11 ` [PATCH 3/3] RECIPE-API-CHANGELOG.md: clarify scope of recent multiarch/dpkg-arch changes 'Cedric Hombourger' via isar-users
2024-10-04 13:37 ` 'Jan Kiszka' via isar-users
2024-10-04 14:17 ` [PATCH v2 0/3] address review comments for dpkg-raw/multiarch 'Cedric Hombourger' via isar-users
2024-10-04 14:17 ` [PATCH v2 1/3] dpkg-raw: use weak assignments for DPKG_ARCH and DEBIAN_MULTI_ARCH 'Cedric Hombourger' via isar-users
2024-10-04 14:17 ` [PATCH v2 2/3] multiarch: use "if not" vs "if cond is False" for consistency 'Cedric Hombourger' via isar-users
2024-10-04 14:17 ` [PATCH v2 3/3] RECIPE-API-CHANGELOG.md: clarify scope of recent multiarch/dpkg-arch changes 'Cedric Hombourger' via isar-users
2024-10-08 5:24 ` [PATCH v2 0/3] address review comments for dpkg-raw/multiarch Uladzimir Bely
2024-10-10 11:25 ` Uladzimir Bely
2024-11-22 6:07 ` [PATCH v3 3/3] dpkg-raw: change DPKG_ARCH to all Uladzimir Bely
2024-11-22 6:12 ` Uladzimir Bely
2024-11-22 6:12 ` 'cedric.hombourger@siemens.com' via isar-users
2024-10-04 11:54 ` [PATCH v3 0/3] do not build -compat/-native for dpkg-raw packages Uladzimir Bely
2024-10-04 12:27 ` 'Jan Kiszka' via isar-users
2024-09-13 12:15 ` [PATCH 1/1] dpkg-raw: make sure do_install gets called for -compat/-native builds 'Jan Kiszka' via isar-users
2024-09-13 12:37 ` 'cedric.hombourger@siemens.com' via isar-users
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=c147d4428dc8ad963af75ad1c9f392d5787d0f1f.camel@siemens.com \
--to=isar-users@googlegroups.com \
--cc=cedric.hombourger@siemens.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