Browse Source

Merge pull request #4933 from sartura/sysrepo_release

Sysrepo release
lilik-openwrt-22.03
Hannu Nyman 7 years ago
committed by GitHub
parent
commit
3c1fb8eb24
8 changed files with 14 additions and 170 deletions
  1. +3
    -3
      libs/libnetconf2/Makefile
  2. +3
    -3
      libs/libyang/Makefile
  3. +3
    -3
      net/netopeer2/Makefile
  4. +0
    -48
      net/netopeer2/patches/002-server-BUGFIX-replace-sr_get_iter-with-sr_get_items
  5. +0
    -59
      net/netopeer2/patches/003-BUGFIX-for-missing-eaccess-in-uClibc
  6. +0
    -51
      net/netopeer2/patches/004-BUGFIX-for-missing-mkstemps-in-uClibc
  7. +3
    -3
      net/sysrepo/Makefile
  8. +2
    -0
      net/sysrepo/files/sysrepo.init

+ 3
- 3
libs/libnetconf2/Makefile View File

@ -12,11 +12,11 @@ PKG_NAME:=libnetconf2
PKG_LICENSE:=BSD-3-Clause
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
PKG_VERSION:=0.9.15
PKG_VERSION:=0.9.22
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=cea46db1edb72231c9e009d7e6d6799256676eb8
PKG_MIRROR_HASH:=a686754cef2ef29a511b8ea06d121f0ce562b570d6cea6c6a7562ff47b91d2a2
PKG_SOURCE_VERSION:=8aafe1286cb4036b87054e6e1ca5edc34a31595c
PKG_MIRROR_HASH:=ac6fca84ba903825958afe313ff0795c34eb0865ed7b5003b7112afcb24b9d94
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/cesnet/libnetconf2/
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)


+ 3
- 3
libs/libyang/Makefile View File

@ -8,15 +8,15 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libyang
PKG_VERSION:=0.13.46
PKG_VERSION:=0.13.75
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=d1556e0ae3872d676dfd63bd6073fe7e72d0130f
PKG_MIRROR_HASH:=4a23a3854ceca147e113ab65ecdce3371e30b59436680e7d981b0bab6dbe751d
PKG_SOURCE_VERSION:=e11255e32a63fdafe31764f5d594bed46d08f6a9
PKG_MIRROR_HASH:=916cbfd52a04c6b306afa5fb684299f202c1c235689d8b57546a6b4eb4cc5a39
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/CESNET/libyang.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)


+ 3
- 3
net/netopeer2/Makefile View File

@ -14,11 +14,11 @@ PKG_NAME:=netopeer2
PKG_LICENSE:=BSD-3-Clause
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
PKG_VERSION:=0.4.0
PKG_VERSION:=0.4.3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=d028c1f931819db4b3e3cb1fd2d349a4fd5c0459
PKG_MIRROR_HASH:=7f5b3ad49aaf2a8ceea2c17a37e276f5694af570ef904cfc5a6f53d295809cef
PKG_SOURCE_VERSION:=e7c821cde14df31a03d23293f84e0aed9cb1a457
PKG_MIRROR_HASH:=88a4c06e9cdb81879de7311138acbfe9fe5207db14fbb93c5ba4d6947d616aec
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)


+ 0
- 48
net/netopeer2/patches/002-server-BUGFIX-replace-sr_get_iter-with-sr_get_items View File

