Elektra 0.8.13 with python plugins

2015-09-18 Thread Markus Raab
Hello everyone,


## Python Plugins

A technical preview of [python3]
(http://git.libelektra.org/blob/master/src/plugins/python)
and [python2](http://git.libelektra.org/blob/master/src/plugins/python2) 
plugins has been added.

With them its possible to write any plugin, not only applications, with the 
python language.

Note, they are a technical preview. They might have severe bugs
and the API might change in the future.
Nevertheless, it is already possible to, e.g. develop storage plugins
with it.

They are not included in `ALL` plugins.  To use it, you have to specify it:

-PLUGINS="ALL;python;python2"

Thanks to Manuel Mausz for to this work on the plugins and the patience in 
all the last minute fixes!


Feedback and Contribution is welcome!

Join us on [github](http://libelektra.org).






# Rest of release notes for Elektra 0.8.13 follows:

For a html site visit:
http://doc.libelektra.org/news/3c00a5f1-c017-4555-92b5-a2cf6e0803e3.html

For general information about Elektra, see [http://libelektra.org]
(http://libelektra.org)


## Elektrify-getenv

getenv(3) is one of the most popular ways to retrieve configuration,
even though it has many known problems:
- no standard way to modify it
- relogin (or restart of shell) necessary
- names are flat (no hierarchical structure)
- cannot be set for individual applications
- different in at, cron and similar scripts

With elektrify-getenv we wrote a solution which solves most of the
problems. We use the LD_PRELOAD technique to *additionally* retrieve
values from Elektra, and not only the environment.

You simply can do:

```bash
kdb set user/env/override/HTTP_PROXY "http://my.proxy:8080";
```

This will set the `HTTP_PROXY` environment variable to 
`http://my.proxy:8080`.
Configuration can be retrieved with `kdb get`:

```bash
kdb get user/env/override/HTTP_PROXY
lynx   # or start another www-browser with the newly set HTTP_PROXY
```

Or using the man pages:

kdb elektrify-getenv man man --elektra:MANWIDTH=40

Will use MANWIDTH 40 for this invocation of man man.
This feature is handy, if an option is only available
by environment, but not by command-line arguments,
because sometimes environment variables are not trivial
to set (e.g. in Makefiles).

Some more examples:

kdb set user/env/override/MANOPT -- "--regex -LC"
kdb elektrify-getenv getenv MANOPT   # to check if it is set as expected
kdb getenv MANOPT   # if /etc/ld.so.preload is active


So is this the final solution for configuration and manual elektrification
of applications is not needed anymore?

The answer is: no and yes.

It is quite satisfactory for configuration that is inherently sharable
(not different from one application to another) *and* needs the environment
semantics, i.e. some subprocesses should have different configuration
than others, e.g. in a specific terminal.

But it might not be a good solution for your own application, because
libgetenv(3) implies many architectural decision, that other elektrified
applications would decide differently, e.g.:
- it uses global variables (getenv(3) has no handle)
- it uses mutex for multi-threading safety
- the API getenv(3) only returns `char*` and has no support for other data 
types

For more information see [src/libgetenv/README.md]
(http://git.libelektra.org/blob/master/src/libgetenv/README.md)




## Compatibility

As always, the API and API is fully forward-compatible, i.e. programs 
compiled 
against an
older 0.8 versions of Elektra will continue to work.

Because `keyUnescapedName` and `keyGetUnescapedNameSize` is added in this 
release, it is not backward-compatible,
i.e. programs compiled against 0.8.13, might *not* work with older 0.8 
libraries.

The function `keyUnescapedName` provides access to an unescaped name, i.e. 
one 
where `/` and `\\` are
literal symbols and do not have any special meaning. `NULL` characters are 
used as path separators.
This function makes it trivial and efficient to iterate over all path names, 
as 
already exploited
in all bindings:

 - [jna (java)]
(http://git.libelektra.org/blob/master/src/bindings/jna/HelloElektra.java)
 - [lua]
(http://git.libelektra.org/blob/master/src/bindings/swig/lua/tests/test_key.lua)
 - [python2]
(http://git.libelektra.org/blob/master/src/bindings/swig/python2/tests/testpy2_key.py)
 - [python3]
(http://git.libelektra.org/blob/master/src/bindings/swig/python3/tests/test_key.py)

Other small changes/additions in bindings:

- fix key constructor, thanks to Manuel Mausz
- add copy and deepcopy in python (+examples,+testcases), thanks to Manuel 
Mausz
- dup() in python3 returned wrong type (SWIG wrapper), thanks to Toscano 
Pino 
for reporting, thanks to Manuel Mausz for fixing it

Doxygen 1.8.8 is preferred and the configfile was updated to this version.

The symbols of nickel (for the ni plugin) do not longer leak from the 
Elektra 
library.
As such, old versions of testmod_ni won't work with Elektra 0.8.13.
A version-script is now in use to only export foll

Elektra 0.8.6

2014-06-06 Thread Markus Raab
Hello Python List,

Elektra provides a universal and secure framework to store configuration 
parameters in a global, hierarchical key database. The core is a small 
library implemented in C. The plugin-based framework fulfills many 
configuration-related tasks to avoid any unnecessary code duplication across 
applications while it still allows the core to stay without any external 
dependency. Elektra abstracts from cross-platform-related issues with an 
consistent API, and allows applications to be aware of other applications' 
configurations, leveraging easy application integration.
http://www.libelektra.org

While the core is in C, both applications and soon plugins (not yet relased) 
can be written in python. The API is complete and fully functional but not 
yet stable. So if you have any suggestions, please let us know.

Additionally the latest release added:
- C++11 und lua bindings
- a plugin to read virtually every configuration file around
- logging to journald (next to syslog)
- many other improvements and bug fixes
- compiler support for icc (+in clang warnings were fixed)
- for more details see:
http://sourceforge.net/p/registry/mailman/message/32418614/

You can download the release at:
 http://www.markus-raab.org/ftp/elektra/releases/elektra-0.8.6.tar.gz
 md5sum: 4a59824e70a29295e9ef9ae7605d9299

Make sure to enable BUILD_SWIG and BUILD_SWIG_PYTHON.

Docu (C/C++) can be found here:
 http://doc.libelektra.org/api/0.8.6/html/

best regards,
Markus
-- 
https://mail.python.org/mailman/listinfo/python-list


Elektra 0.8.7 improved Python support

2014-07-30 Thread Markus Raab
Hello list,

Elektra provides a universal and secure framework to store configuration 
parameters in a global, hierarchical key database. The core is a small 
library implemented in C. The plugin-based framework fulfills many 
configuration-related tasks to avoid any unnecessary code duplication across 
applications while it still allows the core to stay without any external 
dependency. Elektra abstracts from cross-platform-related issues with an 
consistent API, and allows applications to be aware of other applications' 
configurations, leveraging easy application integration.
http://www.libelektra.org

While the core is in C, both applications and soon plugins can be written in 
python. The API is complete and fully functional but not yet stable. So if 
you have any suggestions, please let us know.

Additionally the latest release added:
- python2 next to python3 bindings + lots of improvements there
- ini plugin
- 3 way merge
- tab completion
- for more details see:
http://sourceforge.net/p/registry/mailman/message/32655639/

You can download the release at:
 http://www.markus-raab.org/ftp/elektra/releases/elektra-0.8.7.tar.gz
 size: 1566800
 md5sum: 4996df62942791373b192c793d912b4c

Make sure to enable BUILD_SWIG and BUILD_SWIG_PYTHON2 or BUILD_SWIG_PYTHON3.

Docu (C/C++) can be found here:
 http://doc.libelektra.org/api/0.8.7/html/

Best regards,
Markus
-- 
https://mail.python.org/mailman/listinfo/python-list