
\begin{DoxyItemize}
\item guid\+:
\item author\+: Mihael Pranjic
\item pub\+Date\+: Sun, 11 Apr 2021 23\+:24\+:25 +0200
\item short\+Desc\+: Java Binding Improvements, Breaking Change to {\ttfamily kdb\+Open}
\end{DoxyItemize}

We are proud to release Elektra 0.\+9.\+5.

Elektra serves as a universal and secure framework to access configuration settings in a global, hierarchical key database. For more information, visit \href{https://libelektra.org}{\tt https\+://libelektra.\+org}.

You can also read the news \href{https://www.libelektra.org/news/0.9.<<VERSION>>-release}{\tt on our website}

You can try out the latest Elektra release using our docker image \href{https://hub.docker.com/r/elektra/elektra}{\tt elektra/elektra}. This is the quickest way to get started with Elektra without compiling and other obstacles, simply run {\ttfamily docker run -\/it elektra/elektra}.


\begin{DoxyItemize}
\item Breaking change to {\ttfamily kdb\+Open}. {\itshape \href{#hl-1}{\tt see below}}
\item Ongoing improvements of Java bindings and publishing of bindings to maven central for easy dependency integrations in Java projects
\end{DoxyItemize}

The signature of {\ttfamily kdb\+Open} has been changed from


\begin{DoxyCode}
KDB *  \hyperlink{group__kdb_ga844e1299a84c3fbf1d3a905c5c893ba5}{kdbOpen} (Key * errorKey);
\end{DoxyCode}


to


\begin{DoxyCode}
KDB * \hyperlink{group__kdb_ga844e1299a84c3fbf1d3a905c5c893ba5}{kdbOpen}(\textcolor{keyword}{const} KeySet * contract, Key *parentKey);
\end{DoxyCode}


You can use {\ttfamily kdb\+Open (N\+U\+LL, error\+Key)} to get the same behaviour as before.

The new parameter {\ttfamily contract} is similar to what could be done via {\ttfamily kdb\+Ensure} (which has been removed). Currently, the contract allows you to mount global plugins and add data into the global Key\+Set (passed to all plugins) during {\ttfamily kdb\+Open}. This alone is already quite powerful, but we might more functionality in future releases.

For now, there are three use cases for the {\ttfamily contract} parameter. All of them are covered by helper functions\+:


\begin{DoxyCode}
\textcolor{keywordtype}{int} \hyperlink{contracts_8c_af4f606fc2179e917a10c77dab576d648}{elektraGOptsContract} (KeySet * contract, \textcolor{keywordtype}{int} argc, \textcolor{keyword}{const} \textcolor{keywordtype}{char} * \textcolor{keyword}{const} * argv, \textcolor{keyword}{const}
       \textcolor{keywordtype}{char} * \textcolor{keyword}{const} * envp, \textcolor{keyword}{const} Key * parentKey, KeySet * goptsConfig);
\textcolor{keywordtype}{int} \hyperlink{io_8c_ada55d27e2530c2b98f10956fe40bbcbc}{elektraIoContract} (KeySet * contract, \hyperlink{kdbio_8h_aabcd87b8c09d4d4c1033fc1baa417391}{ElektraIoInterface} * ioBinding
      );
\textcolor{keywordtype}{int} \hyperlink{notification_8c_ad9290f444f315d3eac3f7cfdaf4efcda}{elektraNotificationContract} (KeySet * contract);
\end{DoxyCode}


With {\ttfamily elektra\+G\+Opts\+Contract} you can mount and set up the {\ttfamily gopts} plugin used for command-\/line argument parsing. The other two functions are the new way to configure Elektra\textquotesingle{}s notification feature.

For more information take a look at \hyperlink{doc_dev_kdb-contracts_md}{doc/dev/kdb-\/contracts.md}

The following section lists news about the \href{https://www.libelektra.org/plugins/readme}{\tt plugins} we updated in this release.


\begin{DoxyItemize}
\item The {\ttfamily cache} plugin now only caches the parts of the global keyset that are below {\ttfamily system\+:/elektra/cache} or below {\ttfamily system\+:/elektra/cached}. The part below {\ttfamily system\+:/elektra/cache} is meant for internal data of the {\ttfamily cache}, so you should put data below {\ttfamily system\+:/elektra/cached}, if you want it to be cached. \+\_\+(Klemens Böswirth)\+\_\+
\end{DoxyItemize}


\begin{DoxyItemize}
\item Fix use of {\ttfamily kdb\+\_\+long\+\_\+double\+\_\+t} on armel platforms (\href{https://github.com/ElektraInitiative/libelektra/issues/3450}{\tt \#3450}). \+\_\+(Mihael Pranjić)\+\_\+
\end{DoxyItemize}


\begin{DoxyItemize}
\item Internal changes to ensure compatibility with the new {\ttfamily elektra\+Notification\+Contract}. \+\_\+(Klemens Böswirth)\+\_\+
\end{DoxyItemize}


\begin{DoxyItemize}
\item Removed plugins {\ttfamily yamlsmith} and {\ttfamily yanlr}. \+\_\+(René Schwaiger)\+\_\+
\end{DoxyItemize}


\begin{DoxyItemize}
\item Internal changes to ensure compatibility with the new {\ttfamily elektra\+Notification\+Contract}. \+\_\+(Klemens Böswirth)\+\_\+
\end{DoxyItemize}

The text below summarizes updates to the \href{https://www.libelektra.org/libraries/readme}{\tt C (and C++)-\/based libraries} of Elektra.


\begin{DoxyItemize}
\item {\ttfamily key\+Copy} and {\ttfamily key\+Dup} now take an additional flag. See \href{#key-copy}{\tt below}.
\item {\ttfamily kdb\+Ensure} was removed and integrated into {\ttfamily kdb\+Open}, which now takes an additional {\ttfamily Key\+Set $\ast$ contract} parameter. See \href{#hl-1}{\tt above}
\end{DoxyItemize}


\begin{DoxyItemize}
\item The {\ttfamily key\+Copy} and {\ttfamily key\+Dup} functions have been changed. They now take a {\ttfamily flags} argument which specifies which parts of the {\ttfamily Key} should be copied. The A\+PI also changed slightly. Most importantly {\ttfamily N\+U\+LL} values are handled differently. For example, {\ttfamily key\+Dup (N\+U\+LL, K\+E\+Y\+\_\+\+C\+P\+\_\+\+A\+LL)} returns a key similar to what {\ttfamily key\+New (\char`\"{}/\char`\"{}, K\+E\+Y\+\_\+\+E\+ND)} produces, whereas previously {\ttfamily key\+Dup (N\+U\+LL)} returned {\ttfamily N\+U\+Ll}. \+\_\+(Klemens Böswirth)\+\_\+
\item We added {\ttfamily key\+Replace\+Prefix}, a function that allows you to easily move a key from one parent to another. \+\_\+(Klemens Böswirth)\+\_\+
\item {\ttfamily kdb\+Ensure} was removed and replaced by similar functionality added to {\ttfamily kdb\+Open}. {\itshape \href{#hl-1}{\tt see above}} \+\_\+(Klemens Böswirth)\+\_\+
\item {\ttfamily K\+E\+Y\+\_\+\+E\+ND} is now defined as {\ttfamily (void $\ast$) 0} instead of {\ttfamily 0}. This allows us to mark {\ttfamily key\+New} with the G\+CC attribute {\ttfamily \+\_\+\+\_\+attribute\+\_\+\+\_\+ ((sentinel))}, which causes a compiler warning, if {\ttfamily key\+New} calls don\textquotesingle{}t use {\ttfamily K\+E\+Y\+\_\+\+E\+ND} as their last argument. \+\_\+(Klemens Böswirth)\+\_\+
\end{DoxyItemize}


\begin{DoxyItemize}
\item {\ttfamily elektra\+Set\+Io\+Binding} has been removed. Use {\ttfamily elektra\+Io\+Contract} instead. \+\_\+(Klemens Böswirth)\+\_\+
\end{DoxyItemize}


\begin{DoxyItemize}
\item {\ttfamily elektra\+Notification\+Open} has been removed. Use {\ttfamily elektra\+Notification\+Contract} instead. {\ttfamily elektra\+Notification\+Close} has also been removed. There is no replacement, cleanup now happens automatially during {\ttfamily kdb\+Close}. \+\_\+(Klemens Böswirth)\+\_\+
\item The contract for transport plugins has been changed. The exported functions {\ttfamily \char`\"{}open\+Notification\char`\"{}}, {\ttfamily \char`\"{}close\+Notification\char`\"{} and}\char`\"{}set\+Io\+Binding\char`\"{}{\ttfamily are no longer used. Instead, plugins should retrieve the I/O binding from the key}system\+:/elektra/io/binding{\ttfamily in the global keyset. The notification callback and context that were passed to}\char`\"{}open\+Notification\char`\"{}{\ttfamily , can now be read from the global keyset as well. The keys are}system\+:/elektra/notification/callback{\ttfamily and}system\+:/elektra/notification/context` respectively. \+\_\+(Klemens Böswirth)\+\_\+
\end{DoxyItemize}

Bindings allow you to utilize Elektra using \href{https://www.libelektra.org/bindings/readme}{\tt various programming languages}. This section keeps you up to date with the multi-\/language support provided by Elektra.


\begin{DoxyItemize}
\item Since internal iterator support for {\ttfamily Key\+Set} is due to being dropped, the following methods have been removed\+:
\begin{DoxyItemize}
\item {\ttfamily Elektra\+::ks\+Next}
\item {\ttfamily Elektra\+::ks\+Current}
\item {\ttfamily Elektra\+::ks\+Get\+Cursor}
\item {\ttfamily Elektra\+::ks\+Set\+Cursor}
\item {\ttfamily Key\+Set\+::next}
\item {\ttfamily Key\+Set\+::current}
\item {\ttfamily Key\+Set\+::rewind}
\item {\ttfamily Key\+Set\+::get\+Cursor}
\item {\ttfamily Key\+Set\+::set\+Cursor}
\end{DoxyItemize}

Until internal {\ttfamily Key\+Set} iterator support has been dropped form native library, {\ttfamily Elektra\+::ks\+Rewind} is being retained while also being annotated as \textquotesingle{}deprecated for removal\textquotesingle{}. The reason is, that we still need to rewind a {\ttfamily Key\+Set} before passing it to a native plugin via {\ttfamily Native\+Plugin\+::set}, {\ttfamily Native\+Plugin\+::get} or {\ttfamily Native\+Plugin\+::error}. \+\_\+(\+Michael Tucek)\+\_\+

Furthermore {\ttfamily Elektra\+::ks\+Pop} and {\ttfamily Key\+Set\+::pop} have been removed and {\ttfamily Key\+Set\+::remove} has been introduced as replacment. Until internal {\ttfamily Key\+Set} iterator support has been dropped form native library, {\ttfamily Elektra\+::ks\+Rewind} is being retained while also being annotated as \textquotesingle{}depricated for removal\textquotesingle{}. The reason is, that we still need to rewind a {\ttfamily Key\+Set} before passing it to a native plugin via {\ttfamily Native\+Plugin\+::set}, {\ttfamily Native\+Plugin\+::get} or {\ttfamily Native\+Plugin\+::error}. \+\_\+(\+Michael Tucek)\+\_\+

Further more {\ttfamily Elektra\+::ks\+Pop} and {\ttfamily Key\+Set\+::pop} have been removed and {\ttfamily Key\+Set\+::remove} has been introduced as replacment. \+\_\+(\+Michael Tucek)\+\_\+
\item Renamed {\ttfamily Key\+Exception} specializations\+: {\ttfamily Key\+Invalid\+Name\+Exception}, {\ttfamily Key\+Type\+Conversion\+Exception}, {\ttfamily Key\+Type\+Mismatch\+Exception}
\item Migration from Maven to Gradle \+\_\+(\+Michael Tucek)\+\_\+
\item Updated documentation for usage of published artifacts \+\_\+(\+Michael Tucek)\+\_\+
\item Integration of Maven Central publishing on Elektra release \+\_\+(\+Robert Sowula)\+\_\+
\end{DoxyItemize}

Ongoing work on bringing the J\+NA binding up to scratch and improving developer experience. Both for J\+NA binding A\+PI consumers, as well as future J\+NA binding contrubutors. \+\_\+(\+Michael Tucek)\+\_\+

Add support for keyset.\+remove(key). \+\_\+(\+Manuel Mausz)\+\_\+


\begin{DoxyItemize}
\item {\ttfamily webd}\+: update {\ttfamily ini}, {\ttfamily y18n} and {\ttfamily elliptic} dependencies. \+\_\+(Mihael Pranjić)\+\_\+
\item Make search for providers not skip rest of plugins on exceptions. \+\_\+(\+Markus Raab)\+\_\+
\end{DoxyItemize}


\begin{DoxyItemize}
\item Fix enums in examples/spec. \+\_\+(\+Markus Raab)\+\_\+
\end{DoxyItemize}


\begin{DoxyItemize}
\item Document names of different components. \+\_\+(\+Markus Raab)\+\_\+
\item Update buildserver documentation \+\_\+(\+Robert Sowula)\+\_\+
\item Reworked \href{/home/jenkins/workspace/libelektra-release/doc/METADATA.ini}{\tt M\+E\+T\+A\+D\+A\+T\+A.\+ini} \+\_\+(\+Markus Raab)\+\_\+
\item Minor rewording in I\+N\+S\+T\+A\+L\+L.\+md \+\_\+({\itshape }-\/kraschitzer)\+\_\+
\item Write notes that {\ttfamily \textbackslash{}\textbackslash{}} are due to shell recorder, and are not to be copied \+\_\+(\+Markus Raab)\+\_\+
\item Add link to \href{https://github.com/ElektraInitiative/go-elektra}{\tt Go} bindings \+\_\+(\+Markus Raab)\+\_\+
\item Fix order of tutorials \+\_\+(\+Markus Raab)\+\_\+
\item Added A\+P\+I-\/\+Reviews for multiple functions in the public A\+PI \+\_\+(\+Stefan Hanreich)\+\_\+
\item Minor rewording in \hyperlink{doc_tutorials_java-kdb_md}{java-\/kdb.md} \+\_\+()\+\_\+
\item Added a short Visual Studio 2019 tutorial (/doc/tutorials/contributing-\/windows.md) \+\_\+(Dominic Jäger)\+\_\+
\item Added hint regarding W\+SL filesystem configuration (/doc/tutorials/contributing-\/windows.md) \+\_\+()\+\_\+
\item Fixed broken link in yanlr-\/plugin readme \+\_\+()\+\_\+
\item Minor readability improvement in \hyperlink{doc_tutorials_highlevel_md}{highlevel.md} \+\_\+(Tobias Schubert )\+\_\+
\item Fix examples of spec plugin. \+\_\+(\+Robert Sowula)\+\_\+
\end{DoxyItemize}


\begin{DoxyItemize}
\item Added small test for jna Return plugin ({\ttfamily Return.\+java}), {\ttfamily Key\+Name\+Iterator.\+java} \+\_\+()\+\_\+
\end{DoxyItemize}


\begin{DoxyItemize}
\item Change shlibs version compatibility policy of Debian packages to \char`\"{}$>$=\char`\"{}. \+\_\+(\+Robert Sowula)\+\_\+
\item Automate publishing of the release Elektra Docker images. \+\_\+(\+Robert Sowula)\+\_\+
\end{DoxyItemize}


\begin{DoxyItemize}
\item Fix issue where the library runpaths of the jni plugin could not be resolved. \+\_\+(\+Robert Sowula)\+\_\+
\end{DoxyItemize}


\begin{DoxyItemize}
\item Update Alpine Linux images to version 3.\+13.\+1 and update Elektra release image. \+\_\+(Mihael Pranjić)\+\_\+
\end{DoxyItemize}


\begin{DoxyItemize}
\item Update Free\+B\+SD images from version 12.\+1 to 12.\+2 \+\_\+(\+Robert Sowula)\+\_\+
\item Update brew before installing packages and print brew config. \+\_\+(Mihael Pranjić)\+\_\+
\item Restart {\ttfamily dbus} service before running tests and find {\ttfamily D\+B\+U\+S\+\_\+\+L\+A\+U\+N\+C\+H\+D\+\_\+\+S\+E\+S\+S\+I\+O\+N\+\_\+\+B\+U\+S\+\_\+\+S\+O\+C\+K\+ET} manually (as workaround). \+\_\+(Mihael Pranjić)\+\_\+
\item Use mac\+OS Big Sur images. \+\_\+(Mihael Pranjić)\+\_\+
\end{DoxyItemize}


\begin{DoxyItemize}
\item Fix issues with {\ttfamily dbus} and java paths, exclude {\ttfamily jni}. \+\_\+(Mihael Pranjić)\+\_\+
\end{DoxyItemize}


\begin{DoxyItemize}
\item Update daily job to always keep the latest Docker images containing installed Elektra packages that were build on master or during release. \+\_\+(\+Robert Sowula)\+\_\+
\item Add a cleanup of the aptly database to the daily job. \+\_\+(\+Robert Sowula)\+\_\+
\end{DoxyItemize}

The website is generated from the repository, so all information about plugins, bindings and tools are always up to date. Furthermore, we changed\+:


\begin{DoxyItemize}
\item It is now possible to have two links on the same line of a markdown file rendered on the website. \+\_\+(Klemens Böswirth)\+\_\+
\item The file \hyperlink{doc_KEYNAMES_md}{doc/\+K\+E\+Y\+N\+A\+M\+ES.md} is now rendered on the website. \+\_\+(Klemens Böswirth)\+\_\+
\item Update {\ttfamily ini} dependency. \+\_\+(\+Dependa Bot)\+\_\+
\item Update many dependencies (Node 14.\+x L\+TS, angular, bootstrap, ..) and fix broken R\+SS feed permalinks. \+\_\+(Mihael Pranjić)\+\_\+
\end{DoxyItemize}

We are currently working on following topics\+:


\begin{DoxyItemize}
\item Elektrify K\+DE \+\_\+(\+Dardan Haxhimustafa)\+\_\+, \+\_\+(\+Felix Resch)\+\_\+ and \+\_\+(Mihael Pranjić)\+\_\+
\item 1.\+0 A\+PI \+\_\+(\+Stefan Hanreich)\+\_\+ and \+\_\+(Klemens Böswirth)\+\_\+
\item Improve Java Development Experience \+\_\+(\+Michael Tucek)\+\_\+
\item Elektrify G\+N\+O\+ME \+\_\+(Mihael Pranjić)\+\_\+
\item Continious Releases \+\_\+(\+Robert Sowula)\+\_\+
\item K\+DB access using F\+U\+SE \+\_\+(\+Alexander Firbas)\+\_\+
\item Default T\+O\+ML plugin \+\_\+(\+Jakob Fischer)\+\_\+
\item Improve Plugin Framework \+\_\+(\+Vid Leskovar)\+\_\+
\item Improve 3-\/way merge \+\_\+(Dominic Jäger)\+\_\+
\item Shell completion \+\_\+(Ulrike Schäfer)\+\_\+
\item Ansible bindings \+\_\+(\+Thomas Waser)\+\_\+
\end{DoxyItemize}

$<$$<${\ttfamily scripts/git-\/release-\/stats 0.\+9.\+V\+ER-\/1 0.\+9.$<$$<$V\+E\+R\+S\+I\+ON$>$$>$}$>$$>$

We welcome new contributors! Read \href{https://www.libelektra.org/devgettingstarted/ideas}{\tt here} about how to get started.

As first step, you could give us feedback about these release notes. Contact us via our \href{https://issues.libelektra.org}{\tt issue tracker}.

You can download the release from \href{https://www.libelektra.org/ftp/elektra/releases/elektra-0.9.<<VERSION>>.tar.gz}{\tt here} or \href{https://github.com/ElektraInitiative/ftp/blob/master/releases/elektra-0.9.<<VERSION>>.tar.gz?raw=true}{\tt Git\+Hub}

The \href{https://github.com/ElektraInitiative/ftp/blob/master/releases/elektra-0.9.<<VERSION>>.tar.gz.hashsum?raw=true}{\tt hashsums are\+:}

$<$$<${\ttfamily scripts/generate-\/hashsums elektra-\/0.\+9.$<$$<$V\+E\+R\+S\+I\+ON$>$$>$.tar.\+gz}$>$$>$

The release tarball is also available signed using Gnu\+PG from \href{https://www.libelektra.org/ftp/elektra/releases/elektra-0.9.<<VERSION>>.tar.gz.gpg}{\tt here} or on \href{https://github.com/ElektraInitiative/ftp/blob/master/releases/elektra-0.9.<<VERSION>>.tar.gz.gpg?raw=true}{\tt Git\+Hub}

The following G\+PG Key was used to sign this release\+: 12\+C\+C44541\+E1\+B8\+A\+D9\+B66\+A\+F\+A\+D55262\+E7353324914A

Already built A\+P\+I-\/\+Docu can be found \href{https://doc.libelektra.org/api/0.9.<<VERSION>>/html/}{\tt here} or on \href{https://github.com/ElektraInitiative/doc/tree/master/api/0.9.<<VERSION>}{\tt Git\+Hub}.

Subscribe to the \href{https://www.libelektra.org/news/feed.rss}{\tt R\+SS feed} to always get the release notifications.

If you also want to participate, or for any questions and comments please contact us via our issue tracker \href{http://issues.libelektra.org}{\tt on Git\+Hub}.

\href{https://www.libelektra.org/news/0.9.<<VERSION>>-release}{\tt Permalink to this N\+E\+WS entry}

For more information, see \href{https://libelektra.org}{\tt https\+://libelektra.\+org}

Best regards, \href{https://www.libelektra.org/developers/authors}{\tt Elektra Initiative} 