From e8ae628d0695cf98214911e1b44a262a69f54cf8 Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Wed, 1 Jan 2020 12:16:32 +0100 Subject: [PATCH] 4.3.0 commit --- CHANGELOG.md | 38 +++++++++++++++++++++----------------- configure | 8 ++++---- configure.ac | 2 +- doc/DEVELOP.md | 2 +- include/clixon_config.h.in | 2 +- test/lib.sh | 4 ++-- test/mem.sh | 8 ++++---- 7 files changed, 34 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdd98395..6ce3d157 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,24 +1,12 @@ # Clixon Changelog -## 4.3.0 (Expected: December 2019) +## 4.3.0 (1 January 2020) -### Minor changes -* C-API: Added `xpath_first_localonly()` as an xpath function that skips prefix and namespace checks. -* Added experimental code for optimizing XPath search using binary search. - * Enable with XPATH_LIST_OPTIMIZE in include/clixon_custom.h - * Optimizes xpaths on the form: `a[b=c]` on sorted, yangified config lists. -* Removed most assert.h includes -* Created two sub-files (clixon_validate.c and clixon_api_path.c) from large lib/src/clixon_xml_map.c source file. -* Added "canonical" global namespace context: `nsctx_global` - * This is a normalized XML prefix:namespace pair vector computed from all loaded Yang modules. Useful when writing XML and XPATH expressions in callbacks. - * Get it with `clicon_nsctx_global_get(h)` -* Added wildcard `*` as a mode to `CLICON_MODE` in clispec files - * If you set "CLICON_MODE="*";" in a clispec file it means that syntax will appear in all CLI spec modes. -* State callbacks provided by user are validated. If they are invalid an internal error is returned, example, with error-tag: `operation-failed`and with error-message containing. `Internal error, state callback returned invalid XML`. -* Fixed multi-namespace for augmented state which was not covered in 4.2.0. +There were several issues with multiple namespaces with augmented yangs in 4.2 that have been fixed in 4.3. Some other highlights include: several issues with XPaths including "canonical namespace context" support, a reorganization of the YANG files shipped with the release, and a wildchar in the CLICON_MODE variable. ### API changes on existing features (you may need to change your code) -* Yang files reorganized into three classes: clixon, mandatory, optional (previous "standard" split into mandatory and optional). +* Yang files shipped with Clixon are reorganized into three classes: clixon, mandatory, optional, this is to enable users more flexibility in intergating with their own YANG files. + * Previously there was only "standard" and "clixon", "standard" is now split into mandatory and optional. * Clixon and mandatory yang spec are always installed * Optional yang files are loaded only if configured with `--enable-optyangs` (flipped logic and changed from `disable-stdyangs`). NOTE: you must do this to run examples and tests. * Optional yang files can be installed in a separate dir with `--with-opt-yang-installdir=DIR` (renamed from `with-std-yang-installdir`) @@ -29,6 +17,22 @@ xpath_first_nsc` are removed). * Added clicon_handle as parameter to all `clicon_connect_` functions to get better error message * Added nsc parameter to `xmldb_get()` * The multi-namespace augment state may rearrange the XML namespace attributes. + +### Minor changes +* Added experimental code for optimizing XPath search using binary search. + * Enable with XPATH_LIST_OPTIMIZE in include/clixon_custom.h + * Optimizes xpaths on the form: `a[b=c]` on sorted, yangified config lists. +* Added "canonical" global namespace context: `nsctx_global` + * This is a normalized XML prefix:namespace pair vector computed from all loaded Yang modules. Useful when writing XML and XPATH expressions in callbacks. + * Get it with `clicon_nsctx_global_get(h)` +* Added wildcard `*` as a mode to `CLICON_MODE` in clispec files + * If you set "CLICON_MODE="*";" in a clispec file it means that syntax will appear in all CLI spec modes. +* State callbacks provided by user are validated. If they are invalid an internal error is returned, example, with error-tag: `operation-failed`and with error-message containing. `Internal error, state callback returned invalid XML`. +* C-code: + * Added `xpath_first_localonly()` as an xpath function that skips prefix and namespace checks. + * Removed most assert.h includes + * Created two sub-files (clixon_validate.c and clixon_api_path.c) from large lib/src/clixon_xml_map.c source file. +* Fixed multi-namespace for augmented state which was not covered in 4.2.0. * Main example yang changed to incorporate augmented state, new revision is 2019-11-15. ### Corrected Bugs @@ -39,7 +43,7 @@ xpath_first_nsc` are removed). * Mandatory variables can no longer be deleted. * [Add missing includes](https://github.com/clicon/clixon/pulls) -## 4.2.0 (October 27 2019) +## 4.2.0 (27 October 2019) ### Summary diff --git a/configure b/configure index e0146b78..c7b411dd 100755 --- a/configure +++ b/configure @@ -1355,8 +1355,8 @@ Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-debug Build with debug symbols, default: no - --enable-optyangs Include standard yang files in clixon install, - default: no + --enable-optyangs Include optional yang files for examples and testing + in clixon install, default: no --enable-publish Enable publish of notification streams using SSE and curl @@ -1369,7 +1369,7 @@ Optional Packages: --with-configfile=FILE set default path to config file --with-libxml2 use gnome/libxml2 regex engine --with-yang-installdir=DIR Install Clixon yang files here (default: ${prefix}/share/clixon) - --with-opt-yang-installdir=DIR Install standard yang files here (default: ${prefix}/share/clixon) + --with-opt-yang-installdir=DIR Install optional yang files here (default: ${prefix}/share/clixon) Some influential environment variables: CC C compiler command @@ -2174,7 +2174,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu CLIXON_VERSION_MAJOR="4" CLIXON_VERSION_MINOR="3" CLIXON_VERSION_PATCH="0" -CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}.PRE\"" +CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}\"" # Check CLIgen if test "$prefix" = "NONE"; then diff --git a/configure.ac b/configure.ac index e82bf576..7b5fbc70 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,7 @@ AC_INIT(lib/clixon/clixon.h.in) CLIXON_VERSION_MAJOR="4" CLIXON_VERSION_MINOR="3" CLIXON_VERSION_PATCH="0" -CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}.PRE\"" +CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}\"" # Check CLIgen if test "$prefix" = "NONE"; then diff --git a/doc/DEVELOP.md b/doc/DEVELOP.md index 834c1e58..bc88a7f7 100644 --- a/doc/DEVELOP.md +++ b/doc/DEVELOP.md @@ -110,7 +110,7 @@ What to think about when doing a new release. * Run autoconf * Git stuff: ``` - git tag -a git push origin ``` diff --git a/include/clixon_config.h.in b/include/clixon_config.h.in index 8db6aade..7fe2b941 100644 --- a/include/clixon_config.h.in +++ b/include/clixon_config.h.in @@ -63,7 +63,7 @@ /* Define to 1 if you have the `sigvec' function. */ #undef HAVE_SIGVEC -/* Have getsockopt peercred */ +/* Have getsockopt SO_PEERCRED */ #undef HAVE_SO_PEERCRED /* Define to 1 if you have the header file. */ diff --git a/test/lib.sh b/test/lib.sh index e53e2774..93673f55 100755 --- a/test/lib.sh +++ b/test/lib.sh @@ -78,8 +78,8 @@ testname= : ${RCLOG:=} # Wait after daemons (backend/restconf) start. See mem.sh for valgrind -if [ "$(arch)" = "armv7l" ]; then - : ${RCWAIT:=4} +if [ "$(uname -m)" = "armv7l" ]; then + : ${RCWAIT:=8} else : ${RCWAIT:=2} fi diff --git a/test/mem.sh b/test/mem.sh index 87c01919..672fc0d6 100755 --- a/test/mem.sh +++ b/test/mem.sh @@ -98,9 +98,9 @@ done # Then actual run testnr=0 -for c in $cmds; do +for cmd in $cmds; do if [ $testnr != 0 ]; then echo; fi - println "Mem test $c begin" - memonce $c - println "Mem test $c done" + println "Mem test $cmd begin" + memonce $cmd + println "Mem test $cmd done" done