netopeer2: bump to latest version 5309/head
authorMislav Novakovic <mislav.novakovic@sartura.hr>
Thu, 21 Dec 2017 11:41:02 +0000 (12:41 +0100)
committerMislav Novakovic <mislav.novakovic@sartura.hr>
Thu, 21 Dec 2017 11:43:40 +0000 (12:43 +0100)
This patch add's a new cmakefile which builds other cmakefiles and
simplifies the Makefile, also it renames the yang files so
sysrepoctl does not create duplicates.

Signed-off-by: Mislav Novakovic <mislav.novakovic@sartura.hr>
net/netopeer2/Makefile
net/netopeer2/files/netopeer2-keystored-keygen.default
net/netopeer2/files/netopeer2-keystored.default
net/netopeer2/files/netopeer2-server.default
net/netopeer2/patches/002-fix-for-cmake-build [new file with mode: 0644]

index 25da6cc1dad63a57c29fac5d73784de5bdd20e46..b9f296866996a23bfb74b9602945b3b5e369531b 100644 (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.3
+PKG_VERSION:=0.4.13
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=e7c821cde14df31a03d23293f84e0aed9cb1a457
-PKG_MIRROR_HASH:=88a4c06e9cdb81879de7311138acbfe9fe5207db14fbb93c5ba4d6947d616aec
+PKG_SOURCE_VERSION:=ae560bef2e70d274f6d028b59e3cb398ea2a621d
+PKG_MIRROR_HASH:=43b7f9c436afc76de539a7426b1462249326318b9b836f1d49282106a730a6b8
 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)
@@ -76,40 +76,17 @@ CMAKE_OPTIONS += \
        -DCMAKE_BUILD_TYPE:STRING=Release \
        -DKEYSTORED_KEYS_DIR:STRING=/etc/keystored/keys
 
-define Build/Configure
-       $(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/server)
-       $(call Build/Configure/Default)
-
-       $(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/cli)
-       $(call Build/Configure/Default)
-
-       $(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/keystored)
-       $(call Build/Configure/Default)
-endef
-
-define Build/Compile
-       $(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/server)
-       $(call Build/Compile/Default)
-
-       $(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/cli)
-       $(call Build/Compile/Default)
-
-       $(eval PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)/keystored)
-       $(call Build/Compile/Default)
-endef
-
 define Package/netopeer2-server/install
        $(INSTALL_DIR) $(1)/bin
        $(INSTALL_BIN) $(PKG_BUILD_ROOT)/server/netopeer2-server $(1)/bin/
 
        $(INSTALL_DIR) $(1)/etc/sysrepo/yang
-       $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-ssh-server.yang $(1)/etc/sysrepo/yang/
-       $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-tls-server.yang $(1)/etc/sysrepo/yang/
-       $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/iana-crypt-hash.yang $(1)/etc/sysrepo/yang/
-       $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-x509-cert-to-name.yang $(1)/etc/sysrepo/yang/
-       $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-netconf-server.yang $(1)/etc/sysrepo/yang/
-       $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-netconf-server.yang $(1)/etc/sysrepo/yang/
-       $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-system.yang $(1)/etc/sysrepo/yang/
+       $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-ssh-server.yang $(1)/etc/sysrepo/yang/ietf-ssh-server@2016-11-02.yang
+       $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-tls-server.yang $(1)/etc/sysrepo/yang/ietf-tls-server@2016-11-02.yang
+       $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/iana-crypt-hash.yang $(1)/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang
+       $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-x509-cert-to-name.yang $(1)/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang
+       $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-netconf-server.yang $(1)/etc/sysrepo/yang/ietf-netconf-server@2016-11-02.yang
+       $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-system.yang $(1)/etc/sysrepo/yang/ietf-system@2014-08-06.yang
 
        $(INSTALL_DIR) $(1)/etc/uci-defaults
        $(INSTALL_BIN) ./files/netopeer2-server.default $(1)/etc/uci-defaults/99_netopeer2-server
@@ -131,7 +108,7 @@ define Package/netopeer2-keystored/install
        $(INSTALL_BIN) $(PKG_BUILD_ROOT)/keystored/libkeystored.so $(1)/usr/lib/sysrepo/plugins/
 
        $(INSTALL_DIR) $(1)/etc/sysrepo/yang
-       $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-keystore.yang $(1)/etc/sysrepo/yang
+       $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-keystore.yang $(1)/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang
 
        $(INSTALL_DIR) $(1)/etc/uci-defaults
 
index 6c9c10559d7b259af61850bb52753ce095e25758..df28081c7d59b0e95e9e77da13a9f94370213372 100644 (file)
@@ -3,9 +3,9 @@
 # Warning, problems can occur if the device restarts in the middle of this uci-default script
 
 if [ -x /bin/sysrepoctl ]; then
