Skip to content

add OpenBMC D-Bus interface #100

Merged
merged 2 commits into from
Apr 15, 2019

Conversation

vmauery
Copy link
Member

@vmauery vmauery commented Feb 27, 2019

OpenBMC runs a D-Bus interface internally and has the option of
compiling ipmitool so it can run natively on the BMC. This adds the
new OpenBMC IPMI D-Bus interface to ipmitool so it can be used
with the OpenBMC project.

Signed-off-by: Vernon Mauery vernon.mauery@linux.intel.com

@vmauery
Copy link
Member Author

vmauery commented Feb 27, 2019

Hmmm. looks like my configure.ac stuff didn't work right.... I will look into it. The code works (I am running it on my BMC right now.) But the CI build doesn't have systemd development files installed and the configure fails to disable the dbus interface. I will work on this.

@vmauery
Copy link
Member Author

vmauery commented Feb 27, 2019

The build that passed above doesn't actually build this code. By default, the dbus interface doesn't build. To get it to build, --enabled-intf-dbus must be passed to ./configure. If configure does not detect libsystemd, and the caller requested the dbus interface, configure will fail, saying it needs libsystemd. If systemd is present, and the caller requests the dbus interface, it will be built.

@vmauery
Copy link
Member Author

vmauery commented Feb 27, 2019

I realized that it has some code style issues. I think I got them all...

configure.ac Outdated Show resolved Hide resolved
src/plugins/dbus/Makefile.am Show resolved Hide resolved
src/plugins/dbus/dbus.c Outdated Show resolved Hide resolved
src/plugins/dbus/dbus.c Outdated Show resolved Hide resolved
src/plugins/dbus/dbus.c Outdated Show resolved Hide resolved
src/plugins/dbus/dbus.c Outdated Show resolved Hide resolved
src/plugins/dbus/dbus.c Outdated Show resolved Hide resolved
src/plugins/dbus/dbus.c Outdated Show resolved Hide resolved
src/plugins/dbus/dbus.c Outdated Show resolved Hide resolved
@AlexanderAmelkin
Copy link
Contributor

Some review comments are outdated, please ignore them as I can see that you've already addressed them.

@vmauery
Copy link
Member Author

vmauery commented Mar 7, 2019

Is is possible to be able to have the CI actually build with --enable-intf-dbus? It would need to have the system systemd-devel package installed. But because this interface is disabled by default, the CI doesn't actually build it. It does build on my machine but my machine is a snowflake. :)

@vmauery
Copy link
Member Author

vmauery commented Apr 5, 2019

Are there still fixups that need to be done here? I think I have addressed all the comments. Can this get merged?

OpenBMC runs a D-Bus interface internally and has the option of
compiling ipmitool so it can run natively on the BMC. This adds the
D-Bus interface to ipmitool so it can be used with the OpenBMC project.

Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
@vmauery
Copy link
Member Author

vmauery commented Apr 10, 2019

This new set pulls in some file-level static variables into a function scope and replaces some strings with some systemd-defined types. It is much more verbose, but doesn't include any hard-coded values.

@vmauery
Copy link
Member Author

vmauery commented Apr 10, 2019

Adding a bbappend for ipmitool that pulls in this commit and appends a configure option:
EXTRA_OECONF_append = " --enable-intf-dbus "

This builds for ast2500 and runs as expected on an openBMC build.

@AlexanderAmelkin
Copy link
Contributor

Is is possible to be able to have the CI actually build with --enable-intf-dbus?

Yes, you can update .travis.yml to install the required packages and add the required keys to configure.

@vmauery
Copy link
Member Author

vmauery commented Apr 15, 2019

It looks like the CI is running on a 14.04 ubuntu system. This is before systemd was available in ubuntu. 16.04 or 18.04 will work just fine. Is there a way to change that?

By default the D-Bus interface is not enabled, so in order to get it to
build in Travis, it must be enabled explicitly. This installs the
packages needed and sets the configure flag.

Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
@vmauery
Copy link
Member Author

vmauery commented Apr 15, 2019

Nevermind. I got it. :) I watched it build the dbus interface in Travis. Zero new warnings. https://travis-ci.com/ipmitool/ipmitool/builds/108379984

@AlexanderAmelkin AlexanderAmelkin merged commit 4006227 into ipmitool:master Apr 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants