All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/9] package/libev: use host-autotools-package macro
@ 2019-10-01 14:30 heiko.thiery at gmail.com
  2019-10-01 14:30 ` [Buildroot] [PATCH 2/9] package/libssh: " heiko.thiery at gmail.com
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-01 14:30 UTC (permalink / raw)
  To: buildroot

From: Heiko Thiery <heiko.thiery@kontron.com>

Enable host support for the lib because the package host-sysrepo (depends on
package libnetconf2) is needed by package netopeer2keystored.

Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>
---
 package/libev/libev.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/libev/libev.mk b/package/libev/libev.mk
index 2b2d5db004..38b0530f62 100644
--- a/package/libev/libev.mk
+++ b/package/libev/libev.mk
@@ -18,3 +18,4 @@ endef
 LIBEV_POST_PATCH_HOOKS += LIBEV_DISABLE_EVENT_H_INSTALL
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
-- 
2.20.1

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

* [Buildroot] [PATCH 2/9] package/libssh: use host-autotools-package macro
  2019-10-01 14:30 [Buildroot] [PATCH 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
@ 2019-10-01 14:30 ` heiko.thiery at gmail.com
  2019-10-01 14:30 ` [Buildroot] [PATCH 3/9] package/libredblack: add package heiko.thiery at gmail.com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 18+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-01 14:30 UTC (permalink / raw)
  To: buildroot

From: Heiko Thiery <heiko.thiery@kontron.com>

Enable host support for the lib because the package host-sysrepo (depends on
package libnetconf2) is needed by package netopeer2keystored.

Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>
---
 package/libssh/libssh.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/libssh/libssh.mk b/package/libssh/libssh.mk
index b8464ed2bf..b90c52a2f3 100644
--- a/package/libssh/libssh.mk
+++ b/package/libssh/libssh.mk
@@ -43,3 +43,4 @@ LIBSSH_DEPENDENCIES += openssl
 endif
 
 $(eval $(cmake-package))
+$(eval $(host-cmake-package))
-- 
2.20.1

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

* [Buildroot] [PATCH 3/9] package/libredblack: add package
  2019-10-01 14:30 [Buildroot] [PATCH 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
  2019-10-01 14:30 ` [Buildroot] [PATCH 2/9] package/libssh: " heiko.thiery at gmail.com
@ 2019-10-01 14:30 ` heiko.thiery at gmail.com
  2019-10-02  7:20   ` Thomas Petazzoni
  2019-10-01 14:30 ` [Buildroot] [PATCH 4/9] package/libyang: " heiko.thiery at gmail.com
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 18+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-01 14:30 UTC (permalink / raw)
  To: buildroot

From: Heiko Thiery <heiko.thiery@kontron.com>

RedBlack Balanced Tree Searching and Sorting Library.

https://github.com/sysrepo/libredblack

Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>
---
 DEVELOPERS                           |  3 +++
 package/Config.in                    |  1 +
 package/libredblack/Config.in        |  4 ++++
 package/libredblack/libredblack.hash |  2 ++
 package/libredblack/libredblack.mk   | 16 ++++++++++++++++
 5 files changed, 26 insertions(+)
 create mode 100644 package/libredblack/Config.in
 create mode 100644 package/libredblack/libredblack.hash
 create mode 100644 package/libredblack/libredblack.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index ac73c7daa5..a25fbb7a0d 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1036,6 +1036,9 @@ F:	package/python-markdown/
 F:	package/python-remi/
 F:	package/python-sip/
 
+N:	Heiko Thiery <heiko.thiery@gmail.com>
+F:	package/libredblack/
+
 N:	Henrique Camargo <henrique@henriquecamargo.com>
 F:	package/json-glib/
 
diff --git a/package/Config.in b/package/Config.in
index 4d8fce21c0..abea9e2428 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1745,6 +1745,7 @@ menu "Other"
 	source "package/libpthread-stubs/Config.in"
 	source "package/libpthsem/Config.in"
 	source "package/libpwquality/Config.in"
+	source "package/libredblack/Config.in"
 	source "package/libseccomp/Config.in"
 	source "package/libsigc/Config.in"
 	source "package/libsigsegv/Config.in"
diff --git a/package/libredblack/Config.in b/package/libredblack/Config.in
new file mode 100644
index 0000000000..b18a9aecfc
--- /dev/null
+++ b/package/libredblack/Config.in
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_LIBREDBLACK
+	bool "libredblack - red-black balanced tree algorithm"
+	help
+	  RedBlack Balanced Tree Searching and Sorting Library.
diff --git a/package/libredblack/libredblack.hash b/package/libredblack/libredblack.hash
new file mode 100644
index 0000000000..c5e6d04992
--- /dev/null
+++ b/package/libredblack/libredblack.hash
@@ -0,0 +1,2 @@
+sha256 85833e1549450e8cb06c0a94c3607d82ab2d46791acd14a5c6d35b4259ade853  libredblack-a399310d99b61eec4d3c0677573ab5dddcf9395d.tar.gz
+sha256 ede9298547948ae66509e61d6e2d41ff2a8b511578644fb7ec970239fbca07b4  COPYING
diff --git a/package/libredblack/libredblack.mk b/package/libredblack/libredblack.mk
new file mode 100644
index 0000000000..78d65c7e2b
--- /dev/null
+++ b/package/libredblack/libredblack.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# libredblack
+#
+################################################################################
+
+LIBREDBLACK_VERSION = a399310d99b61eec4d3c0677573ab5dddcf9395d
+LIBREDBLACK_SITE = $(call github,sysrepo,libredblack,$(LIBREDBLACK_VERSION))
+LIBREDBLACK_LICENSE = LGPL-2.1
+LIBREDBLACK_LICENSE_FILES = COPYING
+LIBREDBLACK_INSTALL_STAGING = YES
+LIBREDBLACK_CONF_OPTS = --with-rbgen=no
+HOST_LIBREDBLACK_CONF_OPTS = --with-rbgen=no --without-python
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))
-- 
2.20.1

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

* [Buildroot] [PATCH 4/9] package/libyang: add package
  2019-10-01 14:30 [Buildroot] [PATCH 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
  2019-10-01 14:30 ` [Buildroot] [PATCH 2/9] package/libssh: " heiko.thiery at gmail.com
  2019-10-01 14:30 ` [Buildroot] [PATCH 3/9] package/libredblack: add package heiko.thiery at gmail.com
@ 2019-10-01 14:30 ` heiko.thiery at gmail.com
  2019-10-02  7:25   ` Thomas Petazzoni
  2019-10-01 14:30 ` [Buildroot] [PATCH 5/9] package/libnetconf2: " heiko.thiery at gmail.com
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 18+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-01 14:30 UTC (permalink / raw)
  To: buildroot

From: Heiko Thiery <heiko.thiery@kontron.com>

LibYANG processes YIN and YANG files. It's a dependency of sysrepo which
is a dependency of Netopeer, a NETCONF/YANG server.

Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>
---
 DEVELOPERS                   |  1 +
 package/Config.in            |  1 +
 package/libyang/Config.in    |  7 +++++++
 package/libyang/libyang.hash |  2 ++
 package/libyang/libyang.mk   | 21 +++++++++++++++++++++
 5 files changed, 32 insertions(+)
 create mode 100644 package/libyang/Config.in
 create mode 100644 package/libyang/libyang.hash
 create mode 100644 package/libyang/libyang.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index a25fbb7a0d..a378ff2a61 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1038,6 +1038,7 @@ F:	package/python-sip/
 
 N:	Heiko Thiery <heiko.thiery@gmail.com>
 F:	package/libredblack/
+F:	package/libyang/
 
 N:	Henrique Camargo <henrique@henriquecamargo.com>
 F:	package/json-glib/
diff --git a/package/Config.in b/package/Config.in
index abea9e2428..04cd466eba 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1640,6 +1640,7 @@ menu "Networking"
 	source "package/libvncserver/Config.in"
 	source "package/libwebsock/Config.in"
 	source "package/libwebsockets/Config.in"
+	source "package/libyang/Config.in"
 	source "package/lksctp-tools/Config.in"
 	source "package/mongoose/Config.in"
 	source "package/nanomsg/Config.in"
diff --git a/package/libyang/Config.in b/package/libyang/Config.in
new file mode 100644
index 0000000000..cfd2862c15
--- /dev/null
+++ b/package/libyang/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_LIBYANG
+	bool "libyang - YANG data modeling language parser and toolkit"
+	depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_PCRE
+	help
+	  Libyang is YANG data modeling language parser and toolkit
+	  written (and providing API) in C.
diff --git a/package/libyang/libyang.hash b/package/libyang/libyang.hash
new file mode 100644
index 0000000000..4989873c8c
--- /dev/null
+++ b/package/libyang/libyang.hash
@@ -0,0 +1,2 @@
+sha256 351f712433d50494aad153bfd4aa92ff50299058428620eabddb7a41d781e756  libyang-v1.0-r3.tar.gz
+sha256 f942fe693e03e4e3ff67a351c00dc8f468a042e0d7273b0aa6bc53060b568112  LICENSE
diff --git a/package/libyang/libyang.mk b/package/libyang/libyang.mk
new file mode 100644
index 0000000000..9005683053
--- /dev/null
+++ b/package/libyang/libyang.mk
@@ -0,0 +1,21 @@
+################################################################################
+#
+# libyang
+#
+################################################################################
+
+LIBYANG_VERSION = v1.0-r3
+LIBYANG_SITE = $(call github,CESNET,libyang,$(LIBYANG_VERSION))
+LIBYANG_LICENSE = BSD-3-Clause
+LIBYANG_LICENSE_FILES = LICENSE
+LIBYANG_INSTALL_STAGING = YES
+LIBYANG_SUPPORTS_IN_SOURCE_BUILD = NO
+LIBYANG_DEPENDENCIES += pcre
+HOST_LIBYANG_DEPENDENCIES += host-pcre
+
+LIBYANG_CONF_OPTS += \
+	-DENABLE_VALGRIND_TESTS=OFF \
+	-DGEN_PYTHON_BINDINGS=OFF
+
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))
-- 
2.20.1

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

* [Buildroot] [PATCH 5/9] package/libnetconf2: add package
  2019-10-01 14:30 [Buildroot] [PATCH 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
                   ` (2 preceding siblings ...)
  2019-10-01 14:30 ` [Buildroot] [PATCH 4/9] package/libyang: " heiko.thiery at gmail.com
@ 2019-10-01 14:30 ` heiko.thiery at gmail.com
  2019-10-02  7:28   ` Thomas Petazzoni
  2019-10-01 14:30 ` [Buildroot] [PATCH 6/9] package/sysrepo: " heiko.thiery at gmail.com
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 18+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-01 14:30 UTC (permalink / raw)
  To: buildroot

From: Heiko Thiery <heiko.thiery@kontron.com>

libnetconf2 is a NETCONF library in C intended for building
NETCONF clients and servers.

Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>
---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 .../0001-Add-support-for-musl-libc.patch      | 60 +++++++++++++++++++
 package/libnetconf2/Config.in                 | 10 ++++
 package/libnetconf2/libnetconf2.hash          |  2 +
 package/libnetconf2/libnetconf2.mk            | 28 +++++++++
 6 files changed, 102 insertions(+)
 create mode 100644 package/libnetconf2/0001-Add-support-for-musl-libc.patch
 create mode 100644 package/libnetconf2/Config.in
 create mode 100644 package/libnetconf2/libnetconf2.hash
 create mode 100644 package/libnetconf2/libnetconf2.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index a378ff2a61..527b8cccac 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1039,6 +1039,7 @@ F:	package/python-sip/
 N:	Heiko Thiery <heiko.thiery@gmail.com>
 F:	package/libredblack/
 F:	package/libyang/
+F:	package/libnetconf2/
 
 N:	Henrique Camargo <henrique@henriquecamargo.com>
 F:	package/json-glib/
diff --git a/package/Config.in b/package/Config.in
index 04cd466eba..f9b1b88b91 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1607,6 +1607,7 @@ menu "Networking"
 	source "package/libnatpmp/Config.in"
 	source "package/libndp/Config.in"
 	source "package/libnet/Config.in"
+	source "package/libnetconf2/Config.in"
 	source "package/libnetfilter_acct/Config.in"
 	source "package/libnetfilter_conntrack/Config.in"
 	source "package/libnetfilter_cthelper/Config.in"
diff --git a/package/libnetconf2/0001-Add-support-for-musl-libc.patch b/package/libnetconf2/0001-Add-support-for-musl-libc.patch
new file mode 100644
index 0000000000..e6d97ba90f
--- /dev/null
+++ b/package/libnetconf2/0001-Add-support-for-musl-libc.patch
@@ -0,0 +1,60 @@
+From 153fe40bd60499677e825e66501e8601536e0323 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Mon, 15 Jul 2019 18:15:28 -0700
+Subject: [PATCH] Add support for musl libc
+
+musl does not support pthread_rwlockattr_setkind_np. Don't use it if it is
+not available.
+---
+ CMakeLists.txt       | 1 +
+ src/config.h.in      | 3 +++
+ src/session_server.c | 2 ++
+ 3 files changed, 6 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 624b8c8..c05cd03 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -176,6 +176,7 @@ target_link_libraries(netconf2 ${CMAKE_THREAD_LIBS_INIT})
+ set(CMAKE_REQUIRED_LIBRARIES pthread)
+ check_include_file(stdatomic.h HAVE_STDATOMIC)
+ check_function_exists(pthread_mutex_timedlock HAVE_PTHREAD_MUTEX_TIMEDLOCK)
++check_function_exists(pthread_rwlockattr_setkind_np HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP)
+ 
+ # dependencies - openssl
+ if(ENABLE_TLS OR ENABLE_DNSSEC OR ENABLE_SSH)
+diff --git a/src/config.h.in b/src/config.h.in
+index 96d33c5..30dd8a3 100644
+--- a/src/config.h.in
++++ b/src/config.h.in
+@@ -73,4 +73,7 @@
+  */
+ #define NC_PS_QUEUE_SIZE @MAX_PSPOLL_THREAD_COUNT@
+ 
++/* Portability feature-check macros. */
++#cmakedefine HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP
++
+ #endif /* NC_CONFIG_H_ */
+diff --git a/src/session_server.c b/src/session_server.c
+index 636b1a2..3b747ed 100644
+--- a/src/session_server.c
++++ b/src/session_server.c
+@@ -560,6 +560,7 @@ nc_server_init(struct ly_ctx *ctx)
+     errno=0;
+ 
+     if (pthread_rwlockattr_init(&attr) == 0) {
++#if defined(HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP)
+         if (pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) == 0) {
+             if (pthread_rwlock_init(&server_opts.endpt_lock, &attr) != 0) {
+                 ERR("%s: failed to init rwlock(%s).", __FUNCTION__, strerror(errno));
+@@ -570,6 +571,7 @@ nc_server_init(struct ly_ctx *ctx)
+         } else {
+             ERR("%s: failed set attribute (%s).", __FUNCTION__, strerror(errno));
+         }
++#endif
+         pthread_rwlockattr_destroy(&attr);
+     } else {
+         ERR("%s: failed init attribute (%s).", __FUNCTION__, strerror(errno));
+-- 
+2.20.1
+
diff --git a/package/libnetconf2/Config.in b/package/libnetconf2/Config.in
new file mode 100644
index 0000000000..a991c78c05
--- /dev/null
+++ b/package/libnetconf2/Config.in
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_LIBNETCONF2
+	bool "libnetconf2 - NETCONF library"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_LIBYANG
+	select BR2_PACKAGE_LIBSSH
+	select BR2_PACKAGE_LIBSSH_SERVER
+	help
+	  libnetconf2 is a NETCONF library in C intended for building
+	  NETCONF clients and servers.
diff --git a/package/libnetconf2/libnetconf2.hash b/package/libnetconf2/libnetconf2.hash
new file mode 100644
index 0000000000..c6d1f5185d
--- /dev/null
+++ b/package/libnetconf2/libnetconf2.hash
@@ -0,0 +1,2 @@
+sha256 760061fb1c1fe87a2a068d5a9e5affcef280044c5940ef344854e9ea7ec26452  libnetconf2-v0.12-r2.tar.gz
+sha256 085122ea91161812dda9cd2f42d8c50ecc3a48cc1a4f15044d86cfc5aa887577  LICENSE
diff --git a/package/libnetconf2/libnetconf2.mk b/package/libnetconf2/libnetconf2.mk
new file mode 100644
index 0000000000..7bafe78324
--- /dev/null
+++ b/package/libnetconf2/libnetconf2.mk
@@ -0,0 +1,28 @@
+################################################################################
+#
+# libnetconf2
+#
+################################################################################
+
+LIBNETCONF2_VERSION = v0.12-r2
+LIBNETCONF2_SITE = $(call github,CESNET,libnetconf2,$(LIBNETCONF2_VERSION))
+LIBNETCONF2_INSTALL_STAGING = YES
+LIBNETCONF2_LICENSE = BSD-3-Clause
+LIBNETCONF2_LICENSE_FILES = LICENSE
+LIBNETCONF2_DEPENDENCIES += libyang libssh
+HOST_LIBNETCONF2_DEPENDENCIES += host-libyang host-libssh
+
+LIBNETCONF2_CONF_OPTS += \
+	-DENABLE_TLS=ON \
+	-DENABLE_SSH=ON \
+	-DENABLE_BUILD_TESTS=OFF \
+	-DENABLE_VALGRIND_TESTS=OFF
+
+HOST_LIBNETCONF2_CONF_OPTS += \
+	-DENABLE_TLS=ON \
+	-DENABLE_SSH=ON \
+	-DENABLE_BUILD_TESTS=OFF \
+	-DENABLE_VALGRIND_TESTS=OFF
+
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))
-- 
2.20.1

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

* [Buildroot] [PATCH 6/9] package/sysrepo: add package
  2019-10-01 14:30 [Buildroot] [PATCH 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
                   ` (3 preceding siblings ...)
  2019-10-01 14:30 ` [Buildroot] [PATCH 5/9] package/libnetconf2: " heiko.thiery at gmail.com
@ 2019-10-01 14:30 ` heiko.thiery at gmail.com
  2019-10-02  9:34   ` Thomas Petazzoni
  2019-10-01 14:30 ` [Buildroot] [PATCH 7/9] package/netopeer2server: " heiko.thiery at gmail.com
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 18+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-01 14:30 UTC (permalink / raw)
  To: buildroot

From: Heiko Thiery <heiko.thiery@kontron.com>

sysrepo is a YANG-based configuration and operational state
data store for Unix/Linux applications. It is a dependency
of Netopeer, a NETCONF server.

Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>
---
 DEVELOPERS                   |  1 +
 package/Config.in            |  1 +
 package/sysrepo/Config.in    | 17 +++++++++++++++++
 package/sysrepo/sysrepo.hash |  2 ++
 package/sysrepo/sysrepo.mk   | 26 ++++++++++++++++++++++++++
 5 files changed, 47 insertions(+)
 create mode 100644 package/sysrepo/Config.in
 create mode 100644 package/sysrepo/sysrepo.hash
 create mode 100644 package/sysrepo/sysrepo.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 527b8cccac..e7b3c9d6f6 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1040,6 +1040,7 @@ N:	Heiko Thiery <heiko.thiery@gmail.com>
 F:	package/libredblack/
 F:	package/libyang/
 F:	package/libnetconf2/
+F:	package/sysrepo/
 
 N:	Henrique Camargo <henrique@henriquecamargo.com>
 F:	package/json-glib/
diff --git a/package/Config.in b/package/Config.in
index f9b1b88b91..c1f6fb2245 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1667,6 +1667,7 @@ menu "Networking"
 	source "package/slirp/Config.in"
 	source "package/snmppp/Config.in"
 	source "package/sofia-sip/Config.in"
+	source "package/sysrepo/Config.in"
 	source "package/thrift/Config.in"
 	source "package/usbredir/Config.in"
 	source "package/wampcc/Config.in"
diff --git a/package/sysrepo/Config.in b/package/sysrepo/Config.in
new file mode 100644
index 0000000000..78b8097e14
--- /dev/null
+++ b/package/sysrepo/Config.in
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_SYSREPO
+	bool "sysrepo - YANG based data store"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS
+	depends on !BR2_TOOLCHAIN_USES_MUSL
+	select BR2_PACKAGE_LIBEV
+	select BR2_PACKAGE_LIBNETCONF2
+	select BR2_PACKAGE_LIBREDBLACK
+	select BR2_PACKAGE_LIBYANG
+	select BR2_PACKAGE_PROTOBUF_C
+	select BR2_PACKAGE_PCRE
+	help
+	  Sysrepo is an YANG-based configuration and operational state
+	  data store for Unix/Linux applications.
+
+comment "needs a toolchain w/ threads, dynamic libraray"
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/sysrepo/sysrepo.hash b/package/sysrepo/sysrepo.hash
new file mode 100644
index 0000000000..39ec70a2f6
--- /dev/null
+++ b/package/sysrepo/sysrepo.hash
@@ -0,0 +1,2 @@
+sha256 d3066c1776a6727b96bbb3517eb646d0bb6037e8e1addcbe873cae590493843e  sysrepo-v0.7.8.tar.gz
+sha256 28a773bfffa828ec38c030fc8ace5f3aeb90926ec1309bbd135441c4387ce3cd  LICENSE
diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk
new file mode 100644
index 0000000000..423d3a7b03
--- /dev/null
+++ b/package/sysrepo/sysrepo.mk
@@ -0,0 +1,26 @@
+################################################################################
+#
+# sysrepo
+#
+################################################################################
+
+SYSREPO_VERSION = v0.7.8
+SYSREPO_SITE = $(call github,sysrepo,sysrepo,$(SYSREPO_VERSION))
+SYSREPO_INSTALL_STAGING = YES
+SYSREPO_LICENSE = Apache-2.0
+SYSREPO_LICENSE_FILES = LICENSE
+SYSREPO_DEPENDENCIES += libev libnetconf2 libredblack libyang pcre protobuf-c
+HOST_SYSREPO_DEPENDENCIES += host-libev host-libnetconf2 host-libredblack host-libyang host-pcre host-protobuf-c
+
+SYSREPO_CONF_OPTS += \
+	-DGEN_PYTHON2_TESTS=OFF \
+	-DENABLE_TESTS=OFF \
+	-DCALL_TARGET_BINS_DIRECTLY=OFF
+
+HOST_SYSREPO_CONF_OPTS += \
+	-DGEN_PYTHON2_TESTS=OFF \
+	-DENABLE_TESTS=OFF \
+	-DCALL_TARGET_BINS_DIRECTLY=OFF
+
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))
-- 
2.20.1

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

