diff options
author | Ed Tanous <edtanous@google.com> | 2022-09-19 19:13:20 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2022-09-20 17:02:39 +0300 |
commit | 9936f86df6fc55be042cec5eb15f6e19a9e7c890 (patch) | |
tree | 251861f6bba6451ddfe328558097f6abf438d8d6 /meta-phosphor/recipes-phosphor/leds | |
parent | bb8f0657781d78264d08d324853f94bd1abc8efa (diff) | |
download | openbmc-9936f86df6fc55be042cec5eb15f6e19a9e7c890.tar.xz |
Run oe-stylize on our files
In all of our recipes, we should be following yoctos lead on formatting,
order, and other things, for consistency in our meta layers.
This commit runs oe-stylize.py on all of our files. The types of
changes being made can be seen in the commit, but amount to:
1. Setting an explicit key ordering
2. Sectioning the files appropriately
3. Applying rules checking to our files
At some point in the near future, we would turn this on as part of
repotest, but some minor changes need to be upstreamed to meta-oe (WIP)
to make that happen.
Looking for input on whether this is something we'd like to do, and
whether the diffs below look reasonable to folks.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I489dd21d38a9fe4f3ece89cc7a5e1d0463224abf
Diffstat (limited to 'meta-phosphor/recipes-phosphor/leds')
6 files changed, 62 insertions, 72 deletions
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-example-native_git.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-example-native_git.bb index 343a6e089b..4f85763b8a 100644 --- a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-example-native_git.bb +++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-example-native_git.bb @@ -1,17 +1,17 @@ SUMMARY = "Phosphor LED Group Management with example data" -PR = "r1" -PV = "1.0+git${SRCPV}" - -inherit native -require phosphor-led-manager.inc - PROVIDES += "virtual/phosphor-led-manager-config-native" +PV = "1.0+git${SRCPV}" +PR = "r1" S = "${WORKDIR}/git" +inherit native + # Copies example led layout yaml file do_install() { SRC=${S} DEST=${D}${datadir}/phosphor-led-manager install -D ${SRC}/led.yaml ${DEST}/led.yaml } + +require phosphor-led-manager.inc diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb index c4724f2e7d..f1082be0df 100644 --- a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb +++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb @@ -1,19 +1,17 @@ SUMMARY = "Phosphor LED Group Management with MRW generated data" -PR = "r1" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" +DEPENDS += "mrw-native mrw-perl-tools-native" +PROVIDES += "virtual/phosphor-led-manager-config-native" +PR = "r1" inherit mrw-xml inherit native -PROVIDES += "virtual/phosphor-led-manager-config-native" -DEPENDS += "mrw-native mrw-perl-tools-native" - # Generate a YAML files based on MRW input do_install:append() { USE_MRW="${@bb.utils.contains('DISTRO_FEATURES', 'obmc-mrw', 'yes', 'no', d)}" DEST=${D}${datadir}/phosphor-led-manager - if [ "${USE_MRW}" = "yes" ]; then install -d ${DEST}/ ${STAGING_BINDIR_NATIVE}/perl-native/perl \ diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-error-native_git.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-error-native_git.bb index 0e1baadefb..0eca2ab4e1 100644 --- a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-error-native_git.bb +++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-error-native_git.bb @@ -1,16 +1,14 @@ SUMMARY = "Copy error yaml files to known path for elog parsing" -PR = "r1" -PV = "1.0+git${SRCPV}" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" +PV = "1.0+git${SRCPV}" +PR = "r1" + +S = "${WORKDIR}/git" inherit phosphor-dbus-yaml inherit native -require phosphor-led-manager.inc - -S = "${WORKDIR}/git" - do_install:append() { SRC=${S}/xyz/openbmc_project/Led/ DEST=${D}${yaml_dir}/xyz/openbmc_project/Led/ @@ -20,3 +18,5 @@ do_install:append() { install ${SRC}/Fru/*.errors.yaml ${DEST}/Fru install ${SRC}/Fru/*.metadata.yaml ${DEST}/Fru } + +require phosphor-led-manager.inc diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-yaml-provider_git.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-yaml-provider_git.bb index 8c009fce38..de6bf7f2bf 100644 --- a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-yaml-provider_git.bb +++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-yaml-provider_git.bb @@ -1,10 +1,11 @@ SUMMARY = "phosphor-led-manager: install phosphor-logging yaml" -PR = "r1" -PV = "1.0+git${SRCPV}" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" +PV = "1.0+git${SRCPV}" +PR = "r1" + +S = "${WORKDIR}/git" inherit phosphor-logging-yaml-provider -require phosphor-led-manager.inc -S = "${WORKDIR}/git" +require phosphor-led-manager.inc diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb index b2cf9f7ab4..e32711ef79 100644 --- a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb @@ -1,68 +1,41 @@ SUMMARY = "Phosphor LED Group Management Daemon" DESCRIPTION = "Daemon to cater to triggering actions on LED groups" -PR = "r1" -PV = "1.0+git${SRCPV}" - -require ${PN}.inc - -inherit meson pkgconfig python3native -inherit obmc-phosphor-dbus-service obmc-phosphor-systemd - +DEPENDS += "${PYTHON_PN}-native" +DEPENDS += "${PYTHON_PN}-pyyaml-native" +DEPENDS += "${PYTHON_PN}-inflection-native" +DEPENDS += "cli11" +DEPENDS += "nlohmann-json" +DEPENDS += "phosphor-logging" +DEPENDS += "sdbusplus ${PYTHON_PN}-sdbus++-native" +DEPENDS += "systemd" PACKAGECONFIG ??= "\ ${@oe.utils.conditional( \ 'PREFERRED_PROVIDER_virtual/${PN}-config-native', \ 'phosphor-led-manager-config-example-native', \ 'use-json', 'use-yaml', d)} \ " - PACKAGECONFIG[use-json] = "-Duse-json=enabled,,,,,use-yaml" PACKAGECONFIG[use-yaml] = "-Duse-json=disabled,,virtual/${PN}-config-native,,,use-json" PACKAGECONFIG[use-lamp-test] = "-Duse-lamp-test=enabled, -Duse-lamp-test=disabled" PACKAGECONFIG[monitor-operational-status] = "-Dmonitor-operational-status=enabled, \ -Dmonitor-operational-status=disabled" +PV = "1.0+git${SRCPV}" +PR = "r1" SYSTEMD_PACKAGES = "${PN} ${PN}-faultmonitor" -PACKAGE_BEFORE_PN += "${PN}-faultmonitor" - -DEPENDS += "${PYTHON_PN}-native" -DEPENDS += "${PYTHON_PN}-pyyaml-native" -DEPENDS += "${PYTHON_PN}-inflection-native" -DEPENDS += "cli11" -DEPENDS += "nlohmann-json" -DEPENDS += "phosphor-logging" -DEPENDS += "sdbusplus ${PYTHON_PN}-sdbus++-native" -DEPENDS += "systemd" - -RDEPENDS:${PN} += "bash" - S = "${WORKDIR}/git" - -FILES:${PN}-faultmonitor += "${bindir}/phosphor-fru-fault-monitor" - -DBUS_SERVICE:${PN} += "xyz.openbmc_project.LED.GroupManager.service" - SYSTEMD_SERVICE:${PN} += "obmc-led-group-start@.service obmc-led-group-stop@.service" SYSTEMD_SERVICE:${PN}-faultmonitor += "obmc-fru-fault-monitor.service" - SYSTEMD_LINK:${PN} += "../obmc-led-group-start@.service:multi-user.target.wants/obmc-led-group-start@bmc_booted.service" - -CHASSIS_TARGETS = "poweron poweroff" STATES = "start stop" -TMPLFMT = "obmc-led-group-{1}@.service" -TGTFMT = "obmc-chassis-{0}@0.target" -INSTFMT = "obmc-led-group-{1}@power_on.service" -FMT = "../${TMPLFMT}:${TGTFMT}.wants/${INSTFMT}" SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'FMT', 'CHASSIS_TARGETS', 'STATES')}" - -CHASSIS_BLACKOUT_TGT = "obmc-chassis-blackout@{0}.target" -LED_STOP_SVC = "obmc-led-group-stop@.service" -LED_POWER_STOP_SVC = "obmc-led-group-stop@power_on.service" -CHASSIS_LED_BLACKOUT_FMT = "../${LED_STOP_SVC}:${CHASSIS_BLACKOUT_TGT}.wants/${LED_POWER_STOP_SVC}" SYSTEMD_LINK:${PN} += "${@compose_list(d, 'CHASSIS_LED_BLACKOUT_FMT', 'OBMC_CHASSIS_INSTANCES' )}" - # Install the override to set up a Conflicts relation SYSTEMD_OVERRIDE:${PN} += "bmc_booted.conf:obmc-led-group-start@bmc_booted.service.d/bmc_booted.conf" +inherit meson pkgconfig python3native +inherit obmc-phosphor-dbus-service obmc-phosphor-systemd + EXTRA_OEMESON:append = " -Dtests=disabled" do_compile:prepend() { @@ -74,3 +47,21 @@ do_compile:prepend() { cp "${WORKDIR}/led.yaml" "${S}/led.yaml" fi } + +RDEPENDS:${PN} += "bash" + +FILES:${PN}-faultmonitor += "${bindir}/phosphor-fru-fault-monitor" + +require ${PN}.inc + +PACKAGE_BEFORE_PN += "${PN}-faultmonitor" +DBUS_SERVICE:${PN} += "xyz.openbmc_project.LED.GroupManager.service" +CHASSIS_TARGETS = "poweron poweroff" +TMPLFMT = "obmc-led-group-{1}@.service" +TGTFMT = "obmc-chassis-{0}@0.target" +INSTFMT = "obmc-led-group-{1}@power_on.service" +FMT = "../${TMPLFMT}:${TGTFMT}.wants/${INSTFMT}" +CHASSIS_BLACKOUT_TGT = "obmc-chassis-blackout@{0}.target" +LED_STOP_SVC = "obmc-led-group-stop@.service" +LED_POWER_STOP_SVC = "obmc-led-group-stop@power_on.service" +CHASSIS_LED_BLACKOUT_FMT = "../${LED_STOP_SVC}:${CHASSIS_BLACKOUT_TGT}.wants/${LED_POWER_STOP_SVC}" diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs_git.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs_git.bb index 43816efe80..46bfcbd11d 100644 --- a/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs_git.bb +++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs_git.bb @@ -1,29 +1,29 @@ SUMMARY = "Phosphor Physical LED Controller daemon" DESCRIPTION = "Daemon to trigger actions on a physical LED" HOMEPAGE = "http://github.com/openbmc/phosphor-led-sysfs" -PR = "r1" -PV = "1.0+git${SRCPV}" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" - -inherit meson pkgconfig -inherit obmc-phosphor-dbus-service - DEPENDS += "sdbusplus" DEPENDS += "systemd" DEPENDS += "phosphor-dbus-interfaces" DEPENDS += "boost" - -DBUS_SERVICE:${PN} += "xyz.openbmc_project.led.controller@.service" - -EXTRA_OEMESON:append = " -Dtests=disabled" +SRCREV = "02f366d68bb9752e6de04db0efc8eb885b19b219" +PV = "1.0+git${SRCPV}" +PR = "r1" SRC_URI += "git://github.com/openbmc/phosphor-led-sysfs;branch=master;protocol=https" SRC_URI += "file://70-leds.rules" -SRCREV = "02f366d68bb9752e6de04db0efc8eb885b19b219" + S = "${WORKDIR}/git" +inherit meson pkgconfig +inherit obmc-phosphor-dbus-service + +EXTRA_OEMESON:append = " -Dtests=disabled" + do_install:append() { install -d ${D}/${nonarch_base_libdir}/udev/rules.d/ install -m 0644 ${WORKDIR}/70-leds.rules ${D}/${nonarch_base_libdir}/udev/rules.d/ } + +DBUS_SERVICE:${PN} += "xyz.openbmc_project.led.controller@.service" |