* [Buildroot] [PATCH 0/2] package: add libyang-cpp and sysrepo-cpp
@ 2025-12-05 10:06 Vincent Jardin via buildroot
2025-12-05 10:06 ` [Buildroot] [PATCH 1/2] libyang-cpp: new package Vincent Jardin via buildroot
2025-12-05 10:06 ` [Buildroot] [PATCH 2/2] package/sysrepo-cpp: " Vincent Jardin via buildroot
0 siblings, 2 replies; 5+ messages in thread
From: Vincent Jardin via buildroot @ 2025-12-05 10:06 UTC (permalink / raw)
To: buildroot; +Cc: vjardin
Hi,
this small series adds C++ bindings for the YANG stack used by sysrepo:
- package/libyang-cpp: C++ RAII bindings for libyang v4
- package/sysrepo-cpp: C++ RAII bindings for the sysrepo datastore
Both packages are used together in our projects, hence sent as a single
series.
Runtime has been validated with the following test configuration:
BR2_PACKAGE_SYSREPO_CPP=y
Both are sent with the same serie since since sysrepo shall be used with
libyang.
The series has been built and run-tested in GitLab CI:
- https://gitlab.com/vjardin/buildroot/-/pipelines/2195059828
>> it is the state before those contributions. It shows a problem
with the bootlin toolchain
- https://gitlab.com/vjardin/buildroot/-/pipelines/2194922330
>> ok for sysrepo-cpp and libyang-cpp ; same failure with bootlin
toolchain.
Vincent Jardin (2):
libyang-cpp: new package
package/sysrepo-cpp: new package
DEVELOPERS | 2 ++
package/Config.in | 2 ++
package/libyang-cpp/Config.in | 15 +++++++++++++++
package/libyang-cpp/libyang-cpp.hash | 3 +++
package/libyang-cpp/libyang-cpp.mk | 22 ++++++++++++++++++++++
package/sysrepo-cpp/Config.in | 20 ++++++++++++++++++++
package/sysrepo-cpp/sysrepo-cpp.hash | 3 +++
package/sysrepo-cpp/sysrepo-cpp.mk | 26 ++++++++++++++++++++++++++
8 files changed, 93 insertions(+)
create mode 100644 package/libyang-cpp/Config.in
create mode 100644 package/libyang-cpp/libyang-cpp.hash
create mode 100644 package/libyang-cpp/libyang-cpp.mk
create mode 100644 package/sysrepo-cpp/Config.in
create mode 100644 package/sysrepo-cpp/sysrepo-cpp.hash
create mode 100644 package/sysrepo-cpp/sysrepo-cpp.mk
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread* [Buildroot] [PATCH 1/2] libyang-cpp: new package 2025-12-05 10:06 [Buildroot] [PATCH 0/2] package: add libyang-cpp and sysrepo-cpp Vincent Jardin via buildroot @ 2025-12-05 10:06 ` Vincent Jardin via buildroot 2025-12-28 13:22 ` Thomas Petazzoni via buildroot 2025-12-05 10:06 ` [Buildroot] [PATCH 2/2] package/sysrepo-cpp: " Vincent Jardin via buildroot 1 sibling, 1 reply; 5+ messages in thread From: Vincent Jardin via buildroot @ 2025-12-05 10:06 UTC (permalink / raw) To: buildroot; +Cc: vjardin Add C++ RAII bindings for libyang (v4). Signed-off-by: Vincent Jardin <vjardin@free.fr> --- DEVELOPERS | 1 + package/Config.in | 1 + package/libyang-cpp/Config.in | 15 +++++++++++++++ package/libyang-cpp/libyang-cpp.hash | 3 +++ package/libyang-cpp/libyang-cpp.mk | 22 ++++++++++++++++++++++ 5 files changed, 42 insertions(+) create mode 100644 package/libyang-cpp/Config.in create mode 100644 package/libyang-cpp/libyang-cpp.hash create mode 100644 package/libyang-cpp/libyang-cpp.mk diff --git a/DEVELOPERS b/DEVELOPERS index 5e1fa6401f..4b5d0839bf 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -3345,6 +3345,7 @@ F: configs/nvidia_bf3_defconfig F: package/bfscripts/ F: package/dpdk/ F: package/libecoli/ +F: package/libyang-cpp/ N: Vincent Prince <vincent.prince.fr@gmail.com> F: package/nss-myhostname/ diff --git a/package/Config.in b/package/Config.in index 83414b3e0b..b5892fe28b 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2103,6 +2103,7 @@ menu "Networking" source "package/libvncserver/Config.in" source "package/libwebsockets/Config.in" source "package/libyang/Config.in" + source "package/libyang-cpp/Config.in" source "package/libzenoh-c/Config.in" source "package/libzenoh-pico/Config.in" source "package/lksctp-tools/Config.in" diff --git a/package/libyang-cpp/Config.in b/package/libyang-cpp/Config.in new file mode 100644 index 0000000000..5bb79ffb2e --- /dev/null +++ b/package/libyang-cpp/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBYANG_CPP + bool "libyang-cpp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_PACKAGE_LIBYANG + help + C++ bindings for the libyang library (v4). + + libyang-cpp implements modern C++ RAII wrappers around the libyang + C API, used by sysrepo, Kea + NETCONF, etc. + + https://github.com/CESNET/libyang-cpp + +comment "libyang-cpp needs a toolchain w/ C++, gcc >= 10" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_10 diff --git a/package/libyang-cpp/libyang-cpp.hash b/package/libyang-cpp/libyang-cpp.hash new file mode 100644 index 0000000000..cf4dc8085d --- /dev/null +++ b/package/libyang-cpp/libyang-cpp.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 70fd0df940026fb930d5407abe679e064caf4701bff35d79465b9ad2c0915808 libyang-cpp-4.tar.gz +sha256 82e3758011ec44c78e98d0777799d6e12aec5b8a64b32ebb20d0fe50e32488bb LICENSE diff --git a/package/libyang-cpp/libyang-cpp.mk b/package/libyang-cpp/libyang-cpp.mk new file mode 100644 index 0000000000..1fb109b03d --- /dev/null +++ b/package/libyang-cpp/libyang-cpp.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# libyang-cpp +# +################################################################################ + +LIBYANG_CPP_VERSION = 4 +LIBYANG_CPP_SITE = $(call github,CESNET,libyang-cpp,v$(LIBYANG_CPP_VERSION)) +LIBYANG_CPP_LICENSE = BSD-3-Clause +LIBYANG_CPP_LICENSE_FILES = LICENSE + +LIBYANG_CPP_INSTALL_STAGING = YES + +LIBYANG_CPP_SUPPORTS_IN_SOURCE_BUILD = NO + +LIBYANG_CPP_DEPENDENCIES = libyang + +LIBYANG_CPP_CONF_OPTS = \ + -DBUILD_TESTING=OFF \ + -DWITH_DOCS=OFF + +$(eval $(cmake-package)) -- 2.34.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 1/2] libyang-cpp: new package 2025-12-05 10:06 ` [Buildroot] [PATCH 1/2] libyang-cpp: new package Vincent Jardin via buildroot @ 2025-12-28 13:22 ` Thomas Petazzoni via buildroot 0 siblings, 0 replies; 5+ messages in thread From: Thomas Petazzoni via buildroot @ 2025-12-28 13:22 UTC (permalink / raw) To: Vincent Jardin via buildroot; +Cc: Vincent Jardin Hello Vincent, I have applied your patch, after doing a small number of tweaks, see below. On Fri, 5 Dec 2025 11:06:25 +0100 Vincent Jardin via buildroot <buildroot@buildroot.org> wrote: > diff --git a/package/libyang-cpp/Config.in b/package/libyang-cpp/Config.in > new file mode 100644 > index 0000000000..5bb79ffb2e > --- /dev/null > +++ b/package/libyang-cpp/Config.in > @@ -0,0 +1,15 @@ > +config BR2_PACKAGE_LIBYANG_CPP > + bool "libyang-cpp" > + depends on BR2_INSTALL_LIBSTDCPP > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_10 > + select BR2_PACKAGE_LIBYANG You forgot to replicate the "depends on" of BR2_PACKAGE_LIBYANG, so I fixed this to: bool "libyang-cpp" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_GCC_AT_LEAST_10 depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libyang depends on BR2_TOOLCHAIN_HAS_THREADS # libyang depends on !BR2_STATIC_LIBS # libyang select BR2_PACKAGE_LIBYANG > + help > + C++ bindings for the libyang library (v4). > + > + libyang-cpp implements modern C++ RAII wrappers around the libyang This line was too long, spotted by "make check-package". > + C API, used by sysrepo, Kea + NETCONF, etc. > + > + https://github.com/CESNET/libyang-cpp > + > +comment "libyang-cpp needs a toolchain w/ C++, gcc >= 10" > + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_10 Had to update this according to the new dependencies. > diff --git a/package/libyang-cpp/libyang-cpp.mk b/package/libyang-cpp/libyang-cpp.mk > new file mode 100644 > index 0000000000..1fb109b03d > --- /dev/null > +++ b/package/libyang-cpp/libyang-cpp.mk > @@ -0,0 +1,22 @@ > +################################################################################ > +# > +# libyang-cpp > +# > +################################################################################ > + > +LIBYANG_CPP_VERSION = 4 > +LIBYANG_CPP_SITE = $(call github,CESNET,libyang-cpp,v$(LIBYANG_CPP_VERSION)) > +LIBYANG_CPP_LICENSE = BSD-3-Clause > +LIBYANG_CPP_LICENSE_FILES = LICENSE > + > +LIBYANG_CPP_INSTALL_STAGING = YES > + > +LIBYANG_CPP_SUPPORTS_IN_SOURCE_BUILD = NO > + > +LIBYANG_CPP_DEPENDENCIES = libyang A bit too many empty lines here (really just a matter of taste). > +LIBYANG_CPP_CONF_OPTS = \ > + -DBUILD_TESTING=OFF \ -DBUILD_TESTING=OFF is not needed, it's already passed by default by cmake-package. Applied with those changes, thanks! Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] package/sysrepo-cpp: new package 2025-12-05 10:06 [Buildroot] [PATCH 0/2] package: add libyang-cpp and sysrepo-cpp Vincent Jardin via buildroot 2025-12-05 10:06 ` [Buildroot] [PATCH 1/2] libyang-cpp: new package Vincent Jardin via buildroot @ 2025-12-05 10:06 ` Vincent Jardin via buildroot 2025-12-28 13:24 ` Thomas Petazzoni via buildroot 1 sibling, 1 reply; 5+ messages in thread From: Vincent Jardin via buildroot @ 2025-12-05 10:06 UTC (permalink / raw) To: buildroot; +Cc: vjardin Add a Buildroot package for sysrepo-cpp, providing modern C++ RAII bindings for the sysrepo YANG datastore library. Signed-off-by: Vincent Jardin <vjardin@free.fr> --- DEVELOPERS | 1 + package/Config.in | 1 + package/sysrepo-cpp/Config.in | 20 ++++++++++++++++++++ package/sysrepo-cpp/sysrepo-cpp.hash | 3 +++ package/sysrepo-cpp/sysrepo-cpp.mk | 26 ++++++++++++++++++++++++++ 5 files changed, 51 insertions(+) create mode 100644 package/sysrepo-cpp/Config.in create mode 100644 package/sysrepo-cpp/sysrepo-cpp.hash create mode 100644 package/sysrepo-cpp/sysrepo-cpp.mk diff --git a/DEVELOPERS b/DEVELOPERS index 4b5d0839bf..ef3fc769f7 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -3346,6 +3346,7 @@ F: package/bfscripts/ F: package/dpdk/ F: package/libecoli/ F: package/libyang-cpp/ +F: package/sysrepo-cpp/ N: Vincent Prince <vincent.prince.fr@gmail.com> F: package/nss-myhostname/ diff --git a/package/Config.in b/package/Config.in index b5892fe28b..7091249b4b 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2142,6 +2142,7 @@ menu "Networking" source "package/sofia-sip/Config.in" source "package/sscep/Config.in" source "package/sysrepo/Config.in" + source "package/sysrepo-cpp/Config.in" source "package/thrift/Config.in" source "package/usbredir/Config.in" source "package/wampcc/Config.in" diff --git a/package/sysrepo-cpp/Config.in b/package/sysrepo-cpp/Config.in new file mode 100644 index 0000000000..5cdfefa025 --- /dev/null +++ b/package/sysrepo-cpp/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_SYSREPO_CPP + bool "sysrepo-cpp" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_10 + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_UCLIBC + select BR2_PACKAGE_SYSREPO + select BR2_PACKAGE_LIBYANG_CPP + help + C++20 RAII bindings for the sysrepo YANG datastore library. + + This library provides modern C++ object-oriented bindings on top + of sysrepo, using RAII for automatic lifetime management. + + https://github.com/sysrepo/sysrepo-cpp + +comment "sysrepo-cpp needs a toolchain w/ C++, threads, dynamic libs, gcc >= 10" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \ + BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_10 diff --git a/package/sysrepo-cpp/sysrepo-cpp.hash b/package/sysrepo-cpp/sysrepo-cpp.hash new file mode 100644 index 0000000000..43a1bc439f --- /dev/null +++ b/package/sysrepo-cpp/sysrepo-cpp.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 d7fbeaba7f2fdaf70c67cc70f438943eee636b21f08854e58967d0d97801bacc sysrepo-cpp-6.tar.gz +sha256 82e3758011ec44c78e98d0777799d6e12aec5b8a64b32ebb20d0fe50e32488bb LICENSE diff --git a/package/sysrepo-cpp/sysrepo-cpp.mk b/package/sysrepo-cpp/sysrepo-cpp.mk new file mode 100644 index 0000000000..bbe81289b1 --- /dev/null +++ b/package/sysrepo-cpp/sysrepo-cpp.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# sysrepo-cpp +# +################################################################################ + +SYSREPO_CPP_VERSION = 6 +SYSREPO_CPP_SITE = $(call github,sysrepo,sysrepo-cpp,v$(SYSREPO_CPP_VERSION)) + +SYSREPO_CPP_LICENSE = BSD-3-Clause +SYSREPO_CPP_LICENSE_FILES = LICENSE + +SYSREPO_CPP_INSTALL_STAGING = YES +SYSREPO_CPP_INSTALL_TARGET = YES + +SYSREPO_CPP_CONF_OPTS += \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=OFF \ + -DWITH_DOCS=OFF \ + -DWITH_EXAMPLES=OFF + +SYSREPO_CPP_SUPPORTS_IN_SOURCE_BUILD = NO + +SYSREPO_CPP_DEPENDENCIES = sysrepo libyang-cpp + +$(eval $(cmake-package)) -- 2.34.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/sysrepo-cpp: new package 2025-12-05 10:06 ` [Buildroot] [PATCH 2/2] package/sysrepo-cpp: " Vincent Jardin via buildroot @ 2025-12-28 13:24 ` Thomas Petazzoni via buildroot 0 siblings, 0 replies; 5+ messages in thread From: Thomas Petazzoni via buildroot @ 2025-12-28 13:24 UTC (permalink / raw) To: Vincent Jardin via buildroot; +Cc: Vincent Jardin Hello Vincent, Thanks for the patch, which I have applied with a few tweaks, see below. On Fri, 5 Dec 2025 11:06:26 +0100 Vincent Jardin via buildroot <buildroot@buildroot.org> wrote: > diff --git a/package/sysrepo-cpp/Config.in b/package/sysrepo-cpp/Config.in > new file mode 100644 > index 0000000000..5cdfefa025 > --- /dev/null > +++ b/package/sysrepo-cpp/Config.in > @@ -0,0 +1,20 @@ > +config BR2_PACKAGE_SYSREPO_CPP > + bool "sysrepo-cpp" > + depends on BR2_TOOLCHAIN_HAS_THREADS > + depends on BR2_INSTALL_LIBSTDCPP > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_10 > + depends on !BR2_STATIC_LIBS > + depends on !BR2_TOOLCHAIN_USES_UCLIBC I had to update this to properly propagate all the dependencies: depends on BR2_USE_MMU # sysrepo depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # sysrepo depends on !BR2_STATIC_LIBS # sysrepo, libyang-cpp depends on BR2_INSTALL_LIBSTDCPP # sysrepo, libyang-cpp depends on BR2_TOOLCHAIN_GCC_AT_LEAST_10 # libyang-cpp depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libyang-cpp # std::timespec build issue depends on !BR2_TOOLCHAIN_USES_UCLIBC > + select BR2_PACKAGE_SYSREPO > + select BR2_PACKAGE_LIBYANG_CPP > + help > + C++20 RAII bindings for the sysrepo YANG datastore library. > + > + This library provides modern C++ object-oriented bindings on top Line was too long. > + of sysrepo, using RAII for automatic lifetime management. > + > + https://github.com/sysrepo/sysrepo-cpp > + > +comment "sysrepo-cpp needs a toolchain w/ C++, threads, dynamic libs, gcc >= 10" > + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \ > + BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_10 Updated this based on the dependencies. > diff --git a/package/sysrepo-cpp/sysrepo-cpp.mk b/package/sysrepo-cpp/sysrepo-cpp.mk > new file mode 100644 > index 0000000000..bbe81289b1 > --- /dev/null > +++ b/package/sysrepo-cpp/sysrepo-cpp.mk > @@ -0,0 +1,26 @@ > +################################################################################ > +# > +# sysrepo-cpp > +# > +################################################################################ > + > +SYSREPO_CPP_VERSION = 6 > +SYSREPO_CPP_SITE = $(call github,sysrepo,sysrepo-cpp,v$(SYSREPO_CPP_VERSION)) We don't align spaces. > + Excessive empty line. > +SYSREPO_CPP_LICENSE = BSD-3-Clause > +SYSREPO_CPP_LICENSE_FILES = LICENSE > + > +SYSREPO_CPP_INSTALL_STAGING = YES > +SYSREPO_CPP_INSTALL_TARGET = YES This last line is not needed, that's the default. > + > +SYSREPO_CPP_CONF_OPTS += \ > + -DCMAKE_BUILD_TYPE=Release \ Not needed, CMAKE_BUILD_TYPE is handled by the cmake-package infra. > + -DBUILD_TESTING=OFF \ Same. > + -DWITH_DOCS=OFF \ > + -DWITH_EXAMPLES=OFF > + > +SYSREPO_CPP_SUPPORTS_IN_SOURCE_BUILD = NO > + > +SYSREPO_CPP_DEPENDENCIES = sysrepo libyang-cpp > + > +$(eval $(cmake-package)) Applied with those tweaks. Thanks a lot! Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-12-28 13:25 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-12-05 10:06 [Buildroot] [PATCH 0/2] package: add libyang-cpp and sysrepo-cpp Vincent Jardin via buildroot 2025-12-05 10:06 ` [Buildroot] [PATCH 1/2] libyang-cpp: new package Vincent Jardin via buildroot 2025-12-28 13:22 ` Thomas Petazzoni via buildroot 2025-12-05 10:06 ` [Buildroot] [PATCH 2/2] package/sysrepo-cpp: " Vincent Jardin via buildroot 2025-12-28 13:24 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox