Skip to contentSkip to conversation

sdbus-cpp: new package

PATCH Superseded Sergey Bobrenok 2 participants 5 messages Oct 29, 2020 – Nov 13, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sdbus-cpp: new package

sdbus-c++ is a high-level C++ D-Bus library for Linux.

The target build produces sdbus-c++ library itself. The host build produces helper tool sdbus-c++-xml2cpp. sdbus-c++-xml2cpp can be used to generate sdbus-c++ stub .h files from xml files.

---
 package/Config.in                |  1 +
 package/sdbus-cpp/Config.in      | 18 ++++++++++++++++++
 package/sdbus-cpp/sdbus-cpp.hash |  3 +++
 package/sdbus-cpp/sdbus-cpp.mk   | 18 ++++++++++++++++++
 4 files changed, 40 insertions(+)
 create mode 100644 package/sdbus-cpp/Config.in
 create mode 100644 package/sdbus-cpp/sdbus-cpp.hash
 create mode 100644 package/sdbus-cpp/sdbus-cpp.mk
package/Config.in +1 -0
index ee05467479..a6de867a1d 100644
@@ -2442,6 +2442,7 @@ menu "System tools"
 	source "package/s6-rc/Config.in"
 	source "package/scrub/Config.in"
 	source "package/scrypt/Config.in"
+	source "package/sdbus-cpp/Config.in"
 	source "package/sdbusplus/Config.in"
 	source "package/smack/Config.in"
 	source "package/start-stop-daemon/Config.in"
package/sdbus-cpp/Config.in new file +18 -0
new file mode 100644
index 0000000000..7a952d78a5
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_SDBUS_CPP
+	bool "sdbus-c++"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_PACKAGE_SYSTEMD
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17
+	select BR2_PACKAGE_EXPAT # host package
+	help
+	  sdbus-c++ is a high-level C++ D-Bus library for Linux
+	  designed to provide expressive, easy-to-use API in modern C++.
+
+	  This will build the target library and the host side native
+	  stub generator tool (sdbus-c++-xml2cpp).
+
+	  https://github.com/Kistler-Group/sdbus-cpp
+
+comment "sdbus-c++ needs systemd and a toolchain w/ C++, gcc >= 7"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_SYSTEMD || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_7
package/sdbus-cpp/sdbus-cpp.hash new file +3 -0
new file mode 100644
index 0000000000..8b87653dfd
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256  0fd575ae0f463773dd9141242d1133731e2b780fd6526650ce992ba711d88628  v0.8.3.tar.gz
+sha256  20c17d8b8c48a600800dfd14f95d5cb9ff47066a9641ddeab48dc54aec96e331  COPYING
package/sdbus-cpp/sdbus-cpp.mk new file +18 -0
new file mode 100644
index 0000000000..608919a050
@@ -0,0 +1,18 @@
+################################################################################
+#
+# sdbus-c++
+#
+################################################################################
+
+SDBUS_CPP_VERSION = 0.8.3
+SDBUS_CPP_SOURCE = v$(SDBUS_CPP_VERSION).tar.gz
+SDBUS_CPP_SITE = https://github.com/Kistler-Group/sdbus-cpp/archive
+SDBUS_CPP_INSTALL_STAGING = YES
+SDBUS_CPP_DEPENDENCIES = systemd
+SDBUS_CPP_LICENSE = LGPL-2.1-or-later
+SDBUS_CPP_LICENSE_FILES = COPYING
+HOST_SDBUS_CPP_SUBDIR = tools
+HOST_SDBUS_CPP_DEPENDENCIES = host-expat
+
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))
Signature · 1 line
2.28.0
#1 lore raw

PATCH 1/1 sdbus-cpp: new package

Hello Sergey,

Thanks for this contribution. First just to make sure: this is really a different library than package/sdbusplus/ that we already have in Buildroot ?

The commit title should be:

package/sdbus-cpp: new package

