All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/1] package/sdbusplus: new package
@ 2019-07-02 20:43 John Faith
  2019-07-02 20:43 ` [Buildroot] [PATCH v2 1/1] " John Faith
  0 siblings, 1 reply; 9+ messages in thread
From: John Faith @ 2019-07-02 20:43 UTC (permalink / raw
  To: buildroot

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

-- 
2.19.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 1/1] package/sdbusplus: new package
  2019-07-02 20:43 [Buildroot] [PATCH v2 0/1] package/sdbusplus: new package John Faith
@ 2019-07-02 20:43 ` John Faith
  2019-07-11 14:21   ` Arnout Vandecappelle
  0 siblings, 1 reply; 9+ messages in thread
From: John Faith @ 2019-07-02 20:43 UTC (permalink / raw
  To: buildroot

From: Trent Piepho <tpiepho@impinj.com>

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.

Signed-off-by: John Faith <jfaith@impinj.com>
Signed-off-by: Trent Piepho <tpiepho@impinj.com>

---
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

diff --git a/DEVELOPERS b/DEVELOPERS
index e9c521f400..08ef4f74eb 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1176,6 +1176,7 @@ F:	package/dhcpcd/
 
 N:	John Faith <jfaith@impinj.com>
 F:	package/python-inflection/
+F:	package/sdbusplus/
 
 N:	Jonathan Ben Avraham <yba@tkos.co.il>
 F:	arch/Config.in.xtensa
diff --git a/package/Config.in b/package/Config.in
index d501b5a65b..d41071d412 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/Config.in.host b/package/Config.in.host
index 1501889b72..835dd04237 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -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"
diff --git a/package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch b/package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch
new file mode 100644
index 0000000000..e1364796fb
--- /dev/null
+++ b/package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch
@@ -0,0 +1,42 @@
+From c5d5a94f8e554f160e3f120b826e97b2961e2706 Mon Sep 17 00:00:00 2001
+From: Trent Piepho <tpiepho@impinj.com>
+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.
+
+Signed-off-by: Trent Piepho <tpiepho@impinj.com>
+---
+ example/Makefile.am | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/example/Makefile.am b/example/Makefile.am
+index 2cf8941..b0c3a4f 100644
+--- a/example/Makefile.am
++++ b/example/Makefile.am
+@@ -1,4 +1,7 @@
+-noinst_PROGRAMS = calculator-server list-users
++noinst_PROGRAMS = list-users
++
++if WANT_SDBUSPP
++noinst_PROGRAMS += calculator-server
+ 
+ calculator_server_generated_files = \
+ 	net/poettering/Calculator/server.hpp \
+@@ -8,6 +11,7 @@ calculator_server_generated_files = \
+ 
+ calculator_markdown_generated_files = \
+ 	calculator.md
++endif
+ 
+ calculator_server_SOURCES = \
+ 	calculator-server.cpp $(calculator_server_generated_files)
+-- 
+2.14.3
+
diff --git a/package/sdbusplus/Config.in b/package/sdbusplus/Config.in
new file mode 100644
index 0000000000..2e6afaa40e
--- /dev/null
+++ b/package/sdbusplus/Config.in
@@ -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
diff --git a/package/sdbusplus/Config.in.host b/package/sdbusplus/Config.in.host
new file mode 100644
index 0000000000..03f55c4c4f
--- /dev/null
+++ b/package/sdbusplus/Config.in.host
@@ -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
diff --git a/package/sdbusplus/sdbusplus.hash b/package/sdbusplus/sdbusplus.hash
new file mode 100644
index 0000000000..24849ee591
--- /dev/null
+++ b/package/sdbusplus/sdbusplus.hash
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  9136215c5fc849c33555db4210f17d844864c1b0790fe35026d594af965aa09d  sdbusplus-28dc36d509ba8f77ffb5726cc7d5f0184f8054b1.tar.gz
+# License file, locally calculated
+sha256  b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1  LICENSE
diff --git a/package/sdbusplus/sdbusplus.mk b/package/sdbusplus/sdbusplus.mk
new file mode 100644
index 0000000000..ab50568b5a
--- /dev/null
+++ b/package/sdbusplus/sdbusplus.mk
@@ -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))
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 1/1] package/sdbusplus: new package
  2019-07-02 20:43 ` [Buildroot] [PATCH v2 1/1] " John Faith
