All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 0/9] Add netopeer2 package (and dependencies)
@ 2019-10-11 12:40 heiko.thiery at gmail.com
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-11 12:40 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.

Changes v2 -> v3:
  - download the netopeer2 sources only once for the packages
    netopeer2-cli, netopeer2-keystored and netopeer2-server.
    Use the same value in <pkg>_DL_SUBDIR and <pkg>_SOURCE for
	all 3 packages.
  - add sysv init scripts for netopeer-server, sysrepod and
    syrepo-plugind.
  - 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                                    | 11 +++
 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                 | 15 ++++
 package/libnetconf2/libnetconf2.hash          |  2 +
 package/libnetconf2/libnetconf2.mk            | 40 +++++++++
 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               | 21 +++++
 package/netopeer2-cli/netopeer2-cli.hash      |  1 +
 package/netopeer2-cli/netopeer2-cli.mk        | 17 ++++
 package/netopeer2-keystored/Config.in         | 17 ++++
 .../netopeer2-keystored.hash                  |  2 +
 .../netopeer2-keystored.mk                    | 32 +++++++
 package/netopeer2-server/Config.in            | 54 +++++++++++
 package/netopeer2-server/S52netopeer2-server  | 90 +++++++++++++++++++
 .../netopeer2-server/netopeer2-server.hash    |  1 +
 package/netopeer2-server/netopeer2-server.mk  | 33 +++++++
 ...espect-CMAKE_INSTALL_PREFIX-and-DEST.patch | 33 +++++++
 ...t-make-systemd-unit-dir-configurable.patch | 40 +++++++++
 package/sysrepo/Config.in                     | 26 ++++++
 package/sysrepo/S50sysrepod                   | 44 +++++++++
 package/sysrepo/S51sysrepo-plugind            | 49 ++++++++++
 package/sysrepo/sysrepo.hash                  |  2 +
 package/sysrepo/sysrepo.mk                    | 51 +++++++++++
 32 files changed, 805 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 120000 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/S52netopeer2-server
 create mode 120000 package/netopeer2-server/netopeer2-server.hash
 create mode 100644 package/netopeer2-server/netopeer2-server.mk
 create mode 100644 package/sysrepo/0001-CMakeLists.txt-respect-CMAKE_INSTALL_PREFIX-and-DEST.patch
 create mode 100644 package/sysrepo/0002-CMakeLists.txt-make-systemd-unit-dir-configurable.patch
 create mode 100644 package/sysrepo/Config.in
 create mode 100644 package/sysrepo/S50sysrepod
 create mode 100644 package/sysrepo/S51sysrepo-plugind
 create mode 100644 package/sysrepo/sysrepo.hash
 create mode 100644 package/sysrepo/sysrepo.mk

-- 
2.20.1

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

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

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

* [Buildroot] [PATCH v3 3/9] package/libavl: add package
  2019-10-11 12:40 [Buildroot] [PATCH v3 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 2/9] package/libssh: " heiko.thiery at gmail.com
@ 2019-10-11 12:40 ` heiko.thiery at gmail.com
  2019-10-22 21:28   ` Thomas Petazzoni
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 4/9] package/libyang: " heiko.thiery at gmail.com
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-11 12:40 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>
---
 DEVELOPERS                             |  3 ++
 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 ++++++++++++++++++++++
 6 files changed, 114 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/DEVELOPERS b/DEVELOPERS
index 7e4d7fa94a..e8ef69efc7 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1666,6 +1666,9 @@ F:	package/python-pyzmq/
 N:	Michael Trimarchi <michael@amarulasolutions.com>
 F:	package/python-spidev/
 
+N:	Michael Walle <michael@walle.cc>
+F:	package/libavl/
+
 N:	Micha? ?yszczek <michal.lyszczek@bofc.pl>
 F:	board/altera/socrates_cyclone5/
 F:	board/pine64/rock64
diff --git a/package/Config.in b/package/Config.in
index c3faa20d88..48a66ec7dd 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1715,6 +1715,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..4d70f0cca9
--- /dev/null
+++ b/package/libavl/libavl.hash
@@ -0,0 +1,5 @@
+# From http://snapshot.debian.org/archive/debian/20160621T164030Z/pool/main/liba/libavl/libavl_0.3.5-4.dsc
+sha256	4497b9e22cdd61ae2fa893b9d5fd6213dc306726d7c4be08c29e173622dca8a0	libavl_0.3.5.orig.tar.gz
+
+# Locally computed
+sha256	767a9accfe3b110153b567983b98889469dfaae02899a632aeadbb81ad611293	COPYING
diff --git a/package/libavl/libavl.mk b/package/libavl/libavl.mk
new file mode 100644
index 0000000000..75ada32765
--- /dev/null
+++ b/package/libavl/libavl.mk
@@ -0,0 +1,43 @@
+################################################################################
+#
+# libavl
+#
+################################################################################
+
+LIBAVL_VERSION = 0.3.5
+LIBAVL_SITE = http://snapshot.debian.org/archive/debian/20050312T000000Z/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 = $(TARGET_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=$(HOST_DIR)
+endef
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))
-- 
2.20.1

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

* [Buildroot] [PATCH v3 4/9] package/libyang: add package
  2019-10-11 12:40 [Buildroot] [PATCH v3 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
                   ` (2 preceding siblings ...)
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 3/9] package/libavl: add package heiko.thiery at gmail.com
@ 2019-10-11 12:40 ` heiko.thiery at gmail.com
  2019-10-22 21:30   ` Thomas Petazzoni
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 5/9] package/libnetconf2: " heiko.thiery at gmail.com
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-11 12:40 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 e8ef69efc7..1d71a7db52 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1039,6 +1039,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 48a66ec7dd..0d73ead5b7 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1643,6 +1643,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] 15+ messages in thread

* [Buildroot] [PATCH v3 5/9] package/libnetconf2: add package
  2019-10-11 12:40 [Buildroot] [PATCH v3 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
                   ` (3 preceding siblings ...)
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 4/9] package/libyang: " heiko.thiery at gmail.com
@ 2019-10-11 12:40 ` heiko.thiery at gmail.com
  2019-10-22 21:33   ` Thomas Petazzoni
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 6/9] package/sysrepo: " heiko.thiery at gmail.com
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-11 12:40 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                 | 15 +++++
 package/libnetconf2/libnetconf2.hash          |  2 +
 package/libnetconf2/libnetconf2.mk            | 40 ++++++++++++
 6 files changed, 124 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 1d71a7db52..da2c80056c 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1040,6 +1040,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 0d73ead5b7..bdc5b13051 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1610,6 +1610,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..0a735b5ed6
--- /dev/null
+++ b/package/libnetconf2/Config.in
@@ -0,0 +1,15 @@
+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
+	help
+	  libnetconf2 is a NETCONF library in C intended for building
+	  NETCONF clients and servers.
+
+	  https://github.com/CESNET/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..c3999b3e29
--- /dev/null
+++ b/package/libnetconf2/libnetconf2.mk
@@ -0,0 +1,40 @@
+################################################################################
+#
+# 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_LIBSSH_SERVER), y)
+LIBNETCONF2_CONF_OPTS += -DENABLE_SSH=ON
+LIBNETCONF2_DEPENDENCIES += libssh
+else
+LIBNETCONF2_CONF_OPTS += -DENABLE_SSH=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENSSL), 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 \
+	-DENABLE_SSH=OFF \
+	-DENABLE_TLS=OFF
+
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))
-- 
2.20.1

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

