Skip to content

Commit

Permalink
fix: use plugin in name for resolver and storage (ElektraInitiative#3486
Browse files Browse the repository at this point in the history
)
  • Loading branch information
tmakar committed May 9, 2023
1 parent 7c882f8 commit 3769678
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions doc/dev/algorithm.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ finally returns a `KDB` object that contains all this information.

The reading of the mount point configuration and the consequential self
configuring of the system is called _bootstrapping_. Elektra builds
itself up with a default backend (consisting of `libelektra-resolver`
and `libelektra-storage`).
itself up with a default backend (consisting of `libelektra-plugin-resolver`
and `libelektra-plugin-storage`).
[Read more about bootstrapping here](/doc/help/elektra-bootstrapping.md)

`kdbOpen()` creates a `Split` object. It adds all backend handles and
Expand Down
2 changes: 1 addition & 1 deletion doc/help/elektra-bootstrapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ they write into the configuration file `KDB_DB_INIT` (`elektra.ecf` by default).

Thus for full and static build variants an exchange at run-time is not possible.
Using shared libraries, however, `KDB_STORAGE` and `KDB_RESOLVER` are actually
symbolic links (`libelektra-resolver.so` and `libelektra-storage.so`) to concrete plugins
symbolic links (`libelektra-plugin-resolver.so` and `libelektra-plugin-storage.so`) to concrete plugins
and thus can be changed without recompilation.

The **init backend** is guaranteed to stay mounted at
Expand Down
2 changes: 1 addition & 1 deletion doc/help/kdb-convert.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This command uses plugins to specify and convert between formats, it is only lim
Where `import-format` is the format that the current configuration file is using, `export-format` is the format the user wishes to convert it to, `import-file` is the full path to the current configuration file, and `export-file` is where the converted configuration file should be saved.

If either `import-format` or `export-format` is not specified, the `storage` plugin will be used instead.
The `storage` plugin can be configured at compile-time or changed by the link `libelektra-storage.so`.
The `storage` plugin can be configured at compile-time or changed by the link `libelektra-plugin-storage.so`.
If either `import-file` or `export-file` are not specified, `stdin` and `stdout` are used respectively.

## OPTIONS
Expand Down
2 changes: 1 addition & 1 deletion doc/help/kdb-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Where `path` is the destination where the user wants to edit keys and `format` is the format in which the keys should be edited.
If the `format` argument is not passed, then the default format will be used as determined by the value of the `sw/kdb/current/format` key.
By default, that key contains `storage`.
The `storage` plugin can be configured at compile-time or changed by the link `libelektra-storage.so`.
The `storage` plugin can be configured at compile-time or changed by the link `libelektra-plugin-storage.so`.
The `format` attribute relies on Elektra’s plugin system to properly import the configuration. The user can view all plugins available for use by running the kdb-plugin-list(1) command.
To learn about any plugin, the user can simply use the kdb-plugin-info(1) command.

Expand Down
2 changes: 1 addition & 1 deletion doc/help/kdb-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This command can also be used to view full key(s) including their values.<br>
Where `source` is the path of the key(s) you want to export.
Additionally, the user can specify a format to use by passing it as the option argument `format`.<br>
The `format` attribute relies on Elektra’s plugin system to export the keys in the desired format.The user can view all plugins available for use by running the kdb-plugin-list(1) command. To learn about any plugin, the user can simply use the kdb-plugin-info(1) command.<br>
The `storage` plugin can be configured at compile-time or changed by the link `libelektra-storage.so`.
The `storage` plugin can be configured at compile-time or changed by the link `libelektra-plugin-storage.so`.

## OPTIONS

Expand Down
2 changes: 1 addition & 1 deletion doc/help/kdb-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This command allows a user to import an existing configuration into the key data
The configuration that the user wants to import is read from `stdin`.
The user should specify the format that the current configuration or keys are in, otherwise the default format will be used.
The default format is `storage` but can be changed by editing the value of the `/sw/elektra/kdb/#0/current/format` key.
The `storage` plugin can be configured at compile-time or changed by the link `libelektra-storage.so`.
The `storage` plugin can be configured at compile-time or changed by the link `libelektra-plugin-storage.so`.

## CONFLICTS

Expand Down
6 changes: 3 additions & 3 deletions doc/news/2016-04-29_0.8.16.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ without a crypto provider selected.
- `/usr/lib/elektra4/libelektra-curlget.so*`
- `/usr/lib/elektra4/libelektra-dpkg.so*`
- `/usr/lib/elektra4/libelektra-profile.so*`
- `/usr/lib/elektra4/libelektra-resolver_fm_hpu_b.so`
- `/usr/lib/elektra4/libelektra-plugin-resolver_fm_hpu_b.so`
- `/usr/lib/elektra4/libelektra-shell.so*`

more new files with ALL or EXPERIMENTAL:
Expand All @@ -303,8 +303,8 @@ Following Plugins are excluded on specific platforms:

