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

Commit

Permalink
Merge master into new-backend
Browse files Browse the repository at this point in the history
  • Loading branch information
kodebach committed Nov 24, 2021
2 parents cd33c3b + a454369 commit fa84822
Show file tree
Hide file tree
Showing 106 changed files with 508 additions and 358 deletions.
8 changes: 4 additions & 4 deletions doc/BUILDSERVER.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ that are used in PR's).
It also contains the information on how to build the jobs in the form
of a path that points to a Jenkinsfile containing more detailed instructions.
The job also takes care of handling build artifacts that are archived and
cleaning them out once the PR's are closed and a grace period has expired.
cleaning them out once the PRs are closed and a grace period has expired.

Summarized libelektra's job purpose is to combine the where
(our GIT repository), with a when (tracking changes via polling or webhooks)
Expand Down Expand Up @@ -376,7 +376,7 @@ A `jenkins` user with 47110:47110 ids should be created as this is what is
expected in Docker images.
`useradd -u 47110 jenkins`
Additionally a public key authentication should be set up so the jenkins
master can establish an ssh connection with the node.
master can establish an SSH connection with the node.
If the node should be able to interact with Docker the jenkins user should be
added to the `docker` group.

Expand All @@ -392,7 +392,7 @@ All files and folders in the Node under `/home/jenkins` should be owned by user

