All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 2/7] sysrepo: fix a typo when installing with systemd
  2019-12-04 10:41 [Buildroot] [PATCH 0/7] Improve sysrepo support Jan Kundrát
@ 2019-12-04  9:05 ` Jan Kundrát
  2019-12-04 13:15   ` Heiko Thiery
                     ` (2 more replies)
  2019-12-04  9:35 ` [Buildroot] [PATCH 3/7] sysrepo: libnetconf2 is not needed Jan Kundrát
                   ` (6 subsequent siblings)
  7 siblings, 3 replies; 27+ messages in thread
From: Jan Kundrát @ 2019-12-04  9:05 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>
---
 package/sysrepo/sysrepo.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk
index 8676158a19..49c908d62d 100644
--- a/package/sysrepo/sysrepo.mk
+++ b/package/sysrepo/sysrepo.mk
@@ -42,7 +42,7 @@ define SYSREPO_INSTALL_INIT_SYSV
 endef
 
 define SYSREPO_INSTALL_INIT_SYSTEMD
-	mkdir -p $(TARGET_DIR)/etc/systemd/systemd/multi-user.target.wants
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
 	ln -fs ../../../../usr/lib/systemd/system/sysrepod.service \
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
 	ln -fs ../../../../usr/lib/systemd/system/sysrepo-plugind.service \
-- 
2.21.0

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

* [Buildroot] [PATCH 3/7] sysrepo: libnetconf2 is not needed
  2019-12-04 10:41 [Buildroot] [PATCH 0/7] Improve sysrepo support Jan Kundrát
  2019-12-04  9:05 ` [Buildroot] [PATCH 2/7] sysrepo: fix a typo when installing with systemd Jan Kundrát
@ 2019-12-04  9:35 ` Jan Kundrát
  2019-12-04 13:07   ` Heiko Thiery
                     ` (2 more replies)
  2019-12-04  9:37 ` [Buildroot] [PATCH 4/7] sysrepo: Optional support for C++ bindings Jan Kundrát
                   ` (5 subsequent siblings)
  7 siblings, 3 replies; 27+ messages in thread
From: Jan Kundrát @ 2019-12-04  9:35 UTC (permalink / raw)
  To: buildroot

The libnetconf2 library is a dependency of Netopeer2. Sysrepo does not
have a NETCONF server or a NETCONF client, so it does not use this
library.

Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>
---
 package/sysrepo/Config.in  | 1 -
 package/sysrepo/sysrepo.mk | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/package/sysrepo/Config.in b/package/sysrepo/Config.in
index 18a09e0c57..df7f0fd68e 100644
--- a/package/sysrepo/Config.in
+++ b/package/sysrepo/Config.in
@@ -8,7 +8,6 @@ config BR2_PACKAGE_SYSREPO
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" # host-protobuf
 	select BR2_PACKAGE_LIBAVL
 	select BR2_PACKAGE_LIBEV
-	select BR2_PACKAGE_LIBNETCONF2
 	select BR2_PACKAGE_LIBYANG
 	select BR2_PACKAGE_PCRE
 	select BR2_PACKAGE_PCRE_UCP
diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk
index 49c908d62d..216e517526 100644
--- a/package/sysrepo/sysrepo.mk
+++ b/package/sysrepo/sysrepo.mk
@@ -9,8 +9,8 @@ SYSREPO_SITE = $(call github,sysrepo,sysrepo,v$(SYSREPO_VERSION))
 SYSREPO_INSTALL_STAGING = YES
 SYSREPO_LICENSE = Apache-2.0
 SYSREPO_LICENSE_FILES = LICENSE
-SYSREPO_DEPENDENCIES = libev libnetconf2 libavl libyang pcre protobuf-c host-sysrepo
-HOST_SYSREPO_DEPENDENCIES = host-libev host-libnetconf2 host-libavl host-libyang host-pcre host-protobuf-c
+SYSREPO_DEPENDENCIES = libev libavl libyang pcre protobuf-c host-sysrepo
+HOST_SYSREPO_DEPENDENCIES = host-libev host-libavl host-libyang host-pcre host-protobuf-c
 
 SYSREPO_CONF_OPTS = \
 	-DIS_DEVELOPER_CONFIGURATION=OFF \
-- 
2.21.0

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

* [Buildroot] [PATCH 4/7] sysrepo: Optional support for C++ bindings
  2019-12-04 10:41 [Buildroot] [PATCH 0/7] Improve sysrepo support Jan Kundrát
  2019-12-04  9:05 ` [Buildroot] [PATCH 2/7] sysrepo: fix a typo when installing with systemd Jan Kundrát
  2019-12-04  9:35 ` [Buildroot] [PATCH 3/7] sysrepo: libnetconf2 is not needed Jan Kundrát
@ 2019-12-04  9:37 ` Jan Kundrát
  2019-12-08 21:59   ` Thomas Petazzoni
  2019-12-04  9:37 ` [Buildroot] [PATCH 5/7] sysrepo: Use a common repository location Jan Kundrát
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 27+ messages in thread
From: Jan Kundrát @ 2019-12-04  9:37 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>
---
 package/sysrepo/Config.in  | 6 ++++++
 package/sysrepo/sysrepo.mk | 7 +++++++
 2 files changed, 13 insertions(+)

diff --git a/package/sysrepo/Config.in b/package/sysrepo/Config.in
index df7f0fd68e..81571ff9b3 100644
--- a/package/sysrepo/Config.in
+++ b/package/sysrepo/Config.in
@@ -25,6 +25,12 @@ config BR2_PACKAGE_SYSREPO_EXAMPLES
 	help
 	  Enable sysrepo examples.
 
+config BR2_PACKAGE_SYSREPO_CPP
+	bool "Enable sysrepo C++ bindings"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+	help
+	  Build the C++ wrapper around sysrepo.
+
 endif
 
 comment "sysrepo needs a toolchain w/ C++, NPTL, dynamic library, gcc >= 4.8"
diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk
index 216e517526..113ed7a929 100644
--- a/package/sysrepo/sysrepo.mk
+++ b/package/sysrepo/sysrepo.mk
@@ -61,5 +61,12 @@ HOST_SYSREPO_CONF_OPTS = \
 	-DREPOSITORY_LOC=$(HOST_DIR)/etc/sysrepo \
 	-DSUBSCRIPTIONS_SOCKET_DIR=$(HOST_DIR)/var/run/sysrepo-subscriptions
 
+ifdef BR2_PACKAGE_SYSREPO_CPP
+	SYSREPO_DEPENDENCIES += host-swig
+	HOST_SYSREPO_DEPENDENCIES += host-swig
+	SYSREPO_CONF_OPTS += -DGEN_LANGUAGE_BINDINGS=ON -DGEN_CPP_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF -DGEN_JAVA_BINDINGS=OFF
+	HOST_SYSREPO_CONF_OPTS += -DGEN_LANGUAGE_BINDINGS=ON -DGEN_CPP_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF -DGEN_JAVA_BINDINGS=OFF
+endif
+
 $(eval $(cmake-package))
 $(eval $(host-cmake-package))
-- 
2.21.0

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

* [Buildroot] [PATCH 5/7] sysrepo: Use a common repository location
  2019-12-04 10:41 [Buildroot] [PATCH 0/7] Improve sysrepo support Jan Kundrát
                   ` (2 preceding siblings ...)
  2019-12-04  9:37 ` [Buildroot] [PATCH 4/7] sysrepo: Optional support for C++ bindings Jan Kundrát
@ 2019-12-04  9:37 ` Jan Kundrát
  2019-12-04 12:29   ` Heiko Thiery
  2019-12-08 22:03   ` Thomas Petazzoni
  2019-12-04 10:17 ` [Buildroot] [PATCH 7/7] Add me as a maintainer for the NETCONF stack Jan Kundrát
                   ` (3 subsequent siblings)
  7 siblings, 2 replies; 27+ messages in thread
From: Jan Kundrát @ 2019-12-04  9:37 UTC (permalink / raw)
  To: buildroot

Because the executables contain a hardcoded location to the on-disk
repository path, we take care to use a stable, shared location between
the host-sysrepo and sysrepo builds so that the host-side tools can
install YANG modules and have them available once the system boots on
the target.

This means that other packages, such as the upcoming netopeer2-keystored
or the netopeer2-server, or really anything else which installs YANG
modules into sysrepo, can just call `sysrepoctl` from `host-sysrepo`,
and the resulting *target* image will have that module also available.

Also make sure that we prune the notification directory. "Notifications"
in this context refer to a persistent state of NETCONF-level
notifications which are created either by `sysrepoctl` for events such
as module (de)installations, and by third-party code. There is no value
in leaking these events from the build env into the target, and killing
these causes in one fewer things to care about.

Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>
---
 package/sysrepo/sysrepo.mk | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk
index 113ed7a929..2ef64d13e2 100644
--- a/package/sysrepo/sysrepo.mk
+++ b/package/sysrepo/sysrepo.mk
@@ -58,7 +58,7 @@ HOST_SYSREPO_CONF_OPTS = \
 	-DCALL_TARGET_BINS_DIRECTLY=OFF \
 	-DBUILD_EXAMPLES=OFF \
 	-DBUILD_CPP_EXAMPLES=OFF \
-	-DREPOSITORY_LOC=$(HOST_DIR)/etc/sysrepo \
+	-DREPOSITORY_LOC=$(BASE_TARGET_DIR)/etc/sysrepo \
 	-DSUBSCRIPTIONS_SOCKET_DIR=$(HOST_DIR)/var/run/sysrepo-subscriptions
 
 ifdef BR2_PACKAGE_SYSREPO_CPP
@@ -68,5 +68,12 @@ ifdef BR2_PACKAGE_SYSREPO_CPP
 	HOST_SYSREPO_CONF_OPTS += -DGEN_LANGUAGE_BINDINGS=ON -DGEN_CPP_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF -DGEN_JAVA_BINDINGS=OFF
 endif
 
+# There's no point in keeping the logs around
+define SYSREPO_REMOVE_NOTIFICATION_LOG
+	rm -rf $(BASE_TARGET_DIR)/etc/sysrepo/data/notifications/
+endef
+
+SYSREPO_TARGET_FINALIZE_HOOKS += SYSREPO_REMOVE_NOTIFICATION_LOG
+
 $(eval $(cmake-package))
 $(eval $(host-cmake-package))
-- 
2.21.0

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

* [Buildroot] [PATCH 7/7] Add me as a maintainer for the NETCONF stack
  2019-12-04 10:41 [Buildroot] [PATCH 0/7] Improve sysrepo support Jan Kundrát
                   ` (3 preceding siblings ...)
  2019-12-04  9:37 ` [Buildroot] [PATCH 5/7] sysrepo: Use a common repository location Jan Kundrát
@ 2019-12-04 10:17 ` Jan Kundrát
  2019-12-08 22:04   ` Thomas Petazzoni
  2019-12-22 20:29   ` Peter Korsgaard
  2019-12-04 10:47 ` [Buildroot] [PATCH 1/7] libyang: Optional C++ bindings Jan Kundrát
                   ` (2 subsequent siblings)
  7 siblings, 2 replies; 27+ messages in thread
From: Jan Kundrát @ 2019-12-04 10:17 UTC (permalink / raw)
  To: buildroot

We've been using libyang, sysrepo, libnetconf2 and the Netopeer2 suite
of software for more than two years, so let's make this official.

Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>
---
 DEVELOPERS | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/DEVELOPERS b/DEVELOPERS
index a1f94df951..7dc318f013 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1165,6 +1165,9 @@ F:	configs/orangepi_lite_defconfig
 N:	Jan Kundr?t <jan.kundrat@cesnet.cz>
 F:	configs/solidrun_clearfog_defconfig
 F:	board/solidrun/clearfog/
+F:	package/libnetconf2/
+F:	package/libyang/
+F:	package/sysrepo/
 
 N:	Jan Pedersen <jp@jp-embedded.com>
 F:	package/zip/
-- 
2.21.0

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

* [Buildroot] [PATCH 0/7] Improve sysrepo support
@ 2019-12-04 10:41 Jan Kundrát
  2019-12-04  9:05 ` [Buildroot] [PATCH 2/7] sysrepo: fix a typo when installing with systemd Jan Kundrát
                   ` (7 more replies)
  0 siblings, 8 replies; 27+ messages in thread
From: Jan Kundrát @ 2019-12-04 10:41 UTC (permalink / raw)
  To: buildroot

This patch series synces up current Buildroot support (thanks for
submitting it, Heiko) with what I have been using for 2+ years. I still
have a few pending patches for Netopeer2 in my queue, please expect them
later this week.

Jan Kundr?t (7):
  libyang: Optional C++ bindings
  sysrepo: fix a typo when installing with systemd
  sysrepo: libnetconf2 is not needed
  sysrepo: Optional support for C++ bindings
  sysrepo: Use a common repository location
  libnetconf2: adjust dependencies
  Add me as a maintainer for the NETCONF stack

 DEVELOPERS                    |  3 +++
 package/libnetconf2/Config.in |  4 ++++
 package/libyang/Config.in     | 10 ++++++++++
 package/libyang/libyang.mk    |  7 +++++++
 package/sysrepo/Config.in     |  7 ++++++-
 package/sysrepo/sysrepo.mk    | 22 ++++++++++++++++++----
 6 files changed, 48 insertions(+), 5 deletions(-)

-- 
2.21.0

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

* [Buildroot] [PATCH 1/7] libyang: Optional C++ bindings
  2019-12-04 10:41 [Buildroot] [PATCH 0/7] Improve sysrepo support Jan Kundrát
                   ` (4 preceding siblings ...)
  2019-12-04 10:17 ` [Buildroot] [PATCH 7/7] Add me as a maintainer for the NETCONF stack Jan Kundrát
