sysrepo: update the sysrepo/netopeer2 stack 4744/head
authorMislav Novakovic <mislav.novakovic@sartura.hr>
Fri, 25 Aug 2017 13:00:42 +0000 (15:00 +0200)
committerMislav Novakovic <mislav.novakovic@sartura.hr>
Mon, 18 Sep 2017 10:00:38 +0000 (12:00 +0200)
Patch includes updates to packages:
netopeer2: update to version 0.4.0
sysrepo: update to 0.7.0
libnetconf2: update to 0.9.15
libyang: update to 0.13.46

Signed-off-by: Mislav Novakovic <mislav.novakovic@sartura.hr>
libs/libnetconf2/Makefile
libs/libyang/Makefile
net/netopeer2/Config_server.in [deleted file]
net/netopeer2/Makefile
net/netopeer2/files/netopeer2-server.default
net/netopeer2/patches/002-server-BUGFIX-replace-sr_get_iter-with-sr_get_items [new file with mode: 0644]
net/netopeer2/patches/003-BUGFIX-for-missing-eaccess-in-uClibc [new file with mode: 0644]
net/netopeer2/patches/004-BUGFIX-for-missing-mkstemps-in-uClibc [new file with mode: 0644]
net/sysrepo/Makefile
net/sysrepo/patches/001-protobuf-remove-protoc-command-from-cmake-file
net/sysrepo/patches/005-fix-struct-ucred-define [new file with mode: 0644]

index 59644ee84ed83d53bcd17673a47cd91a0d84ddc6..12e4bf11f3c38d0c873239f6f786f6e402ea7aef 100644 (file)
@@ -12,14 +12,14 @@ PKG_NAME:=libnetconf2
 PKG_LICENSE:=BSD-3-Clause
 PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
 
-PKG_VERSION:=0.8.56
+PKG_VERSION:=0.9.15
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=4d13eca938085298edbad6a731d77dfd55c8d514
-PKG_MIRROR_HASH:=88d1ab14a945c8c8c9fadfb248568294ac5f62dea3b8d99e60dbb8262f7107bc
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
+PKG_SOURCE_VERSION:=cea46db1edb72231c9e009d7e6d6799256676eb8
+PKG_MIRROR_HASH:=a686754cef2ef29a511b8ea06d121f0ce562b570d6cea6c6a7562ff47b91d2a2
+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_SOURCE_VERSION)
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
 
 PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
 PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)
index ab32e25e1fd6cdc1e0a3cf2bb72253b06e51e9d8..29c416b0a16c7e941191f4ac91f00dc339ef2488 100644 (file)
@@ -8,18 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libyang
-PKG_VERSION:=0.12.174
+PKG_VERSION:=0.13.46
 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:=$(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:=7e811613b335afc8e1b2c0ee77e7b3f371bc9175
-PKG_MIRROR_HASH:=860865b294c628ad66ca5ef6848aae8df93e46325302914dbfb14264866f1678
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
+
+PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -32,7 +35,7 @@ define Package/libyang
   CATEGORY:=Libraries
   TITLE:=YANG data modeling language library
   URL:=$(PKG_SOURCE_URL)
-  DEPENDS:=+libpcre
+  DEPENDS:=+libpcre +libpthread
 endef
 
 define Package/yanglint
diff --git a/net/netopeer2/Config_server.in b/net/netopeer2/Config_server.in
deleted file mode 100644 (file)
index 112da76..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-if PACKAGE_netopeer2-server
-
-config SSH_SERVER
-       bool "Install the default ssh server (openssh-server)"
-       default y
-
-endif
index 62f4ec5a8cd51b20396a5b7b2c8b873fc5229b6c..fb136cb05009e7b38268186fdf19e76ffaf220c2 100644 (file)
@@ -14,14 +14,14 @@ PKG_NAME:=netopeer2
 PKG_LICENSE:=BSD-3-Clause
 PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
 
-PKG_VERSION:=0.3.65
+PKG_VERSION:=0.4.0
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=c204b59f9c2bb7e63eb907f33c44adbf208295ee
-PKG_MIRROR_HASH:=61a2b3e0ee9a3cf2f73715843f059c79292446ad3643f4eeb85d48d1e185c3b9
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
+PKG_SOURCE_VERSION:=d028c1f931819db4b3e3cb1fd2d349a4fd5c0459
+PKG_MIRROR_HASH:=7f5b3ad49aaf2a8ceea2c17a37e276f5694af570ef904cfc5a6f53d295809cef
+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_SOURCE_VERSION)
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
 
 PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
 PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)
@@ -34,10 +34,6 @@ CMAKE_INSTALL:=1
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
 
-define Package/netopeer2-server/config
-  source "$(SOURCE)/Config_server.in"
-endef
-
 define Package/netopeer2-keystored/config
   source "$(SOURCE)/Config_keystored.in"
 endef
@@ -47,7 +43,7 @@ define Package/netopeer2-server
   CATEGORY:=Utilities
   TITLE:=NETCONF server
   URL:=$(PKG_SOURCE_URL)
