Commit Graph

17 Commits

Author SHA1 Message Date
Paul Gardner-Stephen
b5eedaac3a add container path prefix when generating serval etc paths 2022-05-31 16:34:52 +09:30
Andrew Bettison
faa0f392c5 Improve Rhizome DB path configuration
Change the default 'rhizome.datastore_path' to "rhizome", ie, a sub-
directory of the instance directory.

Add a new erename() operation to "os.h".

Clean up the code around the fix 39f582cca (two commits ago) for a bug
introduced in 2014: the 'rhizome.db' file was always being created in
the instance directory, regardless of the setting of the
'rhizome.datastore_path' config option.

Whenever the Rhizome database is opened (by the server or by a CLI
invocation), if the database file does not exist but there is a
'rhizome.db' file in the legacy location, then move that file (and any
accompanying "blob" and "hash" sub-directories) to the configured
location.

Update copyright notices.
2018-04-17 12:01:02 +09:30
Jeremy Lakeman
59b6a70374 Use config to set and remember rhizome database location 2018-04-10 10:52:44 +09:30
Andrew Bettison
1efe6686fc Use config.h instead of -DHAVE_FOO=1
swiftc(1) requires every -D option to be prefixed with -Xcc, which
is not easy to achieve using autoconf.

Now instead of setting configuration macros like HAVE_LSEEK64 on the
command line using -D, they are defined in config.h, which is generated
by ./configure, ignored by Git, and included by all headers and source
files that use any configuration macro.

The dependency on Makefile has been replaced with a dependency on
Makefile.in and config.h, which helps avoid some redundant full
recompiles after running ./configure, because the configure script
does not overwrit config.h if its content does not change.
2016-10-19 16:27:20 +10:30
Andrew Bettison
42f62d2b8b Move JNI setInstancePath() into own source file 2016-10-19 16:26:00 +10:30
Jeremy Lakeman
b5c62a19d5 Add Java API for setting the instance path 2016-01-18 13:22:36 +10:30
Andrew Bettison
a060642fdb Add strbuf_local_buf() macro 2015-11-02 10:11:41 +10:30
Jeremy Lakeman
00a2ea2913 Ignore potential race condition between setting up instance path and first log message 2015-08-24 16:38:55 +09:30
Andrew Bettison
21f51965c1 Overhaul Makefile and header files
Make .o files in separate subdirectories for servald and library
Factor struct __sourceloc and __WHENCE__ from "log.h" into "whence.h"
Factor sid_t etc from "serval.h" into "serval_types.h"
Factor rhizome_bid_t etc from "rhizome.h" into "rhizome_types.h"
Do not include "serval.h" in library sources
Add log_stderr.c and logMessage.c for stand-alone executables
2014-05-26 15:36:26 +09:30
Andrew Bettison
ba44088eb8 Move Android INSTANCE_PATH from instance.c to Android.mk 2014-03-26 16:07:28 +10:30
Andrew Bettison
53c1b1c04c Filesystem Heirarchy Standard (FHS) paths
If no instance directory specified, then use paths like
/etc/serval/serval.conf
/var/cache/serval
/var/log/serval
/var/run/serval
etc. for files, instead of all in a single directory.

Log all directory creation as INFO messages.

Interpretation of log.file.directory_path has changed slightly.

Updated servald configuration tech doc.
2014-03-26 15:35:43 +10:30
Andrew Bettison
d228165814 New "instance.h" header
Remove unused
2014-03-24 15:29:57 +10:30
Andrew Bettison
4937757d36 Improve Serval instance path operations
Replace form_serval_instance_path(), which takes a single 'path'
argument, with formf_serval_instance_path() and
vformf_serval_instance_path(), which take printf(3)-like arguments.
This supports more flexible instance path file names.

FORM_SERVAL_INSTANCE_PATH() macro works as before, but reimplemented
2013-09-19 17:19:37 +09:30
Andrew Bettison
2b3119b49b Issue #20: merge branch 'sockets' into 'development'
Daniel's improvements to the local file/abstract socket code, with many
improvements to bring it up to date.
2013-09-19 04:30:14 +09:30
Andrew Bettison
c11ec7e8bf Improve form_serval_instance_path() error message 2013-04-04 17:46:09 +10:30
Andrew Bettison
65f6e88e67 Add emkdirs() and emkdirsn() 2013-04-04 17:37:49 +10:30
Andrew Bettison
caa209fc1d Integrate new config into servald
Not passing any tests yet, but compiles and links and simple uses do not
SEGV.
2012-12-04 14:12:28 +10:30