-       match=$(sysrepoctl -l | grep "ietf-keystore\ ")
+       match=$(sysrepoctl -l | grep "ietf-keystore ")
        if [ ! "$match" ]; then
-               sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore.yang -o root:root -p 600
+               sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang -o root:root -p 600
                if [ -x /bin/sysrepocfg ]; then
                        sysrepocfg -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
                        rm /usr/share/netopeer2-keystored/stock_key_config.xml
index 9faeedc2215aea400ec0a2a757cb9369bca7261c..dda6f4517b3a8b12ec25983c818fc06ed3fe7281 100644 (file)
@@ -3,9 +3,9 @@
 # Warning, problems can occur if the device restarts in the middle of this uci-default script
 
 if [ -x /bin/sysrepoctl ]; then
-       match=$(sysrepoctl -l | grep "ietf-keystore\ ")
+       match=$(sysrepoctl -l | grep "ietf-keystore ")
        if [ ! "$match" ]; then
-               sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore.yang -o root:root -p 600
+               sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang -o root:root -p 600
                if [ -x /bin/sysrepocfg ]; then
                        sysrepocfg -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
                        rm /usr/share/netopeer2-keystored/stock_key_config.xml
index d2a699bb1389d25cb831ccc6ff59c53192a646bc..8a7b7fe7e1215d72b9d93e3b5739cc31e4081d74 100644 (file)
@@ -3,29 +3,29 @@
 # Warning, problems can occur if the device restarts in the middle of this uci-default script
 
 if [ -x /bin/sysrepoctl ]; then
-       match=$(sysrepoctl -l | grep "ietf-ssh-server\ ")
+       match=$(sysrepoctl -l | grep "ietf-ssh-server ")
        if [ ! "$match" ]; then
-               sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-ssh-server.yang -p 600
+               sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-ssh-server@2016-11-02.yang -p 600
        fi
 
-       match=$(sysrepoctl -l | grep "ietf-tls-server\ ")
+       match=$(sysrepoctl -l | grep "ietf-tls-server ")
        if [ ! "$match" ]; then
-               sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-tls-server.yang -p 600
+               sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-tls-server@2016-11-02.yang -p 600
        fi
 
-       match=$(sysrepoctl -l | grep "iana-crypt-hash\ ")
+       match=$(sysrepoctl -l | grep "iana-crypt-hash ")
        if [ ! "$match" ]; then
-               sysrepoctl --install --yang=/etc/sysrepo/yang/iana-crypt-hash.yang -p 600
+               sysrepoctl --install --yang=/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang -p 600
        fi
 
-       match=$(sysrepoctl -l | grep "ietf-x509-cert-to-name\ ")
+       match=$(sysrepoctl -l | grep "ietf-x509-cert-to-name ")
        if [ ! "$match" ]; then
-               sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-x509-cert-to-name.yang -p 600
+               sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang -p 600
        fi
 
-       match=$(sysrepoctl -l | grep "ietf-netconf-server\ ")
+       match=$(sysrepoctl -l | grep "ietf-netconf-server ")
        if [ ! "$match" ]; then
-               sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-server.yang -o root:root -p 600
+               sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-server@2016-11-02.yang -o root:root -p 600
                sysrepoctl -m ietf-netconf-server -e listen
                sysrepoctl -m ietf-netconf-server -e ssh-listen
                if [ -x /bin/sysrepocfg ]; then
@@ -34,9 +34,9 @@ if [ -x /bin/sysrepoctl ]; then
                fi
        fi
 
-       match=$(sysrepoctl -l | grep "ietf-system\ ")
+       match=$(sysrepoctl -l | grep "ietf-system ")
        if [ ! "$match" ]; then
-               sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-system.yang -o root:root -p 600
+               sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-system@2014-08-06.yang -o root:root -p 600
                sysrepoctl -m ietf-system -e authentication
                sysrepoctl -m ietf-system -e local-users
        fi
diff --git a/net/netopeer2/patches/002-fix-for-cmake-build b/net/netopeer2/patches/002-fix-for-cmake-build
new file mode 100644 (file)
index 0000000..bd29d4d
--- /dev/null
@@ -0,0 +1,58 @@
+Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
+===================================================================
+--- /dev/null
++++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/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
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 2.6)
+ # include custom Modules
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
+ project(netopeer2-cli C)
+ include(GNUInstallDirs)
+@@ -83,7 +83,7 @@ endif()
+ install(FILES ${PROJECT_SOURCE_DIR}/doc/${PROJECT_NAME}.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+ # clean cmake cache
+-add_custom_target(cleancache
++add_custom_target(cleancache_cli
+                   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
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 2.6)
+ # include custom Modules
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
+ project(keystored C)
+ include(GNUInstallDirs)
+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
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 2.8.9)
+ # include custom Modules
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
+ project(netopeer2-server C)
+ include(GNUInstallDirs)