Elektra
0.9.3
|
Elektra serves as a universal and secure framework to access configuration settings in a global, hierarchical key database.
You can also read this document on our website.
We wrote a new article describing our vision from configuration management perspective.
For more information, visit https://libelektra.org.
We are proud to present our largest release so far. It is the first release of the 0.9.* version series, which goal is it:
To get away from a purely research-oriented approach to a mature foundation, we also need paid employees to fix problems.
We plan to introduce following ways of income:
If you are interested in any of these, please contact us via busin ess@ libel ektr a.org
The 0.8.* version series will be maintained on paid requests. If you have maintenance requests and want 0.8.27 to be released, please contact us via busin ess@ libel ektr a.org
Please note, that Elektra will definitely stay 100% free software (BSD licensed). We do not plan to make any part proprietary. We only introduce a way for paid customers to get desired features or help more quickly.
Cache is a new global caching plugin. It uses mmapstorage as its storage backend and lazily stores the whole configuration from previous configuration accesses.
With large or many configuration files, the cache brings amazing performance improvements: Let us say, you have 649 INI configuration files mounted with the multifile resolver, completely specified (which means that the specification must be copied to all the configuration settings). Before the cache, retrieving the whole configuration would take 6 or even 13 seconds. With the cache, the whole operation now takes less than 0.5 seconds after the first access.
This is an important step towards the goal of Elektra to integrate all configuration files present on a system.
Limitations:
By default, the cache will automatically enable itself once the cache
plugin is installed. The cache can be found in ~/.cache/elektra
.
We also added tools for enabling, disabling and clearing the cache (kdb cache {enable,disable,default,clear}
).
A big thanks to _(Mihael Pranjić)_ for the excellent work.
Gopts is a new plugin that integrates support for command-line options to applications:
argc
, argv
and envp
needed for elektraGetOpts
and then makes the call. It is intended to be used as a global plugin, so that command-line options are automatically parsed when kdbGet
is called. _(Klemens Böswirth)_GetCommandLineW
and GetEnvironmentString
), MAC_OSX (_NSGetArgc
, _NSGetArgv
) and any system that either has a sysctl(3)
function that accepts KERN_PROC_ARGS
(e.g. FreeBSD) or when procfs
is mounted and either /proc/self
or /proc/curproc
refers to the current process. If you need support for any other systems, feel free to add an implementation.This means, that using the plugin, you do not need to call elektraGetOpts
yourself anymore.
kdbEnsure
is a new function in elektra-kdb
. It can be used to ensure that a KDB instance meets certain clauses specified in a contract. In principle this a very powerful tool that may be used for a lot of things. All changes made by kdbEnsure
are purely within the KDB handle passed to the function.
For example, kdbEnsure
can be used, to ensure the availability of command-line options for your application.
Limitations:
kdbEnsure
only works, if the list
plugin is mounted in all appropriate global positions.kdbEnsure
does not take care of dependencies between plugins.A big thanks to _(Klemens Böswirth)_ for the excellent work.
With this release, we changed our messy error code system into a more structured and clean way. Similar to SQLStates we changed to structure of our error codes and migrated them. Have a look into the new codes. This allows us to easily extend the specification without breaking existing codes and to avoid risking duplicated errors as we had before. _(Michael Zronek)_
We were able to reduce the former 214 to now only 9 error codes.
For background information read:
A big thanks to _(Michael Zronek)_ for the excellent work.
The following section lists news about the plugins we updated in this release. In total, we added 9 plugins and removed 2 plugins.
The type
plugin was completely rewritten in C. The old version is now called cpptype
. _(Klemens Böswirth)_
The new type
plugin also provides the functionality of the enum
and the boolean
plugin. These plugins are now considered obsolete and you should use type
instead.
A few notes on compatibility:
type
does not support the full feature set of enum
and boolean
, but it supports the features we consider useful.type
doesn't support FSType
and empty
. These have been deprecated for a long time and there are good alternatives available.type
supports enum
, wchar
and wstring
as types, whereas the old cpptype
would throw an error for these. In most cases this won't be a problem, but you should be aware of this breaking change.type
does not support check/type/min
and check/type/max
, please use the range
plugin instead.To switch from enum
to the new type
, you have to add either check/type=enum
or type=enum
. Without a check/type
or type
metakey, the type
plugin will ignore the key. We now also support converting enum values to and from integer values (see README).
To switch from boolean
to the new type
, you don't have to do anything, if you used the default config. If you used a custom configuration please take a look at the README.
gpg
is being invoked. _(Peter Nirschl)_kdbGet
converts a MAC address into a decimal 64-bit integer (with the most significant 16 bits always set to 0), if the format is supported. kdbSet
restores the converted values back to there original form. _(Thomas Bretterbauer)_cache
plugin. _(Mihael Pranjić)_kdb import
and kdb export
. _(Mihael Pranjić)_kdbError()
function. _(Mihael Pranjić)_kdbError()
function. _(Mihael Pranjić)_Removed due to:
elektraSpecloadSendSpec
to abstract over the quickdump
dependency. _(Klemens Böswirth)_syslog
function. _(René Schwaiger)_The YAJL plugin which parses JSON files:
kdb ls
. _(Philipp Gackstatter)____dirdata
entries for empty array keys. See also issue #2477. _(Philipp Gackstatter)_config.yaml
:, the plugin prints an error message that includes the following text:
. _(René Schwaiger)_
, user/array/#0
and user/array/#1
represent array elements, while user/map/#0
, and user/map/#1
do not, since the key set also contains the key user/map/key
. The following Markdown Shell Recorder snippet shows the new behavior of the plugin:
. _(René Schwaiger)_
The plugin converts “sparse” key sets properly. For example, for the key set that contains only the key:
user/parent/#1/#2/map/#0
with the value arr
and uses user/parent
as parent key, YAML CPP stores the following YAML data:
. _(René Schwaiger)_
to the key set that contains the following keys:
now prints the following YAML data:
. _(René Schwaiger)_
0
, 1
) back to YAML’s boolean values (true
, false
). _(René Schwaiger)_4.5.x
or earlier). _(René Schwaiger)_^
) that point to the error positions inside the input. _(René Schwaiger)_the plugin prints an error message that contains the following text:
. _(René Schwaiger)_
now includes the following text
. _(René Schwaiger)_
and compact sequences:
correctly. _(René Schwaiger)_
The text below summarizes updates to the C (and C++)-based libraries of Elektra.
We introduced several incompatible changes:
We changed following symbols:
kdbGet
now calls global postgetstorage plugins with the parent key passed to kdbGet
, instead of a random mountpoint. _(Klemens Böswirth)_ENABLE_LOGGER
enabled, we now log warnings and errors to stderr and everything except debug messages to syslog. If ENABLE_DEBUG
is also enabled, debug messages are logged to syslog as well. Previously you had to make some manual changes to the code, to see most of the logging messages. _(Klemens Böswirth)___FILE__
contains a relative (instead of an absolute) filepath. _(René Schwaiger)_ENABLE_DEBUG
and adding the "debugGlobalPositions"
meta key to the parentKey of the kdbGet invocation. _(Mihael Pranjić)_ingroup
from error messages to reduce verbosity. _(Michael Zronek)_kdb_long_double_t
is not available (e.g. mips32). _(Matthias Schoepfer)_BUILD_TEST
is set in cmake. _(Matthias Schoepfer)_unsigned int
reported by UBSan. _(René Schwaiger)_Bindings allow you to utilize Elektra using various programming languages. This section keeps you up to date with the multi-language support provided by Elektra.
kdb get -v
now displays if the resulting value is a default-value defined by the metadata of the key. _(Thomas Bretterbauer)_kdb cp
now succeeds if the target-keys already have the same values as the source-keys. _(Thomas Bretterbauer)_web-ui
does not show empty namespace anymore _(Josef Wechselauer)_kdb import
does not fail anymore if executed more than once with the same target in the spec-namespace. _(Thomas Bretterbauer)_kdb mount
avoid adding sync if sync is already provided. _(Markus Raab)_kdb list-tools
now supports KDB_EXEC_PATH
environment variables that contain spaces. _(René Schwaiger)_gen-gpg-testkey
is added to the default tools list (see #2668)._(Peter Nirschl)_kdb getenv
now executed correctly from within tests _(Markus Raab)_kdb-bash-completion
now works on Mac (see #2836). _(Eduardo Santana)_kdb rm
supports --without-elektra
and returns 11 on key not found. _(Markus Raab)_kdb gen
is now no longer an external tool implemented via python, but rather a first class command of the kdb
tool. For now it only supports code generation for use with the highlevel API. Try it by running kdb gen elektra <parentKey> <outputName>
, where <parentKey>
is the parent key of the specification to use and <outputName>
is some prefix for the output files. If you don't have your specification mounted, use kdb gen -F <plugin>:<file> elektra <parentKey> <outputName>
to load it from <file>
using plugin <plugin>
.
. _(Klemens Böswirth)_
reformat-shfmt
script now also formats tests/shell/include_common.sh.in
. Additionally it ensures that the file is 1000 lines long, so that line numbers of files using it are easier to read. _(Klemens Böswirth)_reformat-shfmt
now also reformats shell support files (*.in
) in the scripts
folder. _(René Schwaiger)_reformat-*
scripts now allow you to specify a list of files that should be formatted. Only files actual suitable for the reformat script, will reformat. So e.g. calling reformat-cmake src/include/kdbprivate.h
doesn't change any files. _(Klemens Böswirth)_scripts/dev/reformat-all
is a new convenience script that calls all other reformat-*
scripts. _(Klemens Böswirth)_scripts/pre-commit-check-formatting
can be used as a pre-commit hook, to ensure files are formatted before committing. _(Klemens Böswirth)_We added a script, called benchmark-yaml
that compares the run-time of the YAML plugins:
for a certain input file with hyperfine. _(René Schwaiger)_
kdb reset
and kdb reset-elektra
, fixed kdb stash
. _(Markus Raab)_benchmark_plugingetset
now also supports only executing the get
method for the specified plugin. For example, to convert the data stored in the file benchmarks/data/yaypeg.test.in
with the YAy PEG plugin to a key set you can now use the following command:. _(René Schwaiger)_
We added instructions on how to reformat code with
to the coding guidelines. _(René Schwaiger)_
checkconf
section in the plugin tutorial. _(Peter Nirschl)_The new profiling tutorial describes how to determine the execution time of code using
. _(René Schwaiger)_
elektraPluginGetGlobalKeySet
in the plugin tutorial. _(Vid Leskovar)_cassandra.ini
_(arampaa)_instead of
to show the location data for broken links. This is also the same style that Clang and GCC use when they display location information for compiler errors. This update has the advantage, that certain tools such as TextMate are able to convert the location data, providing additional features, such as clickable links to the error source. _(René Schwaiger)_
1
for the first line number instead of 0
. This update fixes an off-by-one-error, when the user tries to use the error location data printed by the tool in a text editor. _(René Schwaiger)_kdb
command now accepts v
and d
as option to show more information in case of warnings or errors. _(Michael Zronek)_kdb
_(Markus Raab)_The variables:
SPEC_FOLDER
SYSTEM_FOLDER
USER_FOLDER
in the inclusion file for shell test were set incorrectly, if the repository path contained space characters. _(René Schwaiger)_
The tests
now also works correctly, if the user
and system
directory file paths contain space characters. _(René Schwaiger)_
The formatting instructions printed by check_formatting
now also work correctly, if
diff
output does not start with the test number added by CTest, andfish
. _(René Schwaiger)_
0.5.4
and also check the style of CMake code with this new version of the tool. _(René Schwaiger)_We fixed various warnings about
if
-statementsreported by LGTM. _(René Schwaiger)_
INSTALL_SYSTEM_FILES
by default. This change makes it possible to install Elektra using Homebrew on Linux without any changes to Elektra’s Linuxbrew formula. _(René Schwaiger)_ Add -DINSTALL_SYSTEM_FILES=ON
for previous behavior.testshell_markdown_tutorial_crypto
is not compiled and executed if gen-gpg-testkey
is not part of TOOLS. _(Peter Nirschl)_BUILD_TESTING=ON
. _(Klemens Böswirth)_openjdk-8-jdk
is not available in the official unstable repositories anymore. _(René Schwaiger)_We added
to the image for Debian sid. _(René Schwaiger)_
The Docker images for
now include the Python YAML library recommended by cmake format. _(René Schwaiger)_
🔗 Check
, which checks the documentation for broken links. _(René Schwaiger)_We disabled the tests:
testmod_crypto_botan
,testmod_crypto_openssl
,testmod_dbus
,testmod_dbusrecv
,testmod_fcrypt
,testmod_gpgme
, andtestmod_zeromqsend
, since they are known to fail in high load scenarios. _(René Schwaiger)_
🍏 GCC
. This update makes sure that the build job succeeds, even if Homebrew adds a new major version of the compiler. _(René Schwaiger)_🍏 Haskell
. _(René Schwaiger)_The website is generated from the repository, so all information about plugins, bindings and tools are always up to date. Furthermore, we changed:
We are currently working on following topics:
About 40 authors changed 1278 files with 49409 insertions(+) and 13883 deletions(-) in 2025 commits.
We closed 114 issues for this release.
We welcome new contributors! Read here about how to get started.
As first step, you could give us feedback about these release notes. Contact us via our issue tracker.
You can download the release from here or GitHub
The hashsums are:
The release tarball is also available signed by Markus Raab using GnuPG from here or on GitHub
Already built API-Docu can be found here or on GitHub.
Subscribe to the RSS 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 on GitHub.
For more information, see https://libelektra.org
Best regards, Elektra Initiative