pEpEngine/db
positron 3095f39fec fix ENGINE-956
It is now possible to use shell environment variables in PER_USER_DIRECTORY and
PER_MACHINE_DIRECTORY, expanded at *run* time.  This is meant to allow more
freedom to the deployment engineer, without affecting development.  Notice that,
when PER_USER_DIRECTORY and PER_MACHINE_DIRECTORY are defined in the Makefile,
dollar signs must be escaped (a dollar becomes a double dollar) because of
*make* syntax: this has nothing to do with pEp engine code.
Expansion follows the Unix shell $VARIABLE syntax: ${VARIABLE} is not supported.
See _expand_variables.

src/platform_unix.c contained some duplicated logic about caching path results
into static variables; this change set would have added to the complexity by
calling the new path expansion function, in many different places.  Seize the
occasion for factoring.

Do not change the meaning of PER_USER_DIRECTORY yet; I would like to do it,
since it is confusing and inconsistent with per_user_directory
(PER_USER_DIRECTORY is a relative path on Unix, while per_user_directory is
absolute), but the actual semantics with respect to $HOME and $PEP_HOME is
complicated and I do not want to break it.
New API function per_user_relative_directory.

Remove the ugly "reset" argument from unix_local_db (which was conditionally
defined according to NDEBUG!), used to force path re-computation in the test
suite after changing an environment variable so as to work in a new "home"
directory.  In the place of this reset argument add clear API functions to the
engine for handling the cache.
My quick grapping and IRC interaction confirm that nobody was using the
functionality out of the engine test suite.  Adapt the test suite to use the new
API.

Tentatively add caching and expansion functionality to android_system_db as well.
2021-09-07 17:26:35 +02:00
..
Makefile fix ENGINE-956 2021-09-07 17:26:35 +02:00
ca.csv corrected ca, es, fr & tr Trustword to 65536 words (aka cosmetics) 2016-12-09 22:39:12 +01:00
create_system_db.sql ENGINE-201 trustwords, not simply woorden 2017-05-12 18:07:54 +02:00
csv2csv.py adding license info to each file 2016-12-27 21:13:41 +01:00
de.csv dicts for en and de 2015-10-05 01:26:09 +02:00
dic2csv.py adding license info to each file 2016-12-27 21:13:41 +01:00
en.csv Tr0ub4dor&3 2016-06-29 23:42:23 +02:00
es.csv corrected ca, es, fr & tr Trustword to 65536 words (aka cosmetics) 2016-12-09 22:39:12 +01:00
fr.csv corrected ca, es, fr & tr Trustword to 65536 words (aka cosmetics) 2016-12-09 22:39:12 +01:00
make_systemdb.cmd adding license info to each file 2016-12-27 21:13:41 +01:00
mkpass adding license info to each file 2016-12-27 21:13:41 +01:00
nl.csv added Dutch (nl) Trustwords 2016-12-11 22:50:28 +01:00
sort.py adding license info to each file 2016-12-27 21:13:41 +01:00
tr.csv corrected ca, es, fr & tr Trustword to 65536 words (aka cosmetics) 2016-12-09 22:39:12 +01:00
trustwords.py adding license info to each file 2016-12-27 21:13:41 +01:00