NETCONF protocol is implemented via netopeer2/sysrepo.
Add the netopeer2 recipe so that the NETCONF protocol can be realized
on devices supporting ethernet.

The recipe is taken as-is from the commit 09f73e7 ("update for honister")
from the public repo [1].

[1] - https://github.com/sartura/meta-sysrepo

Signed-off-by: Ravi Gunasekaran <[email protected]>
---

Changes since v2:
---------------
Newly introduced in this series

 .../netopeer2-server/netopeer2-server         | 35 +++++++++++++++++++
 .../netopeer2-server/netopeer2-server_git.bb  | 31 ++++++++++++++++
 2 files changed, 66 insertions(+)
 create mode 100644 
meta-arago-extras/recipes-sysrepo/netopeer2-server/netopeer2-server/netopeer2-server
 create mode 100644 
meta-arago-extras/recipes-sysrepo/netopeer2-server/netopeer2-server_git.bb

diff --git 
a/meta-arago-extras/recipes-sysrepo/netopeer2-server/netopeer2-server/netopeer2-server
 
b/meta-arago-extras/recipes-sysrepo/netopeer2-server/netopeer2-server/netopeer2-server
new file mode 100644
index 00000000..7077df03
--- /dev/null
+++ 
b/meta-arago-extras/recipes-sysrepo/netopeer2-server/netopeer2-server/netopeer2-server
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Source function library.
+. /etc/init.d/functions
+
+EXEC_PATH="/usr/sbin"
+SERVER_EXEC="netopeer2-server"
+SERVER_OPTS=" -v 1"
+
+
+case "$1" in
+    start)
+        /etc/init.d/sysrepo start
+        start-stop-daemon --start --exec $EXEC_PATH/$SERVER_EXEC -- 
$SERVER_OPTS
+        ;;
+    stop)
+        start-stop-daemon --stop --quiet --exec $EXEC_PATH/$SERVER_EXEC
+        ;;
+    status)
+        status $SERVER_EXEC
+        ;;
+    reload)
+        echo "not supported"
+        ;;
+    restart)
+        $0 stop
+        $0 start
+        ;;
+    *)
+        echo "Usage: $0 {start|stop|status|restart}"
+        exit 1;;
+esac
+
+
+exit 0
diff --git 
a/meta-arago-extras/recipes-sysrepo/netopeer2-server/netopeer2-server_git.bb 
b/meta-arago-extras/recipes-sysrepo/netopeer2-server/netopeer2-server_git.bb
new file mode 100644
index 00000000..e4278d23
--- /dev/null
+++ b/meta-arago-extras/recipes-sysrepo/netopeer2-server/netopeer2-server_git.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Netopeer2 is a set of tools implementing network configuration 
tools based on the NETCONF Protocol."
+DESCRIPTION = "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."
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=41daedff0b24958b2eba4f9086d782e1"
+
+SRC_URI = "git://github.com/CESNET/Netopeer2.git;protocol=https;branch=devel 
file://netopeer2-server"
+
+PV = "2.1.59+git${SRCPV}"
+SRCREV = "b81788d9a81770313a0eb7f88d4224726b3d6e15"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "libyang libnetconf2 sysrepo curl"
+RDEPENDS:${PN} += "bash curl"
+
+FILES:${PN} += "/usr/share/yang* /usr/share/netopeer2/* 
/usr/lib/sysrepo-plugind/*"
+
+inherit cmake pkgconfig
+
+# Specify any options you want to pass to cmake using EXTRA_OECMAKE:
+EXTRA_OECMAKE = " -DCMAKE_INSTALL_PREFIX=/usr 
-DCMAKE_BUILD_TYPE:String=Release -DINSTALL_MODULES=OFF -DGENERATE_HOSTKEY=OFF 
-DMERGE_LISTEN_CONFIG=OFF"
+
+do_install:append () {
+    install -d ${D}/etc/netopeer2/scripts
+    install -o root -g root ${S}/scripts/setup.sh 
${D}/etc/netopeer2/scripts/setup.sh
+    install -o root -g root ${S}/scripts/merge_hostkey.sh 
${D}/etc/netopeer2/scripts/merge_hostkey.sh
+    install -o root -g root ${S}/scripts/merge_config.sh 
${D}/etc/netopeer2/scripts/merge_config.sh
+    install -d ${D}/etc/netopeer2
+    install -d ${D}/etc/init.d
+    install -m 0755 ${WORKDIR}/netopeer2-server ${D}/etc/init.d/
+}
-- 
2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14702): 
https://lists.yoctoproject.org/g/meta-arago/message/14702
Mute This Topic: https://lists.yoctoproject.org/mt/99806413/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to