Skip to content

Commit 73bbfab

Browse files
committed
Merge branch 'devel'
2 parents c87d112 + 9ba9006 commit 73bbfab

18 files changed

Lines changed: 1345 additions & 1315 deletions

CMakeLists.txt

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ include(GNUInstallDirs)
44
include(CheckFunctionExists)
55
include(CheckCSourceCompiles)
66
include(CheckIncludeFile)
7+
if(POLICY CMP0075)
8+
cmake_policy(SET CMP0075 NEW)
9+
endif()
710

811
# include custom Modules
912
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
@@ -31,12 +34,23 @@ set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
3134
set(CMAKE_C_FLAGS_PACKAGE "-g -O2 -DNDEBUG")
3235
set(CMAKE_C_FLAGS_DEBUG "-g -O0")
3336

34-
# set version
35-
set(LIBNETCONF2_MAJOR_VERSION 0)
36-
set(LIBNETCONF2_MINOR_VERSION 12)
37-
set(LIBNETCONF2_MICRO_VERSION 64)
37+
# Version of the project
38+
# Generic version of not only the library. Major version is reserved for really big changes of the project,
39+
# minor version changes with added functionality (new tool, functionality of the tool or library, ...) and
40+
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
41+
set(LIBNETCONF2_MAJOR_VERSION 1)
42+
set(LIBNETCONF2_MINOR_VERSION 1)
43+
set(LIBNETCONF2_MICRO_VERSION 3)
3844
set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION})
39-
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
45+
46+
# Version of the library
47+
# Major version is changed with every backward non-compatible API/ABI change in libyang, minor version changes
48+
# with backward compatible change and micro version is connected with any internal change of the library.
49+
set(LIBNETCONF2_MAJOR_SOVERSION 1)
50+
set(LIBNETCONF2_MINOR_SOVERSION 1)
51+
set(LIBNETCONF2_MICRO_SOVERSION 3)
52+
set(LIBNETCONF2_SOVERSION_FULL ${LIBNETCONF2_MAJOR_SOVERSION}.${LIBNETCONF2_MINOR_SOVERSION}.${LIBNETCONF2_MICRO_SOVERSION})
53+
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_SOVERSION})
4054

4155
# build options
4256
option(ENABLE_SSH "Enable NETCONF over SSH support (via libssh)" ON)
@@ -113,7 +127,7 @@ else ()
113127
endif()
114128

115129
if (NOT RPM_BUILDER)
116-
message(WARNING "Missing tools (rpm package) for building rpm package. \nYou won't be able to generate rpm package from source code.\nCompiling libnetconf2 should still works fine.")
130+
message(WARNING "Missing tools (rpm package) for building rpm package. \nYou won't be able to generate rpm package from source code.\nCompiling libnetconf2 should still work fine.")
117131
else ()
118132
# target for local build rpm package
119133
string(REPLACE ${PROJECT_SOURCE_DIR} "." EXCLUDE_BUILD_DIR ${PROJECT_BINARY_DIR})
@@ -164,7 +178,7 @@ set(headers
164178

165179
# libnetconf2 target
166180
add_library(netconf2 SHARED ${libsrc})
167-
set_target_properties(netconf2 PROPERTIES VERSION ${LIBNETCONF2_VERSION} SOVERSION ${LIBNETCONF2_SOVERSION})
181+
set_target_properties(netconf2 PROPERTIES VERSION ${LIBNETCONF2_VERSION} SOVERSION ${LIBNETCONF2_SOVERSION_FULL})
168182

169183
if((CMAKE_BUILD_TYPE STREQUAL debug) OR (CMAKE_BUILD_TYPE STREQUAL Package))
170184
option(ENABLE_BUILD_TESTS "Build tests" ON)
@@ -207,16 +221,9 @@ if(ENABLE_SSH)
207221
endif()
208222
include_directories(${LIBSSH_INCLUDE_DIRS})
209223

210-
set(LIBSSH_SESSION_OPTION_CHECK_CODE
211-
"#include <libssh/libssh.h>
212-
int main(void) {
213-
ssh_session sess;
214-
ssh_options_set(sess, SSH_OPTIONS_PUBLICKEY_ACCEPTED_TYPES, NULL);
215-
return 0;
216-
}"
217-
)
218-
219-
check_c_source_compiles("${LIBSSH_SESSION_OPTION_CHECK_CODE}" HAVE_LIBSSH_OPTIONS_PUBLICKEY_ACCEPTED_TYPES)
224+
if(LibSSH_VERSION VERSION_GREATER 0.8.2)
225+
set(HAVE_LIBSSH_OPTIONS_PUBLICKEY_ACCEPTED_TYPES 1)
226+
endif()
220227
endif()
221228

222229
# dependencies - libval

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ another basic building block for the [**Netopeer2** toolset](https://github.com/
3333
For a reference implementation of NETCONF client and server, check the
3434
**Netopeer2** project.
3535

36+
## Branches
37+
38+
The project uses 2 main branches `master` and `devel`. Other branches should not be cloned. In `master` there are files of the
39+
last official *release*. Any latest improvements and changes, which were tested at least briefly are found in `devel`. On every
40+
new *release*, `devel` is merged into `master`.
41+
42+
This means that when only stable official releases are to be used, either `master` can be used or specific *releases* downloaded.
43+
If all the latest bugfixes should be applied, `devel` branch is the one to be used. Note that whenever **a new issue is created**
44+
and it occurs on the `master` branch, the **first response will likely be** to use `devel` before any further provided support.
45+
3646
## libnetconf vs libnetconf2
3747

3848
**libnetconf2** is being developed with experiences gained from the development
@@ -45,7 +55,7 @@ of them is more suitable for your needs.
4555
To represent the schema and data trees, **libnetconf** uses libxml2, which is
4656
intended for different purposes - schema and data trees connected with YANG
4757
have specific needs and restrictions in comparison to more generic XML.
48-
Therefore, in **libnetconf2**, we have completely replaced libxml2 by
58+
Therefore, in **libnetconf2**, we have completely replaced libxml2 by
4959
[libyang](https://github.com/CESNET/libyang). It is much more efficient in work
5060
with YANG modeled data (which is the case of NETCONF messages) and this advantage
5161
then applies also to **libnetconf2**. The library connects data with the YANG

0 commit comments

Comments
 (0)