History log of /openbmc/phosphor-settingsd/ (Results 1 – 25 of 94)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
ccf712f616-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: Ie3c1ab2d1e34cc296e89df8ecc11e5893ad11c84
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

ef9bd93504-Apr-2024 Konstantin Aladyshev <aladyshev22@gmail.com>

meson: Fix local build of the settings_gen target

Currently local meson build fails with the following error:
"""
[343/700] Generating settings_manager_hpp with a custom command
FAILED: settings_man

meson: Fix local build of the settings_gen target

Currently local meson build fails with the following error:
"""
[343/700] Generating settings_manager_hpp with a custom command
FAILED: settings_manager.hpp
<...>/env/bin/python3 ../settings.py -i ../settings_example.yaml
<...>
ModuleNotFoundError: No module named 'sdbusplus'
"""
This is happening because 'settings_manager.mako.hpp' from the
'settings_gen' target refers to python modules from the external
'sdbusplus' project. Therefore in case of a local build it is
necessary to provide search path to the relevant sdbusplus subproject
folder. Fix this with the help of 'PYTHONPATH' environment variable.

Tested:
Both local meson build and Yocto build are finished successfully.

Change-Id: I8ec81edcdeb84c82a315937d3ed31be3dbaa1aa5
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>

show more ...

96dc05dc02-Apr-2024 Konstantin Aladyshev <aladyshev22@gmail.com>

meson: Fix local cereal build

Currently local build is failing with a message:
"""
cereal| Exception: Failed to configure the CMake subproject: Could NOT
find Boost (missing: Boost_INCLUDE_DIR seria

meson: Fix local cereal build

Currently local build is failing with a message:
"""
cereal| Exception: Failed to configure the CMake subproject: Could NOT
find Boost (missing: Boost_INCLUDE_DIR serialization)
Subproject subprojects/cereal is buildable: NO (disabling)
"""
Since cereal requires boost only for the sandbox build and this
functionality is not needed, add option to skip building performance
sandbox comparison to solve the issue.

Tested:
"meson setup build" no longer fails with the cereal error.

Change-Id: Ie22c1b08b784aba244a50fd7fed9c5ef4eef5542
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>

show more ...

464db67620-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: Idd550bb3120c0a10ecca2901236db78a90149bdd
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

86642a8b15-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: Ic7f6febd16e9de16081397d13fa7b85a07a0fa5d

show more ...

3132eca712-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: Ic398c854a3da29dd9eac8

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: Ic398c854a3da29dd9eac865aa8d2b44159669bfa
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

e568fcad25-May-2023 Matt Spinler <spinler@us.ibm.com>

Convert to lg2

Convert the remaining logging statements to lg2.

Change-Id: I45bc8ed76f9b71517a5a8119e89713278e31679d
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

fb1ad7cc24-May-2023 Matt Spinler <spinler@us.ibm.com>

Convert version 1 files to version 2 on startup

When reading in persisted property values from their files, check the
version number the file was saved in. If that version is less than the
first ve

Convert version 1 files to version 2 on startup

When reading in persisted property values from their files, check the
version number the file was saved in. If that version is less than the
first version using name/value pairs, then rewrite the file using the
latest version.

This is done so that it removes the possibility of the problem described
in openbmc/phosphor-settingsd/#16 of occurring in the future, which is
where if a new property is added it gets set to another property's
value.

This also creates functions for the serializing and deserializing so the
code to do it just needs to be in one place.

Note that if a version of code runs from when before NVP support was
added, it can still read files saved with the new version so this change
is backwards compatible.

Change-Id: Ib0be93de2151bc9435664179690b0eac2bb980ff
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...

c2f84c7b24-May-2023 Matt Spinler <spinler@us.ibm.com>

Use named values when serializing

As described by openbmc/phosphor-settingsd#16, the code has a problem
when a new D-Bus property is added to a settings object that has a
modified property, meaning

Use named values when serializing

As described by openbmc/phosphor-settingsd#16, the code has a problem
when a new D-Bus property is added to a settings object that has a
modified property, meaning it has been serialized to file. This is
because the file doesn't say which property the value is meant for - the
fields are only named value0, value1, etc. So if the new property is
alphabetically before the original property, the code will read the
value0 value into the new property though it was meant to be for the
original one.

To fix this, start using cereal's Name/Value Pair (NVP) feature, with
the field names named after the property, like:
"QuiesceOnHwError": true

This requires the cereal version to bump from 1 to 2. When saving, the
code will always write using version 2 using NVPs. When loading it will
check the version in the file and if it was 1 it will read it using the
original non-NVP method, otherwise it will use the NVP method.

Example generated load and save functions:

```
template<class Archive>
void save(Archive& a,
const Impl& setting,
[[maybe_unused]] const std::uint32_t version)
{
a(cereal::make_nvp("AutoReboot", setting.autoReboot()));
}

template<class Archive>
void load(Archive& a,
Impl& setting,
const std::uint32_t version)
{
decltype(setting.autoReboot()) AutoReboot{};

if (version < CLASS_VERSION_WITH_NVP)
{
a(AutoReboot);
}
else
{
try
{
a(CEREAL_NVP(AutoReboot));
}
catch (const cereal::Exception& e)
{
std::cerr << "Could not restore property AutoReboot on /xyz/openbmc_project/control/host0/auto_reboot, "
<< "setting to default value.\n";
AutoReboot = true;
}
}

setting.autoReboot(AutoReboot);
}
```

This does require that the property names be unique across all
interfaces on that object path. So far that isn't an issue for anything
I've seen, and there is a check in the code that will cause a compile
failure if that occurs. If necessary, support could be added for this
but it didn't seem necessary as that is fairly unlikely.

Now if a new property is added to an object path with existing
serialized data, the code can see that that field isn't in the file and
will just initialize that property to the default value given in the
YAML.

If the version of code before this commit is applied to a system after
this code has already been run, it is still able to read in the values
even though they have real names instead of the valueN ones since other
than the name they are still in the same order and format.

Resolves openbmc/phosphor-settingsd#16

Change-Id: Ia8f4712d7098dd530895b1db4e4d0a7f88f4b9dc
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...

ffdf865824-May-2023 Matt Spinler <spinler@us.ibm.com>

Extract default property value calc into function

Make a function out of the python code that calculates the default value
of a property so that it can be used in multiple places.

An upcoming commi

Extract default property value calc into function

Make a function out of the python code that calculates the default value
of a property so that it can be used in multiple places.

An upcoming commit will also use it if it has problems restoring the
property from its backing file.

Change-Id: I22b0f1130e7dce8c4b83e9111ad0d4895637404e
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...

157063d010-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: Ib2cacba5d88e188865ebb8888a998c8fcedc132c
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

de7ccfb226-Apr-2023 Jagpal Singh Gill <paligill@gmail.com>

meson: Remove autotools build files

Remove autotools build files as switching to meson.

Tested: meson build passes 'ninja -C build'

Change-Id: I4203c103b1355b78dec931c064da55e88f26e894
Signed-off-

meson: Remove autotools build files

Remove autotools build files as switching to meson.

Tested: meson build passes 'ninja -C build'

Change-Id: I4203c103b1355b78dec931c064da55e88f26e894
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

4d28bcd324-Apr-2023 Jagpal Singh Gill <paligill@gmail.com>

meson: Switch autoconf build to meson

Summary:
- Add meson build flow.
- Remove the options not being configured from yocto as configure
args and add them as constants/define in settings_manager.h

meson: Switch autoconf build to meson

Summary:
- Add meson build flow.
- Remove the options not being configured from yocto as configure
args and add them as constants/define in settings_manager.hpp

Tested:
- autotools build passes.
- meson build passes with "ninja -C build".

Change-Id: Iaa7704886cdcd5481a04bae77e02df2c6a53aee9
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

cfd49eb824-Apr-2023 Jagpal Singh Gill <paligill@gmail.com>

meson: Address warnings for switching autoconf to meson

This commit addresses the compilation warnings when switching autoconf
to meson.

Tested: Build passes with CIT and "ninja -C build".

Change-

meson: Address warnings for switching autoconf to meson

This commit addresses the compilation warnings when switching autoconf
to meson.

Tested: Build passes with CIT and "ninja -C build".

Change-Id: Ieda04b856f4fd24de867c3eaee8b9c4a9b333aaf
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

bbeb9bdd06-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

reformat and fix markdownlint issues

Reformat all the files with the latest settings from
openbmc-build-scripts and fix any markdownlint issues.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

reformat and fix markdownlint issues

Reformat all the files with the latest settings from
openbmc-build-scripts and fix any markdownlint issues.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I955a341441b24487b2e5552692b749fa21b37757

show more ...

7c6827c903-Aug-2022 Patrick Williams <patrick@stwcx.xyz>

OWNERS: adjust maintainers

The maintainer has been unresponsive on this repository since
at least June 16th, 2022. Adriana and I have done the majority
of the contributions and reviews in the last

OWNERS: adjust maintainers

The maintainer has been unresponsive on this repository since
at least June 16th, 2022. Adriana and I have done the majority
of the contributions and reviews in the last 2 years. Vishwa
has stopped working on the project.

Changes:
- Add Adriana as 'owner'.
- Add Patrick as 'owner'.
- Remove Vishwa as 'reviewer'.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I39a25bbfbd25d9fee98c5747961899fb0f395a17

show more ...

7b7fd7e404-Aug-2022 Patrick Williams <patrick@stwcx.xyz>

MAINTAINERS: remove file

The MAINTAINERS file is deprecated in favor of OWNERS.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I7d1378a6416c4ba3a14d42945decf308b7287201


1fc221f822-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

OWNERS: switch 'matches' to 'matchers'

The original OWNERS template had a mistake which used 'matches' instead
of the field supported by the Gerrit plugin 'matchers'. Update the
OWNERS file to have

OWNERS: switch 'matches' to 'matchers'

The original OWNERS template had a mistake which used 'matches' instead
of the field supported by the Gerrit plugin 'matchers'. Update the
OWNERS file to have the correct field.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9d8882917de9fd9501453f01b3fe575be7bcab84

show more ...

7c4181cf22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I662faee19b7b289bc0a39665fc5ce9e19406f933

show more ...

f792a6d720-Jul-2022 Adriana Kobylak <anoo@us.ibm.com>

Use relative path to append path

The path append behavior changed between std::experimental and
std::filesystem, appending an absolute path (path with a leading slash)
replaces the path instead of a

Use relative path to append path

The path append behavior changed between std::experimental and
std::filesystem, appending an absolute path (path with a leading slash)
replaces the path instead of appending to it, therefore need to use the
relative path (path without the leading slash) when appending.

The issue was that directories were attempted to be created on "/xyz/.."
instead of "SETTINGS_PERSIST_PATH/xyz/..", causing the settings manager
to fail with:
what(): filesystem error: cannot create directories: Read-only file
system [/xyz/openbmc_project/control/host0]

Tested: Verified this error is not seeing when making redfish calls.
Also verified the generated build/settings_manager.hpp file uses either
the relative path or the xyz path doesn't have the leading slash:
p /= path.relative_path();
path = fs::path(SETTINGS_PERSIST_PATH) / "xyz/openbmc_project/control/host0/TPMEnable";

Change-Id: Idd456baff5f39dc4464745daef9cb884481dca45
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...

6306e5e416-Jun-2022 Patrick Williams <patrick@stwcx.xyz>

switch experimental::fs to std::fs

std::filesystem was added to C++17 and is well supported now. Remove
the older std::experimental::filesystem usage.

Signed-off-by: Patrick Williams <patrick@stwc

switch experimental::fs to std::fs

std::filesystem was added to C++17 and is well supported now. Remove
the older std::experimental::filesystem usage.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I873667cf78efdf4f8ee2b63e8299783a5cba5ae4

show more ...

75a710ca15-Apr-2022 Patrick Williams <patrick@stwcx.xyz>

build: enable C++20

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I6aab5ac05ac9295c42ebcace83459d471459100e

0f6903db15-Apr-2022 Patrick Williams <patrick@stwcx.xyz>

fix cppcheck warnings

- Single parameter constructor was not marked 'explicit'.
- Member variable was not initialized in the constructor init.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Ch

fix cppcheck warnings

- Single parameter constructor was not marked 'explicit'.
- Member variable was not initialized in the constructor init.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I42c35e8300ca6670155840ddf47f61a7b93d5b42

show more ...

74c4f3b105-Apr-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: object: don't use 'bool' argument constructor

`sdbusplus::server::object_t` has long had an enum-based parameter for
signal action, but maintained a backwards compatible boolean mapping.

sdbusplus: object: don't use 'bool' argument constructor

`sdbusplus::server::object_t` has long had an enum-based parameter for
signal action, but maintained a backwards compatible boolean mapping.
It is time to remove this boolean to make it more observable which
actions are being used in applications. Map all `true` occurrences to
`action::defer_emit`.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I6d8796f14e3e25c9dbf7149e9affdb3d826d220c

show more ...

c0ce992f09-Mar-2022 Lei YU <yulei.sh@bytedance.com>

mako: Support interfaces without property

If a settings interface contains no property, the code get compiles
failure that the cereal does not know how to de-serialize the object.

It turns out that

mako: Support interfaces without property

If a settings interface contains no property, the code get compiles
failure that the cereal does not know how to de-serialize the object.

It turns out that if an interface has no property, it does not need to
serialize/de-serialize the properties at all.

Add a check in mako to skip the above for interfaces without properties,
and then the code compiles fine.

Tested: Verify we could add an interface without property to a DBus
object, e.g. xyz.openbmc_project.Inventory.Item.Bmc

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I68a9e689c2e2a9da65c8b090ac925baebd27733a

show more ...

1234