dbus-sdr: fix undefined symbols error

- When enable hybrid-sensors option, it will include sensordatahandler
  in sensorcommands.cpp. So need to add some src and dependency in
  meson.build.

Test:
Before:
```
ipmitool sdr elist
Err in cmd get sensor sdr info
Unable to open SDR for reading

journalctl -o json-pretty MESSAGE="ERROR opening IPMI provider"
{
    "SYSLOG_IDENTIFIER" : "ipmid",
    "_MACHINE_ID" : "0e6c70e7379c41fc9388fd64e1433923",
    "_BOOT_ID" : "2cfdedb0cafd43758e2469ea1bc81a19",
    "_PID" : "1306",
    "ERROR" : "/usr/lib/ipmid-providers/libdynamiccmds.so.0.1: undefined symbol: _ZN4ipmi6sensor7sensorsE",
    "MESSAGE" : "ERROR opening IPMI provider",
    "_SYSTEMD_UNIT" : "phosphor-ipmi-host.service",
    "_SYSTEMD_INVOCATION_ID" : "fd19f671e20147aea359bef0fc59c2c6",
    "_SYSTEMD_SLICE" : "system.slice",
    "_CAP_EFFECTIVE" : "1ffffffffff",
    "_GID" : "0",
    "_SOURCE_REALTIME_TIMESTAMP" : "1678071749865544",
    "__REALTIME_TIMESTAMP" : "1678071749865607",
    "_EXE" : "/usr/bin/ipmid",
    "CODE_LINE" : "77",
    "_COMM" : "ipmid",
    "_TRANSPORT" : "journal",
    "__MONOTONIC_TIMESTAMP" : "45349903",
    "PRIORITY" : "3",
    "CODE_FUNC" : "helper_log",
    "PROVIDER" : "/usr/lib/ipmid-providers/libdynamiccmds.so.0.1",
    "_HOSTNAME" : "gsz",
    "CODE_FILE" : "/usr/include/phosphor-logging/log.hpp",
    "__CURSOR" : "s=d8544f6ea872488fa319e44a1e5da636;i=39d;b=2cfdedb0cafd43758e2469ea1bc81a19;m=2b3fc0f;t=5f632868ef087;x=c4b27446a5eae068",
    "_RUNTIME_SCOPE" : "system",
    "_UID" : "0",
    "TRANSACTION_ID" : "2224375320",
    "_CMDLINE" : "ipmid",
    "_SYSTEMD_CGROUP" : "/system.slice/phosphor-ipmi-host.service"
}
```

After:
```
ipmitool sdr elist
power            | 00h | ok  | 23.2 |
reset            | 01h | ok  | 23.1 |
CATERR           | 02h | ok  | 65.2 |
...
...
```

Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
Change-Id: I02132cd734e098f1d858628094b911a461821a80
1 file changed
tree: 9b6e80e7606915829975f7e15bcc24a20ef7d74e
  1. app/
  2. dbus-sdr/
  3. docs/
  4. include/
  5. libipmid/
  6. scripts/
  7. softoff/
  8. subprojects/
  9. test/
  10. user_channel/
  11. xyz/
  12. .build.sh
  13. .clang-format
  14. .gitignore
  15. .shellcheck
  16. .travis.yml
  17. apphandler.cpp
  18. apphandler.hpp
  19. chassishandler.cpp
  20. chassishandler.hpp
  21. dcmihandler.cpp
  22. dcmihandler.hpp
  23. elog-errors.hpp
  24. error-HostEvent.hpp
  25. fruread.hpp
  26. generate_whitelist.sh
  27. generate_whitelist_create.sh
  28. globalhandler.cpp
  29. globalhandler.hpp
  30. groupext.cpp
  31. host-cmd-manager.cpp
  32. host-cmd-manager.hpp
  33. host-interface.cpp
  34. host-interface.hpp
  35. host-ipmid-whitelist.conf
  36. ipmi_fru_info_area.cpp
  37. ipmi_fru_info_area.hpp
  38. ipmid-new.cpp
  39. ipmisensor.cpp
  40. ipmiwhitelist.hpp
  41. LICENSE
  42. meson.build
  43. meson_options.txt
  44. OWNERS
  45. read_fru_data.cpp
  46. read_fru_data.hpp
  47. README.md
  48. selutility.cpp
  49. selutility.hpp
  50. sensordatahandler.cpp
  51. sensordatahandler.hpp
  52. sensorhandler.cpp
  53. sensorhandler.hpp
  54. settings.cpp
  55. settings.hpp
  56. storageaddsel.cpp
  57. storageaddsel.hpp
  58. storagehandler.cpp
  59. storagehandler.hpp
  60. sys_info_param.cpp
  61. sys_info_param.hpp
  62. systemintfcmds.cpp
  63. systemintfcmds.hpp
  64. testaddsel.cpp
  65. testit.cpp
  66. transporthandler.cpp
  67. transporthandler.hpp
  68. whitelist-filter.cpp
README.md

Compile ipmid with default options:

meson builddir
ninja -C builddir

Compile ipmid with yocto defaults:

meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled
ninja -C builddir

If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in ipmid/subprojects.

Enable/Disable meson wrap feature

meson builddir -Dwrap_mode=nofallback
ninja -C builddir

Enable debug traces

meson builddir -Dbuildtype=debug
ninja -C builddir

Generate test coverage report:

meson builddir -Db_coverage=true -Dtests=enabled
ninja -C builddir test
ninja -C builddir coverage