aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2018-10-12 16:36:05 +0300
committerGitHub <noreply@github.com>2018-10-12 16:36:05 +0300
commit0a9ed54ac34b948a3b54b54bb063dc5fac60b724 (patch)
tree97d0b3b722404525760a80f7475bff43f290b134 /net
parent7466a7345b42c0a8306f512d1de8aaedf25ceed6 (diff)
parentd5b3a171b86bb807320cadd4e67730f91359c562 (diff)
Merge pull request #7175 from sartura/sysrepo-release-0.7.5
Sysrepo release 0.7.5
Diffstat (limited to 'net')
-rw-r--r--net/Netopeer2/Config_keystored.in (renamed from net/netopeer2/Config_keystored.in)0
-rw-r--r--net/Netopeer2/Makefile (renamed from net/netopeer2/Makefile)56
-rw-r--r--net/Netopeer2/files/netopeer2-keystored-keygen.default (renamed from net/netopeer2/files/netopeer2-keystored-keygen.default)10
-rw-r--r--net/Netopeer2/files/netopeer2-keystored.default (renamed from net/netopeer2/files/netopeer2-keystored.default)2
-rw-r--r--net/Netopeer2/files/netopeer2-server.default (renamed from net/netopeer2/files/netopeer2-server.default)12
-rw-r--r--net/Netopeer2/files/netopeer2-server.init21
-rw-r--r--net/Netopeer2/files/stock_config.xml (renamed from net/netopeer2/files/stock_config.xml)0
-rw-r--r--net/Netopeer2/patches/001-fix-for-cmake-build (renamed from net/netopeer2/patches/001-fix-for-cmake-build)22
-rw-r--r--net/Netopeer2/patches/002-fix-keystored-cross-compile18
-rw-r--r--net/netopeer2/files/netopeer2-server.init47
-rw-r--r--net/sysrepo/Makefile25
-rw-r--r--net/sysrepo/files/libsysrepo.default2
-rw-r--r--net/sysrepo/files/sysrepo.init6
-rw-r--r--net/sysrepo/patches/001-add-generated-protobufc-files (renamed from net/sysrepo/patches/001-protobuf-remove-protoc-command-from-cmake-file)27
-rw-r--r--net/sysrepo/patches/002-remove-buildtime-module-install20
-rw-r--r--net/sysrepo/patches/003-missing-time-header12
-rw-r--r--net/sysrepo/patches/004-disable-sysrepod-autostart18
17 files changed, 143 insertions, 155 deletions
diff --git a/net/netopeer2/Config_keystored.in b/net/Netopeer2/Config_keystored.in
index 73252507e..73252507e 100644
--- a/net/netopeer2/Config_keystored.in
+++ b/net/Netopeer2/Config_keystored.in
diff --git a/net/netopeer2/Makefile b/net/Netopeer2/Makefile
index 09668f0f2..81c21cd93 100644
--- a/net/netopeer2/Makefile
+++ b/net/Netopeer2/Makefile
@@ -9,28 +9,21 @@
include $(TOPDIR)/rules.mk
-PKG_NAME:=netopeer2
+PKG_NAME:=Netopeer2
+PKG_VERSION:=0.6-r1
PKG_LICENSE:=BSD-3-Clause
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
-PKG_VERSION:=0.5.26
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/CESNET/Netopeer2/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=5f38db43f6021e389cf1f3c5c70e432586d8ba7f2d64ed5bd2bea8c7ea6b39e6
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=3b99e99c9d507ddc89d21d7f1cbded494e6aa72e
-PKG_MIRROR_HASH:=d29b501d56bf9a2480759cc55368c842f69b07722afb3a0a70f05d6088f72574
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/CESNET/Netopeer2.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
-
-PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
-PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)
+CMAKE_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
-CMAKE_INSTALL:=1
-
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
@@ -60,7 +53,7 @@ define Package/netopeer2-keystored
CATEGORY:=Utilities
TITLE:=Netopeer2 key store management
URL:=$(PKG_SOURCE_URL)
- DEPENDS:=+libopenssl +libsysrepo +sysrepo +sysrepocfg +sysrepoctl +SSH_KEYS:openssh-keygen +SSH_KEYS:openssl-util
+ DEPENDS:=+libopenssl +libsysrepo +sysrepo +sysrepocfg +sysrepoctl +SSH_KEYS:openssh-keygen
MENU:=1
endef
@@ -74,24 +67,29 @@ endef
CMAKE_OPTIONS += \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DCMAKE_BUILD_TYPE:STRING=Release \
- -DKEYSTORED_KEYS_DIR:STRING=/etc/keystored/keys
+ -DKEYSTORED_KEYS_DIR:STRING=/etc/keystored/keys \
+ -DENABLE_CONFIGURATION:BOOL=OFF \
+ -DMODEL_INSTALL:BOOL=OFF \
+ -DSSH_KEY_INSTALL:BOOL=OFF
define Package/netopeer2-server/install
$(INSTALL_DIR) $(1)/bin
- $(INSTALL_BIN) $(PKG_BUILD_ROOT)/server/netopeer2-server $(1)/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/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/ietf-ssh-server@2016-11-02.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-tls-server.yang $(1)/etc/sysrepo/yang/ietf-tls-server@2016-11-02.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/iana-crypt-hash.yang $(1)/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-x509-cert-to-name.yang $(1)/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-netconf-server.yang $(1)/etc/sysrepo/yang/ietf-netconf-server@2016-11-02.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-netconf-monitoring.yang $(1)/etc/sysrepo/yang/ietf-netconf-monitoring@2010-10-04.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-netconf-with-defaults.yang $(1)/etc/sysrepo/yang/ietf-netconf-with-defaults@2011-06-01.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-system.yang $(1)/etc/sysrepo/yang/ietf-system@2014-08-06.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-ssh-server.yang $(1)/etc/sysrepo/yang/ietf-ssh-server@2016-11-02.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-tls-server.yang $(1)/etc/sysrepo/yang/ietf-tls-server@2016-11-02.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/iana-crypt-hash.yang $(1)/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-x509-cert-to-name.yang $(1)/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf-server.yang $(1)/etc/sysrepo/yang/ietf-netconf-server@2016-11-02.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf-monitoring.yang $(1)/etc/sysrepo/yang/ietf-netconf-monitoring@2010-10-04.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf-with-defaults.yang $(1)/etc/sysrepo/yang/ietf-netconf-with-defaults@2011-06-01.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-system.yang $(1)/etc/sysrepo/yang/ietf-system@2014-08-06.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-datastores.yang $(1)/etc/sysrepo/yang/ietf-datastores@2017-08-17.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-yang-library.yang $(1)/etc/sysrepo/yang/ietf-yang-library@2018-01-17.yang
$(INSTALL_DIR) $(1)/etc/uci-defaults
- $(INSTALL_BIN) ./files/netopeer2-server.default $(1)/etc/uci-defaults/99_netopeer2-server
+ $(INSTALL_BIN) ./files/netopeer2-server.default $(1)/etc/uci-defaults/98_netopeer2-server
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) ./files/netopeer2-server.init $(1)/etc/init.d/netopeer2-server
@@ -102,15 +100,15 @@ endef
define Package/netopeer2-cli/install
$(INSTALL_DIR) $(1)/bin
- $(INSTALL_BIN) $(PKG_BUILD_ROOT)/cli/netopeer2-cli $(1)/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/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_BIN) $(PKG_BUILD_DIR)/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/ietf-keystore@2016-10-31.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-keystore.yang $(1)/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang
$(INSTALL_DIR) $(1)/etc/uci-defaults
@@ -125,7 +123,7 @@ else
endif
$(INSTALL_DIR) $(1)/usr/share/netopeer2-keystored
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/keystored/stock_key_config.xml $(1)/usr/share/netopeer2-keystored
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/keystored/stock_key_config.xml $(1)/usr/share/netopeer2-keystored
endef
$(eval $(call BuildPackage,netopeer2-server))
diff --git a/net/netopeer2/files/netopeer2-keystored-keygen.default b/net/Netopeer2/files/netopeer2-keystored-keygen.default
index df28081c7..30e06a13d 100644
--- a/net/netopeer2/files/netopeer2-keystored-keygen.default
+++ b/net/Netopeer2/files/netopeer2-keystored-keygen.default
@@ -7,15 +7,15 @@ if [ -x /bin/sysrepoctl ]; then
if [ ! "$match" ]; then
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang -o root:root -p 600
if [ -x /bin/sysrepocfg ]; then
- sysrepocfg -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
+ sysrepocfg -f xml -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
rm /usr/share/netopeer2-keystored/stock_key_config.xml
fi
#generate ssh keys
- ssh-keygen -t rsa -f /tmp/ssh_host_rsa_key -N ""
- openssl rsa -in /tmp/ssh_host_rsa_key -outform pem > /etc/keystored/keys/ssh_host_rsa_key.pem
- openssl rsa -pubout -in /etc/keystored/keys/ssh_host_rsa_key.pem -out /etc/keystored/keys/ssh_host_rsa_key.pub.pem
- rm /tmp/ssh_host_rsa_key
+ if [ ! -f "/etc/keystored/keys/ssh_host_rsa_key.pem" ]; then
+ ssh-keygen -m pem -t rsa -q -N "" -f /etc/keystored/keys/ssh_host_rsa_key.pem
+ chmod go-rw /etc/keystored/keys/ssh_host_rsa_key.pem
+ fi
fi
fi
diff --git a/net/netopeer2/files/netopeer2-keystored.default b/net/Netopeer2/files/netopeer2-keystored.default
index dda6f4517..5257e5348 100644
--- a/net/netopeer2/files/netopeer2-keystored.default
+++ b/net/Netopeer2/files/netopeer2-keystored.default
@@ -7,7 +7,7 @@ if [ -x /bin/sysrepoctl ]; then
if [ ! "$match" ]; then
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang -o root:root -p 600
if [ -x /bin/sysrepocfg ]; then
- sysrepocfg -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
+ sysrepocfg -f xml -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
rm /usr/share/netopeer2-keystored/stock_key_config.xml
fi
fi
diff --git a/net/netopeer2/files/netopeer2-server.default b/net/Netopeer2/files/netopeer2-server.default
index a93127036..1cabba798 100644
--- a/net/netopeer2/files/netopeer2-server.default
+++ b/net/Netopeer2/files/netopeer2-server.default
@@ -29,7 +29,7 @@ if [ -x /bin/sysrepoctl ]; then
sysrepoctl -m ietf-netconf-server -e listen
sysrepoctl -m ietf-netconf-server -e ssh-listen
if [ -x /bin/sysrepocfg ]; then
- sysrepocfg -d startup -i /usr/share/netopeer2-server/stock_config.xml ietf-netconf-server
+ sysrepocfg -f xml -d startup -i /usr/share/netopeer2-server/stock_config.xml ietf-netconf-server
rm /usr/share/netopeer2-server/stock_config.xml
fi
fi
@@ -50,6 +50,16 @@ if [ -x /bin/sysrepoctl ]; then
sysrepoctl -m ietf-system -e authentication
sysrepoctl -m ietf-system -e local-users
fi
+
+ match=$(sysrepoctl -l | grep "ietf-datastores ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-datastores@2017-08-17.yang -o root:root -p 600
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-yang-library ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-yang-library@2018-01-17.yang -o root:root -p 600
+ fi
fi
exit 0
diff --git a/net/Netopeer2/files/netopeer2-server.init b/net/Netopeer2/files/netopeer2-server.init
new file mode 100644
index 000000000..6b2c133b3
--- /dev/null
+++ b/net/Netopeer2/files/netopeer2-server.init
@@ -0,0 +1,21 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=11
+
+USE_PROCD=1
+PROG=/bin/netopeer2-server
+
+start_service() {
+ procd_open_instance
+ procd_set_param command $PROG
+ procd_append_param command -d -v 0
+ procd_set_param respawn
+ procd_close_instance
+}
+
+stop_service()
+{
+ service_stop ${PROG}
+ rm /var/run/netopeer2-server.pid
+}
diff --git a/net/netopeer2/files/stock_config.xml b/net/Netopeer2/files/stock_config.xml
index 45766846a..45766846a 100644
--- a/net/netopeer2/files/stock_config.xml
+++ b/net/Netopeer2/files/stock_config.xml
diff --git a/net/netopeer2/patches/001-fix-for-cmake-build b/net/Netopeer2/patches/001-fix-for-cmake-build
index 920086a7c..dad54a440 100644
--- a/net/netopeer2/patches/001-fix-for-cmake-build
+++ b/net/Netopeer2/patches/001-fix-for-cmake-build
@@ -1,17 +1,17 @@
-Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
+Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
===================================================================
--- /dev/null
-+++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
++++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required(VERSION 2.6)
+
+add_subdirectory(server)
+add_subdirectory(cli)
+add_subdirectory(keystored)
-Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
+Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
===================================================================
---- netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/cli/CMakeLists.txt
-+++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
+--- Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/cli/CMakeLists.txt
++++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.6)
@@ -30,10 +30,10 @@ Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.
COMMAND make clean
COMMAND find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} +
COMMAND rm -rf Makefile Doxyfile
-Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
+Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
===================================================================
---- netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/keystored/CMakeLists.txt
-+++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
+--- Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/keystored/CMakeLists.txt
++++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.6)
@@ -52,10 +52,10 @@ Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMake
scripts/model-install.sh
scripts/ssh-key-import.sh
)
-Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
+Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
===================================================================
---- netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/server/CMakeLists.txt
-+++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
+--- Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/server/CMakeLists.txt
++++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.8.9)
diff --git a/net/Netopeer2/patches/002-fix-keystored-cross-compile b/net/Netopeer2/patches/002-fix-keystored-cross-compile
new file mode 100644
index 000000000..11301e768
--- /dev/null
+++ b/net/Netopeer2/patches/002-fix-keystored-cross-compile
@@ -0,0 +1,18 @@
+Index: Netopeer2-0.6-r1/keystored/CMakeLists.txt
+===================================================================
+--- Netopeer2-0.6-r1.orig/keystored/CMakeLists.txt
++++ Netopeer2-0.6-r1/keystored/CMakeLists.txt
+@@ -69,6 +69,8 @@ find_package(SYSREPO REQUIRED)
+ target_link_libraries(keystored ${SYSREPO_LIBRARIES})
+ include_directories(${SYSREPO_INCLUDE_DIRS})
+
++# skip step because of cross compiling
++if (FALSE)
+ # get sysrepo plugins directory
+ if (NOT SR_PLUGINS_DIR)
+ if (PKG_CONFIG_FOUND)
+@@ -154,3 +156,4 @@ add_custom_target(install-scripts-ide-ke
+
+ # plugins should be installed into sysrepo plugins dir
+ install(TARGETS keystored DESTINATION ${SR_PLUGINS_DIR})
++endif()
diff --git a/net/netopeer2/files/netopeer2-server.init b/net/netopeer2/files/netopeer2-server.init
deleted file mode 100644
index 59f769967..000000000
--- a/net/netopeer2/files/netopeer2-server.init
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh /etc/rc.common
-
-START=99
-STOP=11
-
-USE_PROCD=1
-PROG=/bin/netopeer2-server
-
-start_service() {
-
- PERSIST_FILE=/etc/sysrepo/data/ietf-keystore.persist
-
- while [ ! -f $PERSIST_FILE ]
- do
- echo "no persist file yet"
- sleep 3
- done
-
- RETRY_CNT=5
- LAST_LINE=$(tail -n1 $PERSIST_FILE)
-
- while [[ -f $PERSIST_FILE && $LAST_LINE != "</module>" ]]
- do
- sleep 1
-
- echo "$RETRY_CNT: $LAST_LINE"
- LAST_LINE=$(tail -n1 $PERSIST_FILE)
- RETRY_CNT=$(($RETRY_CNT-1))
-
- if [ $RETRY_CNT -le 0 ];
- then
- rm $PERSIST_FILE
- RETRY_CNT=5
- fi
- done
-
- procd_open_instance
- procd_set_param command $PROG
- procd_append_param command -d -v 0
- procd_set_param respawn
- procd_close_instance
-}
-
-stop_service()
-{
- service_stop ${PROG}
-}
diff --git a/net/sysrepo/Makefile b/net/sysrepo/Makefile
index 3a79d5a13..acc4fa2ee 100644
--- a/net/sysrepo/Makefile
+++ b/net/sysrepo/Makefile
@@ -11,12 +11,12 @@ PKG_LICENSE:=ASL-2.0
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
PKG_NAME:=sysrepo
-PKG_VERSION:=0.7.4
+PKG_VERSION:=0.7.5
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/sysrepo/sysrepo/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=238456bbb18149fd0fa5ebc9acb3c6e3129474c796db7447c2a95dcd40ab3084
+PKG_HASH:=3ef20e1e005fd22f13d1996231ccfc72241f3f76c5700397ad59dda0f9b29f72
CMAKE_INSTALL:=1
@@ -40,7 +40,7 @@ define Package/libsysrepo
CATEGORY:=Utilities
URL:=$(PKG_SOURCE_URL)
TITLE:=YANG-based data store library
- DEPENDS:=+libyang +libprotobuf-c +libev +libredblack +librt +SYSREPO_BINDINGS:libstdcpp +SYSREPO_PYTHON:python-base +SYSREPO_LUA:lua
+ DEPENDS:=+libyang +libprotobuf-c +libev +libredblack +librt +libpthread +SYSREPO_BINDINGS:libstdcpp +SYSREPO_PYTHON:python-base +SYSREPO_LUA:lua
MENU:=1
endef
@@ -90,7 +90,8 @@ CMAKE_OPTIONS += \
-DOPER_DATA_PROVIDE_TIMEOUT=4 \
-DNOTIF_AGE_TIMEOUT=120 \
-DNOTIF_TIME_WINDOW=20 \
- -DUSE_SR_MEM_MGMT=0
+ -DUSE_SR_MEM_MGMT=0 \
+ -DFILE_FORMAT_EXT:STRING=xml
ifeq ($(CONFIG_SYSREPO_LUA),y)
CMAKE_OPTIONS += \
@@ -108,7 +109,8 @@ ifeq ($(CONFIG_SYSREPO_BINDINGS),y)
CMAKE_OPTIONS += \
-DCMAKE_DISABLE_FIND_PACKAGE_SWIG=FALSE \
-DGEN_LANGUAGE_BINDINGS:BOOL=TRUE \
- -DSWIG_DIR=$(STAGING_DIR)/host/share/swig
+ -DSWIG_DIR=$(STAGING_DIR)/host/share/swig \
+ -DCALL_TARGET_BINS_DIRECTLY=OFF
endif
define Package/libsysrepo/install
@@ -121,7 +123,7 @@ define Package/libsysrepo/install
$(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/ietf-netconf-acm@2012-02-22.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/ietf-netconf-acm@2018-02-14.yang $(1)/etc/sysrepo/yang/ietf-netconf-acm@2018-02-14.yang
$(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/ietf-netconf-notifications.yang $(1)/etc/sysrepo/yang/ietf-netconf-notifications@2012-02-06.yang
$(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/nc-notifications.yang $(1)/etc/sysrepo/yang/nc-notifications@2008-07-14.yang
$(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/notifications.yang $(1)/etc/sysrepo/yang/notifications@2008-07-14.yang
@@ -169,6 +171,17 @@ define Package/sysrepocfg/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sysrepocfg $(1)/bin/
endef
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsysrepo.pc $(1)/usr/lib/pkgconfig/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/src/libsysrepo.so* $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/inc/* $(1)/usr/include/
+endef
+
$(eval $(call BuildPackage,libsysrepo))
$(eval $(call BuildPackage,sysrepo))
$(eval $(call BuildPackage,sysrepoctl))
diff --git a/net/sysrepo/files/libsysrepo.default b/net/sysrepo/files/libsysrepo.default
index 274a6c066..6fd06ef81 100644
--- a/net/sysrepo/files/libsysrepo.default
+++ b/net/sysrepo/files/libsysrepo.default
@@ -15,7 +15,7 @@ if [ -x /bin/sysrepoctl ]; then
match=$(sysrepoctl -l | grep "ietf-netconf-acm ")
if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-acm@2012-02-22.yang -p 644
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-acm@2018-02-14.yang -p 644
fi
match=$(sysrepoctl -l | grep "ietf-netconf-notifications ")
diff --git a/net/sysrepo/files/sysrepo.init b/net/sysrepo/files/sysrepo.init
index abfcd66cd..a2599cbdb 100644
--- a/net/sysrepo/files/sysrepo.init
+++ b/net/sysrepo/files/sysrepo.init
@@ -4,12 +4,12 @@ START=60
STOP=10
USE_PROCD=1
-PROG_DEAMON=/bin/sysrepod
+PROG_DAEMON=/bin/sysrepod
PROG_PLUGIN=/bin/sysrepo-plugind
start_service() {
procd_open_instance
- procd_set_param command ${PROG_DEAMON}
+ procd_set_param command ${PROG_DAEMON}
procd_append_param command -d -l 0
procd_set_param respawn
procd_close_instance
@@ -25,6 +25,6 @@ stop_service()
{
kill -9 `ps | grep netopeer2-server | grep -v grep | awk '{print $1}'` >/dev/null 2>&1
service_stop ${PROG_PLUGIN}
- service_stop ${PROG_DEAMON}
+ service_stop ${PROG_DAEMON}
rm -rf /var/run/sysrepo-subscriptions/*
}
diff --git a/net/sysrepo/patches/001-protobuf-remove-protoc-command-from-cmake-file b/net/sysrepo/patches/001-add-generated-protobufc-files
index cb742cec7..ec08c137f 100644
--- a/net/sysrepo/patches/001-protobuf-remove-protoc-command-from-cmake-file
+++ b/net/sysrepo/patches/001-add-generated-protobufc-files
@@ -1,26 +1,7 @@
-Index: sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/CMakeLists.txt
-===================================================================
---- sysrepo-7aa2f18d234267403147df92c0005c871f0aa840.orig/src/CMakeLists.txt
-+++ sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/CMakeLists.txt
-@@ -21,14 +21,6 @@ set(GENERATED_PROTO_H "${COMMON_BIN_DIR}
- set(GENERATED_PROTO_C "${COMMON_BIN_DIR}/${PROTO_NAME}.pb-c.c")
-
- get_filename_component(ABS_PATH ${PROTO_FILE} PATH)
--add_custom_command(
-- OUTPUT "${GENERATED_PROTO_C}"
-- "${GENERATED_PROTO_H}"
-- COMMAND ${PROTOBUFC_PROTOC_EXECUTABLE}
-- ARGS --c_out ${COMMON_BIN_DIR} -I ${ABS_PATH} ${PROTO_FILE}
-- DEPENDS ${PROTO_FILE}
-- COMMENT "Running C protocol buffer compiler on ${PROTO_FILE}"
-- VERBATIM )
-
- configure_file("${COMMON_DIR}/sr_constants.h.in" "${COMMON_BIN_DIR}/sr_constants.h" ESCAPE_QUOTES @ONLY)
-
-Index: sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.c
+Index: sysrepo-0.7.5/src/common/sysrepo.pb-c.c
===================================================================
--- /dev/null
-+++ sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.c
++++ sysrepo-0.7.5/src/common/sysrepo.pb-c.c
@@ -0,0 +1,10537 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: sysrepo.proto */
@@ -10559,10 +10540,10 @@ Index: sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.
+ sr__operation__value_ranges,
+ NULL,NULL,NULL,NULL /* reserved[1234] */
+};
-Index: sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.h
+Index: sysrepo-0.7.5/src/common/sysrepo.pb-c.h
===================================================================
--- /dev/null
-+++ sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.h
++++ sysrepo-0.7.5/src/common/sysrepo.pb-c.h
@@ -0,0 +1,4238 @@
+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
+/* Generated from: sysrepo.proto */
diff --git a/net/sysrepo/patches/002-remove-buildtime-module-install b/net/sysrepo/patches/002-remove-buildtime-module-install
index 15bc77c96..3826853fb 100644
--- a/net/sysrepo/patches/002-remove-buildtime-module-install
+++ b/net/sysrepo/patches/002-remove-buildtime-module-install
@@ -1,26 +1,26 @@
-Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/CMakeLists.txt
+Index: sysrepo-0.7.5/CMakeLists.txt
===================================================================
---- sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf.orig/CMakeLists.txt
-+++ sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/CMakeLists.txt
-@@ -280,7 +280,7 @@ install (FILES ${INTERNAL_YANGS} DESTINA
+--- sysrepo-0.7.5.orig/CMakeLists.txt
++++ sysrepo-0.7.5/CMakeLists.txt
+@@ -303,7 +303,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")
+- INSTALL_YANG("ietf-netconf-acm" "@2018-02-14" "644")
++ #INSTALL_YANG("ietf-netconf-acm" "@2018-02-14" "644")
endif(ENABLE_NACM)
find_package(PkgConfig QUIET)
-@@ -304,9 +304,9 @@ if(WITH_SYSTEMD)
+@@ -327,9 +327,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")
++#INSTALL_YANG("ietf-netconf-notifications" "" "666")
++#INSTALL_YANG("nc-notifications" "" "666")
++#INSTALL_YANG("notifications" "" "666")
if(GEN_LANGUAGE_BINDINGS)
add_subdirectory(swig)
diff --git a/net/sysrepo/patches/003-missing-time-header b/net/sysrepo/patches/003-missing-time-header
deleted file mode 100644
index 6ce54dea6..000000000
--- a/net/sysrepo/patches/003-missing-time-header
+++ /dev/null
@@ -1,12 +0,0 @@
-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>
diff --git a/net/sysrepo/patches/004-disable-sysrepod-autostart b/net/sysrepo/patches/004-disable-sysrepod-autostart
index 3261aee13..ca4b0caa8 100644
--- a/net/sysrepo/patches/004-disable-sysrepod-autostart
+++ b/net/sysrepo/patches/004-disable-sysrepod-autostart
@@ -1,12 +1,11 @@
-Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/clientlib/client_library.c
+Index: sysrepo-0.7.5/src/clientlib/client_library.c
===================================================================
---- sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf.orig/src/clientlib/client_library.c
-+++ sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/clientlib/client_library.c
-@@ -405,14 +405,6 @@ sr_connect(const char *app_name, const s
- if (SR_ERR_OK != rc) {
+--- sysrepo-0.7.5.orig/src/clientlib/client_library.c
++++ sysrepo-0.7.5/src/clientlib/client_library.c
+@@ -396,13 +396,13 @@ sr_connect(const char *app_name, const s
if (opts & SR_CONN_DAEMON_REQUIRED) {
if ((opts & SR_CONN_DAEMON_START) && (0 == getuid())) {
-- /* sysrepo daemon start requested and process is running under root privileges */
+ /* sysrepo daemon start requested and process is running under root privileges */
- SR_LOG_DBG_MSG("Sysrepo daemon not detected, starting it.");
- ret = system("sysrepod");
- if (0 == ret) {
@@ -14,6 +13,13 @@ Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/clientlib/client_lib
- } else {
- SR_LOG_WRN("Unable to start sysrepo daemon, error code=%d.", ret);
- }
++ //SR_LOG_DBG_MSG("Sysrepo daemon not detected, starting it.");
++ //ret = system("sysrepod");
++ //if (0 == ret) {
++ // SR_LOG_INF_MSG("Sysrepo daemon has been started.");
++ //} else {
++ // SR_LOG_WRN("Unable to start sysrepo daemon, error code=%d.", ret);
++ //}
/* retry to connect again in any case */
rc = cl_socket_connect(connection, SR_DAEMON_SOCKET);
CHECK_RC_LOG_GOTO(rc, cleanup, "Unable to connect to sysrepod: %s.", sr_strerror(rc));