$darkmode
Elektra 0.11.0
0.8.22 Release

  • guid: 4884a54f-996a-4564-a138-38a70166fed7
  • author: Markus Raab
  • pubDate: Tue, 27 Feb 2018 19:35:58 +0100
  • shortDesc: Logo, INI, Lookup

We are proud to release Elektra 0.8.22! In 429 commits, 8 authors changed 548 files with 60369 insertions(+), 6783 deletions(-).

What is Elektra?

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

For a small demo see here:

asciicast

You can also read the news on our website

You can read the FOSDEM interview and watch the FOSDEM main talk given recently.

Elektra is now an official part of Homebrew.

Highlights

  • New Logo and Website Theme
  • INI plugin greatly improved
  • Notifications API and Bindings for Asynchronous I/O
  • Plugin Processes
  • Lookup with the Order Preserving Minimal Perfect Hash Map

New Logo and Website Theme

We are proud to present our new logo. It has a new shape and cooler colors.

Elektra

Thanks to Philipp Frei!

We also gave the website a new look. It has the colors from the logo and new fonts (Lato and Libre Franklin) that improve readability and add to a unique look. The restructured start page contributes to the new look as well.

We also updated asciinema-player to 2.6.0.

Thanks to Thomas Wahringer.

We also fixed security issues in the Website due to an old version of jquery, thanks to Marvin Mall.

Thanks to Bernhard Denner for keeping our infrastructure running.

INI plugin greatly improved

  • dini is no longer experimental anymore and adds the binary plugin.
  • We added a crash test for the INI plugin that feeds the plugin with problematic input data we determined using AFL
  • We fixed various small bugs that could potentially cause the INI plugin to crash and fixes the problems as reported by AFL
  • The INI plugin now converts a section to a normal key-value pair if you store a value inside it. This has the advantage that you will not lose data unexpectedly anymore.
  • The INI plugin should now read most key-value pairs containing delimiter characters (=) properly.

Thanks to René Schwaiger!

Nevertheless, we did not switch to INI as default format. This has some reasons:

  • In many workflows, dump is the better choice: e.g. with kdb editor you can edit any parts of Elektra with any format (e.g. INI) more safely. (With the INI plugin in some of these situations metadata is wrongly shown.)
  • The code base of INI is not fully tested and partly not well understood.
  • We plan to switch to a newly written parser (most likely YAML) and want to avoid that users have two migrations. The migration from dump is easier (especially compared with INI) because the dump format is recognisable without ambiguity. (Thus the INI file parses nearly any file, it is hard to detect that a file is not INI)

But for those who want to switch, the migration will be smooth: The dini plugin makes sure that old dump files are still being read. Only when writing out configuration files, configuration files are converted to INI. To change to INI during compilation, simply use:

-DKDB_DEFAULT_STORAGE=dini

Or simply switch for your installation with:
sudo kdb change-default-storage dini

You can also mount INI (or dini) as root:
sudo kdb mount default.ini / dini

Notification API and Bindings for Asynchronous I/O

This release contains an experimental implementation of Elektra's notification feature. This feature enables applications to get updates when configuration is changed at run-time. For more details see the preview tutorial at doc/tutorials/notifications.md

The Notification API is implemented by a new library called elektra-notification. To use the library you need the new internalnotification plugin. Since the plugin is experimental it needs to be enabled when building Elektra from source (e.g. by passing -DPLUGINS="ALL;-EXPERIMENTAL;internalnotification" to cmake).

New bindings for asynchronous I/O called "I/O bindings" also have been added. These bindings allow Elektra's plugins and other parts to perform asynchronous operations. I/O bindings are opt-in for application developers. New features of Elektra that take advantage of I/O bindings will have fallbacks where viable. These fallbacks will use synchronous I/O thus keeping the status quo.

This release includes an experimental I/O binding for uv. The interface for I/O bindings is currently experimental and might change in the future.

Elektra's notification feature is not complete yet. So-called "transport plugins" will be responsible for sending and receiving notifications using different protocols or libraries (like ZeroMQ or D-Bus). These plugins will make use of the new I/O bindings. We plan to introduce the first transport plugins with the next release of Elektra.

Plugin Processes

A new library called pluginprocess has been added. This library contains functions that aid in executing plugins in a separate process. This child process is forked from Elektra's main process each time such plugin is used and gets closed again afterwards. It uses a simple communication protocol based on a KeySet that gets serialized through a pipe via the dump plugin to orchestrate the processes.

Such a behavior is useful for plugins which cause memory leaks to be isolated in an own process. Furthermore this is useful for runtimes or libraries that cannot be reinitialized in the same process after they have been used.

Lookup with the Order Preserving Minimal Perfect Hash Map

The ksLookup (...) has a new search algorithm, that acts as an alternative to the binary search. The Order Preserving Minimal Perfect Hash Map (OPMPHM) is a non-dynamic, randomized hash map and is very effective for mostly static configurations. The OPMPHM can be enabled for a search by passing the in kdbproposal.h defined option KDB_O_OPMPHM to the lookup. Be aware that if the KeySet changes often using the OPMPHM might not be a good idea, read more about the OPMPHM.

When you are not sure if the OPMPHM will speed up you searches, wait for the next release, that one will include a hybrid search algorithm that combines the best properties of both search algorithms.

