From patchwork Wed Jun 21 09:17:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ravi Gunasekaran X-Patchwork-Id: 26094 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE861EB64D7 for ; Wed, 21 Jun 2023 09:18:15 +0000 (UTC) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by mx.groups.io with SMTP id smtpd.web11.6777.1687339088757469220 for ; Wed, 21 Jun 2023 02:18:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=rXbAlnwx; spf=pass (domain: ti.com, ip: 198.47.19.142, mailfrom: r-gunasekaran@ti.com) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35L9I6AG039171; Wed, 21 Jun 2023 04:18:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1687339086; bh=okcc0VJBMv07elfQiKgB3UevY8yZhVsqEEGZUuQCnBQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=rXbAlnwxCpA2L6SxJn0smK7GM3pMyM0zgtaskzrsstVl2hSGUIwSEQxX3s23KRDI1 E6h4akCP7s8miaunC3xo0P/W8dQPBE9SeJri46AwZm6d4RArlib1yDSuSTVKriQO/e k3iozorSvyfqLsgNTIOgxY6DiUUzDt0PI4S/OYtA= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35L9I6Pw020956 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 21 Jun 2023 04:18:06 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 21 Jun 2023 04:18:06 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 21 Jun 2023 04:18:06 -0500 Received: from uda0500640.dal.design.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35L9I2AL058227; Wed, 21 Jun 2023 04:18:04 -0500 From: Ravi Gunasekaran To: CC: , , , Subject: [master/kirkstone 1/3] meta-arago-extras: sysrepo: Update checksum for nw-configurator Date: Wed, 21 Jun 2023 14:47:59 +0530 Message-ID: <20230621091801.14944-2-r-gunasekaran@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230621091801.14944-1-r-gunasekaran@ti.com> References: <20230621091801.14944-1-r-gunasekaran@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 21 Jun 2023 09:18:15 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14667 Update the checksum values for nw-configurator Signed-off-by: Ravi Gunasekaran --- .../recipes-sysrepo/nw-configurator/nw-configurator.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-arago-extras/recipes-sysrepo/nw-configurator/nw-configurator.bb b/meta-arago-extras/recipes-sysrepo/nw-configurator/nw-configurator.bb index 5a152017..b8a93f1c 100644 --- a/meta-arago-extras/recipes-sysrepo/nw-configurator/nw-configurator.bb +++ b/meta-arago-extras/recipes-sysrepo/nw-configurator/nw-configurator.bb @@ -1,6 +1,6 @@ LICENSE="GPLv2" DESCRIPTION = "Sysrepo based repo to configure EST" -LIC_FILES_CHKSUM = "file://nw-configurator.c;md5=a818a6cf4fbeeb21acc8b4e9956c08a4" +LIC_FILES_CHKSUM = "file://nw-configurator.c;md5=f2ec672593c3707bb4fe68307dbf0506" SRC_URI = "file://nw-configurator.c" From patchwork Wed Jun 21 09:18:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ravi Gunasekaran X-Patchwork-Id: 26092 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0A28EB64DD for ; Wed, 21 Jun 2023 09:18:15 +0000 (UTC) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by mx.groups.io with SMTP id smtpd.web10.6749.1687339091093278697 for ; Wed, 21 Jun 2023 02:18:11 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=fD+P1nSu; spf=pass (domain: ti.com, ip: 198.47.19.141, mailfrom: r-gunasekaran@ti.com) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35L9I9Rr031344; Wed, 21 Jun 2023 04:18:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1687339089; bh=wwB+8IwBb4o/vZqItPodHm58Sow/g4M/mykpPPYV4aU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=fD+P1nSufeWG3KGOL+sjyWGKSl0b0b96DTOgrGAeqp7cWtMT0bRU1K54ds7hmwCpZ d1nD2XZT9HmN02OhdoiolKq+L3QX+EhFzgXCC3no51IDCSTmX9zXqr6VWsBpl2DwuT Bl+rbwlMmb+MKCTrHvuL7BNVnPXyzFXQXV12Zlpk= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35L9I9PX020978 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 21 Jun 2023 04:18:09 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 21 Jun 2023 04:18:08 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 21 Jun 2023 04:18:08 -0500 Received: from uda0500640.dal.design.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35L9I2AM058227; Wed, 21 Jun 2023 04:18:07 -0500 From: Ravi Gunasekaran To: CC: , , , Subject: [master/kirkstone 2/3] meta-arago-extras: sysrepo: Add meta-sysrepo recipes Date: Wed, 21 Jun 2023 14:48:00 +0530 Message-ID: <20230621091801.14944-3-r-gunasekaran@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230621091801.14944-1-r-gunasekaran@ti.com> References: <20230621091801.14944-1-r-gunasekaran@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 21 Jun 2023 09:18:15 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14668 meta-sysrepo recipes are hosted at [1]. But the layer seems to be inactive. So add the recipes to meta-arago-extras. [1] - https://github.com/sartura/meta-sysrepo Signed-off-by: Ravi Gunasekaran --- meta-arago-extras/recipes-sysrepo/README.md | 85 +++++++++++++++++++ .../libnetconf2/libnetconf2_git.bb | 24 ++++++ .../libredblack/libredblack_git.bb | 21 +++++ .../recipes-sysrepo/libssh/libssh_0.9.5.bb | 35 ++++++++ .../recipes-sysrepo/libyang/libyang_git.bb | 23 +++++ .../netopeer2-server/netopeer2-server | 36 ++++++++ .../netopeer2-server/netopeer2-server_git.bb | 32 +++++++ .../0001-so-version.patch | 12 +++ .../sysrepo-plugins-common_git.bb | 27 ++++++ .../recipes-sysrepo/sysrepo/sysrepo/sysrepo | 52 ++++++++++++ .../recipes-sysrepo/sysrepo/sysrepo_git.bb | 35 ++++++++ 11 files changed, 382 insertions(+) create mode 100644 meta-arago-extras/recipes-sysrepo/README.md create mode 100644 meta-arago-extras/recipes-sysrepo/libnetconf2/libnetconf2_git.bb create mode 100644 meta-arago-extras/recipes-sysrepo/libredblack/libredblack_git.bb create mode 100644 meta-arago-extras/recipes-sysrepo/libssh/libssh_0.9.5.bb create mode 100644 meta-arago-extras/recipes-sysrepo/libyang/libyang_git.bb 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 create mode 100644 meta-arago-extras/recipes-sysrepo/sysrepo-plugins-common/0001-so-version.patch create mode 100644 meta-arago-extras/recipes-sysrepo/sysrepo-plugins-common/sysrepo-plugins-common_git.bb create mode 100644 meta-arago-extras/recipes-sysrepo/sysrepo/sysrepo/sysrepo create mode 100644 meta-arago-extras/recipes-sysrepo/sysrepo/sysrepo_git.bb diff --git a/meta-arago-extras/recipes-sysrepo/README.md b/meta-arago-extras/recipes-sysrepo/README.md new file mode 100644 index 00000000..9c312bf8 --- /dev/null +++ b/meta-arago-extras/recipes-sysrepo/README.md @@ -0,0 +1,85 @@ +# sysrepo/netopeer2 layer for Yocto Project + +This README file contains information on the contents of the sysrepo/netopeer2 layer for Yocto Project. + +Please see the corresponding sections below for details. + +## Dependencies + +This layer depends on: + +* URI: git://git.openembedded.org/meta-openembedded +* branch: kirkstone + +It was tested with yocto project kirkstone branch: + +* URI: git://git.yoctoproject.org/poky +* branch: kirkstone + +Build host dependencies: +https://docs.yoctoproject.org/dev-manual/start.html#preparing-the-build-host + +## Adding the layer to your build + +In order to use this layer, you need to make the build system aware of it. +First prepare yocto project and all required layers: +``` +git clone git://git.yoctoproject.org/poky -b kirkstone +cd poky +git clone git://git.openembedded.org/meta-openembedded -b kirkstone +git clone https://github.com/sartura/meta-sysrepo +source oe-init-build-env +``` +The last command initializes the build environment and your current working directory is set to the `build` directory. +Now add the layer to the build system by adding the location of the sysrepo layer to `conf/bblayers.conf`, along with any other layers needed, e.g.: +``` +BBLAYERS ?= " \ + /home/build/poky/meta \ + /home/build/poky/meta-poky \ + /home/build/poky/meta-yocto-bsp \ + /home/build/poky/meta-sysrepo \ + /home/build/poky/meta-openembedded/meta-initramfs \ + /home/build/poky/meta-openembedded/meta-multimedia \ + /home/build/poky/meta-openembedded/meta-networking \ + /home/build/poky/meta-openembedded/meta-oe \ + /home/build/poky/meta-openembedded/meta-python \ + " +``` + +Update `conf/local.conf` file to include additional software in the final image, e.g. add to the end: +``` +IMAGE_INSTALL:append = " sysrepo netopeer2-server openssh openssl " +``` +Optionally, adapt `MACHINE` variable for target system. + +Append "pam" to DISTRO_FEATURES, if needed +``` +DISTRO_FEATURES += " pam" +``` +## Build test image + +Now a test image can be built, e.g.: +``` +bitbake core-image-base +``` + +The image is located under `tmp/deploy/images/` directory. + +Default `MACHINE` target is `qemux86`, so it can be run with: +``` +runqemu qemux86-64 +``` + +## Starting sysrepo and netopeer2-server + +There are init.d scripts (as part of the meta-sysrepo layer) which are automatically stored in the image: +* /etc/init.d/sysrepo +* /etc/init.d/netopeer2-server + +It is enough to start only `/etc/init.d/netopeer2-server` script and it will make sure `sysrepo` processes are also started. +``` +/etc/init.d/netopeer2-server start +``` + +## Demo +[![asciicast](https://asciinema.org/a/360926.svg)](https://asciinema.org/a/360926) diff --git a/meta-arago-extras/recipes-sysrepo/libnetconf2/libnetconf2_git.bb b/meta-arago-extras/recipes-sysrepo/libnetconf2/libnetconf2_git.bb new file mode 100644 index 00000000..a534b9ac --- /dev/null +++ b/meta-arago-extras/recipes-sysrepo/libnetconf2/libnetconf2_git.bb @@ -0,0 +1,24 @@ +SUMMARY = "libnetconf2 is a NETCONF library in C intended for building NETCONF clients and servers" +DESCRIPTION = "The library provides functions to connect NETCONF client and server to each other via SSH and to send, receive and process NETCONF messages." +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=08a5578c9bab06fb2ae84284630b973f" + +SRC_URI = "git://github.com/CESNET/libnetconf2.git;protocol=https;branch=devel" + +PV = "2.1.34+git${SRCPV}" +SRCREV = "91cd6d75722c65de5c005d908f6d645b48cee89b" + +S = "${WORKDIR}/git" + +DEPENDS = "libssh openssl libyang libxcrypt libpam" + +FILES:${PN} += "/usr/share/yang/modules/libnetconf2/*" + +inherit cmake pkgconfig + +# Specify any options you want to pass to cmake using EXTRA_OECMAKE: +#EXTRA_OECMAKE = " -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE:String=Release -DLIBYANG_INCLUDE_DIR=/usr/include -DLIBYANG_LIBRARY=/usr/lib " +EXTRA_OECMAKE = " -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE:String=Release " + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-arago-extras/recipes-sysrepo/libredblack/libredblack_git.bb b/meta-arago-extras/recipes-sysrepo/libredblack/libredblack_git.bb new file mode 100644 index 00000000..ea51b618 --- /dev/null +++ b/meta-arago-extras/recipes-sysrepo/libredblack/libredblack_git.bb @@ -0,0 +1,21 @@ +SUMMARY = "Library for handling red-black tree searching algorithm" +DESCRIPTION = "A library to provide the RedBlack balanced tree searching and sorting algorithm." +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=de174fb5a92cdbe038c88dc4c4316f99" + +SRC_URI = "git://github.com/sysrepo/libredblack.git;protocol=https" + +PV = "1.0+git${SRCPV}" +SRCREV = "a399310d99b61eec4d3c0677573ab5dddcf9395d" + +S = "${WORKDIR}/git" + +# NOTE: if this software is not capable of being built in a separate build directory +# from the source, you should replace autotools with autotools-brokensep in the +# inherit line +inherit python3native autotools + +# Specify any options you want to pass to the configure script using EXTRA_OECONF: +EXTRA_OECONF = " --without-rbgen " + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-arago-extras/recipes-sysrepo/libssh/libssh_0.9.5.bb b/meta-arago-extras/recipes-sysrepo/libssh/libssh_0.9.5.bb new file mode 100644 index 00000000..43a6827e --- /dev/null +++ b/meta-arago-extras/recipes-sysrepo/libssh/libssh_0.9.5.bb @@ -0,0 +1,35 @@ +SUMMARY = "Multiplatform C library implementing the SSHv2 and SSHv1 protocol" +HOMEPAGE = "http://www.libssh.org" +SECTION = "libs" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=dabb4958b830e5df11d2b0ed8ea255a0" + +DEPENDS = "zlib openssl" + +SRC_URI = "git://git.libssh.org/projects/libssh.git;branch=stable-0.9" +SRCREV = "0cceefd49d4d397eb21bd36e314ac87739da51ff" + +S = "${WORKDIR}/git" + +inherit cmake + +PACKAGECONFIG ??="" +PACKAGECONFIG[gssapi] = "-DWITH_GSSAPI=1, -DWITH_GSSAPI=0, krb5, " + +ARM_INSTRUCTION_SET:armv5 = "arm" + +EXTRA_OECMAKE = " \ + -DWITH_GCRYPT=0 \ + -DWITH_PCAP=1 \ + -DWITH_SFTP=1 \ + -DWITH_ZLIB=1 \ + -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ + " + +do_configure:prepend () { + # Disable building of examples + sed -i -e '/add_subdirectory(examples)/s/^/#DONOTWANT/' ${S}/CMakeLists.txt \ + || bbfatal "Failed to disable examples" +} + +TOOLCHAIN = "gcc" diff --git a/meta-arago-extras/recipes-sysrepo/libyang/libyang_git.bb b/meta-arago-extras/recipes-sysrepo/libyang/libyang_git.bb new file mode 100644 index 00000000..c984a252 --- /dev/null +++ b/meta-arago-extras/recipes-sysrepo/libyang/libyang_git.bb @@ -0,0 +1,23 @@ +SUMMARY = "YANG data modelling language parser and toolkit" +DESCRIPTION = "libyang is YANG data modelling language parser and toolkit written (and providing API) in C. The library is used e.g. in libnetconf2, Netopeer2 or sysrepo projects." +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f3916d7d8d42a6508d0ea418cfff10ad" + +SRC_URI = "git://github.com/CESNET/libyang.git;protocol=https;branch=devel" + +PV = "2.1.77+git${SRCPV}" +SRCREV = "a804113c9bbac3e36c53221be469c1ca5af5b435" + +S = "${WORKDIR}/git" + +DEPENDS = "libpcre2" + +FILES:${PN} += "/usr/share/yang/modules/libyang/*" + +inherit cmake pkgconfig + +# Specify any options you want to pass to cmake using EXTRA_OECMAKE: +EXTRA_OECMAKE = " -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE:String=Release " + +BBCLASSEXTEND = "native nativesdk" 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..fc0ee793 --- /dev/null +++ b/meta-arago-extras/recipes-sysrepo/netopeer2-server/netopeer2-server/netopeer2-server @@ -0,0 +1,36 @@ +#!/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..c64cd2f1 --- /dev/null +++ b/meta-arago-extras/recipes-sysrepo/netopeer2-server/netopeer2-server_git.bb @@ -0,0 +1,32 @@ +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/ +} + diff --git a/meta-arago-extras/recipes-sysrepo/sysrepo-plugins-common/0001-so-version.patch b/meta-arago-extras/recipes-sysrepo/sysrepo-plugins-common/0001-so-version.patch new file mode 100644 index 00000000..547f3642 --- /dev/null +++ b/meta-arago-extras/recipes-sysrepo/sysrepo-plugins-common/0001-so-version.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fd64b80..910510d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,6 +23,7 @@ include_directories(${LIBYANG_INCLUDE_DIRS}) + include_directories(${SYSREPO_INCLUDE_DIRS}) + + add_library(${PROJECT_NAME} SHARED ${SRPC_SOURCES}) ++set_target_properties(${PROJECT_NAME} PROPERTIES VERSION 1.0.0 SOVERSION 1) + + install( + TARGETS ${PROJECT_NAME} diff --git a/meta-arago-extras/recipes-sysrepo/sysrepo-plugins-common/sysrepo-plugins-common_git.bb b/meta-arago-extras/recipes-sysrepo/sysrepo-plugins-common/sysrepo-plugins-common_git.bb new file mode 100644 index 00000000..f107b423 --- /dev/null +++ b/meta-arago-extras/recipes-sysrepo/sysrepo-plugins-common/sysrepo-plugins-common_git.bb @@ -0,0 +1,27 @@ +SUMMARY = "Set of utilities/functionalities which can be used for easier build of sysrepo plugins." +DESCRIPTION = "" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f91d5dfaae99cc1943a8eca222cafa5c" + +SRC_URI = "gitsm://github.com/telekom/sysrepo-plugins-common.git;protocol=https;branch=devel " +SRC_URI += " file://0001-so-version.patch " +FILESEXTRAPATHS:prepend := "${THISDIR}:" + +PV = "dev+git${SRCPV}" +SRCREV = "20885de0d3bb95a05610fdb3a0f83d8f7c370fad" + +S = "${WORKDIR}/git" + +DEPENDS = "libyang sysrepo" + +FILES:${PN} += "" + +inherit cmake pkgconfig + +# Specify any options you want to pass to cmake using EXTRA_OECMAKE: +EXTRA_OECMAKE = " -DCMAKE_INSTALL_PREFIX:PATH=/usr " + +do_install:append () { + true +} + diff --git a/meta-arago-extras/recipes-sysrepo/sysrepo/sysrepo/sysrepo b/meta-arago-extras/recipes-sysrepo/sysrepo/sysrepo/sysrepo new file mode 100644 index 00000000..9dff7ba5 --- /dev/null +++ b/meta-arago-extras/recipes-sysrepo/sysrepo/sysrepo/sysrepo @@ -0,0 +1,52 @@ +#!/bin/sh + +# Source function library. +. /etc/init.d/functions + +EXEC_PATH="/usr/bin" +SYSREPOPLUGIND_EXEC="sysrepo-plugind" +SERVER_OPTS=" -d -v 1" + +init_sysrepo() { + export NP2_MODULE_DIR="/usr/share/yang/modules/netopeer2" + export NP2_MODULE_PERMS="600" + export NP2_MODULE_OWNER="root" + export NP2_MODULE_GROUP="root" + if [ -x /usr/bin/sysrepoctl ]; then + sh /etc/netopeer2/scripts/setup.sh + fi + if [ -x /usr/bin/sysrepocfg ]; then + sh /etc/netopeer2/scripts/merge_hostkey.sh + sh /etc/netopeer2/scripts/merge_config.sh + fi + touch /etc/sysrepo/init +} + + +case "$1" in + start) + test -r /etc/sysrepo/init || init_sysrepo + start-stop-daemon --start --background --exec $EXEC_PATH/$SYSREPOPLUGIND_EXEC -- $SERVER_OPTS + ;; + stop) + start-stop-daemon --stop --quiet --exec $EXEC_PATH/$SYSREPOPLUGIND_EXEC + rm -rf /var/run/sysrepo-subscriptions/* + ;; + status) + status $SYSREPOPLUGIND_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/sysrepo/sysrepo_git.bb b/meta-arago-extras/recipes-sysrepo/sysrepo/sysrepo_git.bb new file mode 100644 index 00000000..56818fd9 --- /dev/null +++ b/meta-arago-extras/recipes-sysrepo/sysrepo/sysrepo_git.bb @@ -0,0 +1,35 @@ +# Recipe created by recipetool +SUMMARY = "YANG-based configuration and operational state data store for Unix/Linux applications." +DESCRIPTION = "" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ef345f161efb68c3836e6f5648b2312f" + +SRC_URI = "git://github.com/sysrepo/sysrepo.git;protocol=https;branch=devel file://sysrepo" + +PV = "2.2.71+git${SRCPV}" +SRCREV = "b828f0ab4693c613cc66efd053a146e05854d5c8" + +S = "${WORKDIR}/git" + +DEPENDS = "libyang protobuf protobuf-c protobuf-c-native libredblack libev libnetconf2" + +FILES:${PN} += "/usr/share/yang/* /usr/lib/sysrepo-plugind/*" + +inherit cmake pkgconfig python3native python3-dir + +# Specify any options you want to pass to cmake using EXTRA_OECMAKE: +EXTRA_OECMAKE = " -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE:String=Release -DBUILD_EXAMPLES:String=False -DENABLE_TESTS:String=False -DREPOSITORY_LOC:PATH=/etc/sysrepo -DCALL_TARGET_BINS_DIRECTLY=False -DGEN_LANGUAGE_BINDINGS:String=False " + +BBCLASSEXTEND = "native nativesdk" + +do_install:append () { + install -d ${D}/etc/sysrepo/data/notifications + install -d ${D}/etc/sysrepo/yang + install -o root -g root ${S}/modules/ietf-netconf-notifications.yang ${D}/etc/sysrepo/yang/ietf-netconf-notifications@2012-02-06.yang + install -o root -g root ${S}/modules/ietf-netconf-with-defaults.yang ${D}/etc/sysrepo/yang/ietf-netconf-with-defaults@2011-06-01.yang + install -o root -g root ${S}/modules/ietf-netconf.yang ${D}/etc/sysrepo/yang/ietf-netconf@2011-06-01.yang + install -d ${D}/etc/init.d + install -m 0775 ${WORKDIR}/sysrepo ${D}/etc/init.d/ + install -d ${D}/usr/lib/sysrepo/plugins +} + From patchwork Wed Jun 21 09:18:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ravi Gunasekaran X-Patchwork-Id: 26093 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B266EB64D8 for ; Wed, 21 Jun 2023 09:18:16 +0000 (UTC) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by mx.groups.io with SMTP id smtpd.web11.6778.1687339093264273102 for ; Wed, 21 Jun 2023 02:18:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=R4N84C3p; spf=pass (domain: ti.com, ip: 198.47.19.141, mailfrom: r-gunasekaran@ti.com) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35L9IBmx031355; Wed, 21 Jun 2023 04:18:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1687339091; bh=b26dEyUeZnnesgOzOz4iRhdd7NDj8HCHAdl1sDF/eUE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=R4N84C3pFpgd3VW7gThwVJEj4cUHoYuyKjP80VSpCUf1LzPI3nhXfjqdIwkzVKId0 sPiwmnjxhIlJzeneAzhOCM4G58OJ3QLaNmPtR6QUv7YzAZO5Vmfqg4V+zRDMAbvRiw vYodeUYCDNm5HuGegblF3g8zkDm+nqwXXnzhKTSw= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35L9IB6L081737 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 21 Jun 2023 04:18:11 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 21 Jun 2023 04:18:11 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 21 Jun 2023 04:18:11 -0500 Received: from uda0500640.dal.design.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35L9I2AN058227; Wed, 21 Jun 2023 04:18:09 -0500 From: Ravi Gunasekaran To: CC: , , , Subject: [master/kirkstone 3/3] tisdk-default-image: Add packages to support NETCONF/YANG Date: Wed, 21 Jun 2023 14:48:01 +0530 Message-ID: <20230621091801.14944-4-r-gunasekaran@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230621091801.14944-1-r-gunasekaran@ti.com> References: <20230621091801.14944-1-r-gunasekaran@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 21 Jun 2023 09:18:16 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14669 Add sysrepo, netopeer2-server, nw-configurator packages Signed-off-by: Ravi Gunasekaran --- .../recipes-core/images/tisdk-default-image.bb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta-arago-distro/recipes-core/images/tisdk-default-image.bb b/meta-arago-distro/recipes-core/images/tisdk-default-image.bb index bb825e09..8239e0ce 100644 --- a/meta-arago-distro/recipes-core/images/tisdk-default-image.bb +++ b/meta-arago-distro/recipes-core/images/tisdk-default-image.bb @@ -5,7 +5,12 @@ DESCRIPTION = "Complete Arago TI SDK filesystem image containing complete\ require arago-image.inc -ARAGO_DEFAULT_IMAGE_EXTRA_INSTALL ?= "" +ARAGO_DEFAULT_IMAGE_EXTRA_INSTALL ?= "\ + sysrepo \ + netopeer2-server \ + nw-configurator \ + tsn-yang-models \ +" IMAGE_INSTALL += "\ packagegroup-arago-base \