mbox series

[v2,0/2] do not build -compat/-native for dpkg-raw packages

Message ID 20240917070048.577-1-cedric.hombourger@siemens.com
Headers show
Series do not build -compat/-native for dpkg-raw packages | expand

Message

Cedric Hombourger Sept. 17, 2024, 7 a.m. UTC
The intent of the dpkg-raw class is to easily package configuration and data
files into a Debian package. Packages to be compiled should really use other
dpkg classes where support for cross-compilation and multiarch is provided
and tested. `DPKG_ARCH` is now set to `all` for `dpkg-raw` recipes and a
deprecation warning will be raised if overriden.

Despite this change, Isar may still build dpkg-raw packages a second time
when pulled by a -compat or -native package. multiarch is changed to check
if DPKG_ARCH was changed to all and will add -compat and -native to the
PROVIDES of the package (this condition will be checked for all dpkg variants)

It shall be noted that setting DPKG_ARCH in a recipe is a contract, the
user declares that generated package(s) are either architecture dependent
or independent.

Changes since v2:
 * v1 used a completely different approach where we were ensuring that
   do_install was called whether sources were built or pulled from
   isar_apt (do_fetch_common_source) since override_dh_install is
   pulling contents of dpkg-raw packages outside of the source tree
   (${PP}/image)

Cedric Hombourger (2):
  multiarch: avoid separate builds when DPKG_ARCH is all
  dpkg-raw: change DPKG_ARCH to all

 RECIPE-API-CHANGELOG.md        | 11 +++++++++++
 meta/classes/dpkg-raw.bbclass  |  8 ++++++++
 meta/classes/multiarch.bbclass | 34 ++++++++++++++++++++++++----------
 3 files changed, 43 insertions(+), 10 deletions(-)