summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/dump
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-09-19 19:13:20 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-09-20 17:02:39 +0300
commit9936f86df6fc55be042cec5eb15f6e19a9e7c890 (patch)
tree251861f6bba6451ddfe328558097f6abf438d8d6 /meta-phosphor/recipes-phosphor/dump
parentbb8f0657781d78264d08d324853f94bd1abc8efa (diff)
downloadopenbmc-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/dump')
-rw-r--r--meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector_git.bb132
-rw-r--r--meta-phosphor/recipes-phosphor/dump/phosphor-debug-errors-native.bb10
2 files changed, 59 insertions, 83 deletions
diff --git a/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector_git.bb b/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector_git.bb
index c57e90f527..d618e14bac 100644
--- a/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector_git.bb
+++ b/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector_git.bb
@@ -3,30 +3,6 @@ DESCRIPTION = "Phosphor Debug Collector provides mechanisms \
to collect various log files and system parameters. \
This will be helpful for troubleshooting the problems in OpenBMC \
based systems."
-
-PR = "r1"
-PV = "1.0+git${SRCPV}"
-
-DEBUG_COLLECTOR_PKGS = " \
- ${PN}-manager \
- ${PN}-monitor \
- ${PN}-dreport \
- ${PN}-scripts \
-"
-PACKAGE_BEFORE_PN += "${DEBUG_COLLECTOR_PKGS}"
-ALLOW_EMPTY:${PN} = "1"
-
-DBUS_PACKAGES = "${PN}-manager"
-
-SYSTEMD_PACKAGES = "${PN}-monitor"
-
-inherit pkgconfig meson \
- obmc-phosphor-dbus-service \
- python3native \
- phosphor-debug-collector
-
-require phosphor-debug-collector.inc
-
DEPENDS += " \
phosphor-dbus-interfaces \
phosphor-logging \
@@ -40,6 +16,48 @@ DEPENDS += " \
${PYTHON_PN}-mako-native \
fmt \
"
+PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', \
+ 'obmc-ubi-fs phosphor-mmc', '', 'jffs-workaround', d)}"
+PACKAGECONFIG[jffs-workaround] = "-Djffs-workaround=enabled, \
+ -Djffs-workaround=disabled"
+PACKAGECONFIG[host-dump-transport-pldm] = " \
+ -Dhost-transport=pldm,, \
+ pldm \
+ "
+PACKAGECONFIG[openpower-dumps-extension] = " \
+ -Dopenpower-dumps-extension=enabled, \
+ -Dopenpower-dumps-extension=disabled \
+"
+PV = "1.0+git${SRCPV}"
+PR = "r1"
+
+SRC_URI += "file://coretemp.conf"
+
+SYSTEMD_PACKAGES = "${PN}-monitor"
+SYSTEMD_SUBSTITUTIONS += "BMC_DUMP_PATH:${bmc_dump_path}:${MGR_SVC}"
+SYSTEMD_SERVICE:${PN}-monitor += "obmc-dump-monitor.service"
+SYSTEMD_SERVICE:${PN}-monitor += "ramoops-monitor.service"
+S = "${WORKDIR}/git"
+
+inherit pkgconfig meson \
+ obmc-phosphor-dbus-service \
+ python3native \
+ phosphor-debug-collector
+
+EXTRA_OEMESON = " \
+ -DBMC_DUMP_PATH=${bmc_dump_path} \
+ -DERROR_MAP_YAML=${STAGING_DIR_NATIVE}/${datadir}/dump/errors_watch.yaml \
+ "
+
+do_install:append() {
+ install -d ${D}${exec_prefix}/lib/tmpfiles.d
+ install -m 644 ${WORKDIR}/coretemp.conf ${D}${exec_prefix}/lib/tmpfiles.d/
+}
+do_install[postfuncs] += "install_dreport"
+do_install[postfuncs] += "install_dreport_conf_file"
+do_install[postfuncs] += "install_dreport_plugins_scripts"
+do_install[postfuncs] += "install_dreport_include_scripts"
+do_install[postfuncs] += "install_dreport_user_scripts"
RDEPENDS:${PN}-manager += " \
${PN}-dreport \
@@ -54,11 +72,7 @@ RDEPENDS:${PN}-scripts += " \
bash \
"
-MGR_SVC ?= "xyz.openbmc_project.Dump.Manager.service"
-
-SYSTEMD_SUBSTITUTIONS += "BMC_DUMP_PATH:${bmc_dump_path}:${MGR_SVC}"
-
-FILES:${PN}-manager += " \
+FILES:${PN}-manager += " \
${bindir}/phosphor-dump-manager \
${bindir}/phosphor-offload-handler \
${exec_prefix}/lib/tmpfiles.d/coretemp.conf \
@@ -69,23 +83,20 @@ FILES:${PN}-monitor += "${bindir}/phosphor-ramoops-monitor"
FILES:${PN}-dreport += "${bindir}/dreport"
FILES:${PN}-scripts += "${dreport_dir}"
-DBUS_SERVICE:${PN}-manager += "${MGR_SVC}"
-SYSTEMD_SERVICE:${PN}-monitor += "obmc-dump-monitor.service"
-SYSTEMD_SERVICE:${PN}-monitor += "ramoops-monitor.service"
-
-EXTRA_OEMESON = " \
- -DBMC_DUMP_PATH=${bmc_dump_path} \
- -DERROR_MAP_YAML=${STAGING_DIR_NATIVE}/${datadir}/dump/errors_watch.yaml \
- "
-
-S = "${WORKDIR}/git"
-SRC_URI += "file://coretemp.conf"
+require phosphor-debug-collector.inc
-do_install:append() {
- install -d ${D}${exec_prefix}/lib/tmpfiles.d
- install -m 644 ${WORKDIR}/coretemp.conf ${D}${exec_prefix}/lib/tmpfiles.d/
-}
+ALLOW_EMPTY:${PN} = "1"
+DEBUG_COLLECTOR_PKGS = " \
+ ${PN}-manager \
+ ${PN}-monitor \
+ ${PN}-dreport \
+ ${PN}-scripts \
+"
+PACKAGE_BEFORE_PN += "${DEBUG_COLLECTOR_PKGS}"
+DBUS_PACKAGES = "${PN}-manager"
+MGR_SVC ?= "xyz.openbmc_project.Dump.Manager.service"
+DBUS_SERVICE:${PN}-manager += "${MGR_SVC}"
# Install dreport script
# From tools/dreport.d/dreport to /usr/bin/dreport
install_dreport() {
@@ -93,7 +104,6 @@ install_dreport() {
install -m 0755 ${S}/tools/dreport.d/dreport \
${D}${bindir}/dreport
}
-
# Install dreport sample configuration file
# From tools/dreport.d/sample.conf
# to /usr/share/dreport.d/conf.d/dreport.conf
@@ -102,14 +112,12 @@ install_dreport_conf_file() {
install -m 0644 ${S}/tools/dreport.d/sample.conf \
${D}${dreport_conf_dir}/dreport.conf
}
-
# Install dreport plugins
# From tools/dreport.d/plugins.d to /usr/share/dreport.d/plugins.d
install_dreport_plugins_scripts() {
install -d ${D}${dreport_plugin_dir}
install -m 0755 ${S}/tools/dreport.d/plugins.d/* ${D}${dreport_plugin_dir}/
}
-
# Install dreport utility functions
# From tools/dreport.d/include.d to /usr/share/dreport.d/include.d
install_dreport_include_scripts() {
@@ -117,29 +125,23 @@ install_dreport_include_scripts() {
install -m 0755 ${S}/tools/dreport.d/include.d/* \
${D}${dreport_include_dir}/
}
-
# Make the links for a single user plugin script
# Create user directories based on the dump type value in the config section
# Create softlinks for the base scripts in the user directories
def install_dreport_user_script(script_path, d):
import re
import configparser
-
#Read the user types from the dreport.conf file
configure = configparser.ConfigParser()
conf_dir = d.getVar('D', True) + d.getVar('dreport_conf_dir', True)
confsource = os.path.join(conf_dir, "dreport.conf")
configure.read(confsource)
-
config = ("config:")
section = "DumpType"
dreport_dir = d.getVar('D', True) + d.getVar('dreport_dir', True)
-
script = os.path.basename(script_path)
srclink = os.path.join(d.getVar('dreport_plugin_dir', True), script)
-
file = open(script_path, "r")
-
for line in file:
if not config in line:
continue
@@ -166,36 +168,12 @@ def install_dreport_user_script(script_path, d):
destlink = os.path.join(destdir, linkname)
os.symlink(srclink, destlink)
file.close()
-
#Make the links for all the plugins
python install_dreport_user_scripts() {
-
source = d.getVar('S', True)
source_path = os.path.join(source, "tools", "dreport.d", "plugins.d")
scripts = os.listdir(source_path)
-
for script in scripts:
srcname = os.path.join(source_path, script)
install_dreport_user_script(srcname, d)
}
-
-PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', \
- 'obmc-ubi-fs phosphor-mmc', '', 'jffs-workaround', d)}"
-PACKAGECONFIG[jffs-workaround] = "-Djffs-workaround=enabled, \
- -Djffs-workaround=disabled"
-
-PACKAGECONFIG[host-dump-transport-pldm] = " \
- -Dhost-transport=pldm,, \
- pldm \
- "
-
-PACKAGECONFIG[openpower-dumps-extension] = " \
- -Dopenpower-dumps-extension=enabled, \
- -Dopenpower-dumps-extension=disabled \
-"
-
-do_install[postfuncs] += "install_dreport"
-do_install[postfuncs] += "install_dreport_conf_file"
-do_install[postfuncs] += "install_dreport_plugins_scripts"
-do_install[postfuncs] += "install_dreport_include_scripts"
-do_install[postfuncs] += "install_dreport_user_scripts"
diff --git a/meta-phosphor/recipes-phosphor/dump/phosphor-debug-errors-native.bb b/meta-phosphor/recipes-phosphor/dump/phosphor-debug-errors-native.bb
index ea24203631..9ff5ab6b25 100644
--- a/meta-phosphor/recipes-phosphor/dump/phosphor-debug-errors-native.bb
+++ b/meta-phosphor/recipes-phosphor/dump/phosphor-debug-errors-native.bb
@@ -1,19 +1,17 @@
SUMMARY = "Debug collector error watch config file"
-PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
-
-inherit native
+PROVIDES += "virtual/phosphor-debug-errors"
+PR = "r1"
SRC_URI += "file://errors_watch.yaml"
-PROVIDES += "virtual/phosphor-debug-errors"
-
S = "${WORKDIR}"
+inherit native
+
do_install:append() {
DEST=${D}${datadir}/dump
install -d ${DEST}
install errors_watch.yaml ${DEST}/
}
-