public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] Add support for specifying package architecture using DPKG_ARCH
@ 2019-09-11  8:41 Dalamagkidis, Konstantinos
  2019-09-30  6:07 ` Jan Kiszka
  2019-10-07 10:21 ` Baurzhan Ismagulov
  0 siblings, 2 replies; 6+ messages in thread
From: Dalamagkidis, Konstantinos @ 2019-09-11  8:41 UTC (permalink / raw)
  To: isar-users; +Cc: Dalamagkidis, Konstantinos

For some packages we want to be able to specify the "all" architecture.

Signed-off-by: Konstantinos Dalamagkidis <konstantinos.dalamagkidis@siemens.com>
---
 meta/classes/debianize.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
index ad3a98e..c231b41 100644
--- a/meta/classes/debianize.bbclass
+++ b/meta/classes/debianize.bbclass
@@ -4,6 +4,7 @@
 # SPDX-License-Identifier: MIT
 
 CHANGELOG_V ?= "${PV}"
+DPKG_ARCH ??= "any"
 
 deb_add_changelog() {
 	timestamp=$(find ${S}/ -type f -not -path "${S}/debian/*" -printf "%T@\n"|sort -n -r|head -n 1)
@@ -40,7 +41,7 @@ Maintainer: ${MAINTAINER}
 Build-Depends: debhelper (>= ${compat})
 
 Package: ${PN}
-Architecture: any
+Architecture: ${DPKG_ARCH}
 Depends: ${DEBIAN_DEPENDS}
 Description: ${DESCRIPTION}
 EOF
-- 
2.20.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add support for specifying package architecture using DPKG_ARCH
  2019-09-11  8:41 [PATCH] Add support for specifying package architecture using DPKG_ARCH Dalamagkidis, Konstantinos
@ 2019-09-30  6:07 ` Jan Kiszka
  2019-10-07 10:20   ` Baurzhan Ismagulov
  2019-10-07 10:21 ` Baurzhan Ismagulov
  1 sibling, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2019-09-30  6:07 UTC (permalink / raw)
  To: [ext] Dalamagkidis, Konstantinos, isar-users

On 11.09.19 10:41, [ext] Dalamagkidis, Konstantinos wrote:
> For some packages we want to be able to specify the "all" architecture.
> 
> Signed-off-by: Konstantinos Dalamagkidis <konstantinos.dalamagkidis@siemens.com>
> ---
>   meta/classes/debianize.bbclass | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
> index ad3a98e..c231b41 100644
> --- a/meta/classes/debianize.bbclass
> +++ b/meta/classes/debianize.bbclass
> @@ -4,6 +4,7 @@
>   # SPDX-License-Identifier: MIT
>   
>   CHANGELOG_V ?= "${PV}"
> +DPKG_ARCH ??= "any"
>   
>   deb_add_changelog() {
>   	timestamp=$(find ${S}/ -type f -not -path "${S}/debian/*" -printf "%T@\n"|sort -n -r|head -n 1)
> @@ -40,7 +41,7 @@ Maintainer: ${MAINTAINER}
>   Build-Depends: debhelper (>= ${compat})
>   
>   Package: ${PN}
> -Architecture: any
> +Architecture: ${DPKG_ARCH}
>   Depends: ${DEBIAN_DEPENDS}
>   Description: ${DESCRIPTION}
>   EOF
> 

Thinking about this again: I guess we need more to enable "all" packages 
cleanly. Currently, we will build them multiple times, namely once per 
DISTRO/DISTRO_ARCH, rather than just one per DISTRO.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add support for specifying package architecture using DPKG_ARCH
  2019-09-30  6:07 ` Jan Kiszka
@ 2019-10-07 10:20   ` Baurzhan Ismagulov
  2019-10-07 10:39     ` Baurzhan Ismagulov
  0 siblings, 1 reply; 6+ messages in thread
From: Baurzhan Ismagulov @ 2019-10-07 10:20 UTC (permalink / raw)
  To: isar-users

On Mon, Sep 30, 2019 at 08:07:25AM +0200, Jan Kiszka wrote:
> Thinking about this again: I guess we need more to enable "all" packages
> cleanly. Currently, we will build them multiple times, namely once per
> DISTRO/DISTRO_ARCH, rather than just one per DISTRO.

Debian should have the issue as well. I suppose, in Debian currently the last
one wins, which should be fine with correct packaging. In that case, reducing
the number of builds would be a welcome optimization. "Architecture-independent
packages that can only be generated on one architecture" in [1] goes even
further.

1. https://wiki.ubuntu.com/MultiarchSpec

With kind regards,
Baurzhan.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add support for specifying package architecture using DPKG_ARCH
  2019-09-11  8:41 [PATCH] Add support for specifying package architecture using DPKG_ARCH Dalamagkidis, Konstantinos
  2019-09-30  6:07 ` Jan Kiszka
@ 2019-10-07 10:21 ` Baurzhan Ismagulov
  1 sibling, 0 replies; 6+ messages in thread
From: Baurzhan Ismagulov @ 2019-10-07 10:21 UTC (permalink / raw)
  To: isar-users

On Wed, Sep 11, 2019 at 08:41:14AM +0000, Dalamagkidis, Konstantinos wrote:
> For some packages we want to be able to specify the "all" architecture.

Applied to next, thanks.

With kind regards,
Baurzhan.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add support for specifying package architecture using DPKG_ARCH
  2019-10-07 10:20   ` Baurzhan Ismagulov
@ 2019-10-07 10:39     ` Baurzhan Ismagulov
  2019-10-08 11:25       ` Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: Baurzhan Ismagulov @ 2019-10-07 10:39 UTC (permalink / raw)
  To: isar-users

Looking at dpkg-buildpackage(1), I see:

       -g     Equivalent to --build=source,all (since dpkg 1.17.11).

       -G     Equivalent to --build=source,any (since dpkg 1.17.11).

       -b     Equivalent to --build=binary or --build=any,all.

       -B     Equivalent to --build=any.

       -A     Equivalent to --build=all.

       -S     Equivalent to --build=source.

       -F     Equivalent    to    --build=full,    --build=source,binary    or
              --build=source,any,all (since dpkg 1.15.8).

So, the mechanism seems to be there. The question is how to split the
processing into two steps and tell bitbake to build the "all" part once.

With kind regards,
Baurzhan.


On Mon, Oct 07, 2019 at 12:20:42PM +0200, Baurzhan Ismagulov wrote:
> Debian should have the issue as well. I suppose, in Debian currently the last
> one wins, which should be fine with correct packaging. In that case, reducing
> the number of builds would be a welcome optimization. "Architecture-independent
> packages that can only be generated on one architecture" in [1] goes even
> further.
> 
> 1. https://wiki.ubuntu.com/MultiarchSpec

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add support for specifying package architecture using DPKG_ARCH
  2019-10-07 10:39     ` Baurzhan Ismagulov
@ 2019-10-08 11:25       ` Jan Kiszka
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2019-10-08 11:25 UTC (permalink / raw)
  To: isar-users

On 07.10.19 12:39, Baurzhan Ismagulov wrote:
> Looking at dpkg-buildpackage(1), I see:
> 
>        -g     Equivalent to --build=source,all (since dpkg 1.17.11).
> 
>        -G     Equivalent to --build=source,any (since dpkg 1.17.11).
> 
>        -b     Equivalent to --build=binary or --build=any,all.
> 
>        -B     Equivalent to --build=any.
> 
>        -A     Equivalent to --build=all.
> 
>        -S     Equivalent to --build=source.
> 
>        -F     Equivalent    to    --build=full,    --build=source,binary    or
>               --build=source,any,all (since dpkg 1.15.8).
> 
> So, the mechanism seems to be there. The question is how to split the
> processing into two steps and tell bitbake to build the "all" part once.
> 

I think this boils down to removing the DISTRO_ARCH element from a
recipe PF/workdir/stamp. BUT: we will still have the issue that a source
package may build both all and some arch-specific binary packages.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-10-08 11:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-11  8:41 [PATCH] Add support for specifying package architecture using DPKG_ARCH Dalamagkidis, Konstantinos
2019-09-30  6:07 ` Jan Kiszka
2019-10-07 10:20   ` Baurzhan Ismagulov
2019-10-07 10:39     ` Baurzhan Ismagulov
2019-10-08 11:25       ` Jan Kiszka
2019-10-07 10:21 ` Baurzhan Ismagulov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox