All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies)
@ 2019-10-09 11:26 heiko.thiery at gmail.com
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
                   ` (9 more replies)
  0 siblings, 10 replies; 32+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-09 11:26 UTC (permalink / raw)
  To: buildroot

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

This patchset contains the netopeer2 package and the required
dependencies. Netopeer2 is a set of tools implementing network
configuration tools based on the NETCONF Protocol.

This includes the packages for libavl, libyang, libnetconf2, sysrepo,
netopeer2-server, netopeer2-cli, netopeer2-keystored.

Also add the host target support for libev and libssh. This is needed
for the install steps of sysrepo and netopeer2-server and
netopeer2-keystored.

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

---
Changes v1 -> v2:
  - replace libredblack with libavl because this is also supported by
    debian.
  - changes all over the place to integrate review comments.


Heiko Thiery (8):
  package/libev: use host-autotools-package macro
  package/libssh: use host-autotools-package macro
  package/libyang: add package
  package/libnetconf2: add package
  package/sysrepo: add package
  package/netopeer2-keystored: add package
  package/netopeer2-server: add package
  package/netopeer2-cli: add package

Michael Walle (1):
  package/libavl: add package

 DEVELOPERS                                    |  8 +++
 package/Config.in                             |  7 ++
 package/libavl/0001-fix-makefile.patch        | 49 ++++++++++++++
 package/libavl/Config.in                      | 13 ++++
 package/libavl/libavl.hash                    |  5 ++
 package/libavl/libavl.mk                      | 43 ++++++++++++
 package/libev/libev.mk                        |  1 +
 .../0001-Add-support-for-musl-libc.patch      | 65 +++++++++++++++++++
 package/libnetconf2/Config.in                 | 37 +++++++++++
 package/libnetconf2/libnetconf2.hash          |  2 +
 package/libnetconf2/libnetconf2.mk            | 52 +++++++++++++++
 package/libssh/libssh.mk                      |  1 +
 package/libyang/Config.in                     | 13 ++++
 package/libyang/libyang.hash                  |  2 +
 package/libyang/libyang.mk                    | 25 +++++++
 package/netopeer2-cli/Config.in               | 17 +++++
 package/netopeer2-cli/netopeer2-cli.hash      |  2 +
 package/netopeer2-cli/netopeer2-cli.mk        | 16 +++++
 package/netopeer2-keystored/Config.in         | 15 +++++
 .../netopeer2-keystored.hash                  |  2 +
 .../netopeer2-keystored.mk                    | 29 +++++++++
 package/netopeer2-server/Config.in            | 18 +++++
 .../netopeer2-server/netopeer2-server.hash    |  2 +
 package/netopeer2-server/netopeer2-server.mk  | 26 ++++++++
 package/sysrepo/Config.in                     | 27 ++++++++
 package/sysrepo/sysrepo.hash                  |  2 +
 package/sysrepo/sysrepo.mk                    | 37 +++++++++++
 27 files changed, 516 insertions(+)
 create mode 100644 package/libavl/0001-fix-makefile.patch
 create mode 100644 package/libavl/Config.in
 create mode 100644 package/libavl/libavl.hash
 create mode 100644 package/libavl/libavl.mk
 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
 create mode 100644 package/libyang/Config.in
 create mode 100644 package/libyang/libyang.hash
 create mode 100644 package/libyang/libyang.mk
 create mode 100644 package/netopeer2-cli/Config.in
 create mode 100644 package/netopeer2-cli/netopeer2-cli.hash
 create mode 100644 package/netopeer2-cli/netopeer2-cli.mk
 create mode 100644 package/netopeer2-keystored/Config.in
 create mode 100644 package/netopeer2-keystored/netopeer2-keystored.hash
 create mode 100644 package/netopeer2-keystored/netopeer2-keystored.mk
 create mode 100644 package/netopeer2-server/Config.in
 create mode 100644 package/netopeer2-server/netopeer2-server.hash
 create mode 100644 package/netopeer2-server/netopeer2-server.mk
 create mode 100644 package/sysrepo/Config.in
 create mode 100644 package/sysrepo/sysrepo.hash
 create mode 100644 package/sysrepo/sysrepo.mk

-- 
2.20.1

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

* [Buildroot] [PATCH v2 1/9] package/libev: use host-autotools-package macro
  2019-10-09 11:26 [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
@ 2019-10-09 11:26 ` heiko.thiery at gmail.com
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 2/9] package/libssh: " heiko.thiery at gmail.com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 32+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-09 11:26 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] 32+ messages in thread

* [Buildroot] [PATCH v2 2/9] package/libssh: use host-autotools-package macro
  2019-10-09 11:26 [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
@ 2019-10-09 11:26 ` heiko.thiery at gmail.com
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 3/9] package/libavl: add package heiko.thiery at gmail.com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 32+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-09 11:26 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] 32+ messages in thread

* [Buildroot] [PATCH v2 3/9] package/libavl: add package
  2019-10-09 11:26 [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 2/9] package/libssh: " heiko.thiery at gmail.com
@ 2019-10-09 11:26 ` heiko.thiery at gmail.com
  2019-10-09 12:25   ` Thomas Petazzoni
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 4/9] package/libyang: " heiko.thiery at gmail.com
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 32+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-09 11:26 UTC (permalink / raw)
  To: buildroot

From: Michael Walle <michael@walle.cc>

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>
---
 package/Config.in                      |  1 +
 package/libavl/0001-fix-makefile.patch | 49 ++++++++++++++++++++++++++
 package/libavl/Config.in               | 13 +++++++
 package/libavl/libavl.hash             |  5 +++
 package/libavl/libavl.mk               | 43 ++++++++++++++++++++++
 5 files changed, 111 insertions(+)
 create mode 100644 package/libavl/0001-fix-makefile.patch
 create mode 100644 package/libavl/Config.in
 create mode 100644 package/libavl/libavl.hash
 create mode 100644 package/libavl/libavl.mk

diff --git a/package/Config.in b/package/Config.in
index 47b602c547..e84624ccdf 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1713,6 +1713,7 @@ menu "Other"
 	source "package/lapack/Config.in"
 	source "package/libargtable2/Config.in"
 	source "package/libatomic_ops/Config.in"
+	source "package/libavl/Config.in"
 	source "package/libb64/Config.in"
 	source "package/libbsd/Config.in"
 	source "package/libcap/Config.in"
diff --git a/package/libavl/0001-fix-makefile.patch b/package/libavl/0001-fix-makefile.patch
new file mode 100644
index 0000000000..6cc96e5f74
--- /dev/null
+++ b/package/libavl/0001-fix-makefile.patch
@@ -0,0 +1,49 @@
+makefile: fix compilation and installation
+
+This was originally taken from:
+https://sources.debian.org/data/main/liba/libavl/0.3.5-4/debian/patches/fix-makefile
+
+Unfortunately, the URL does not end in ".patch", therefore we cannot
+use it in the FOO_PATCH variable directly.
+
+Signed-off-by: Michael Walle <michael@walle.cc>
+
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -6,7 +6,8 @@
+ LDCONFIG ?= /sbin/ldconfig
+ 
+ # Some suggestions: (-mcpu= generates i386 compatible code)
+-CFLAGS ?= -O2 -fomit-frame-pointer -pipe -mcpu=i686 -w
++CFLAGS ?= -O2 -pipe -Wall -Werror
++CFLAGS += -fPIC
+ #CFLAGS = -O2 -fomit-frame-pointer -pipe -march=i586 -Wall -g
+ #CFLAGS = -O6 -fomit-frame-pointer -pipe -march=i586 -Wall -ansi -pedantic
+ #CFLAGS = -O6 -fomit-frame-pointer -pipe -march=i686 -Wall -ansi -pedantic
+@@ -34,20 +35,21 @@
+ 	$(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
+ 
+ $(LIBRARY): avl.o
+-	$(CC) -nostdlib -shared -Wl,-soname,libavl.so.1 $^ -o $@ -lc
++	$(CC) $(LDFLAGS) -shared -Wl,-soname,libavl.so.1 $^ -o $@ -lc
+ 
+ clean:
+ 	$(RM) *.o $(PROGRAMS) libavl.*
+ 
+ install: all
+ 	$(INSTALL) -d $(DESTDIR)$(libdir)
+-	$(INSTALL) avl.h $(DESTDIR)$(includedir)
+-	$(INSTALL) $(LIBRARIES) $(DESTDIR)$(libdir)
+-	for i in $(LIBRARIES); do\
++	$(INSTALL) -d $(DESTDIR)$(includedir)
++	$(INSTALL) -m 644 avl.h $(DESTDIR)$(includedir)
++	$(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
++	for i in $(LIBRARY); do\
+ 		$(LN) -sf $$i $(DESTDIR)$(libdir)/$${i%.*};\
+ 		$(LN) -sf $${i%.*} $(DESTDIR)$(libdir)/$${i%.*.*};\
+ 	done
+-	-$(LDCONFIG)
++	#-$(LDCONFIG)
+ 
+ .PHONY: clean install all
+ .PRECIOUS: %.h %.c
diff --git a/package/libavl/Config.in b/package/libavl/Config.in
new file mode 100644
index 0000000000..20d3c5ef7d
--- /dev/null
+++ b/package/libavl/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_LIBAVL
+	bool "libavl"
+	depends on !BR2_STATIC_LIBS
+	help
+	  AVLTree is a small implementation of AVL trees for the C
+	  programming language.
+
+	  https://packages.debian.org/buster/libavl1
+
+	  This is not the GNU AVL library by Ben Pfaff.
+
+comment "libavl needs a toolchain w/ dynamic library"
+	depends on BR2_STATIC_LIBS
diff --git a/package/libavl/libavl.hash b/package/libavl/libavl.hash
new file mode 100644
index 0000000000..5c668603a3
--- /dev/null
+++ b/package/libavl/libavl.hash
@@ -0,0 +1,5 @@
+# From http://ftp.debian.org/debian/pool/main/liba/libavl/libavl_0.3.5-4.dsc
+sha256	4497b9e22cdd61ae2fa893b9d5fd6213dc306726d7c4be08c29e173622dca8a0	libavl_0.3.5.orig.tar.gz
+
+# Hash for license files:
+sha256	767a9accfe3b110153b567983b98889469dfaae02899a632aeadbb81ad611293	COPYING
diff --git a/package/libavl/libavl.mk b/package/libavl/libavl.mk
new file mode 100644
index 0000000000..ad561c43bf
--- /dev/null
+++ b/package/libavl/libavl.mk
@@ -0,0 +1,43 @@
+################################################################################
+#
+# libavl
+#
+################################################################################
+
+LIBAVL_VERSION = 0.3.5
+LIBAVL_SITE = http://ftp.debian.org/debian/pool/main/liba/libavl
+LIBAVL_SOURCE = libavl_$(LIBAVL_VERSION).orig.tar.gz
+LIBAVL_LICENSE = LGPL-2.0+
+LIBAVL_LICENSE_FILES = COPYING
+LIBAVL_INSTALL_STAGING = YES
+
+LIBAVL_CFLAGS = -fPIC
+HOST_LIBAVL_CFLAGS = -fPIC
+
+define LIBAVL_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
+		CFLAGS="$(LIBAVL_CFLAGS)"
+endef
+
+define LIBAVL_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) install \
+		prefix=/usr DESTDIR=$(STAGING_DIR)
+endef
+
+define LIBAVL_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) install \
+		prefix=/usr DESTDIR=$(TARGET_DIR)
+endef
+
+define HOST_LIBAVL_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) \
+		CFLAGS="$(HOST_LIBAVL_CFLAGS)"
+endef
+
+define HOST_LIBAVL_INSTALL_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) install \
+		prefix=/usr DESTDIR=$(HOST_DIR)
+endef
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))
-- 
2.20.1

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

* [Buildroot] [PATCH v2 4/9] package/libyang: add package
  2019-10-09 11:26 [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
                   ` (2 preceding siblings ...)
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 3/9] package/libavl: add package heiko.thiery at gmail.com
@ 2019-10-09 11:26 ` heiko.thiery at gmail.com
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 5/9] package/libnetconf2: " heiko.thiery at gmail.com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 32+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-09 11:26 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                   |  3 +++
 package/Config.in            |  1 +
 package/libyang/Config.in    | 13 +++++++++++++
 package/libyang/libyang.hash |  2 ++
 package/libyang/libyang.mk   | 25 +++++++++++++++++++++++++
 5 files changed, 44 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 05f33eb2c3..3a7b5f3bbc 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1038,6 +1038,9 @@ F:	package/python-markdown/
 F:	package/python-remi/
 F:	package/python-sip/
 
+N:	Heiko Thiery <heiko.thiery@gmail.com>
+F:	package/libyang/
+
 N:	Henrique Camargo <henrique@henriquecamargo.com>
 F:	package/json-glib/
 
diff --git a/package/Config.in b/package/Config.in
index e84624ccdf..ca3d4d5d33 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1641,6 +1641,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..ebe51ff099
--- /dev/null
+++ b/package/libyang/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_LIBYANG
+	bool "libyang"
+	depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_PCRE
+	select BR2_PACKAGE_PCRE_UCP
+	help
+	  Libyang is YANG data modeling language parser and toolkit
+	  written (and providing API) in C.
+
+	  https://github.com/CESNET/libyang
+
+comment "libyang needs a toolchain w/ dynamic library"
+	depends on BR2_STATIC_LIBS
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..a120f51293
--- /dev/null
+++ b/package/libyang/libyang.mk
@@ -0,0 +1,25 @@
+################################################################################
+#
+# 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
+
+HOST_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] 32+ messages in thread

* [Buildroot] [PATCH v2 5/9] package/libnetconf2: add package
  2019-10-09 11:26 [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
                   ` (3 preceding siblings ...)
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 4/9] package/libyang: " heiko.thiery at gmail.com
@ 2019-10-09 11:26 ` heiko.thiery at gmail.com
  2019-10-09 12:15   ` Thomas Petazzoni
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 6/9] package/sysrepo: " heiko.thiery at gmail.com
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 32+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-09 11:26 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      | 65 +++++++++++++++++++
 package/libnetconf2/Config.in                 | 37 +++++++++++
 package/libnetconf2/libnetconf2.hash          |  2 +
 package/libnetconf2/libnetconf2.mk            | 52 +++++++++++++++
 6 files changed, 158 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 3a7b5f3bbc..56b92cf82a 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1039,6 +1039,7 @@ F:	package/python-remi/
 F:	package/python-sip/
 
 N:	Heiko Thiery <heiko.thiery@gmail.com>