@ 2019-07-11 14:21   ` Arnout Vandecappelle
  2019-07-19 20:18     ` Trent Piepho
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Arnout Vandecappelle @ 2019-07-11 14:21 UTC (permalink / raw
  To: buildroot

 Hi John,

 Still a few problems :-(

On 02/07/2019 22:43, John Faith wrote:
> From: Trent Piepho <tpiepho@impinj.com>
> 
> 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.

 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.

> 
> 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.
> 
> Signed-off-by: John Faith <jfaith@impinj.com>
> Signed-off-by: Trent Piepho <tpiepho@impinj.com>

[snip]
> diff --git a/package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch b/package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch
> new file mode 100644
> index 0000000000..e1364796fb
> --- /dev/null
> +++ b/package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch
> @@ -0,0 +1,42 @@
> +From c5d5a94f8e554f160e3f120b826e97b2961e2706 Mon Sep 17 00:00:00 2001
> +From: Trent Piepho <tpiepho@impinj.com>
> +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.

> +
> +Signed-off-by: Trent Piepho <tpiepho@impinj.com>

 John, since you're delivering this patch, your Sob is required as well.
[snip]
> +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.

> +	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++"


> diff --git a/package/sdbusplus/Config.in.host b/package/sdbusplus/Config.in.host
> new file mode 100644
> index 0000000000..03f55c4c4f
> --- /dev/null
> +++ b/package/sdbusplus/Config.in.host
> @@ -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.

> +
> +	  https://github.com/openbmc/sdbusplus
> diff --git a/package/sdbusplus/sdbusplus.hash b/package/sdbusplus/sdbusplus.hash
> new file mode 100644
> index 0000000000..24849ee591
> --- /dev/null
> +++ b/package/sdbusplus/sdbusplus.hash
> @@ -0,0 +1,4 @@
> +# Locally calculated
> +sha256  9136215c5fc849c33555db4210f17d844864c1b0790fe35026d594af965aa09d  sdbusplus-28dc36d509ba8f77ffb5726cc7d5f0184f8054b1.tar.gz
> +# License file, locally calculated
> +sha256  b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1  LICENSE
> diff --git a/package/sdbusplus/sdbusplus.mk b/package/sdbusplus/sdbusplus.mk
> new file mode 100644
> index 0000000000..ab50568b5a
> --- /dev/null
> +++ b/package/sdbusplus/sdbusplus.mk
> @@ -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

 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

> +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))
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 1/1] package/sdbusplus: new package
  2019-07-11 14:21   ` Arnout Vandecappelle
@ 2019-07-19 20:18     ` Trent Piepho
  2019-08-05 22:52     ` [Buildroot] [PATCH v3] " John Faith
  2019-08-07 19:12     ` [Buildroot] [PATCH v4] " John Faith
  2 siblings, 0 replies; 9+ messages in thread
From: Trent Piepho @ 2019-07-19 20:18 UTC (permalink / raw
  To: buildroot

On Thu, 2019-07-11 at 16:21 +0200, Arnout Vandecappelle wrote:
> 
> > diff --git a/package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch b/package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch
> > new file mode 100644
> > index 0000000000..e1364796fb
> > --- /dev/null
> > +++ b/package/sdbusplus/0001-build-Fix-example-build-with-disable-sdbuspp.patch
> > @@ -0,0 +1,42 @@
> > +From c5d5a94f8e554f160e3f120b826e97b2961e2706 Mon Sep 17 00:00:00 2001
> > +From: Trent Piepho <tpiepho@impinj.com>
> > +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.

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 <manojkiran.eda@gmail.com>
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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v3] package/sdbusplus: new package
  2019-07-11 14:21   ` Arnout Vandecappelle
  2019-07-19 20:18     ` Trent Piepho
