2a1ef013 | 03-Mar-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I5e218b58822e02ead2f37a069da4c0034c5005f5 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
41ad8380 | 13-Feb-2025 |
Ed Tanous <ed@tanous.net> |
Fix deprecated asio usage
And enable BOOST_ASIO_NO_DEPRECATED
Change-Id: I83612501948e8c1c4a0df735aafc80e26af7f3cb Signed-off-by: Ed Tanous <ed@tanous.net> |
d884cdf7 | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I555df8382455157bff44671b6f284e3121d5c182 Signed-off-by: Patrick Williams <p
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I555df8382455157bff44671b6f284e3121d5c182 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
7cc8d00a | 23-Sep-2024 |
Lei YU <yulei.sh@bytedance.com> |
Remove default interfaces
When association is used, mapper will create DBus objects on the leaf of the associated objects, and will "assign" the "default interfaces" to the parent objects: * org.fre
Remove default interfaces
When association is used, mapper will create DBus objects on the leaf of the associated objects, and will "assign" the "default interfaces" to the parent objects: * org.freedesktop.DBus.Introspectable * org.freedesktop.DBus.Peer * org.freedesktop.DBus.Properties
For example, software manager will create BMC version object and create association, and we could see below DBus objects created by mapper: ``` /xyz/openbmc_project/software/64876e4e/inventory /xyz/openbmc_project/software/64876e4e/software_version ```
And we could mapper's `GetObject` method will return the default interfaces on the parent object:
```json # busctl --json=pretty call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetObject sas /xyz/openbmc_project/software/64876e4e 0 { "type" : "a{sas}", "data" : [ { "xyz.openbmc_project.ObjectMapper" : [ "org.freedesktop.DBus.Introspectable", "org.freedesktop.DBus.Peer", "org.freedesktop.DBus.Properties" ], "xyz.openbmc_project.Software.BMC.Updater" : [ "org.freedesktop.DBus.Introspectable", "org.freedesktop.DBus.Peer", "org.freedesktop.DBus.Properties", "xyz.openbmc_project.Association.Definitions", "xyz.openbmc_project.Common.FilePath", "xyz.openbmc_project.Inventory.Decorator.Compatible", "xyz.openbmc_project.Software.Activation", "xyz.openbmc_project.Software.ExtendedVersion", "xyz.openbmc_project.Software.RedundancyPriority", "xyz.openbmc_project.Software.Version" ] } ] } ```
This patch removes registering the default interfaces (peer, properties, Introspectable) when done as part of an ObjectManager event, because they're generally not received as part of an InterfacesAdded call. These don't generally get searched on, and don't make a ton of sense to have the mapper implicitly add, but were done to make the introspect and objectmapper results match.
However, the default interfaces returned by introspect on the parents could not be called, e.g.
``` # The leaf object is OK: busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/software/64876e4e/inventory org.freedesktop.DBus.Properties GetAll s org.freedesktop.DBus.Properties a{sv} 0
# The parent object fails to call: busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/software/64876e4e org.freedesktop.DBus.Properties GetAll s org.freedesktop.DBus.Properties Call failed: Unknown object '/xyz/openbmc_project/software/64876e4e'. ```
This probably means that the default interfaces returned by introspect could not really be used, and thus we could remove then in mapper here.
Tested: With this patch, the parent object does not show default interfaces: ```json # busctl --json=pretty call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetObject sas /xyz/openbmc_project/software/64876e4e 0 { "type" : "a{sas}", "data" : [ { "xyz.openbmc_project.ObjectMapper" : [], "xyz.openbmc_project.Software.BMC.Updater" : [ "org.freedesktop.DBus.Introspectable", "org.freedesktop.DBus.Peer", "org.freedesktop.DBus.Properties", "xyz.openbmc_project.Association.Definitions", "xyz.openbmc_project.Common.FilePath", "xyz.openbmc_project.Inventory.Decorator.Compatible", "xyz.openbmc_project.Software.Activation", "xyz.openbmc_project.Software.ExtendedVersion", "xyz.openbmc_project.Software.RedundancyPriority", "xyz.openbmc_project.Software.Version" ] } ] } ```
Note: if this gets merged, bmcweb's related code in openbmc_dbus_rest.hpp shall be updated to handle this case.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I568f618141ac514f9720e83960a1b4e76f77eb54
show more ...
|
883a8929 | 22-Jan-2025 |
Benjamin Fair <benjaminfair@google.com> |
associations: fix leak in assocMaps.ifaces
New entries get added to ifaces whenever an object with associations is detected, but the entries are never removed even if all the endpoints are gone, lea
associations: fix leak in assocMaps.ifaces
New entries get added to ifaces whenever an object with associations is detected, but the entries are never removed even if all the endpoints are gone, leading to a memory leak.
Change-Id: Ide5439e4eaab7c70fb0331d59d59753905f45066 Signed-off-by: Benjamin Fair <benjaminfair@google.com> Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
d01fca35 | 18-Dec-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-19
clang-format-19 isn't compatible with the clang-format-18 output, so we need to reformat the code with the latest version. A few parameters in clang-tidy have b
clang-format: re-format for clang-19
clang-format-19 isn't compatible with the clang-format-18 output, so we need to reformat the code with the latest version. A few parameters in clang-tidy have been deprecated, so adjust the style file accordingly.
See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style. See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement.
Change-Id: Id076d89feb8ae9b1a2053234f839affd8628600a Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
ea0e5d27 | 11-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Fix compile error on boost 1.86
Boost 1.86 shows a compiler error which is holding up the rebase here. The mapper extends std::vector, because it results in smaller binary sizes compared to boost::v
Fix compile error on boost 1.86
Boost 1.86 shows a compiler error which is holding up the rebase here. The mapper extends std::vector, because it results in smaller binary sizes compared to boost::vector. It's not clear if this is the problem, or if there's something else amiss within container. Triaging the real root cause isn't important to this use case.
There are a few reported bugs and changes that might be related[1][2].
It's not clear which one would've broken try_emplace in this case, nor is it worth the effort to resolve.
This patchset replaces try_emplace calls with emplace calls. In theory these are slightly less efficient, but considering that map construction is a cold path, it's not terribly important that it be efficient.
[1] https://github.com/boostorg/container/issues/292 [2] https://github.com/boostorg/container/issues/280
Change-Id: I30d176022d2cec45430a50dc02c84666541fb4d7 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
cf72403d | 29-Oct-2024 |
George Liu <liuxiwei@ieisystem.com> |
libmapper: format code using c++ clang-format
Remove libmapper/.clang-fromat and format code using c++ clang-format
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I62781743b03fa1e806
libmapper: format code using c++ clang-format
Remove libmapper/.clang-fromat and format code using c++ clang-format
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I62781743b03fa1e806f51f4844c93aaf4cdfac4f
show more ...
|
7a93d516 | 13-Sep-2024 |
Myung Bae <myungbae@us.ibm.com> |
Return empty paths if no SubTreePathsById is found
`getAssociatedSubTreePaths()` returns the empty paths if there are no associated subtrees, and bmcweb uses it to differentiate from the error.
How
Return empty paths if no SubTreePathsById is found
`getAssociatedSubTreePaths()` returns the empty paths if there are no associated subtrees, and bmcweb uses it to differentiate from the error.
However, `getAssociatedSubTreePathsById()` (which is introduced by [1]) returns NotFound error for the case. It would be more appropriate to match its behavior with `getAssociatedSubTreePaths()`.
Tested: - unit-test is succeeded for good and bad cases
[1] https://gerrit.openbmc.org/c/openbmc/phosphor-objmgr/+/70699
Change-Id: I84680b1b39ba8ade94ea6fdb7dae280505e5c050 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
c363323e | 09-Apr-2024 |
Lakshmi Yadlapati <lakshmiy@us.ibm.com> |
mapper: Add GetAssociatedSubTreePathsById and GetAssociatedSubTreeById
dbus-interface change in: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/69999
This commit implements two new
mapper: Add GetAssociatedSubTreePathsById and GetAssociatedSubTreeById
dbus-interface change in: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/69999
This commit implements two new methods: GetAssociatedSubTreePathsById and GetAssociatedSubTreeById. These methods retrieve the paths of associated endpoints corresponding to the provided identifier, filtering based on their association with specified endpoint interfaces.
GetAssociatedSubTreePathsById returns the D-Bus paths of associated endpoints, while GetAssociatedSubTreeById retrieves a dictionary of D-Bus paths of associated endpoints mapped to corresponding services associated with the provided identifier.
Tested: ''' busctl call -j "xyz.openbmc_project.ObjectMapper" "/xyz/openbmc_project/object_mapper" \ "xyz.openbmc_project.ObjectMapper" "GetAssociatedSubTreePathsById" ssassas \ "chassis" \ "/xyz/openbmc_project/inventory" \ 1 "xyz.openbmc_project.Inventory.Item.Chassis" \ "powered_by" \ 1 "xyz.openbmc_project.Inventory.Item.PowerSupply" { "type" : "as", "data" : [ [ "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0", "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1", "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply2", "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply3" ] ] } '''
Another example.
``` busctl call -j xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper \ xyz.openbmc_project.ObjectMapper GetAssociatedSubTreePathsById ssassas \ disk_backplane0 \ /xyz/openbmc_project/inventory \ 1 xyz.openbmc_project.Inventory.Item.FabricAdapter \ connecting \ 1 xyz.openbmc_project.Inventory.Connector.Port { "type" : "as", "data" : [ [ "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector0", "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector1", "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector2", "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector3", "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector4", "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector5" ] ] } ```
Change-Id: Id55a9b41fe70f7204543d92b5396888f6914a1d4 Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com> Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
8168cafb | 03-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
meson: switch code dependency to libsystemd
For a while now systemd has packaged a separate `libsystemd`. For meson dependency, `systemd` should be used when looking for systemd service file paths
meson: switch code dependency to libsystemd
For a while now systemd has packaged a separate `libsystemd`. For meson dependency, `systemd` should be used when looking for systemd service file paths and `libsystemd` should be used for `sd_*` functions.
Update the dependency accordingly.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iff3e5cc93a503e7391e4eea9624b04069135a42a
show more ...
|
8c25006c | 23-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
handler: fix undefined behavior
Saving a reference to a temporary returned from a function call is undefined behavior and subverts RVO. Remove the `&` so these become local variables.
Signed-off-b
handler: fix undefined behavior
Saving a reference to a temporary returned from a function call is undefined behavior and subverts RVO. Remove the `&` so these become local variables.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I8e7da30fddef808dfe7ee323d7f91a7c2a2cdeb6
show more ...
|
9052ebd3 | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: Ic68b91e23738cafe198c50f40e46d4163bda02b6 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
fb853663 | 03-May-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
meson: Declare a find_program() override for mapperx
If phosphor-objmgr is used as a subproject, allow discovery of its mapperx program for use in the parent project.
Change-Id: I1cb448500cab015b8b
meson: Declare a find_program() override for mapperx
If phosphor-objmgr is used as a subproject, allow discovery of its mapperx program for use in the parent project.
Change-Id: I1cb448500cab015b8b309979ab26f7e51f03e8ea Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
883d91d7 | 03-Apr-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
meson: Disable tests build for tinyxml2 dependency
Currently local meson build breaks on tinyxml2 since the code from this package produces a warning and all warnings are treated as errors: """ ../s
meson: Disable tests build for tinyxml2 dependency
Currently local meson build breaks on tinyxml2 since the code from this package produces a warning and all warnings are treated as errors: """ ../subprojects/tinyxml2-9.0.0/xmltest.cpp:711:38: error: ignoring return value of ‘char* fgets(char*, int, FILE*)’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] """ The warning above comes from the compilation of the tinyxml2 unit tests. Since we don't really need them, disable 'tests' option for tinyxml2 dependency to fix the meson build.
Tested: Locally executed "meson setup build && cd build && meson compile" now finishes successfully.
Change-Id: Ib35fef4e515df22c7b82a6f379689d4672059099 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
3e2eb6af | 29-Mar-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
build: Add wrap file for tinyxml2
Currently local build on the system without tinyxml2 can fail with the following message: """ meson.build:107:8: ERROR: Dependency "tinyxml2" not found, tried pkgco
build: Add wrap file for tinyxml2
Currently local build on the system without tinyxml2 can fail with the following message: """ meson.build:107:8: ERROR: Dependency "tinyxml2" not found, tried pkgconfig and cmake """ Provide "tinyxml2.wrap" file to fix the issue. The "tinyxml2.wrap" file is copied from the bmcweb repository.
Change-Id: I652cae42192affd6513d1e148e4b4a177e00999d Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
ec87407c | 29-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer retur
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer return true for auto features. Instead, the expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`.
Change-Id: I2ce48ae6fe133c0b355672b5bb7d7c27bc6b3702 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
47b68cbc | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: Ibc0976e16acb6163431698832a461e9fc7335448 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
ef885e46 | 15-Aug-2023 |
George Liu <liuxiwei@inspur.com> |
meson_options.txt: Support for reading options from meson.options
Support has been added for reading options from meson.options instead of meson_options.txt[1]. These are equivalent, but not using t
meson_options.txt: Support for reading options from meson.options
Support has been added for reading options from meson.options instead of meson_options.txt[1]. These are equivalent, but not using the .txt extension for a build file has a few advantages, chief among them many tools and text editors expect a file with the .txt extension to be plain text files, not build scripts.
[1] https://mesonbuild.com/Release-notes-for-1-1-0.html#support-for-reading-options-from-mesonoptions
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I0714938f7ffd30c97c2f10bb45796103d29f4d12
show more ...
|
26ed9805 | 12-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: upgrade to C++23
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it.
Change-Id: Ifabec573b184316716aa6
build: upgrade to C++23
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it.
Change-Id: Ifabec573b184316716aa692598caba26fb5857b3 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
1a19e6aa | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I9252bdd2509e5a9cff31fce9be31291f63b3a5cc Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
40302742 | 12-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: remove deprecated get_pkgconfig_variable
Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In meson 0.58 the `get_variable` was enhanced to no longer require the `pkgconfig
meson: remove deprecated get_pkgconfig_variable
Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In meson 0.58 the `get_variable` was enhanced to no longer require the `pkgconfig` keyword argument. Ensure meson 0.58 is required and update the usage of all `get_pkgconfig_variable` and `get_variable` to be the modern variant.
Change-Id: Idff7506a1f897993ba350fdc31ce5103c8a9e998 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
bd441717 | 15-Feb-2023 |
Patrick Williams <patrick@stwcx.xyz> |
mapper-wait: add service dependency
Even though ObjectMapper is dbus-activated, it takes long enough to start up that the dbus client operation times out. This causes a whole bunch of failed servic
mapper-wait: add service dependency
Even though ObjectMapper is dbus-activated, it takes long enough to start up that the dbus client operation times out. This causes a whole bunch of failed services on boot of the BMC. Add an explicit dependency back on the service in order to give the service time to start up.
Tested: Applied on Bletchley and see no restarts of the various mapper-wait invocations now.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I473a8f251906a8267e2c44600b6802adfea1fd0e
show more ...
|
670edd12 | 15-Feb-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update with latest
Copy the latest clang-format and apply to the repository.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I10a3fe64d4ca77601e6855daf46954579312c7df |
a99e109c | 03-Feb-2023 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
lint: update .clant-format and run
Change-Id: If9cfc42ca96517a4df2c59c130c2e22a2a443467 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> |