+F:	package/libnetconf2/
 F:	package/libyang/
 
 N:	Henrique Camargo <henrique@henriquecamargo.com>
diff --git a/package/Config.in b/package/Config.in
index ca3d4d5d33..c091ad2bd8 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1608,6 +1608,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..44023a391d
--- /dev/null
+++ b/package/libnetconf2/0001-Add-support-for-musl-libc.patch
@@ -0,0 +1,65 @@
+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.
+
+Patch comes from upstream commit:
+https://github.com/CESNET/libnetconf2/commit/153fe40bd60499677e825e66501e8601536e0323
+
+Signed-of-by: Heiko Thiery <heiko.thiery@kontron.com>
+---
+ 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..986e49fac5
--- /dev/null
+++ b/package/libnetconf2/Config.in
@@ -0,0 +1,37 @@
+config BR2_PACKAGE_LIBNETCONF2
+	bool "libnetconf2"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_USE_MMU
+	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.
+
+	  https://github.com/CESNET/libnetconf2
+
+config BR2_PACKAGE_LIBNETCONF2_SSH
+	bool
+	help
+	  SSH support for libnetconf2
+
+config BR2_PACKAGE_LIBNETCONF2_TLS
+	bool
+	help
+	  TLS support for libnetconf2
+
+config BR2_PACKAGE_HOST_LIBNETCONF2_SSH
+	bool
+	help
+	  SSH support for host-libnetconf2
+
+config BR2_PACKAGE_HOST_LIBNETCONF2_TLS
+	bool
+	help
+	  TLS support for host-libnetconf2
+
+comment "libnetconf2 needs a toolchain w/ threads, dynamic libraray"
+	depends on BR2_USE_MMU
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
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..0b44d8e44d
--- /dev/null
+++ b/package/libnetconf2/libnetconf2.mk
@@ -0,0 +1,52 @@
+################################################################################
+#
+# 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
+HOST_LIBNETCONF2_DEPENDENCIES = host-libyang
+
+LIBNETCONF2_CONF_OPTS = \
+	-DENABLE_BUILD_TESTS=OFF \
+	-DENABLE_VALGRIND_TESTS=OFF
+
+ifeq ($(BR2_PACKAGE_LIBNETCONF2_SSH), y)
+LIBNETCONF2_CONF_OPTS += -DENABLE_SSH=ON
+LIBNETCONF2_DEPENDENCIES += libssh
+else
+LIBNETCONF2_CONF_OPTS += -DENABLE_SSH=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_LIBNETCONF2_TLS), y)
+LIBNETCONF2_CONF_OPTS += -DENABLE_TLS=ON
+LIBNETCONF2_DEPENDENCIES += openssl
+else
+LIBNETCONF2_CONF_OPTS += -DENABLE_TLS=OFF
+endif
+
+HOST_LIBNETCONF2_CONF_OPTS = \
+	-DENABLE_BUILD_TESTS=OFF \
+	-DENABLE_VALGRIND_TESTS=OFF
+
+ifeq ($(BR2_PACKAGE_HOST_LIBNETCONF2_SSH), y)
+HOST_LIBNETCONF2_CONF_OPTS += -DENABLE_SSH=ON
+HOST_LIBNETCONF2_DEPENDENCIES += host-libssh
+else
+HOST_LIBNETCONF2_CONF_OPTS += -DENABLE_SSH=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_HOST_LIBNETCONF2_TLS), y)
+HOST_LIBNETCONF2_CONF_OPTS += -DENABLE_TLS=ON
+HOST_LIBNETCONF2_DEPENDENCIES += host-openssl
+else
+HOST_LIBNETCONF2_CONF_OPTS += -DENABLE_TLS=OFF
+endif
+
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))
-- 
2.20.1

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

* [Buildroot] [PATCH v2 6/9] package/sysrepo: add package
  2019-10-09 11:26 [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
                   ` (4 preceding siblings ...)
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 5/9] package/libnetconf2: " heiko.thiery at gmail.com
@ 2019-10-09 11:26 ` heiko.thiery at gmail.com
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 7/9] package/netopeer2-keystored: " heiko.thiery at gmail.com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 32+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-09 11:26 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    | 27 ++++++++++++++++++++++++++
 package/sysrepo/sysrepo.hash |  2 ++
 package/sysrepo/sysrepo.mk   | 37 ++++++++++++++++++++++++++++++++++++
 5 files changed, 68 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 56b92cf82a..143b277dc4 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1041,6 +1041,7 @@ F:	package/python-sip/
 N:	Heiko Thiery <heiko.thiery@gmail.com>
 F:	package/libnetconf2/
 F:	package/libyang/
+F:	package/sysrepo/
 
 N:	Henrique Camargo <henrique@henriquecamargo.com>
 F:	package/json-glib/