### new symlinks:

- /usr/lib/elektra4/libelektra-storage.so
- /usr/lib/elektra4/libelektra-resolver.so
- /usr/lib/elektra4/libelektra-plugin-storage.so
- /usr/lib/elektra4/libelektra-plugin-resolver.so

### new releases

Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/contributing-clion.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ link for further information.
### Resolving Missing \*.so Library Error In Debug Mode

In case you fail to run Elektra with the message like this one
`Reason: of module: libelektra-resolver.so, because: libelektra-resolver.so: cannot open shared object file: No such file or directory`
`Reason: of module: libelektra-plugin-resolver.so, because: libelektra-plugin-resolver.so: cannot open shared object file: No such file or directory`
you can solve it by defining the LD_LIBRARY_PATH variable directly in CLion.
Click on the debug configurations dropdown in the upper right corner and choose 'Edit Configurations...'.
Then find 'Environmental Variables' field and add the following:
Expand Down
4 changes: 2 additions & 2 deletions scripts/change-resolver-symlink.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [ "$?" -ne 0 ]; then
echo "$RESOLVER is not a valid resolver"
exit 1
else
unlink "${WORKINGDIR}/libelektra-resolver.so" > /dev/null 2>&1
ln -srL "${WORKINGDIR}/libelektra-${RESOLVER}.so" "${WORKINGDIR}libelektra-resolver.so" > /dev/null 2>&1
unlink "${WORKINGDIR}/libelektra-plugin-resolver.so" > /dev/null 2>&1
ln -srL "${WORKINGDIR}/libelektra-plugin-${RESOLVER}.so" "${WORKINGDIR}libelektra-plugin-resolver.so" > /dev/null 2>&1
fi
exit 0
4 changes: 2 additions & 2 deletions scripts/change-storage-symlink.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [ "$?" -ne 0 ]; then
echo "$STORAGE is not a valid storage plugin"
exit 1
else
unlink "${WORKINGDIR}/libelektra-storage.so" > /dev/null 2>&1
ln -srL "${WORKINGDIR}/libelektra-${STORAGE}.so" "${WORKINGDIR}/libelektra-storage.so" > /dev/null 2>&1
unlink "${WORKINGDIR}/libelektra-plugin-storage.so" > /dev/null 2>&1
ln -srL "${WORKINGDIR}/libelektra-plugin-${STORAGE}.so" "${WORKINGDIR}/libelektra-plugin-storage.so" > /dev/null 2>&1
fi
exit 0
2 changes: 1 addition & 1 deletion scripts/cmake/Modules/LibAddPlugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ function (add_plugin PLUGIN_SHORT_NAME)
if (BUILD_SHARED)
add_library (${PLUGIN_NAME} MODULE ${ARG_SOURCES} ${ARG_OBJECT_SOURCES})
# TODO: switch to -plugin- in CMake targets
set_target_properties (${PLUGIN_NAME} PROPERTIES OUTPUT_NAME "plugin-${PLUGIN_NAME}")
set_target_properties (${PLUGIN_NAME} PROPERTIES OUTPUT_NAME "elektra-plugin-${PLUGIN_NAME}")

if (ARG_DEPENDS)
add_dependencies (${PLUGIN_NAME} ${ARG_DEPENDS})
Expand Down
2 changes: 1 addition & 1 deletion scripts/cmake/Modules/PackagingFedora.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ set (

if (CPACK_PACKAGE_ARCHITECTURE MATCHES "x86_64")
# workaround because rpm autoprov doesn't include symlinks
set (CPACK_RPM_LIBELEKTRA${SO_VERSION}_PACKAGE_PROVIDES "libelektra-resolver.so()(64bit), libelektra-storage.so()(64bit)")
set (CPACK_RPM_LIBELEKTRA${SO_VERSION}_PACKAGE_PROVIDES "libelektra-plugin-resolver.so()(64bit), libelektra-plugin-storage.so()(64bit)")
endif ()

set (CPACK_RPM_LIBELEKTRA${SO_VERSION}_PACKAGE_NAME "${CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}_DISPLAY_NAME}")
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ endif ()

if (BUILD_SHARED)
mkdir (${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
create_lib_symlink (libelektra-${KDB_DEFAULT_STORAGE}.so libelektra-storage.so libelektra${SO_VERSION} PLUGIN)
create_lib_symlink (libelektra-plugin-${KDB_DEFAULT_STORAGE}.so libelektra-plugin-storage.so libelektra${SO_VERSION} PLUGIN)

create_lib_symlink (libelektra-${KDB_DEFAULT_RESOLVER}.so libelektra-resolver.so libelektra${SO_VERSION} PLUGIN)
create_lib_symlink (libelektra-plugin-${KDB_DEFAULT_RESOLVER}.so libelektra-plugin-resolver.so libelektra${SO_VERSION} PLUGIN)
endif (BUILD_SHARED)

0 comments on commit 3769678

Please sign in to comment.