sysrepo packageslilik-openwrt-22.03
@ -0,0 +1,76 @@ | |||||
# | |||||
# Copyright (C) 2017 OpenWrt.org | |||||
# | |||||
# This is free software, licensed under the GNU General Public License v2. | |||||
# See /LICENSE for more information. | |||||
# | |||||
include $(TOPDIR)/rules.mk | |||||
PKG_NAME:=libnetconf2 | |||||
PKG_LICENSE:=BSD-3-Clause | |||||
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr> | |||||
PKG_VERSION:=0.8.56 | |||||
PKG_SOURCE_PROTO:=git | |||||
PKG_SOURCE_VERSION:=4d13eca938085298edbad6a731d77dfd55c8d514 | |||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2 | |||||
PKG_SOURCE_URL:=https://github.com/cesnet/libnetconf2/ | |||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) | |||||
PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) | |||||
PKG_BUILD_DIR:=$(PKG_BUILD_ROOT) | |||||
PKG_BUILD_PARALLEL:=1 | |||||
PKG_INSTALL:=1 | |||||
CMAKE_INSTALL:=1 | |||||
include $(INCLUDE_DIR)/package.mk | |||||
include $(INCLUDE_DIR)/cmake.mk | |||||
define Package/libnetconf2 | |||||
SECTION:=libs | |||||
CATEGORY:=Libraries | |||||
TITLE:=NETCONF library | |||||
URL:=$(PKG_SOURCE_URL) | |||||
DEPENDS:= +libyang +libssh +libopenssl | |||||
endef | |||||
define Package/libnetconf2/description | |||||
libnetconf2 is the NETCONF library in C intended for building NETCONF clients and servers. | |||||
libnetconf2 provides basic functions to connect NETCONF client and server to each other via | |||||
SSH, to send and receive NETCONF messages. NETCONF datastore implementation is not included. | |||||
endef | |||||
CMAKE_OPTIONS += \ | |||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \ | |||||
-DCMAKE_BUILD_TYPE:STRING=Release | |||||
define Build/InstallDev | |||||
$(INSTALL_DIR) $(1)/usr/include/libnetconf2 | |||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/libnetconf2/*.h $(1)/usr/include/libnetconf2/ | |||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ | |||||
$(INSTALL_DIR) $(1)/usr/lib | |||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnetconf2.so* $(1)/usr/lib/ | |||||
$(INSTALL_DIR) $(1)/usr/include/libnetconf2 | |||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/libnetconf2/* $(1)/usr/include/libnetconf2/ | |||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig | |||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnetconf2.pc $(1)/usr/lib/pkgconfig/ | |||||
endef | |||||
define Package/libnetconf2/install | |||||
$(INSTALL_DIR) $(1)/usr/lib | |||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnetconf2.so* $(1)/usr/lib/ | |||||
$(INSTALL_DIR) $(1)/usr/share/libnetconf2 | |||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libnetconf2/*.yin $(1)/usr/share/libnetconf2/ | |||||
endef | |||||
$(eval $(call BuildPackage,libnetconf2)) |
@ -0,0 +1,85 @@ | |||||
# | |||||
# Copyright (C) 2017 OpenWrt.org | |||||
# | |||||
# This is free software, licensed under the GNU General Public License v2. | |||||
# See /LICENSE for more information. | |||||
# | |||||
include $(TOPDIR)/rules.mk | |||||
PKG_LICENSE:=LGPL-2.1+ BSD-2-Clause | |||||
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr> | |||||
PKG_NAME:=libssh | |||||
PKG_VERSION:=0.7.5 | |||||
PKG_SOURCE_PROTO:=git | |||||
PKG_SOURCE_VERSION:=0588cbf9d43e7819e453c8b35c1b5e515d815473 | |||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2 | |||||
PKG_SOURCE_URL:=git://git.libssh.org/projects/libssh.git | |||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) | |||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) | |||||
CMAKE_INSTALL:=1 | |||||
PKG_BUILD_PARALLEL:=1 | |||||
PKG_INSTALL:=1 | |||||
PKG_USE_MIPS16:=0 | |||||
include $(INCLUDE_DIR)/package.mk | |||||
include $(INCLUDE_DIR)/cmake.mk | |||||
define Package/libssh | |||||
SECTION:=lib | |||||
CATEGORY:=Libraries | |||||
URL:=$(PKG_SOURCE_URL) | |||||
TITLE:=SSH library | |||||
DEPENDS:=+libpthread +librt +zlib +libopenssl | |||||
endef | |||||
define Package/libssh/description | |||||
libssh is a mulitplatform C library implementing the SSHv2 and SSHv1 protocol | |||||
for client and server implementations. | |||||
endef | |||||
CMAKE_OPTIONS = \ | |||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \ | |||||
-DCMAKE_BUILD_TYPE:STRING=Release \ | |||||
-DHAVE_STRTOULL=1 \ | |||||
-DHAVE_GETADDRINFO=1 \ | |||||
-DHAVE_TERMIOS_H=1 \ | |||||
-DWITH_EXAMPLES:BOOL=OFF \ | |||||
-DWITH_GCRYPT:BOOL=OFF \ | |||||
-DWITH_GSSAPI:BOOL=OFF \ | |||||
-DWITH_LIBZ:BOOL=ON \ | |||||
-DWITH_NACL:BOOL=OFF \ | |||||
-DWITH_PCAP:BOOL=OFF \ | |||||
-DWITH_SERVER:BOOL=ON \ | |||||
-DWITH_SFTP:BOOL=ON \ | |||||
-DWITH_SSH1:BOOL=OFF \ | |||||
-DWITH_TESTING:BOOL=OFF \ | |||||
ifeq ($(CONFIG_BIG_ENDIAN),y) | |||||
CMAKE_OPTIONS += -DWITH_BIG_ENDIAN=ON | |||||
else | |||||
CMAKE_OPTIONS += -DWITH_BIG_ENDIAN=OFF | |||||
endif | |||||
define Build/InstallDev | |||||
$(INSTALL_DIR) $(1)/usr/include/libssh/ | |||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libssh/* $(1)/usr/include/libssh/ | |||||
$(INSTALL_DIR) $(1)/usr/lib | |||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libssh* $(1)/usr/lib/ | |||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig | |||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ | |||||
endef | |||||
define Package/libssh/install | |||||
$(INSTALL_DIR) $(1)/usr/lib | |||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libssh* $(1)/usr/lib/ | |||||
endef | |||||
$(eval $(call BuildPackage,libssh)) |
@ -0,0 +1,35 @@ | |||||
--- a/CMakeLists.txt | |||||
+++ b/CMakeLists.txt | |||||
@@ -35,10 +35,6 @@ include(DefineInstallationPaths) | |||||
include(DefineOptions.cmake) | |||||
include(CPackConfig.cmake) | |||||
-# disallow in-source build | |||||
-include(MacroEnsureOutOfSourceBuild) | |||||
-macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there.") | |||||
- | |||||
# search for libraries | |||||
if (WITH_ZLIB) | |||||
find_package(ZLIB REQUIRED) | |||||
--- a/ConfigureChecks.cmake | |||||
+++ b/ConfigureChecks.cmake | |||||
@@ -5,7 +5,6 @@ include(CheckFunctionExists) | |||||
include(CheckLibraryExists) | |||||
include(CheckTypeSize) | |||||
include(CheckCXXSourceCompiles) | |||||
-include(TestBigEndian) | |||||
set(PACKAGE ${APPLICATION_NAME}) | |||||
set(VERSION ${APPLICATION_VERSION}) | |||||
@@ -270,6 +269,8 @@ if (WITH_GSSAPI AND NOT GSSAPI_FOUND) | |||||
endif (WITH_GSSAPI AND NOT GSSAPI_FOUND) | |||||
# ENDIAN | |||||
-if (NOT WIN32) | |||||
- test_big_endian(WORDS_BIGENDIAN) | |||||
-endif (NOT WIN32) | |||||
+if (WITH_BIG_ENDIAN) | |||||
+ set(WORDS_BIGENDIAN 1) | |||||
+else (WITH_BIG_ENDIAN) | |||||
+ set(WORDS_BIGENDIAN 0) | |||||
+endif (WITH_BIG_ENDIAN) |
@ -0,0 +1,22 @@ | |||||
--- a/cmake/Modules/DefineCompilerFlags.cmake | |||||
+++ b/cmake/Modules/DefineCompilerFlags.cmake | |||||
@@ -1,7 +1,6 @@ | |||||
# define system dependent compiler flags | |||||
include(CheckCCompilerFlag) | |||||
-include(CheckCCompilerFlagSSP) | |||||
if (UNIX AND NOT WIN32) | |||||
# | |||||
@@ -21,11 +20,6 @@ if (UNIX AND NOT WIN32) | |||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") | |||||
endif (WITH_FPIC) | |||||
- check_c_compiler_flag_ssp("-fstack-protector" WITH_STACK_PROTECTOR) | |||||
- if (WITH_STACK_PROTECTOR) | |||||
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector") | |||||
- endif (WITH_STACK_PROTECTOR) | |||||
- | |||||
if (CMAKE_BUILD_TYPE) | |||||
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER) | |||||
if (CMAKE_BUILD_TYPE_LOWER MATCHES (release|relwithdebinfo|minsizerel)) |
@ -0,0 +1,81 @@ | |||||
# | |||||
# Copyright (C) 2017 OpenWrt.org | |||||
# | |||||
# This is free software, licensed under the GNU General Public License v2. | |||||
# See /LICENSE for more information. | |||||
# | |||||
include $(TOPDIR)/rules.mk | |||||
PKG_NAME:=libyang | |||||
PKG_VERSION:=0.12.174 | |||||
PKG_RELEASE=$(PKG_SOURCE_VERSION) | |||||
PKG_LICENSE:=GPL-2.0+ | |||||
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr> | |||||
PKG_SOURCE_PROTO:=git | |||||
PKG_SOURCE_URL:=https://github.com/CESNET/libyang.git | |||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) | |||||
PKG_SOURCE_VERSION:=7e811613b335afc8e1b2c0ee77e7b3f371bc9175 | |||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz | |||||
PKG_BUILD_PARALLEL:=1 | |||||
PKG_INSTALL:=1 | |||||
include $(INCLUDE_DIR)/package.mk | |||||
include $(INCLUDE_DIR)/cmake.mk | |||||
define Package/libyang | |||||
SECTION:=libs | |||||
CATEGORY:=Libraries | |||||
TITLE:=YANG data modeling language library | |||||
URL:=$(PKG_SOURCE_URL) | |||||
DEPENDS:=+libpcre | |||||
endef | |||||
define Package/yanglint | |||||
SECTION:=utils | |||||
CATEGORY:=Utilities | |||||
TITLE:=YANG data modeling language utility | |||||
URL:=$(PKG_SOURCE_URL) | |||||
DEPENDS:=+libyang | |||||
endef | |||||
define Package/libyang/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. | |||||
endef | |||||
TARGET_LDFLAGS += -lm | |||||
CMAKE_OPTIONS += \ | |||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \ | |||||
-DCMAKE_BUILD_TYPE:STRING=Release | |||||
define Build/InstallDev | |||||
$(INSTALL_DIR) $(1)/usr/lib | |||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyang.so* $(1)/usr/lib/ | |||||
$(INSTALL_DIR) $(1)/usr/include/libyang | |||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/libyang/* $(1)/usr/include/libyang/ | |||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig | |||||
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libyang.pc $(1)/usr/lib/pkgconfig/ | |||||
endef | |||||
define Package/libyang/install | |||||
$(INSTALL_DIR) $(1)/usr/lib | |||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyang.so* $(1)/usr/lib/ | |||||
$(INSTALL_DIR) $(1)/usr/lib/libyang | |||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyang/* $(1)/usr/lib/libyang/ | |||||
endef | |||||
define Package/yanglint/install | |||||
$(INSTALL_DIR) $(1)/usr/bin | |||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/yanglint $(1)/usr/bin/ | |||||
endef | |||||
$(eval $(call BuildPackage,libyang)) | |||||
$(eval $(call BuildPackage,yanglint)) |
@ -0,0 +1,143 @@ | |||||
# | |||||
# Copyright (C) 2017 OpenWrt.org | |||||
# | |||||
# This is free software, licensed under the GNU General Public License v2. | |||||
# See /LICENSE for more information. | |||||
# | |||||
# Warning by default OpenWrt does not have a root password which is necessery for NETCONF server. | |||||
include $(TOPDIR)/rules.mk | |||||
PKG_NAME:=netopeer2 | |||||
PKG_LICENSE:=BSD-3-Clause | |||||
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr> | |||||
PKG_VERSION:=0.3.65 | |||||
PKG_SOURCE_PROTO:=git | |||||
PKG_SOURCE_VERSION:=c204b59f9c2bb7e63eb907f33c44adbf208295ee | |||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2 | |||||
PKG_SOURCE_URL:=https://github.com/CESNET/Netopeer2.git | |||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) | |||||
PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) | |||||
PKG_BUILD_DIR:=$(PKG_BUILD_ROOT) | |||||
PKG_BUILD_PARALLEL:=1 | |||||
PKG_INSTALL:=1 | |||||
CMAKE_INSTALL:=1 | |||||
include $(INCLUDE_DIR)/package.mk | |||||
include $(INCLUDE_DIR)/cmake.mk | |||||
define Package/netopeer2-server | |||||
SECTION:=util | |||||
CATEGORY:=Utilities | |||||
TITLE:=NETCONF server | |||||
URL:=$(PKG_SOURCE_URL) | |||||
DEPENDS:=+libpthread +libyang +libnetconf2 +netopeer2-keystored +libsysrepo +sysrepocfg +sysrepoctl | |||||
endef | |||||
define Package/netopeer2-cli | |||||
SECTION:=util | |||||
CATEGORY:=Utilities | |||||
TITLE:=Netopeer2 cli tool | |||||
URL:=$(PKG_SOURCE_URL) | |||||
DEPENDS:=+libpthread +libyang +libnetconf2 +libopenssl | |||||
endef | |||||
define Package/netopeer2-keystored | |||||
SECTION:=util | |||||
CATEGORY:=Utilities | |||||
TITLE:=Netopeer2 key store management | |||||
URL:=$(PKG_SOURCE_URL) | |||||
DEPENDS:=+libopenssl +libsysrepo +sysrepo-plugind +sysrepocfg +sysrepoctl | |||||
endef | |||||
define Package/netopeer2/description | |||||
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. | |||||
endef | |||||
CMAKE_OPTIONS += \ | |||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \ | |||||
-DCMAKE_BUILD_TYPE:STRING=Release \ | |||||
-DKEYSTORED_KEYS_DIR:STRING=/etc/keystored/keys | |||||
define Build/Configure | |||||
$(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/server) | |||||
$(call Build/Configure/Default) | |||||
$(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/cli) | |||||
$(call Build/Configure/Default) | |||||
$(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/keystored) | |||||
$(call Build/Configure/Default) | |||||
endef | |||||
define Build/Compile | |||||
$(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/server) | |||||
$(call Build/Compile/Default) | |||||
$(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/cli) | |||||
$(call Build/Compile/Default) | |||||
$(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/keystored) | |||||
$(call Build/Compile/Default) | |||||
endef | |||||
define Package/netopeer2-server/install | |||||
$(INSTALL_DIR) $(1)/bin | |||||
$(INSTALL_BIN) $(PKG_BUILD_ROOT)/server/netopeer2-server $(1)/bin/ | |||||
$(INSTALL_DIR) $(1)/etc/sysrepo/yang | |||||
$(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-ssh-server.yang $(1)/etc/sysrepo/yang/ | |||||
$(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-tls-server.yang $(1)/etc/sysrepo/yang/ | |||||
$(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/iana-crypt-hash.yang $(1)/etc/sysrepo/yang/ | |||||
$(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-x509-cert-to-name.yang $(1)/etc/sysrepo/yang/ | |||||
$(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-netconf-server.yang $(1)/etc/sysrepo/yang/ | |||||
$(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-netconf-server.yang $(1)/etc/sysrepo/yang/ | |||||
$(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-system.yang $(1)/etc/sysrepo/yang/ | |||||
$(INSTALL_DIR) $(1)/etc/uci-defaults | |||||
$(INSTALL_BIN) ./files/netopeer2-server.default $(1)/etc/uci-defaults/99_netopeer2-server | |||||
$(INSTALL_DIR) $(1)/etc/init.d/ | |||||
$(INSTALL_BIN) ./files/netopeer2-server.init $(1)/etc/init.d/netopeer2-server | |||||
$(INSTALL_DIR) $(1)/usr/share/netopeer2-server | |||||
$(INSTALL_DATA) $(PKG_BUILD_ROOT)/server/stock_config.xml $(1)/usr/share/netopeer2-server | |||||
endef | |||||
define Package/netopeer2-cli/install | |||||
$(INSTALL_DIR) $(1)/bin | |||||
$(INSTALL_BIN) $(PKG_BUILD_ROOT)/cli/netopeer2-cli $(1)/bin/ | |||||
endef | |||||
define Package/netopeer2-keystored/install | |||||
$(INSTALL_DIR) $(1)/usr/lib/sysrepo/plugins/ | |||||
$(INSTALL_BIN) $(PKG_BUILD_ROOT)/keystored/libkeystored.so $(1)/usr/lib/sysrepo/plugins/ | |||||
$(INSTALL_DIR) $(1)/etc/sysrepo/yang | |||||
$(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-keystore.yang $(1)/etc/sysrepo/yang | |||||
$(INSTALL_DIR) $(1)/etc/uci-defaults | |||||
$(INSTALL_BIN) ./files/netopeer2-keystored.default $(1)/etc/uci-defaults/97_netopeer2-keystored | |||||
$(INSTALL_DIR) $(1)/usr/share/netopeer2-keystored | |||||
$(INSTALL_DATA) $(PKG_BUILD_ROOT)/keystored/stock_key_config.xml $(1)/usr/share/netopeer2-keystored | |||||
$(INSTALL_DIR) $(1)/etc/keystored/keys | |||||
#$(INSTALL_DATA) ./files/ssh_host_rsa_key.pem $(1)/etc/keystored/keys | |||||
#$(INSTALL_DATA) ./files/ssh_host_rsa_key.pub.pem $(1)/etc/keystored/keys | |||||
#ssh key name is specified in stock_key_config.xml file, you will need to provide the ssh keys yourself. | |||||
endef | |||||
$(eval $(call BuildPackage,netopeer2-server)) | |||||
$(eval $(call BuildPackage,netopeer2-cli)) | |||||
$(eval $(call BuildPackage,netopeer2-keystored)) |
@ -0,0 +1,11 @@ | |||||
#!/bin/sh | |||||
# Warning, problems can occur if the device restarts in the middle of this uci-default script | |||||
if [ -x /bin/sysrepoctl ]; then | |||||
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore.yang -o root:root -p 600 | |||||
sysrepocfg -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore | |||||
rm /usr/share/netopeer2-keystored/stock_key_config.xml | |||||
fi | |||||
exit 0 |
@ -0,0 +1,24 @@ | |||||
#!/bin/sh | |||||
# Warning, problems can occur if the device restarts in the middle of this uci-default script | |||||
if [ -x /bin/sysrepoctl ]; then | |||||
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-ssh-server.yang -p 600 | |||||
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-tls-server.yang -p 600 | |||||
sysrepoctl --install --yang=/etc/sysrepo/yang/iana-crypt-hash.yang -p 600 | |||||
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-x509-cert-to-name.yang -p 600 | |||||
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-server.yang -o root:root -p 600 | |||||
sysrepoctl -m ietf-netconf-server -e listen | |||||
sysrepoctl -m ietf-netconf-server -e ssh-listen | |||||
sysrepoctl -m ietf-netconf-server -e tls-listen | |||||
sysrepoctl -m ietf-netconf-server -e call-home | |||||
sysrepoctl -m ietf-netconf-server -e ssh-call-home | |||||
sysrepoctl -m ietf-netconf-server -e tls-call-home | |||||
sysrepocfg -d startup -i /usr/share/netopeer2-server/stock_config.xml ietf-netconf-server | |||||
rm /usr/share/netopeer2-server/stock_config.xml | |||||
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-system.yang -o root:root -p 600 | |||||
sysrepoctl -m ietf-system -e authentication | |||||
sysrepoctl -m ietf-system -e local-users | |||||
fi | |||||
exit 0 |
@ -0,0 +1,15 @@ | |||||
#!/bin/sh /etc/rc.common | |||||
START=90 | |||||
STOP=10 | |||||
USE_PROCD=1 | |||||
PROG=/bin/netopeer2-server | |||||
start_service() { | |||||
procd_open_instance | |||||
procd_set_param command $PROG | |||||
procd_set_param respawn | |||||
procd_close_instance | |||||
} | |||||
@ -0,0 +1,40 @@ | |||||
Index: netopeer2-c204b59f9c2bb7e63eb907f33c44adbf208295ee/keystored/CMakeLists.txt | |||||
=================================================================== | |||||
--- netopeer2-c204b59f9c2bb7e63eb907f33c44adbf208295ee.orig/keystored/CMakeLists.txt | |||||
+++ netopeer2-c204b59f9c2bb7e63eb907f33c44adbf208295ee/keystored/CMakeLists.txt | |||||
@@ -105,6 +105,7 @@ endif() | |||||
install(DIRECTORY DESTINATION ${KEYSTORED_KEYS_DIR} | |||||
DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE) | |||||
+if(FALSE) | |||||
# install all the required modules and enable features | |||||
install(CODE " | |||||
execute_process(COMMAND ${SYSREPOCTL_EXECUTABLE} -l RESULT_VARIABLE RET OUTPUT_VARIABLE INSTALLED_MODULES ERROR_VARIABLE OUT) | |||||
@@ -154,6 +155,7 @@ install(CODE " | |||||
message(FATAL_ERROR \" Command sysrepocfg import failed:\\n \${OUT}\") | |||||
endif() | |||||
endif()") | |||||
+endif() | |||||
# plugins should be installed into sysrepo plugins dir | |||||
install(TARGETS keystored DESTINATION ${SR_PLUGINS_DIR}) | |||||
Index: netopeer2-c204b59f9c2bb7e63eb907f33c44adbf208295ee/server/CMakeLists.txt | |||||
=================================================================== | |||||
--- netopeer2-c204b59f9c2bb7e63eb907f33c44adbf208295ee.orig/server/CMakeLists.txt | |||||
+++ netopeer2-c204b59f9c2bb7e63eb907f33c44adbf208295ee/server/CMakeLists.txt | |||||
@@ -147,6 +147,7 @@ include_directories(${SYSREPO_INCLUDE_DI | |||||
# install binary | |||||
install(TARGETS netopeer2-server DESTINATION ${CMAKE_INSTALL_BINDIR}) | |||||
+if(FALSE) | |||||
# only for configuration | |||||
if (ENABLE_CONFIGURATION) | |||||
# find sysrepoctl | |||||
@@ -239,6 +240,7 @@ if (ENABLE_CONFIGURATION) | |||||
endif()") | |||||
endif() | |||||
+endif() | |||||
# clean cmake cache | |||||
add_custom_target(cleancache |
@ -0,0 +1,139 @@ | |||||
# | |||||
# Copyright (C) 2017 OpenWrt.org | |||||
# | |||||
# This is free software, licensed under the GNU General Public License v2. | |||||
# See /LICENSE for more information. | |||||
# | |||||
include $(TOPDIR)/rules.mk | |||||
PKG_LICENSE:=ASL-2.0 | |||||
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr> | |||||
PKG_NAME:=sysrepo | |||||
PKG_VERSION:=0.6.0 | |||||
PKG_SOURCE_PROTO:=git | |||||
PKG_SOURCE_VERSION:=e4a5705a4c5293ba121048c71899b98243d99edf | |||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2 | |||||
PKG_SOURCE_URL:=https://github.com/sysrepo/sysrepo.git | |||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) | |||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) | |||||
CMAKE_INSTALL:=1 | |||||
PKG_BUILD_PARALLEL:=1 | |||||
PKG_INSTALL:=1 | |||||
include $(INCLUDE_DIR)/package.mk | |||||
include $(INCLUDE_DIR)/cmake.mk | |||||
define Package/libsysrepo | |||||
SECTION:=util | |||||
CATEGORY:=Utilities | |||||
URL:=$(PKG_SOURCE_URL) | |||||
TITLE:=YANG-based data store library | |||||
DEPENDS:=+libyang +libprotobuf-c +libev +libavl | |||||
endef | |||||
define Package/sysrepod | |||||
SECTION:=util | |||||
CATEGORY:=Utilities | |||||
URL:=$(PKG_SOURCE_URL) | |||||
TITLE:=YANG-based data store daemon | |||||
DEPENDS:=+libsysrepo | |||||
endef | |||||
define Package/sysrepoctl | |||||
SECTION:=util | |||||
CATEGORY:=Utilities | |||||
URL:=$(PKG_SOURCE_URL) | |||||
TITLE:=sysrepo cli tool | |||||
DEPENDS:=+libsysrepo | |||||
endef | |||||
define Package/sysrepocfg | |||||
SECTION:=util | |||||
CATEGORY:=Utilities | |||||
URL:=$(PKG_SOURCE_URL) | |||||
TITLE:=sysrepo configuration tool | |||||
DEPENDS:=+libsysrepo | |||||
endef | |||||
define Package/sysrepo-plugind | |||||
SECTION:=util | |||||
CATEGORY:=Utilities | |||||
URL:=$(PKG_SOURCE_URL) | |||||
TITLE:=sysrepo plugin daemon | |||||
DEPENDS:=+libsysrepo | |||||
endef | |||||
define Package/sysrepo/description | |||||
Sysrepo is an YANG-based configuration and operational state data store for Unix/Linux applications. | |||||
endef | |||||
CMAKE_OPTIONS += \ | |||||
-DCMAKE_BUILD_TYPE:STRING=Release \ | |||||
-DENABLE_TESTS:BOOL=FALSE \ | |||||
-DBUILD_EXAMPLES:BOOL=FALSE \ | |||||
-DCMAKE_DISABLE_FIND_PACKAGE_SWIG=TRUE \ | |||||
-DGEN_LANGUAGE_BINDINGS:BOOL=FALSE \ | |||||
-DREPOSITORY_LOC:PATH=/etc/sysrepo \ | |||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \ | |||||
-DENABLE_NACM:BOOL=FALSE | |||||
define Package/libsysrepo/install | |||||
$(INSTALL_DIR) $(1)/usr/lib | |||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/libsysrepo.so* $(1)/usr/lib/ | |||||
$(INSTALL_DIR) $(1)/etc/sysrepo/yang/internal | |||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/yang/sysrepo-module-dependencies.yang $(1)/etc/sysrepo/yang/internal | |||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/yang/sysrepo-notification-store.yang $(1)/etc/sysrepo/yang/internal | |||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/yang/sysrepo-persistent-data.yang $(1)/etc/sysrepo/yang/internal | |||||
$(INSTALL_DIR) $(1)/etc/sysrepo/yang | |||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/ietf-netconf-acm@2012-02-22.yang $(1)/etc/sysrepo/yang/ | |||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/ietf-netconf-notifications.yang $(1)/etc/sysrepo/yang/ | |||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/nc-notifications.yang $(1)/etc/sysrepo/yang/ | |||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/notifications.yang $(1)/etc/sysrepo/yang/ | |||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/ietf-netconf@2011-06-01.yang $(1)/etc/sysrepo/yang/ | |||||
$(INSTALL_DIR) $(1)/etc/sysrepo/data/internal | |||||
$(INSTALL_DIR) $(1)/etc/sysrepo/data/notifications | |||||
$(INSTALL_DIR) $(1)/etc/uci-defaults | |||||
$(INSTALL_BIN) ./files/libsysrepo.default $(1)/etc/uci-defaults/95_libsysrepo | |||||
endef | |||||
define Package/sysrepod/install | |||||
$(INSTALL_DIR) $(1)/bin | |||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sysrepod $(1)/bin/ | |||||
$(INSTALL_DIR) $(1)/etc/init.d/ | |||||
$(INSTALL_BIN) ./files/sysrepod.init $(1)/etc/init.d/sysrepod | |||||
endef | |||||
define Package/sysrepoctl/install | |||||
$(INSTALL_DIR) $(1)/bin | |||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sysrepoctl $(1)/bin/ | |||||
endef | |||||
define Package/sysrepocfg/install | |||||
$(INSTALL_DIR) $(1)/bin | |||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sysrepocfg $(1)/bin/ | |||||
endef | |||||
define Package/sysrepo-plugind/install | |||||
$(INSTALL_DIR) $(1)/bin | |||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sysrepo-plugind $(1)/bin/ | |||||
$(INSTALL_DIR) $(1)/etc/init.d/ | |||||
$(INSTALL_BIN) ./files/sysrepo-plugind.init $(1)/etc/init.d/sysrepo-plugind | |||||
endef | |||||
$(eval $(call BuildPackage,libsysrepo)) | |||||
$(eval $(call BuildPackage,sysrepod)) | |||||
$(eval $(call BuildPackage,sysrepoctl)) | |||||
$(eval $(call BuildPackage,sysrepocfg)) | |||||
$(eval $(call BuildPackage,sysrepo-plugind)) |
@ -0,0 +1,13 @@ | |||||
#!/bin/sh | |||||
# Warning, problems can occur if the device restarts in the middle of this uci-default script | |||||
if [ -x /bin/sysrepoctl ]; then | |||||
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-acm@2012-02-22.yang -p 644 | |||||
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-notifications.yang -p 600 | |||||
sysrepoctl --install --yang=/etc/sysrepo/yang/nc-notifications.yang -p 666 | |||||
sysrepoctl --install --yang=/etc/sysrepo/yang/notifications.yang -p 666 | |||||
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf@2011-06-01.yang -p 600 | |||||
fi | |||||
exit 0 |
@ -0,0 +1,19 @@ | |||||
#!/bin/sh /etc/rc.common | |||||
START=90 | |||||
STOP=10 | |||||
USE_PROCD=1 | |||||
PROG=/bin/sysrepo-plugind | |||||
start_service() { | |||||
procd_open_instance | |||||
procd_set_param command $PROG | |||||
procd_set_param respawn | |||||
procd_close_instance | |||||
} | |||||
stop_service() | |||||
{ | |||||
service_stop ${PROG} | |||||
} |
@ -0,0 +1,19 @@ | |||||
#!/bin/sh /etc/rc.common | |||||
START=70 | |||||
STOP=10 | |||||
USE_PROCD=1 | |||||
PROG=/bin/sysrepod | |||||
start_service() { | |||||
procd_open_instance | |||||
procd_set_param command $PROG | |||||
procd_set_param respawn | |||||
procd_close_instance | |||||
} | |||||
stop_service() | |||||
{ | |||||
service_stop ${PROG} | |||||
} |
@ -0,0 +1,26 @@ | |||||
Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/CMakeLists.txt | |||||
=================================================================== | |||||
--- sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf.orig/CMakeLists.txt | |||||
+++ sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/CMakeLists.txt | |||||
@@ -280,7 +280,7 @@ install (FILES ${INTERNAL_YANGS} DESTINA | |||||
# install NACM YANG module | |||||
if(ENABLE_NACM) | |||||
- INSTALL_YANG("ietf-netconf-acm" "@2012-02-22" "644") | |||||
+ # INSTALL_YANG("ietf-netconf-acm" "@2012-02-22" "644") | |||||
endif(ENABLE_NACM) | |||||
find_package(PkgConfig QUIET) | |||||
@@ -304,9 +304,9 @@ if(WITH_SYSTEMD) | |||||
FILES_MATCHING PATTERN "*.service") | |||||
endif() | |||||
-INSTALL_YANG("ietf-netconf-notifications" "" "666") | |||||
-INSTALL_YANG("nc-notifications" "" "666") | |||||
-INSTALL_YANG("notifications" "" "666") | |||||
+# INSTALL_YANG("ietf-netconf-notifications" "" "666") | |||||
+# INSTALL_YANG("nc-notifications" "" "666") | |||||
+# INSTALL_YANG("notifications" "" "666") | |||||
if(GEN_LANGUAGE_BINDINGS) | |||||
add_subdirectory(swig) |
@ -0,0 +1,12 @@ | |||||
Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/inc/sysrepo.h | |||||
=================================================================== | |||||
--- sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf.orig/inc/sysrepo.h | |||||
+++ sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/inc/sysrepo.h | |||||
@@ -51,6 +51,7 @@ | |||||
* @ref xp_page "XPath Addressing" is used for node identification in data-related calls. | |||||
*/ | |||||
+#include <time.h> | |||||
#include <stdbool.h> | |||||
#include <stdint.h> | |||||
#include <stdlib.h> |