From bd44fa88f1ac55161f9c26b8091f69e4229cc00c Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Wed, 22 May 2019 19:21:40 -0400 Subject: meta-phosphor: inventory: enable non-native recipes There exists a number native class recipes throughout meta-phosphor that simply provide a data (often YAML) file as input to building another application. Having these data file recipes implemented as native class recipes prevents the use of machine overrides because bitbake (rightfully so) discards machine qualifiers from native recipes. Further, data files aren't really any different than library header files and those are consumed by recipes as target class recipes that are DEPENDed on. Do the same thing for data file recipes. (From meta-phosphor rev: 1675a60bc9648cb5c7ec224df3791dbe89f09134) Change-Id: I7fa23c7914abc5018f6534a8daa0462c6ee9daa3 Signed-off-by: Brad Bishop --- .../phosphor-inventory-manager-assettag-native.bb | 21 --------------------- .../phosphor-inventory-manager-assettag.bb | 18 ++++++++++++++++++ .../inventory/phosphor-inventory-manager_git.bb | 6 +++--- 3 files changed, 21 insertions(+), 24 deletions(-) delete mode 100644 meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb create mode 100644 meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag.bb (limited to 'meta-phosphor/recipes-phosphor/inventory') diff --git a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb deleted file mode 100644 index b02ea28aa..000000000 --- a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "Recipe to create AssetTag property in inventory manager" -PR = "r1" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" - -inherit native -inherit phosphor-inventory-manager - -PROVIDES += "virtual/phosphor-inventory-manager-assettag" - -SRC_URI += "file://assettag.yaml" - -S = "${WORKDIR}" - -do_install() { - # This recipe would provide the yaml for inventory manager to - # create AssetTag property at startup - - install -d ${D}${base_datadir}/events.d/ - install assettag.yaml ${D}${base_datadir}/events.d/assettag.yaml -} diff --git a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag.bb b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag.bb new file mode 100644 index 000000000..2dd6e281c --- /dev/null +++ b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag.bb @@ -0,0 +1,18 @@ +SUMMARY = "Recipe to create AssetTag property in inventory manager" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" + +inherit allarch +inherit phosphor-inventory-manager + +PROVIDES += "virtual/phosphor-inventory-manager-assettag" +S = "${WORKDIR}" + +SRC_URI = "file://assettag.yaml" + +do_install() { + install -D assettag.yaml ${D}${base_datadir}/events.d/assettag.yaml +} + +FILES_${PN} += "${base_datadir}/events.d/assettag.yaml" diff --git a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager_git.bb b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager_git.bb index 1b54dd500..520cdcc99 100644 --- a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager_git.bb @@ -15,7 +15,7 @@ inherit autotools \ require phosphor-inventory-manager.inc DEPENDS += " \ - ${PN}-config-native \ + phosphor-inventory-manager-assettag \ phosphor-dbus-interfaces \ phosphor-dbus-interfaces-native \ phosphor-logging \ @@ -33,11 +33,11 @@ DBUS_SERVICE_${PN} = "${OBMC_INVENTORY_MGR_IFACE}.service" S = "${WORKDIR}/git" EXTRA_OECONF = " \ - YAML_PATH=${STAGING_DIR_NATIVE}${base_datadir} \ + YAML_PATH=${STAGING_DIR_HOST}${base_datadir} \ BUSNAME=${OBMC_INVENTORY_MGR_IFACE} \ INVENTORY_ROOT=${OBMC_INVENTORY_PATH} \ IFACE=${OBMC_INVENTORY_MGR_IFACE} \ - IFACES_PATH=${STAGING_DIR_NATIVE}${yaml_dir} \ + IFACES_PATH=${STAGING_DIR_HOST}${yaml_dir} \ " PACKAGECONFIG ??= "" -- cgit v1.2.3