elog-errors: remove generated file
Move the error YAML definition to phosphor-dbus-interfaces and rely
on the real elog-errors.hpp from phosphor-logging rather than a
generated one.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I944430fc63e2e1ea169947ae43d061f19458f9fc
diff --git a/checkstop_app.cpp b/checkstop_app.cpp
index a708f8e..4837d78 100644
--- a/checkstop_app.cpp
+++ b/checkstop_app.cpp
@@ -1,6 +1,6 @@
#include "org/open_power/Host/Boot/error.hpp"
-#include "phosphor-logging/elog-errors.hpp"
+#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/elog.hpp>
int main(int /*argc*/, char** /*argv*/)
diff --git a/gen/meson.build b/gen/meson.build
deleted file mode 100644
index b550c79..0000000
--- a/gen/meson.build
+++ /dev/null
@@ -1,15 +0,0 @@
-# Generated file; do not modify.
-sdbuspp_gen_meson_ver = run_command(
- sdbuspp_gen_meson_prog,
- '--version',
- check: true,
-).stdout().strip().split('\n')[0]
-
-if sdbuspp_gen_meson_ver != 'sdbus++-gen-meson version 7'
- warning('Generated meson files from wrong version of sdbus++-gen-meson.')
- warning(
- 'Expected "sdbus++-gen-meson version 7", got:',
- sdbuspp_gen_meson_ver
- )
-endif
-
diff --git a/gen/org/meson.build b/gen/org/meson.build
deleted file mode 100644
index 6488f22..0000000
--- a/gen/org/meson.build
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated file; do not modify.
-subdir('open_power')
diff --git a/gen/org/open_power/Host/Boot/meson.build b/gen/org/open_power/Host/Boot/meson.build
deleted file mode 100644
index 6a86ba3..0000000
--- a/gen/org/open_power/Host/Boot/meson.build
+++ /dev/null
@@ -1,15 +0,0 @@
-# Generated file; do not modify.
-generated_sources += custom_target(
- 'org/open_power/Host/Boot__cpp'.underscorify(),
- input: [ '../../../../../yaml/org/open_power/Host/Boot.errors.yaml', ],
- output: [ 'error.cpp', 'error.hpp', ],
- depend_files: sdbusplusplus_depfiles,
- command: [
- sdbuspp_gen_meson_prog, '--command', 'cpp',
- '--output', meson.current_build_dir(),
- '--tool', sdbusplusplus_prog,
- '--directory', meson.current_source_dir() / '../../../../../yaml',
- 'org/open_power/Host/Boot',
- ],
-)
-
diff --git a/gen/org/open_power/Host/meson.build b/gen/org/open_power/Host/meson.build
deleted file mode 100644
index 4c34ff4..0000000
--- a/gen/org/open_power/Host/meson.build
+++ /dev/null
@@ -1,16 +0,0 @@
-# Generated file; do not modify.
-subdir('Boot')
-generated_others += custom_target(
- 'org/open_power/Host/Boot__markdown'.underscorify(),
- input: [ '../../../../yaml/org/open_power/Host/Boot.errors.yaml', ],
- output: [ 'Boot.md' ],
- depend_files: sdbusplusplus_depfiles,
- command: [
- sdbuspp_gen_meson_prog, '--command', 'markdown',
- '--output', meson.current_build_dir(),
- '--tool', sdbusplusplus_prog,
- '--directory', meson.current_source_dir() / '../../../../yaml',
- 'org/open_power/Host/Boot',
- ],
-)
-
diff --git a/gen/org/open_power/meson.build b/gen/org/open_power/meson.build
deleted file mode 100644
index e5645b3..0000000
--- a/gen/org/open_power/meson.build
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated file; do not modify.
-subdir('Host')
diff --git a/gen/regenerate-meson b/gen/regenerate-meson
deleted file mode 100755
index a39ad64..0000000
--- a/gen/regenerate-meson
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-
-REPO_ROOT=$(git rev-parse --show-toplevel)
-
-# Find sdbus++-gen-meson
-# 1. Check $SDBUSPP_GEN_MESON
-# 2. Check in $PATH
-# 3. Check in subprojects/sdbusplus
-if [ ! -x "$SDBUSPP_GEN_MESON" ]; then
- SDBUSPP_GEN_MESON="$(which sdbus++-gen-meson 2> /dev/null)"
-fi
-if [ ! -x "$SDBUSPP_GEN_MESON" ]; then
- SDBUSPP_GEN_MESON="$REPO_ROOT/subprojects/sdbusplus/tools/sdbus++-gen-meson"
-fi
-if [ ! -x "$SDBUSPP_GEN_MESON" ]; then
- echo "Cannot find sdbus++-gen-meson ($SDBUSPP_GEN_MESON)."
- exit 1
-fi
-
-$SDBUSPP_GEN_MESON \
- --command meson \
- --directory "$REPO_ROOT/yaml" \
- --output "$REPO_ROOT/gen"
diff --git a/gen/run-ci b/gen/run-ci
deleted file mode 100755
index dba8109..0000000
--- a/gen/run-ci
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-cd "$(dirname "$0")" || exit
-find . -mindepth 1 -maxdepth 1 -type d -exec rm -r {} \;
-./regenerate-meson || exit
-rc=0
-git --no-pager diff --exit-code -- . || rc=$?
-untracked="$(git ls-files --others --exclude-standard -- .)" || rc=$?
-if [ -n "$untracked" ]; then
- echo "Untracked files:" >&2
- echo "$untracked" >&2
- rc=1
-fi
-if ((rc != 0)); then
- echo "Generated meson files differ from expected values" >&2
- exit 1
-fi
diff --git a/meson.build b/meson.build
index dcff46e..ece2796 100644
--- a/meson.build
+++ b/meson.build
@@ -14,12 +14,6 @@
systemd = dependency('systemd', required : true)
sdbusplus_dep = dependency('sdbusplus')
-sdbusplusplus_prog = find_program('sdbus++')
-sdbuspp_gen_meson_prog = find_program('sdbus++-gen-meson')
-sdbusplusplus_depfiles = files()
-if sdbusplus_dep.type_name() == 'internal'
- sdbusplusplus_depfiles = subproject('sdbusplus').get_variable('sdbusplusplus_depfiles')
-endif
phosphorlogging = dependency(
'phosphor-logging',
@@ -31,42 +25,6 @@
realpath_prog = find_program('realpath')
-selected_subdirs = []
-selected_subdirs += 'org/open_power'
-
-generated_root = meson.current_build_dir() / 'gen'
-generated_others = []
-generated_sources = []
-
-# Source the generated meson files
-subdir('gen')
-foreach d : selected_subdirs
- subdir('gen' / d)
-endforeach
-
-# Parse through the list from sdbus++-gendir and put into sets.
-generated_headers = []
-generated_cpp = []
-generated_others_files = []
-
-foreach g : generated_sources generated_others
- foreach f : g.to_list()
- rel_path = run_command(
- realpath_prog,
- '--relative-to', generated_root,
- f.full_path(),
- ).stdout().strip().split('\n')[-1]
-
- if rel_path.endswith('.hpp')
- generated_headers += rel_path
- elif rel_path.endswith('.cpp')
- generated_cpp += rel_path
- else
- generated_others_files += rel_path
- endif
- endforeach
-endforeach
-
cxx = meson.get_compiler('cpp')
conf_data = configuration_data()
if get_option('hostboot-dump-collection').enabled()
@@ -94,19 +52,15 @@
executable('watchdog_timeout',
'watchdog_timeout.cpp',
- generated_sources,
dependencies: deps,
link_with: watchdog_lib,
- include_directories: include_directories('gen'),
implicit_include_directories: true,
install: true
)
executable('checkstop_app',
'checkstop_app.cpp',
- generated_sources,
dependencies: deps,
- include_directories: include_directories('gen'),
implicit_include_directories: true,
install: true
)
diff --git a/phosphor-logging/elog-errors.hpp b/phosphor-logging/elog-errors.hpp
deleted file mode 100644
index 53f322c..0000000
--- a/phosphor-logging/elog-errors.hpp
+++ /dev/null
@@ -1,129 +0,0 @@
-// This file was autogenerated. Do not edit!
-// See elog-gen.py for more details
-#pragma once
-
-#include <phosphor-logging/elog.hpp>
-#include <phosphor-logging/log.hpp>
-#include <sdbusplus/exception.hpp>
-
-#include <string>
-#include <tuple>
-#include <type_traits>
-
-namespace sdbusplus
-{
-namespace org
-{
-namespace open_power
-{
-namespace Host
-{
-namespace Boot
-{
-namespace Error
-{
-struct WatchdogTimedOut;
-} // namespace Error
-} // namespace Boot
-} // namespace Host
-} // namespace open_power
-} // namespace org
-} // namespace sdbusplus
-
-namespace sdbusplus
-{
-namespace org
-{
-namespace open_power
-{
-namespace Host
-{
-namespace Boot
-{
-namespace Error
-{
-struct Checkstop;
-} // namespace Error
-} // namespace Boot
-} // namespace Host
-} // namespace open_power
-} // namespace org
-} // namespace sdbusplus
-
-namespace phosphor
-{
-
-namespace logging
-{
-
-namespace org
-{
-namespace open_power
-{
-namespace Host
-{
-namespace Boot
-{
-namespace _Checkstop
-{} // namespace _Checkstop
-
-struct Checkstop
-{
- static constexpr auto L = level::ERR;
- using metadata_types = std::tuple<>;
-};
-
-} // namespace Boot
-} // namespace Host
-} // namespace open_power
-} // namespace org
-
-namespace details
-{
-
-template <>
-struct map_exception_type<
- sdbusplus::org::open_power::Host::Boot::Error::Checkstop>
-{
- using type = org::open_power::Host::Boot::Checkstop;
-};
-
-} // namespace details
-
-namespace org
-{
-namespace open_power
-{
-namespace Host
-{
-namespace Boot
-{
-namespace _WatchdogTimedOut
-{} // namespace _WatchdogTimedOut
-
-struct WatchdogTimedOut
-{
- static constexpr auto L = level::ERR;
- using metadata_types = std::tuple<>;
-};
-
-} // namespace Boot
-} // namespace Host
-} // namespace open_power
-} // namespace org
-
-namespace details
-{
-
-template <>
-struct map_exception_type<
- sdbusplus::org::open_power::Host::Boot::Error::WatchdogTimedOut>
-{
- using type = org::open_power::Host::Boot::WatchdogTimedOut;
-};
-
-} // namespace details
-
-} // namespace logging
-
-} // namespace phosphor
diff --git a/watchdog_timeout.cpp b/watchdog_timeout.cpp
index 36c6e66..91fa616 100644
--- a/watchdog_timeout.cpp
+++ b/watchdog_timeout.cpp
@@ -18,9 +18,8 @@
#include <format>
#else
-#include "org/open_power/Host/Boot/error.hpp"
-#include "phosphor-logging/elog-errors.hpp"
-
+#include <org/open_power/Host/Boot/error.hpp>
+#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/elog.hpp>
#endif
diff --git a/yaml/org/open_power/Host/Boot.errors.yaml b/yaml/org/open_power/Host/Boot.errors.yaml
deleted file mode 100644
index ffd3aa3..0000000
--- a/yaml/org/open_power/Host/Boot.errors.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-- name: Checkstop
- description: Host checkstop condition detected
-
-- name: WatchdogTimedOut
- description: Host watchdog timed out