-  DEPENDS:=+libpthread +libyang +libnetconf2 +netopeer2-keystored +libsysrepo +sysrepocfg +sysrepoctl +sysrepo +SSH_SERVER:openssh-server
+  DEPENDS:=+libpthread +libyang +libnetconf2 +netopeer2-keystored +libsysrepo +sysrepocfg +sysrepoctl +sysrepo
   MENU:=1
 endef
 
index ec6bae0524b73ca6d2e4f774adb8a073afb31988..d2a699bb1389d25cb831ccc6ff59c53192a646bc 100644 (file)
@@ -28,10 +28,6 @@ if [ -x /bin/sysrepoctl ]; then
                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
                if [ -x /bin/sysrepocfg ]; then
                        sysrepocfg -d startup -i /usr/share/netopeer2-server/stock_config.xml ietf-netconf-server
                        rm /usr/share/netopeer2-server/stock_config.xml
diff --git a/net/netopeer2/patches/002-server-BUGFIX-replace-sr_get_iter-with-sr_get_items b/net/netopeer2/patches/002-server-BUGFIX-replace-sr_get_iter-with-sr_get_items
new file mode 100644 (file)
index 0000000..9cd4538
--- /dev/null
@@ -0,0 +1,48 @@
+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)) {
diff --git a/net/netopeer2/patches/003-BUGFIX-for-missing-eaccess-in-uClibc b/net/netopeer2/patches/003-BUGFIX-for-missing-eaccess-in-uClibc
new file mode 100644 (file)
index 0000000..5314cdb
--- /dev/null
@@ -0,0 +1,59 @@
+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"
diff --git a/net/netopeer2/patches/004-BUGFIX-for-missing-mkstemps-in-uClibc b/net/netopeer2/patches/004-BUGFIX-for-missing-mkstemps-in-uClibc
new file mode 100644 (file)
index 0000000..24460a1
--- /dev/null
@@ -0,0 +1,51 @@
+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) {
index b1ca349267942de7ed13ea5dc01005b0d426d935..b832162db15b9213ea22a4a23ab2b2790f2ee3eb 100644 (file)
@@ -11,17 +11,18 @@ PKG_LICENSE:=ASL-2.0
 PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
 
 PKG_NAME:=sysrepo
-PKG_VERSION:=0.6.0
+PKG_VERSION:=0.7.0
 PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=e4a5705a4c5293ba121048c71899b98243d99edf
-PKG_MIRROR_HASH:=aa0fb5d7c947dd428d9f573c84edf6237c8c1a4db92dcd4d7552a68d25277a39
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
+PKG_SOURCE_VERSION:=7aa2f18d234267403147df92c0005c871f0aa840
+PKG_MIRROR_HASH:=31125596ae1c4dbf8dd48c639bf78043060ab1b89678c860eb2b10606fe4b686
+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_SOURCE_VERSION)
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)
 
 CMAKE_INSTALL:=1
 
@@ -36,7 +37,7 @@ define Package/libsysrepo
   CATEGORY:=Utilities
   URL:=$(PKG_SOURCE_URL)
   TITLE:=YANG-based data store library
-  DEPENDS:=+libyang +libprotobuf-c +libev +libavl
+  DEPENDS:=+libyang +libprotobuf-c +libev +libredblack +librt
 endef
 
 define Package/sysrepo
@@ -69,6 +70,7 @@ endef
 
 CMAKE_OPTIONS += \
        -DCMAKE_BUILD_TYPE:STRING=Release \
+       -DUSE_AVL_LIB:BOOL=FALSE \
        -DENABLE_TESTS:BOOL=FALSE \
        -DBUILD_EXAMPLES:BOOL=FALSE \
        -DCMAKE_DISABLE_FIND_PACKAGE_SWIG=TRUE \
index 50c4bceb7d77caea59d950982e6000b7c0d83a39..cb742cec76d830cbc46e2c6504615859f734e82a 100644 (file)
@@ -1,7 +1,7 @@
-Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/CMakeLists.txt
+Index: sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/CMakeLists.txt
 ===================================================================
---- sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf.orig/src/CMakeLists.txt
-+++ sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/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")
  
@@ -17,11 +17,11 @@ Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/CMakeLists.txt
  
  configure_file("${COMMON_DIR}/sr_constants.h.in" "${COMMON_BIN_DIR}/sr_constants.h" ESCAPE_QUOTES @ONLY)
  
-Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/common/sysrepo.pb-c.c
+Index: sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.c
 ===================================================================
 --- /dev/null
-+++ sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/common/sysrepo.pb-c.c
-@@ -0,0 +1,10517 @@
++++ sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.c
+@@ -0,0 +1,10537 @@
 +/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
 +/* Generated from: sysrepo.proto */
 +
@@ -6518,9 +6518,29 @@ Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/common/sysrepo.pb-c.
 +  (ProtobufCMessageInit) sr__copy_config_req__init,
 +  NULL,NULL,NULL    /* reserved[123] */
 +};