diff --git a/package/Config.in b/package/Config.in
index c091ad2bd8..80bc83e8cd 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1668,6 +1668,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..97cdd95800
--- /dev/null
+++ b/package/sysrepo/Config.in
@@ -0,0 +1,27 @@
+config BR2_PACKAGE_SYSREPO
+	bool "sysrepo"
+	depends on BR2_USE_MMU # libnetconf2
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" # host-protbuf
+	depends on BR2_HOST_GCC_AT_LEAST_4_8 # host-protobuf
+	select BR2_PACKAGE_LIBEV
+	select BR2_PACKAGE_LIBNETCONF2
+	select BR2_PACKAGE_LIBNETCONF2_SSH
+	select BR2_PACKAGE_LIBNETCONF2_TLS
+	select BR2_PACKAGE_LIBAVL
+	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.
+
+	  https://github.com/sysrepo
+
+comment "sysrepo needs a toolchain w/ C++, threads, dynamic libraray, host gcc >= 4.8"
+	depends on BR2_USE_MMU
+	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP \
+		|| !BR2_TOOLCHAIN_HAS_THREADS || !BR2_HOST_GCC_AT_LEAST_4_8
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
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..ea50b1af7e
--- /dev/null
+++ b/package/sysrepo/sysrepo.mk
@@ -0,0 +1,37 @@
+################################################################################
+#
+# 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 libavl libyang pcre protobuf-c host-sysrepo
+HOST_SYSREPO_DEPENDENCIES += host-libev host-libnetconf2 host-libavl host-libyang host-pcre host-protobuf-c
+
+SYSREPO_CONF_OPTS += \
+	-DGEN_PYTHON2_TESTS=OFF \
+	-DENABLE_TESTS=OFF \
+	-DCALL_SYSREPOCTL_BIN=$(HOST_DIR)/bin/sysrepoctl \
+	-DCALL_SYSREPOCFG_BIN=$(HOST_DIR)/bin/sysrepocfg
+
+# On ARM, this is needed to prevent unaligned memory access with an optimized
+# build .. https://github.com/sysrepo/sysrepo/issues/947
+SYSREPO_CONF_OPTS += -DUSE_SR_MEM_MGMT=OFF
+
+ifeq ($(BR2_INIT_SYSTEMD),y)
+SYSREPO_CONF_OPTS += -DWITH_SYSTEMD=ON
+endif
+
+HOST_SYSREPO_CONF_OPTS += \
+	-DGEN_PYTHON2_TESTS=OFF \
+	-DENABLE_TESTS=OFF \
+	-DCALL_TARGET_BINS_DIRECTLY=OFF \
+	-DREPOSITORY_LOC=$(BASE_TARGET_DIR)/etc/sysrepo \
+	-DSUBSCRIPTIONS_SOCKET_DIR=$(HOST_DIR)/var/run/sysrepo-subscriptions
+
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))
-- 
2.20.1

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

* [Buildroot] [PATCH v2 7/9] package/netopeer2-keystored: add package
  2019-10-09 11:26 [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
                   ` (5 preceding siblings ...)
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 6/9] package/sysrepo: " heiko.thiery at gmail.com
@ 2019-10-09 11:26 ` heiko.thiery at gmail.com
  2019-10-09 12:12   ` Thomas Petazzoni
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 8/9] package/netopeer2-server: " heiko.thiery at gmail.com
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 32+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-09 11:26 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/netopeer2-keystored/Config.in         | 15 ++++++++++
 .../netopeer2-keystored.hash                  |  2 ++
 .../netopeer2-keystored.mk                    | 29 +++++++++++++++++++
 5 files changed, 48 insertions(+)
 create mode 100644 package/netopeer2-keystored/Config.in
 create mode 100644 package/netopeer2-keystored/netopeer2-keystored.hash
 create mode 100644 package/netopeer2-keystored/netopeer2-keystored.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 143b277dc4..2eb3ae905b 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1041,6 +1041,7 @@ F:	package/python-sip/
 N:	Heiko Thiery <heiko.thiery@gmail.com>
 F:	package/libnetconf2/
 F:	package/libyang/
+F:	package/netopeer2-keystored/
 F:	package/sysrepo/
 
 N:	Henrique Camargo <henrique@henriquecamargo.com>
diff --git a/package/Config.in b/package/Config.in
index 80bc83e8cd..fbe5ab2306 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1647,6 +1647,7 @@ menu "Networking"
 	source "package/mongoose/Config.in"
 	source "package/nanomsg/Config.in"
 	source "package/neon/Config.in"
+	source "package/netopeer2-keystored/Config.in"
 	source "package/nghttp2/Config.in"
 	source "package/norm/Config.in"
 	source "package/nss-mdns/Config.in"
diff --git a/package/netopeer2-keystored/Config.in b/package/netopeer2-keystored/Config.in
new file mode 100644
index 0000000000..e25f0d70ce
--- /dev/null
+++ b/package/netopeer2-keystored/Config.in
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_NETOPEER2_KEYSTORED
+	bool "netopeer2-keystore daemon"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS
+	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 toolchain w/ threads, dynamic libraray"
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/netopeer2-keystored/netopeer2-keystored.hash b/package/netopeer2-keystored/netopeer2-keystored.hash
new file mode 100644
index 0000000000..a54b062a9d
--- /dev/null
+++ b/package/netopeer2-keystored/netopeer2-keystored.hash
@@ -0,0 +1,2 @@
+sha256 59688271be4fecbbee671fc7eb3dc0538b13b4baab53e923e26eaeb33e6f7ec0  netopeer2-keystored-v0.7-r2.tar.gz
+sha256 932b75a8610a5c58e0fe0f70f8e4ebbcf3a2392acc16a88e95aebcdbdb9245e0  LICENSE
diff --git a/package/netopeer2-keystored/netopeer2-keystored.mk b/package/netopeer2-keystored/netopeer2-keystored.mk
new file mode 100644
index 0000000000..8160c53867
--- /dev/null
+++ b/package/netopeer2-keystored/netopeer2-keystored.mk
@@ -0,0 +1,29 @@
+################################################################################
+#
+# netopeer2-keystored
+#
+################################################################################
+
+NETOPEER2_KEYSTORED_VERSION = v0.7-r2
+NETOPEER2_KEYSTORED_SITE = $(call github,CESNET,Netopeer2,$(NETOPEER2_KEYSTORED_VERSION))
+NETOPEER2_KEYSTORED_LICENSE = BSD-3-Clause
+NETOPEER2_KEYSTORED_LICENSE_FILES = LICENSE
+NETOPEER2_KEYSTORED_SUBDIR = keystored
+NETOPEER2_KEYSTORED_DEPENDENCIES += host-sysrepo sysrepo
+
+NETOPEER2_KEYSTORED_CONF_OPTS += \
+	-DKEYSTORED_DEFER_SSH_KEY=ON \
+	-DSSH_KEY_INSTALL=ON \
+	-DMODEL_INSTALL=ON \
+	-DSYSREPOCTL_EXECUTABLE=$(HOST_DIR)/bin/sysrepoctl \
+	-DSYSREPOCFG_EXECUTABLE=$(HOST_DIR)/bin/sysrepocfg
+
+define NETOPEER2_KEYSTORED_PERMISSIONS
+	/etc/sysrepo/data/ietf-keystore.persist f 600 0 0 - - - - -
+	/etc/sysrepo/data/ietf-keystore.running f 600 0 0 - - - - -
+	/etc/sysrepo/data/ietf-keystore.running.lock f 600 0 0 - - - - -
+	/etc/sysrepo/data/ietf-keystore.startup f 600 0 0 - - - - -
+	/etc/sysrepo/data/ietf-keystore.startup.lock f 600 0 0 - - - - -
+endef
+
+$(eval $(cmake-package))
-- 
2.20.1

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

* [Buildroot] [PATCH v2 8/9] package/netopeer2-server: add package
  2019-10-09 11:26 [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
                   ` (6 preceding siblings ...)
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 7/9] package/netopeer2-keystored: " heiko.thiery at gmail.com
@ 2019-10-09 11:26 ` heiko.thiery at gmail.com
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 9/9] package/netopeer2-cli: " heiko.thiery at gmail.com
  2019-10-09 15:57 ` [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies) Michael Walle
  9 siblings, 0 replies; 32+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-09 11:26 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/netopeer2-server/Config.in            | 18 +++++++++++++
 .../netopeer2-server/netopeer2-server.hash    |  2 ++
 package/netopeer2-server/netopeer2-server.mk  | 26 +++++++++++++++++++
 5 files changed, 48 insertions(+)
 create mode 100644 package/netopeer2-server/Config.in
 create mode 100644 package/netopeer2-server/netopeer2-server.hash
 create mode 100644 package/netopeer2-server/netopeer2-server.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 2eb3ae905b..6fe5544151 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1042,6 +1042,7 @@ N:	Heiko Thiery <heiko.thiery@gmail.com>
 F:	package/libnetconf2/
 F:	package/libyang/
 F:	package/netopeer2-keystored/
+F:	package/netopeer2-server/
 F:	package/sysrepo/
 
 N:	Henrique Camargo <henrique@henriquecamargo.com>
diff --git a/package/Config.in b/package/Config.in
index fbe5ab2306..a38569e12c 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1648,6 +1648,7 @@ menu "Networking"
 	source "package/nanomsg/Config.in"
 	source "package/neon/Config.in"
 	source "package/netopeer2-keystored/Config.in"
+	source "package/netopeer2-server/Config.in"
 	source "package/nghttp2/Config.in"
 	source "package/norm/Config.in"
 	source "package/nss-mdns/Config.in"
diff --git a/package/netopeer2-server/Config.in b/package/netopeer2-server/Config.in
new file mode 100644
index 0000000000..01d35400dc
--- /dev/null
+++ b/package/netopeer2-server/Config.in
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_NETOPEER2_SERVER
+	bool "netopeer2server"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_LIBYANG
+	select BR2_PACKAGE_LIBNETCONF2
+	select BR2_PACKAGE_LIBNETCONF2_SSH
+	select BR2_PACKAGE_LIBNETCONF2_TLS
+	select BR2_PACKAGE_SYSREPO
+	select BR2_PACKAGE_NETOPEER2_KEYSTORED
+	help
+	  Netopeer2 is a set of tools implementing network
+	  configuration tools based on the NETCONF Protocol.
+
+	  https://github.com/CESNET/Netopeer2
+
+comment "netopeer2server needs a toolchain w/ threads, dynamic libraray"
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/netopeer2-server/netopeer2-server.hash b/package/netopeer2-server/netopeer2-server.hash
new file mode 100644
index 0000000000..78b377a286
--- /dev/null
+++ b/package/netopeer2-server/netopeer2-server.hash
@@ -0,0 +1,2 @@
+sha256 59688271be4fecbbee671fc7eb3dc0538b13b4baab53e923e26eaeb33e6f7ec0  netopeer2-server-v0.7-r2.tar.gz
+sha256 932b75a8610a5c58e0fe0f70f8e4ebbcf3a2392acc16a88e95aebcdbdb9245e0  LICENSE
diff --git a/package/netopeer2-server/netopeer2-server.mk b/package/netopeer2-server/netopeer2-server.mk
new file mode 100644
index 0000000000..0ca4c50f96
--- /dev/null
+++ b/package/netopeer2-server/netopeer2-server.mk
@@ -0,0 +1,26 @@
+################################################################################
+#
+# netopeer2-server
+#
+################################################################################
+
+NETOPEER2_SERVER_VERSION = v0.7-r2
+NETOPEER2_SERVER_SITE = $(call github,CESNET,Netopeer2,$(NETOPEER2_SERVER_VERSION))
+NETOPEER2_SERVER_LICENSE = BSD-3-Clause
+NETOPEER2_SERVER_LICENSE_FILES = LICENSE
+NETOPEER2_SERVER_SUBDIR = server
+NETOPEER2_SERVER_DEPENDENCIES += libyang sysrepo
+
+NETOPEER2_SERVER_CONF_OPTS += \
+	-DENABLE_CONFIGURATION=ON \
+	-DKEYSTORED_KEYS_DIR=/etc/keystored/keys
+
+define NETOPEER2_SERVER_PERMISSIONS
+	/etc/sysrepo/data/ietf-netconf-server.persist f 600 0 0 - - - - -
+	/etc/sysrepo/data/ietf-netconf-server.running f 600 0 0 - - - - -
+	/etc/sysrepo/data/ietf-netconf-server.running.lock f 600 0 0 - - - - -
+	/etc/sysrepo/data/ietf-netconf-server.startup f 600 0 0 - - - - -
+	/etc/sysrepo/data/ietf-netconf-server.startup.lock f 600 0 0 - - - - -
+endef
+
+$(eval $(cmake-package))
-- 
2.20.1

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

