Merge pull request #9491 from neheb/bundle

Netopeer2 Bundle
This commit is contained in:
Rosen Penev
2019-11-07 10:45:52 -08:00
committed by GitHub
15 changed files with 69 additions and 304 deletions
+4 -6
View File
@@ -10,19 +10,19 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=Netopeer2
PKG_VERSION:=0.7-r1
PKG_RELEASE:=3
PKG_VERSION:=0.7-r2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/CESNET/Netopeer2/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=040013d1e315c62c496b704475665165578c374ffb387cbbff422cf8898d3a12
PKG_HASH:=59688271be4fecbbee671fc7eb3dc0538b13b4baab53e923e26eaeb33e6f7ec0
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_PARALLEL:=1
CMAKE_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
@@ -65,8 +65,6 @@ define Package/netopeer2/description
endef
CMAKE_OPTIONS += \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DKEYSTORED_KEYS_DIR:STRING=/etc/keystored/keys \
-DENABLE_CONFIGURATION:BOOL=OFF \
-DMODEL_INSTALL:BOOL=OFF \
@@ -1,17 +1,13 @@
Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
===================================================================
--- /dev/null
+++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
+++ b/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
===================================================================
--- Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/cli/CMakeLists.txt
+++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
--- a/cli/CMakeLists.txt
+++ b/cli/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.6)
@@ -21,7 +17,7 @@ Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.
project(netopeer2-cli C)
include(GNUInstallDirs)
@@ -83,7 +83,7 @@ endif()
@@ -84,7 +84,7 @@ endif()
install(FILES ${PROJECT_SOURCE_DIR}/doc/${PROJECT_NAME}.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
# clean cmake cache
@@ -30,10 +26,8 @@ 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
===================================================================
--- Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/keystored/CMakeLists.txt
+++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
--- a/keystored/CMakeLists.txt
+++ b/keystored/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.6)
@@ -43,7 +37,7 @@ Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMake
project(keystored C)
include(GNUInstallDirs)
@@ -140,7 +140,7 @@ if (SSH_KEY_INSTALL)
@@ -147,7 +147,7 @@ if (SSH_KEY_INSTALL)
execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ssh-key-import.sh)")
endif()
@@ -52,10 +46,8 @@ 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
===================================================================
--- Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/server/CMakeLists.txt
+++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
--- a/server/CMakeLists.txt
+++ b/server/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.8.9)
@@ -65,11 +57,12 @@ Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLis
project(netopeer2-server C)
include(GNUInstallDirs)
@@ -204,7 +204,7 @@ if (ENABLE_CONFIGURATION)
@@ -208,7 +208,7 @@ if (ENABLE_CONFIGURATION)
execute_process(COMMAND ${PROJECT_BINARY_DIR}/model-install.sh)")
endif()
-add_custom_target(install-scripts-ide
+add_custom_target(install-scripts-ide-server
${PROJECT_BINARY_DIR}/model-install.sh
)
@@ -1,7 +1,5 @@
Index: Netopeer2-0.6-r1/keystored/CMakeLists.txt
===================================================================
--- Netopeer2-0.6-r1.orig/keystored/CMakeLists.txt
+++ Netopeer2-0.6-r1/keystored/CMakeLists.txt
--- a/keystored/CMakeLists.txt
+++ b/keystored/CMakeLists.txt
@@ -69,6 +69,8 @@ find_package(SYSREPO REQUIRED)
target_link_libraries(keystored ${SYSREPO_LIBRARIES})
include_directories(${SYSREPO_INCLUDE_DIRS})
@@ -11,7 +9,7 @@ Index: Netopeer2-0.6-r1/keystored/CMakeLists.txt
# get sysrepo plugins directory
if (NOT SR_PLUGINS_DIR)
if (PKG_CONFIG_FOUND)
@@ -154,3 +156,4 @@ add_custom_target(install-scripts-ide-ke
@@ -154,3 +156,4 @@ add_custom_target(install-scripts-ide
# plugins should be installed into sysrepo plugins dir
install(TARGETS keystored DESTINATION ${SR_PLUGINS_DIR})
@@ -1,14 +0,0 @@
--- a/cli/commands.c
+++ b/cli/commands.c
@@ -1659,7 +1659,11 @@ parse_cert(const char *name, const char *path)
BIO_printf(bio_out, "\n");
BIO_printf(bio_out, "Valid until: ");
+#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
ASN1_TIME_print(bio_out, X509_get_notAfter(cert));
+#else
+ ASN1_TIME_print(bio_out, X509_get0_notAfter(cert));
+#endif
BIO_printf(bio_out, "\n");
has_san = 0;
+12 -27
View File
@@ -8,40 +8,37 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sysrepo
PKG_VERSION:=0.7.7
PKG_RELEASE:=5
PKG_VERSION:=0.7.8
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/sysrepo/sysrepo/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=2bf8cb4d810d19231eba1e549f58f3a0ce068d170a5e7b212b927396098560e4
PKG_HASH:=d3066c1776a6727b96bbb3517eb646d0bb6037e8e1addcbe873cae590493843e
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
CMAKE_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_BUILD_DEPENDS:=SYSREPO_BINDINGS:swig/host
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
ifeq ($(CONFIG_SYSREPO_PYTHON),y)
$(call include_mk, python-package.mk)
$(call include_mk, python3-package.mk)
endif
define Package/libsysrepo/config
source "$(SOURCE)/Config_libsysrepo.in"
endef
PKG_BUILD_DEPENDS:=SYSREPO_BINDINGS:swig/host
define Package/libsysrepo
SECTION:=utils
CATEGORY:=Utilities
SECTION:=libs
CATEGORY:=Libraries
TITLE:=YANG-based data store library
URL:=https://www.sysrepo.org/
DEPENDS:=+libyang +libprotobuf-c +libev +libredblack +librt +libpthread +SYSREPO_BINDINGS:libstdcpp +SYSREPO_PYTHON:python-base +SYSREPO_LUA:lua
DEPENDS:=+libyang +libprotobuf-c +libev +libredblack +librt +libpthread +SYSREPO_BINDINGS:libstdcpp +SYSREPO_PYTHON:python3-base +SYSREPO_LUA:lua
MENU:=1
endef
@@ -74,7 +71,6 @@ Sysrepo is an YANG-based configuration and operational state data store for Unix
endef
CMAKE_OPTIONS += \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DUSE_AVL_LIB:BOOL=FALSE \
-DENABLE_TESTS:BOOL=FALSE \
-DBUILD_EXAMPLES:BOOL=FALSE \
@@ -83,7 +79,6 @@ CMAKE_OPTIONS += \
-DGEN_PYTHON_BINDINGS=0 \
-DGEN_LUA_BINDINGS=0 \
-DREPOSITORY_LOC:PATH=/etc/sysrepo \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DENABLE_NACM:BOOL=FALSE \
-DREQUEST_TIMEOUT=6 \
-DLONG_REQUEST_TIMEOUT=30 \
@@ -103,7 +98,8 @@ endif
ifeq ($(CONFIG_SYSREPO_PYTHON),y)
CMAKE_OPTIONS += \
-DGEN_PYTHON_BINDINGS:BOOL=TRUE \
-DGEN_PYTHON_VERSION=2
-DGEN_PYTHON_VERSION=3 \
-DGEN_PYTHON3_TESTS:BOOL=FALSE
endif
ifeq ($(CONFIG_SYSREPO_BINDINGS),y)
@@ -141,8 +137,8 @@ ifeq ($(CONFIG_SYSREPO_PYTHON),y)
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/swig/libSysrepo-cpp.so* $(1)/usr/lib
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
$(INSTALL_DATA) $(PKG_BUILD_DIR)/swig/python2/libsysrepoPython2.py $(1)$(PYTHON_PKG_DIR)
$(INSTALL_DATA) $(PKG_BUILD_DIR)/swig/python2/_libsysrepoPython2.so $(1)$(PYTHON_PKG_DIR)
$(INSTALL_DATA) $(PKG_BUILD_DIR)/swig/python3/libsysrepoPython3.py $(1)$(PYTHON_PKG_DIR)
$(INSTALL_DATA) $(PKG_BUILD_DIR)/swig/python3/_libsysrepoPython3.so $(1)$(PYTHON_PKG_DIR)
endif
ifeq ($(CONFIG_SYSREPO_LUA),y)
@@ -173,17 +169,6 @@ 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,15 +1,15 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -310,7 +310,7 @@ install (FILES ${INTERNAL_YANGS} DESTINA
@@ -335,7 +335,7 @@ install (FILES ${INTERNAL_YANGS} DESTINATION ${INTERNAL_SCHEMA_SEARCH_DIR})
# install NACM YANG module
if(ENABLE_NACM)
- INSTALL_YANG("ietf-netconf-acm" "@2018-02-14" "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)
@@ -334,9 +334,9 @@ if(WITH_SYSTEMD)
# generate and install pkg-config file
@@ -356,9 +356,9 @@ if(WITH_SYSTEMD)
FILES_MATCHING PATTERN "*.service")
endif()
@@ -1,6 +1,6 @@
--- a/src/clientlib/client_library.c
+++ b/src/clientlib/client_library.c
@@ -396,13 +396,13 @@ sr_connect(const char *app_name, const s
@@ -396,13 +396,13 @@ sr_connect(const char *app_name, const sr_conn_options_t opts, sr_conn_ctx_t **c
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 */
@@ -1,6 +1,6 @@
--- a/src/common/sr_utils.c
+++ b/src/common/sr_utils.c
@@ -477,14 +477,24 @@ sr_fd_set_nonblock(int fd)
@@ -506,14 +506,24 @@ sr_fd_set_nonblock(int fd)
#if defined(SO_PEERCRED)
@@ -14,14 +14,14 @@
};
#endif /* !defined(SCM_CREDENTIALS) */
+#else
+#if !defined(__USE_GNU)
+#if !defined(_GNU_SOURCE)
+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(__GNU_SOURCE) */
+#endif /* defined(__GLIBC__) */
int
@@ -1,6 +1,6 @@
--- a/src/common/sysrepo.pb-c.c
+++ b/src/common/sysrepo.pb-c.c
@@ -8013,7 +8013,7 @@ const ProtobufCMessageDescriptor sr__eve
@@ -8013,7 +8013,7 @@ const ProtobufCMessageDescriptor sr__event_notif_replay_resp__descriptor =
(ProtobufCMessageInit) sr__event_notif_replay_resp__init,
NULL,NULL,NULL /* reserved[123] */
};
@@ -9,7 +9,7 @@
{
{
"xpath",
@@ -8063,8 +8063,21 @@ static const ProtobufCFieldDescriptor sr
@@ -8063,8 +8063,21 @@ static const ProtobufCFieldDescriptor sr__data_provide_req__field_descriptors[4]
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
@@ -31,7 +31,7 @@
3, /* field[3] = request_id */
1, /* field[1] = subscriber_address */
2, /* field[2] = subscription_id */
@@ -8075,7 +8088,7 @@ static const ProtobufCIntRange sr__data_
@@ -8075,7 +8088,7 @@ static const ProtobufCIntRange sr__data_provide_req__number_ranges[3 + 1] =
{ 1, 0 },
{ 10, 1 },
{ 20, 3 },
@@ -40,7 +40,7 @@
};
const ProtobufCMessageDescriptor sr__data_provide_req__descriptor =
{
@@ -8085,7 +8098,7 @@ const ProtobufCMessageDescriptor sr__dat
@@ -8085,7 +8098,7 @@ const ProtobufCMessageDescriptor sr__data_provide_req__descriptor =
"Sr__DataProvideReq",
"sr",
sizeof(Sr__DataProvideReq),