package/sdbusplus: new package
v2 cover package/sdbusplus: new package
Thanks to Arnout Vandecappelle for his detailed feedback.
This second version hopefully addresses all proposed changes, but the one thing I did not do was adding Trent Piepho to DEVELOPERS by his request.
,
John
Trent Piepho (1):
package/sdbusplus: new package
DEVELOPERS | 1 + package/Config.in | 1 + package/Config.in.host | 1 + ...x-example-build-with-disable-sdbuspp.patch | 42 +++++++++++++++++++ package/sdbusplus/Config.in | 10 +++++ package/sdbusplus/Config.in.host | 10 +++++ package/sdbusplus/sdbusplus.hash | 4 ++ package/sdbusplus/sdbusplus.mk | 21 ++++++++++ 8 files changed, 90 insertions(+) create mode 100644 package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch create mode 100644 package/sdbusplus/Config.in create mode 100644 package/sdbusplus/Config.in.host create mode 100644 package/sdbusplus/sdbusplus.hash create mode 100644 package/sdbusplus/sdbusplus.mk
Signature · 1 line
2.19.1
PATCH v2 1/1 package/sdbusplus: new package
From: Trent Piepho <[email protected]>
A C++ library for interacting with sd-bus and a C++ bindings generator.
The host build produces a code generation tool, sdbus++ while the target build gives libsdbusplus.
Add a patch to disable the example program that requires the sdbus++ tool if that tool has been disabled (for the target build).
The code generator requires host-python-pyyaml, host-python-inflection, and host-python-mako. Since these aren't built for the target, the target build does not require them.
The host package includes a code and documentation generation program, which is useful for including in a buildroot SDK, even if no target user-selectable packages built need it, so make it a selected host package.
host-autoconf-archive is added as a dependency since configure.ac uses the AX_PKG_CHECK_MODULES macro.
---
Changes v1 -> v2:
- Added "package/" to commit summary.
Suggested by Arnout Vandecappelle:
- Reworded commit message for content and grammar.
- Moved Config.in to "System tools" section.
- Minor description changes in example build patch.
- Removed BR2_PACKAGE_SYSTEMD,BR2_PACKAGE_HOST_PKGCONF from Config.in.
- Removed "usr" from path in AUTORECONF_OPTS.
- Added license hash.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/Config.in.host | 1 + ...x-example-build-with-disable-sdbuspp.patch | 42 +++++++++++++++++++ package/sdbusplus/Config.in | 10 +++++ package/sdbusplus/Config.in.host | 10 +++++ package/sdbusplus/sdbusplus.hash | 4 ++ package/sdbusplus/sdbusplus.mk | 21 ++++++++++ 8 files changed, 90 insertions(+) create mode 100644 package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch create mode 100644 package/sdbusplus/Config.in create mode 100644 package/sdbusplus/Config.in.host create mode 100644 package/sdbusplus/sdbusplus.hash create mode 100644 package/sdbusplus/sdbusplus.mk
DEVELOPERS +1 -0
@@ -1176,6 +1176,7 @@ F: package/dhcpcd/ N: John Faith <[email protected]> F: package/python-inflection/ +F: package/sdbusplus/ N: Jonathan Ben Avraham <[email protected]> F: arch/Config.in.xtensa
package/Config.in +1 -0
@@ -2231,6 +2231,7 @@ menu "System tools" source "package/s6-rc/Config.in" source "package/scrub/Config.in" source "package/scrypt/Config.in" + source "package/sdbusplus/Config.in" source "package/smack/Config.in" source "package/start-stop-daemon/Config.in" source "package/supervisor/Config.in"
package/Config.in.host +1 -0
@@ -61,6 +61,7 @@ menu "Host utilities" source "package/rustc/Config.in.host" source "package/s6-rc/Config.in.host" source "package/sam-ba/Config.in.host" + source "package/sdbusplus/Config.in.host" source "package/squashfs/Config.in.host" source "package/sunxi-tools/Config.in.host" source "package/swig/Config.in.host"
package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch new file +42 -0
42 lines not on this page · raw message
package/sdbusplus/Config.in new file +10 -0
@@ -0,0 +1,10 @@ +config BR2_PACKAGE_SDBUSPLUS + bool "sdbusplus" + depends on BR2_INSTALL_LIBSTDCPP + help + A C++ library for sd-bus with a bindings and doc generator. + + This will build the target library. See the host package for + the bindings and documentation generation program. + + https://github.com/openbmc/sdbusplus
package/sdbusplus/Config.in.host new file +10 -0
@@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_SDBUSPLUS + bool "host-sdbusplus" + select BR2_PACKAGE_HOST_PKGCONF + help + A C++ library for sd-bus with a bindings and doc generator. + + This will be the host side generation tool for bindings and + documentation. + + https://github.com/openbmc/sdbusplus
package/sdbusplus/sdbusplus.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 9136215c5fc849c33555db4210f17d844864c1b0790fe35026d594af965aa09d sdbusplus-28dc36d509ba8f77ffb5726cc7d5f0184f8054b1.tar.gz +# License file, locally calculated +sha256 b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1 LICENSE
package/sdbusplus/sdbusplus.mk new file +21 -0
@@ -0,0 +1,21 @@ +################################################################################ +# +# sdbusplus +# +################################################################################ + +SDBUSPLUS_VERSION = 28dc36d509ba8f77ffb5726cc7d5f0184f8054b1 +SDBUSPLUS_SITE = $(call github,openbmc,sdbusplus,$(SDBUSPLUS_VERSION)) +SDBUSPLUS_DEPENDENCIES = host-autoconf-archive host-pkgconf systemd +HOST_SDBUSPLUS_DEPENDENCIES = host-autoconf-archive host-pkgconf \ + $(PKG_PYTHON_HOST_PYTHON) host-python-inflection host-python-mako host-python-pyyaml +SDBUSPLUS_CONF_OPTS = --disable-sdbuspp +HOST_SDBUSPLUS_CONF_OPTS = --disable-libsdbusplus +SDBUSPLUS_AUTORECONF = YES +SDBUSPLUS_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive +SDBUSPLUS_INSTALL_STAGING = YES +SDBUSPLUS_LICENSE = Apache-2.0 +SDBUSPLUS_LICENSE_FILES = LICENSE + +$(eval $(autotools-package)) +$(eval $(host-autotools-package))
Signature · 1 line
2.19.1
PATCH v2 1/1 package/sdbusplus: new package
Hi John,
Still a few problems :-(
Quoted 7 lines · John Faith
From: Trent Piepho <[email protected]>
A C++ library for interacting with sd-bus and a C++ bindings generator.
The host build produces a code generation tool, sdbus++ while the target build gives libsdbusplus.
Quoted 6 lines
Add a patch to disable the example program that requires the sdbus++ tool if that tool has been disabled (for the target build).
The code generator requires host-python-pyyaml, host-python-inflection, and host-python-mako. Since these aren't built for the target, the target build does not require them.
I was going to apply (before I discovered the problem described below) and I
reformulated these two paratraphs as follows:
The code generator requires host-python-pyyaml, host-python-inflection, and host-python-mako. Since it isn't built for the target, the target build does not require them.
The host package includes a code and documentation generation program, which is useful for including in a buildroot SDK, even if no target package needs it, so make it a user-selectable host package.
Quoted 11 lines
The host package includes a code and documentation generation program, which is useful for including in a buildroot SDK, even if no target user-selectable packages built need it, so make it a selected host package.
host-autoconf-archive is added as a dependency since configure.ac uses the
AX_PKG_CHECK_MODULESmacro.Signed-off-by John Faith <[email protected]>Signed-off-by Trent Piepho <[email protected]>
[snip]
Quoted 8 lines
package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch new file +2
-0@@ -0,0 +1,42 @@ +From c5d5a94f8e554f160e3f120b826e97b2961e2706 Mon Sep 17 00:00:00 2001 +From: Trent Piepho <[email protected]>
package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch line 12
Quoted 10 lines
package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch new file +10
-0+Date: Mon, 14 May 2018 16:17:38 -0700 +Subject: [PATCH] build: Fix example build with --disable-sdbuspp + +The calculator server example uses the sdbus++ python program to build. +If this has been disabled, then trying to use it to build the example +could fail. For instance, if python and all necessary python packages +are not available. This might be the case when cross-building only +the library component for a target system. + +Don't build the calculator example when sdbus++ has been disabled.
what's the upstream status of this patch? Please mention it in the patch itself.
package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch line 14
Quoted 2 lines
package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch new file +2
-0+ +Signed-off-by: Trent Piepho <[email protected]>
John, since you're delivering this patch, your Sob is required as well.
[snip]
package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch line 17
Quoted 3 lines
package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch new file +3
-0+config BR2_PACKAGE_SDBUSPLUS + bool "sdbusplus" + depends on BR2_INSTALL_LIBSTDCPP
Since there is a .mk dependency on systemd, you need to select-or-depend it
here is well. Since systemd can't be selected (it depends on BR2_INIT_SYSTEMD), you need to depend on it.
package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch line 24
Quoted 7 lines
package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch new file +7
-0+ help + A C++ library for sd-bus with a bindings and doc generator. + + This will build the target library. See the host package for + the bindings and documentation generation program. + + https://github.com/openbmc/sdbusplus
You need to add a comment in case the dependencies are not met:
comment "sdbusplus needs systemd and a toolchain w/ C++"
Quoted 6 lines
package/sdbusplus/Config.in.host new file +0
-0
package/sdbusplus/Config.in.host line 8
Quoted 8 lines
package/sdbusplus/Config.in.host new file +8
-0@@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_SDBUSPLUS + bool "host-sdbusplus" + select BR2_PACKAGE_HOST_PKGCONF + help + A C++ library for sd-bus with a bindings and doc generator. + + This will be the host side generation tool for bindings and + documentation.
I think it's worth mentioning that this is a Python tool.
Quoted 19 lines
package/sdbusplus/Config.in.host new file +2
-0+ + https://github.com/openbmc/sdbuspluspackage/sdbusplus/sdbusplus.hash new file +4
-0@@ -0,0 +1,4 @@ +# Locally calculated +sha256 9136215c5fc849c33555db4210f17d844864c1b0790fe35026d594af965aa09d sdbusplus-28dc36d509ba8f77ffb5726cc7d5f0184f8054b1.tar.gz +# License file, locally calculated +sha256 b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1 LICENSEpackage/sdbusplus/sdbusplus.mk new file +1
-0@@ -0,0 +1,21 @@ +################################################################################
package/sdbusplus/sdbusplus.mk line 11
Quoted 10 lines
package/sdbusplus/sdbusplus.mk new file +10
-0+# +# sdbusplus +# +################################################################################ + +SDBUSPLUS_VERSION = 28dc36d509ba8f77ffb5726cc7d5f0184f8054b1 +SDBUSPLUS_SITE = $(call github,openbmc,sdbusplus,$(SDBUSPLUS_VERSION)) +SDBUSPLUS_DEPENDENCIES = host-autoconf-archive host-pkgconf systemd +HOST_SDBUSPLUS_DEPENDENCIES = host-autoconf-archive host-pkgconf \ + $(PKG_PYTHON_HOST_PYTHON) host-python-inflection host-python-mako host-python-pyyaml
If the dependencies get a little bit complicated like this, we prefer to have
one per line:
HOST_SDBUSPLUS_DEPENENCIES = \ host-autoconf-archive \ ...
Regards,
Arnout
Quoted 11 lines
package/sdbusplus/sdbusplus.mk new file +10
-0+SDBUSPLUS_CONF_OPTS = --disable-sdbuspp +HOST_SDBUSPLUS_CONF_OPTS = --disable-libsdbusplus +SDBUSPLUS_AUTORECONF = YES +SDBUSPLUS_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive +SDBUSPLUS_INSTALL_STAGING = YES +SDBUSPLUS_LICENSE = Apache-2.0 +SDBUSPLUS_LICENSE_FILES = LICENSE + +$(eval $(autotools-package)) +$(eval $(host-autotools-package))
PATCH v2 1/1 package/sdbusplus: new package
Quoted 13 lines · Arnout Vandecappelle
Quoted 13 lines
package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch new file +6
-0@@ -0,0 +1,42 @@ +From c5d5a94f8e554f160e3f120b826e97b2961e2706 Mon Sep 17 00:00:00 2001 +From: Trent Piepho <[email protected]> +Date: Mon, 14 May 2018 16:17:38 -0700 +Subject: [PATCH] build: Fix example build with --disable-sdbuspp + +The calculator server example uses the sdbus++ python program to build.
Quoted 8 lines
package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch line 12
Quoted 6 lines
package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch new file +6
-0+If this has been disabled, then trying to use it to build the example +could fail. For instance, if python and all necessary python packages +are not available. This might be the case when cross-building only +the library component for a target system. + +Don't build the calculator example when sdbus++ has been disabled.what's the upstream status of this patch? Please mention it in the patch itself.
It was submitted, back in May 16 2018, https://gerrit.openbmc-project.x
yz/c/openbmc/sdbusplus/+/10629
But merging to sdbusplus requires corporate lawyers to get involved to for CLA, and a 5 line patch wasn't really worth it.
It was fixed later in another patch:
commit ad7e686b5563a146728aa9477f6e814dc0a3cbd4
Author: Manojkiran Eda <[email protected]> Date: Thu Sep 27 13:19:20 2018 +0530
Avoid build failure when sdbus++ tool is disabled
It would make more sense to include that patch here or to update to a sdbusplus version that already includes, if one has been released.
PATCH v3 1/1 package/sdbusplus: new package
In reply to Arnout VandecappelleA C++ library for interacting with sd-bus and a C++ bindings generator.
The host build produces a code generation tool, sdbus++ while the target build gives libsdbusplus.
The code generator requires host-python-pyyaml, host-python-inflection, and host-python-mako. Since it isn't built for the target, the target build does not require them.
The host package includes a code and documentation generation program, which is useful for including in a buildroot SDK, even if no target package needs it, so make it a user-selectable host package.
host-autoconf-archive is added as a dependency since configure.ac uses the AX_PKG_CHECK_MODULES macro.
---
Changes v2 -> v3:
- Bump version and drop patch that has been incorporated upstream. Suggested by Arnout Vandecappelle:
- Reword commit message; remove bit about now-removed patch.
- Depend on systemd.
- Add config comment in case dependencies are not met.
- Mention that the host tool is a Python tool.
- One dependency per line.
Changes v1 -> v2:
- Added "package/" to commit summary.
Suggested by Arnout Vandecappelle:
- Reworded commit message for content and grammar.
- Moved Config.in to "System tools" section.
- Minor description changes in example build patch.
- Removed BR2_PACKAGE_SYSTEMD,BR2_PACKAGE_HOST_PKGCONF from Config.in.
- Removed "usr" from path in AUTORECONF_OPTS.
- Added license hash.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/Config.in.host | 1 + package/sdbusplus/Config.in | 13 +++++++++++++ package/sdbusplus/Config.in.host | 10 ++++++++++ package/sdbusplus/sdbusplus.hash | 5 +++++ package/sdbusplus/sdbusplus.mk | 26 ++++++++++++++++++++++++++ 7 files changed, 57 insertions(+) create mode 100644 package/sdbusplus/Config.in create mode 100644 package/sdbusplus/Config.in.host create mode 100644 package/sdbusplus/sdbusplus.hash create mode 100644 package/sdbusplus/sdbusplus.mk
DEVELOPERS +1 -0
@@ -1177,6 +1177,7 @@ F: package/dhcpcd/ N: John Faith <[email protected]> F: package/python-inflection/ +F: package/sdbusplus/ N: Jonathan Ben Avraham <[email protected]> F: arch/Config.in.xtensa
package/Config.in +1 -0
@@ -2232,6 +2232,7 @@ menu "System tools" source "package/s6-rc/Config.in" source "package/scrub/Config.in" source "package/scrypt/Config.in" + source "package/sdbusplus/Config.in" source "package/smack/Config.in" source "package/start-stop-daemon/Config.in" source "package/supervisor/Config.in"
package/Config.in.host +1 -0
@@ -61,6 +61,7 @@ menu "Host utilities" source "package/rustc/Config.in.host" source "package/s6-rc/Config.in.host" source "package/sam-ba/Config.in.host" + source "package/sdbusplus/Config.in.host" source "package/squashfs/Config.in.host" source "package/sunxi-tools/Config.in.host" source "package/swig/Config.in.host"
package/sdbusplus/Config.in new file +13 -0
@@ -0,0 +1,13 @@ +config BR2_PACKAGE_SDBUSPLUS + bool "sdbusplus" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_SYSTEMD + help + A C++ library for sd-bus with a bindings and doc generator. + + This will build the target library. See the host package for + the bindings and documentation generation program. + + https://github.com/openbmc/sdbusplus + +comment "sdbusplus needs systemd and a toolchain w/ C++"
package/sdbusplus/Config.in.host new file +10 -0
@@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_SDBUSPLUS + bool "host-sdbusplus" + select BR2_PACKAGE_HOST_PKGCONF + help + A C++ library for sd-bus with a bindings and doc generator. + + This will build the Python host side generation tool for bindings + and documentation. + + https://github.com/openbmc/sdbusplus
package/sdbusplus/sdbusplus.hash new file +5 -0
@@ -0,0 +1,5 @@ +# Locally calculated +sha256 c67b8f3d9b74fd0d70eb6eec3b2ec2d496d0f169deedf6fc07dbff2c2f275d2b sdbusplus-4212292bcf136d04b38ba5116aa568b0fa312798.tar.gz + +# License file, locally calculated +sha256 b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1 LICENSE
package/sdbusplus/sdbusplus.mk new file +26 -0
@@ -0,0 +1,26 @@ +################################################################################ +# +# sdbusplus +# +################################################################################ + +SDBUSPLUS_VERSION = 4212292bcf136d04b38ba5116aa568b0fa312798 +SDBUSPLUS_SITE = $(call github,openbmc,sdbusplus,$(SDBUSPLUS_VERSION)) +SDBUSPLUS_DEPENDENCIES = host-autoconf-archive host-pkgconf systemd +HOST_SDBUSPLUS_DEPENDENCIES = \ + host-autoconf-archive \ + host-pkgconf \ + $(PKG_PYTHON_HOST_PYTHON) \ + host-python-inflection \ + host-python-mako \ + host-python-pyyaml +SDBUSPLUS_CONF_OPTS = --disable-sdbuspp +HOST_SDBUSPLUS_CONF_OPTS = --disable-libsdbusplus +SDBUSPLUS_AUTORECONF = YES +SDBUSPLUS_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive +SDBUSPLUS_INSTALL_STAGING = YES +SDBUSPLUS_LICENSE = Apache-2.0 +SDBUSPLUS_LICENSE_FILES = LICENSE + +$(eval $(autotools-package)) +$(eval $(host-autotools-package))
Signature · 1 line
2.19.1
PATCH v3 1/1 package/sdbusplus: new package
Hello John,
Thanks for this new iteration!
Quoted 1 line · On Mon, 5 Aug 2019 22:52:42 +0000 John Faith <[email protected]> wrote:
+comment "sdbusplus needs systemd and a toolchain w/ C++"
This needs to have:
depends on !BR2_PACKAGE_SYSTEMD || !BR2_INSTALL_LIBSTDCPP
package/sdbusplus/sdbusplus.mk line 13
Quoted 7 lines
package/sdbusplus/sdbusplus.mk new file +7
-0+SDBUSPLUS_VERSION = 4212292bcf136d04b38ba5116aa568b0fa312798 +SDBUSPLUS_SITE = $(call github,openbmc,sdbusplus,$(SDBUSPLUS_VERSION)) +SDBUSPLUS_DEPENDENCIES = host-autoconf-archive host-pkgconf systemd +HOST_SDBUSPLUS_DEPENDENCIES = \ + host-autoconf-archive \ + host-pkgconf \ + $(PKG_PYTHON_HOST_PYTHON) \
I'm not sure to understand where is this variable defined. I don't see where Buildroot defines it, and "make printvars VARS=PKG_PYTHON_HOST_PYTHON" doesn't return anything useful. It's getting late here so perhaps I'm msising the point. Could you enlighten me ?
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v3 1/1 package/sdbusplus: new package
On Tue, 2019-08-06 at 23:10 +0200, Thomas Petazzoni wrote:
Hello John,
Thanks for this new iteration!
Quoted 1 line · On Mon, 5 Aug 2019 22:52:42 +0000 John Faith <[email protected]> wrote:
+comment "sdbusplus needs systemd and a toolchain w/ C++"
This needs to have:
depends on !BR2_PACKAGE_SYSTEMD || !BR2_INSTALL_LIBSTDCPP
Yes, added.
package/sdbusplus/sdbusplus.mk line 13
Quoted 7 lines
package/sdbusplus/sdbusplus.mk new file +7
-0+SDBUSPLUS_VERSION = 4212292bcf136d04b38ba5116aa568b0fa312798 +SDBUSPLUS_SITE = $(call github,openbmc,sdbusplus,$(SDBUSPLUS_VERSION)) +SDBUSPLUS_DEPENDENCIES = host-autoconf-archive host-pkgconf systemd +HOST_SDBUSPLUS_DEPENDENCIES = \ + host-autoconf-archive \ + host-pkgconf \ + $(PKG_PYTHON_HOST_PYTHON) \
I'm not sure to understand where is this variable defined. I don't see where Buildroot defines it, and "make printvars VARS=PKG_PYTHON_HOST_PYTHON" doesn't return anything useful. It's getting late here so perhaps I'm msising the point. Could you enlighten me ?
This variable is part of a local set of changes to use host-python3 or host-python for packages that are not python packages, but need host python. I'll change it to "host-python".
Thanks a lot!
Thomas
I also had to add POST_PATCH_HOOKS to create the m4 dir, which I'll include in the next version.
Thanks for the feedback!
,
John F.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190807/aa31f667/attachment.html>
PATCH v4 1/1 package/sdbusplus: new package
In reply to Arnout VandecappelleA C++ library for interacting with sd-bus and a C++ bindings generator.
The host build produces a code generation tool, sdbus++ while the target build gives libsdbusplus.
The code generator requires host-python-pyyaml, host-python-inflection, and host-python-mako. Since it isn't built for the target, the target build does not require them.
The host package includes a code and documentation generation program, which is useful for including in a buildroot SDK, even if no target package needs it, so make it a user-selectable host package.
host-autoconf-archive is added as a dependency since configure.ac uses the AX_PKG_CHECK_MODULES macro.
---
Changes v3 -> v4:
- Add systemd and C++ "depends on" for Config.in comment.
- Replace PKG_PYTHON_HOST_PYTHON with host-python.
- Add POST_PATCH_HOOKS for m4 dir creation.
Changes v2 -> v3:
- Bump version and drop patch that has been incorporated upstream. Suggested by Arnout Vandecappelle:
- Reword commit message; remove bit about now-removed patch.
- Depend on systemd.
- Add config comment in case dependencies are not met.
- Mention that the host tool is a Python tool.
- One dependency per line.
Changes v1 -> v2:
- Added "package/" to commit summary.
Suggested by Arnout Vandecappelle:
- Reworded commit message for content and grammar.
- Moved Config.in to "System tools" section.
- Minor description changes in example build patch.
- Removed BR2_PACKAGE_SYSTEMD,BR2_PACKAGE_HOST_PKGCONF from Config.in.
- Removed "usr" from path in AUTORECONF_OPTS.
- Added license hash.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/Config.in.host | 1 + package/sdbusplus/Config.in | 14 ++++++++++++++ package/sdbusplus/Config.in.host | 10 ++++++++++ package/sdbusplus/sdbusplus.hash | 5 +++++ package/sdbusplus/sdbusplus.mk | 32 ++++++++++++++++++++++++++++++++ 7 files changed, 64 insertions(+) create mode 100644 package/sdbusplus/Config.in create mode 100644 package/sdbusplus/Config.in.host create mode 100644 package/sdbusplus/sdbusplus.hash create mode 100644 package/sdbusplus/sdbusplus.mk
DEVELOPERS +1 -0
@@ -1195,6 +1195,7 @@ F: package/dhcpcd/ N: John Faith <[email protected]> F: package/python-inflection/ +F: package/sdbusplus/ N: Jonathan Ben Avraham <[email protected]> F: arch/Config.in.xtensa
package/Config.in +1 -0
@@ -2244,6 +2244,7 @@ menu "System tools" source "package/s6-rc/Config.in" source "package/scrub/Config.in" source "package/scrypt/Config.in" + source "package/sdbusplus/Config.in" source "package/smack/Config.in" source "package/start-stop-daemon/Config.in" source "package/supervisor/Config.in"
package/Config.in.host +1 -0
@@ -62,6 +62,7 @@ menu "Host utilities" source "package/rustc/Config.in.host" source "package/s6-rc/Config.in.host" source "package/sam-ba/Config.in.host" + source "package/sdbusplus/Config.in.host" source "package/squashfs/Config.in.host" source "package/sunxi-tools/Config.in.host" source "package/swig/Config.in.host"
package/sdbusplus/Config.in new file +14 -0
@@ -0,0 +1,14 @@ +config BR2_PACKAGE_SDBUSPLUS + bool "sdbusplus" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_SYSTEMD + help + A C++ library for sd-bus with a bindings and doc generator. + + This will build the target library. See the host package for + the bindings and documentation generation program. + + https://github.com/openbmc/sdbusplus + +comment "sdbusplus needs systemd and a toolchain w/ C++" + depends on !BR2_PACKAGE_SYSTEMD || !BR2_INSTALL_LIBSTDCPP
package/sdbusplus/Config.in.host new file +10 -0
@@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_SDBUSPLUS + bool "host-sdbusplus" + select BR2_PACKAGE_HOST_PKGCONF + help + A C++ library for sd-bus with a bindings and doc generator. + + This will build the Python host side generation tool for bindings + and documentation. + + https://github.com/openbmc/sdbusplus
package/sdbusplus/sdbusplus.hash new file +5 -0
@@ -0,0 +1,5 @@ +# Locally calculated +sha256 c67b8f3d9b74fd0d70eb6eec3b2ec2d496d0f169deedf6fc07dbff2c2f275d2b sdbusplus-4212292bcf136d04b38ba5116aa568b0fa312798.tar.gz + +# License file, locally calculated +sha256 b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1 LICENSE
package/sdbusplus/sdbusplus.mk new file +32 -0
@@ -0,0 +1,32 @@ +################################################################################ +# +# sdbusplus +# +################################################################################ + +SDBUSPLUS_VERSION = 4212292bcf136d04b38ba5116aa568b0fa312798 +SDBUSPLUS_SITE = $(call github,openbmc,sdbusplus,$(SDBUSPLUS_VERSION)) +SDBUSPLUS_DEPENDENCIES = host-autoconf-archive host-pkgconf systemd +HOST_SDBUSPLUS_DEPENDENCIES = \ + host-autoconf-archive \ + host-pkgconf \ + host-python \ + host-python-inflection \ + host-python-mako \ + host-python-pyyaml +SDBUSPLUS_CONF_OPTS = --disable-sdbuspp +HOST_SDBUSPLUS_CONF_OPTS = --disable-libsdbusplus +SDBUSPLUS_AUTORECONF = YES +SDBUSPLUS_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive +SDBUSPLUS_INSTALL_STAGING = YES +SDBUSPLUS_LICENSE = Apache-2.0 +SDBUSPLUS_LICENSE_FILES = LICENSE + +define SDBUSPLUS_CREATE_M4 + mkdir -p $(@D)/m4 +endef +SDBUSPLUS_POST_PATCH_HOOKS += SDBUSPLUS_CREATE_M4 +HOST_SDBUSPLUS_POST_PATCH_HOOKS += SDBUSPLUS_CREATE_M4 + +$(eval $(autotools-package)) +$(eval $(host-autotools-package))
Signature · 1 line
2.19.1
PATCH v4 1/1 package/sdbusplus: new package
Hello John,
Quoted 13 lines · On Wed, 7 Aug 2019 19:12:00 +0000 John Faith <[email protected]> wrote:
A C++ library for interacting with sd-bus and a C++ bindings generator.
The host build produces a code generation tool, sdbus++ while the target build gives libsdbusplus.
The code generator requires host-python-pyyaml, host-python-inflection, and host-python-mako. Since it isn't built for the target, the target build does not require them.
The host package includes a code and documentation generation program, which is useful for including in a buildroot SDK, even if no target package needs it, so make it a user-selectable host package.
Quoted 5 lines
host-autoconf-archive is added as a dependency since configure.ac uses the
AX_PKG_CHECK_MODULESmacro.Signed-off-by John Faith <[email protected]>Signed-off-by Trent Piepho <[email protected]>
I have finally applied to next, with one change. See below.
package/sdbusplus/sdbusplus.mk line 13
Quoted 7 lines
package/sdbusplus/sdbusplus.mk new file +7
-0+SDBUSPLUS_VERSION = 4212292bcf136d04b38ba5116aa568b0fa312798 +SDBUSPLUS_SITE = $(call github,openbmc,sdbusplus,$(SDBUSPLUS_VERSION)) +SDBUSPLUS_DEPENDENCIES = host-autoconf-archive host-pkgconf systemd +HOST_SDBUSPLUS_DEPENDENCIES = \ + host-autoconf-archive \ + host-pkgconf \ + host-python \
I replaced this with:
$(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
which is something we do in many other packages, to use host-python3 when host-python3 is anyway going to be built as a dependency of the target python3.
I tested it, and it does seem to work, i.e I was able to use the binding generator tool with a Python 3 installation.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com