@ 2019-08-05 22:52     ` John Faith
  2019-08-06 21:10       ` Thomas Petazzoni
  2019-08-07 19:12     ` [Buildroot] [PATCH v4] " John Faith
  2 siblings, 1 reply; 9+ messages in thread
From: John Faith @ 2019-08-05 22:52 UTC (permalink / raw
  To: buildroot

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.

host-autoconf-archive is added as a dependency since configure.ac
uses the AX_PKG_CHECK_MODULES macro.

Signed-off-by: John Faith <jfaith@impinj.com>
Signed-off-by: Trent Piepho <tpiepho@impinj.com>

---
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

diff --git a/DEVELOPERS b/DEVELOPERS
index 4ab4e36593..582256d349 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1177,6 +1177,7 @@ F:	package/dhcpcd/
 
 N:	John Faith <jfaith@impinj.com>
 F:	package/python-inflection/
+F:	package/sdbusplus/
 
 N:	Jonathan Ben Avraham <yba@tkos.co.il>
 F:	arch/Config.in.xtensa
diff --git a/package/Config.in b/package/Config.in
index 90dddfd346..8f06af9538 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/Config.in.host b/package/Config.in.host
index 1501889b72..835dd04237 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -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"
diff --git a/package/sdbusplus/Config.in b/package/sdbusplus/Config.in
new file mode 100644
index 0000000000..639e08ba69
--- /dev/null
+++ b/package/sdbusplus/Config.in
@@ -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++"
diff --git a/package/sdbusplus/Config.in.host b/package/sdbusplus/Config.in.host
new file mode 100644
index 0000000000..cff9f20384
--- /dev/null
+++ b/package/sdbusplus/Config.in.host
@@ -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
diff --git a/package/sdbusplus/sdbusplus.hash b/package/sdbusplus/sdbusplus.hash
new file mode 100644
index 0000000000..b21d2ddd23
--- /dev/null
+++ b/package/sdbusplus/sdbusplus.hash
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256  c67b8f3d9b74fd0d70eb6eec3b2ec2d496d0f169deedf6fc07dbff2c2f275d2b  sdbusplus-4212292bcf136d04b38ba5116aa568b0fa312798.tar.gz
+
+# License file, locally calculated
+sha256  b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1  LICENSE
diff --git a/package/sdbusplus/sdbusplus.mk b/package/sdbusplus/sdbusplus.mk
new file mode 100644
index 0000000000..e4f96b8bc6
--- /dev/null
+++ b/package/sdbusplus/sdbusplus.mk
@@ -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))
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v3] package/sdbusplus: new package
  2019-08-05 22:52     ` [Buildroot] [PATCH v3] " John Faith
@ 2019-08-06 21:10       ` Thomas Petazzoni
  2019-08-07 18:51         ` John Faith
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2019-08-06 21:10 UTC (permalink / raw
  To: buildroot

Hello John,

Thanks for this new iteration!

On Mon, 5 Aug 2019 22:52:42 +0000
John Faith <jfaith@impinj.com> wrote:

> +comment "sdbusplus needs systemd and a toolchain w/ C++"

This needs to have:

	depends on !BR2_PACKAGE_SYSTEMD || !BR2_INSTALL_LIBSTDCPP

> +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
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v3] package/sdbusplus: new package
  2019-08-06 21:10       ` Thomas Petazzoni
@ 2019-08-07 18:51         ` John Faith
  0 siblings, 0 replies; 9+ messages in thread