Our Jenkins build uses parallel steps inside a single build job to do most of
the work.
To reliable determine which stages failed it is best to look over the build
To reliably determine which stages failed it is best to look over the build
results in the Jenkins Blue Ocean view.
It is the default View opened when accessing the build results from GitHub.
For libelektra the URLs are
Expand Down Expand Up @@ -456,7 +456,7 @@ All Triggers are described in the configuration of the respective build jobs.
The [libelektra](https://build.libelektra.org/job/libelektra/)
build is triggered for all branches of the libelektra repository except for
`debian`.
Additionally all open branches in forks targeting libelektra's repository via
Additionally, all open branches in forks targeting libelektra's repository via
PRs are going to be build.
Pushes to any of those branches will trigger a new build automatically.

Expand Down
123 changes: 67 additions & 56 deletions doc/COMPILE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,30 @@
For the base system you only need [cmake3](https://cmake.org/cmake/help/v3.0/),
[git](https://git-scm.com/), a C99 compiler and essential build tools
(make and some standard Unix tools; alternatively ninja and
clang are also supported but not described here):
clang are also supported but not described here). Those can be installed as follows:

```sh
sudo apt-get install cmake git build-essential
```
- on APT-based systems (Ubuntu, Debian):

Or on RPM based systems (CentOS):
```sh
sudo apt-get install cmake git build-essential
```

```sh
sudo dnf install -y cmake git gcc-c++ make
```
- on RPM-based systems (CentOS, Red Hat Enterprise Linux, Oracle Linux):

Or on macOS, most of the build tools can be obtained by installing Xcode (from the App Store). Other required tools may be installed using [brew](http://brew.sh/). First install brew as described on their website. Then issue the following command to get cmake to complete the basic requirements:
```sh
sudo yum install -y cmake git gcc-c++ make
```

```sh
brew install cmake git
```
- on macOS, most of the build tools can be obtained by installing Xcode (from the App Store). Other required tools may be installed using [brew](http://brew.sh/). First install brew as described on their website. Then issue the following command to get cmake and git in order to complete the basic requirements:

```sh
brew install cmake git
```

## Quick Guide

Run the following commands to compile Elektra with non-experimental
parts where your system happens to fulfil the dependences (continue
parts where your system happens to fulfill the dependencies (continue
reading the rest of the document for details about these steps):

```sh
Expand All @@ -40,7 +42,7 @@ cmake --build build -- -j5
cmake --build build --target run_nokdbtests # optional: run tests
```

The last line only runs tests not writing into your system.
The last line only runs tests without writing onto your system.
See [TESTING](/doc/TESTING.md) for how to run more tests.
Afterwards you can use `sudo make install && sudo ldconfig` to install Elektra.
See [INSTALL](/doc/INSTALL.md) for more information about
Expand All @@ -52,56 +54,65 @@ installation of self-compiled Elektra (such as how to uninstall it).
> If they are not available, some of the functionality gets disabled automatically.
> The core of Elektra never depends on other libraries.
To build documentation you need doxygen (we recommend 1.8.8+), graphviz and [ronn-ng](https://github.com/apjanke/ronn-ng/blob/master/INSTALLING.md):
### Documentation dependencies

```sh
apt-get install doxygen graphviz
gem install ronn-ng -v 0.10.1.pre1
```
To build the documentation you need doxygen (we recommend 1.8.8+), graphviz and [ronn-ng](https://github.com/apjanke/ronn-ng/blob/master/INSTALLING.md). These can be installed as follows:

Or on RPM based systems:
- on APT-based systems (Ubuntu, Debian):

```sh
sudo yum install -y doxygen docbook-style-xsl graphviz ruby
gem install ronn-ng -v 0.10.1.pre1
```
```sh
apt-get install doxygen graphviz
gem install ronn-ng -v 0.10.1.pre1
```

Or on macOS using brew:
- on RPM-based systems (CentOS, Red Hat Enterprise Linux, Oracle Linux):

```sh
brew install doxygen graphviz
brew install ruby # in case ruby is not already installed
gem install ronn-ng -v 0.10.1.pre1
```
```sh
sudo yum install -y doxygen docbook-style-xsl graphviz ruby
gem install ronn-ng -v 0.10.1.pre1
```

To build PDF documentation you need `pdflatex` with
- on macOS using brew:

```sh
apt-get install pdflatex \
texlive-fonts-recommended texlive-fonts-extra \
texlive-latex-recommended texlive-latex-extra \
texlive-math-extra
```
```sh
brew install doxygen graphviz
brew install ruby # in case ruby is not already installed
gem install ronn-ng -v 0.10.1.pre1
```

To build PDF documentation you need `pdflatex`.
You can install it as follows:

- on APT-based systems (Ubuntu, Debian):

```sh
apt-get install pdflatex \
texlive-fonts-recommended texlive-fonts-extra \
texlive-latex-recommended texlive-latex-extra \
texlive-math-extra
```

### Plugin dependencies

For dependencies of plugins, please refer to the [README.md](https://www.libelektra.org/plugins/readme) of the respective plugin.

A small subset of build dependencies to get you started:

- for CentOS:
- on RPM-based systems (CentOS, Red Hat Enterprise Linux, Oracle Linux):

```sh
sudo yum install -y libdb-devel GConf2-devel libxml2-devel yajl-devel \
libcurl-devel augeas-devel libgit2-devel lua-devel swig python34-devel python-devel \
java-1.8.0-openjdk-devel jna ruby-devel byacc
```
```sh
sudo yum install -y libdb-devel GConf2-devel libxml2-devel yajl-devel \
libcurl-devel augeas-devel libgit2-devel lua-devel swig python34-devel python-devel \
java-1.8.0-openjdk-devel jna ruby-devel byacc
```

- for Ubuntu:
- on APT-based systems (Ubuntu, Debian):

```sh
sudo apt install -y libxerces-c-dev libxml2-dev libyajl-dev \
libcurl4-gnutls-dev libaugeas-dev git git-buildpackage dh-lua liblua5.2-dev \
dh-python python3-all python3-dev default-jdk libjna-java ruby-dev flex bison
```
```sh
sudo apt install -y libxerces-c-dev libxml2-dev libyajl-dev \
libcurl4-gnutls-dev libaugeas-dev git git-buildpackage dh-lua liblua5.2-dev \
dh-python python3-all python3-dev default-jdk libjna-java ruby-dev flex bison
```

## Preparation

Expand Down Expand Up @@ -190,7 +201,7 @@ same fashion for `BINDINGS` and `TOOLS`.

Read about available plugins [here](/src/plugins/).

Because the core of elektra is minimal, plugins are needed to
Because the core of Elektra is minimal, plugins are needed to
actually read and write to configuration files (_storage plugins_),
commit the changes (_resolver plugins_, also takes care about how
the configuration files are named) and also do many other
Expand Down Expand Up @@ -305,7 +316,7 @@ The resolver for example distinguish between 3 different kind of flags:
-DPLUGINS="resolver_baseflags_userflags_systemflags"
```

Following baseflags are available:
The following base flags are available:

- `c` for debugging conflicts
- `f` for enabling file locking
Expand Down Expand Up @@ -465,7 +476,7 @@ Continue reading [testing](/doc/TESTING.md) for more information about testing.
#### `CMAKE_INSTALL_PREFIX`

`CMAKE_INSTALL_PREFIX` defaults to `/usr/local`.
So by default most files will installed below `/usr/local`.
So by default most files will be installed below `/usr/local`.
Exceptions to this are files handled by [INSTALL_SYSTEM_FILES](#install_system_files).

Edit that cache entry to change that behavior.
Expand Down Expand Up @@ -512,7 +523,7 @@ If both options are provided the value passed via CMake takes precedence.

[google test]: https://github.com/google/googletest

It is recommended that you browse through all of the options using `ccmake`.
It is recommended that you browse through all the options using `ccmake`.
Afterwards press `c` again (maybe multiple times until all variables are
resolved) and then `g` to generate. Finally press `e` to exit.

Expand Down Expand Up @@ -545,7 +556,7 @@ Currently the installed system files are as following:
#### `ENABLE_OPTIMIZATIONS`

In order to keep the binaries as small as possible this flag allows to trade memory for speed.
In order to keep the binaries as small as possible this flag allows trading memory for speed.

## Building

Expand Down Expand Up @@ -592,7 +603,7 @@ For Unix if you have nCurses install you can run `ccmake` to set important optio
running cmake like to enable debug symbol.

**Note 3:**
for Gentoo is recommend to emerge sys-apps/lsb-release to name the package
For Gentoo it's recommended to emerge sys-apps/lsb-release to name the package
right even thou not required.

## Maintainer's Guide
Expand Down Expand Up @@ -626,7 +637,7 @@ using `TARGET_PLUGIN_FOLDER` and is `elektra` by default. You might
want to encode Elektra’s `SOVERSION` into the folders name, if you want
different major versions of Elektra be co-installable.

Elektra’s use case for `RPATH` is considered acceptable, so we recommend to use it
Elektra’s use case for `RPATH` is considered acceptable, so we recommend using it
because:

- plugins do not clutter the library folder nor the `ld.so.cache`
Expand Down
12 changes: 6 additions & 6 deletions doc/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ This document describes the design of Elektra's C-API and provides hints for
binding writers. It is not aimed at plugin writers, since it does not
talk about the implementation details of Elektra.

Elektra [aims](GOALS.md) at following design principles:
Elektra [aims](GOALS.md) to fulfill the following design principles:

1. To make the API futureproof so that it can remain compatible and stable
1. To make the API future-proof so that it can remain compatible and stable
over a long period of time,
2. to make it hard to use the API the wrong way by making it simple&robust, and
2. to make it hard to use the API the wrong way by making it simple & robust, and
3. to make the API easy to use for programmers reading and writing
configuration.

The C-API is suitable to be reimplemented, also in non-C-languages, like Rust.
Elektra provides a full blown architecture to support configuring systems, and
Elektra provides a full-blown architecture to support configuring systems, and
the C-API is the core of this endeavour.

## Data Structures
Expand All @@ -40,7 +40,7 @@ int kdbClose(KDB *handle);
```
to get rid of the resources again. The second function may also shut
down connections. Therefore it must be called before the end of a program.
down connections. Therefore, it must be called before the end of a program.
```c
Key *keyNew(const char *keyName, ...);
Expand All @@ -52,7 +52,7 @@ int ksDel(KeySet *ks);

In the above pairs, the first function reserves the necessary amount
of memory. The second function frees the allocated data segment. There
are more allocations happening but they are invisible to the user of
are more allocations happening, but they are invisible to the user of
the API and happen implicitly within any of these 3 classes:
`KDB`, `Key` and `KeySet`.

Expand Down
14 changes: 7 additions & 7 deletions doc/GETSTARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@

- Basic knowledge about git

Dont panic! [GIT](https://git-scm.com/) is a distributed version constrol system to track changes of the source code in a project. We will use a single command of GIT to get
Don't panic! [GIT](https://git-scm.com/) is a distributed version control system to track changes of the source code in a project. We will use a single GIT command to get
the source code of Elektra.

- Basic knowledge about make/cmake

[make](https://www.gnu.org/software/make/) or [cmake](https://cmake.org/) are used to generate an executable program from the code. If you are not used to these tools its no problem, we will introduce them to you in later sections.
[make](https://www.gnu.org/software/make/) or [cmake](https://cmake.org/) are used to generate an executable program from the code. If you are not used to these tools, it's not a problem, we will introduce them to you in later sections.

- We need also your skill set to improve Elektra
- We also need your skill set to improve Elektra

You can contribute to Elektra to improve the source code, website, documentation, translation etc.

- Software requirements

We need to install some basic tools to run Elektra: cmake , git , and essential build tools (make, gcc, and some standard Unix tools; alternatively [ninja](https://ninja-build.org/) and [clang](https://clang.llvm.org/index.html) are also supported but not described here). Depending on your linux distribution use following commands to install these tools:
We need to install some basic tools to run Elektra: cmake, git and essential build tools (make, gcc, and some standard Unix tools; alternatively [ninja](https://ninja-build.org/) and [clang](https://clang.llvm.org/index.html) are also supported but not described here). Depending on your Linux distribution use the following commands to install these tools:

```sh
sudo apt-get install cmake git build-essential
Expand All @@ -37,15 +37,15 @@
sudo yum install -y cmake git gcc-c++
```

Or on macOS, most of the build tools can be obtained by installing [Xcode](https://developer.apple.com/xcode/). Other required tools may be installed using [brew ](https://brew.sh/). First install brew as described on their website. Then issue the following command to get cmake to complete the basic requirements:
Or on macOS, most of the build tools can be obtained by installing [Xcode](https://developer.apple.com/xcode/). Other required tools may be installed using [brew](https://brew.sh/). First, install brew as described on their website. Then issue the following command to get cmake to complete the basic requirements:

```sh
brew install cmake git
```

- Installation

If you meet all of the software requirements you can get the source code of Elektra by using this command:
If you meet all the software requirements you can get the source code of Elektra by using this command:

```sh
git clone https://github.com/ElektraInitiative/libelektra.git
Expand All @@ -67,7 +67,7 @@
cmake --build build --target run_nokdbtests
```

With these commands you will be able to run the "Hello World!" example but usually you will need to use some of the [plugins](/src/plugins/README.md), tools and bindings of Elektra. Please take a look at the more detailed [compiling documentation](/doc/COMPILE.md). After you completed building Elektra on your own, you can execute these commands to install Elektra (please check the [installation documentation](/doc/INSTALL.md) for the many available packages):
With these commands you will be able to run the "Hello World!" example, but usually you will need to use some of the [plugins](/src/plugins/README.md), tools and bindings of Elektra. Please take a look at the more detailed [compiling documentation](/doc/COMPILE.md). After you completed building Elektra on your own, you can execute these commands to install Elektra (please check the [installation documentation](/doc/INSTALL.md) for the many available packages):

```sh
sudo make install
Expand Down
4 changes: 2 additions & 2 deletions doc/GOALS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This helps in achieving the following goals:
- Uniformity of configuration access (logging, vcs commit, notifications).
- Syntax of the configuration files (with limitations, see below).

Elektra follows following goals, in order of preference.
Elektra follows the goals below, in order of preference.
If goals conflict, the higher goal takes precedence.

## 0. Stability
Expand Down Expand Up @@ -87,7 +87,7 @@ There are many variants of
- Bindings.

Nearly every aspect of Elektra must be extremely extensible.
On the other side semantics must be very clear and well defined
On the other side semantics must be very clear and well-defined
so that this extensible system works reproducible and predictable.

Only key-value pairs are the common factor and a way to get and set
Expand Down
4 changes: 2 additions & 2 deletions doc/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Otherwise please refer to the section `OS Independent` below.
First follow the steps in [COMPILE](COMPILE.md).

After you completed building Elektra on your own, there are multiple options how to install it. For example, with make or CPack tools.
We recommend to use the packages from our build server or that you generate your own packages with CPack.
We recommend using the packages from our build server or that you generate your own packages with CPack.

### CPack

Expand Down Expand Up @@ -285,7 +285,7 @@ and run `ldconfig` as root.

## Installation Manuals

For some of the plugins and tools that ship with Elektra,
For some plugins and tools that ship with Elektra,
additional installation manuals have been written.
You can find them in the [tutorial overview](tutorials/README.md).

Expand Down
Loading

0 comments on commit fa84822

Please sign in to comment.