Add netopeer2 package (and dependencies)
v4 cover Add netopeer2 package (and dependencies)
From: Heiko Thiery <[email protected]>
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 sysrepo, netopeer2-server, netopeer2-cli, netopeer2-keystored.
Also add the host target support for libev. This is needed for the install steps of sysrepo, netopeer2-server and netopeer2-keystored.
---
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.
Changes v3 -> v4:
- add config option for sysrepo examples
- remove select of BR2_PACKAGE_NETOPEER2_SERVER_TLS in netopeer2-server because it creates a recursive dependency.
- fix check-package warnings
Heiko Thiery (5):
package/libev: use host-autotools-package macro
package/sysrepo: add package
package/netopeer2-keystored: add package
package/netopeer2-server: add package
package/netopeer2-cli: add package
DEVELOPERS | 4 + package/Config.in | 4 + package/libev/libev.mk | 1 + 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 | 51 +++++++++++ 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 | 35 ++++++++ package/sysrepo/S50sysrepod | 44 +++++++++ package/sysrepo/S51sysrepo-plugind | 49 ++++++++++ package/sysrepo/sysrepo.hash | 2 + package/sysrepo/sysrepo.mk | 52 +++++++++++ 20 files changed, 529 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 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
Signature · 1 line
2.20.1
PATCH v4 1/5 package/libev: use host-autotools-package macro
From: Heiko Thiery <[email protected]>
Enable host support for the lib because the package host-sysrepo (depends on package libnetconf2) is needed by package netopeer2keystored.
--- package/libev/libev.mk | 1 + 1 file changed, 1 insertion(+)
package/libev/libev.mk +1 -0
@@ -18,3 +18,4 @@ endef LIBEV_POST_PATCH_HOOKS += LIBEV_DISABLE_EVENT_H_INSTALL $(eval $(autotools-package)) +$(eval $(host-autotools-package))
Signature · 1 line
2.20.1
PATCH v4 2/5 package/sysrepo: add package
In reply to heiko.thiery at gmail.comFrom: Heiko Thiery <[email protected]>
sysrepo is a YANG-based configuration and operational state data store for Unix/Linux applications. It is a dependency of Netopeer, a NETCONF server.
--- 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 | 35 +++++++++++++ package/sysrepo/S50sysrepod | 44 ++++++++++++++++ package/sysrepo/S51sysrepo-plugind | 49 ++++++++++++++++++ package/sysrepo/sysrepo.hash | 2 + package/sysrepo/sysrepo.mk | 51 +++++++++++++++++++ 9 files changed, 256 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
DEVELOPERS +1 -0
@@ -1045,6 +1045,7 @@ F: package/python-sip/ N: Heiko Thiery <[email protected]> F: package/libnetconf2/ F: package/libyang/ +F: package/sysrepo/ N: Henrique Camargo <[email protected]> F: package/json-glib/
package/Config.in +1 -0
@@ -1678,6 +1678,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"
package/sysrepo/0001-CMakeLists.txt-respect-CMAKE_INSTALL_PREFIX-and-DEST.patch new file +33 -0
@@ -0,0 +1,33 @@ +From c4a2195febbd5d436f8de79d8391d8da9aa60ac4 Mon Sep 17 00:00:00 2001 +From: Michael Walle <[email protected]> +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 <[email protected]> +--- + 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 +
package/sysrepo/0002-CMakeLists.txt-make-systemd-unit-dir-configurable.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 906927b4ee2dd0d5bd669d193fc851d14919fbd1 Mon Sep 17 00:00:00 2001 +From: Michael Walle <[email protected]> +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 <[email protected]> +--- + 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 +
package/sysrepo/Config.in new file +35 -0
@@ -0,0 +1,35 @@ +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" + +if BR2_PACKAGE_SYSREPO + +config BR2_PACKAGE_SYSREPO_EXAMPLES + bool "sysrepo examples" + help + Enable sysrepo examples. + +endif
package/sysrepo/S50sysrepod new file +44 -0
44 lines not on this page · raw message
package/sysrepo/S51sysrepo-plugind new file +49 -0
49 lines not on this page · raw message
package/sysrepo/sysrepo.hash new file +2 -0
@@ -0,0 +1,2 @@ +sha256 d3066c1776a6727b96bbb3517eb646d0bb6037e8e1addcbe873cae590493843e sysrepo-v0.7.8.tar.gz +sha256 28a773bfffa828ec38c030fc8ace5f3aeb90926ec1309bbd135441c4387ce3cd LICENSE
package/sysrepo/sysrepo.mk new file +51 -0
51 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH 2/5 package/sysrepo: add package
Hello Heiko,
Quoted 7 lines · On Thu, 24 Oct 2019 09:46:43 +0200 heiko.thiery at gmail.com wrote:
From: Heiko Thiery <[email protected]>
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 <[email protected]>
I gave this a try, but unfortunately, host-sysrepo causes an installation failure here.
I'm building this configuration:
BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2019.05.1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_SYSREPO=y
# BR2_TARGET_ROOTFS_TAR is not set
which fails with:
-- Installing: /home/thomas/projets/buildroot/output/host/lib64/pkgconfig/libSysrepo-cpp.pc -- Installing: /usr/lib/python2.7/site-packages/_sysrepo.so
CMake Error at swig/python/cmake_install.cmake:49 (file):
file INSTALL cannot copy file "/home/thomas/projets/buildroot/output/build/host-sysrepo-v0.7.8/swig/python/_sysrepo.so" to "/usr/lib/python2.7/site-packages/_sysrepo.so".
Call Stack (most recent call first):
swig/cmake_install.cmake:112 (include)
cmake_install.cmake:173 (include)
It tries to install stuff in /usr/lib/python2.7/, which of course is not allowed.
Another issue is that the host-sysrepo installation installs stuff to $(TARGET_DIR) which really isn't good for a host package:
[100%] Built target _sysrepo
Install the project...
-- Install configuration: "debug"
-- Installing: /home/thomas/projets/buildroot/output/target/etc/sysrepo
-- Installing: /home/thomas/projets/buildroot/output/target/etc/sysrepo/yang/
-- Installing: /home/thomas/projets/buildroot/output/target/etc/sysrepo/data/
-- Installing: /home/thomas/projets/buildroot/output/target/etc/sysrepo/data/internal/
-- Installing: /home/thomas/projets/buildroot/output/host/var/run/sysrepo-subscriptions
-- Installing: /home/thomas/projets/buildroot/output/host/lib64/sysrepo/plugins
-- Installing: /home/thomas/projets/buildroot/output/target/etc/sysrepo/yang/internal/sysrepo-persistent-data.yang -- Installing: /home/thomas/projets/buildroot/output/target/etc/sysrepo/yang/internal/sysrepo-module-dependencies.yang -- Installing: /home/thomas/projets/buildroot/output/target/etc/sysrepo/yang/internal/sysrepo-notification-store.yang -- Installing: /home/thomas/projets/buildroot/output/host/lib64/pkgconfig/libsysrepo.pc
-- Installing: /home/thomas/projets/buildroot/output/host/share/man/man1/sysrepoctl.1
See some other review comments below.
package/sysrepo/0001-CMakeLists.txt-respect-CMAKE_INSTALL_PREFIX-and-DEST.patch line 4
Quoted 10 lines
package/sysrepo/0001-CMakeLists.txt-respect-CMAKE_INSTALL_PREFIX-and-DEST.patch new file +4
-0@@ -0,0 +1,33 @@ +From c4a2195febbd5d436f8de79d8391d8da9aa60ac4 Mon Sep 17 00:00:00 2001 +From: Michael Walle <[email protected]> +Date: Thu, 10 Oct 2019 14:58:16 +0200 +Subject: [PATCH 1/2] CMakeLists.txt: respect CMAKE_INSTALL_PREFIX and DESTDIR
Patches should be generated with git format-patch -N so that they don't have the 1/2, 2/2 statements.
Quoted 7 lines
package/sysrepo/Config.in new file +1
-0@@ -0,0 +1,35 @@ +config BR2_PACKAGE_SYSREPO
package/sysrepo/Config.in line 11
Quoted 10 lines
package/sysrepo/Config.in new file +10
-0+ 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
Alphabetic sorting: should be before select BR2_PACKAGE_LIBEV.
package/sysrepo/Config.in line 15
Quoted 4 lines
package/sysrepo/Config.in new file +4
-0+ select BR2_PACKAGE_LIBYANG + select BR2_PACKAGE_PROTOBUF_C + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_PCRE_UCP
Ditto alphabetic sorting: pcre before protobuf.
package/sysrepo/Config.in line 26
Quoted 11 lines
package/sysrepo/Config.in new file +11
-0+ 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"
Put the comment at the end of the Config.in file, otherwise the "sysrepo examples" option is not intended properly when looked at in menuconfig.
package/sysrepo/Config.in line 31
Quoted 5 lines
package/sysrepo/Config.in new file +5
-0+ +if BR2_PACKAGE_SYSREPO + +config BR2_PACKAGE_SYSREPO_EXAMPLES + bool "sysrepo examples"
When it will be intended under sysrepo, repeating sysrepo is not very useful, so maybe just:
bool "enable examples"
Quoted 8 lines
package/sysrepo/S50sysrepod new file +2
-0@@ -0,0 +1,44 @@ +#!/bin/sh +
package/sysrepo/S50sysrepod line 12
Quoted 10 lines
package/sysrepo/S50sysrepod new file +10
-0+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=$?
Indentation if four spaces until this line.
package/sysrepo/S50sysrepod line 13
Quoted 1 line
package/sysrepo/S50sysrepod new file +1
-0+ if [ "$status" -eq 0 ]; then
And then one tab starting from this line. Please check the reference init script in package/busybox/, and try to be consistent with what they do in terms of indentation. Note: this problem is also below in the same init script, as well as in the other init script.
package/sysrepo/S50sysrepod line 14
Quoted 1 line
package/sysrepo/S50sysrepod new file +1
-0+SYSREPO_VERSION = v0.7.8
The v should be in SYSREPO_SITE, not SYSREPO_VERSION.
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v4 2/5 package/sysrepo: add package
Quoted 5 lines
I gave this a try, but unfortunately, host-sysrepo causes an installation failure here.
I'm building this configuration:
Quoted 15 lines
BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2019.05.1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
#BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUGis not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
#BR2_PACKAGE_BUSYBOXis not set
BR2_PACKAGE_SYSREPO=y
#BR2_TARGET_ROOTFS_TARis not set
Can you give me a hint how I can easily use this defconfig to reproduce this? I just used the test-pkg utility and this seems to build successfully and I struggle with setting this up.
PATCH 2/5 package/sysrepo: add package
Quoted 21 lines · Heiko Thiery
Quoted 5 lines
I gave this a try, but unfortunately, host-sysrepo causes an installation failure here.
I'm building this configuration:
Quoted 15 lines
BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2019.05.1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
#BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUGis not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
#BR2_PACKAGE_BUSYBOXis not set
BR2_PACKAGE_SYSREPO=y
#BR2_TARGET_ROOTFS_TARis not set
Quoted 3 lines
Can you give me a hint how I can easily use this defconfig to reproduce this? I just used the test-pkg utility and this seems to build successfully and I struggle with setting this up.
Just write those lines (and nothing else) to .config, remove the output
directory, and to make olddefconfig; make.
Regards,
Arnout
PATCH v4 2/5 package/sysrepo: add package
Quoted 2 lines
Just write those lines (and nothing else) to .config, remove the output
directory, and to make olddefconfig; make.
thanks. that was it.
PATCH v4 2/5 package/sysrepo: add package
In reply to Thomas PetazzoniQuoted 23 lines
I gave this a try, but unfortunately, host-sysrepo causes an installation failure here.
I'm building this configuration:
BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2019.05.1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
#BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUGis not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
#BR2_PACKAGE_BUSYBOXis not set
BR2_PACKAGE_SYSREPO=y
#BR2_TARGET_ROOTFS_TARis not setwhich fails with:
Quoted 9 lines
-- Installing:
/home/thomas/projets/buildroot/output/host/lib64/pkgconfig/libSysrepo-cpp.pc-- Installing:/usr/lib/python2.7/site-packages/_sysrepo.so
CMake Error at swig/python/cmake_install.cmake:49 (file):
file INSTALL cannot copy file "/home/thomas/projets/buildroot/output/build/host-sysrepo-v0.7.8/swig/python/_sysrepo.so" to "/usr/lib/python2.7/site-packages/_sysrepo.so".
Call Stack (most recent call first):
swig/cmake_install.cmake:112 (include)
cmake_install.cmake:173 (include)
fix this and rebuild your config. now it looks better.
Quoted 2 lines
Another issue is that the host-sysrepo installation installs stuff to $(TARGET_DIR) which really isn't good for a host package:
fix this installation issue
Quoted 35 lines
See some other review comments below.
package/sysrepo/0001-CMakeLists.txt-respect-CMAKE_INSTALL_PREFIX-and-DEST.patch line 4
Quoted 10 lines
package/sysrepo/0001-CMakeLists.txt-respect-CMAKE_INSTALL_PREFIX-and-DEST.patch new file +4
-0@@ -0,0 +1,33 @@ +From c4a2195febbd5d436f8de79d8391d8da9aa60ac4 Mon Sep 17 00:00:00 2001 +From: Michael Walle <[email protected]> +Date: Thu, 10 Oct 2019 14:58:16 +0200 +Subject: [PATCH 1/2] CMakeLists.txt: respect CMAKE_INSTALL_PREFIX and DESTDIRPatches should be generated with git format-patch -N so that they don't have the 1/2, 2/2 statements.
Quoted 7 lines
package/sysrepo/Config.in new file +1
-0@@ -0,0 +1,35 @@ +config BR2_PACKAGE_SYSREPOpackage/sysrepo/Config.in line 11
Quoted 10 lines
package/sysrepo/Config.in new file +10
-0+ 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_LIBAVLAlphabetic sorting: should be before select
BR2_PACKAGE_LIBEV.
Quoted 6 lines
package/sysrepo/Config.in line 15
Quoted 4 lines
package/sysrepo/Config.in new file +4
-0+ select BR2_PACKAGE_LIBYANG + select BR2_PACKAGE_PROTOBUF_C + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_PCRE_UCPDitto alphabetic sorting: pcre before protobuf.
Done
Quoted 16 lines
package/sysrepo/Config.in line 26
Quoted 12 lines
package/sysrepo/Config.in new file +11
-0+ 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"Put the comment at the end of the Config.in file, otherwise the "sysrepo examples" option is not intended properly when looked at in menuconfig.
Done
Quoted 32 lines
package/sysrepo/Config.in line 31
Quoted 5 lines
package/sysrepo/Config.in new file +5
-0+ +if BR2_PACKAGE_SYSREPO + +config BR2_PACKAGE_SYSREPO_EXAMPLES + bool "sysrepo examples"When it will be intended under sysrepo, repeating sysrepo is not very useful, so maybe just:
bool "enable examples"
Quoted 8 lines
package/sysrepo/S50sysrepod new file +2
-0@@ -0,0 +1,44 @@ +#!/bin/sh +package/sysrepo/S50sysrepod line 12
Quoted 10 lines
package/sysrepo/S50sysrepod new file +10
-0+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=$?Indentation if four spaces until this line.
Quoted 6 lines
package/sysrepo/S50sysrepod line 13
Quoted 1 line
package/sysrepo/S50sysrepod new file +1
-0+ if [ "$status" -eq 0 ]; thenAnd then one tab starting from this line. Please check the reference init script in package/busybox/, and try to be consistent with what they do in terms of indentation. Note: this problem is also below in the same init script, as well as in the other init script.
Done
Quoted 3 lines
package/sysrepo/S50sysrepod line 14
Quoted 1 line
package/sysrepo/S50sysrepod new file +1
-0+SYSREPO_VERSION = v0.7.8The v should be in
SYSREPO_SITE, notSYSREPO_VERSION.
This was already fixed in last patchset (v4)
Thank you again for your endurance with me ;-)
--
Heiko
PATCH v4 3/5 package/netopeer2-keystored: add package
In reply to heiko.thiery at gmail.comFrom: Heiko Thiery <[email protected]>
netopeer2 keystored plugin.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/netopeer2-keystored/Config.in | 17 ++++++++++ .../netopeer2-keystored.hash | 2 ++ .../netopeer2-keystored.mk | 31 +++++++++++++++++++ 5 files changed, 52 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
DEVELOPERS +1 -0
@@ -1045,6 +1045,7 @@ F: package/python-sip/ N: Heiko Thiery <[email protected]> F: package/libnetconf2/ F: package/libyang/ +F: package/netopeer2-keystored/ F: package/sysrepo/ N: Henrique Camargo <[email protected]>
package/Config.in +1 -0
@@ -1657,6 +1657,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"
package/netopeer2-keystored/Config.in new file +17 -0
@@ -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
package/netopeer2-keystored/netopeer2-keystored.hash new file +2 -0
@@ -0,0 +1,2 @@ +sha256 59688271be4fecbbee671fc7eb3dc0538b13b4baab53e923e26eaeb33e6f7ec0 netopeer2-v0.7-r2.tar.gz +sha256 932b75a8610a5c58e0fe0f70f8e4ebbcf3a2392acc16a88e95aebcdbdb9245e0 LICENSE
package/netopeer2-keystored/netopeer2-keystored.mk new file +31 -0
@@ -0,0 +1,31 @@ +################################################################################ +# +# 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_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))
Signature · 1 line
2.20.1
PATCH v4 4/5 package/netopeer2-server: add package
In reply to heiko.thiery at gmail.comFrom: Heiko Thiery <[email protected]>
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.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/netopeer2-server/Config.in | 51 +++++++++++ package/netopeer2-server/S52netopeer2-server | 90 +++++++++++++++++++ .../netopeer2-server/netopeer2-server.hash | 1 + package/netopeer2-server/netopeer2-server.mk | 33 +++++++ 6 files changed, 177 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
DEVELOPERS +1 -0
@@ -1046,6 +1046,7 @@ N: Heiko Thiery <[email protected]> F: package/libnetconf2/ F: package/libyang/ F: package/netopeer2-keystored/ +F: package/netopeer2-server/ F: package/sysrepo/ N: Henrique Camargo <[email protected]>
package/Config.in +1 -0
@@ -1658,6 +1658,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"
package/netopeer2-server/Config.in new file +51 -0
51 lines not on this page · raw message
package/netopeer2-server/S52netopeer2-server new file +90 -0
90 lines not on this page · raw message
package/netopeer2-server/netopeer2-server.hash new file +1 -0
@@ -0,0 +1 @@ +../netopeer2-keystored/netopeer2-keystored.hash
package/netopeer2-server/netopeer2-server.mk new file +33 -0
@@ -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))
Signature · 1 line
2.20.1
PATCH v4 5/5 package/netopeer2-cli: add package
In reply to heiko.thiery at gmail.comFrom: Heiko Thiery <[email protected]>
netopeer2 CLI - simple command line interface to connect to a NETCONF server (device).
--- 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
DEVELOPERS +1 -0
@@ -1045,6 +1045,7 @@ F: package/python-sip/ N: Heiko Thiery <[email protected]> F: package/libnetconf2/ F: package/libyang/ +F: package/netopeer2-cli/ F: package/netopeer2-keystored/ F: package/netopeer2-server/ F: package/sysrepo/
package/Config.in +1 -0
@@ -1657,6 +1657,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"
package/netopeer2-cli/Config.in new file +21 -0
@@ -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
package/netopeer2-cli/netopeer2-cli.hash new file +1 -0
@@ -0,0 +1 @@ +../netopeer2-keystored/netopeer2-keystored.hash
package/netopeer2-cli/netopeer2-cli.mk new file +17 -0
@@ -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))
Signature · 1 line
2.20.1