* [Buildroot] [PATCH v2 9/9] package/netopeer2-cli: add package
  2019-10-09 11:26 [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
                   ` (7 preceding siblings ...)
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 8/9] package/netopeer2-server: " heiko.thiery at gmail.com
@ 2019-10-09 11:26 ` heiko.thiery at gmail.com
  2019-10-09 12:30   ` Thomas Petazzoni
  2019-10-09 15:57 ` [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies) Michael Walle
  9 siblings, 1 reply; 32+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-09 11:26 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/netopeer2-cli/Config.in          | 17 +++++++++++++++++
 package/netopeer2-cli/netopeer2-cli.hash |  2 ++
 package/netopeer2-cli/netopeer2-cli.mk   | 16 ++++++++++++++++
 5 files changed, 37 insertions(+)
 create mode 100644 package/netopeer2-cli/Config.in
 create mode 100644 package/netopeer2-cli/netopeer2-cli.hash
 create mode 100644 package/netopeer2-cli/netopeer2-cli.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 6fe5544151..f8b9648fdc 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1041,6 +1041,7 @@ F:	package/python-sip/
 N:	Heiko Thiery <heiko.thiery@gmail.com>
 F:	package/libnetconf2/
 F:	package/libyang/
+F:	package/netopeer2-cli/
 F:	package/netopeer2-keystored/
 F:	package/netopeer2-server/
 F:	package/sysrepo/
diff --git a/package/Config.in b/package/Config.in
index a38569e12c..21aa793276 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1647,6 +1647,7 @@ menu "Networking"
 	source "package/mongoose/Config.in"
 	source "package/nanomsg/Config.in"
 	source "package/neon/Config.in"
+	source "package/netopeer2-cli/Config.in"
 	source "package/netopeer2-keystored/Config.in"
 	source "package/netopeer2-server/Config.in"
 	source "package/nghttp2/Config.in"
diff --git a/package/netopeer2-cli/Config.in b/package/netopeer2-cli/Config.in
new file mode 100644
index 0000000000..eb771390be
--- /dev/null
+++ b/package/netopeer2-cli/Config.in
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_NETOPEER2_CLI
+	bool "netopeer2cli"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_LIBYANG
+	select BR2_PACKAGE_LIBNETCONF2
+	select BR2_PACKAGE_LIBNETCONF2_SSH
+	select BR2_PACKAGE_LIBNETCONF2_TLS
+	select BR2_PACKAGE_SYSREPO
+	help
+	  Netopeer2 CLI is a simple command line interface to
+	  connect to a NETCONF server (device).
+
+	  https://github.com/CESNET/Netopeer2
+
+comment "netopeer2cli needs a toolchain w/ threads, dynamic libraray"
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/netopeer2-cli/netopeer2-cli.hash b/package/netopeer2-cli/netopeer2-cli.hash
new file mode 100644
index 0000000000..031b0265c2
--- /dev/null
+++ b/package/netopeer2-cli/netopeer2-cli.hash
@@ -0,0 +1,2 @@
+sha256 59688271be4fecbbee671fc7eb3dc0538b13b4baab53e923e26eaeb33e6f7ec0  netopeer2-cli-v0.7-r2.tar.gz
+sha256 932b75a8610a5c58e0fe0f70f8e4ebbcf3a2392acc16a88e95aebcdbdb9245e0  LICENSE
diff --git a/package/netopeer2-cli/netopeer2-cli.mk b/package/netopeer2-cli/netopeer2-cli.mk
new file mode 100644
index 0000000000..75192cc935
--- /dev/null
+++ b/package/netopeer2-cli/netopeer2-cli.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# netopeer2-cli
+#
+################################################################################
+
+NETOPEER2_CLI_VERSION = v0.7-r2
+NETOPEER2_CLI_SITE = $(call github,CESNET,Netopeer2,$(NETOPEER2_CLI_VERSION))
+NETOPEER2_CLI_LICENSE = BSD-3-Clause
+NETOPEER2_CLI_LICENSE_FILES = LICENSE
+NETOPEER2_CLI_SUBDIR = cli
+NETOPEER2_CLI_INSTALL_STAGING = YES
+NETOPEER2_CLI_DEPENDENCIES += libyang
+NETOPEER2_CLI_DEPENDENCIES += sysrepo
+
+$(eval $(cmake-package))
-- 
2.20.1

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

* [Buildroot] [PATCH v2 7/9] package/netopeer2-keystored: add package
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 7/9] package/netopeer2-keystored: " heiko.thiery at gmail.com
@ 2019-10-09 12:12   ` Thomas Petazzoni
  2019-10-09 13:14     ` Heiko Thiery
  0 siblings, 1 reply; 32+ messages in thread
From: Thomas Petazzoni @ 2019-10-09 12:12 UTC (permalink / raw)
  To: buildroot

Hello Heiko,

Sorry I didn't had the chance to review the remainder of your first
iteration, but there was one main issue about the netopeer2 package.
See below.

On Wed,  9 Oct 2019 13:26:54 +0200
heiko.thiery at gmail.com wrote:

> +	select BR2_PACKAGE_SYSREPO
> +	select BR2_PACKAGE_SYSREPO

Duplicate select.

Also, sysrepo has plenty of "depends on". They *all* need to be
replicated in the netopeer2 package.

> diff --git a/package/netopeer2-keystored/netopeer2-keystored.mk b/package/netopeer2-keystored/netopeer2-keystored.mk
> new file mode 100644
> index 0000000000..8160c53867
> --- /dev/null
> +++ b/package/netopeer2-keystored/netopeer2-keystored.mk
> @@ -0,0 +1,29 @@
> +################################################################################
> +#
> +# netopeer2-keystored
> +#
> +################################################################################
> +
> +NETOPEER2_KEYSTORED_VERSION = v0.7-r2
> +NETOPEER2_KEYSTORED_SITE = $(call github,CESNET,Netopeer2,$(NETOPEER2_KEYSTORED_VERSION))

This is the exact same source code you are fetching in
netopeer2-keystored, netopeer2-server and netopeer2-cli. We do not want
3 separate Buildroot packages, but only one. Of course, it can have
sub-options in the Config.in file so that the user can selectively
enable keystored, cli and/or server.

But generally speaking in Buildroot, the rule is one upstream project
== one package. We do have a few exceptions to this rule for various
reasons, but unless there's a good and strong justification, we like to
keep this one upstream project == one package rule in place.

> +NETOPEER2_KEYSTORED_LICENSE = BSD-3-Clause
> +NETOPEER2_KEYSTORED_LICENSE_FILES = LICENSE
> +NETOPEER2_KEYSTORED_SUBDIR = keystored
> +NETOPEER2_KEYSTORED_DEPENDENCIES += host-sysrepo sysrepo

Just = for unconditional assignments.

> +
> +NETOPEER2_KEYSTORED_CONF_OPTS += \

Ditto.

> +	-DKEYSTORED_DEFER_SSH_KEY=ON \
> +	-DSSH_KEY_INSTALL=ON \
> +	-DMODEL_INSTALL=ON \
> +	-DSYSREPOCTL_EXECUTABLE=$(HOST_DIR)/bin/sysrepoctl \
> +	-DSYSREPOCFG_EXECUTABLE=$(HOST_DIR)/bin/sysrepocfg
> +
> +define NETOPEER2_KEYSTORED_PERMISSIONS
> +	/etc/sysrepo/data/ietf-keystore.persist f 600 0 0 - - - - -
> +	/etc/sysrepo/data/ietf-keystore.running f 600 0 0 - - - - -
> +	/etc/sysrepo/data/ietf-keystore.running.lock f 600 0 0 - - - - -
> +	/etc/sysrepo/data/ietf-keystore.startup f 600 0 0 - - - - -
> +	/etc/sysrepo/data/ietf-keystore.startup.lock f 600 0 0 - - - - -
> +endef
> +
> +$(eval $(cmake-package))

Thanks!

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

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

* [Buildroot] [PATCH v2 5/9] package/libnetconf2: add package
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 5/9] package/libnetconf2: " heiko.thiery at gmail.com
@ 2019-10-09 12:15   ` Thomas Petazzoni
  2019-10-09 12:54     ` Heiko Thiery
  0 siblings, 1 reply; 32+ messages in thread
From: Thomas Petazzoni @ 2019-10-09 12:15 UTC (permalink / raw)
  To: buildroot

Hello Heiko,

On Wed,  9 Oct 2019 13:26:52 +0200
heiko.thiery at gmail.com wrote:

> diff --git a/package/libnetconf2/Config.in b/package/libnetconf2/Config.in
> new file mode 100644
> index 0000000000..986e49fac5
> --- /dev/null
> +++ b/package/libnetconf2/Config.in
> @@ -0,0 +1,37 @@
> +config BR2_PACKAGE_LIBNETCONF2
> +	bool "libnetconf2"
> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	depends on !BR2_STATIC_LIBS
> +	depends on BR2_USE_MMU
> +	select BR2_PACKAGE_LIBYANG
> +	select BR2_PACKAGE_LIBSSH
> +	select BR2_PACKAGE_LIBSSH_SERVER

