gnunet-handbook

The GNUnet Handbook
Log | Files | Refs

commit 16650e0b24e7a497a83d20c01d3dd2f3cbf1cc0e
parent 2374122b23dc130dbc22534d2773b101fb4dcbd0
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Mon,  1 Aug 2022 14:32:39 +0200

readd todo

Diffstat:
ATODO | 10++++++++++
Mman_users/configuration.rst | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 75 insertions(+), 0 deletions(-)

diff --git a/TODO b/TODO @@ -0,0 +1,10 @@ +# TODOs + + * Migrate FAQ from website here. Possibly in the root TOC + * Go over Developer Handbook for consistency/correctness/succinctness + * Key Concepts is very odd. + * Concepts under User Manual -> File-sharing is odd + * "Config leftovers" in texinfo is from previous migrations?? -> moved to "Advanced Configuration" + * Replace "Documentation" sites on website with links here + * Integrate REST API docs under Developer Handbook ? + * "Advanced Configuration" is a sess pool for anything config currently. diff --git a/man_users/configuration.rst b/man_users/configuration.rst @@ -1,6 +1,71 @@ Advanced Configuration ---------------------- + +.. _Config-file-format: + +Config file format +~~~~~~~~~~~~~~~~~~ + +In GNUnet realm, all components obey the same pattern to get +configuration values. According to this pattern, once the component has +been installed, the installation deploys default values in +``$prefix/share/gnunet/config.d/``, in ``.conf`` files. In order to +override these defaults, the user can write a custom ``.conf`` file and +either pass it to the component at execution time, or name it +``gnunet.conf`` and place it under ``$HOME/.config/``. + +A config file is a text file containing sections, and each section +contains its values. The right format follows: + +:: + + [section1] + value1 = string + value2 = 23 + + [section2] + value21 = string + value22 = /path22 + +Throughout any configuration file, it is possible to use ``$``-prefixed +variables, like ``$VAR``, especially when they represent filenames in in +the filesystem. It is also possible to provide defaults values for those +variables that are unset, by using the following syntax: + +:: + + ${VAR:-default} + +However, there are two ways a user can set ``$``-prefixable variables: +(a) by defining them under a ``[paths]`` section + +:: + + [paths] + GNUNET_DEPLOYMENT_SHARED = ${HOME}/shared-data + .. + [section-x] + path-x = ${GNUNET_DEPLOYMENT_SHARED}/x + +or (b) by setting them in the environment + +:: + + $ export VAR=/x + +The configuration loader will give precedence to variables set under +``[path]``, though. + +The utility '\ ``gnunet-config``\ ', which gets installed along with +GNUnet, serves to get and set configuration values without directly +editing the ``.conf`` file. The option '\ ``-f``\ ' is particularly +useful to resolve filenames, when they use several levels of +``$``-expanded variables. See '\ ``gnunet-config --help``\ '. + +Note that, in this stage of development, the file +``$HOME/.config/gnunet.conf`` can contain sections for **all** the +components. .. _The-Single_002dUser-Setup: The Single-User Setup