-+#define sr__copy_config_resp__field_descriptors NULL
-+#define sr__copy_config_resp__field_indices_by_name NULL
-+#define sr__copy_config_resp__number_ranges NULL
++static const ProtobufCFieldDescriptor sr__copy_config_resp__field_descriptors[1] =
++{
++  {
++    "errors",
++    1,
++    PROTOBUF_C_LABEL_REPEATED,
++    PROTOBUF_C_TYPE_MESSAGE,
++    offsetof(Sr__CopyConfigResp, n_errors),
++    offsetof(Sr__CopyConfigResp, errors),
++    &sr__error__descriptor,
++    NULL,
++    0,             /* flags */
++    0,NULL,NULL    /* reserved1,reserved2, etc */
++  },
++};
++static const unsigned sr__copy_config_resp__field_indices_by_name[] = {
++  0,   /* field[0] = errors */
++};
++static const ProtobufCIntRange sr__copy_config_resp__number_ranges[1 + 1] =
++{
++  { 1, 0 },
++  { 0, 1 }
++};
 +const ProtobufCMessageDescriptor sr__copy_config_resp__descriptor =
 +{
 +  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
@@ -6529,10 +6549,10 @@ Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/common/sysrepo.pb-c.
 +  "Sr__CopyConfigResp",
 +  "sr",
 +  sizeof(Sr__CopyConfigResp),
-+  0,
++  1,
 +  sr__copy_config_resp__field_descriptors,
 +  sr__copy_config_resp__field_indices_by_name,
-+  0,  sr__copy_config_resp__number_ranges,
++  1,  sr__copy_config_resp__number_ranges,
 +  (ProtobufCMessageInit) sr__copy_config_resp__init,
 +  NULL,NULL,NULL    /* reserved[123] */
 +};
@@ -10539,11 +10559,11 @@ Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/common/sysrepo.pb-c.
 +  sr__operation__value_ranges,
 +  NULL,NULL,NULL,NULL   /* reserved[1234] */
 +};
-Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/common/sysrepo.pb-c.h
+Index: sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.h
 ===================================================================
 --- /dev/null
-+++ sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/common/sysrepo.pb-c.h
-@@ -0,0 +1,4236 @@
++++ sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.h
+@@ -0,0 +1,4238 @@
 +/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
 +/* Generated from: sysrepo.proto */
 +
@@ -10556,7 +10576,7 @@ Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/common/sysrepo.pb-c.
 +
 +#if PROTOBUF_C_VERSION_NUMBER < 1000000
 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
-+#elif 1001001 < PROTOBUF_C_MIN_COMPILER_VERSION
++#elif 1002001 < PROTOBUF_C_MIN_COMPILER_VERSION
 +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
 +#endif
 +
@@ -11770,10 +11790,12 @@ Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/common/sysrepo.pb-c.
 +struct  _Sr__CopyConfigResp
 +{
 +  ProtobufCMessage base;
++  size_t n_errors;
++  Sr__Error **errors;
 +};
 +#define SR__COPY_CONFIG_RESP__INIT \
 + { PROTOBUF_C_MESSAGE_INIT (&sr__copy_config_resp__descriptor) \
-+     }
++    , 0,NULL }
 +
 +
 +/*
diff --git a/net/sysrepo/patches/005-fix-struct-ucred-define b/net/sysrepo/patches/005-fix-struct-ucred-define
new file mode 100644 (file)
index 0000000..1547976
--- /dev/null
@@ -0,0 +1,30 @@
+Index: sysrepo-0.7.0-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sr_utils.c
+===================================================================
+--- sysrepo-0.7.0-7aa2f18d234267403147df92c0005c871f0aa840.orig/src/common/sr_utils.c
++++ sysrepo-0.7.0-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sr_utils.c
+@@ -460,14 +460,24 @@ sr_fd_set_nonblock(int fd)
+ #if defined(SO_PEERCRED)
++#if defined(__GLIBC__)
+ #if !defined(SCM_CREDENTIALS)
+-/* struct ucred is ifdefined behind __USE_GNU, but __USE_GNU is not defined */
+ struct ucred {
+     pid_t pid;    /* process ID of the sending process */
+     uid_t uid;    /* user ID of the sending process */
+     gid_t gid;    /* group ID of the sending process */
+ };
+ #endif /* !defined(SCM_CREDENTIALS) */
++#else
++#if !defined(__USE_GNU)
++struct ucred {
++    pid_t pid;    /* process ID of the sending process */
++    uid_t uid;    /* user ID of the sending process */
++    gid_t gid;    /* group ID of the sending process */
++};
++/* struct ucred is ifdefined behind __USE_GNU, but __USE_GNU is not defined */
++#endif /* !defined(__USE_GNU) */
++#endif /* defined(__GLIBC__) */
+ int
+ sr_get_peer_eid(int fd, uid_t *uid, gid_t *gid)