From f6d91b9022e86eb1941a9f5a79d32d3a9b1a001a Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Mon, 20 May 2024 15:21:43 +0200 Subject: [PATCH] mca-tool/trustfence-tool: don't install files in /sbin when usrmerge is enabled These recipes install binaries inside of /sbin, which causes QA errors when usrmerge is enabled in DISTRO_FEATURES. Said feature is now required for Yocto 5.0's version of systemd, so keep using the same versions of the tools and simply move the binaries to /usr/sbin if needed. https://onedigi.atlassian.net/browse/DEL-9011 Signed-off-by: Gabriel Valcazar --- meta-digi-arm/recipes-digi/mca/mca-tool_1.25.bb | 12 +++++++++++- .../recipes-core/trustfence/trustfence-tool_2.5.bb | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/meta-digi-arm/recipes-digi/mca/mca-tool_1.25.bb b/meta-digi-arm/recipes-digi/mca/mca-tool_1.25.bb index bb65ade1e..cad5a6bfa 100644 --- a/meta-digi-arm/recipes-digi/mca/mca-tool_1.25.bb +++ b/meta-digi-arm/recipes-digi/mca/mca-tool_1.25.bb @@ -1,4 +1,4 @@ -# Copyright (C) 2016-2023, Digi International Inc. +# Copyright (C) 2016-2024, Digi International Inc. SUMMARY = "MCA firmware management tool" SECTION = "console/tools" @@ -20,6 +20,16 @@ S = "${WORKDIR}/${PKGNAME}-${PV}" inherit bin_package +HAS_USRMERGE = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '1', '0', d)}" + +do_install:append() { + # Move binaries from /sbin to /usr/sbin to avoid usrmerge QA error. + if [ "${HAS_USRMERGE}" = "1" ]; then + install -d ${D}${base_sbindir} + mv ${D}/sbin/* ${D}${base_sbindir} && rmdir ${D}/sbin + fi +} + INSANE_SKIP:${PN} = "already-stripped" COMPATIBLE_MACHINE = "(ccimx6ul|ccimx8m|ccimx8x|ccmp1)" diff --git a/meta-digi-dey/recipes-core/trustfence/trustfence-tool_2.5.bb b/meta-digi-dey/recipes-core/trustfence/trustfence-tool_2.5.bb index a0c07b6f9..04de42be1 100644 --- a/meta-digi-dey/recipes-core/trustfence/trustfence-tool_2.5.bb +++ b/meta-digi-dey/recipes-core/trustfence/trustfence-tool_2.5.bb @@ -1,4 +1,4 @@ -# Copyright (C) 2016-2021, Digi International Inc. +# Copyright (C) 2016-2024, Digi International Inc. SUMMARY = "Trustfence command line tool" SECTION = "console/tools" @@ -15,3 +15,13 @@ SRC_URI[aarch64.md5sum] = "a9b4a53eaf493a6cd03090fead217b38" SRC_URI[aarch64.sha256sum] = "a134e65e305e19bf5a3734b1e095f4bb8fbe80482cbad02f3ce05f936a9c3801" inherit bin_package + +HAS_USRMERGE = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '1', '0', d)}" + +do_install:append() { + # Move binaries from /sbin to /usr/sbin to avoid usrmerge QA error. + if [ "${HAS_USRMERGE}" = "1" ]; then + install -d ${D}${base_sbindir} + mv ${D}/sbin/* ${D}${base_sbindir} && rmdir ${D}/sbin + fi +}