@ -1,48 +0,0 @@
Index: netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459/server/ietf_netconf_server.c
===================================================================
--- netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459.orig/server/ietf_netconf_server.c
+++ netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459/server/ietf_netconf_server.c
@@ -1161,8 +1161,8 @@ feature_change_ietf_netconf_server(const
{
int rc, rc2 = 0;
const char *path = NULL;
- sr_val_iter_t *sr_iter;
- sr_val_t *sr_val;
+ sr_val_t *values;
+ size_t value_cnt;
assert(feature_name);
@@ -1180,26 +1180,26 @@ feature_change_ietf_netconf_server(const
return EXIT_SUCCESS;
}
- rc = sr_get_items_iter(np2srv.sr_sess.srs, path, &sr_iter);
+ rc =sr_get_items(np2srv.sr_sess.srs, path, &values, &value_cnt);
if (rc != SR_ERR_OK) {
ERR("Failed to get \"%s\" values iterator from sysrepo (%s).", sr_strerror(rc));
return EXIT_FAILURE;
}
- while ((rc = sr_get_item_next(np2srv.sr_sess.srs, sr_iter, &sr_val)) == SR_ERR_OK) {
- if (sr_val->type == SR_LIST_T) {
+ size_t i;
+ for(i = 0; i < value_cnt; i++) {
+ if (values[i].type == SR_LIST_T) {
/* no semantic meaning */
continue;
}
- rc2 = module_change_resolve(np2srv.sr_sess.srs, SR_OP_CREATED, NULL, sr_val, NULL, NULL);
- sr_free_val(sr_val);
+ rc2 = module_change_resolve(np2srv.sr_sess.srs, SR_OP_CREATED, NULL, &values[i], NULL, NULL);
if (rc2) {
ERR("Failed to enable nodes depending on the \"%s\" ietf-netconf-server feature.", feature_name);
break;
}
}
- sr_free_val_iter(sr_iter);
+ sr_free_values(values, value_cnt);
if (rc2) {
return EXIT_FAILURE;
} else if ((rc != SR_ERR_OK) && (rc != SR_ERR_NOT_FOUND)) {

+ 0
- 59
net/netopeer2/patches/003-BUGFIX-for-missing-eaccess-in-uClibc View File

@ -1,59 +0,0 @@
Index: netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459/cli/CMakeLists.txt
===================================================================
--- netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459.orig/cli/CMakeLists.txt
+++ netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459/cli/CMakeLists.txt
@@ -67,6 +67,9 @@ if(NOT MAN_INSTALL_DIR)
set(MAN_INSTALL_DIR share/man)
endif()
+include(CheckFunctionExists)
+check_function_exists(eaccess HAVE_EACCESS)
+
# install binary
install(TARGETS netopeer2-cli DESTINATION ${BIN_INSTALL_DIR})
Index: netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459/cli/commands.c
===================================================================
--- netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459.orig/cli/commands.c
+++ netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459/cli/commands.c
@@ -37,6 +37,10 @@
# include <openssl/x509v3.h>
#endif
+#ifndef HAVE_EACCESS
+#define eaccess access
+#endif
+
#include "commands.h"
#include "configuration.h"
#include "completion.h"
Index: netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459/cli/completion.c
===================================================================
--- netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459.orig/cli/completion.c
+++ netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459/cli/completion.c
@@ -27,6 +27,10 @@
#include <nc_client.h>
+#ifndef HAVE_EACCESS
+#define eaccess access
+#endif
+
#include "commands.h"
#include "linenoise/linenoise.h"
Index: netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459/cli/configuration.c
===================================================================
--- netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459.orig/cli/configuration.c
+++ netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459/cli/configuration.c
@@ -28,6 +28,10 @@
#include <libyang/libyang.h>
#include <nc_client.h>
+#ifndef HAVE_EACCESS
+#define eaccess access
+#endif
+
#include "configuration.h"
#include "commands.h"
#include "linenoise/linenoise.h"

+ 0
- 51
net/netopeer2/patches/004-BUGFIX-for-missing-mkstemps-in-uClibc View File

@ -1,51 +0,0 @@
Index: netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459/cli/CMakeLists.txt
===================================================================
--- netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459.orig/cli/CMakeLists.txt
+++ netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459/cli/CMakeLists.txt
@@ -69,6 +69,10 @@ endif()
include(CheckFunctionExists)
check_function_exists(eaccess HAVE_EACCESS)
+check_function_exists(mkstemps HAVE_MKSTEMPS)
+if(HAVE_MKSTEMPS)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_MKSTEMPS")
+endif(HAVE_MKSTEMPS)
# install binary
install(TARGETS netopeer2-cli DESTINATION ${BIN_INSTALL_DIR})
Index: netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459/cli/completion.c
===================================================================
--- netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459.orig/cli/completion.c
+++ netopeer2-0.4.0-d028c1f931819db4b3e3cb1fd2d349a4fd5c0459/cli/completion.c
@@ -120,6 +120,7 @@ readinput(const char *instruction, const
char* tmpname = NULL, *input = NULL, *old_content = NULL, *ptr, *ptr2;
/* Create a unique temporary file */
+#ifdef HAVE_MKSTEMPS
if (asprintf(&tmpname, "/tmp/tmpXXXXXX.xml") == -1) {
ERROR(__func__, "asprintf() failed (%s).", strerror(errno));
goto fail;
@@ -129,6 +130,23 @@ readinput(const char *instruction, const
ERROR(__func__, "Failed to create a temporary file (%s).", strerror(errno));
goto fail;
}
+#else
+ if (asprintf(&tmpname, "/tmp/tmpXXXXXX") == -1) {
+ ERROR(__func__, "asprintf() failed (%s).", strerror(errno));
+ goto fail;
+ }
+ /* cannot fail */
+ mktemp(tmpname);
+ if (asprintf(&tmpname, ".xml") == -1) {
+ ERROR(__func__, "asprintf() failed (%s).", strerror(errno));
+ goto fail;
+ }
+ tmpfd = open(tmpname, O_RDWR | O_CREAT | O_EXCL, 0600);
+ if (tmpfd == -1) {
+ ERROR(__func__, "Failed to create a temporary file (%s).", strerror(errno));
+ goto fail;
+ }
+#endif /* #ifdef HAVE_MKSTEMPS */
/* Read the old content, if any */
if (old_tmp != NULL) {

+ 3
- 3
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.0
PKG_VERSION:=0.7.1
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=7aa2f18d234267403147df92c0005c871f0aa840
PKG_MIRROR_HASH:=31125596ae1c4dbf8dd48c639bf78043060ab1b89678c860eb2b10606fe4b686
PKG_SOURCE_VERSION:=0b36f308574a60d7ee36b1a3118b999618bb40d8
PKG_MIRROR_HASH:=d28ff0356b6ac4b934bb45ff77973efe7964b86a54270d11e1fd06a2af9bdbc8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/sysrepo/sysrepo.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)


+ 2
- 0
net/sysrepo/files/sysrepo.init View File

@ -23,6 +23,8 @@ start_service() {
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}
rm -rf /var/run/sysrepo-subscriptions/*
}

Loading…
Cancel
Save