sysrepo: Update to 0.7.8

Makefile cleanups for consistency between packages.

Placed libsysrepo in Libraries instead of Utilities.

Removed InstallDev as it is implied by CMAKE_INSTALL.

Added .patch at the end of patch files.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2019-07-15 15:41:20 -07:00
parent b5132ef780
commit 98c04e04c4
6 changed files with 18 additions and 34 deletions

View file

@ -8,21 +8,20 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=sysrepo PKG_NAME:=sysrepo
PKG_VERSION:=0.7.7 PKG_VERSION:=0.7.8
PKG_RELEASE:=5 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/sysrepo/sysrepo/tar.gz/v$(PKG_VERSION)? 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_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
PKG_LICENSE:=Apache-2.0 PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE PKG_LICENSE_FILES:=LICENSE
CMAKE_INSTALL:=1 CMAKE_INSTALL:=1
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1 PKG_BUILD_DEPENDS:=SYSREPO_BINDINGS:swig/host
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk include $(INCLUDE_DIR)/cmake.mk
@ -34,11 +33,9 @@ define Package/libsysrepo/config
source "$(SOURCE)/Config_libsysrepo.in" source "$(SOURCE)/Config_libsysrepo.in"
endef endef
PKG_BUILD_DEPENDS:=SYSREPO_BINDINGS:swig/host
define Package/libsysrepo define Package/libsysrepo
SECTION:=utils SECTION:=libs
CATEGORY:=Utilities CATEGORY:=Libraries
TITLE:=YANG-based data store library TITLE:=YANG-based data store library
URL:=https://www.sysrepo.org/ 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:python-base +SYSREPO_LUA:lua
@ -74,7 +71,6 @@ Sysrepo is an YANG-based configuration and operational state data store for Unix
endef endef
CMAKE_OPTIONS += \ CMAKE_OPTIONS += \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DUSE_AVL_LIB:BOOL=FALSE \ -DUSE_AVL_LIB:BOOL=FALSE \
-DENABLE_TESTS:BOOL=FALSE \ -DENABLE_TESTS:BOOL=FALSE \
-DBUILD_EXAMPLES:BOOL=FALSE \ -DBUILD_EXAMPLES:BOOL=FALSE \
@ -83,7 +79,6 @@ CMAKE_OPTIONS += \
-DGEN_PYTHON_BINDINGS=0 \ -DGEN_PYTHON_BINDINGS=0 \
-DGEN_LUA_BINDINGS=0 \ -DGEN_LUA_BINDINGS=0 \
-DREPOSITORY_LOC:PATH=/etc/sysrepo \ -DREPOSITORY_LOC:PATH=/etc/sysrepo \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DENABLE_NACM:BOOL=FALSE \ -DENABLE_NACM:BOOL=FALSE \
-DREQUEST_TIMEOUT=6 \ -DREQUEST_TIMEOUT=6 \
-DLONG_REQUEST_TIMEOUT=30 \ -DLONG_REQUEST_TIMEOUT=30 \
@ -173,17 +168,6 @@ define Package/sysrepocfg/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sysrepocfg $(1)/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sysrepocfg $(1)/bin/
endef 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,libsysrepo))
$(eval $(call BuildPackage,sysrepo)) $(eval $(call BuildPackage,sysrepo))
$(eval $(call BuildPackage,sysrepoctl)) $(eval $(call BuildPackage,sysrepoctl))

View file

@ -1,15 +1,15 @@
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/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 # install NACM YANG module
if(ENABLE_NACM) 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") +# INSTALL_YANG("ietf-netconf-acm" "@2018-02-14" "644")
endif(ENABLE_NACM) endif(ENABLE_NACM)
find_package(PkgConfig QUIET) # generate and install pkg-config file
@@ -334,9 +334,9 @@ if(WITH_SYSTEMD) @@ -356,9 +356,9 @@ if(WITH_SYSTEMD)
FILES_MATCHING PATTERN "*.service") FILES_MATCHING PATTERN "*.service")
endif() endif()

View file

@ -1,6 +1,6 @@
--- a/src/clientlib/client_library.c --- a/src/clientlib/client_library.c
+++ b/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_REQUIRED) {
if ((opts & SR_CONN_DAEMON_START) && (0 == getuid())) { 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 */

View file

@ -1,6 +1,6 @@
--- a/src/common/sr_utils.c --- a/src/common/sr_utils.c
+++ b/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) #if defined(SO_PEERCRED)
@ -14,14 +14,14 @@
}; };
#endif /* !defined(SCM_CREDENTIALS) */ #endif /* !defined(SCM_CREDENTIALS) */
+#else +#else
+#if !defined(__USE_GNU) +#if !defined(_GNU_SOURCE)
+struct ucred { +struct ucred {
+ pid_t pid; /* process ID of the sending process */ + pid_t pid; /* process ID of the sending process */
+ uid_t uid; /* user ID of the sending process */ + uid_t uid; /* user ID of the sending process */
+ gid_t gid; /* group 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 */ +/* struct ucred is ifdefined behind __USE_GNU, but __USE_GNU is not defined */
+#endif /* !defined(__USE_GNU) */ +#endif /* !defined(__GNU_SOURCE) */
+#endif /* defined(__GLIBC__) */ +#endif /* defined(__GLIBC__) */
int int

View file

@ -1,6 +1,6 @@
--- a/src/common/sysrepo.pb-c.c --- a/src/common/sysrepo.pb-c.c
+++ b/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, (ProtobufCMessageInit) sr__event_notif_replay_resp__init,
NULL,NULL,NULL /* reserved[123] */ NULL,NULL,NULL /* reserved[123] */
}; };
@ -9,7 +9,7 @@
{ {
{ {
"xpath", "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, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */ 0,NULL,NULL /* reserved1,reserved2, etc */
}, },
@ -31,7 +31,7 @@
3, /* field[3] = request_id */ 3, /* field[3] = request_id */
1, /* field[1] = subscriber_address */ 1, /* field[1] = subscriber_address */
2, /* field[2] = subscription_id */ 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 }, { 1, 0 },
{ 10, 1 }, { 10, 1 },
{ 20, 3 }, { 20, 3 },
@ -40,7 +40,7 @@
}; };
const ProtobufCMessageDescriptor sr__data_provide_req__descriptor = 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__DataProvideReq",
"sr", "sr",
sizeof(Sr__DataProvideReq), sizeof(Sr__DataProvideReq),