* [Buildroot] [PATCH 7/9] package/netopeer2server: add package
  2019-10-01 14:30 [Buildroot] [PATCH 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
                   ` (4 preceding siblings ...)
  2019-10-01 14:30 ` [Buildroot] [PATCH 6/9] package/sysrepo: " heiko.thiery at gmail.com
@ 2019-10-01 14:30 ` heiko.thiery at gmail.com
  2019-10-01 14:30 ` [Buildroot] [PATCH 8/9] package/netopeer2cli: " heiko.thiery at gmail.com
  2019-10-01 14:30 ` [Buildroot] [PATCH 9/9] package/netopeer2keystored: " heiko.thiery at gmail.com
  7 siblings, 0 replies; 18+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-01 14:30 UTC (permalink / raw)
  To: buildroot

From: Heiko Thiery <heiko.thiery@kontron.com>

Netopeer2 is a set of tools implementing network configuration
tools based on the NETCONF Protocol. This is the second
generation of the toolset, originally available as the Netopeer
project. Netopeer2 is based on the new generation of the NETCONF
and YANG libraries - libyang and libnetconf2. The Netopeer
server uses sysrepo as a NETCONF datastore implementation.

Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>
---
 DEVELOPERS                                   |  1 +
 package/Config.in                            |  1 +
 package/netopeer2server/Config.in            | 16 ++++++++++++++++
 package/netopeer2server/netopeer2server.hash |  2 ++
 package/netopeer2server/netopeer2server.mk   | 19 +++++++++++++++++++
 5 files changed, 39 insertions(+)
 create mode 100644 package/netopeer2server/Config.in
 create mode 100644 package/netopeer2server/netopeer2server.hash
 create mode 100644 package/netopeer2server/netopeer2server.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index e7b3c9d6f6..d70e2c7b56 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1040,6 +1040,7 @@ N:	Heiko Thiery <heiko.thiery@gmail.com>
 F:	package/libredblack/
 F:	package/libyang/
 F:	package/libnetconf2/
+F:	package/netopeer2server/
 F:	package/sysrepo/
 
 N:	Henrique Camargo <henrique@henriquecamargo.com>
diff --git a/package/Config.in b/package/Config.in
index c1f6fb2245..c91ef640bf 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1646,6 +1646,7 @@ menu "Networking"
 	source "package/mongoose/Config.in"
 	source "package/nanomsg/Config.in"
 	source "package/neon/Config.in"
+	source "package/netopeer2server/Config.in"
 	source "package/nghttp2/Config.in"
 	source "package/norm/Config.in"
 	source "package/nss-mdns/Config.in"
diff --git a/package/netopeer2server/Config.in b/package/netopeer2server/Config.in
new file mode 100644
index 0000000000..99e8e01919
--- /dev/null
+++ b/package/netopeer2server/Config.in
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_NETOPEER2SERVER
+	bool "netopeer2-server"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS
+	depends on !BR2_TOOLCHAIN_USES_MUSL
+	select BR2_PACKAGE_LIBYANG
+	select BR2_PACKAGE_SYSREPO
+	select BR2_PACKAGE_NETOPEER2KEYSTORED
+	help
+	  Netopeer2 is a set of tools implementing network
+	  configuration tools based on the NETCONF Protocol.
+
+	  https://github.com/CESNET/Netopeer2
+
+comment "needs a glibc toolchain w/ threads, dynamic libraray"
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/netopeer2server/netopeer2server.hash b/package/netopeer2server/netopeer2server.hash
new file mode 100644
index 0000000000..0b6cfa3b53
--- /dev/null
+++ b/package/netopeer2server/netopeer2server.hash
@@ -0,0 +1,2 @@
+sha256 59688271be4fecbbee671fc7eb3dc0538b13b4baab53e923e26eaeb33e6f7ec0  netopeer2server-v0.7-r2.tar.gz
+sha256 932b75a8610a5c58e0fe0f70f8e4ebbcf3a2392acc16a88e95aebcdbdb9245e0  LICENSE
diff --git a/package/netopeer2server/netopeer2server.mk b/package/netopeer2server/netopeer2server.mk
new file mode 100644
index 0000000000..4d8b17b11f
--- /dev/null
+++ b/package/netopeer2server/netopeer2server.mk
@@ -0,0 +1,19 @@
+################################################################################
+#
+# netopeer2server
+#
+################################################################################
+
+NETOPEER2SERVER_VERSION = v0.7-r2
+NETOPEER2SERVER_SITE = $(call github,CESNET,Netopeer2,$(NETOPEER2SERVER_VERSION))
+NETOPEER2SERVER_LICENSE = BSD-3-Clause
+NETOPEER2SERVER_LICENSE_FILES = LICENSE
+NETOPEER2SERVER_SUBDIR = server
+NETOPEER2SERVER_INSTALL_STAGING = YES
+NETOPEER2SERVER_DEPENDENCIES += libyang sysrepo
+
+NETOPEER2SERVER_CONF_OPTS += \
+	-DENABLE_CONFIGURATION=OFF \
+	-DKEYSTORED_KEYS_DIR=/etc/keystored/keys
+
+$(eval $(cmake-package))
-- 
2.20.1

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

* [Buildroot] [PATCH 8/9] package/netopeer2cli: add package
  2019-10-01 14:30 [Buildroot] [PATCH 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
                   ` (5 preceding siblings ...)
  2019-10-01 14:30 ` [Buildroot] [PATCH 7/9] package/netopeer2server: " heiko.thiery at gmail.com
@ 2019-10-01 14:30 ` heiko.thiery at gmail.com
  2019-10-01 14:30 ` [Buildroot] [PATCH 9/9] package/netopeer2keystored: " heiko.thiery at gmail.com
  7 siblings, 0 replies; 18+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-01 14:30 UTC (permalink / raw)
  To: buildroot

From: Heiko Thiery <heiko.thiery@kontron.com>

netopeer2 CLI - simple command line interface to connect to a
NETCONF server (device).

Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>
---
 DEVELOPERS                             |  1 +
 package/Config.in                      |  1 +
 package/netopeer2cli/Config.in         | 10 ++++++++++
 package/netopeer2cli/netopeer2cli.hash |  2 ++
 package/netopeer2cli/netopeer2cli.mk   | 16 ++++++++++++++++
 5 files changed, 30 insertions(+)
 create mode 100644 package/netopeer2cli/Config.in
 create mode 100644 package/netopeer2cli/netopeer2cli.hash
 create mode 100644 package/netopeer2cli/netopeer2cli.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index d70e2c7b56..08793ffb98 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1040,6 +1040,7 @@ N:	Heiko Thiery <heiko.thiery@gmail.com>
 F:	package/libredblack/
 F:	package/libyang/
 F:	package/libnetconf2/
+F:	package/netopeer2cli/
 F:	package/netopeer2server/
 F:	package/sysrepo/
 
diff --git a/package/Config.in b/package/Config.in
index c91ef640bf..a42dae1df7 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1646,6 +1646,7 @@ menu "Networking"
 	source "package/mongoose/Config.in"
 	source "package/nanomsg/Config.in"
 	source "package/neon/Config.in"
+	source "package/netopeer2cli/Config.in"
 	source "package/netopeer2server/Config.in"
 	source "package/nghttp2/Config.in"
 	source "package/norm/Config.in"
diff --git a/package/netopeer2cli/Config.in b/package/netopeer2cli/Config.in
new file mode 100644
index 0000000000..12f94281d4
--- /dev/null
+++ b/package/netopeer2cli/Config.in
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_NETOPEER2CLI
+	bool "netopeer2-cli"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+    depends on !BR2_STATIC_LIBS
+	depends on !BR2_TOOLCHAIN_USES_MUSL
+	select BR2_PACKAGE_LIBYANG
+	select BR2_PACKAGE_SYSREPO
+	help
+	  Netopeer2 CLI is a simple command line interface to
+	  connect to a NETCONF server (device).
diff --git a/package/netopeer2cli/netopeer2cli.hash b/package/netopeer2cli/netopeer2cli.hash
new file mode 100644
index 0000000000..592228e63e
--- /dev/null
+++ b/package/netopeer2cli/netopeer2cli.hash
@@ -0,0 +1,2 @@
+sha256 59688271be4fecbbee671fc7eb3dc0538b13b4baab53e923e26eaeb33e6f7ec0  netopeer2cli-v0.7-r2.tar.gz
+sha256 932b75a8610a5c58e0fe0f70f8e4ebbcf3a2392acc16a88e95aebcdbdb9245e0  LICENSE
diff --git a/package/netopeer2cli/netopeer2cli.mk b/package/netopeer2cli/netopeer2cli.mk
new file mode 100644
index 0000000000..930559e517
--- /dev/null
+++ b/package/netopeer2cli/netopeer2cli.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# netopeer2cli
+#
+################################################################################
+
+NETOPEER2CLI_VERSION = v0.7-r2
+NETOPEER2CLI_SITE = $(call github,CESNET,Netopeer2,$(NETOPEER2CLI_VERSION))
+NETOPEER2CLI_LICENSE = BSD-3-Clause
+NETOPEER2CLI_LICENSE_FILES = LICENSE
+NETOPEER2CLI_SUBDIR = cli
+NETOPEER2CLI_INSTALL_STAGING = YES
+NETOPEER2CLI_DEPENDENCIES += libyang
+NETOPEER2CLI_DEPENDENCIES += sysrepo
+
+$(eval $(cmake-package))
-- 
2.20.1

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

* [Buildroot] [PATCH 9/9] package/netopeer2keystored: add package
  2019-10-01 14:30 [Buildroot] [PATCH 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
                   ` (6 preceding siblings ...)
  2019-10-01 14:30 ` [Buildroot] [PATCH 8/9] package/netopeer2cli: " heiko.thiery at gmail.com
@ 2019-10-01 14:30 ` heiko.thiery at gmail.com
  7 siblings, 0 replies; 18+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-01 14:30 UTC (permalink / raw)
  To: buildroot

From: Heiko Thiery <heiko.thiery@kontron.com>

netopeer2 keystored plugin.

Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>
---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 package/libnetconf2/libnetconf2.mk            |  8 +++-----
 package/netopeer2keystored/Config.in          | 16 +++++++++++++++
 .../netopeer2keystored.hash                   |  2 ++
 .../netopeer2keystored/netopeer2keystored.mk  | 20 +++++++++++++++++++
 6 files changed, 43 insertions(+), 5 deletions(-)
 create mode 100644 package/netopeer2keystored/Config.in
 create mode 100644 package/netopeer2keystored/netopeer2keystored.hash
 create mode 100644 package/netopeer2keystored/netopeer2keystored.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 08793ffb98..ac82b17c20 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1040,6 +1040,7 @@ N:	Heiko Thiery <heiko.thiery@gmail.com>
 F:	package/libredblack/
 F:	package/libyang/
 F:	package/libnetconf2/
+F:	package/netopeer2keystored/
 F:	package/netopeer2cli/
 F:	package/netopeer2server/
 F:	package/sysrepo/
diff --git a/package/Config.in b/package/Config.in
index a42dae1df7..1381df4e37 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1647,6 +1647,7 @@ menu "Networking"
 	source "package/nanomsg/Config.in"
 	source "package/neon/Config.in"
 	source "package/netopeer2cli/Config.in"
+	source "package/netopeer2keystored/Config.in"
 	source "package/netopeer2server/Config.in"
 	source "package/nghttp2/Config.in"
 	source "package/norm/Config.in"
diff --git a/package/libnetconf2/libnetconf2.mk b/package/libnetconf2/libnetconf2.mk
index 7bafe78324..65500e9f85 100644
--- a/package/libnetconf2/libnetconf2.mk
+++ b/package/libnetconf2/libnetconf2.mk
@@ -10,17 +10,15 @@ LIBNETCONF2_INSTALL_STAGING = YES
 LIBNETCONF2_LICENSE = BSD-3-Clause
 LIBNETCONF2_LICENSE_FILES = LICENSE
 LIBNETCONF2_DEPENDENCIES += libyang libssh
-HOST_LIBNETCONF2_DEPENDENCIES += host-libyang host-libssh
+HOST_LIBNETCONF2_DEPENDENCIES += host-libyang
 
 LIBNETCONF2_CONF_OPTS += \
-	-DENABLE_TLS=ON \
-	-DENABLE_SSH=ON \
 	-DENABLE_BUILD_TESTS=OFF \
 	-DENABLE_VALGRIND_TESTS=OFF
 
 HOST_LIBNETCONF2_CONF_OPTS += \
-	-DENABLE_TLS=ON \
-	-DENABLE_SSH=ON \
+	-DENABLE_TLS=OFF \
+	-DENABLE_SSH=OFF \
 	-DENABLE_BUILD_TESTS=OFF \
 	-DENABLE_VALGRIND_TESTS=OFF
 
diff --git a/package/netopeer2keystored/Config.in b/package/netopeer2keystored/Config.in
new file mode 100644
index 0000000000..efb12a7f40
--- /dev/null
+++ b/package/netopeer2keystored/Config.in
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_NETOPEER2KEYSTORED
+	bool "netopeer2-keystore daemon"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS
+	depends on !BR2_TOOLCHAIN_USES_MUSL
+	select BR2_PACKAGE_LIBYANG
+	select BR2_PACKAGE_SYSREPO
+	select BR2_PACKAGE_SYSREPO
+	help
+	  Netopeer2 is a set of tools implementing network
+	  configuration tools based on the NETCONF Protocol.
+
+	  https://github.com/CESNET/Netopeer2
+
+comment "needs a glibc toolchain w/ threads, dynamic libraray"
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/netopeer2keystored/netopeer2keystored.hash b/package/netopeer2keystored/netopeer2keystored.hash
new file mode 100644
index 0000000000..5309a36252
--- /dev/null
+++ b/package/netopeer2keystored/netopeer2keystored.hash
@@ -0,0 +1,2 @@
+sha256 59688271be4fecbbee671fc7eb3dc0538b13b4baab53e923e26eaeb33e6f7ec0  netopeer2keystored-v0.7-r2.tar.gz
+sha256 932b75a8610a5c58e0fe0f70f8e4ebbcf3a2392acc16a88e95aebcdbdb9245e0  LICENSE
diff --git a/package/netopeer2keystored/netopeer2keystored.mk b/package/netopeer2keystored/netopeer2keystored.mk
new file mode 100644
index 0000000000..070593fc46
--- /dev/null
+++ b/package/netopeer2keystored/netopeer2keystored.mk
@@ -0,0 +1,20 @@
+################################################################################
+#
+# netopeer2keystored
+#
+################################################################################
+
+NETOPEER2KEYSTORED_VERSION = v0.7-r2
+NETOPEER2KEYSTORED_SITE = $(call github,CESNET,Netopeer2,$(NETOPEER2KEYSTORED_VERSION))
+NETOPEER2KEYSTORED_LICENSE = BSD-3-Clause
+NETOPEER2KEYSTORED_LICENSE_FILES = LICENSE 
+NETOPEER2KEYSTORED_SUBDIR = keystored
+NETOPEER2KEYSTORED_INSTALL_STAGING = YES
+NETOPEER2KEYSTORED_DEPENDENCIES += host-sysrepo sysrepo
+
+NETOPEER2KEYSTORED_CONF_OPTS += \
+	-DKEYSTORED_DEFER_SSH_KEY=ON \
+	-DMODEL_INSTALL=OFF \
+	-DSSH_KEY_INSTALL=OFF
+
+$(eval $(cmake-package))
-- 
2.20.1

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

* [Buildroot] [PATCH 3/9] package/libredblack: add package
  2019-10-01 14:30 ` [Buildroot] [PATCH 3/9] package/libredblack: add package heiko.thiery at gmail.com
@ 2019-10-02  7:20   ` Thomas Petazzoni
  2019-10-04  8:49     ` Heiko Thiery
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2019-10-02  7:20 UTC (permalink / raw)
  To: buildroot

Hello Heiko,

Thanks for your patch series! It is pretty good overall, but of course
there are a few details to improve here and there.

On Tue,  1 Oct 2019 16:30:16 +0200
heiko.thiery at gmail.com wrote:

> diff --git a/package/Config.in b/package/Config.in
> index 4d8fce21c0..abea9e2428 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1745,6 +1745,7 @@ menu "Other"
>  	source "package/libpthread-stubs/Config.in"
>  	source "package/libpthsem/Config.in"
>  	source "package/libpwquality/Config.in"
> +	source "package/libredblack/Config.in"
>  	source "package/libseccomp/Config.in"
>  	source "package/libsigc/Config.in"
>  	source "package/libsigsegv/Config.in"
> diff --git a/package/libredblack/Config.in b/package/libredblack/Config.in
> new file mode 100644
> index 0000000000..b18a9aecfc
> --- /dev/null
> +++ b/package/libredblack/Config.in
> @@ -0,0 +1,4 @@
> +config BR2_PACKAGE_LIBREDBLACK
> +	bool "libredblack - red-black balanced tree algorithm"

This should be just:

	bool "libredblack"

> +	help
> +	  RedBlack Balanced Tree Searching and Sorting Library.

Please add an empty line, followed by the URL of the project homepage.
If there's nothing better than the Github page, then the Github page is
fine.

> diff --git a/package/libredblack/libredblack.hash b/package/libredblack/libredblack.hash
> new file mode 100644
> index 0000000000..c5e6d04992
> --- /dev/null
> +++ b/package/libredblack/libredblack.hash
> @@ -0,0 +1,2 @@
> +sha256 85833e1549450e8cb06c0a94c3607d82ab2d46791acd14a5c6d35b4259ade853  libredblack-a399310d99b61eec4d3c0677573ab5dddcf9395d.tar.gz
> +sha256 ede9298547948ae66509e61d6e2d41ff2a8b511578644fb7ec970239fbca07b4  COPYING
> diff --git a/package/libredblack/libredblack.mk b/package/libredblack/libredblack.mk
> new file mode 100644
> index 0000000000..78d65c7e2b
> --- /dev/null
> +++ b/package/libredblack/libredblack.mk
> @@ -0,0 +1,16 @@
> +################################################################################
> +#
> +# libredblack
> +#
> +################################################################################
> +
> +LIBREDBLACK_VERSION = a399310d99b61eec4d3c0677573ab5dddcf9395d
> +LIBREDBLACK_SITE = $(call github,sysrepo,libredblack,$(LIBREDBLACK_VERSION))

The Github page says "
Copy of RedBlack Balanced Tree Searching and Sorting Library -
http://libredblack.sourceforge.net/". Does it make sense to use the
original version from SourceForge instead ?

> +LIBREDBLACK_LICENSE = LGPL-2.1

The license is LGPL-2.1+

> +LIBREDBLACK_LICENSE_FILES = COPYING
> +LIBREDBLACK_INSTALL_STAGING = YES
> +LIBREDBLACK_CONF_OPTS = --with-rbgen=no

Since you have it for the host variant, I think it makes sense to also
have --without-python here.

> +HOST_LIBREDBLACK_CONF_OPTS = --with-rbgen=no --without-python
> +
> +$(eval $(autotools-package))
> +$(eval $(host-autotools-package))

Thanks!

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

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

* [Buildroot] [PATCH 4/9] package/libyang: add package
  2019-10-01 14:30 ` [Buildroot] [PATCH 4/9] package/libyang: " heiko.thiery at gmail.com
@ 2019-10-02  7:25   ` Thomas Petazzoni
  2019-10-04  8:49     ` Heiko Thiery
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2019-10-02  7:25 UTC (permalink / raw)
  To: buildroot

Hello Heiko,

On Tue,  1 Oct 2019 16:30:17 +0200
heiko.thiery at gmail.com wrote:

> diff --git a/package/Config.in b/package/Config.in
> index abea9e2428..04cd466eba 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1640,6 +1640,7 @@ menu "Networking"
>  	source "package/libvncserver/Config.in"
>  	source "package/libwebsock/Config.in"
>  	source "package/libwebsockets/Config.in"
> +	source "package/libyang/Config.in"
>  	source "package/lksctp-tools/Config.in"
>  	source "package/mongoose/Config.in"
>  	source "package/nanomsg/Config.in"
> diff --git a/package/libyang/Config.in b/package/libyang/Config.in
> new file mode 100644
> index 0000000000..cfd2862c15
> --- /dev/null
> +++ b/package/libyang/Config.in
> @@ -0,0 +1,7 @@
> +config BR2_PACKAGE_LIBYANG
> +	bool "libyang - YANG data modeling language parser and toolkit"

Should be just:

	bool "libyang"

> +	depends on !BR2_STATIC_LIBS
> +	select BR2_PACKAGE_PCRE

The home page at https://github.com/CESNET/libyang says:

   note, that PCRE is supposed to be compiled with unicode support
   (configure's options --enable-utf and --enable-unicode-properties)

So I think you need:

	select BR2_PACKAGE_PCRE_UTF

Could you make sure it is indeed needed?

> +	help
> +	  Libyang is YANG data modeling language parser and toolkit
> +	  written (and providing API) in C.

Upstream URL of the project.

Also, you need a Config.in comment like this:

comment "libyang needs a toolchain w/ dynamic library"
	depends on BR2_STATIC_LIBS

> diff --git a/package/libyang/libyang.mk b/package/libyang/libyang.mk
> new file mode 100644
> index 0000000000..9005683053
> --- /dev/null
> +++ b/package/libyang/libyang.mk
> @@ -0,0 +1,21 @@
> +################################################################################
> +#
> +# libyang
> +#
> +################################################################################
> +
> +LIBYANG_VERSION = v1.0-r3
> +LIBYANG_SITE = $(call github,CESNET,libyang,$(LIBYANG_VERSION))
> +LIBYANG_LICENSE = BSD-3-Clause
> +LIBYANG_LICENSE_FILES = LICENSE
> +LIBYANG_INSTALL_STAGING = YES
> +LIBYANG_SUPPORTS_IN_SOURCE_BUILD = NO
> +LIBYANG_DEPENDENCIES += pcre

Just =

> +HOST_LIBYANG_DEPENDENCIES += host-pcre

Just =

> +
> +LIBYANG_CONF_OPTS += \

Just =

> +	-DENABLE_VALGRIND_TESTS=OFF \
> +	-DGEN_PYTHON_BINDINGS=OFF

What about passing the same options to the host variant ?

Thanks!

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

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

* [Buildroot] [PATCH 5/9] package/libnetconf2: add package
  2019-10-01 14:30 ` [Buildroot] [PATCH 5/9] package/libnetconf2: " heiko.thiery at gmail.com
@ 2019-10-02  7:28   ` Thomas Petazzoni
  2019-10-04  8:51     ` Heiko Thiery
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2019-10-02  7:28 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue,  1 Oct 2019 16:30:18 +0200
heiko.thiery at gmail.com wrote:

> diff --git a/DEVELOPERS b/DEVELOPERS
> index a378ff2a61..527b8cccac 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1039,6 +1039,7 @@ F:	package/python-sip/
>  N:	Heiko Thiery <heiko.thiery@gmail.com>
>  F:	package/libredblack/
>  F:	package/libyang/
> +F:	package/libnetconf2/

Please keep entries sorted alphabetically.

>  
> diff --git a/package/libnetconf2/0001-Add-support-for-musl-libc.patch b/package/libnetconf2/0001-Add-support-for-musl-libc.patch
> new file mode 100644
> index 0000000000..e6d97ba90f
> --- /dev/null
> +++ b/package/libnetconf2/0001-Add-support-for-musl-libc.patch
> @@ -0,0 +1,60 @@
> +From 153fe40bd60499677e825e66501e8601536e0323 Mon Sep 17 00:00:00 2001
> +From: Rosen Penev <rosenp@gmail.com>
> +Date: Mon, 15 Jul 2019 18:15:28 -0700
> +Subject: [PATCH] Add support for musl libc
> +
> +musl does not support pthread_rwlockattr_setkind_np. Don't use it if it is
> +not available.

We need your Signed-off-by here. Also, where does this patch comes
from ? It should ideally be mentioned here as well.

> diff --git a/package/libnetconf2/Config.in b/package/libnetconf2/Config.in
> new file mode 100644
> index 0000000000..a991c78c05
> --- /dev/null
> +++ b/package/libnetconf2/Config.in
> @@ -0,0 +1,10 @@
> +config BR2_PACKAGE_LIBNETCONF2
> +	bool "libnetconf2 - NETCONF library"

Just:

	bool "libnetconf2"

> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	depends on !BR2_STATIC_LIBS
> +	select BR2_PACKAGE_LIBYANG
> +	select BR2_PACKAGE_LIBSSH
> +	select BR2_PACKAGE_LIBSSH_SERVER

libssh has a "depends on BR2_USE_MMU", so you need to replicate it here.

> +	help
> +	  libnetconf2 is a NETCONF library in C intended for building
> +	  NETCONF clients and servers.

Upstream URL should be added.

Also, you need a Config.in comment like this:

comment "libnetconf2 needs a toolchain w/ threads, dynamic library"
	depends on BR2_USE_MMU
	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS

> diff --git a/package/libnetconf2/libnetconf2.mk b/package/libnetconf2/libnetconf2.mk
> new file mode 100644
> index 0000000000..7bafe78324
> --- /dev/null
> +++ b/package/libnetconf2/libnetconf2.mk
> @@ -0,0 +1,28 @@
> +################################################################################
> +#
> +# libnetconf2
> +#
> +################################################################################
> +
> +LIBNETCONF2_VERSION = v0.12-r2
> +LIBNETCONF2_SITE = $(call github,CESNET,libnetconf2,$(LIBNETCONF2_VERSION))
> +LIBNETCONF2_INSTALL_STAGING = YES
> +LIBNETCONF2_LICENSE = BSD-3-Clause
> +LIBNETCONF2_LICENSE_FILES = LICENSE
> +LIBNETCONF2_DEPENDENCIES += libyang libssh
> +HOST_LIBNETCONF2_DEPENDENCIES += host-libyang host-libssh

Use = instead of +=

> +
> +LIBNETCONF2_CONF_OPTS += \

Ditto.

> +	-DENABLE_TLS=ON \
> +	-DENABLE_SSH=ON \

So SSH support is optional ? Why did you made it mandatory ?

> +	-DENABLE_BUILD_TESTS=OFF \
> +	-DENABLE_VALGRIND_TESTS=OFF
> +
> +HOST_LIBNETCONF2_CONF_OPTS += \
> +	-DENABLE_TLS=ON \
> +	-DENABLE_SSH=ON \
> +	-DENABLE_BUILD_TESTS=OFF \
> +	-DENABLE_VALGRIND_TESTS=OFF

Use = for those unconditional assignments.

> +
> +$(eval $(cmake-package))
> +$(eval $(host-cmake-package))

Thanks!

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

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

* [Buildroot] [PATCH 6/9] package/sysrepo: add package
  2019-10-01 14:30 ` [Buildroot] [PATCH 6/9] package/sysrepo: " heiko.thiery at gmail.com
@ 2019-10-02  9:34   ` Thomas Petazzoni
  2019-10-04  8:52     ` Heiko Thiery
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2019-10-02  9:34 UTC (permalink / raw)
  To: buildroot

Hello Heiko,

On Tue,  1 Oct 2019 16:30:19 +0200
heiko.thiery at gmail.com wrote:

> diff --git a/package/sysrepo/Config.in b/package/sysrepo/Config.in
> new file mode 100644
> index 0000000000..78b8097e14
> --- /dev/null
> +++ b/package/sysrepo/Config.in
> @@ -0,0 +1,17 @@
> +config BR2_PACKAGE_SYSREPO
> +	bool "sysrepo - YANG based data store"

Just:

	bool "sysrepo"

> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	depends on !BR2_STATIC_LIBS
> +	depends on !BR2_TOOLCHAIN_USES_MUSL

Could you add a comment that explains why it doesn't build on musl ?

Also, you're missing the BR2_USE_MMU dependency that is inherited from
libnetconf2.

You need to replicate the dependencies of protobuf-c (C++, x86 ||
x86-64 host architecture, host gcc >= 4.8)

> +	select BR2_PACKAGE_LIBEV
> +	select BR2_PACKAGE_LIBNETCONF2
> +	select BR2_PACKAGE_LIBREDBLACK
> +	select BR2_PACKAGE_LIBYANG
> +	select BR2_PACKAGE_PROTOBUF_C
> +	select BR2_PACKAGE_PCRE
> +	help
> +	  Sysrepo is an YANG-based configuration and operational state
> +	  data store for Unix/Linux applications.
> +
> +comment "needs a toolchain w/ threads, dynamic libraray"
> +	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS

You're missing the musl dependency, and of course BR2_USE_MMU and the
other dependencies that come from protobuf-c.

> diff --git a/package/sysrepo/sysrepo.hash b/package/sysrepo/sysrepo.hash
> new file mode 100644
> index 0000000000..39ec70a2f6
> --- /dev/null
> +++ b/package/sysrepo/sysrepo.hash
> @@ -0,0 +1,2 @@
> +sha256 d3066c1776a6727b96bbb3517eb646d0bb6037e8e1addcbe873cae590493843e  sysrepo-v0.7.8.tar.gz
> +sha256 28a773bfffa828ec38c030fc8ace5f3aeb90926ec1309bbd135441c4387ce3cd  LICENSE
> diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk
> new file mode 100644
> index 0000000000..423d3a7b03
> --- /dev/null
> +++ b/package/sysrepo/sysrepo.mk
> @@ -0,0 +1,26 @@
> +################################################################################
> +#
> +# sysrepo
> +#
> +################################################################################
> +
> +SYSREPO_VERSION = v0.7.8
> +SYSREPO_SITE = $(call github,sysrepo,sysrepo,$(SYSREPO_VERSION))
> +SYSREPO_INSTALL_STAGING = YES
> +SYSREPO_LICENSE = Apache-2.0
> +SYSREPO_LICENSE_FILES = LICENSE
> +SYSREPO_DEPENDENCIES += libev libnetconf2 libredblack libyang pcre protobuf-c
> +HOST_SYSREPO_DEPENDENCIES += host-libev host-libnetconf2 host-libredblack host-libyang host-pcre host-protobuf-c

Use = instead of +=

Also, split those lines, like this:

FOO_DEPENDENCIES = \
	bar \
	baz \
	foobar

> +SYSREPO_CONF_OPTS += \
> +	-DGEN_PYTHON2_TESTS=OFF \
> +	-DENABLE_TESTS=OFF \
> +	-DCALL_TARGET_BINS_DIRECTLY=OFF
> +
> +HOST_SYSREPO_CONF_OPTS += \
> +	-DGEN_PYTHON2_TESTS=OFF \
> +	-DENABLE_TESTS=OFF \
> +	-DCALL_TARGET_BINS_DIRECTLY=OFF

Use = as well for those unconditional assignments.

Thanks,

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

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

* [Buildroot] [PATCH 3/9] package/libredblack: add package
  2019-10-02  7:20   ` Thomas Petazzoni
@ 2019-10-04  8:49     ` Heiko Thiery
  0 siblings, 0 replies; 18+ messages in thread
From: Heiko Thiery @ 2019-10-04  8:49 UTC (permalink / raw)
  To: buildroot

> The Github page says "
> Copy of RedBlack Balanced Tree Searching and Sorting Library -
> http://libredblack.sourceforge.net/". Does it make sense to use the
> original version from SourceForge instead ?

While taking a look into that we figured out that a (maybe more
common) lib called libavl can also be used for building the sysrepo.

Therefore now we will provide a package for that libavl instead of the
libredblack. This libavl is also used in debian so we think it is
better maintained.

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

* [Buildroot] [PATCH 4/9] package/libyang: add package
  2019-10-02  7:25   ` Thomas Petazzoni
@ 2019-10-04  8:49     ` Heiko Thiery
  0 siblings, 0 replies; 18+ messages in thread
From: Heiko Thiery @ 2019-10-04  8:49 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

> Should be just:
>
>         bool "libyang"
>
> > +     depends on !BR2_STATIC_LIBS
> > +     select BR2_PACKAGE_PCRE
>
> The home page at https://github.com/CESNET/libyang says:
>
>    note, that PCRE is supposed to be compiled with unicode support
>    (configure's options --enable-utf and --enable-unicode-properties)
>
> So I think you need:
>
>         select BR2_PACKAGE_PCRE_UTF
>
> Could you make sure it is indeed needed?

Your are right .. I added this.

--
Heiko

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

* [Buildroot] [PATCH 5/9] package/libnetconf2: add package
  2019-10-02  7:28   ` Thomas Petazzoni
@ 2019-10-04  8:51     ` Heiko Thiery
  2019-10-04  9:07       ` Thomas Petazzoni
  0 siblings, 1 reply; 18+ messages in thread
From: Heiko Thiery @ 2019-10-04  8:51 UTC (permalink / raw)
  To: buildroot

> > +################################################################################
> > +#
> > +# libnetconf2
> > +#
> > +################################################################################
> > +
> > +LIBNETCONF2_VERSION = v0.12-r2
> > +LIBNETCONF2_SITE = $(call github,CESNET,libnetconf2,$(LIBNETCONF2_VERSION))
> > +LIBNETCONF2_INSTALL_STAGING = YES
> > +LIBNETCONF2_LICENSE = BSD-3-Clause
> > +LIBNETCONF2_LICENSE_FILES = LICENSE
> > +LIBNETCONF2_DEPENDENCIES += libyang libssh
> > +HOST_LIBNETCONF2_DEPENDENCIES += host-libyang host-libssh
>
> Use = instead of +=
>
> > +
> > +LIBNETCONF2_CONF_OPTS += \
>
> Ditto.
>
> > +     -DENABLE_TLS=ON \
> > +     -DENABLE_SSH=ON \
>
> So SSH support is optional ? Why did you made it mandatory ?

For the target application that is used we need the LIBSSH_SERVER. But
you're right, this can be an optional.

I will enable it in the package that requiers it and let it disabled
for the host. With this the "host-libssh" support is not needed any
more.

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

* [Buildroot] [PATCH 6/9] package/sysrepo: add package
  2019-10-02  9:34   ` Thomas Petazzoni
@ 2019-10-04  8:52     ` Heiko Thiery
  0 siblings, 0 replies; 18+ messages in thread
From: Heiko Thiery @ 2019-10-04  8:52 UTC (permalink / raw)
  To: buildroot

> > +     depends on BR2_TOOLCHAIN_HAS_THREADS
> > +     depends on !BR2_STATIC_LIBS
> > +     depends on !BR2_TOOLCHAIN_USES_MUSL
>
> Could you add a comment that explains why it doesn't build on musl ?

This is invalid and I removed the dependency.

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

* [Buildroot] [PATCH 5/9] package/libnetconf2: add package
  2019-10-04  8:51     ` Heiko Thiery
@ 2019-10-04  9:07       ` Thomas Petazzoni
  0 siblings, 0 replies; 18+ messages in thread
From: Thomas Petazzoni @ 2019-10-04  9:07 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 4 Oct 2019 10:51:41 +0200
Heiko Thiery <heiko.thiery@gmail.com> wrote:

> > So SSH support is optional ? Why did you made it mandatory ?  
> 
> For the target application that is used we need the LIBSSH_SERVER. But
> you're right, this can be an optional.
> 
> I will enable it in the package that requiers it and let it disabled
> for the host. With this the "host-libssh" support is not needed any
> more.

OK, but if it's optional, we also want it to be optional for the target
variant of the package.

Thanks!

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

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

end of thread, other threads:[~2019-10-04  9:07 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-01 14:30 [Buildroot] [PATCH 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
2019-10-01 14:30 ` [Buildroot] [PATCH 2/9] package/libssh: " heiko.thiery at gmail.com
2019-10-01 14:30 ` [Buildroot] [PATCH 3/9] package/libredblack: add package heiko.thiery at gmail.com
2019-10-02  7:20   ` Thomas Petazzoni
2019-10-04  8:49     ` Heiko Thiery
2019-10-01 14:30 ` [Buildroot] [PATCH 4/9] package/libyang: " heiko.thiery at gmail.com
2019-10-02  7:25   ` Thomas Petazzoni
2019-10-04  8:49     ` Heiko Thiery
2019-10-01 14:30 ` [Buildroot] [PATCH 5/9] package/libnetconf2: " heiko.thiery at gmail.com
2019-10-02  7:28   ` Thomas Petazzoni
2019-10-04  8:51     ` Heiko Thiery
2019-10-04  9:07       ` Thomas Petazzoni
2019-10-01 14:30 ` [Buildroot] [PATCH 6/9] package/sysrepo: " heiko.thiery at gmail.com
2019-10-02  9:34   ` Thomas Petazzoni
2019-10-04  8:52     ` Heiko Thiery
2019-10-01 14:30 ` [Buildroot] [PATCH 7/9] package/netopeer2server: " heiko.thiery at gmail.com
2019-10-01 14:30 ` [Buildroot] [PATCH 8/9] package/netopeer2cli: " heiko.thiery at gmail.com
2019-10-01 14:30 ` [Buildroot] [PATCH 9/9] package/netopeer2keystored: " heiko.thiery at gmail.com

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.