* [Buildroot] [PATCH v3 6/9] package/sysrepo: add package
  2019-10-11 12:40 [Buildroot] [PATCH v3 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
                   ` (4 preceding siblings ...)
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 5/9] package/libnetconf2: " heiko.thiery at gmail.com
@ 2019-10-11 12:40 ` heiko.thiery at gmail.com
  2019-10-23 16:39   ` Michael Walle
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 7/9] package/netopeer2-keystored: " heiko.thiery at gmail.com
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-11 12:40 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 +
 ...espect-CMAKE_INSTALL_PREFIX-and-DEST.patch | 33 ++++++++++++
 ...t-make-systemd-unit-dir-configurable.patch | 40 +++++++++++++++
 package/sysrepo/Config.in                     | 26 ++++++++++
 package/sysrepo/S50sysrepod                   | 44 ++++++++++++++++
 package/sysrepo/S51sysrepo-plugind            | 49 ++++++++++++++++++
 package/sysrepo/sysrepo.hash                  |  2 +
 package/sysrepo/sysrepo.mk                    | 51 +++++++++++++++++++
 9 files changed, 247 insertions(+)
 create mode 100644 package/sysrepo/0001-CMakeLists.txt-respect-CMAKE_INSTALL_PREFIX-and-DEST.patch
 create mode 100644 package/sysrepo/0002-CMakeLists.txt-make-systemd-unit-dir-configurable.patch
 create mode 100644 package/sysrepo/Config.in
 create mode 100644 package/sysrepo/S50sysrepod
 create mode 100644 package/sysrepo/S51sysrepo-plugind
 create mode 100644 package/sysrepo/sysrepo.hash
 create mode 100644 package/sysrepo/sysrepo.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index da2c80056c..d8992538c2 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1042,6 +1042,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 bdc5b13051..54b40936ba 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1670,6 +1670,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/0001-CMakeLists.txt-respect-CMAKE_INSTALL_PREFIX-and-DEST.patch b/package/sysrepo/0001-CMakeLists.txt-respect-CMAKE_INSTALL_PREFIX-and-DEST.patch
new file mode 100644
index 0000000000..5cb3606475
--- /dev/null
+++ b/package/sysrepo/0001-CMakeLists.txt-respect-CMAKE_INSTALL_PREFIX-and-DEST.patch
@@ -0,0 +1,33 @@
+From c4a2195febbd5d436f8de79d8391d8da9aa60ac4 Mon Sep 17 00:00:00 2001
+From: Michael Walle <michael@walle.cc>
+Date: Thu, 10 Oct 2019 14:58:16 +0200
+Subject: [PATCH 1/2] CMakeLists.txt: respect CMAKE_INSTALL_PREFIX and DESTDIR
+
+Don't use absolute pathnames in the install function. This way the files
+will be installed in the correct location even if CMAKE_INSTALL_PREFIX
+and DESTDIR are changed.
+
+Patch comes from upstream pull-request:
+https://github.com/sysrepo/sysrepo/pull/1638
+
+Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e4521088..14b7cd36 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -357,7 +357,7 @@ if(WITH_SYSTEMD)
+         ${PROJECT_SOURCE_DIR}/deploy/systemd/sysrepod.service
+         ${PROJECT_SOURCE_DIR}/deploy/systemd/sysrepo-plugind.service
+     )
+-    install(DIRECTORY ${PROJECT_SOURCE_DIR}/deploy/systemd/ DESTINATION "/lib/systemd/system"
++    install(DIRECTORY ${PROJECT_SOURCE_DIR}/deploy/systemd/ DESTINATION "lib/systemd/system"
+         FILES_MATCHING PATTERN "*.service")
+ endif()
+ 
+-- 
+2.20.1
+
diff --git a/package/sysrepo/0002-CMakeLists.txt-make-systemd-unit-dir-configurable.patch b/package/sysrepo/0002-CMakeLists.txt-make-systemd-unit-dir-configurable.patch
new file mode 100644
index 0000000000..3ab75f7957
--- /dev/null
+++ b/package/sysrepo/0002-CMakeLists.txt-make-systemd-unit-dir-configurable.patch
@@ -0,0 +1,40 @@
+From 906927b4ee2dd0d5bd669d193fc851d14919fbd1 Mon Sep 17 00:00:00 2001
+From: Michael Walle <michael@walle.cc>
+Date: Thu, 10 Oct 2019 14:38:57 +0200
+Subject: [PATCH 2/2] CMakeLists.txt: make systemd unit dir configurable
+
+Patch comes from upstream pull-request:
+https://github.com/sysrepo/sysrepo/pull/1638
+
+Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
+---
+ CMakeLists.txt | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 14b7cd36..14c84675 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -217,6 +217,9 @@ else()
+     message(FATAL_ERROR "Unknown file format \"${FILE_FORMAT_EXT}\", must be json, xml, or lyb.")
+ endif()
+ 
++set(SYSTEMD_UNIT_DIR "lib/systemd/system/" CACHE STRING
++    "Path to the systemd service directory.")
++
+ # timeouts
+ set(REQUEST_TIMEOUT 15 CACHE STRING
+     "Timeout (in seconds) for Sysrepo API requests. Set to 0 for no timeout.")
+@@ -357,7 +360,8 @@ if(WITH_SYSTEMD)
+         ${PROJECT_SOURCE_DIR}/deploy/systemd/sysrepod.service
+         ${PROJECT_SOURCE_DIR}/deploy/systemd/sysrepo-plugind.service
+     )
+-    install(DIRECTORY ${PROJECT_SOURCE_DIR}/deploy/systemd/ DESTINATION "lib/systemd/system"
++    install(DIRECTORY ${PROJECT_SOURCE_DIR}/deploy/systemd/
++        DESTINATION "${SYSTEMD_UNIT_DIR}"
+         FILES_MATCHING PATTERN "*.service")
+ endif()
+ 
+-- 
+2.20.1
+
diff --git a/package/sysrepo/Config.in b/package/sysrepo/Config.in
new file mode 100644
index 0000000000..b6dbbf6f7b
--- /dev/null
+++ b/package/sysrepo/Config.in
@@ -0,0 +1,26 @@
+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_LIBAVL
+	select BR2_PACKAGE_LIBYANG
+	select BR2_PACKAGE_PROTOBUF_C
+	select BR2_PACKAGE_PCRE
+	select BR2_PACKAGE_PCRE_UCP
+	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/S50sysrepod b/package/sysrepo/S50sysrepod
new file mode 100644
index 0000000000..05ca627fb7
--- /dev/null
+++ b/package/sysrepo/S50sysrepod
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+DAEMON="sysrepod"
+PIDFILE="/var/run/$DAEMON.pid"
+
+SYSREPOD_ARGS=""
+
+start() {
+    printf 'Starting %s: ' "$DAEMON"
+    start-stop-daemon -S -b -q -p $PIDFILE -x "/usr/bin/$DAEMON" \
+        -- $SYSREPOD_ARGS
+    status=$?
+	if [ "$status" -eq 0 ]; then
+		echo "OK"
+	else
+		echo "FAIL"
+	fi
+	return "$status"
+}
+
+stop() {
+    printf 'Stopping %s: ' "$DAEMON"
+    start-stop-daemon -K -q -p $PIDFILE
+    status=$?
+	if [ "$status" -eq 0 ]; then
+		echo "OK"
+	else
+		echo "FAIL"
+	fi
+	return "$status"
+}
+
+restart() {
+    stop
+    sleep 1
+    start
+}
+
+case "$1" in
+    start|stop|restart)
+        "$1";;
+    *)
+        echo "Usage: $0 {start|stop|restart}"
+esac
diff --git a/package/sysrepo/S51sysrepo-plugind b/package/sysrepo/S51sysrepo-plugind
new file mode 100644
index 0000000000..9dd3bb1101
--- /dev/null
+++ b/package/sysrepo/S51sysrepo-plugind
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+DAEMON="sysrepo-plugind"
+PIDFILE="/var/run/$DAEMON.pid"
+
+SYSREPO_PLUGIND_ARGS=""
+
+start() {
+    printf 'Starting %s: ' "$DAEMON"
+    start-stop-daemon -S -b -q -p $PIDFILE -x "/usr/bin/$DAEMON" \
+        -- $SYSREPO_PLUGIND_ARGS
+    status=$?
+	if [ "$status" -eq 0 ]; then
+		echo "OK"
+	else
+		echo "FAIL"
+	fi
+	return "$status"
+}
+
+stop() {
+    printf 'Stopping %s: ' "$DAEMON"
+    start-stop-daemon -K -q -p $PIDFILE
+    status=$?
+	if [ "$status" -eq 0 ]; then
+		echo "OK"
+	else
+		echo "FAIL"
+	fi
+	return "$status"
+}
+
+restart() {
+    stop
+    sleep 1
+    start
+}
+
+reload() {
+    # we do not support real reload .. just restart
+    restart
+}
+
+case "$1" in
+    start|stop|restart|reload)
+        "$1";;
+    *)
+        echo "Usage: $0 {start|stop|restart|reload}"
+esac
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..807496319f
--- /dev/null
+++ b/package/sysrepo/sysrepo.mk
@@ -0,0 +1,51 @@
+################################################################################
+#
+# 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 \
+	$(if $(BR2_INIT_SYSTEMD),-DWITH_SYSTEMD=ON) \
+	$(if $(BR2_INIT_SYSTEMD),-DSYSTEMD_UNIT_DIR=usr/lib/systemd/system)
+
+
+# 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
+
+define SYSREPO_INSTALL_INIT_SYSV
+	$(INSTALL) -m 755 -D package/sysrepo/S50sysrepod \
+		$(TARGET_DIR)/etc/init.d/S50sysrepod
+	$(INSTALL) -m 755 -D package/sysrepo/S51sysrepo-plugind \
+		$(TARGET_DIR)/etc/init.d/S51sysrepo-plugind
+endef
+
+define SYSREPO_INSTALL_INIT_SYSTEMD
+	mkdir -p $(TARGET_DIR)/etc/systemd/systemd/multi-user.target.wants
+	ln -fs ../../../../usr/lib/systemd/system/sysrepod.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+	ln -fs ../../../../usr/lib/systemd/system/sysrepo-plugind.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+endef
+
+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] 15+ messages in thread

* [Buildroot] [PATCH v3 7/9] package/netopeer2-keystored: add package
  2019-10-11 12:40 [Buildroot] [PATCH v3 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
                   ` (5 preceding siblings ...)
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 6/9] package/sysrepo: " heiko.thiery at gmail.com
@ 2019-10-11 12:40 ` heiko.thiery at gmail.com
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 8/9] package/netopeer2-server: " heiko.thiery at gmail.com
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 9/9] package/netopeer2-cli: " heiko.thiery at gmail.com
  8 siblings, 0 replies; 15+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-11 12:40 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         | 17 ++++++++++
 .../netopeer2-keystored.hash                  |  2 ++
 .../netopeer2-keystored.mk                    | 32 +++++++++++++++++++
 5 files changed, 53 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 d8992538c2..ced7461b45 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1042,6 +1042,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 54b40936ba..c1e8ce3431 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1649,6 +1649,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..d23ec2f1b9
--- /dev/null
+++ b/package/netopeer2-keystored/Config.in
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_NETOPEER2_KEYSTORED
+	bool "netopeer2-keystored"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_LIBYANG
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_SYSREPO
+	help
+	  Netopeer2 is a set of tools implementing network
+	  configuration tools based on the NETCONF Protocol.
+
+	  This is the keystored sysrepo plugin.
+
+	  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..5f897e8d08
--- /dev/null
+++ b/package/netopeer2-keystored/netopeer2-keystored.hash
@@ -0,0 +1,2 @@
+sha256 59688271be4fecbbee671fc7eb3dc0538b13b4baab53e923e26eaeb33e6f7ec0  netopeer2-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..e67b45b70e
--- /dev/null
+++ b/package/netopeer2-keystored/netopeer2-keystored.mk
@@ -0,0 +1,32 @@
+################################################################################
+#
+# netopeer2-keystored
+#
+################################################################################
+
+NETOPEER2_KEYSTORED_VERSION = v0.7-r2
+NETOPEER2_KEYSTORED_SOURCE = netopeer2-$(NETOPEER2_KEYSTORED_VERSION).tar.gz
+NETOPEER2_KEYSTORED_SITE = $(call github,CESNET,Netopeer2,$(NETOPEER2_KEYSTORED_VERSION))
+NETOPEER2_KEYSTORED_DL_SUBDIR = netopeer2
+NETOPEER2_KEYSTORED_SUBDIR = keystored
+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] 15+ messages in thread

* [Buildroot] [PATCH v3 8/9] package/netopeer2-server: add package
  2019-10-11 12:40 [Buildroot] [PATCH v3 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
                   ` (6 preceding siblings ...)
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 7/9] package/netopeer2-keystored: " heiko.thiery at gmail.com
@ 2019-10-11 12:40 ` heiko.thiery at gmail.com
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 9/9] package/netopeer2-cli: " heiko.thiery at gmail.com
  8 siblings, 0 replies; 15+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-11 12:40 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            | 54 +++++++++++
 package/netopeer2-server/S52netopeer2-server  | 90 +++++++++++++++++++
 .../netopeer2-server/netopeer2-server.hash    |  1 +
 package/netopeer2-server/netopeer2-server.mk  | 33 +++++++
 6 files changed, 180 insertions(+)
 create mode 100644 package/netopeer2-server/Config.in
 create mode 100644 package/netopeer2-server/S52netopeer2-server
 create mode 120000 package/netopeer2-server/netopeer2-server.hash
 create mode 100644 package/netopeer2-server/netopeer2-server.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index ced7461b45..31d8ff35bb 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1043,6 +1043,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 c1e8ce3431..88cd965bd7 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1650,6 +1650,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..14b415db6d
--- /dev/null
+++ b/package/netopeer2-server/Config.in
@@ -0,0 +1,54 @@
+comment "netopeer2server needs a toolchain w/ C++, threads, dynamic library, 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"
+
+config BR2_PACKAGE_NETOPEER2_SERVER
+	bool "netopeer2-server"
+	depends on BR2_USE_MMU # sysrepo
+	depends on !BR2_STATIC_LIBS # sysrepo
+	depends on BR2_INSTALL_LIBSTDCPP # sysrepo
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS
+	# host-protobuf only builds on certain architectures
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	select BR2_PACKAGE_LIBAVL
+	select BR2_PACKAGE_LIBEV
+	select BR2_PACKAGE_LIBYANG
+	select BR2_PACKAGE_LIBNETCONF2
+	select BR2_PACKAGE_PROTOBUF_C
+	select BR2_PACKAGE_PCRE
+	select BR2_PACKAGE_PCRE_UCP
+	select BR2_PACKAGE_SYSREPO
+	select BR2_PACKAGE_NETOPEER2_KEYSTORED
+	select BR2_PACKAGE_NETOPEER2_SERVER_TLS if \
+		!BR2_PACKAGE_NETOPEER2_SERVER_TLS && \
+		!BR2_PACKAGE_NETOPEER2_SERVER_SSH
+	# at the moment SSH transport is mandatory
+	select BR2_PACKAGE_NETOPEER2_SERVER_SSH
+
+	help
+	  Netopeer2 is a set of tools implementing network
+	  configuration tools based on the NETCONF Protocol.
+
+	  This is the server part.
+
+	  https://github.com/CESNET/Netopeer2
+
+if BR2_PACKAGE_NETOPEER2_SERVER
+
+config BR2_PACKAGE_NETOPEER2_SERVER_TLS
+	bool "TLS transport"
+	select BR2_PACKAGE_OPENSSL
+	help
+	  Enable TLS transport layer support.
+
+config BR2_PACKAGE_NETOPEER2_SERVER_SSH
+	bool "SSH transport"
+	select BR2_PACKAGE_LIBSSH
+	select BR2_PACKAGE_LIBSSH_SERVER
+	help
+	  Enable SSH transport layer support.
+
+endif
diff --git a/package/netopeer2-server/S52netopeer2-server b/package/netopeer2-server/S52netopeer2-server
new file mode 100644
index 0000000000..0bad83325a
--- /dev/null
+++ b/package/netopeer2-server/S52netopeer2-server
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+DAEMON="netopeer2-server"
+PIDFILE="/var/run/$DAEMON.pid"
+
+NETOPEER2_SERVER_ARGS=""
+
+KEYSTORED_HOST_KEY="/etc/keystored/keys/ssh_host_rsa_key.pem"
+
+SSHKEYGEN="/usr/bin/dropbearkey"
+DROPBEARKEY="/usr/bin/dropbearkey"
+DROPBEARCONVERT="/usr/bin/dropbearconvert"
+
+dropbear_keygen() {
+	${DROPBEARKEY} -t rsa -f ${KEYSTORED_HOST_KEY}
+	${DROPBEARCONVERT} dropbear openssh ${KEYSTORED_HOST_KEY} ${KEYSTORED_HOST_KEY}
+}
+
+ssh_keygen() {
+	${SSHKEYGEN} -m pem -t rsa -q -N "" -f ${KEYSTORED_HOST_KEY}
+}
+
+keygen() {
+	if [ -x ${DROPBEARKEY} -a -x ${DROPBEARCONVERT} ]; then
+		dropbear_keygen
+		status=$?
+	elif [ -x ${SSHKEYGEN} ]; then
+		ssh_keygen
+		status=$?
+	else
+		status=1
+	fi
+
+	return "$status"
+}
+
+start() {
+	printf 'Starting %s: ' "$DAEMON"
+	if [ ! -f ${KEYSTORED_HOST_KEY} ]; then
+		keygen
+		status=$?
+		if [ "$status" -eq 0 ]; then
+			echo "OK"
+		else
+			echo "FAIL"
+		fi
+	else
+		echo "OK"
+	fi
+
+	start-stop-daemon -S -b -q -p $PIDFILE -x "/usr/bin/$DAEMON" \
+		-- $NETOPEER2_SERVER_ARGS
+	status=$?
+	if [ "$status" -eq 0 ]; then
+		echo "OK"
+	else
+		echo "FAIL"
+	fi
+	return "$status"
+}
+
+stop() {
+	printf 'Stopping %s: ' "$DAEMON"
+	start-stop-daemon -K -q -p $PIDFILE
+	status=$?
+	if [ "$status" -eq 0 ]; then
+		echo "OK"
+	else
+		echo "FAIL"
+	fi
+	return "$status"
+}
+
+restart() {
+	stop
+	sleep 1
+	start
+}
+
+reload() {
+	# we do not support real reload .. just restart
+	restart
+}
+
+case "$1" in
+	start|stop|restart|reload)
+		"$1";;
+	*)
+		echo "Usage: $0 {start|stop|restart|reload}"
+esac
diff --git a/package/netopeer2-server/netopeer2-server.hash b/package/netopeer2-server/netopeer2-server.hash
new file mode 120000
index 0000000000..47bb47d7e3
--- /dev/null
+++ b/package/netopeer2-server/netopeer2-server.hash
@@ -0,0 +1 @@
+../netopeer2-keystored/netopeer2-keystored.hash
\ No newline at end of file
diff --git a/package/netopeer2-server/netopeer2-server.mk b/package/netopeer2-server/netopeer2-server.mk
new file mode 100644
index 0000000000..39666a8e24
--- /dev/null
+++ b/package/netopeer2-server/netopeer2-server.mk
@@ -0,0 +1,33 @@
+################################################################################
+#
+# netopeer2-server
+#
+################################################################################
+
+NETOPEER2_SERVER_VERSION = v0.7-r2
+NETOPEER2_SERVER_SOURCE = netopeer2-$(NETOPEER2_SERVER_VERSION).tar.gz
+NETOPEER2_SERVER_SITE = $(call github,CESNET,Netopeer2,$(NETOPEER2_SERVER_VERSION))
+NETOPEER2_SERVER_DL_SUBDIR = netopeer2
+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_INSTALL_INIT_SYSV
+	$(INSTALL) -m 755 -D package/netopeer2-server/S52netopeer2-server \
+		$(TARGET_DIR)/etc/init.d/S52netopeer2-server
+endef
+
+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] 15+ messages in thread

* [Buildroot] [PATCH v3 9/9] package/netopeer2-cli: add package
  2019-10-11 12:40 [Buildroot] [PATCH v3 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
                   ` (7 preceding siblings ...)
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 8/9] package/netopeer2-server: " heiko.thiery at gmail.com
@ 2019-10-11 12:40 ` heiko.thiery at gmail.com
  8 siblings, 0 replies; 15+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-11 12:40 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          | 21 +++++++++++++++++++++
 package/netopeer2-cli/netopeer2-cli.hash |  1 +
 package/netopeer2-cli/netopeer2-cli.mk   | 17 +++++++++++++++++
 5 files changed, 41 insertions(+)
 create mode 100644 package/netopeer2-cli/Config.in
 create mode 120000 package/netopeer2-cli/netopeer2-cli.hash
 create mode 100644 package/netopeer2-cli/netopeer2-cli.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 31d8ff35bb..69528b3266 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1042,6 +1042,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 88cd965bd7..f5cf5fa934 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1649,6 +1649,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..9c3a302a1d
--- /dev/null
+++ b/package/netopeer2-cli/Config.in
@@ -0,0 +1,21 @@
+config BR2_PACKAGE_NETOPEER2_CLI
+	bool "netopeer2-cli"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_LIBYANG
+	select BR2_PACKAGE_LIBNETCONF2
+	select BR2_PACKAGE_LIBSSH
+	select BR2_PACKAGE_LIBSSH_SERVER
+	select BR2_PACKAGE_PCRE # libyang
+	select BR2_PACKAGE_PCRE_UCP # libyang
+	select BR2_PACKAGE_SYSREPO
+	help
+	  Netopeer2 is a set of tools implementing network
+	  configuration tools based on the NETCONF Protocol.
+
+	  This is the CLI client part.
+
+	  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 120000
index 0000000000..47bb47d7e3
--- /dev/null
+++ b/package/netopeer2-cli/netopeer2-cli.hash
@@ -0,0 +1 @@
+../netopeer2-keystored/netopeer2-keystored.hash
\ No newline at end of file
diff --git a/package/netopeer2-cli/netopeer2-cli.mk b/package/netopeer2-cli/netopeer2-cli.mk
new file mode 100644
index 0000000000..6eaedbe4b5
--- /dev/null
+++ b/package/netopeer2-cli/netopeer2-cli.mk
@@ -0,0 +1,17 @@
+################################################################################
+#
+# netopeer2-cli
+#
+################################################################################
+
+NETOPEER2_CLI_VERSION = v0.7-r2
+NETOPEER2_CLI_SOURCE = netopeer2-$(NETOPEER2_CLI_VERSION).tar.gz
+NETOPEER2_CLI_SITE = $(call github,CESNET,Netopeer2,$(NETOPEER2_CLI_VERSION))
+NETOPEER2_CLI_DL_SUBDIR = netopeer2
+NETOPEER2_CLI_LICENSE = BSD-3-Clause
+NETOPEER2_CLI_LICENSE_FILES = LICENSE
+NETOPEER2_CLI_SUBDIR = cli
+NETOPEER2_CLI_INSTALL_STAGING = YES
+NETOPEER2_CLI_DEPENDENCIES = libnetconf2 libyang sysrepo
+
+$(eval $(cmake-package))
-- 
2.20.1

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

* [Buildroot] [PATCH v3 3/9] package/libavl: add package
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 3/9] package/libavl: add package heiko.thiery at gmail.com
@ 2019-10-22 21:28   ` Thomas Petazzoni
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2019-10-22 21:28 UTC (permalink / raw)
  To: buildroot

