compat: Fix compat builds, switch to new ISAR compat API
PATCH v2 1/1 compat: Fix compat builds, switch to new ISAR compat API
The last ISAR update introduced a regression, silently switching our -compat builds to -native ones.
Whenever opt-compat.yml was selected it basically had no effect.
Adjusting to the new API requires us to specify the preferred version of xenomai-compat in addition to xenomai. We have compat builds enabled for the stable 3.2 series and current next/master.
To be consistent all kas option files that set a preferred version for the xenomai package have been updated.
---
Hi all,
it turned out that some CI jobs are not testing what the naming suggests. Since the last ISAR update compat jobs were no compat tests any longer as they were silently migrated to native tasks...
Internal CI run was successful, but still: Review carefully!
---
Changes in v2:
- Simplify get_package_names(), address review comments from Jan
- Set PREFERRED_VERSION_xenomai-compat in all remaining option files as
well
- Link to v1: https://lore.kernel.org/r/[email protected]
--- classes/print-revision.bbclass | 4 ++-- opt-compat.yml | 3 ++- opt-xenomai-3.0.x.yml | 3 ++- opt-xenomai-3.1.x.yml | 3 ++- opt-xenomai-3.2.x.yml | 3 ++- opt-xenomai-next.yml | 3 ++- recipes-core/images/demo-image.bb | 17 +++++++++++------ recipes-xenomai/xenomai/xenomai.inc | 4 +--- 8 files changed, 24 insertions(+), 16 deletions(-)
classes/print-revision.bbclass +2 -2
@@ -18,6 +18,6 @@ def get_commit(d): COMMIT="${@get_commit(d)}" dpkg_runbuild:prepend() { - bbplain $(printf "%s-%s: Building revision %.20s\n" \ - ${PN} ${PV} ${COMMIT}) + bbplain $(printf "%s-%s: Building revision %.20s for %s\n" \ + ${PN} ${PV} ${COMMIT} ${PACKAGE_ARCH}) }
opt-compat.yml +2 -1
@@ -1,7 +1,7 @@ # # Xenomai Real-Time System # -# Copyright (c) Siemens AG, 2022 +# Copyright (c) Siemens AG, 2022-2024 # # Authors: # Florian Bezdeka <[email protected]>
@@ -15,3 +15,4 @@ header: local_conf_header: compat: | ISAR_ENABLE_COMPAT_ARCH = "1" + XENOMAI_PACKAGE_NAME_SUFFIX = "-compat"
opt-xenomai-3.0.x.yml +2 -1
@@ -1,7 +1,7 @@ # # Xenomai Real-Time System # -# Copyright (c) Siemens AG, 2020 +# Copyright (c) Siemens AG, 2020-2024 # # Authors: # Jan Kiszka <[email protected]>
@@ -15,3 +15,4 @@ header: local_conf_header: xenomai-3-0-x: | PREFERRED_VERSION_xenomai = "stable-3.0.x" + PREFERRED_VERSION_xenomai-compat = "stable-3.0.x"
opt-xenomai-3.1.x.yml +2 -1
@@ -1,7 +1,7 @@ # # Xenomai Real-Time System # -# Copyright (c) Siemens AG, 2020 +# Copyright (c) Siemens AG, 2020-2024 # # Authors: # Jan Kiszka <[email protected]>
@@ -15,3 +15,4 @@ header: local_conf_header: xenomai-3-1-x: | PREFERRED_VERSION_xenomai = "stable-3.1.x" + PREFERRED_VERSION_xenomai-compat = "stable-3.1.x"
opt-xenomai-3.2.x.yml +2 -1
@@ -1,7 +1,7 @@ # # Xenomai Real-Time System # -# Copyright (c) Siemens AG, 2021 +# Copyright (c) Siemens AG, 2021-2024 # # Authors: # Jan Kiszka <[email protected]>
@@ -15,3 +15,4 @@ header: local_conf_header: xenomai-3-2-x: | PREFERRED_VERSION_xenomai = "stable-3.2.x" + PREFERRED_VERSION_xenomai-compat = "stable-3.2.x"
opt-xenomai-next.yml +2 -1
@@ -1,7 +1,7 @@ # # Xenomai Real-Time System # -# Copyright (c) Siemens AG, 2019 +# Copyright (c) Siemens AG, 2019-2024 # # Authors: # Quirin Gylstorff <[email protected]>
@@ -15,3 +15,4 @@ header: local_conf_header: xenomai-latest: | PREFERRED_VERSION_xenomai = "next" + PREFERRED_VERSION_xenomai-compat = "next"
recipes-core/images/demo-image.bb +11 -6
@@ -1,7 +1,7 @@ # # Xenomai Real-Time System # -# Copyright (c) Siemens AG, 2018 +# Copyright (c) Siemens AG, 2018-2024 # # Authors: # Jan Kiszka <[email protected]>
@@ -27,9 +27,16 @@ def has_testsuite_package(d): def get_testsuite_package_names(d): if not has_testsuite_package(d): - return "" + return [] - return "xenomai-testsuite xenomai-testsuite-dbgsym" + return ["xenomai-testsuite", "xenomai-testsuite-dbgsym"] + +def get_package_names(d): + pkgs = ["xenomai-runtime", "xenomai-runtime-dbgsym", "libxenomai1-dbgsym"] + pkgs = pkgs + get_testsuite_package_names(d) + pkg_suffix = d.getVar("XENOMAI_PACKAGE_NAME_SUFFIX") or "" + + return " ".join([p + pkg_suffix for p in pkgs]) # Install gdb only for older stable releases. Enables gdb tests and avoids a # arch missmatch for compat builds on newer releases.
@@ -41,9 +48,7 @@ IMAGE_PREINSTALL += " \ iw wireless-tools wpasupplicant dbus \ lsb-release" -IMAGE_INSTALL:append:xenomai3 = " xenomai-runtime xenomai-runtime-dbgsym" -IMAGE_INSTALL:append:xenomai3 = " ${@get_testsuite_package_names(d)}" -IMAGE_INSTALL:append:xenomai3 = " libxenomai1-dbgsym" +IMAGE_INSTALL:append:xenomai3 = " ${@get_package_names(d)}" IMAGE_INSTALL:append:xenomai4 = " libevl" IMAGE_INSTALL += "customizations sshd-regen-keys expand-on-first-boot"
recipes-xenomai/xenomai/xenomai.inc +1 -3
@@ -1,7 +1,7 @@ # # Xenomai Real-Time System # -# Copyright (c) Siemens AG, 2018-2023 +# Copyright (c) Siemens AG, 2018-2024 # # Authors: # Jan Kiszka <[email protected]>
@@ -21,8 +21,6 @@ PROVIDES += "libxenomai1" PROVIDES += "libxenomai-dev" PROVIDES += "libxenomai1-dbgsym" -PACKAGE_ARCH:compat-arch = "${COMPAT_DISTRO_ARCH}" - do_prepare_build() { # Xenomai currently does not maintain its changelog, plus we want the # actual package version in there.
---
base-commit: 9c7bfa8f1af0faa68d19778d0e0a559f407e27df
change-id: 20240209-flo-fix-compat-testing-v2-1a1157b6982a
Best regards,
Signature · 1 line
Florian Bezdeka <[email protected]>