@ 2019-12-04 10:47 ` Jan Kundrát
  2019-12-04 13:23   ` Heiko Thiery
  2019-12-04 15:16   ` Thomas Petazzoni
  2019-12-04 10:47 ` [Buildroot] [PATCH 6/7] libnetconf2: adjust dependencies Jan Kundrát
  2019-12-08 22:05 ` [Buildroot] [PATCH 0/7] Improve sysrepo support Thomas Petazzoni
  7 siblings, 2 replies; 27+ messages in thread
From: Jan Kundrát @ 2019-12-04 10:47 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>
---
 package/libyang/Config.in  | 10 ++++++++++
 package/libyang/libyang.mk |  7 +++++++
 2 files changed, 17 insertions(+)

diff --git a/package/libyang/Config.in b/package/libyang/Config.in
index fec1160a6f..fc598af8e1 100644
--- a/package/libyang/Config.in
+++ b/package/libyang/Config.in
@@ -10,5 +10,15 @@ config BR2_PACKAGE_LIBYANG
 
 	  https://github.com/CESNET/libyang
 
+if BR2_PACKAGE_LIBYANG
+
+config BR2_PACKAGE_LIBYANG_CPP
+	bool "Enable libyang C++ bindings"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+	help
+	  Build the C++ wrapper around libyang.
+
+endif
+
 comment "libyang needs a toolchain w/ threads, dynamic library"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
diff --git a/package/libyang/libyang.mk b/package/libyang/libyang.mk
index cfec08cd16..87a1a4ef7c 100644
--- a/package/libyang/libyang.mk
+++ b/package/libyang/libyang.mk
@@ -21,5 +21,12 @@ HOST_LIBYANG_CONF_OPTS = \
 	-DENABLE_VALGRIND_TESTS=OFF \
 	-DGEN_PYTHON_BINDINGS=OFF
 
+ifdef BR2_PACKAGE_LIBYANG_CPP
+	LIBYANG_DEPENDENCIES += host-swig
+	HOST_LIBYANG_DEPENDENCIES += host-swig
+	LIBYANG_CONF_OPTS += -DGEN_LANGUAGE_BINDINGS=ON -DGEN_CPP_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF -DGEN_JAVA_BINDINGS=OFF
+	HOST_LIBYANG_CONF_OPTS += -DGEN_LANGUAGE_BINDINGS=ON -DGEN_CPP_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF -DGEN_JAVA_BINDINGS=OFF
+endif
+
 $(eval $(cmake-package))
 $(eval $(host-cmake-package))
-- 
2.21.0

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

* [Buildroot] [PATCH 6/7] libnetconf2: adjust dependencies
  2019-12-04 10:41 [Buildroot] [PATCH 0/7] Improve sysrepo support Jan Kundrát
                   ` (5 preceding siblings ...)
  2019-12-04 10:47 ` [Buildroot] [PATCH 1/7] libyang: Optional C++ bindings Jan Kundrát
@ 2019-12-04 10:47 ` Jan Kundrát
  2019-12-04 12:53   ` Heiko Thiery
  2019-12-04 15:14   ` Thomas Petazzoni
  2019-12-08 22:05 ` [Buildroot] [PATCH 0/7] Improve sysrepo support Thomas Petazzoni
  7 siblings, 2 replies; 27+ messages in thread
From: Jan Kundrát @ 2019-12-04 10:47 UTC (permalink / raw)
  To: buildroot

This package needs at least one of these two options, or both:

- openssl
- libssh + the server option

Without these, it is not possible to produce a usable library, so let's
reflect this in the dependencies.

I'm not sure that there is so much value in this; I would actually
prefer to have both of these unconditionally enabled, but the package is
already done in this way, so be it.

Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>
---
 package/libnetconf2/Config.in | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/libnetconf2/Config.in b/package/libnetconf2/Config.in
index 0a735b5ed6..6d4c9c71d1 100644
--- a/package/libnetconf2/Config.in
+++ b/package/libnetconf2/Config.in
@@ -3,6 +3,7 @@ config BR2_PACKAGE_LIBNETCONF2
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_MMU
+	depends on BR2_PACKAGE_LIBSSH_SERVER || BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_LIBYANG
 	help
 	  libnetconf2 is a NETCONF library in C intended for building
@@ -13,3 +14,6 @@ config BR2_PACKAGE_LIBNETCONF2
 comment "libnetconf2 needs a toolchain w/ threads, dynamic libraray"
 	depends on BR2_USE_MMU
 	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
+
+comment "libnetconf2 requires libssh w/ server support and/or openssl"
+	depends on !BR2_PACKAGE_LIBSSH_SERVER && !BR2_PACKAGE_OPENSSL
-- 
2.21.0

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

* [Buildroot] [PATCH 5/7] sysrepo: Use a common repository location
  2019-12-04  9:37 ` [Buildroot] [PATCH 5/7] sysrepo: Use a common repository location Jan Kundrát
@ 2019-12-04 12:29   ` Heiko Thiery
  2019-12-08 22:03   ` Thomas Petazzoni
  1 sibling, 0 replies; 27+ messages in thread
From: Heiko Thiery @ 2019-12-04 12:29 UTC (permalink / raw)
  To: buildroot

Hi Jan,

> -----Urspr?ngliche Nachricht-----
> Von: Jan Kundr?t [mailto:jan.kundrat at cesnet.cz]
> Gesendet: Mittwoch, 4. Dezember 2019 10:38
> An: buildroot at buildroot.org
> Cc: Heiko Thiery; Fabrice Fontaine
> Betreff: [PATCH 5/7] sysrepo: Use a common repository location
> 
> Because the executables contain a hardcoded location to the on-disk repository
> path, we take care to use a stable, shared location between the host-sysrepo
> and sysrepo builds so that the host-side tools can install YANG modules and
> have them available once the system boots on the target.
> 
> This means that other packages, such as the upcoming netopeer2-keystored or
> the netopeer2-server, or really anything else which installs YANG modules into
> sysrepo, can just call `sysrepoctl` from `host-sysrepo`, and the resulting
> *target* image will have that module also available.
> 
> Also make sure that we prune the notification directory. "Notifications"
> in this context refer to a persistent state of NETCONF-level notifications which
> are created either by `sysrepoctl` for events such as module (de)installations,
> and by third-party code. There is no value in leaking these events from the
> build env into the target, and killing these causes in one fewer things to care
> about.
> 
> Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>

Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>

> ---
>  package/sysrepo/sysrepo.mk | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk index
> 113ed7a929..2ef64d13e2 100644
> --- a/package/sysrepo/sysrepo.mk
> +++ b/package/sysrepo/sysrepo.mk
> @@ -58,7 +58,7 @@ HOST_SYSREPO_CONF_OPTS = \
>  	-DCALL_TARGET_BINS_DIRECTLY=OFF \
>  	-DBUILD_EXAMPLES=OFF \
>  	-DBUILD_CPP_EXAMPLES=OFF \
> -	-DREPOSITORY_LOC=$(HOST_DIR)/etc/sysrepo \
> +	-DREPOSITORY_LOC=$(BASE_TARGET_DIR)/etc/sysrepo \
>  	-DSUBSCRIPTIONS_SOCKET_DIR=$(HOST_DIR)/var/run/sysrepo-
> subscriptions
> 
>  ifdef BR2_PACKAGE_SYSREPO_CPP
> @@ -68,5 +68,12 @@ ifdef BR2_PACKAGE_SYSREPO_CPP
>  	HOST_SYSREPO_CONF_OPTS += -DGEN_LANGUAGE_BINDINGS=ON -
> DGEN_CPP_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF -
> DGEN_JAVA_BINDINGS=OFF  endif
> 
> +# There's no point in keeping the logs around define
> +SYSREPO_REMOVE_NOTIFICATION_LOG
> +	rm -rf $(BASE_TARGET_DIR)/etc/sysrepo/data/notifications/
> +endef
> +
> +SYSREPO_TARGET_FINALIZE_HOOKS +=
> SYSREPO_REMOVE_NOTIFICATION_LOG
> +
>  $(eval $(cmake-package))
>  $(eval $(host-cmake-package))
> --
> 2.21.0
> 

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

* [Buildroot] [PATCH 6/7] libnetconf2: adjust dependencies
  2019-12-04 10:47 ` [Buildroot] [PATCH 6/7] libnetconf2: adjust dependencies Jan Kundrát
@ 2019-12-04 12:53   ` Heiko Thiery
  2019-12-04 13:00     ` Jan Kundrát
  2019-12-04 15:14   ` Thomas Petazzoni
  1 sibling, 1 reply; 27+ messages in thread
From: Heiko Thiery @ 2019-12-04 12:53 UTC (permalink / raw)
  To: buildroot

Hi Jan,

> -----Urspr?ngliche Nachricht-----
> Von: Jan Kundr?t [mailto:jan.kundrat at cesnet.cz]
> Gesendet: Freitag, 17. M?rz 2017 19:30
> An: buildroot at buildroot.org
> Cc: Heiko Thiery; Fabrice Fontaine
> Betreff: [PATCH 6/7] libnetconf2: adjust dependencies
> 
> This package needs at least one of these two options, or both:
> 
> - openssl
> - libssh + the server option
> 
> Without these, it is not possible to produce a usable library, so let's reflect this
> in the dependencies.
> 
> I'm not sure that there is so much value in this; I would actually prefer to have
> both of these unconditionally enabled, but the package is already done in this
> way, so be it.

The intention was to be able to select the SSH/TLS support by providing/selecting the
dependent package.

Do you think that is not reasonable?

> Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>
> ---
>  package/libnetconf2/Config.in | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/package/libnetconf2/Config.in b/package/libnetconf2/Config.in
> index 0a735b5ed6..6d4c9c71d1 100644
> --- a/package/libnetconf2/Config.in
> +++ b/package/libnetconf2/Config.in
> @@ -3,6 +3,7 @@ config BR2_PACKAGE_LIBNETCONF2
>  	depends on BR2_TOOLCHAIN_HAS_THREADS
>  	depends on !BR2_STATIC_LIBS
>  	depends on BR2_USE_MMU
> +	depends on BR2_PACKAGE_LIBSSH_SERVER || BR2_PACKAGE_OPENSSL
>  	select BR2_PACKAGE_LIBYANG
>  	help
>  	  libnetconf2 is a NETCONF library in C intended for building @@ -13,3
> +14,6 @@ config BR2_PACKAGE_LIBNETCONF2  comment "libnetconf2 needs a
> toolchain w/ threads, dynamic libraray"
>  	depends on BR2_USE_MMU
>  	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
> +
> +comment "libnetconf2 requires libssh w/ server support and/or openssl"
> +	depends on !BR2_PACKAGE_LIBSSH_SERVER &&
> !BR2_PACKAGE_OPENSSL
> --
> 2.21.0
> 

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

* [Buildroot] [PATCH 6/7] libnetconf2: adjust dependencies
  2019-12-04 12:53   ` Heiko Thiery
@ 2019-12-04 13:00     ` Jan Kundrát
  2019-12-04 13:11       ` Heiko Thiery
  0 siblings, 1 reply; 27+ messages in thread
From: Jan Kundrát @ 2019-12-04 13:00 UTC (permalink / raw)
  To: buildroot

> The intention was to be able to select the SSH/TLS support by 
> providing/selecting the
> dependent package.
>
> Do you think that is not reasonable?

I think that the code in current buildroot does not enforce this. I.e., in 
case I have neither openssl nor libssh+server already selected, I will end 
up with a libnetconf2 which cannot do anything. I think that that is 
confusing.

There are other options, of course:

- We could add nested suboptions below BR2_PACKAGE_LIBNETCONF2 which would 
pick  the corresponding depenency. That way, people would at least have a 
hint that they should drill down within KConfig and notice that there are 
two options. Both of these could be checked by default. Disadvantage: if 
the libssh+server or openssl gets enabled later, there's a risk that these 
two get out of sync.

- We coud just add a hard dependency on both. That IMHO also makes sense 
because I have a feeling that the majority of people actually want both 
ways.

Jan

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

* [Buildroot] [PATCH 3/7] sysrepo: libnetconf2 is not needed
  2019-12-04  9:35 ` [Buildroot] [PATCH 3/7] sysrepo: libnetconf2 is not needed Jan Kundrát
@ 2019-12-04 13:07   ` Heiko Thiery
  2019-12-08 21:57   ` Thomas Petazzoni
  2019-12-22 20:29   ` Peter Korsgaard
  2 siblings, 0 replies; 27+ messages in thread
From: Heiko Thiery @ 2019-12-04 13:07 UTC (permalink / raw)
  To: buildroot



> -----Urspr?ngliche Nachricht-----
> Von: buildroot [mailto:buildroot-bounces at busybox.net] Im Auftrag von Jan
> Kundr?t
> Gesendet: Mittwoch, 4. Dezember 2019 10:35
> An: buildroot at buildroot.org
> Cc: Heiko Thiery; Fabrice Fontaine
> Betreff: [Buildroot] [PATCH 3/7] sysrepo: libnetconf2 is not needed
> 
> The libnetconf2 library is a dependency of Netopeer2. Sysrepo does not have a
> NETCONF server or a NETCONF client, so it does not use this library.
> 
> Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>

Acked-by: Heiko Thiery <heiko.thiery@kontron.com>

> ---
>  package/sysrepo/Config.in  | 1 -
>  package/sysrepo/sysrepo.mk | 4 ++--
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/package/sysrepo/Config.in b/package/sysrepo/Config.in index
> 18a09e0c57..df7f0fd68e 100644
> --- a/package/sysrepo/Config.in
> +++ b/package/sysrepo/Config.in
> @@ -8,7 +8,6 @@ config BR2_PACKAGE_SYSREPO
>  	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" #
> host-protobuf
>  	select BR2_PACKAGE_LIBAVL
>  	select BR2_PACKAGE_LIBEV
> -	select BR2_PACKAGE_LIBNETCONF2
>  	select BR2_PACKAGE_LIBYANG
>  	select BR2_PACKAGE_PCRE
>  	select BR2_PACKAGE_PCRE_UCP
> diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk index
> 49c908d62d..216e517526 100644
> --- a/package/sysrepo/sysrepo.mk
> +++ b/package/sysrepo/sysrepo.mk
> @@ -9,8 +9,8 @@ SYSREPO_SITE = $(call
> github,sysrepo,sysrepo,v$(SYSREPO_VERSION))
>  SYSREPO_INSTALL_STAGING = YES
>  SYSREPO_LICENSE = Apache-2.0
>  SYSREPO_LICENSE_FILES = LICENSE
> -SYSREPO_DEPENDENCIES = libev libnetconf2 libavl libyang pcre protobuf-c
> host-sysrepo -HOST_SYSREPO_DEPENDENCIES = host-libev host-libnetconf2
> host-libavl host-libyang host-pcre host-protobuf-c
> +SYSREPO_DEPENDENCIES = libev libavl libyang pcre protobuf-c
> +host-sysrepo HOST_SYSREPO_DEPENDENCIES = host-libev host-libavl
> +host-libyang host-pcre host-protobuf-c
> 
>  SYSREPO_CONF_OPTS = \
>  	-DIS_DEVELOPER_CONFIGURATION=OFF \
> --
> 2.21.0
> 
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 6/7] libnetconf2: adjust dependencies
  2019-12-04 13:00     ` Jan Kundrát
@ 2019-12-04 13:11       ` Heiko Thiery
  0 siblings, 0 replies; 27+ messages in thread
From: Heiko Thiery @ 2019-12-04 13:11 UTC (permalink / raw)
  To: buildroot



> -----Urspr?ngliche Nachricht-----
> Von: Jan Kundr?t [mailto:jan.kundrat at cesnet.cz]
> Gesendet: Mittwoch, 4. Dezember 2019 14:01
> An: Heiko Thiery
> Cc: buildroot at buildroot.org; Fabrice Fontaine
> Betreff: Re: [Buildroot] [PATCH 6/7] libnetconf2: adjust dependencies
> 
> > The intention was to be able to select the SSH/TLS support by
> > providing/selecting the dependent package.
> >
> > Do you think that is not reasonable?
> 
> I think that the code in current buildroot does not enforce this. I.e., in case I
> have neither openssl nor libssh+server already selected, I will end up with a
> libnetconf2 which cannot do anything. I think that that is confusing.
> 
> There are other options, of course:
> 
> - We could add nested suboptions below BR2_PACKAGE_LIBNETCONF2 which
> would pick  the corresponding depenency. That way, people would at least have
> a hint that they should drill down within KConfig and notice that there are two
> options. Both of these could be checked by default. Disadvantage: if the
> libssh+server or openssl gets enabled later, there's a risk that these two get out
> of sync.
> 
> - We coud just add a hard dependency on both. That IMHO also makes sense
> because I have a feeling that the majority of people actually want both ways.

Just tried to add you're patch and see that with that at least the package testing (utils/test-pkg -p sysrep) will not work without providing a config-snippet that enables one of them (ssl or ssh).

@thomas: is that a valid way (package cannot be tested without config-snippet) or do we have to select the required dependencies to have the test abilitiy?

> Jan

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

* [Buildroot] [PATCH 2/7] sysrepo: fix a typo when installing with systemd
  2019-12-04  9:05 ` [Buildroot] [PATCH 2/7] sysrepo: fix a typo when installing with systemd Jan Kundrát
@ 2019-12-04 13:15   ` Heiko Thiery
  2019-12-08 21:51   ` Thomas Petazzoni
  2019-12-22 20:28   ` Peter Korsgaard
  2 siblings, 0 replies; 27+ messages in thread
From: Heiko Thiery @ 2019-12-04 13:15 UTC (permalink / raw)
  To: buildroot



> -----Urspr?ngliche Nachricht-----
> Von: buildroot [mailto:buildroot-bounces at busybox.net] Im Auftrag von Jan
> Kundr?t
> Gesendet: Mittwoch, 4. Dezember 2019 10:06
> An: buildroot at buildroot.org
> Cc: Heiko Thiery; Fabrice Fontaine
> Betreff: [Buildroot] [PATCH 2/7] sysrepo: fix a typo when installing with
> systemd
> 
> Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>

Acked-by: Heiko Thiery <heiko.thiery@kontron.com

> ---
>  package/sysrepo/sysrepo.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk index
> 8676158a19..49c908d62d 100644
> --- a/package/sysrepo/sysrepo.mk
> +++ b/package/sysrepo/sysrepo.mk
> @@ -42,7 +42,7 @@ define SYSREPO_INSTALL_INIT_SYSV  endef
> 
>  define SYSREPO_INSTALL_INIT_SYSTEMD
> -	mkdir -p $(TARGET_DIR)/etc/systemd/systemd/multi-user.target.wants
> +	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
>  	ln -fs ../../../../usr/lib/systemd/system/sysrepod.service \
>  		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
>  	ln -fs ../../../../usr/lib/systemd/system/sysrepo-plugind.service \
> --
> 2.21.0
> 
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 1/7] libyang: Optional C++ bindings
  2019-12-04 10:47 ` [Buildroot] [PATCH 1/7] libyang: Optional C++ bindings Jan Kundrát
@ 2019-12-04 13:23   ` Heiko Thiery
  2019-12-04 15:16   ` Thomas Petazzoni
  1 sibling, 0 replies; 27+ messages in thread
From: Heiko Thiery @ 2019-12-04 13:23 UTC (permalink / raw)
  To: buildroot

Hi,

> -----Urspr?ngliche Nachricht-----
> Von: buildroot [mailto:buildroot-bounces at busybox.net] Im Auftrag von Jan
> Kundr?t
> Gesendet: Mittwoch, 4. Oktober 2017 07:49
> An: buildroot at buildroot.org
> Cc: Heiko Thiery; Fabrice Fontaine
> Betreff: [Buildroot] [PATCH 1/7] libyang: Optional C++ bindings
> 
> Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>
> ---
>  package/libyang/Config.in  | 10 ++++++++++  package/libyang/libyang.mk |  7
> +++++++
>  2 files changed, 17 insertions(+)
> 
> diff --git a/package/libyang/Config.in b/package/libyang/Config.in index
> fec1160a6f..fc598af8e1 100644
> --- a/package/libyang/Config.in
> +++ b/package/libyang/Config.in
> @@ -10,5 +10,15 @@ config BR2_PACKAGE_LIBYANG
> 
>  	  https://github.com/CESNET/libyang
> 
> +if BR2_PACKAGE_LIBYANG
> +
> +config BR2_PACKAGE_LIBYANG_CPP
> +	bool "Enable libyang C++ bindings"
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
> +	help
> +	  Build the C++ wrapper around libyang.
> +
> +endif
> +
>  comment "libyang needs a toolchain w/ threads, dynamic library"
>  	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff
> --git a/package/libyang/libyang.mk b/package/libyang/libyang.mk index
> cfec08cd16..87a1a4ef7c 100644
> --- a/package/libyang/libyang.mk
> +++ b/package/libyang/libyang.mk
> @@ -21,5 +21,12 @@ HOST_LIBYANG_CONF_OPTS = \
>  	-DENABLE_VALGRIND_TESTS=OFF \
>  	-DGEN_PYTHON_BINDINGS=OFF
> 
> +ifdef BR2_PACKAGE_LIBYANG_CPP
> +	LIBYANG_DEPENDENCIES += host-swig
> +	HOST_LIBYANG_DEPENDENCIES += host-swig
> +	LIBYANG_CONF_OPTS += -DGEN_LANGUAGE_BINDINGS=ON -DGEN_CPP_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF -DGEN_JAVA_BINDINGS=OFF

GEN_PYTHON_BINDINGS=OFF is already set for target and host config above.  Should we disable JAVA bindings there also by default?

> +	HOST_LIBYANG_CONF_OPTS += -DGEN_LANGUAGE_BINDINGS=ON -DGEN_CPP_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF -DGEN_JAVA_BINDINGS=OFF
> +endif
> +
>  $(eval $(cmake-package))
>  $(eval $(host-cmake-package))
> --
> 2.21.0
> 
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 6/7] libnetconf2: adjust dependencies
  2019-12-04 10:47 ` [Buildroot] [PATCH 6/7] libnetconf2: adjust dependencies Jan Kundrát
  2019-12-04 12:53   ` Heiko Thiery
@ 2019-12-04 15:14   ` Thomas Petazzoni
  1 sibling, 0 replies; 27+ messages in thread
From: Thomas Petazzoni @ 2019-12-04 15:14 UTC (permalink / raw)
  To: buildroot

On Fri, 17 Mar 2017 19:29:53 +0100
Jan Kundr?t <jan.kundrat@cesnet.cz> wrote:

> This package needs at least one of these two options, or both:
> 
> - openssl
> - libssh + the server option
> 
> Without these, it is not possible to produce a usable library, so let's
> reflect this in the dependencies.
> 
> I'm not sure that there is so much value in this; I would actually
> prefer to have both of these unconditionally enabled, but the package is
> already done in this way, so be it.
> 
> Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>
> ---
>  package/libnetconf2/Config.in | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/package/libnetconf2/Config.in b/package/libnetconf2/Config.in
> index 0a735b5ed6..6d4c9c71d1 100644
> --- a/package/libnetconf2/Config.in
> +++ b/package/libnetconf2/Config.in
> @@ -3,6 +3,7 @@ config BR2_PACKAGE_LIBNETCONF2
>  	depends on BR2_TOOLCHAIN_HAS_THREADS
>  	depends on !BR2_STATIC_LIBS
>  	depends on BR2_USE_MMU
> +	depends on BR2_PACKAGE_LIBSSH_SERVER || BR2_PACKAGE_OPENSSL

If one of these is really mandatory for the package to work in any
meaningful way, then:

	select ONE_OPTION if !SECOND_OPTION

is preferred, so that it is more natural for users, and you don't need
the Config.in comment.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 1/7] libyang: Optional C++ bindings
  2019-12-04 10:47 ` [Buildroot] [PATCH 1/7] libyang: Optional C++ bindings Jan Kundrát
  2019-12-04 13:23   ` Heiko Thiery
@ 2019-12-04 15:16   ` Thomas Petazzoni
  1 sibling, 0 replies; 27+ messages in thread
From: Thomas Petazzoni @ 2019-12-04 15:16 UTC (permalink / raw)
  To: buildroot

On Wed, 4 Oct 2017 07:48:35 +0200
Jan Kundr?t <jan.kundrat@cesnet.cz> wrote:

> +if BR2_PACKAGE_LIBYANG
> +
> +config BR2_PACKAGE_LIBYANG_CPP
> +	bool "Enable libyang C++ bindings"

Just:

	bool "enable C++ bindings"

no need to repeat the package name.

> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11

I suppose you also need:

	depends on BR2_INSTALL_LIBSTDCPP

> +	help
> +	  Build the C++ wrapper around libyang.

You also need a Config.in comment to document the C++ and gcc >= 4.8
dependencies.

> diff --git a/package/libyang/libyang.mk b/package/libyang/libyang.mk
> index cfec08cd16..87a1a4ef7c 100644
> --- a/package/libyang/libyang.mk
> +++ b/package/libyang/libyang.mk
> @@ -21,5 +21,12 @@ HOST_LIBYANG_CONF_OPTS = \
>  	-DENABLE_VALGRIND_TESTS=OFF \
>  	-DGEN_PYTHON_BINDINGS=OFF
>  
> +ifdef BR2_PACKAGE_LIBYANG_CPP

should be:

ifeq ($(BR2_PACKAGE_LIBYANG_CPP),y)

> +	LIBYANG_DEPENDENCIES += host-swig
> +	HOST_LIBYANG_DEPENDENCIES += host-swig
> +	LIBYANG_CONF_OPTS += -DGEN_LANGUAGE_BINDINGS=ON -DGEN_CPP_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF -DGEN_JAVA_BINDINGS=OFF
> +	HOST_LIBYANG_CONF_OPTS += -DGEN_LANGUAGE_BINDINGS=ON -DGEN_CPP_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF -DGEN_JAVA_BINDINGS=OFF

This is not good: BR2_PACKAGE_LIBYANG_CPP is a target configuration
option, it should not affect how the host variant of libyang is built.

Unless you need the C++ bindings in host-libyang, just make
BR2_PACKAGE_LIBYANG_CPP=y enable the C++ bindings in the target package.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 2/7] sysrepo: fix a typo when installing with systemd
  2019-12-04  9:05 ` [Buildroot] [PATCH 2/7] sysrepo: fix a typo when installing with systemd Jan Kundrát
  2019-12-04 13:15   ` Heiko Thiery
@ 2019-12-08 21:51   ` Thomas Petazzoni
  2019-12-22 20:28   ` Peter Korsgaard
  2 siblings, 0 replies; 27+ messages in thread
From: Thomas Petazzoni @ 2019-12-08 21:51 UTC (permalink / raw)
  To: buildroot

On Wed, 4 Dec 2019 10:05:47 +0100
Jan Kundr?t <jan.kundrat@cesnet.cz> wrote:

> Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>
> ---
>  package/sysrepo/sysrepo.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

The commit title prefix should have been "package/sysrepo:", so I fixed
that and applied. Thanks Jan!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 3/7] sysrepo: libnetconf2 is not needed
  2019-12-04  9:35 ` [Buildroot] [PATCH 3/7] sysrepo: libnetconf2 is not needed Jan Kundrát
  2019-12-04 13:07   ` Heiko Thiery
@ 2019-12-08 21:57   ` Thomas Petazzoni
  2019-12-22 20:29   ` Peter Korsgaard
  2 siblings, 0 replies; 27+ messages in thread
From: Thomas Petazzoni @ 2019-12-08 21:57 UTC (permalink / raw)
  To: buildroot

On Wed, 4 Dec 2019 10:35:27 +0100
Jan Kundr?t <jan.kundrat@cesnet.cz> wrote:

> The libnetconf2 library is a dependency of Netopeer2. Sysrepo does not
> have a NETCONF server or a NETCONF client, so it does not use this
> library.
> 
> Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>

There was a line:

	depends on BR2_USE_MMU # libnetconf2

which no longer made sense since sysrepo no longer selects libnetconf2.
However, a look at the sysrepo code shows that it is using fork(), and
therefore I changed the line to just:

	depends on BR2_USE_MMU

I also fixed the commit title to use "package/sysrepo:" as the prefix.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 4/7] sysrepo: Optional support for C++ bindings
  2019-12-04  9:37 ` [Buildroot] [PATCH 4/7] sysrepo: Optional support for C++ bindings Jan Kundrát
@ 2019-12-08 21:59   ` Thomas Petazzoni
  0 siblings, 0 replies; 27+ messages in thread
From: Thomas Petazzoni @ 2019-12-08 21:59 UTC (permalink / raw)
  To: buildroot

On Wed, 4 Dec 2019 10:37:14 +0100
Jan Kundr?t <jan.kundrat@cesnet.cz> wrote:

> Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>
> ---
>  package/sysrepo/Config.in  | 6 ++++++
>  package/sysrepo/sysrepo.mk | 7 +++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/package/sysrepo/Config.in b/package/sysrepo/Config.in
> index df7f0fd68e..81571ff9b3 100644
> --- a/package/sysrepo/Config.in
> +++ b/package/sysrepo/Config.in
> @@ -25,6 +25,12 @@ config BR2_PACKAGE_SYSREPO_EXAMPLES
>  	help
>  	  Enable sysrepo examples.
>  
> +config BR2_PACKAGE_SYSREPO_CPP
> +	bool "Enable sysrepo C++ bindings"
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
> +	help
> +	  Build the C++ wrapper around sysrepo.
> +
>  endif
>  
>  comment "sysrepo needs a toolchain w/ C++, NPTL, dynamic library, gcc >= 4.8"
> diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk
> index 216e517526..113ed7a929 100644
> --- a/package/sysrepo/sysrepo.mk
> +++ b/package/sysrepo/sysrepo.mk
> @@ -61,5 +61,12 @@ HOST_SYSREPO_CONF_OPTS = \
>  	-DREPOSITORY_LOC=$(HOST_DIR)/etc/sysrepo \
>  	-DSUBSCRIPTIONS_SOCKET_DIR=$(HOST_DIR)/var/run/sysrepo-subscriptions
>  
> +ifdef BR2_PACKAGE_SYSREPO_CPP

ifeq ($(BR2_PACKAGE_SYSREPO_CPP),y)

> +	SYSREPO_DEPENDENCIES += host-swig
> +	HOST_SYSREPO_DEPENDENCIES += host-swig
> +	SYSREPO_CONF_OPTS += -DGEN_LANGUAGE_BINDINGS=ON -DGEN_CPP_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF -DGEN_JAVA_BINDINGS=OFF
> +	HOST_SYSREPO_CONF_OPTS += -DGEN_LANGUAGE_BINDINGS=ON -DGEN_CPP_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF -DGEN_JAVA_BINDINGS=OFF

This has the same problem as your patch on libyang C++ bindings:
BR2_PACKAGE_SYSREPO_CPP is an option that affects the target package,
so it should not have an effect on the host package.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 5/7] sysrepo: Use a common repository location
  2019-12-04  9:37 ` [Buildroot] [PATCH 5/7] sysrepo: Use a common repository location Jan Kundrát
  2019-12-04 12:29   ` Heiko Thiery
@ 2019-12-08 22:03   ` Thomas Petazzoni
  1 sibling, 0 replies; 27+ messages in thread
From: Thomas Petazzoni @ 2019-12-08 22:03 UTC (permalink / raw)
  To: buildroot

On Wed, 4 Dec 2019 10:37:37 +0100
Jan Kundr?t <jan.kundrat@cesnet.cz> wrote:

> diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk
> index 113ed7a929..2ef64d13e2 100644
> --- a/package/sysrepo/sysrepo.mk
> +++ b/package/sysrepo/sysrepo.mk
> @@ -58,7 +58,7 @@ HOST_SYSREPO_CONF_OPTS = \
>  	-DCALL_TARGET_BINS_DIRECTLY=OFF \
>  	-DBUILD_EXAMPLES=OFF \
>  	-DBUILD_CPP_EXAMPLES=OFF \
> -	-DREPOSITORY_LOC=$(HOST_DIR)/etc/sysrepo \
> +	-DREPOSITORY_LOC=$(BASE_TARGET_DIR)/etc/sysrepo \

I suppose you're using $(BASE_TARGET_DIR) here instead of $(TARGET_DIR)
to work around issues with per-package directory support ?

Unfortunately, using $(BASE_TARGET_DIR) is not really a good option.
Indeed, if any host-sysrepo tool gets used during the build, it will
point to $(BASE_TARGET_DIR), which is with per-package directory
support enabled, is completely empty during the build. It only gets
populated at the very end of the build, in target-finalize.

With per-package directory, we cannot have a hardcoded path to the
target, it really needs to be dynamic. Can the sysrepoctl tool use an
environment variable for example ?

> +# There's no point in keeping the logs around
> +define SYSREPO_REMOVE_NOTIFICATION_LOG
> +	rm -rf $(BASE_TARGET_DIR)/etc/sysrepo/data/notifications/

Here, you can definitely use $(TARGET_DIR), because when the
target-finalize hooks are executed, TARGET_DIR is defined to
BASE_TARGET_DIR.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 7/7] Add me as a maintainer for the NETCONF stack
  2019-12-04 10:17 ` [Buildroot] [PATCH 7/7] Add me as a maintainer for the NETCONF stack Jan Kundrát
@ 2019-12-08 22:04   ` Thomas Petazzoni
  2019-12-22 20:29   ` Peter Korsgaard
  1 sibling, 0 replies; 27+ messages in thread
From: Thomas Petazzoni @ 2019-12-08 22:04 UTC (permalink / raw)
  To: buildroot

On Wed, 4 Dec 2019 11:17:27 +0100
Jan Kundr?t <jan.kundrat@cesnet.cz> wrote:

> We've been using libyang, sysrepo, libnetconf2 and the Netopeer2 suite
> of software for more than two years, so let's make this official.
> 
> Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>
> ---
>  DEVELOPERS | 3 +++
>  1 file changed, 3 insertions(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 0/7] Improve sysrepo support
  2019-12-04 10:41 [Buildroot] [PATCH 0/7] Improve sysrepo support Jan Kundrát
                   ` (6 preceding siblings ...)
  2019-12-04 10:47 ` [Buildroot] [PATCH 6/7] libnetconf2: adjust dependencies Jan Kundrát
@ 2019-12-08 22:05 ` Thomas Petazzoni
  2019-12-08 22:11   ` Jan Kundrát
  7 siblings, 1 reply; 27+ messages in thread
From: Thomas Petazzoni @ 2019-12-08 22:05 UTC (permalink / raw)
  To: buildroot

Hello Jan,

On Wed, 4 Dec 2019 11:41:44 +0100
Jan Kundr?t <jan.kundrat@cesnet.cz> wrote:

> Jan Kundr?t (7):
>   libyang: Optional C++ bindings
>   sysrepo: fix a typo when installing with systemd
>   sysrepo: libnetconf2 is not needed
>   sysrepo: Optional support for C++ bindings
>   sysrepo: Use a common repository location
>   libnetconf2: adjust dependencies
>   Add me as a maintainer for the NETCONF stack

I have applied some of the patches in this series (patches 2, 3 and 7),
but the other patches (1, 4, 5 and 6) had some comments. Could you take
them into account and send an updated series ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 0/7] Improve sysrepo support
  2019-12-08 22:05 ` [Buildroot] [PATCH 0/7] Improve sysrepo support Thomas Petazzoni
@ 2019-12-08 22:11   ` Jan Kundrát
  0 siblings, 0 replies; 27+ messages in thread
From: Jan Kundrát @ 2019-12-08 22:11 UTC (permalink / raw)
  To: buildroot

> I have applied some of the patches in this series (patches 2, 3 and 7),
> but the other patches (1, 4, 5 and 6) had some comments. Could you take
> them into account and send an updated series ?

Thanks for your feedback. I'll send an update in a day or two.

Jan

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

* [Buildroot] [PATCH 2/7] sysrepo: fix a typo when installing with systemd
  2019-12-04  9:05 ` [Buildroot] [PATCH 2/7] sysrepo: fix a typo when installing with systemd Jan Kundrát
  2019-12-04 13:15   ` Heiko Thiery
  2019-12-08 21:51   ` Thomas Petazzoni
@ 2019-12-22 20:28   ` Peter Korsgaard
  2 siblings, 0 replies; 27+ messages in thread
From: Peter Korsgaard @ 2019-12-22 20:28 UTC (permalink / raw)
  To: buildroot

>>>>> "Jan" == Jan Kundr?t <jan.kundrat@cesnet.cz> writes:

 > Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>

Committed to 2019.11.x, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 3/7] sysrepo: libnetconf2 is not needed
  2019-12-04  9:35 ` [Buildroot] [PATCH 3/7] sysrepo: libnetconf2 is not needed Jan Kundrát
  2019-12-04 13:07   ` Heiko Thiery
  2019-12-08 21:57   ` Thomas Petazzoni
@ 2019-12-22 20:29   ` Peter Korsgaard
  2 siblings, 0 replies; 27+ messages in thread
From: Peter Korsgaard @ 2019-12-22 20:29 UTC (permalink / raw)
  To: buildroot

>>>>> "Jan" == Jan Kundr?t <jan.kundrat@cesnet.cz> writes:

 > The libnetconf2 library is a dependency of Netopeer2. Sysrepo does not
 > have a NETCONF server or a NETCONF client, so it does not use this
 > library.

 > Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>

Committed to 2019.11.x, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 7/7] Add me as a maintainer for the NETCONF stack
  2019-12-04 10:17 ` [Buildroot] [PATCH 7/7] Add me as a maintainer for the NETCONF stack Jan Kundrát
  2019-12-08 22:04   ` Thomas Petazzoni
@ 2019-12-22 20:29   ` Peter Korsgaard
  1 sibling, 0 replies; 27+ messages in thread
From: Peter Korsgaard @ 2019-12-22 20:29 UTC (permalink / raw)
  To: buildroot

>>>>> "Jan" == Jan Kundr?t <jan.kundrat@cesnet.cz> writes:

 > We've been using libyang, sysrepo, libnetconf2 and the Netopeer2 suite
 > of software for more than two years, so let's make this official.

 > Signed-off-by: Jan Kundr?t <jan.kundrat@cesnet.cz>

Committed to 2019.11.x, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2019-12-22 20:29 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-04 10:41 [Buildroot] [PATCH 0/7] Improve sysrepo support Jan Kundrát
2019-12-04  9:05 ` [Buildroot] [PATCH 2/7] sysrepo: fix a typo when installing with systemd Jan Kundrát
2019-12-04 13:15   ` Heiko Thiery
2019-12-08 21:51   ` Thomas Petazzoni
2019-12-22 20:28   ` Peter Korsgaard
2019-12-04  9:35 ` [Buildroot] [PATCH 3/7] sysrepo: libnetconf2 is not needed Jan Kundrát
2019-12-04 13:07   ` Heiko Thiery
2019-12-08 21:57   ` Thomas Petazzoni
2019-12-22 20:29   ` Peter Korsgaard
2019-12-04  9:37 ` [Buildroot] [PATCH 4/7] sysrepo: Optional support for C++ bindings Jan Kundrát
2019-12-08 21:59   ` Thomas Petazzoni
2019-12-04  9:37 ` [Buildroot] [PATCH 5/7] sysrepo: Use a common repository location Jan Kundrát
2019-12-04 12:29   ` Heiko Thiery
2019-12-08 22:03   ` Thomas Petazzoni
2019-12-04 10:17 ` [Buildroot] [PATCH 7/7] Add me as a maintainer for the NETCONF stack Jan Kundrát
2019-12-08 22:04   ` Thomas Petazzoni
2019-12-22 20:29   ` Peter Korsgaard
2019-12-04 10:47 ` [Buildroot] [PATCH 1/7] libyang: Optional C++ bindings Jan Kundrát
2019-12-04 13:23   ` Heiko Thiery
2019-12-04 15:16   ` Thomas Petazzoni
2019-12-04 10:47 ` [Buildroot] [PATCH 6/7] libnetconf2: adjust dependencies Jan Kundrát
2019-12-04 12:53   ` Heiko Thiery
2019-12-04 13:00     ` Jan Kundrát
2019-12-04 13:11       ` Heiko Thiery
2019-12-04 15:14   ` Thomas Petazzoni
2019-12-08 22:05 ` [Buildroot] [PATCH 0/7] Improve sysrepo support Thomas Petazzoni
2019-12-08 22:11   ` Jan Kundrát

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.