On Fri, 11 Oct 2019 14:40:41 +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>
> ---
>  DEVELOPERS                             |  3 ++
>  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 ++++++++++++++++++++++
>  6 files changed, 114 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

Applied to master, thanks.

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

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

* [Buildroot] [PATCH v3 4/9] package/libyang: add package
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 4/9] package/libyang: " heiko.thiery at gmail.com
@ 2019-10-22 21:30   ` Thomas Petazzoni
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2019-10-22 21:30 UTC (permalink / raw)
  To: buildroot

On Fri, 11 Oct 2019 14:40:42 +0200
heiko.thiery at gmail.com wrote:

> 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

Applied to master, thanks.

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

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

* [Buildroot] [PATCH v3 5/9] package/libnetconf2: add package
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 5/9] package/libnetconf2: " heiko.thiery at gmail.com
@ 2019-10-22 21:33   ` Thomas Petazzoni
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2019-10-22 21:33 UTC (permalink / raw)
  To: buildroot

On Fri, 11 Oct 2019 14:40:43 +0200
heiko.thiery at gmail.com wrote:

> 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                 | 15 +++++
>  package/libnetconf2/libnetconf2.hash          |  2 +
>  package/libnetconf2/libnetconf2.mk            | 40 ++++++++++++
>  6 files changed, 124 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