To disable OPMPHM (e.g. on systems with tight memory constraints), you can pass -DENABLE_OPTIMIZATIONS=OFF

Other New Features

We added even more functionality, which could not make it to the highlights:

  • The Web UI was greatly improved, thanks to Daniel Bugl The version of clusterd was increased from 1.0.0 to 1.1.0.
  • Elektra is now part of the official Homebrew repository. We still provide a tap, if you want to install Elektra together with plugins or bindings that require additional libraries.
  • The building and linking of the Haskell bindings and Haskell plugins has been greatly improved.
  • The invoke library can now report errors upon opening/closing a plugin, thanks to Armin Wurzinger.
  • The YAML CPP plugin does not require Boost anymore, if you installed yaml-cpp 0.6.
  • Improved colored output in kdb tool.
  • We added two build jobs: docker and haskell. Thanks to Bernhard Denner and Armin Wurzinger.
  • YAML CPP does not write binary data to a config file, if you forget to load the Base64 plugin.
  • YAML CPP now encodes empty binary keys as NULL values (~), and also adds the metakey binary for such values automatically.

Documentation

We improved the documentation in the following ways:

Compatibility

As always, the ABI and API of kdb.h is fully compatible, i.e. programs compiled against an older 0.8 version of Elektra will continue to work (ABI) and you will be able to recompile programs without errors (API).

We executed old test cases against the latest Elektra version and all tests passed.

In kdbinvoke.h we changed the API so that elektraInvokeOpen and elektraInvokeClose can yield error messages.

We added:

Portability

  • Fix bash shebang of bash scripts, thanks to Jakub Jirutka
  • Remove unportable unneeded asm, thanks to Timo Teräs and Jakub Jirutka
  • Fixed syntax in shell recorder, thanks to René Schwaiger
  • Used mktemp in check_distribution.sh to allow parallel run of test cases, thanks to Armin Wurzinger.

Notes for Maintainer

These notes are of interest for people maintaining packages of Elektra:

  • dini is no longer experimental.
  • CMake: BINDINGS now behaves like PLUGINS By default now all MAINTAINED bindings except EXPERIMENTAL and DEPRECATED are included. For more details see /doc/COMPILE.md. To include both intercept bindings, you now need to write INTERCEPT, to only include getenv interception intercept_env. intercept in lower-case does not work anymore.

The following files are new:

  • Libs: libelektra-notification.so, libelektra-io.so, libelektra-io-uv.so, libelektra-pluginprocess.so
  • Headers: kdbgetenv.h, kdbio.h, kdbpluginprocess.h
  • Plugins: base64/Base64.pdf
  • Binaries: getenv, test_context, test_fork, test_getenv, test_ks_opmphm, test_opmphm
  • Other: elektra-io.pc

The following files were removed:

  • Tests: testmod_semlock

Notes for Elektra's Developers

These notes are of interest for people developing Elektra:

  • We now use clang-reformat-5.0 for formatting. Please upgrade your clang.
  • Build Agent ryzen v2 was added to speed up jenkins build all please, thanks to Armin Wurzinger.
  • Travis maintenance (Qt 5 and other problems), thanks to René Schwaiger.
  • BINDINGS was greatly improved and the CMake functions were simplified. Bindings now also have a README.md with metadata. A big thanks to Thomas Wahringer.
  • Decision: Logging with ELEKTRA_LOG is only for C/C++.
  • Including kdberrors.h in a C++ files now also works, if you do not add the statement
using namespace ckdb;

before you import kdberrors.h.

  • The CMake code for Elektra’s Qt-GUI now detects the location of Qt 5 automatically if you installed Qt via Homebrew.
  • All Shell Recorder tests should not now correctly restore your old configuration after you execute them, thanks to René Schwaiger.
  • The Base64 plugin does not encode empty binary values in meta mode anymore. This update allows plugins such as YAML CPP to handle empty keys properly.

Fixes

Many problems were resolved with the following fixes:

  • kdb global-umount also removed other mountpoints
  • We fixed internal inconsistency in the CMake code of the Augeas plugin
  • We fixed the haskell bindings and plugins on Debian Stretch and added a new build server job to test that in the future.
  • Cleanup in list plugin, thanks to Thomas Wahringer
  • The Shell Recorder now exports and imports the root of a mountpoint instead of the mountpoint itself. This change makes sure that Shell Recorder test do not change the configuration directly below the specified mountpoint.

Get It!

You can download the release from here or GitHub

The hashsums are:

  • name: elektra-0.8.22.tar.gz
  • size: 5885118
  • md5sum: 5cbd9e33daf51f6f33791ff3f99342a6
  • sha1: 4954ff16cfe7dc69e45e6a748556262b8fb1a9fa
  • sha256: 962598315619d5dff3a575d742720f076dc4ba3702bd01609bfb7a6ddb5d759f

The release tarball is also available signed by me using GnuPG from here or GitHub

Already built API documentation can be found online or GitHub.

Stay tuned!

Subscribe to the RSS feed to always get the release notifications.

For any questions and comments, please contact the issue tracker on GitHub or me by email using elekt.nosp@m.ra@m.nosp@m.arkus.nosp@m.-raa.nosp@m.b.org.

Permalink to this NEWS entry

For more information, see https://libelektra.org

Best regards, Elektra Initiative