Quoted 6 lines · On Thu, 29 Oct 2020 21:23:46 +0700 Sergey Bobrenok <[email protected]> wrote:

sdbus-c++ is a high-level C++ D-Bus library for Linux.

The target build produces sdbus-c++ library itself. The host build produces helper tool sdbus-c++-xml2cpp. sdbus-c++-xml2cpp can be used to generate sdbus-c++ stub .h files from xml files.

Quoted 7 lines
---
 package/Config.in                |  1 +
 package/sdbus-cpp/Config.in      | 18 ++++++++++++++++++
 package/sdbus-cpp/sdbus-cpp.hash |  3 +++
 package/sdbus-cpp/sdbus-cpp.mk   | 18 ++++++++++++++++++
 4 files changed, 40 insertions(+)

Please add an entry in the DEVELOPERS file.

package/sdbus-cpp/Config.in line 6

Quoted 12 lines
package/sdbus-cpp/Config.in new file +6 -0
new file mode 100644
index 0000000000..7a952d78a5
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_SDBUS_CPP
+	bool "sdbus-c++"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_PACKAGE_SYSTEMD
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17
+	select BR2_PACKAGE_EXPAT # host package

It's only the host package that needs host-expat. Selecting BR2_PACKAGE_EXPAT means "I need the target expat", which is not the case here.

package/sdbus-cpp/Config.in line 12

Quoted 6 lines
package/sdbus-cpp/Config.in new file +6 -0
+	help
+	  sdbus-c++ is a high-level C++ D-Bus library for Linux
+	  designed to provide expressive, easy-to-use API in modern C++.
+
+	  This will build the target library and the host side native
+	  stub generator tool (sdbus-c++-xml2cpp).

No, your package as it is written today will not build the host side.

Quoted 6 lines
package/sdbus-cpp/sdbus-cpp.mk new file +0 -0
new file mode 100644
index 0000000000..608919a050

package/sdbus-cpp/sdbus-cpp.mk line 9

Quoted 9 lines
package/sdbus-cpp/sdbus-cpp.mk new file +9 -0
@@ -0,0 +1,18 @@
+################################################################################
+#
+# sdbus-c++
+#
+################################################################################
+
+SDBUS_CPP_VERSION = 0.8.3
+SDBUS_CPP_SOURCE = v$(SDBUS_CPP_VERSION).tar.gz
+SDBUS_CPP_SITE = https://github.com/Kistler-Group/sdbus-cpp/archive

These are auto-generated archives. In this case, please use our $(call github,...) macro instead.

package/sdbus-cpp/sdbus-cpp.mk line 12

Quoted 3 lines
package/sdbus-cpp/sdbus-cpp.mk new file +3 -0
+SDBUS_CPP_INSTALL_STAGING = YES
+SDBUS_CPP_DEPENDENCIES = systemd
+SDBUS_CPP_LICENSE = LGPL-2.1-or-later

I know LGPL-2.1-or-later is the correct SPDX encoding, but we use LGPL-2.1+ in Buildroot, for historical reasons.

package/sdbus-cpp/sdbus-cpp.mk line 18

Quoted 6 lines
package/sdbus-cpp/sdbus-cpp.mk new file +6 -0
+SDBUS_CPP_LICENSE_FILES = COPYING
+HOST_SDBUS_CPP_SUBDIR = tools
+HOST_SDBUS_CPP_DEPENDENCIES = host-expat
+
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))

Could you rework your patch and send an updated version?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 sdbus-cpp: new package

Hello Thomas,

Quoted 5 lines · On Sat, 31 Oct 2020 23:55:31 +0100 Thomas Petazzoni…

Hello Sergey,

Thanks for this contribution. First just to make sure: this is really a different library than package/sdbusplus/ that we already have in Buildroot ?

Yes. sdbusplus and sdbus-cpp are different libraries.

Quoted 4 lines

The commit title should be:

package/sdbus-cpp: new package

Ok. I missed it when I was reading the contribution manual. Will fix it.

Quoted 18 lines
Quoted 6 lines · On Thu, 29 Oct 2020 21:23:46 +0700 Sergey Bobrenok <[email protected]> wrote:

sdbus-c++ is a high-level C++ D-Bus library for Linux.

The target build produces sdbus-c++ library itself. The host build produces helper tool sdbus-c++-xml2cpp. sdbus-c++-xml2cpp can be used to generate sdbus-c++ stub .h files from xml files.

Quoted 7 lines
---
 package/Config.in                |  1 +
 package/sdbus-cpp/Config.in      | 18 ++++++++++++++++++
 package/sdbus-cpp/sdbus-cpp.hash |  3 +++
 package/sdbus-cpp/sdbus-cpp.mk   | 18 ++++++++++++++++++
 4 files changed, 40 insertions(+)  
Quoted 1 line

Please add an entry in the DEVELOPERS file.

I'll fix it.

Quoted 17 lines

package/sdbus-cpp/Config.in line 6

Quoted 13 lines
(quoted diff) +0 -0

b/package/sdbus-cpp/Config.in new file mode 100644 index 0000000000..7a952d78a5

package/sdbus-cpp/Config.in new file +6 -0
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_SDBUS_CPP
+	bool "sdbus-c++"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_PACKAGE_SYSTEMD
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17
+	select BR2_PACKAGE_EXPAT # host package  

It's only the host package that needs host-expat. Selecting BR2_PACKAGE_EXPAT means "I need the target expat", which is not the case here.

You're right. The host-sdbus-cpp package doesn't need to select BR2_PACKAGE_EXPAT. It just needs to declare a dependency on host-expat. I will delete BR2_PACKAGE_EXPAT from here.

Quoted 10 lines

package/sdbus-cpp/Config.in line 12

Quoted 8 lines
package/sdbus-cpp/Config.in new file +3 -0
+	help
+	  sdbus-c++ is a high-level C++ D-Bus library for Linux
+	  designed to provide expressive, easy-to-use API in

modern C++. +

package/sdbus-cpp/Config.in new file +1 -0
+	  This will build the target library and the host side

native

package/sdbus-cpp/Config.in new file +1 -0
+	  stub generator tool (sdbus-c++-xml2cpp).  

No, your package as it is written today will not build the host side.

Can you explain what do you mean? This package is providing 'host-sdbus-cpp' target that can be used to build 'sdbus-c++-xml2cpp' generator tool by dependency. This is that I was trying to achieve and that how I use it (and it works). I am not sure what should I change.

Quoted 12 lines
Quoted 12 lines
(quoted diff) +0 -0

b/package/sdbus-cpp/sdbus-cpp.mk new file mode 100644 index 0000000000..608919a050

package/sdbus-cpp/sdbus-cpp.mk new file +5 -0
@@ -0,0 +1,18 @@
+################################################################################
+#
+# sdbus-c++
+#
+################################################################################
Quoted 8 lines
Quoted 5 lines
package/sdbus-cpp/sdbus-cpp.mk new file +4 -0
+
+SDBUS_CPP_VERSION = 0.8.3
+SDBUS_CPP_SOURCE = v$(SDBUS_CPP_VERSION).tar.gz
+SDBUS_CPP_SITE =

https://github.com/Kistler-Group/sdbus-cpp/archive

These are auto-generated archives. In this case, please use our $(call github,...) macro instead.

I'll fix it.

Quoted 7 lines

package/sdbus-cpp/sdbus-cpp.mk line 12

Quoted 4 lines
package/sdbus-cpp/sdbus-cpp.mk new file +3 -0
+SDBUS_CPP_INSTALL_STAGING = YES
+SDBUS_CPP_DEPENDENCIES = systemd
+SDBUS_CPP_LICENSE = LGPL-2.1-or-later  

I know LGPL-2.1-or-later is the correct SPDX encoding, but we use LGPL-2.1+ in Buildroot, for historical reasons.

I'll fix it.

#3 lore raw

PATCH v2 1/1 package/sdbus-cpp: new package

In reply to Thomas Petazzoni

sdbus-c++ is a high-level C++ D-Bus library for Linux.

The target build produces sdbus-c++ library itself. The host build produces helper tool sdbus-c++-xml2cpp. sdbus-c++-xml2cpp can be used to generate sdbus-c++ stub .h files from xml files.

---
 DEVELOPERS                       |  3 +++
 package/Config.in                |  1 +
 package/sdbus-cpp/Config.in      | 16 ++++++++++++++++
 package/sdbus-cpp/sdbus-cpp.hash |  3 +++
 package/sdbus-cpp/sdbus-cpp.mk   | 18 ++++++++++++++++++
 5 files changed, 41 insertions(+)
 create mode 100644 package/sdbus-cpp/Config.in
 create mode 100644 package/sdbus-cpp/sdbus-cpp.hash
 create mode 100644 package/sdbus-cpp/sdbus-cpp.mk
DEVELOPERS +3 -0
index 7643722f3c..d96605983f 100644
@@ -2329,6 +2329,9 @@ F:	package/libbson/
 F:	package/lua-resty-http/
 F:	package/mpir/
 
+N:	Sergey Bobrenok <[email protected]>
+F:	package/sdbus-cpp/
+
 N:	Sergey Matyukevich <[email protected]>
 F:	boot/arm-trusted-firmware/
 F:	boot/binaries-marvell/
package/Config.in +1 -0
index 016a99ed1a..be054cbf0d 100644
@@ -2441,6 +2441,7 @@ menu "System tools"
 	source "package/s6-rc/Config.in"
 	source "package/scrub/Config.in"
 	source "package/scrypt/Config.in"
+	source "package/sdbus-cpp/Config.in"
 	source "package/sdbusplus/Config.in"
 	source "package/smack/Config.in"
 	source "package/start-stop-daemon/Config.in"
package/sdbus-cpp/Config.in new file +16 -0
new file mode 100644
index 0000000000..85f149eaa1
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_SDBUS_CPP
+	bool "sdbus-c++"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_PACKAGE_SYSTEMD
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17
+	help
+	  sdbus-c++ is a high-level C++ D-Bus library for Linux
+	  designed to provide expressive, easy-to-use API in modern C++.
+
+	  This will build the target library.
+
+	  https://github.com/Kistler-Group/sdbus-cpp
+
+comment "sdbus-c++ needs systemd and a toolchain w/ C++, gcc >= 7"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_SYSTEMD || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_7
package/sdbus-cpp/sdbus-cpp.hash new file +3 -0
new file mode 100644
index 0000000000..8b87653dfd
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256  0fd575ae0f463773dd9141242d1133731e2b780fd6526650ce992ba711d88628  v0.8.3.tar.gz
+sha256  20c17d8b8c48a600800dfd14f95d5cb9ff47066a9641ddeab48dc54aec96e331  COPYING
package/sdbus-cpp/sdbus-cpp.mk new file +18 -0
new file mode 100644
index 0000000000..1b892ae943
@@ -0,0 +1,18 @@
+################################################################################
+#
+# sdbus-c++
+#
+################################################################################
+
+SDBUS_CPP_VERSION = 0.8.3
+SDBUS_CPP_SOURCE = v$(SDBUS_CPP_VERSION).tar.gz
+SDBUS_CPP_SITE = $(call github,Kistler-Group,sdbus-cpp,v$(SDBUS_CPP_VERSION))
+SDBUS_CPP_INSTALL_STAGING = YES
+SDBUS_CPP_DEPENDENCIES = systemd
+SDBUS_CPP_LICENSE = LGPL-2.1+
+SDBUS_CPP_LICENSE_FILES = COPYING
+HOST_SDBUS_CPP_SUBDIR = tools
+HOST_SDBUS_CPP_DEPENDENCIES = host-expat
+
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))
Signature · 1 line
2.28.0
#4 lore raw