Applied to master, thanks.

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

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

* [Buildroot] [PATCH v3 6/9] package/sysrepo: add package
  2019-10-11 12:40 ` [Buildroot] [PATCH v3 6/9] package/sysrepo: " heiko.thiery at gmail.com
@ 2019-10-23 16:39   ` Michael Walle
  2019-10-23 16:43     ` Heiko Thiery
  0 siblings, 1 reply; 15+ messages in thread
From: Michael Walle @ 2019-10-23 16:39 UTC (permalink / raw)
  To: buildroot

Am 2019-10-11 14:40, schrieb heiko.thiery at gmail.com:
> 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>
> --- /dev/null
> +++ b/package/sysrepo/Config.in
> @@ -0,0 +1,26 @@
> +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_LIBAVL
> +	select BR2_PACKAGE_LIBYANG
> +	select BR2_PACKAGE_PROTOBUF_C
> +	select BR2_PACKAGE_PCRE
> +	select BR2_PACKAGE_PCRE_UCP
> +	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"

Sysrepo comes with examples ([1]), IMHO it would be useful to have a 
switch in Kconfig to automatically build and install these examples.

-michael

[1] 
https://github.com/sysrepo/sysrepo/blob/906927b4ee2dd0d5bd669d193fc851d14919fbd1/CMakeLists.txt#L267

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

* [Buildroot] [PATCH v3 6/9] package/sysrepo: add package
  2019-10-23 16:39   ` Michael Walle
