Browse Source

sysrepo: update to 0.7.5

Signed-off-by: Mislav Novakovic <mislav.novakovic@sartura.hr>
lilik-openwrt-22.03
Mislav Novakovic 6 years ago
parent
commit
5e6a535df9
7 changed files with 49 additions and 61 deletions
  1. +19
    -6
      net/sysrepo/Makefile
  2. +1
    -1
      net/sysrepo/files/libsysrepo.default
  3. +3
    -3
      net/sysrepo/files/sysrepo.init
  4. +4
    -23
      net/sysrepo/patches/001-add-generated-protobufc-files
  5. +10
    -10
      net/sysrepo/patches/002-remove-buildtime-module-install
  6. +0
    -12
      net/sysrepo/patches/003-missing-time-header
  7. +12
    -6
      net/sysrepo/patches/004-disable-sysrepod-autostart

+ 19
- 6
net/sysrepo/Makefile View File

@ -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))


+ 1
- 1
net/sysrepo/files/libsysrepo.default View File

@ -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 ")


+ 3
- 3
net/sysrepo/files/sysrepo.init View File

@ -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/*
}

net/sysrepo/patches/001-protobuf-remove-protoc-command-from-cmake-file → net/sysrepo/patches/001-add-generated-protobufc-files View File


+ 10
- 10
net/sysrepo/patches/002-remove-buildtime-module-install View File

@ -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)

+ 0
- 12
net/sysrepo/patches/003-missing-time-header View File

@ -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>

+ 12
- 6
net/sysrepo/patches/004-disable-sysrepod-autostart View File

@ -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));

Loading…
Cancel
Save