I thought libssh was now an optional dependency ?

> +	help
> +	  libnetconf2 is a NETCONF library in C intended for building
> +	  NETCONF clients and servers.
> +
> +	  https://github.com/CESNET/libnetconf2
> +
> +config BR2_PACKAGE_LIBNETCONF2_SSH
> +	bool
> +	help
> +	  SSH support for libnetconf2
> +
> +config BR2_PACKAGE_LIBNETCONF2_TLS
> +	bool
> +	help
> +	  TLS support for libnetconf2

Do we need configurable options for this ? In general, we prefer to
have automatic dependencies, i.e just rely on whether a dependent
package is enabled or not. This would give in your .mk file:

+ifeq ($(BR2_PACKAGE_LIBSSH_SERVER),y)
+LIBNETCONF2_CONF_OPTS += -DENABLE_SSH=ON
+LIBNETCONF2_DEPENDENCIES += libssh
+else
+LIBNETCONF2_CONF_OPTS += -DENABLE_SSH=OFF
+endif

> +config BR2_PACKAGE_HOST_LIBNETCONF2_SSH
> +	bool
> +	help
> +	  SSH support for host-libnetconf2
> +
> +config BR2_PACKAGE_HOST_LIBNETCONF2_TLS
> +	bool
> +	help
> +	  TLS support for host-libnetconf2

We generally don't make host packages configurable, and if they are,
certainly not with options in Config.in, but in Config.in.host. Do you
really need the host variant of libnetconf2 to have SSL/TLS support ?

Thanks!

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

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

* [Buildroot] [PATCH v2 3/9] package/libavl: add package
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 3/9] package/libavl: add package heiko.thiery at gmail.com
@ 2019-10-09 12:25   ` Thomas Petazzoni
  2019-10-09 16:04     ` Michael Walle
  0 siblings, 1 reply; 32+ messages in thread
From: Thomas Petazzoni @ 2019-10-09 12:25 UTC (permalink / raw)
  To: buildroot

Hello Heiko,

On Wed,  9 Oct 2019 13:26:50 +0200
heiko.thiery at gmail.com wrote:

> From: Michael Walle <michael@walle.cc>
> 
> Signed-off-by: Michael Walle <michael@walle.cc>
> Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>
> ---
>  package/Config.in                      |  1 +
>  package/libavl/0001-fix-makefile.patch | 49 ++++++++++++++++++++++++++
>  package/libavl/Config.in               | 13 +++++++
>  package/libavl/libavl.hash             |  5 +++
>  package/libavl/libavl.mk               | 43 ++++++++++++++++++++++
>  5 files changed, 111 insertions(+)
>  create mode 100644 package/libavl/0001-fix-makefile.patch
>  create mode 100644 package/libavl/Config.in
>  create mode 100644 package/libavl/libavl.hash
>  create mode 100644 package/libavl/libavl.mk

And entry to the DEVELOPERS file needs to be added.


> diff --git a/package/libavl/0001-fix-makefile.patch b/package/libavl/0001-fix-makefile.patch
> new file mode 100644
> index 0000000000..6cc96e5f74
> --- /dev/null
> +++ b/package/libavl/0001-fix-makefile.patch
> @@ -0,0 +1,49 @@
> +makefile: fix compilation and installation
> +
> +This was originally taken from:
> +https://sources.debian.org/data/main/liba/libavl/0.3.5-4/debian/patches/fix-makefile
> +
> +Unfortunately, the URL does not end in ".patch", therefore we cannot
> +use it in the FOO_PATCH variable directly.
> +
> +Signed-off-by: Michael Walle <michael@walle.cc>

We need your Signed-off-by below this one.

> +
> +--- a/GNUmakefile
> ++++ b/GNUmakefile
> +@@ -6,7 +6,8 @@
> + LDCONFIG ?= /sbin/ldconfig
> + 
> + # Some suggestions: (-mcpu= generates i386 compatible code)
> +-CFLAGS ?= -O2 -fomit-frame-pointer -pipe -mcpu=i686 -w
> ++CFLAGS ?= -O2 -pipe -Wall -Werror
> ++CFLAGS += -fPIC

So this change is not really useful, because you anyway override
CFLAGS. But if that's the patch as it is in Debian, please keep it
as-is.


> diff --git a/package/libavl/libavl.mk b/package/libavl/libavl.mk
> new file mode 100644
> index 0000000000..ad561c43bf
> --- /dev/null
> +++ b/package/libavl/libavl.mk
> @@ -0,0 +1,43 @@
> +################################################################################
> +#
> +# libavl
> +#
> +################################################################################
> +
> +LIBAVL_VERSION = 0.3.5
> +LIBAVL_SITE = http://ftp.debian.org/debian/pool/main/liba/libavl

URLs on ftp.debian.org are unfortunately not stable. We use
snapshot.debian.org instead. Do a "git grep snapshot.debian.org" in
Buildroot to see how other packages fetching from the Debian archive
are doing this.

> +LIBAVL_SOURCE = libavl_$(LIBAVL_VERSION).orig.tar.gz
> +LIBAVL_LICENSE = LGPL-2.0+
> +LIBAVL_LICENSE_FILES = COPYING
> +LIBAVL_INSTALL_STAGING = YES
> +
> +LIBAVL_CFLAGS = -fPIC

Please use:

LIBAVL_CFLAGS = $(TARGET_CFLAGS) -fPIC

> +HOST_LIBAVL_CFLAGS = -fPIC

HOST_LIBAVL_CFLAGS = $(HOST_CFLAGS) -fPIC

> +
> +define LIBAVL_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
> +		CFLAGS="$(LIBAVL_CFLAGS)"
> +endef
> +
> +define LIBAVL_INSTALL_STAGING_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) install \
> +		prefix=/usr DESTDIR=$(STAGING_DIR)
> +endef
> +
> +define LIBAVL_INSTALL_TARGET_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) install \
> +		prefix=/usr DESTDIR=$(TARGET_DIR)
> +endef
> +
> +define HOST_LIBAVL_BUILD_CMDS
> +	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) \
> +		CFLAGS="$(HOST_LIBAVL_CFLAGS)"
> +endef
> +
> +define HOST_LIBAVL_INSTALL_CMDS
> +	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) install \
> +		prefix=/usr DESTDIR=$(HOST_DIR)

For the host build/installation, semantically speaking, the correct
thing is:

	prefix=$(HOST_DIR)

Indeed, we don't have any "usr" in $(HOST_DIR), and prefix indicates
where the software will be executing from.

Thanks!

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

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

* [Buildroot] [PATCH v2 9/9] package/netopeer2-cli: add package
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 9/9] package/netopeer2-cli: " heiko.thiery at gmail.com
@ 2019-10-09 12:30   ` Thomas Petazzoni
  0 siblings, 0 replies; 32+ messages in thread
From: Thomas Petazzoni @ 2019-10-09 12:30 UTC (permalink / raw)
  To: buildroot

On Wed,  9 Oct 2019 13:26:56 +0200
heiko.thiery at gmail.com wrote:

> diff --git a/package/Config.in b/package/Config.in
> index a38569e12c..21aa793276 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1647,6 +1647,7 @@ menu "Networking"
>  	source "package/mongoose/Config.in"
>  	source "package/nanomsg/Config.in"
>  	source "package/neon/Config.in"
> +	source "package/netopeer2-cli/Config.in"
>  	source "package/netopeer2-keystored/Config.in"
>  	source "package/netopeer2-server/Config.in"
>  	source "package/nghttp2/Config.in"
> diff --git a/package/netopeer2-cli/Config.in b/package/netopeer2-cli/Config.in
> new file mode 100644
> index 0000000000..eb771390be
> --- /dev/null
> +++ b/package/netopeer2-cli/Config.in
> @@ -0,0 +1,17 @@
> +config BR2_PACKAGE_NETOPEER2_CLI
> +	bool "netopeer2cli"
> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	depends on !BR2_STATIC_LIBS

This list is not sufficient: you need to replicate all the "depends on"
of the options you are "select"-ing.

> +	select BR2_PACKAGE_LIBYANG
> +	select BR2_PACKAGE_LIBNETCONF2

You select this here, but it's not in the <pkg>_DEPENDENCIES of the
package.

> diff --git a/package/netopeer2-cli/netopeer2-cli.mk b/package/netopeer2-cli/netopeer2-cli.mk
> new file mode 100644
> index 0000000000..75192cc935
> --- /dev/null
> +++ b/package/netopeer2-cli/netopeer2-cli.mk
> @@ -0,0 +1,16 @@
> +################################################################################
> +#
> +# netopeer2-cli
> +#
> +################################################################################
> +
> +NETOPEER2_CLI_VERSION = v0.7-r2
> +NETOPEER2_CLI_SITE = $(call github,CESNET,Netopeer2,$(NETOPEER2_CLI_VERSION))
> +NETOPEER2_CLI_LICENSE = BSD-3-Clause
> +NETOPEER2_CLI_LICENSE_FILES = LICENSE
> +NETOPEER2_CLI_SUBDIR = cli
> +NETOPEER2_CLI_INSTALL_STAGING = YES
> +NETOPEER2_CLI_DEPENDENCIES += libyang
> +NETOPEER2_CLI_DEPENDENCIES += sysrepo

Missing libnetconf2 in the dependencies. Also, format it like this:

NETOPEER2_CLI_DEPENDENCIES = libnetconf2 libyang sysrepo

But of course, take into account the fact that we most likely want a
single package for netopeer2.

Thanks!

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

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

* [Buildroot] [PATCH v2 5/9] package/libnetconf2: add package
  2019-10-09 12:15   ` Thomas Petazzoni
@ 2019-10-09 12:54     ` Heiko Thiery
  2019-10-09 12:59       ` Thomas Petazzoni
  0 siblings, 1 reply; 32+ messages in thread
From: Heiko Thiery @ 2019-10-09 12:54 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

> > +config BR2_PACKAGE_LIBNETCONF2
> > +     bool "libnetconf2"
> > +     depends on BR2_TOOLCHAIN_HAS_THREADS
> > +     depends on !BR2_STATIC_LIBS
> > +     depends on BR2_USE_MMU
> > +     select BR2_PACKAGE_LIBYANG
> > +     select BR2_PACKAGE_LIBSSH
> > +     select BR2_PACKAGE_LIBSSH_SERVER
>
> I thought libssh was now an optional dependency ?

