diff options
Diffstat (limited to 'meta-phosphor/recipes-phosphor/logging')
4 files changed, 51 insertions, 40 deletions
diff --git a/meta-phosphor/recipes-phosphor/logging/ffdc_git.bb b/meta-phosphor/recipes-phosphor/logging/ffdc_git.bb index 750a6dff1..5c8f8aebc 100644 --- a/meta-phosphor/recipes-phosphor/logging/ffdc_git.bb +++ b/meta-phosphor/recipes-phosphor/logging/ffdc_git.bb @@ -15,7 +15,7 @@ RDEPENDS_${PN} += " \ S = "${WORKDIR}/git" SRC_URI += "git://github.com/openbmc/phosphor-debug-collector" -SRCREV = "984a98f79022c60c51a465d4bbde1247d0f69b3e" +SRCREV = "8b9b4690a4460ada5bf60a285ff6065eda6d5d4a" do_install() { install -d ${D}${bindir} diff --git a/meta-phosphor/recipes-phosphor/logging/phosphor-hostlogger_git.bb b/meta-phosphor/recipes-phosphor/logging/phosphor-hostlogger_git.bb index 24749c027..8816f1ab6 100644 --- a/meta-phosphor/recipes-phosphor/logging/phosphor-hostlogger_git.bb +++ b/meta-phosphor/recipes-phosphor/logging/phosphor-hostlogger_git.bb @@ -4,9 +4,7 @@ HOMEPAGE = "https://github.com/openbmc/phosphor-hostlogger" PR = "r1" PV = "1.0+git${SRCPV}" -inherit autotools -inherit pkgconfig -inherit python3native +inherit meson inherit systemd # License info @@ -14,27 +12,55 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" # Dependencies -DEPENDS += "\ - autoconf-archive-native \ - sdbusplus \ - ${PYTHON_PN}-sdbus++-native \ - phosphor-dbus-interfaces \ +DEPENDS += " \ + phosphor-logging \ + zlib \ " RDEPENDS_${PN} += "obmc-console" RRECOMMENDS_${PN} += "phosphor-debug-collector" -# systemd service setup +# Source code repository +S = "${WORKDIR}/git" +SRC_URI = "git://github.com/openbmc/phosphor-hostlogger" +SRCREV = "e9af83c6f5cc14a7493de5359b3c65b8832c99f0" + +# Systemd service template SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE_${PN} = "hostlogger.service" +SYSTEMD_SERVICE_${PN} = "hostlogger@.service" -# Host TTY setup -OBMC_CONSOLE_HOST_TTY ?= "ttyVUART0" +# Default service instance to install (single-host mode) +DEFAULT_INSTANCE = "ttyVUART0" +DEFAULT_SERVICE = "hostlogger@${DEFAULT_INSTANCE}.service" -# Extra parameters for 'configure' script -EXTRA_OECONF = "HOST_TTY=${OBMC_CONSOLE_HOST_TTY} \ - SYSTEMD_TARGET=multi-user.target" +# Multi-host mode setup - list of configuration files to install, can be added +# via SRC_URI in a bbappend. The file name is the name of the service instance, +# which should match the corresponding instance of the obmc-console service. +CUSTOM_CONFIGS = "${@custom_configs('${WORKDIR}')}" +CUSTOM_SERVICES = "${@custom_services('${CUSTOM_CONFIGS}')}" -# Source code repository -S = "${WORKDIR}/git" -SRC_URI = "git://github.com/openbmc/phosphor-hostlogger" -SRCREV = "ea31658b6df1c51b28ed28e3e459a64fb8d13da8" +# Preset systemd units +SYSTEMD_SERVICE_${PN} += "${@'${CUSTOM_SERVICES}' if len('${CUSTOM_SERVICES}') \ + else '${DEFAULT_SERVICE}'}" + +# Gets list of custom config files in a directory +def custom_configs(workdir): + if os.path.exists(workdir): + return ' '.join([f for f in os.listdir(workdir) if f.endswith('.conf')]) + +# Get list of custom service instances +def custom_services(configs): + return ' '.join(['hostlogger@' + i.replace('.conf', '.service') \ + for i in configs.split()]) + +do_install_append() { + # Install config files + if [ -n "${CUSTOM_CONFIGS}" ]; then + for CONFIG_FILE in ${CUSTOM_CONFIGS}; do + install -Dm 0644 ${WORKDIR}/${CONFIG_FILE} \ + ${D}${sysconfdir}/hostlogger/${CONFIG_FILE} + done + else + install -Dm 0644 ${S}/default.conf \ + ${D}${sysconfdir}/hostlogger/${DEFAULT_INSTANCE}.conf + fi +} diff --git a/meta-phosphor/recipes-phosphor/logging/phosphor-logging-error-logs-native.bb b/meta-phosphor/recipes-phosphor/logging/phosphor-logging-error-logs-native.bb deleted file mode 100644 index 23464ebbd..000000000 --- a/meta-phosphor/recipes-phosphor/logging/phosphor-logging-error-logs-native.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "Phosphor OpenBMC - error log meta data generation" -PR = "r1" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" - -inherit native - -#To append new recipes that copies error yaml files to the known -#location, add DEPENDS relationhip using bbappend to -#phosphor-logging-error-log-native recipe with the native -#recipe name - -#Refer to openpower-debug-collector-error-native.bb to see how -#to copy error yaml files to a known location diff --git a/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb b/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb index 7e36d7871..cf068c9d7 100644 --- a/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb +++ b/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb @@ -20,12 +20,11 @@ DEPENDS += "${PYTHON_PN}-pyyaml-native" DEPENDS += "${PYTHON_PN}-native" DEPENDS += "${PYTHON_PN}-sdbus++-native" DEPENDS += "sdbusplus" -DEPENDS += "phosphor-dbus-interfaces phosphor-dbus-interfaces-native" +DEPENDS += "phosphor-dbus-interfaces" DEPENDS += "virtual/phosphor-logging-callouts" -DEPENDS += "phosphor-logging-error-logs-native" -DEPENDS += "phosphor-logging-native" DEPENDS += "libcereal" DEPENDS += "sdeventplus" +DEPENDS_append_class-target = " packagegroup-obmc-yaml-providers" PACKAGE_BEFORE_PN = "${PN}-test" FILES_${PN}-test = "${bindir}/*-test" @@ -56,7 +55,7 @@ FILES_phosphor-rsyslog-config += " \ " SRC_URI += "git://github.com/openbmc/phosphor-logging" -SRCREV = "0649b985860f7e0dc75e044f4b7598b767c94a9f" +SRCREV = "1ab6696f0103d60ffb398b45d3fcd1afeeff6a4e" S = "${WORKDIR}/git" @@ -98,7 +97,7 @@ PACKAGECONFIG[openpower-pels] = " \ --enable-openpower-pel-extension, \ --disable-openpower-pel-extension, \ nlohmann-json nlohmann-fifo cli11 pldm, \ - , \ + python3, \ " # Enable install_scripts during native and native SDK build @@ -109,7 +108,7 @@ PACKAGECONFIG_add_class-nativesdk = "install_scripts" PACKAGECONFIG_remove_class-target = "install_scripts" EXTRA_OECONF = " \ - YAML_DIR=${STAGING_DIR_NATIVE}${yaml_dir} \ + YAML_DIR=${STAGING_DIR_TARGET}${yaml_dir} \ CALLOUTS_YAML=${STAGING_DIR_NATIVE}${callouts_datadir}/callouts.yaml \ " |