From: John Faith @ 2019-08-07 18:51 UTC (permalink / raw
  To: buildroot

On Tue, 2019-08-06 at 23:10 +0200, Thomas Petazzoni wrote:
Hello John,

Thanks for this new iteration!

On Mon, 5 Aug 2019 22:52:42 +0000
John Faith <jfaith@impinj.com> wrote:

> +comment "sdbusplus needs systemd and a toolchain w/ C++"

This needs to have:

depends on !BR2_PACKAGE_SYSTEMD || !BR2_INSTALL_LIBSTDCPP

Yes, added.


> +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>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v4] package/sdbusplus: new package
  2019-07-11 14:21   ` Arnout Vandecappelle
  2019-07-19 20:18     ` Trent Piepho
  2019-08-05 22:52     ` [Buildroot] [PATCH v3] " John Faith
@ 2019-08-07 19:12     ` John Faith
  2019-11-13 13:02       ` Thomas Petazzoni
  2 siblings, 1 reply; 9+ messages in thread
From: John Faith @ 2019-08-07 19:12 UTC (permalink / raw
  To: buildroot

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.

host-autoconf-archive is added as a dependency since configure.ac
uses the AX_PKG_CHECK_MODULES macro.

Signed-off-by: John Faith <jfaith@impinj.com>
Signed-off-by: Trent Piepho <tpiepho@impinj.com>

---
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

diff --git a/DEVELOPERS b/DEVELOPERS
index e8ba6cd985..dcd3289c36 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1195,6 +1195,7 @@ F:	package/dhcpcd/
 
 N:	John Faith <jfaith@impinj.com>
 F:	package/python-inflection/
+F:	package/sdbusplus/
 
 N:	Jonathan Ben Avraham <yba@tkos.co.il>
 F:	arch/Config.in.xtensa
diff --git a/package/Config.in b/package/Config.in
index 5f2191a554..704f82b33e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/Config.in.host b/package/Config.in.host
index 93822304e9..e4cab00f0c 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -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"
diff --git a/package/sdbusplus/Config.in b/package/sdbusplus/Config.in
new file mode 100644
index 0000000000..e278d17156
--- /dev/null
+++ b/package/sdbusplus/Config.in
@@ -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
diff --git a/package/sdbusplus/Config.in.host b/package/sdbusplus/Config.in.host
new file mode 100644
index 0000000000..cff9f20384
--- /dev/null
+++ b/package/sdbusplus/Config.in.host
@@ -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
diff --git a/package/sdbusplus/sdbusplus.hash b/package/sdbusplus/sdbusplus.hash
new file mode 100644
index 0000000000..b21d2ddd23
--- /dev/null
+++ b/package/sdbusplus/sdbusplus.hash
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256  c67b8f3d9b74fd0d70eb6eec3b2ec2d496d0f169deedf6fc07dbff2c2f275d2b  sdbusplus-4212292bcf136d04b38ba5116aa568b0fa312798.tar.gz
+
+# License file, locally calculated
+sha256  b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1  LICENSE
diff --git a/package/sdbusplus/sdbusplus.mk b/package/sdbusplus/sdbusplus.mk
new file mode 100644
index 0000000000..481284e920
--- /dev/null
+++ b/package/sdbusplus/sdbusplus.mk
@@ -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))
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v4] package/sdbusplus: new package
  2019-08-07 19:12     ` [Buildroot] [PATCH v4] " John Faith
@ 2019-11-13 13:02       ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2019-11-13 13:02 UTC (permalink / raw
  To: buildroot

Hello John,

On Wed, 7 Aug 2019 19:12:00 +0000
John Faith <jfaith@impinj.com> 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.
> 
> host-autoconf-archive is added as a dependency since configure.ac
> uses the AX_PKG_CHECK_MODULES macro.
> 
> Signed-off-by: John Faith <jfaith@impinj.com>
> Signed-off-by: Trent Piepho <tpiepho@impinj.com>

I have finally applied to next, with one change. See below.

> +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
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-11-13 13:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-02 20:43 [Buildroot] [PATCH v2 0/1] package/sdbusplus: new package John Faith
2019-07-02 20:43 ` [Buildroot] [PATCH v2 1/1] " John Faith
2019-07-11 14:21   ` Arnout Vandecappelle
2019-07-19 20:18     ` Trent Piepho
2019-08-05 22:52     ` [Buildroot] [PATCH v3] " John Faith
2019-08-06 21:10       ` Thomas Petazzoni
2019-08-07 18:51         ` John Faith
2019-08-07 19:12     ` [Buildroot] [PATCH v4] " John Faith
2019-11-13 13:02       ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.