This has to be removed from here and has to be added to the sysrepo
package that enables it.

Is the normal way to make it configurable at the place where it is
needed. In this example the sysrepo has to be select the dependencies?

> > +     help
> > +       libnetconf2 is a NETCONF library in C intended for building
> > +       NETCONF clients and servers.
> > +
> > +       https://github.com/CESNET/libnetconf2
> > +
> > +config BR2_PACKAGE_LIBNETCONF2_SSH
> > +     bool
> > +     help
> > +       SSH support for libnetconf2
> > +
> > +config BR2_PACKAGE_LIBNETCONF2_TLS
> > +     bool
> > +     help
> > +       TLS support for libnetconf2
>
> Do we need configurable options for this ? In general, we prefer to
> have automatic dependencies, i.e just rely on whether a dependent
> package is enabled or not. This would give in your .mk file:

I will remove this since it is not required here. This is just a
leftover because I tested each package separatly with the test-pkg
script.

> +ifeq ($(BR2_PACKAGE_LIBSSH_SERVER),y)
> +LIBNETCONF2_CONF_OPTS += -DENABLE_SSH=ON
> +LIBNETCONF2_DEPENDENCIES += libssh
> +else
> +LIBNETCONF2_CONF_OPTS += -DENABLE_SSH=OFF
> +endif
>
> > +config BR2_PACKAGE_HOST_LIBNETCONF2_SSH
> > +     bool
> > +     help
> > +       SSH support for host-libnetconf2
> > +
> > +config BR2_PACKAGE_HOST_LIBNETCONF2_TLS
> > +     bool
> > +     help
> > +       TLS support for host-libnetconf2
>
> We generally don't make host packages configurable, and if they are,
> certainly not with options in Config.in, but in Config.in.host. Do you
> really need the host variant of libnetconf2 to have SSL/TLS support ?

I will remove that .. just thought it has to be selectable.

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

* [Buildroot] [PATCH v2 5/9] package/libnetconf2: add package
  2019-10-09 12:54     ` Heiko Thiery
@ 2019-10-09 12:59       ` Thomas Petazzoni
  0 siblings, 0 replies; 32+ messages in thread
From: Thomas Petazzoni @ 2019-10-09 12:59 UTC (permalink / raw)
  To: buildroot

On Wed, 9 Oct 2019 14:54:33 +0200
Heiko Thiery <heiko.thiery@gmail.com> wrote:

> > I thought libssh was now an optional dependency ?  
> 
> This has to be removed from here and has to be added to the sysrepo
> package that enables it.

Correct, if sysrepo needs libnetconf2 with libssh support, then sysrepo
should select BR2_PACKAGE_LIBSSH and BR2_PACKAGE_LIBSSH_SERVER.

> Is the normal way to make it configurable at the place where it is
> needed. In this example the sysrepo has to be select the dependencies?

From the point of view of netconf2, libssh and openssl are optional, so
they be treated as such in the netconf2 package.

However, if sysrepo's use of netconf2 requires some specific features
in netconf2 that are normally optional, then indeed, it is up to
sysrepo's package to forcefully select the necessary options.

A quick word: thanks for your patience and persistence in working on
this patch series. For your first (?) Buildroot contribution, you are
definitely not doing the easiest possible new package!

Thanks!

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

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

* [Buildroot] [PATCH v2 7/9] package/netopeer2-keystored: add package
  2019-10-09 12:12   ` Thomas Petazzoni
@ 2019-10-09 13:14     ` Heiko Thiery
  2019-10-09 13:34       ` Thomas Petazzoni
  0 siblings, 1 reply; 32+ messages in thread
From: Heiko Thiery @ 2019-10-09 13:14 UTC (permalink / raw)
  To: buildroot

> > +################################################################################
> > +#
> > +# netopeer2-keystored
> > +#
> > +################################################################################
> > +
> > +NETOPEER2_KEYSTORED_VERSION = v0.7-r2
> > +NETOPEER2_KEYSTORED_SITE = $(call github,CESNET,Netopeer2,$(NETOPEER2_KEYSTORED_VERSION))
>
> This is the exact same source code you are fetching in
> netopeer2-keystored, netopeer2-server and netopeer2-cli. We do not want
> 3 separate Buildroot packages, but only one. Of course, it can have
> sub-options in the Config.in file so that the user can selectively
> enable keystored, cli and/or server.
>
> But generally speaking in Buildroot, the rule is one upstream project
> == one package. We do have a few exceptions to this rule for various
> reasons, but unless there's a good and strong justification, we like to
> keep this one upstream project == one package rule in place.
>
> > +NETOPEER2_KEYSTORED_LICENSE = BSD-3-Clause
> > +NETOPEER2_KEYSTORED_LICENSE_FILES = LICENSE
> > +NETOPEER2_KEYSTORED_SUBDIR = keystored
> > +NETOPEER2_KEYSTORED_DEPENDENCIES += host-sysrepo sysrepo

So I have to move all the stuff from the 3 packages (netopeer2-server,
netopeer2-cli, netopeer2-keystored) into one package e.g. netopeer2.
Is it possible to have there 3 different build targets depending on
the configuration?

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

* [Buildroot] [PATCH v2 7/9] package/netopeer2-keystored: add package
  2019-10-09 13:14     ` Heiko Thiery
@ 2019-10-09 13:34       ` Thomas Petazzoni
  2019-10-09 13:43         ` Peter Korsgaard
  2019-10-09 15:53         ` Yann E. MORIN
  0 siblings, 2 replies; 32+ messages in thread
From: Thomas Petazzoni @ 2019-10-09 13:34 UTC (permalink / raw)
  To: buildroot

On Wed, 9 Oct 2019 15:14:15 +0200
Heiko Thiery <heiko.thiery@gmail.com> wrote:

> > > +NETOPEER2_KEYSTORED_LICENSE = BSD-3-Clause
> > > +NETOPEER2_KEYSTORED_LICENSE_FILES = LICENSE
> > > +NETOPEER2_KEYSTORED_SUBDIR = keystored
> > > +NETOPEER2_KEYSTORED_DEPENDENCIES += host-sysrepo sysrepo  
> 
> So I have to move all the stuff from the 3 packages (netopeer2-server,
> netopeer2-cli, netopeer2-keystored) into one package e.g. netopeer2.

Yes.

> Is it possible to have there 3 different build targets depending on
> the configuration?

It depends on what you call build targets. Looking at the netooper2
code base, it's indeed 3 separate projects together, each with its own
CMake build system. I.e, there is no top-level CMakeLists.txt to build
the different components.

So we would have to do the CMake configuration/build/install steps
manually, as the cmake-package infrastructure only deals with a single
top-level CMake build infrastructure, which netopeer2 doesn't have.

In the light of this in the end, perhaps it makes sense to have three
packages like you did. It kind of reflects the fact that even though
they are stored in the same Git repo, they are three independent
components each with its own build system.

Peter, Arnout, Yann, any thoughts ? See
https://github.com/CESNET/Netopeer2 for the code base.

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

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

* [Buildroot] [PATCH v2 7/9] package/netopeer2-keystored: add package
  2019-10-09 13:34       ` Thomas Petazzoni
@ 2019-10-09 13:43         ` Peter Korsgaard
  2019-10-09 15:53         ` Yann E. MORIN
  1 sibling, 0 replies; 32+ messages in thread
From: Peter Korsgaard @ 2019-10-09 13:43 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

Hi,
 > In the light of this in the end, perhaps it makes sense to have three
 > packages like you did. It kind of reflects the fact that even though
 > they are stored in the same Git repo, they are three independent
 > components each with its own build system.

 > Peter, Arnout, Yann, any thoughts ? See
 > https://github.com/CESNET/Netopeer2 for the code base.

Yes, that indeed seems the best solution to me as well.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH v2 7/9] package/netopeer2-keystored: add package
  2019-10-09 13:34       ` Thomas Petazzoni
  2019-10-09 13:43         ` Peter Korsgaard
@ 2019-10-09 15:53         ` Yann E. MORIN
  2019-10-09 17:03           ` Heiko Thiery
  1 sibling, 1 reply; 32+ messages in thread
From: Yann E. MORIN @ 2019-10-09 15:53 UTC (permalink / raw)
  To: buildroot

Thomas, Heiko, All,

On 2019-10-09 15:34 +0200, Thomas Petazzoni spake thusly:
> On Wed, 9 Oct 2019 15:14:15 +0200
> Heiko Thiery <heiko.thiery@gmail.com> wrote:
> 
> > > > +NETOPEER2_KEYSTORED_LICENSE = BSD-3-Clause
> > > > +NETOPEER2_KEYSTORED_LICENSE_FILES = LICENSE
> > > > +NETOPEER2_KEYSTORED_SUBDIR = keystored
> > > > +NETOPEER2_KEYSTORED_DEPENDENCIES += host-sysrepo sysrepo  
> > 
> > So I have to move all the stuff from the 3 packages (netopeer2-server,
> > netopeer2-cli, netopeer2-keystored) into one package e.g. netopeer2.
> 
> Yes.
> 
> > Is it possible to have there 3 different build targets depending on
> > the configuration?
> 
> It depends on what you call build targets. Looking at the netooper2
> code base, it's indeed 3 separate projects together, each with its own
> CMake build system. I.e, there is no top-level CMakeLists.txt to build
> the different components.

... yet they share the same set of top-level cmake modules... :-/

Which is not clean, because those CMakeModules should be provided by the
libs themselves (e.g. libyang should provide FindLibYANG.cmake)...

> So we would have to do the CMake configuration/build/install steps
> manually, as the cmake-package infrastructure only deals with a single
> top-level CMake build infrastructure, which netopeer2 doesn't have.
> 
> In the light of this in the end, perhaps it makes sense to have three
> packages like you did. It kind of reflects the fact that even though
> they are stored in the same Git repo, they are three independent
> components each with its own build system.

Yes.

And since they do share the same source tree, we really want to download
it only once:

    NETOPEER2_KEYSTORED_DL_SUBDIR = netopeer2

