sysrepo: Update to 0.7.8
authorRosen Penev <redacted>
Mon, 15 Jul 2019 22:41:20 +0000 (15:41 -0700)
committerRosen Penev <redacted>
Mon, 4 Nov 2019 20:05:27 +0000 (12:05 -0800)
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 <redacted>
net/sysrepo/Makefile
net/sysrepo/patches/001-add-generated-protobufc-files.patch [moved from net/sysrepo/patches/001-add-generated-protobufc-files with 100% similarity]
net/sysrepo/patches/002-remove-buildtime-module-install.patch [moved from net/sysrepo/patches/002-remove-buildtime-module-install with 72% similarity]
net/sysrepo/patches/004-disable-sysrepod-autostart.patch [moved from net/sysrepo/patches/004-disable-sysrepod-autostart with 92% similarity]
net/sysrepo/patches/005-fix-struct-ucred-define.patch [moved from net/sysrepo/patches/005-fix-struct-ucred-define with 87% similarity]
net/sysrepo/patches/006-update-generated-protobufc-files.patch [moved from net/sysrepo/patches/006-update-generated-protobufc-files with 81% similarity]

index 9db5fd5daa4e60a8a1aa31d029af05175180b222..a5578ef6b98ce6d8445da52e91806dcfbf00090a 100644 (file)
@@ -8,21 +8,20 @@
 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
@@ -34,11 +33,9 @@ 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
@@ -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 \
@@ -173,17 +168,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))
similarity index 72%
rename from net/sysrepo/patches/002-remove-buildtime-module-install
rename to net/sysrepo/patches/002-remove-buildtime-module-install.patch
index 5ca818b2fed2049d60071847c2de911a20f2f490..2a703bbe89c0123f39823a9e7a65f0a8abd53345 100644 (file)
@@ -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()
  
similarity index 92%
rename from net/sysrepo/patches/004-disable-sysrepod-autostart
rename to net/sysrepo/patches/004-disable-sysrepod-autostart.patch
index a70113771faa019a1fe0c6f1a2811e23c38c56fe..255b4ad673a47f6817077965ffbd3af5415892bc 100644 (file)
@@ -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 */
similarity index 87%
rename from net/sysrepo/patches/005-fix-struct-ucred-define
rename to net/sysrepo/patches/005-fix-struct-ucred-define.patch
index 9de4e2ed88a27960730d9f0105b0a38970506d8b..4c5966de1514f5dcc4f8a837b40511a3a88e91b4 100644 (file)
@@ -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)
  
  };
  #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
similarity index 81%
rename from net/sysrepo/patches/006-update-generated-protobufc-files
rename to net/sysrepo/patches/006-update-generated-protobufc-files.patch
index 093fc415499ceb0d6a82494e0a79f85facaed2c8..dbb4288e63b5a2e63229cadb9ba466b1e3febf5d 100644 (file)
@@ -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),
git clone https://git.99rst.org/PROJECT