diff options
author | Alessio Vanni <vannilla@firemail.cc> | 2021-04-24 17:29:42 +0200 |
---|---|---|
committer | Alessio Vanni <vannilla@firemail.cc> | 2021-04-24 17:29:42 +0200 |
commit | 8233e282046e27de57de75f175e131a974087618 (patch) | |
tree | fba261f13d3a6225221a42082f561a3152969f82 /debian | |
parent | 3cd24823660a0447e590ff352e9da7eb076b292b (diff) | |
download | gnunet-8233e282046e27de57de75f175e131a974087618.tar.gz gnunet-8233e282046e27de57de75f175e131a974087618.zip |
Swap gnunet-config's default behaviour for the rewrite flag
With the previous default, a configuration file could keep values different
from the defaults even when the user did not explicitly edit that option,
potentially leading to buggy behaviour.
For example: GNUnet's version X+1 changes the default value for a certain
option A, but anyone who has edited the configuration file with version X or
earlier, would still have got the old default for A even when updating to
version X+1.
It was possible to write only the edited parts, but that required explicitly
passing the `--rewrite' (or `-w') flag.
The default behaviour has now been swapped so that the resulting file contains
only differences, while a "frozen" configuration is generated with the
`--rewrite' flag.
Also, as it's a minor change: a function used internally by the logging
component was using translated strings to check the requested log level. This
behaviour is buggy as passing an untranslated string to
e.g. `GNUNET_log_setup', while the current locale is different and a
translation for that string exists, would generate a different log level than
the one requested.
Diffstat (limited to 'debian')
-rw-r--r-- | debian/etc/X11/xinit/xinitrc.d/80-gnunet-user-services | 1 | ||||
-rw-r--r-- | debian/gnunet.postinst | 3 |
2 files changed, 0 insertions, 4 deletions
diff --git a/debian/etc/X11/xinit/xinitrc.d/80-gnunet-user-services b/debian/etc/X11/xinit/xinitrc.d/80-gnunet-user-services index aff1dd78c..d780b0e8e 100644 --- a/debian/etc/X11/xinit/xinitrc.d/80-gnunet-user-services +++ b/debian/etc/X11/xinit/xinitrc.d/80-gnunet-user-services | |||
@@ -9,7 +9,6 @@ if [ "$gnunet_proxy" ]; then | |||
9 | port=$((8000+$(id -u "$user"))) | 9 | port=$((8000+$(id -u "$user"))) |
10 | 10 | ||
11 | gnunet-config -c "$HOME/.config/gnunet.conf" \ | 11 | gnunet-config -c "$HOME/.config/gnunet.conf" \ |
12 | --rewrite \ | ||
13 | --section=gns-proxy \ | 12 | --section=gns-proxy \ |
14 | --option=OPTIONS \ | 13 | --option=OPTIONS \ |
15 | --value="-p $port" | 14 | --value="-p $port" |
diff --git a/debian/gnunet.postinst b/debian/gnunet.postinst index 07e5202e8..b6317f5be 100644 --- a/debian/gnunet.postinst +++ b/debian/gnunet.postinst | |||
@@ -149,12 +149,10 @@ EOF | |||
149 | fi | 149 | fi |
150 | port=$((8000+$(id -u "${users[$i]}"))) | 150 | port=$((8000+$(id -u "${users[$i]}"))) |
151 | gnunet-config -c "${homedirs[$i]}/.config/gnunet.conf" \ | 151 | gnunet-config -c "${homedirs[$i]}/.config/gnunet.conf" \ |
152 | --rewrite \ | ||
153 | --section=gns-proxy \ | 152 | --section=gns-proxy \ |
154 | --option=IMMEDIATE_START \ | 153 | --option=IMMEDIATE_START \ |
155 | --value=YES | 154 | --value=YES |
156 | gnunet-config -c "${homedirs[$i]}/.config/gnunet.conf" \ | 155 | gnunet-config -c "${homedirs[$i]}/.config/gnunet.conf" \ |
157 | --rewrite \ | ||
158 | --section=gns-proxy \ | 156 | --section=gns-proxy \ |
159 | --option=OPTIONS \ | 157 | --option=OPTIONS \ |
160 | --value="-p $port" | 158 | --value="-p $port" |
@@ -180,7 +178,6 @@ if [ "$gnunet_proxy" ]; then | |||
180 | port=$((8000+$(id -u $user))) | 178 | port=$((8000+$(id -u $user))) |
181 | 179 | ||
182 | gnunet-config -c $HOME/.config/gnunet.conf \ | 180 | gnunet-config -c $HOME/.config/gnunet.conf \ |
183 | --rewrite \ | ||
184 | --section=gns-proxy \ | 181 | --section=gns-proxy \ |
185 | --option=OPTIONS \ | 182 | --option=OPTIONS \ |
186 | --value="-p $port" | 183 | --value="-p $port" |