(similarly for the other two packages, of course).

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies)
  2019-10-09 11:26 [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
                   ` (8 preceding siblings ...)
  2019-10-09 11:26 ` [Buildroot] [PATCH v2 9/9] package/netopeer2-cli: " heiko.thiery at gmail.com
@ 2019-10-09 15:57 ` Michael Walle
  2019-10-23 11:07   ` Heiko Thiery
  9 siblings, 1 reply; 32+ messages in thread
From: Michael Walle @ 2019-10-09 15:57 UTC (permalink / raw)
  To: buildroot

Hi,

Am 2019-10-09 13:26, schrieb heiko.thiery at gmail.com:
> From: Heiko Thiery <heiko.thiery@kontron.com>
> 
> This patchset contains the netopeer2 package and the required
> dependencies. Netopeer2 is a set of tools implementing network
> configuration tools based on the NETCONF Protocol.

The daemons (netconf server, sysrepod,..?) are missing the init 
scripts/systemd service files as well as the buildroot hooks for it, 
right?

-michael

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

* [Buildroot] [PATCH v2 3/9] package/libavl: add package
  2019-10-09 12:25   ` Thomas Petazzoni
@ 2019-10-09 16:04     ` Michael Walle
  2019-10-09 19:27       ` Thomas Petazzoni
  0 siblings, 1 reply; 32+ messages in thread
From: Michael Walle @ 2019-10-09 16:04 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Actually, I've prepared that package.

Am 2019-10-09 14:25, schrieb Thomas Petazzoni:
> On Wed,  9 Oct 2019 13:26:50 +0200
> heiko.thiery at gmail.com wrote:
> 
>> From: Michael Walle <michael@walle.cc>
>> 
>> Signed-off-by: Michael Walle <michael@walle.cc>
>> Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>
>> ---
>>  package/Config.in                      |  1 +
>>  package/libavl/0001-fix-makefile.patch | 49 
>> ++++++++++++++++++++++++++
>>  package/libavl/Config.in               | 13 +++++++
>>  package/libavl/libavl.hash             |  5 +++
>>  package/libavl/libavl.mk               | 43 ++++++++++++++++++++++
>>  5 files changed, 111 insertions(+)
>>  create mode 100644 package/libavl/0001-fix-makefile.patch
>>  create mode 100644 package/libavl/Config.in
>>  create mode 100644 package/libavl/libavl.hash
>>  create mode 100644 package/libavl/libavl.mk
> 
> And entry to the DEVELOPERS file needs to be added.

I've added myself.

>> diff --git a/package/libavl/0001-fix-makefile.patch 
>> b/package/libavl/0001-fix-makefile.patch
>> new file mode 100644
>> index 0000000000..6cc96e5f74
>> --- /dev/null
>> +++ b/package/libavl/0001-fix-makefile.patch
>> @@ -0,0 +1,49 @@
>> +makefile: fix compilation and installation
>> +
>> +This was originally taken from:
>> +https://sources.debian.org/data/main/liba/libavl/0.3.5-4/debian/patches/fix-makefile
>> +
>> +Unfortunately, the URL does not end in ".patch", therefore we cannot
>> +use it in the FOO_PATCH variable directly.
>> +
>> +Signed-off-by: Michael Walle <michael@walle.cc>
> 
> We need your Signed-off-by below this one.

So do Heiko still need his s-o-b?

> 
>> +
>> +--- a/GNUmakefile
>> ++++ b/GNUmakefile
>> +@@ -6,7 +6,8 @@
>> + LDCONFIG ?= /sbin/ldconfig
>> +
>> + # Some suggestions: (-mcpu= generates i386 compatible code)
>> +-CFLAGS ?= -O2 -fomit-frame-pointer -pipe -mcpu=i686 -w
>> ++CFLAGS ?= -O2 -pipe -Wall -Werror
>> ++CFLAGS += -fPIC
> 
> So this change is not really useful, because you anyway override
> CFLAGS. But if that's the patch as it is in Debian, please keep it
> as-is.
> 
> 
>> diff --git a/package/libavl/libavl.mk b/package/libavl/libavl.mk
>> new file mode 100644
>> index 0000000000..ad561c43bf
>> --- /dev/null
>> +++ b/package/libavl/libavl.mk
>> @@ -0,0 +1,43 @@
>> +################################################################################
>> +#
>> +# libavl
>> +#
>> +################################################################################
>> +
>> +LIBAVL_VERSION = 0.3.5
>> +LIBAVL_SITE = http://ftp.debian.org/debian/pool/main/liba/libavl
> 
> URLs on ftp.debian.org are unfortunately not stable. We use
> snapshot.debian.org instead. Do a "git grep snapshot.debian.org" in
> Buildroot to see how other packages fetching from the Debian archive
> are doing this.

Ahh I see. Will be fixed in the next version. I'll also use the snapshot 
url in the .hash comment.

>> +LIBAVL_SOURCE = libavl_$(LIBAVL_VERSION).orig.tar.gz
>> +LIBAVL_LICENSE = LGPL-2.0+
>> +LIBAVL_LICENSE_FILES = COPYING
>> +LIBAVL_INSTALL_STAGING = YES
>> +
>> +LIBAVL_CFLAGS = -fPIC
> 
> Please use:
> 
> LIBAVL_CFLAGS = $(TARGET_CFLAGS) -fPIC

will be fixed in the next version.

> 
>> +HOST_LIBAVL_CFLAGS = -fPIC
> 
> HOST_LIBAVL_CFLAGS = $(HOST_CFLAGS) -fPIC

dito

[..snip..]

> For the host build/installation, semantically speaking, the correct
> thing is:
> 
> 	prefix=$(HOST_DIR)
> 
> Indeed, we don't have any "usr" in $(HOST_DIR), and prefix indicates
> where the software will be executing from.

dito

-michael

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

* [Buildroot] [PATCH v2 7/9] package/netopeer2-keystored: add package
  2019-10-09 15:53         ` Yann E. MORIN
@ 2019-10-09 17:03           ` Heiko Thiery
  2019-10-09 17:08             ` Heiko Thiery
  0 siblings, 1 reply; 32+ messages in thread
From: Heiko Thiery @ 2019-10-09 17:03 UTC (permalink / raw)
  To: buildroot

Hi Yann,

> > So we would have to do the CMake configuration/build/install steps
> > manually, as the cmake-package infrastructure only deals with a single
> > top-level CMake build infrastructure, which netopeer2 doesn't have.
> >
> > In the light of this in the end, perhaps it makes sense to have three
> > packages like you did. It kind of reflects the fact that even though
> > they are stored in the same Git repo, they are three independent
> > components each with its own build system.
>
> Yes.
>
> And since they do share the same source tree, we really want to download
> it only once:
>
>     NETOPEER2_KEYSTORED_DL_SUBDIR = netopeer2
>
> (similarly for the other two packages, of course).

does this mean we still have 3 packages but 2 of them use the download
of e.g. netopeer2-server as the "master" package?

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

* [Buildroot] [PATCH v2 7/9] package/netopeer2-keystored: add package
  2019-10-09 17:03           ` Heiko Thiery
@ 2019-10-09 17:08             ` Heiko Thiery
  2019-10-09 18:15               ` Yann E. MORIN
  0 siblings, 1 reply; 32+ messages in thread
From: Heiko Thiery @ 2019-10-09 17:08 UTC (permalink / raw)
  To: buildroot

> Hi Yann,
>
> > > So we would have to do the CMake configuration/build/install steps
> > > manually, as the cmake-package infrastructure only deals with a single
> > > top-level CMake build infrastructure, which netopeer2 doesn't have.
> > >
> > > In the light of this in the end, perhaps it makes sense to have three
> > > packages like you did. It kind of reflects the fact that even though
> > > they are stored in the same Git repo, they are three independent
> > > components each with its own build system.
> >
> > Yes.
> >
> > And since they do share the same source tree, we really want to download
> > it only once:
> >
> >     NETOPEER2_KEYSTORED_DL_SUBDIR = netopeer2
> >
> > (similarly for the other two packages, of course).
>
> does this mean we still have 3 packages but 2 of them use the download
> of e.g. netopeer2-server as the "master" package?

should I add the 2 other packages into a subfolder under
netopeer2-server like it is done for the fftw package and the
corresponding subpackages?

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

* [Buildroot] [PATCH v2 7/9] package/netopeer2-keystored: add package
  2019-10-09 17:08             ` Heiko Thiery
@ 2019-10-09 18:15               ` Yann E. MORIN
  2019-10-09 19:14                 ` Arnout Vandecappelle
  2019-10-09 19:45                 ` Heiko Thiery
  0 siblings, 2 replies; 32+ messages in thread
From: Yann E. MORIN @ 2019-10-09 18:15 UTC (permalink / raw)
  To: buildroot

On 2019-10-09 19:08 +0200, Heiko Thiery spake thusly:
> > Hi Yann,
> >
> > > > So we would have to do the CMake configuration/build/install steps
> > > > manually, as the cmake-package infrastructure only deals with a single
> > > > top-level CMake build infrastructure, which netopeer2 doesn't have.
> > > >
> > > > In the light of this in the end, perhaps it makes sense to have three
> > > > packages like you did. It kind of reflects the fact that even though
> > > > they are stored in the same Git repo, they are three independent
> > > > components each with its own build system.
> > >
> > > Yes.
> > >
> > > And since they do share the same source tree, we really want to download
> > > it only once:
> > >
> > >     NETOPEER2_KEYSTORED_DL_SUBDIR = netopeer2
> > >
> > > (similarly for the other two packages, of course).
> >
> > does this mean we still have 3 packages but 2 of them use the download
> > of e.g. netopeer2-server as the "master" package?
> 
> should I add the 2 other packages into a subfolder under
> netopeer2-server like it is done for the fftw package and the
> corresponding subpackages?

You should keep doing three packages, like you initially submitted:

    package/netopeer2-keystored/Config.in
    package/netopeer2-keystored/netopeer2-keystored.mk
    package/netopeer2-keystored/netopeer2-keystored.hash
    package/netopeer2-server/Config.in
    package/netopeer2-server/netopeer2-server.mk
    package/netopeer2-server/netopeer2-server.hash
    package/netopeer2-cli/Config.in
    package/netopeer2-cli/netopeer2-cli.hash
    package/netopeer2-cli/netopeer2-cli.mk

Then, you should add in the corresponding files:

    NETOPEER2_KEYSTORED_DL_SUBDIR = netopeer2
    NETOPEER2_SERVER_DL_SUBDIR = netopeer2
    NETOPEER2_CLI_DL_SUBDIR = netopeer2

That all three of them have the same _DL_SUBDIR means that the archive
will be downloaded only once, and be used for all three packages (but
this _DL_SUBDIR variable is indeed not documented in our manual).

See for example: mesa3d and mesa3d-headers, or bluez5_utils and
bluez5_utils-headers, for an example of using _DL_SUBDIR.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v2 7/9] package/netopeer2-keystored: add package
  2019-10-09 18:15               ` Yann E. MORIN
@ 2019-10-09 19:14                 ` Arnout Vandecappelle
  2019-10-09 19:45                 ` Heiko Thiery
  1 sibling, 0 replies; 32+ messages in thread
From: Arnout Vandecappelle @ 2019-10-09 19:14 UTC (permalink / raw)
  To: buildroot



On 09/10/2019 20:15, Yann E. MORIN wrote:
[snip]
> You should keep doing three packages, like you initially submitted:
> 
>     package/netopeer2-keystored/Config.in
>     package/netopeer2-keystored/netopeer2-keystored.mk
>     package/netopeer2-keystored/netopeer2-keystored.hash
>     package/netopeer2-server/Config.in
>     package/netopeer2-server/netopeer2-server.mk
>     package/netopeer2-server/netopeer2-server.hash
>     package/netopeer2-cli/Config.in
>     package/netopeer2-cli/netopeer2-cli.hash
>     package/netopeer2-cli/netopeer2-cli.mk

 Note that two of the three hash files can be symlinks to the third one, so only
one hash file needs to be updated on a version bump.

 Since the server depends on keystored, I think it makes most sense to have
keystored as the "master" hash file. But it doesn't matter that much.


> 
> Then, you should add in the corresponding files:
> 
>     NETOPEER2_KEYSTORED_DL_SUBDIR = netopeer2
>     NETOPEER2_SERVER_DL_SUBDIR = netopeer2
>     NETOPEER2_CLI_DL_SUBDIR = netopeer2
> 
> That all three of them have the same _DL_SUBDIR means that the archive
> will be downloaded only once, and be used for all three packages (but
> this _DL_SUBDIR variable is indeed not documented in our manual).

 Call for contribution :-)

 Regards,
 Arnout

