Skip to content

Commit 2e90b91

Browse files
authored
Merge pull request ElektraInitiative#3438 from ElektraInitiative/plugins
Plugins
2 parents 2830c52 + abcdd5b commit 2e90b91

File tree

22 files changed

+86
-371
lines changed

22 files changed

+86
-371
lines changed

doc/news/_preparation_next_release.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,16 @@ You can also read the news [on our website](https://www.libelektra.org/news/0.9.
3737

3838
## Plugins
3939

40-
The following section lists news about the [modules](https://www.libelektra.org/plugins/readme) we updated in this release.
40+
We updated the `maintained` status of the following [plugins](https://www.libelektra.org/plugins/readme):
41+
42+
- blockresolver
43+
- csvstorage
44+
- gitresolver
45+
- list
46+
- multifile
47+
- spec
48+
49+
New maintainers are very much welcomed!
4150

4251
### Augeas
4352

doc/todo/BINDINGS

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
Perl and PHP bindings
1+
C#/F# bindings
2+
Perl bindings
3+
PHP bindings
4+
5+
type safe get/set from/to collections
26

37
== C++ ==
48

@@ -7,9 +11,3 @@ iomanip using iword, pword, and xalloc
711

812
KeyMeta(Reverse)Iterator:
913
allow iterations over metakeys
10-
11-
type safe get/set from/to collections
12-
13-
## getenv
14-
15-
detect gcc for faster compilation

doc/todo/DOCUMENTATION

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ rewind not clearly defined:
88
rewind after plugins?
99
rewind after get()?
1010
rewind after set()?
11-
-> write pre+postconditions
11+
-> needs to be done within plugins
12+
as internal iterator should disappear
1213

1314
not clearly defined how config file is opened
1415
(temporary file needs to be opened write+create)
@@ -21,5 +22,3 @@ relative key names not explained
2122
== pictures ==
2223

2324
BIGPICTURE.md should actually have a picture!
24-
25-
generate up-to-date graphic for overview of plugins

doc/todo/FRONT_END

-24
This file was deleted.

doc/todo/FUTURE

+11-254
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,27 @@
1-
Some enhanced ideas which (most likely) will not be part of 0.8
2-
but should be decided until 1.0
1+
Some ideas which should be decided until 1.0
32

43

54
== API Changes ==
65

76
Avoid anything starting with _
87
_KDB, _KeySet, _Key typedefs
98

10-
remove elektraInvokeInitialize compatibility layer
9+
_t is reserved by POSIX, so cursor_t, keyswitch_t and option_t
10+
should be renamed to something elektra specific
1111

12-
ksClear/keyClear weg (can be done with *Copy(,0))
13-
meta handling should be the same
12+
remove elektraInvokeInitialize compatibility layer
1413

1514
Single Interface: only get pointers, no memcopy (only one keyGetString, no
1615
keyString)
1716

18-
no "binary" metadata hack within API:
19-
just provide keyGetValue and keyGetValueSize
20-
no fixed strings when GetString on binary
21-
22-
backslash:
23-
allow \ at end of keynames?
24-
Autoescape on addBaseName?
25-
2617
remove old metadata get/set
2718

28-
change key name of a key that was popped from all keysets?
29-
30-
remove null ptr checks? (see decision)
31-
32-
C++:
33-
add getValueSize()?
34-
35-
Start arrays with _ (and not with #)?
36-
37-
make KEY_END, ELEKTRA_PLUGIN_END also pointers and check them with
38-
sentinel, have a single way how to terminate vaargs
39-
40-
remove key/keyset flags
41-
- that are obsolete/deprecated
42-
- KDB_O_NOCASE (because it needs POSIX-only elektraStrCaseCmp
43-
and is not performant)
44-
45-
_t is reserved by POSIX, so cursor_t, keyswitch_t and option_t
46-
should be renamed to something elektra specific
47-
48-
internal APIs: malloc, realloc should use 2 parameters and
49-
check for multiplication overflow
50-
5119
size_t, ssize_t are not fixed size, use uint32_t.. to have no
52-
problems on binary serialisation + unified behaviour (array sizes..)
53-
-> remove SSIZE_T (only POSIX)
54-
55-
empty/invalid keys should lead to an error in kdbGet
20+
problems on binary serialisation + unified behaviour (array sizes..)
5621

5722
KEY_* -> ELEKTRA_KEY_* to avoid clashes
5823
e.g. clash with KEY_MODE in “linux/input-event-codes.h”
59-
consistently use singular (KEY_FLAGS -> KEY_FLAG)
60-
61-
kdb.h -> elektra/kdb.h to avoid clashes
24+
consistently use singular (KEY_FLAGS -> KEY_FLAG)
6225

6326
Remove/Refactor/Rename obsolete/not needed methods:
6427
- keyClear
@@ -94,23 +57,13 @@ Remove/Refactor/Rename obsolete/not needed methods:
9457
- ksLookupByName
9558

9659

60+
== TOOLS ==
9761

98-
== Compatibility ==
99-
100-
1.* does not need to be compatible with 0.* version.
62+
remove legacy configuration of the `kdb` tool
63+
(% profile and /sw/kdb/ in src/tools/kdb/cmdline.cpp line 290-300)
10164

102-
- remove mountpoint name concept
103-
- system/elektra/mountpoints/system\/info\/uname/mountpoint key not needed (system/info/uname already in name present!)
104-
- remove numbers in backend mounting (placements only per name)
105-
- have consistent instantiate+backreferencing syntax for both backend+global mounting
106-
(system/elektra/mountpoints and system/elektra/globalplugins)
107-
- remove legacy bootstrapping: always use KDB_FILE_INIT (elektra.ecf)
108-
- recursive backend=plugin (separate commit method)
109-
- remove legacy configuration of the `kdb` tool
110-
(% profile and /sw/kdb/ in src/tools/kdb/cmdline.cpp line 290-300)
11165

112-
113-
== Methods ==
66+
= FINISH for 1.0.0 =
11467

11568
all exported methods of elektra need to be:
11669
useful in current state
@@ -121,208 +74,12 @@ all exported methods of elektra need to be:
12174
having test cases for error cases
12275
otherwise fix or mark it obsolete
12376

124-
== Conventions ==
125-
126-
conventions should be used everywhere
127-
128-
Encode numbers /#222/ by adding _. (so not only convention)? (only unescaped name has #__)
129-
130-
warnings should have array conventions #0, #_10...
131-
also allow many errors? (for many validation/parse errors)
132-
133-
134-
== Libraries ==
135-
136-
- remove libelektra.so (only have new split libraries)
137-
138-
139-
=== Plugin API Changes ===
140-
141-
maybe kdbConstruct and kdbDestruct needed too?
142-
143-
allow non-file/resolver based backends
144-
145-
read function symbols from contract (and not duplicated)
146-
have elektraPluginContract separated from elektraPluginGet?
147-
148-
enhance API to: (next to get/set/error)
149-
- contract? allows us to fetch contract without get hacks
150-
- commit/rollback (so that plugin=backend)
151-
152-
153-
== Error handling ==
154-
155-
translation of exceptions to different languages
156-
157-
158-
== Vision ==
159-
160-
Configuration definitions:
161-
provide definitions of known configuration trees
162-
generate code
163-
generate other schemas
164-
generate docu of comments (see libcomment)
165-
do mounting+preloading (generate config for type checkers)
166-
provide definitions which metadata is available and how it is used ("columns" of Configuration definitions)
167-
168-
community:
169-
make place to share configuration
170-
make place to share plugins
171-
172-
Make Plugins 1st level citizen
173-
plugins should be able to do everything the core can do
174-
(mounting, exceptions, bootstrapping, user/system split)
175-
176-
InternalDatabase: (only for frontend!)
177-
for highlevel kdbGetString, kdbSetString
178-
179-
Lazy+Bind Mounting
180-
makes kdbOpen cheaper (with many plugins)
181-
plugins can have global information bind mounted into their conf
182-
(e.g. /etc/passwd into resolver)
183-
kdbDup to copy current state (avoid multiple bootstrapping)
184-
leaves architecture as is -> possibility for any frontend and caching strategy + plays nicely with recursive plugins
185-
186-
Concurrent Plugin Processing:
187-
The plugins must be processed in the correct sequence because
188-
they change keys and have side effects.
189-
The processing of backends is however
190-
completely independent up to, and after, the commit step.
191-
Each of these two parts can be implemented concurrently.
192-
If any backend fails before commit, special care must be taken so
193-
that no backend commits its changes.
194-
The concurrent processing of the plugins
195-
is possible for both |kdbGet()| and |kdbSet()|.
196-
197-
non-file based storage plugins (backends):
198-
nvram
199-
sql
200-
mmap
201-
filesys
202-
203-
cryptography:
204-
sign modules and check them when kdbOpen
205-
encrypted keys backend
206-
sign+encrypt configurationn
207-
208-
distributed elektra
209-
automatical synchronisation of nodes
210-
211-
typed elektra
212-
typing system with subtyping
213-
dynamic type checking
214-
215-
notification: new notification api (only for frontend!)
216-
for highlevel API
217-
void kdbRegisterCallback(KeySet *interests, u_int32_t diffMask,
218-
KdbCallback *cb, void *userdata);
219-
void kdbUnregisterCallback(KeySet *interests, u_int32_t diffMask,
220-
KdbCallback *cb, void *userdata);
221-
void kdbDeliverEvents(long iterations, int sleep);
222-
223-
clause infos/needs could automatically imply ordering?
224-
225-
libelektra-metadata:
226-
multilanguage comments
227-
type of key (list, int, bool,...)
228-
validator of key (what is valid?)
229-
important? (-20 for optional 20 for must have)
230-
regexpr for keysets
231-
version of key (full.major.minor)
232-
user comments
233-
without any field it will be taken as
234-
comment for every language,
235-
not especially specified
236-
readonly?
237-
dynamic?
238-
persistent?
239-
visibility (enum for groups)
240-
default
241-
type
242-
description
243-
244-
245-
== Multiple Files per Backend ==
246-
247-
The disadvantage of the current situation is that new files are not
248-
tracked automatically (explicit mounting needed).
249-
250-
Storage plugins would need `KeySet` operations like difference to deduce which files to
251-
remove or create.
252-
The previously trivial test if an update is needed or a conflict occurred
253-
may become slow depending on the number
254-
of files involved.
255-
256-
For example, KDE has many configuration files in the path
257-
`~/.kde/share/config`.
258-
In a KDE installation with many programs it
259-
can be up to one thousand individual files.
260-
261-
262-
== User Mount Point Configuration ==
263-
264-
The mountpoint configuration resides only below
265-
system/elektra/mountpoints. We decided against
266-
providing \keyname{user/elektra/mountpoints} because of security concerns.
267-
This issue, however, is solved because of the specification.
268-
Now its possible to specify which namespaces should be used.
269-
270-
Still it must be assured that the user only mounts backends where he or she is
271-
allowed to do so.
272-
The administrator may still want to enforce some user
273-
configuration. But this would be pointless if the user could circumvent
274-
it.
275-
276-
Another open item is how, and if, user's own plugins can be used.
277-
Plugins provided by the user open a door for code injection. These
278-
problems have to be discussed and clarified before any attempts in this
279-
direction are made.
280-
281-
282-
== Distributing Configuration ==
283-
284-
Elektra currently does not provide any distribution or decentralised
285-
features because it does not have any plugins communicating with a
286-
configuration daemon.
287-
These features are supposed to be on a higher level and not in backend
288-
code. Instead, software like Cfengine and Puppet can use Elektra to change local
289-
configuration.
290-
291-
Still, for some setups fetching configuration from other places or even
292-
have a distributed key database is useful.
293-
294-
295-
== Internals ==
296-
297-
BackendCtl:
298-
set and get options dynamically of backends
299-
readonly
300-
transactions
301-
locking (performance)
302-
filesys optimistic lock
303-
304-
support multiple owner at once for kdbGet()/kdbSet()? -> or just set USER env or uid?
305-
allow mounting for users?
306-
307-
308-
= FINISH for 1.0.0 =
309-
31077
only exported symbols should be available
31178
Version info
31279
release
313-
minimize API -> (split core and convenience (e.g. libmetadata)?)
314-
315-
== GOALS for 1.0.0 ==
80+
minimize API -> (split core and convenience like libmetadata)
31681

31782
added API evolution for all parts+declare every API stable+METADATA+CONTRACT stable
318-
finished core plugins: INI, validation, notification
319-
nicely working front-ends+bindings for some projects
320-
321-
322-
323-
== OVERVIEW ==
324-
325-
draw a big picture
32683

32784
make list of all symbols
32885
exported symbols
File renamed without changes.

0 commit comments

Comments
 (0)