View Issue Details

IDProjectCategoryView StatusLast Update
0004555GNUnetutil librarypublic2018-06-06 22:58
Reportertg Assigned ToChristian Grothoff Due Date
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product VersionGit master 
Fixed in Version0.11.0pre66 
Summary0004555: config variable expansion not working
DescriptionExpansion of variables defined in the [PATH] section does not always work.

It works in the [arm] section in GLOBAL_POSTFIX:

[arm]
GLOBAL_POSTFIX = -l $GNUNET_CACHE_HOME/{}-%F.%T-[].log

But not in other service sections when used in OPTIONS:

[social]
OPTIONS = -L DEBUG -l $GNUNET_CACHE_HOME/{}-%F.%T-[].log

---

UPDATE: after the fix for either 0004545 or 0004546 it does not work anymore in either case.
TagsNo tags attached.

Activities

Christian Grothoff

2016-06-02 15:28

manager   ~0010850

I've tested it, $-expansion works for me as expected.

tg

2016-06-02 23:27

reporter   ~0010853

double-checked with the config above, definitely not working here.
a ~/$GNUNET_CACHE_HOME (literally like this)
directory is created when I put it in either GLOBAL_POSTFIX or OPTIONS

defanor

2016-07-08 19:33

reporter   ~0010981

Doesn't seem to work properly in the [arm] section here, with gnunet 0.10.1:

----gnunet.conf----
[PATHS]
GNUNET_HOME = ~/gnunet_peer2/

[arm]
DEFAULTSERVICES =
UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-armi-p2.sock

GLOBAL_POSTFIX = -L WARNING -l $GNUNET_HOME/gnunet.log
----eof----

This leads to the "-l _HOME/gnunet.log" option.

Christian Grothoff

2017-02-21 17:43

manager   ~0011821

Ah, but note that we do not generally expand all options just because they contain a "$". We ONLY do the $-expansion if the application expects a FILENAME, i.e. if GNUNET_CONFIGURATION_get_value_filename() is used. If the code uses GNUNET_CONFIGURATION_get_value_string(), $-expansion is *intentionally* not applied, as doing so can also break things (TM).

So really the issue here is a missmatch between what you expect (and it is perfectly reasonable to expect $-expansion for GLOBAL_POSTFIX), and what configuration does by definition. I *think* we might revise what configuration does by definition a bit, but it's tricky as $-expansion does more than substituting $PATHs, and so blinding doing it will break more than it fixes.

Issue History

Date ModifiedUsernameFieldChange
2016-06-01 22:29tgNew Issue
2016-06-01 22:29tgAssigned To => Christian Grothoff
2016-06-01 22:29tgStatusnew => assigned
2016-06-02 15:28Christian GrothoffNote Added: 0010850
2016-06-02 15:29Christian GrothoffAssigned ToChristian Grothoff => tg
2016-06-02 15:29Christian GrothoffStatusassigned => feedback
2016-06-02 15:29Christian GrothoffProduct Version => Git master
2016-06-02 15:29Christian GrothoffTarget Version => 0.11.0pre66
2016-06-02 23:27tgNote Added: 0010853
2016-06-02 23:27tgStatusfeedback => assigned
2016-07-08 19:33defanorNote Added: 0010981
2017-02-21 17:43Christian GrothoffNote Added: 0011821
2017-02-21 17:43Christian GrothoffAssigned Totg => Christian Grothoff
2017-02-26 00:34Christian GrothoffAssigned ToChristian Grothoff =>
2017-02-26 00:34Christian GrothoffStatusassigned => acknowledged
2017-02-26 00:34Christian GrothoffTarget Version0.11.0pre66 =>
2018-06-06 22:58Christian GrothoffAssigned To => Christian Grothoff
2018-06-06 22:58Christian GrothoffStatusacknowledged => closed
2018-06-06 22:58Christian GrothoffResolutionopen => no change required
2018-06-06 22:58Christian GrothoffFixed in Version => 0.11.0pre66