> 
> See for example: mesa3d and mesa3d-headers, or bluez5_utils and
> bluez5_utils-headers, for an example of using _DL_SUBDIR.
> 
> Regards,
> Yann E. MORIN.
> 

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

* [Buildroot] [PATCH v2 3/9] package/libavl: add package
  2019-10-09 16:04     ` Michael Walle
@ 2019-10-09 19:27       ` Thomas Petazzoni
  2019-10-10  8:20         ` Michael Walle
  0 siblings, 1 reply; 32+ messages in thread
From: Thomas Petazzoni @ 2019-10-09 19:27 UTC (permalink / raw)
  To: buildroot

On Wed, 09 Oct 2019 18:04:30 +0200
Michael Walle <michael@walle.cc> wrote:

> Actually, I've prepared that package.

OK. Then it should probably be From: you, and have a Signed-off-by: you
as the first line, followed by Heiko's Signed-off-by.

> > We need your Signed-off-by below this one.  
> 
> So do Heiko still need his s-o-b?

If you're the author of the Git commit, that's OK if there's only your
SoB inside the patch.

Thanks!

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

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

* [Buildroot] [PATCH v2 7/9] package/netopeer2-keystored: add package
  2019-10-09 18:15               ` Yann E. MORIN
  2019-10-09 19:14                 ` Arnout Vandecappelle
@ 2019-10-09 19:45                 ` Heiko Thiery
  2019-10-09 19:57                   ` Heiko Thiery
  1 sibling, 1 reply; 32+ messages in thread
From: Heiko Thiery @ 2019-10-09 19:45 UTC (permalink / raw)
  To: buildroot

Hi Yann,

> You should keep doing three packages, like you initially submitted:
>b
>     package/netopeer2-keystored/Config.in
>     package/netopeer2-keystored/netopeer2-keystored.mk
>     package/netopeer2-keystored/netopeer2-keystored.hash
>     package/netopeer2-server/Config.in
>     package/netopeer2-server/netopeer2-server.mk
>     package/netopeer2-server/netopeer2-server.hash
>     package/netopeer2-cli/Config.in
>     package/netopeer2-cli/netopeer2-cli.hash
>     package/netopeer2-cli/netopeer2-cli.mk
>
> Then, you should add in the corresponding files:
>
>     NETOPEER2_KEYSTORED_DL_SUBDIR = netopeer2
>     NETOPEER2_SERVER_DL_SUBDIR = netopeer2
>     NETOPEER2_CLI_DL_SUBDIR = netopeer2
>
> That all three of them have the same _DL_SUBDIR means that the archive
> will be downloaded only once, and be used for all three packages (but
> this _DL_SUBDIR variable is indeed not documented in our manual).

I also have to set the <PKg>_SOURCE to the same file for all 3 packages.
Is it then still necessary to set also the <PKG>_DL_SUBDIR?

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

* [Buildroot] [PATCH v2 7/9] package/netopeer2-keystored: add package
  2019-10-09 19:45                 ` Heiko Thiery
@ 2019-10-09 19:57                   ` Heiko Thiery
  0 siblings, 0 replies; 32+ messages in thread
From: Heiko Thiery @ 2019-10-09 19:57 UTC (permalink / raw)
  To: buildroot

> I also have to set the <PKg>_SOURCE to the same file for all 3 packages.
> Is it then still necessary to set also the <PKG>_DL_SUBDIR?

Just can give me self the answer .. YES it is needed ;-)

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

* [Buildroot] [PATCH v2 3/9] package/libavl: add package
  2019-10-09 19:27       ` Thomas Petazzoni
@ 2019-10-10  8:20         ` Michael Walle
  2019-10-10  8:25           ` Thomas Petazzoni
  0 siblings, 1 reply; 32+ messages in thread
From: Michael Walle @ 2019-10-10  8:20 UTC (permalink / raw)
  To: buildroot

Am 2019-10-09 21:27, schrieb Thomas Petazzoni:
> On Wed, 09 Oct 2019 18:04:30 +0200
> Michael Walle <michael@walle.cc> wrote:
> 
>> Actually, I've prepared that package.
> 
> OK. Then it should probably be From: you, and have a Signed-off-by: you
> as the first line, followed by Heiko's Signed-off-by.

That was already the case, wasn't it? ;)

-michael

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

* [Buildroot] [PATCH v2 3/9] package/libavl: add package
  2019-10-10  8:20         ` Michael Walle
@ 2019-10-10  8:25           ` Thomas Petazzoni
  0 siblings, 0 replies; 32+ messages in thread
From: Thomas Petazzoni @ 2019-10-10  8:25 UTC (permalink / raw)
  To: buildroot

On Thu, 10 Oct 2019 10:20:05 +0200
Michael Walle <michael@walle.cc> wrote:

> > OK. Then it should probably be From: you, and have a Signed-off-by: you
> > as the first line, followed by Heiko's Signed-off-by.  
> 
> That was already the case, wasn't it? ;)

My bad, it was indeed already the case, it was perfectly correct. Sorry
for the noise :-/

Thanks!

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

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

* [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies)
  2019-10-09 15:57 ` [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies) Michael Walle
@ 2019-10-23 11:07   ` Heiko Thiery
  0 siblings, 0 replies; 32+ messages in thread
From: Heiko Thiery @ 2019-10-23 11:07 UTC (permalink / raw)
  To: buildroot

> The daemons (netconf server, sysrepod,..?) are missing the init
> scripts/systemd service files as well as the buildroot hooks for it,
> right?

With patch v3 a systemv init script was added to the packages.

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

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

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09 11:26 [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
2019-10-09 11:26 ` [Buildroot] [PATCH v2 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
2019-10-09 11:26 ` [Buildroot] [PATCH v2 2/9] package/libssh: " heiko.thiery at gmail.com
2019-10-09 11:26 ` [Buildroot] [PATCH v2 3/9] package/libavl: add package heiko.thiery at gmail.com
2019-10-09 12:25   ` Thomas Petazzoni
2019-10-09 16:04     ` Michael Walle
2019-10-09 19:27       ` Thomas Petazzoni
2019-10-10  8:20         ` Michael Walle
2019-10-10  8:25           ` Thomas Petazzoni
2019-10-09 11:26 ` [Buildroot] [PATCH v2 4/9] package/libyang: " heiko.thiery at gmail.com
2019-10-09 11:26 ` [Buildroot] [PATCH v2 5/9] package/libnetconf2: " heiko.thiery at gmail.com
2019-10-09 12:15   ` Thomas Petazzoni
2019-10-09 12:54     ` Heiko Thiery
2019-10-09 12:59       ` Thomas Petazzoni
2019-10-09 11:26 ` [Buildroot] [PATCH v2 6/9] package/sysrepo: " heiko.thiery at gmail.com
2019-10-09 11:26 ` [Buildroot] [PATCH v2 7/9] package/netopeer2-keystored: " heiko.thiery at gmail.com
2019-10-09 12:12   ` Thomas Petazzoni
2019-10-09 13:14     ` Heiko Thiery
2019-10-09 13:34       ` Thomas Petazzoni
2019-10-09 13:43         ` Peter Korsgaard
2019-10-09 15:53         ` Yann E. MORIN
2019-10-09 17:03           ` Heiko Thiery
2019-10-09 17:08             ` Heiko Thiery
2019-10-09 18:15               ` Yann E. MORIN
2019-10-09 19:14                 ` Arnout Vandecappelle
2019-10-09 19:45                 ` Heiko Thiery
2019-10-09 19:57                   ` Heiko Thiery
2019-10-09 11:26 ` [Buildroot] [PATCH v2 8/9] package/netopeer2-server: " heiko.thiery at gmail.com
2019-10-09 11:26 ` [Buildroot] [PATCH v2 9/9] package/netopeer2-cli: " heiko.thiery at gmail.com
2019-10-09 12:30   ` Thomas Petazzoni
2019-10-09 15:57 ` [Buildroot] [PATCH v2 0/9] Add netopeer2 package (and dependencies) Michael Walle
2019-10-23 11:07   ` Heiko Thiery

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.