Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Minor fixes release notes #3641

Merged
merged 7 commits into from
Jan 31, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 26 additions & 23 deletions doc/news/_preparation_next_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,37 @@ You can also read the news [on our website](https://www.libelektra.org/news/0.9.

## Highlights

- Important Breaking Changes to Keynames et al. _[more info](#hl-1)_
- Debian and Fedora Packaging with CPack _[more info](#hl-2)_

### Important Breaking Changes
- Important Breaking Changes to key names et al. _[see below](#hl-1)_
- Debian and Fedora Packaging with CPack _[see below](#hl-2)_

<a id="hl-1"></a>

- The structure of key names has been changed. [more info](#br-1) _(Klemens Böswirth)_ <br/>
### Important Breaking Changes

- The structure of key names has been changed. [see below](#br-1) _(Klemens Böswirth)_ <br/>
**This change breaks mountpoint configurations.**
Please follow the upgrade procedure [below](#mountpoint-upgrade).
- The backend fallback procedure introduced in Elektra 0.8.15 has been removed and the structure of the `warnings` metadata array has been changed. [more info](#br-2) _(Klemens Böswirth)_
Please follow the upgrade procedure [shown below](#mountpoint-upgrade).
- The backend fallback procedure introduced in Elektra 0.8.15 has been removed and the structure of the `warnings` metadata array has been changed. [see below](#br-2) _(Klemens Böswirth)_
- We removed the `ini` plugin (superseded by the TOML plugin), the `null` plugin (superseded by the base64 plugin) and the `tcl` plugin _(Markus Raab, Philipp Gackstatter)_

#### Important Changes to Keynames

<a id="br-1"></a>

There have been significant changes to Elektra's Keynames.
#### Important Changes to Key Names

There have been significant changes to Elektra's key names:

- The most important change is that you now need a `:` after the namespace.
So instead of `system/elektra/version` you have to use `system:/elektra/version`.

- The second big change is to array elements.
From now on `keyNew ("/array/#10", KEY_END)` will create a `Key` with name `/array/#_10`, to make arrays more user-friendly by preserving numerical ordering.

- The whole internal implementation for `keySetName`, `keyAddName`, etc. has been completely rewritten.
If you rely on specific behaviour of Elektra's Keynames and have already taken the two changes above into account, please refer to the newly created [Keyname documentation](../KEYNAMES.md) and [Python reference implementation](../../scripts/keynames.py).
- The whole implementation for `keySetName`, `keyAddName`, etc. has been completely rewritten.
If you rely on specific behaviour of Elektra's key names and have already taken the two changes above into account, please refer to the newly created [key name documentation](../KEYNAMES.md) and [Python reference implementation](../../scripts/keynames.py).

- Metakeys now use the namespace `meta:/`.
The accessor function `keyGetMeta` and `keySetMeta` automatically add this namespace to preserve compatibility.
However, if you use the recently introduced `keyMeta` or otherwise directly access the keyname of a metakey, you will have to update your code.
However, if you use the recently introduced `keyMeta` or otherwise directly access the key name of a metakey, you will have to update your code.

- `default:/` is a new namespace used for keys that exist purely to represent a default value (e.g. generated by the `spec` plugin).

Expand Down Expand Up @@ -74,10 +74,10 @@ There have been significant changes to Elektra's Keynames.

A huge thanks to _(Klemens Böswirth)_ for doing these important changes and clean-ups.

#### Mountpoint upgrade

<a id="mountpoint-upgrade"></a>

#### Mountpoint upgrade

The change to key names breaks existing mountpoint configurations.

It is not hard to fix the mountpoint configs even after the updating to the new version.
Expand All @@ -95,6 +95,8 @@ The second instance, however, must be fixed or Elektra will be unusable.
> **Disclaimer:** We cannot guarantee that the commands below work for all cases.
> We also make no guarantees that the command will not break things.
>
> Please report any [problems](https://issues.libelektra.org/3633).
>
> _You have been warned. Manually backup important data first._

For the migration you can use the following commands:
Expand All @@ -109,18 +111,18 @@ kdb import system:/elektra/mountpoints ni < mountpoints_corrected.ini

> _Note:_ The original `system:/elektra/mountpoints` data will be moved to `system:/elektra/mountpoints-backup`

### Debian and Fedora Packaging with CPack

<a id="hl-2"></a>

### Debian and Fedora Packaging with CPack

We are now using CPack to generate modular Debian, Ubuntu (DEB) and Fedora (RPM) packages. This simplifies the packaging process and solves problems where a PR, which introduces changes to installed files, fails. We can now also set distribution specific dependencies with CPack, which is needed for some packages. _(Robert Sowula)_

We now provide DEB and RPM packages for releases and for every commit on master in our own repositories using CPack for:

- DEB packages for Debian Buster
- DEB packages for Ubuntu Bionic
- DEB packages for Ubuntu Focal
- RPM packages for Fedora 33.
- RPM packages for Fedora 33

A big thanks to _(Robert Sowula)_ for introducing CPack and creating the repositories.

Expand Down Expand Up @@ -157,7 +159,7 @@ The 0.9.\* series of Elektra is for development of Elektra 1.0.
Elektra 1.0 will be incompatible to 0.8 and as such, we need a SO version bump.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment actually refers to line 146:
Is there a reason why the the RPM instruction are in the DEB instructions block? They both also begin with 2..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to shorten it even more but I agree it might be a bit confusing. Note that it actually renders 2x "2.", so it is somewhat clear that only one of the second steps should be done. But please feel free to improve, simply push to this branch.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the installation guide a bit, I'm not sure if the additional headers are the right way, but it looks IMO a bit more structured. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually misunderstood which text belongs to DEB and what to RPM. Thank you for fixing it!

We used this release to bump the SO version from 4 to 5 due to the breaking changes that are not visible in the API.

> Note, that within 0.9.\* we likely introduce further breaking changes but we will not bump the SO version again.
> _Note:_ that within 0.9.\* we likely introduce further breaking changes but we will not bump the SO version again.

The package names which consist of the SO Version also changed from libelektra4\* to libelektra5\*.
If you used our previous repository with master built packages, please make sure to migrate to our new package repositories described above or in our [install documentation](../INSTALL.md).
Expand All @@ -168,7 +170,7 @@ A big thanks to _(Robert Sowula)_ for doing the necessary renamings.

## Plugins

The following section lists news about the [modules](https://www.libelektra.org/plugins/readme) we updated in this release.
The following section lists news about the [plugins](https://www.libelektra.org/plugins/readme) we updated in this release.

### jni

Expand Down Expand Up @@ -206,7 +208,7 @@ The text below summarizes updates to the [C (and C++)-based libraries](https://w

- We removed the fallback procedure introduced in Elektra 0.8.15 (using `KDB_DB_FILE` (`default.ecf`) for `system:/elektra`, if the bootstrap backend `KDB_DB_INIT` (`elektra.ecf`) isn't found).
If you still rely on this feature, either use `kdb upgrade-bootstrap` **before** upgrading, or manually extract `system:/elektra` into `elektra.ecf`.
- There was an internal update to how warnings are generated.
- There was an update to how warnings are generated.
For users this means that the `warnings` metadata now forms a proper array.
Specifically, the first 100 warnings are stored below to the meta keys `warnings/#0`, `warnings/#1`, ..., `warnings/#9`, `warnings/#_10`, ..., `warnings/#_99`.
After that, warnings will wrap around, so the 101st warning will be stored as `warnings/#0`, 102nd as `warnings/#1` etc.
Expand Down Expand Up @@ -244,6 +246,7 @@ you up to date with the multi-language support provided by Elektra.

## Tools

- The kdb cmd-line tool outputs better error messages on wrong names like `user` or `user:` as `user:/` is now required. _(Markus Raab)_
- The QtGUI was updated to be compatible with the new key name structure. _(Klemens Böswirth)_

## Scripts
Expand All @@ -253,7 +256,7 @@ you up to date with the multi-language support provided by Elektra.

## Documentation

- Finalize 1.0 decisions. _(Markus Raab)_
- Finalize 1.0 [decisions](/doc/decisions). _(Markus Raab)_
- Update [API design document](/doc/DESIGN.md) _(Markus Raab and Stefan Hanreich)_
- Update [release instructions](../todo/RELEASE) _(Robert Sowula)_
- Changed API documentation terms [current, latest] to [latest, master].
Expand Down Expand Up @@ -342,7 +345,7 @@ The [hashsums are:](https://github.com/ElektraInitiative/ftp/blob/master/release

<<`scripts/generate-hashsums elektra-0.9.<<VERSION>>.tar.gz`>>

The release tarball is also available signed by Markus Raab using GnuPG from
The release tarball is also available signed by Mihael Pranjić using GnuPG from
[here](https://www.libelektra.org/ftp/elektra/releases/elektra-0.9.<<VERSION>>.tar.gz.gpg) or on
[GitHub](https://github.com/ElektraInitiative/ftp/blob/master/releases/elektra-0.9.<<VERSION>>.tar.gz.gpg?raw=true)

Expand Down
4 changes: 2 additions & 2 deletions doc/todo/NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ This is the quickest way to get started with Elektra without compiling and other

## Plugins

The following section lists news about the [modules](https://www.libelektra.org/plugins/readme) we updated in this release.
The following section lists news about the [plugins](https://www.libelektra.org/plugins/readme) we updated in this release.

### <<Plugin1>>

Expand Down Expand Up @@ -208,7 +208,7 @@ The [hashsums are:](https://github.com/ElektraInitiative/ftp/blob/master/release

<<`scripts/generate-hashsums elektra-0.9.<<VERSION>>.tar.gz`>>

The release tarball is also available signed by Markus Raab using GnuPG from
The release tarball is also available signed using GnuPG from
[here](https://www.libelektra.org/ftp/elektra/releases/elektra-0.9.<<VERSION>>.tar.gz.gpg) or on
[GitHub](https://github.com/ElektraInitiative/ftp/blob/master/releases/elektra-0.9.<<VERSION>>.tar.gz.gpg?raw=true)

Expand Down
2 changes: 2 additions & 0 deletions scripts/cmake/ElektraCache.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ mark_as_advanced (
XercesC_DIR
OPENSSL_INCLUDE_DIR
LUA_EXECUTABLE # The following settings are internal (not to be changed by users):
FEDORA
CARGO_EXECUTABLE
DIFF_COMMAND
GLib_CONFIG_INCLUDE_DIR
Expand Down Expand Up @@ -441,6 +442,7 @@ mark_as_advanced (
ADDED_DIRECTORIES
ADDED_PLUGINS
REMOVED_PLUGINS
REMOVED_TOOLS
ADDED_BINDINGS
LIBGCRYPTCONFIG_EXECUTABLE
jna
Expand Down
12 changes: 6 additions & 6 deletions src/bindings/cpp/include/key.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ inline Key::Key (Key const & k) : key (k.key)
/**
* @copydoc keyNew
*
* @throw bad_alloc if key could not be constructed (allocation problems)
* @throw KeyInvalidName if key could not be constructed
*
* @param keyName the name of the new key
*/
Expand All @@ -611,15 +611,15 @@ inline Key::Key (const char * keyName, ...)
key = ckdb::keyVNew (keyName, ap);
va_end (ap);

if (!key) throw KeyInvalidName (keyName, "");
if (!key) throw KeyInvalidName (keyName, "A key name consists of [<namespace>:]/<path>.");

operator++ ();
}

/**
* @copydoc keyNew
*
* @throw bad_alloc if key could not be constructed (allocation problems)
* @throw KeyInvalidName if key could not be constructed
*
* @warning Not supported on some compilers, e.g.
* clang which requires you to only pass non-POD
Expand All @@ -635,15 +635,15 @@ inline Key::Key (const std::string keyName, ...)
key = ckdb::keyVNew (keyName.c_str (), ap);
va_end (ap);

if (!key) throw std::bad_alloc ();
if (!key) throw KeyInvalidName (keyName, "A key name consists of [<namespace>:]/<path>.");

operator++ ();
}

/**
* @copydoc keyNew
*
* @throw bad_alloc if key could not be constructed (allocation problems)
* @throw KeyInvalidName if key could not be constructed
*
* @param keyName the name of the new key
* @param ap the variable argument list pointer
Expand All @@ -652,7 +652,7 @@ inline Key::Key (const char * keyName, va_list ap)
{
key = ckdb::keyVNew (keyName, ap);

if (!key) throw std::bad_alloc ();
if (!key) throw KeyInvalidName (keyName, "A key name consists of [<namespace>:]/<path>.");

operator++ ();
}
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/cpp/tests/testcpp_key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ TEST (key, valid)

for (auto & invalid_name : invalid_names)
{
EXPECT_THROW (Key (invalid_name, KEY_END), std::bad_alloc);
EXPECT_THROW (Key (invalid_name, KEY_END), kdb::KeyInvalidName);
}

Key v1 ("user:/", KEY_END);
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/swig/ruby/kdb.i
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ the original C++ class in the following aspects:
%catches (kdb::KeyTypeMismatch, kdb::KeyException) kdb::Key::getString;
%catches (kdb::KeyTypeMismatch, kdb::KeyException) kdb::Key::getBinary;

%catches (std::bad_alloc) kdb::Key::Key;
%catches (kdb::KeyInvalidName) kdb::Key::Key;


/* ignore certain methods */
Expand Down