PATCH v3 1/1 package/sdbus-cpp: new package

In reply to Sergey Bobrenok

sdbus-c++ is a high-level C++ D-Bus library for Linux.

The target build produces sdbus-c++ library itself. The host build produces helper tool sdbus-c++-xml2cpp. sdbus-c++-xml2cpp can be used to generate sdbus-c++ stub .h files from xml files.

---
 DEVELOPERS                       |  3 +++
 package/Config.in                |  1 +
 package/sdbus-cpp/Config.in      | 16 ++++++++++++++++
 package/sdbus-cpp/sdbus-cpp.hash |  3 +++
 package/sdbus-cpp/sdbus-cpp.mk   | 18 ++++++++++++++++++
 5 files changed, 41 insertions(+)
 create mode 100644 package/sdbus-cpp/Config.in
 create mode 100644 package/sdbus-cpp/sdbus-cpp.hash
 create mode 100644 package/sdbus-cpp/sdbus-cpp.mk
DEVELOPERS +3 -0
index 6b8083eb47..cbb3c82ff8 100644
@@ -2328,6 +2328,9 @@ F:	package/libbson/
 F:	package/lua-resty-http/
 F:	package/mpir/
 
+N:	Sergey Bobrenok <[email protected]>
+F:	package/sdbus-cpp/
+
 N:	Sergey Matyukevich <[email protected]>
 F:	boot/arm-trusted-firmware/
 F:	boot/binaries-marvell/
package/Config.in +1 -0
index 016a99ed1a..be054cbf0d 100644
@@ -2441,6 +2441,7 @@ menu "System tools"
 	source "package/s6-rc/Config.in"
 	source "package/scrub/Config.in"
 	source "package/scrypt/Config.in"
+	source "package/sdbus-cpp/Config.in"
 	source "package/sdbusplus/Config.in"
 	source "package/smack/Config.in"
 	source "package/start-stop-daemon/Config.in"
package/sdbus-cpp/Config.in new file +16 -0
new file mode 100644
index 0000000000..85f149eaa1
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_SDBUS_CPP
+	bool "sdbus-c++"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_PACKAGE_SYSTEMD
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17
+	help
+	  sdbus-c++ is a high-level C++ D-Bus library for Linux
+	  designed to provide expressive, easy-to-use API in modern C++.
+
+	  This will build the target library.
+
+	  https://github.com/Kistler-Group/sdbus-cpp
+
+comment "sdbus-c++ needs systemd and a toolchain w/ C++, gcc >= 7"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_SYSTEMD || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_7
package/sdbus-cpp/sdbus-cpp.hash new file +3 -0
new file mode 100644
index 0000000000..8b87653dfd
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256  0fd575ae0f463773dd9141242d1133731e2b780fd6526650ce992ba711d88628  v0.8.3.tar.gz
+sha256  20c17d8b8c48a600800dfd14f95d5cb9ff47066a9641ddeab48dc54aec96e331  COPYING
package/sdbus-cpp/sdbus-cpp.mk new file +18 -0
new file mode 100644
index 0000000000..1b892ae943
@@ -0,0 +1,18 @@
+################################################################################
+#
+# sdbus-c++
+#
+################################################################################
+
+SDBUS_CPP_VERSION = 0.8.3
+SDBUS_CPP_SOURCE = v$(SDBUS_CPP_VERSION).tar.gz
+SDBUS_CPP_SITE = $(call github,Kistler-Group,sdbus-cpp,v$(SDBUS_CPP_VERSION))
+SDBUS_CPP_INSTALL_STAGING = YES
+SDBUS_CPP_DEPENDENCIES = systemd
+SDBUS_CPP_LICENSE = LGPL-2.1+
+SDBUS_CPP_LICENSE_FILES = COPYING
+HOST_SDBUS_CPP_SUBDIR = tools
+HOST_SDBUS_CPP_DEPENDENCIES = host-expat
+
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))
Signature · 1 line
2.28.0