@ 2019-10-23 16:43     ` Heiko Thiery
  0 siblings, 0 replies; 15+ messages in thread
From: Heiko Thiery @ 2019-10-23 16:43 UTC (permalink / raw)
  To: buildroot

> Sysrepo comes with examples ([1]), IMHO it would be useful to have a
> switch in Kconfig to automatically build and install these examples.
>
> -michael
>
> [1]
> https://github.com/sysrepo/sysrepo/blob/906927b4ee2dd0d5bd669d193fc851d14919fbd1/CMakeLists.txt#L267

I already have a sysrepo package version with this option enabled. I
will prepare a new patchset with the other remaining patches/packages
(netopeer2-x).

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

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

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-11 12:40 [Buildroot] [PATCH v3 0/9] Add netopeer2 package (and dependencies) heiko.thiery at gmail.com
2019-10-11 12:40 ` [Buildroot] [PATCH v3 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
2019-10-11 12:40 ` [Buildroot] [PATCH v3 2/9] package/libssh: " heiko.thiery at gmail.com
2019-10-11 12:40 ` [Buildroot] [PATCH v3 3/9] package/libavl: add package heiko.thiery at gmail.com
2019-10-22 21:28   ` Thomas Petazzoni
2019-10-11 12:40 ` [Buildroot] [PATCH v3 4/9] package/libyang: " heiko.thiery at gmail.com
2019-10-22 21:30   ` Thomas Petazzoni
2019-10-11 12:40 ` [Buildroot] [PATCH v3 5/9] package/libnetconf2: " heiko.thiery at gmail.com
2019-10-22 21:33   ` Thomas Petazzoni
2019-10-11 12:40 ` [Buildroot] [PATCH v3 6/9] package/sysrepo: " heiko.thiery at gmail.com
2019-10-23 16:39   ` Michael Walle
2019-10-23 16:43     ` Heiko Thiery
2019-10-11 12:40 ` [Buildroot] [PATCH v3 7/9] package/netopeer2-keystored: " heiko.thiery at gmail.com
2019-10-11 12:40 ` [Buildroot] [PATCH v3 8/9] package/netopeer2-server: " heiko.thiery at gmail.com
2019-10-11 12:40 ` [Buildroot] [PATCH v3 9/9] package/netopeer2-cli: " 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.