[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r30039 - in gnunet: . src/arm src/ats src/consensus src/con
From: |
gnunet |
Subject: |
[GNUnet-SVN] r30039 - in gnunet: . src/arm src/ats src/consensus src/conversation src/core src/datastore src/dht src/dns src/dv src/experimentation src/fs src/gns src/hostlist src/identity src/include src/mesh src/multicast src/namestore src/nat src/nse src/peerinfo src/psyc src/psycstore src/regex src/revocation src/scalarproduct src/set src/statistics src/template src/testbed src/testing src/transport src/util src/vpn |
Date: |
Wed, 9 Oct 2013 12:05:42 +0200 |
Author: grothoff
Date: 2013-10-09 12:05:42 +0200 (Wed, 09 Oct 2013)
New Revision: 30039
Modified:
gnunet/README
gnunet/src/arm/arm.conf.in
gnunet/src/arm/gnunet-arm.c
gnunet/src/arm/test_arm_api_data.conf
gnunet/src/ats/ats.conf.in
gnunet/src/ats/test_ats_api.conf
gnunet/src/ats/test_ats_mlp.conf
gnunet/src/consensus/consensus.conf.in
gnunet/src/consensus/test_consensus.conf
gnunet/src/conversation/conversation.conf.in
gnunet/src/core/core.conf.in
gnunet/src/core/test_core_api_send_to_self.conf
gnunet/src/datastore/datastore.conf.in
gnunet/src/dht/dht.conf.in
gnunet/src/dns/dns.conf.in
gnunet/src/dv/dv.conf.in
gnunet/src/experimentation/experimentation.conf.in
gnunet/src/fs/fs.conf.in
gnunet/src/fs/test_pseudonym_data.conf
gnunet/src/gns/gns.conf.in
gnunet/src/gns/test_gns_simple_lookup.conf
gnunet/src/hostlist/hostlist.conf
gnunet/src/identity/identity.conf.in
gnunet/src/include/gnunet_configuration_lib.h
gnunet/src/include/gnunet_crypto_lib.h
gnunet/src/include/gnunet_disk_lib.h
gnunet/src/mesh/mesh.conf.in
gnunet/src/multicast/multicast.conf.in
gnunet/src/namestore/namestore.conf.in
gnunet/src/nat/test_nat_data.conf
gnunet/src/nse/nse.conf.in
gnunet/src/peerinfo/peerinfo.conf.in
gnunet/src/psyc/psyc.conf.in
gnunet/src/psyc/test_psyc.conf
gnunet/src/psycstore/psycstore.conf.in
gnunet/src/psycstore/test_psycstore.conf
gnunet/src/regex/regex.conf.in
gnunet/src/revocation/revocation.conf.in
gnunet/src/scalarproduct/scalarproduct.conf.in
gnunet/src/set/set.conf.in
gnunet/src/set/test_set.conf
gnunet/src/statistics/gnunet-service-statistics.c
gnunet/src/statistics/statistics.conf.in
gnunet/src/template/template.conf
gnunet/src/testbed/gnunet-daemon-testbed-blacklist.c
gnunet/src/testbed/test_testbed_api_barriers.conf.in
gnunet/src/testbed/testbed.conf.in
gnunet/src/testing/testing.c
gnunet/src/transport/plugin_transport_http_server.c
gnunet/src/transport/transport.conf.in
gnunet/src/util/configuration.c
gnunet/src/util/disk.c
gnunet/src/util/os_installation.c
gnunet/src/util/resolver.conf.in
gnunet/src/util/test_disk.c
gnunet/src/util/util.conf
gnunet/src/vpn/vpn.conf.in
Log:
migrating towards XDG configuration specification (#3000)
Modified: gnunet/README
===================================================================
--- gnunet/README 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/README 2013-10-09 10:05:42 UTC (rev 30039)
@@ -46,6 +46,7 @@
- libunistring >= 0.9.2
- gnutls >= 2.12.0
- libidn >= 1.0
+- libglpk >= 4.45
- openssl >= 1.0 (binary, used to generate X.509 certificate)
- libltdl >= 2.2 (part of GNU libtool)
- sqlite >= 3.8 (default database, required)
Modified: gnunet/src/arm/arm.conf.in
===================================================================
--- gnunet/src/arm/arm.conf.in 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/arm/arm.conf.in 2013-10-09 10:05:42 UTC (rev 30039)
@@ -2,7 +2,6 @@
[arm]
@UNIXONLY@ PORT = 2087
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-arm
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
@@ -16,7 +15,7 @@
# service. Thus the following option would introduce per-service
# logging with a new log file each day. Note that only the last 3
# log files are preserved.
-# GLOBAL_POSTFIX = -l $SERVICEHOME/{}-%Y-%m-%d.log
+# GLOBAL_POSTFIX = -l $GNUNET_CACHE_HOME/{}-%Y-%m-%d.log
GLOBAL_PREFIX = @MONKEYPREFIX@
# USERNAME =
# MAXBUF =
Modified: gnunet/src/arm/gnunet-arm.c
===================================================================
--- gnunet/src/arm/gnunet-arm.c 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/arm/gnunet-arm.c 2013-10-09 10:05:42 UTC (rev 30039)
@@ -147,7 +147,7 @@
/**
- * Attempts to delete configuration file and SERVICEHOME
+ * Attempts to delete configuration file and GNUNET_HOME
* on ARM shutdown provided the end and delete options
* were specified when gnunet-arm was run.
*/
@@ -158,15 +158,17 @@
"Will attempt to remove configuration file %s and service
directory %s\n",
config_file, dir);
- if (UNLINK (config_file) != 0)
+ if (0 != UNLINK (config_file))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- _("Failed to remove configuration file %s\n"), config_file);
+ _("Failed to remove configuration file %s\n"),
+ config_file);
}
- if (GNUNET_DISK_directory_remove (dir) != GNUNET_OK)
+ if (GNUNET_OK != GNUNET_DISK_directory_remove (dir))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- _("Failed to remove servicehome directory %s\n"), dir);
+ _("Failed to remove servicehome directory %s\n"),
+ dir);
}
}
@@ -192,8 +194,8 @@
GNUNET_ARM_monitor_disconnect_and_free (m);
m = NULL;
}
- if ((end == GNUNET_YES) && (delete == GNUNET_YES))
- delete_files ();
+ if ((GNUNET_YES == end) && (GNUNET_YES == delete))
+ delete_files ();
GNUNET_CONFIGURATION_destroy (cfg);
cfg = NULL;
}
@@ -588,7 +590,7 @@
if (list)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Going to list all running services controlled by ARM.\n");
+ "Going to list all running services controlled by ARM.\n");
GNUNET_ARM_request_service_list (h,
(0 == timeout.rel_value_us) ?
LIST_TIMEOUT : timeout,
&list_callback, &list);
@@ -673,10 +675,10 @@
cfg = GNUNET_CONFIGURATION_dup (c);
config_file = cfgfile;
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (cfg, "PATHS", "SERVICEHOME",
&dir))
+ GNUNET_CONFIGURATION_get_value_string (cfg, "PATHS", "GNUNET_HOME",
&dir))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "PATHS", "SERVICEHOME");
+ "PATHS", "GNUNET_HOME");
return;
}
if (NULL != cfgfile)
Modified: gnunet/src/arm/test_arm_api_data.conf
===================================================================
--- gnunet/src/arm/test_arm_api_data.conf 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/arm/test_arm_api_data.conf 2013-10-09 10:05:42 UTC (rev
30039)
@@ -16,7 +16,6 @@
AUTOSTART = NO
PORT = 2223
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = /will/be/overwritten/by/test_exponential_backoff
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
Modified: gnunet/src/ats/ats.conf.in
===================================================================
--- gnunet/src/ats/ats.conf.in 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/ats/ats.conf.in 2013-10-09 10:05:42 UTC (rev 30039)
@@ -2,7 +2,6 @@
AUTOSTART = YES
@UNIXONLY@ PORT = 2098
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-ats
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
Modified: gnunet/src/ats/test_ats_api.conf
===================================================================
--- gnunet/src/ats/test_ats_api.conf 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/ats/test_ats_api.conf 2013-10-09 10:05:42 UTC (rev 30039)
@@ -11,7 +11,6 @@
AUTOSTART = YES
PORT = 12002
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-ats
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
Modified: gnunet/src/ats/test_ats_mlp.conf
===================================================================
--- gnunet/src/ats/test_ats_mlp.conf 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/ats/test_ats_mlp.conf 2013-10-09 10:05:42 UTC (rev 30039)
@@ -11,7 +11,6 @@
AUTOSTART = YES
PORT = 12002
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-ats
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
Modified: gnunet/src/consensus/consensus.conf.in
===================================================================
--- gnunet/src/consensus/consensus.conf.in 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/consensus/consensus.conf.in 2013-10-09 10:05:42 UTC (rev
30039)
@@ -2,7 +2,6 @@
AUTOSTART = YES
@UNIXONLY@ PORT = 2103
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-consensus
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
Modified: gnunet/src/consensus/test_consensus.conf
===================================================================
--- gnunet/src/consensus/test_consensus.conf 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/consensus/test_consensus.conf 2013-10-09 10:05:42 UTC (rev
30039)
@@ -2,7 +2,6 @@
AUTOSTART = YES
PORT = 2110
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-consensus
#PREFIX = gdbserver :12345
#PREFIX = valgrind --leak-check=full
Modified: gnunet/src/conversation/conversation.conf.in
===================================================================
--- gnunet/src/conversation/conversation.conf.in 2013-10-09 10:03:06 UTC
(rev 30038)
+++ gnunet/src/conversation/conversation.conf.in 2013-10-09 10:05:42 UTC
(rev 30039)
@@ -2,6 +2,5 @@
AUTOSTART = YES
BINARY = gnunet-service-conversation
UNIXPATH = /tmp/gnunet-service-conversation.sock
-HOME = $SERVICEHOME
@UNIXONLY@ PORT = 2106
Modified: gnunet/src/core/core.conf.in
===================================================================
--- gnunet/src/core/core.conf.in 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/core/core.conf.in 2013-10-09 10:05:42 UTC (rev 30039)
@@ -2,7 +2,6 @@
AUTOSTART = YES
@address@hidden = 2092
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-core
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
@@ -21,4 +20,4 @@
# Note: this MUST be set to YES in production, only set to NO for testing
# for performance (testbed/cluster-scale use!).
-USE_EPHEMERAL_KEYS = YES
\ No newline at end of file
+USE_EPHEMERAL_KEYS = YES
Modified: gnunet/src/core/test_core_api_send_to_self.conf
===================================================================
--- gnunet/src/core/test_core_api_send_to_self.conf 2013-10-09 10:03:06 UTC
(rev 30038)
+++ gnunet/src/core/test_core_api_send_to_self.conf 2013-10-09 10:05:42 UTC
(rev 30039)
@@ -20,7 +20,6 @@
AUTOSTART = YES
PORT = 9252
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = test_core_api_send_to_self
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
Modified: gnunet/src/datastore/datastore.conf.in
===================================================================
--- gnunet/src/datastore/datastore.conf.in 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/datastore/datastore.conf.in 2013-10-09 10:05:42 UTC (rev
30039)
@@ -5,17 +5,16 @@
UNIX_MATCH_GID = YES
@UNIXONLY@ PORT = 2093
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-datastore
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
QUOTA = 5 GB
-BLOOMFILTER = $SERVICEHOME/datastore/bloomfilter
+BLOOMFILTER = $GNUNET_DATA_HOME/datastore/bloomfilter
DATABASE = sqlite
# DISABLE_SOCKET_FORWARDING = NO
[datastore-sqlite]
-FILENAME = $SERVICEHOME/datastore/sqlite.db
+FILENAME = $GNUNET_DATA_HOME/datastore/sqlite.db
[datastore-postgres]
CONFIG = connect_timeout=10; dbname=gnunet
@@ -24,7 +23,7 @@
DATABASE = gnunet
CONFIG = ~/.my.cnf
# USER = gnunet
-# PASSWORD =
+# PASSWORD =
# HOST = localhost
# PORT = 3306
Modified: gnunet/src/dht/dht.conf.in
===================================================================
--- gnunet/src/dht/dht.conf.in 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/dht/dht.conf.in 2013-10-09 10:05:42 UTC (rev 30039)
@@ -2,7 +2,6 @@
AUTOSTART = YES
@address@hidden = 2095
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-dht
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
Modified: gnunet/src/dns/dns.conf.in
===================================================================
--- gnunet/src/dns/dns.conf.in 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/dns/dns.conf.in 2013-10-09 10:05:42 UTC (rev 30039)
@@ -1,7 +1,6 @@
[dns]
AUTOSTART = YES
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-dns
UNIXPATH = /tmp/gnunet-service-dns.sock
Modified: gnunet/src/dv/dv.conf.in
===================================================================
--- gnunet/src/dv/dv.conf.in 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/dv/dv.conf.in 2013-10-09 10:05:42 UTC (rev 30039)
@@ -3,7 +3,6 @@
ACCEPT_FROM6 = ::1;
ACCEPT_FROM = 127.0.0.1;
BINARY = gnunet-service-dv
-HOME = $SERVICEHOME
HOSTNAME = localhost
@UNIXONLY@ PORT = 2571
UNIXPATH = /tmp/gnunet-service-dv.sock
Modified: gnunet/src/experimentation/experimentation.conf.in
===================================================================
--- gnunet/src/experimentation/experimentation.conf.in 2013-10-09 10:03:06 UTC
(rev 30038)
+++ gnunet/src/experimentation/experimentation.conf.in 2013-10-09 10:05:42 UTC
(rev 30039)
@@ -2,11 +2,10 @@
AUTOSTART = NO
# PORT = 2106
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-daemon-experimentation
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
UNIXPATH = /tmp/gnunet-daemon-experimentation.sock
UNIX_MATCH_UID = YES
UNIX_MATCH_GID = YES
-ISSUERS =
TFRM29O2RQNKLVBQIGODJ6GD58LSQ2NM9TNFBC6N48BRJHQO38Q73N2OM3V4CLKDM6CILQV4CU8PMJDRG0FNB0PDI057DBRANMLPLRG
\ No newline at end of file
+ISSUERS =
TFRM29O2RQNKLVBQIGODJ6GD58LSQ2NM9TNFBC6N48BRJHQO38Q73N2OM3V4CLKDM6CILQV4CU8PMJDRG0FNB0PDI057DBRANMLPLRG
Modified: gnunet/src/fs/fs.conf.in
===================================================================
--- gnunet/src/fs/fs.conf.in 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/fs/fs.conf.in 2013-10-09 10:05:42 UTC (rev 30039)
@@ -1,13 +1,11 @@
[fs]
AUTOSTART = YES
-INDEXDB = $SERVICEHOME/fs/idxinfo.lst
-RESPECT = $SERVICEHOME/fs/credit/
-IDENTITY_DIR = $SERVICEHOME/fs/identities/
-STATE_DIR = $SERVICEHOME/fs/persistence/
-UPDATE_DIR = $SERVICEHOME/fs/updates/
+INDEXDB = $GNUNET_DATA_HOME/fs/idxinfo.lst
+RESPECT = $GNUNET_DATA_HOME/fs/credit/
+STATE_DIR = $GNUNET_DATA_HOME/fs/persistence/
+UPDATE_DIR = $GNUNET_DATA_HOME/fs/updates/
@UNIXONLY@ PORT = 2094
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-fs
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
@@ -24,7 +22,7 @@
UNIXPATH = /tmp/gnunet-service-fs.sock
-# Do we require users that want to access file-sharing to run this process
+# Do we require users that want to access file-sharing to run this process
# (usually not a good idea)
UNIX_MATCH_UID = NO
@@ -40,7 +38,7 @@
DATASTORE_QUEUE_SIZE = 1024
# Maximum frequency we're allowed to poll the datastore
-# for content for migration (can be used to reduce
+# for content for migration (can be used to reduce
# GNUnet's disk-IO rate)
MIN_MIGRATION_DELAY = 100 ms
@@ -65,4 +63,4 @@
# Note: MUST specify path to auto-share directory and CAN specify other options
# to gnunet-auto-share here!
-OPTIONS = $SERVICEHOME/fs/share/
+OPTIONS = $GNUNET_DATA_HOME/fs/share/
Modified: gnunet/src/fs/test_pseudonym_data.conf
===================================================================
--- gnunet/src/fs/test_pseudonym_data.conf 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/fs/test_pseudonym_data.conf 2013-10-09 10:05:42 UTC (rev
30039)
@@ -1,6 +1,5 @@
# General settings
[fs]
-HOME = "/tmp/gnunet-pseudonym-test"
[TESTING]
WEAKRANDOM = YES
Modified: gnunet/src/gns/gns.conf.in
===================================================================
--- gnunet/src/gns/gns.conf.in 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/gns/gns.conf.in 2013-10-09 10:05:42 UTC (rev 30039)
@@ -1,14 +1,11 @@
[gns]
AUTOSTART = YES
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-gns
UNIXPATH = /tmp/gnunet-service-gns.sock
@address@hidden = 2102
-ZONE_DIR = $SERVICEHOME/gns/
-
-# Do we require users that want to access GNS to run this process
+# Do we require users that want to access GNS to run this process
# (usually not a good idea)
UNIX_MATCH_UID = NO
@@ -28,7 +25,7 @@
AUTOSTART = NO
# Where is the certificate for the GNS proxy stored?
-PROXY_CACERT = $SERVICEHOME/gns/gnsCAcert.pem
+PROXY_CACERT = $GNUNET_DATA_HOME/gns/gns_ca_cert.pem
PROXY_UNIXPATH = /tmp/gnunet-gns-proxy.sock
Modified: gnunet/src/gns/test_gns_simple_lookup.conf
===================================================================
--- gnunet/src/gns/test_gns_simple_lookup.conf 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/gns/test_gns_simple_lookup.conf 2013-10-09 10:05:42 UTC (rev
30039)
@@ -70,7 +70,6 @@
#ZONEKEY = $SERVICEHOME/gns/zonekey.zkey
HIJACK_DNS = NO
UNIXPATH = /tmp/gnunet-service-gns.sock
-HOME = $SERVICEHOME
AUTO_IMPORT_PKEY = YES
MAX_PARALLEL_BACKGROUND_QUERIES = 10
DEFAULT_LOOKUP_TIMEOUT = 15 s
@@ -89,7 +88,6 @@
UNIX_MATCH_UID = YES
UNIX_MATCH_GID = YES
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-namestore
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
Modified: gnunet/src/hostlist/hostlist.conf
===================================================================
--- gnunet/src/hostlist/hostlist.conf 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/hostlist/hostlist.conf 2013-10-09 10:05:42 UTC (rev 30039)
@@ -1,7 +1,6 @@
[hostlist]
# port for hostlist http server
HTTPPORT = 8080
-HOME = $SERVICEHOME
HOSTLISTFILE = $SERVICEHOME/hostlist/learned.data
BINARY = gnunet-daemon-hostlist
# consider having "-e" as default as well once implemented
Modified: gnunet/src/identity/identity.conf.in
===================================================================
--- gnunet/src/identity/identity.conf.in 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/identity/identity.conf.in 2013-10-09 10:05:42 UTC (rev
30039)
@@ -2,7 +2,6 @@
AUTOSTART = YES
@address@hidden = 2108
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-identity
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
@@ -11,7 +10,7 @@
UNIX_MATCH_GID = YES
# Directory where we store information about our egos
-EGODIR = $SERVICEHOME/egos/
+EGODIR = $GNUNET_DATA_HOME/identity/egos/
# File where we store default identities for subsystems
-SUBSYSTEM_CFG = $SERVICEHOME/subsystem_defaults.conf
+SUBSYSTEM_CFG = $GNUNET_CONFIG_HOME/identity/subsystem_defaults.conf
Modified: gnunet/src/include/gnunet_configuration_lib.h
===================================================================
--- gnunet/src/include/gnunet_configuration_lib.h 2013-10-09 10:03:06 UTC
(rev 30038)
+++ gnunet/src/include/gnunet_configuration_lib.h 2013-10-09 10:05:42 UTC
(rev 30039)
@@ -415,8 +415,13 @@
/**
* Expand an expression of the form "$FOO/BAR" to "DIRECTORY/BAR"
- * where either in the "PATHS" section or the environtment
- * "FOO" is set to "DIRECTORY".
+ * where either in the "PATHS" section or the environtment "FOO" is
+ * set to "DIRECTORY". We also support default expansion,
+ * i.e. ${VARIABLE:-default} will expand to $VARIABLE if VARIABLE is
+ * set in PATHS or the environment, and otherwise to "default". Note
+ * that "default" itself can also be a $-expression, thus
+ * "${VAR1:-{$VAR2}}" will expand to VAR1 and if that is not defined
+ * to VAR2.
*
* @param cfg configuration to use for path expansion
* @param orig string to $-expand (will be freed!)
Modified: gnunet/src/include/gnunet_crypto_lib.h
===================================================================
--- gnunet/src/include/gnunet_crypto_lib.h 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/include/gnunet_crypto_lib.h 2013-10-09 10:05:42 UTC (rev
30039)
@@ -963,7 +963,7 @@
* configuration file (!). This function is used so that
* at a later point code can be certain that reading a
* hostkey is fast (for example in time-dependent testcases).
- *
+*
* @param cfg_name name of the configuration file to use
*/
void
Modified: gnunet/src/include/gnunet_disk_lib.h
===================================================================
--- gnunet/src/include/gnunet_disk_lib.h 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/include/gnunet_disk_lib.h 2013-10-09 10:05:42 UTC (rev
30039)
@@ -798,25 +798,6 @@
/**
- * Construct full path to a file inside of the private
- * directory used by GNUnet. Also creates the corresponding
- * directory. If the resulting name is supposed to be
- * a directory, end the last argument in '/' (or pass
- * DIR_SEPARATOR_STR as the last argument before NULL).
- *
- * @param cfg configuration to use
- * @param service_name name of the service asking
- * @param ... is NULL-terminated list of
- * path components to append to the
- * private directory name.
- * @return the constructed filename
- */
-char *
-GNUNET_DISK_get_home_filename (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const char *service_name, ...);
-
-
-/**
* Opaque handle for a memory-mapping operation.
*/
struct GNUNET_DISK_MapHandle;
Modified: gnunet/src/mesh/mesh.conf.in
===================================================================
--- gnunet/src/mesh/mesh.conf.in 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/mesh/mesh.conf.in 2013-10-09 10:05:42 UTC (rev 30039)
@@ -2,7 +2,6 @@
AUTOSTART = YES
@address@hidden = 2096
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-mesh
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
Modified: gnunet/src/multicast/multicast.conf.in
===================================================================
--- gnunet/src/multicast/multicast.conf.in 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/multicast/multicast.conf.in 2013-10-09 10:05:42 UTC (rev
30039)
@@ -2,7 +2,6 @@
AUTOSTART = YES
PORT = 2109
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-multicast
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
Modified: gnunet/src/namestore/namestore.conf.in
===================================================================
--- gnunet/src/namestore/namestore.conf.in 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/namestore/namestore.conf.in 2013-10-09 10:05:42 UTC (rev
30039)
@@ -5,15 +5,13 @@
UNIX_MATCH_GID = YES
@UNIXONLY@ PORT = 2099
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-namestore
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
DATABASE = sqlite
-ZONEFILE_DIRECTORY = $SERVICEHOME/zones/
[namestore-sqlite]
-FILENAME = $SERVICEHOME/namestore/sqlite.db
+FILENAME = $GNUNET_DATA_HOME/namestore/sqlite.db
[namestore-postgres]
CONFIG = connect_timeout=10; dbname=gnunet
@@ -31,6 +29,4 @@
# On what port does the FCFS daemon listen for HTTP clients?
HTTPPORT = 18080
-# Where is the zone key for the FCFS zone stored?
-ZONEKEY = $SERVICEHOME/fcfsd/zonekey.zkey
Modified: gnunet/src/nat/test_nat_data.conf
===================================================================
--- gnunet/src/nat/test_nat_data.conf 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/nat/test_nat_data.conf 2013-10-09 10:05:42 UTC (rev 30039)
@@ -11,7 +11,6 @@
WEAKRANDOM = NO
[client]
-HOME = $SERVICEHOME
[nat]
@@ -48,7 +47,6 @@
[arm]
PORT = 2087
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-arm
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
@@ -71,7 +69,6 @@
AUTOSTART = YES
PORT = 2088
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-statistics
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
@@ -92,7 +89,6 @@
AUTOSTART = YES
PORT = 2089
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-resolver
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
Modified: gnunet/src/nse/nse.conf.in
===================================================================
--- gnunet/src/nse/nse.conf.in 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/nse/nse.conf.in 2013-10-09 10:05:42 UTC (rev 30039)
@@ -2,19 +2,18 @@
AUTOSTART = YES
@address@hidden = 2097
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-nse
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
UNIXPATH = /tmp/gnunet-service-nse.unix
UNIX_MATCH_UID = NO
UNIX_MATCH_GID = YES
-PROOFFILE = $SERVICEHOME/.nse-proof
+PROOFFILE = $GNUNET_DATA_HOME/nse/proof.dat
-# The directory where the NSE services logs timestamps everytime
+# The directory where the NSE services logs timestamps everytime
# a size estime flooding message is received
# This option is only used for benchmarking, not in production.
-HISTOGRAM_DIR = $SERVICEHOME
+HISTOGRAM_DIR = $GNUNET_CACHE_HOME/nse/histogram/
# How 'slowly' should the proof-of-work be constructed (delay
# between rounds); sane values between 0 and ~1000.
Modified: gnunet/src/peerinfo/peerinfo.conf.in
===================================================================
--- gnunet/src/peerinfo/peerinfo.conf.in 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/peerinfo/peerinfo.conf.in 2013-10-09 10:05:42 UTC (rev
30039)
@@ -2,7 +2,6 @@
AUTOSTART = YES
@address@hidden = 2090
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-peerinfo
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
@@ -10,15 +9,15 @@
UNIX_MATCH_UID = NO
UNIX_MATCH_GID = YES
# DISABLE_SOCKET_FORWARDING = NO
-# USERNAME =
+# USERNAME =
# MAXBUF =
# TIMEOUT =
# DISABLEV6 =
-# BINDTO =
+# BINDTO =
# REJECT_FROM =
# REJECT_FROM6 =
# PREFIX =
-HOSTS = $SERVICEHOME/peerinfo/
+HOSTS = $GNUNET_DATA_HOME/peerinfo/hosts/
# Option to disable all disk IO; only useful for testbed runs
# (large-scale experiments); disables persistence of HELLOs!
Modified: gnunet/src/psyc/psyc.conf.in
===================================================================
--- gnunet/src/psyc/psyc.conf.in 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/psyc/psyc.conf.in 2013-10-09 10:05:42 UTC (rev 30039)
@@ -1,6 +1,5 @@
[psyc]
AUTOSTART = YES
-HOME = $SERVICEHOME
BINARY = gnunet-service-psyc
UNIXPATH = /tmp/gnunet-service-psyc.sock
UNIX_MATCH_UID = NO
Modified: gnunet/src/psyc/test_psyc.conf
===================================================================
--- gnunet/src/psyc/test_psyc.conf 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/psyc/test_psyc.conf 2013-10-09 10:05:42 UTC (rev 30039)
@@ -4,7 +4,6 @@
[psyc]
AUTOSTART = YES
-HOME = $SERVICEHOME
BINARY = gnunet-service-psyc
UNIXPATH = /tmp/test-gnunet-service-psyc.sock
UNIX_MATCH_UID = NO
Modified: gnunet/src/psycstore/psycstore.conf.in
===================================================================
--- gnunet/src/psycstore/psycstore.conf.in 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/psycstore/psycstore.conf.in 2013-10-09 10:05:42 UTC (rev
30039)
@@ -1,6 +1,5 @@
[psycstore]
AUTOSTART = YES
-HOME = $SERVICEHOME
BINARY = gnunet-service-psycstore
UNIXPATH = /tmp/gnunet-service-psycstore.sock
@address@hidden = 2111
@@ -9,4 +8,4 @@
DATABASE = sqlite
[psycstore-sqlite]
-FILENAME = $SERVICEHOME/psycstore/sqlite.db
+FILENAME = $GNUNET_DATA_HOME/psycstore/sqlite.db
Modified: gnunet/src/psycstore/test_psycstore.conf
===================================================================
--- gnunet/src/psycstore/test_psycstore.conf 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/psycstore/test_psycstore.conf 2013-10-09 10:05:42 UTC (rev
30039)
@@ -4,7 +4,6 @@
[psycstore]
AUTOSTART = YES
-HOME = $SERVICEHOME
BINARY = gnunet-service-psycstore
UNIXPATH = /tmp/test-gnunet-service-psycstore.sock
UNIX_MATCH_UID = NO
Modified: gnunet/src/regex/regex.conf.in
===================================================================
--- gnunet/src/regex/regex.conf.in 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/regex/regex.conf.in 2013-10-09 10:05:42 UTC (rev 30039)
@@ -3,7 +3,6 @@
@UNIXONLY@ PORT = 2107
UNIXPATH = /tmp/gnunet-service-regex.sock
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-regex
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
Modified: gnunet/src/revocation/revocation.conf.in
===================================================================
--- gnunet/src/revocation/revocation.conf.in 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/revocation/revocation.conf.in 2013-10-09 10:05:42 UTC (rev
30039)
@@ -2,7 +2,6 @@
AUTOSTART = YES
@address@hidden = 2112
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-revocation
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
@@ -15,4 +14,4 @@
# DO NOT CHANGE THIS VALUE, doing so will break the protocol!
WORKBITS = 25
-DATABASE = $SERVICEHOME/revocation.db
+DATABASE = $GNUNET_DATA_HOME/revocation.dat
Modified: gnunet/src/scalarproduct/scalarproduct.conf.in
===================================================================
--- gnunet/src/scalarproduct/scalarproduct.conf.in 2013-10-09 10:03:06 UTC
(rev 30038)
+++ gnunet/src/scalarproduct/scalarproduct.conf.in 2013-10-09 10:05:42 UTC
(rev 30039)
@@ -1,7 +1,6 @@
[vectorproduct]
BINARY = gnunet-service-vectorproduct
UNIXPATH = /tmp/gnunet-service-vectorproduct.sock
-HOME = $SERVICEHOME
# PORT = 2106
@UNIXONLY@ PORT = 2087
Modified: gnunet/src/set/set.conf.in
===================================================================
--- gnunet/src/set/set.conf.in 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/set/set.conf.in 2013-10-09 10:05:42 UTC (rev 30039)
@@ -2,7 +2,6 @@
AUTOSTART = NO
@address@hidden = 2106
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-set
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
Modified: gnunet/src/set/test_set.conf
===================================================================
--- gnunet/src/set/test_set.conf 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/set/test_set.conf 2013-10-09 10:05:42 UTC (rev 30039)
@@ -6,7 +6,6 @@
AUTOSTART = YES
PORT = 2106
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-set
#PREFIX = valgrind
#PREFIX = gdbserver :1234
Modified: gnunet/src/statistics/gnunet-service-statistics.c
===================================================================
--- gnunet/src/statistics/gnunet-service-statistics.c 2013-10-09 10:03:06 UTC
(rev 30038)
+++ gnunet/src/statistics/gnunet-service-statistics.c 2013-10-09 10:05:42 UTC
(rev 30039)
@@ -241,11 +241,20 @@
struct GNUNET_SERVER_MessageStreamTokenizer *mst;
char *emsg;
- fn = GNUNET_DISK_get_home_filename (cfg, "statistics", "statistics.data",
- NULL);
- if (fn == NULL)
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_filename (cfg,
+ "STATISTICS",
+ "DATABASE",
+ &fn))
+ {
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+ "STATISTICS",
+ "DATABASE");
return;
- if ((GNUNET_OK != GNUNET_DISK_file_size (fn, &fsize, GNUNET_NO, GNUNET_YES))
|| (fsize == 0))
+ }
+ if ( (GNUNET_OK !=
+ GNUNET_DISK_file_size (fn, &fsize, GNUNET_NO, GNUNET_YES)) ||
+ (0 == fsize) )
{
GNUNET_free (fn);
return;
@@ -291,15 +300,22 @@
struct StatsEntry *pos;
char *fn;
struct GNUNET_BIO_WriteHandle *wh;
-
uint16_t size;
unsigned long long total;
- wh = NULL;
- fn = GNUNET_DISK_get_home_filename (cfg, "statistics", "statistics.data",
- NULL);
- if (fn != NULL)
- wh = GNUNET_BIO_write_open (fn);
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_filename (cfg,
+ "STATISTICS",
+ "DATABASE",
+ &fn))
+ {
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+ "STATISTICS",
+ "DATABASE");
+ return;
+ }
+ (void) GNUNET_DISK_directory_create_for_file (fn);
+ wh = GNUNET_BIO_write_open (fn);
total = 0;
while (NULL != (pos = start))
{
Modified: gnunet/src/statistics/statistics.conf.in
===================================================================
--- gnunet/src/statistics/statistics.conf.in 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/statistics/statistics.conf.in 2013-10-09 10:05:42 UTC (rev
30039)
@@ -2,7 +2,6 @@
AUTOSTART = YES
@address@hidden = 2088
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-statistics
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
Modified: gnunet/src/template/template.conf
===================================================================
--- gnunet/src/template/template.conf 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/template/template.conf 2013-10-09 10:05:42 UTC (rev 30039)
@@ -2,7 +2,6 @@
AUTOSTART = NO
PORT = 9999
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-template
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
Modified: gnunet/src/testbed/gnunet-daemon-testbed-blacklist.c
===================================================================
--- gnunet/src/testbed/gnunet-daemon-testbed-blacklist.c 2013-10-09
10:03:06 UTC (rev 30038)
+++ gnunet/src/testbed/gnunet-daemon-testbed-blacklist.c 2013-10-09
10:05:42 UTC (rev 30039)
@@ -215,7 +215,7 @@
char fname[PATH_MAX];
if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (c, "PATHS",
- "SERVICEHOME",
+ "GNUNET_HOME",
&shome))
{
GNUNET_break (0);
Modified: gnunet/src/testbed/test_testbed_api_barriers.conf.in
===================================================================
--- gnunet/src/testbed/test_testbed_api_barriers.conf.in 2013-10-09
10:03:06 UTC (rev 30038)
+++ gnunet/src/testbed/test_testbed_api_barriers.conf.in 2013-10-09
10:05:42 UTC (rev 30039)
@@ -52,9 +52,6 @@
TIMEOUT = 300 s
PORT = 12368
-[gnunetd]
-HOSTKEY = $SERVICEHOME/.hostkey
-
[PATHS]
SERVICEHOME = /tmp/test-testbed/
Modified: gnunet/src/testbed/testbed.conf.in
===================================================================
--- gnunet/src/testbed/testbed.conf.in 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/testbed/testbed.conf.in 2013-10-09 10:05:42 UTC (rev 30039)
@@ -2,7 +2,6 @@
AUTOSTART = NO
@JAVAPORT@ PORT = 2101
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-testbed
# How long should operations wait?
Modified: gnunet/src/testing/testing.c
===================================================================
--- gnunet/src/testing/testing.c 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/testing/testing.c 2013-10-09 10:05:42 UTC (rev 30039)
@@ -103,7 +103,8 @@
{
/**
* Prefix (i.e. "/tmp/gnunet-testing/") we prepend to each
- * SERVICEHOME. */
+ * GNUNET_HOME.
+ */
char *tmppath;
/**
@@ -747,7 +748,7 @@
/**
* The customized service home path for this peer
*/
- char *service_home;
+ char *gnunet_home;
/**
* Array of ports currently allocated to this peer. These ports will be
@@ -839,7 +840,7 @@
single_variable))
{
GNUNET_snprintf (uval, sizeof (uval), "%s/%s.sock",
- uc->service_home, section);
+ uc->gnunet_home, section);
value = uval;
}
else if ((GNUNET_YES ==
@@ -970,7 +971,7 @@
{
struct SharedServiceInstance *i;
struct GNUNET_CONFIGURATION_Handle *temp;
- char *service_home;
+ char *gnunet_home;
uint32_t port;
ss->n_peers++;
@@ -979,25 +980,25 @@
( (0 != ss->share)
&& (ss->n_instances < ((ss->n_peers + ss->share - 1) / ss->share)) ) )
{
- i = GNUNET_malloc (sizeof (struct SharedServiceInstance));
+ i = GNUNET_new (struct SharedServiceInstance);
i->ss = ss;
- (void) GNUNET_asprintf (&service_home, "%s/shared/%s/%u",
+ (void) GNUNET_asprintf (&gnunet_home, "%s/shared/%s/%u",
system->tmppath, ss->sname, ss->n_instances);
- (void) GNUNET_asprintf (&i->unix_sock, "%s/sock", service_home);
+ (void) GNUNET_asprintf (&i->unix_sock, "%s/sock", gnunet_home);
port = GNUNET_TESTING_reserve_port (system);
if (0 == port)
{
- GNUNET_free (service_home);
+ GNUNET_free (gnunet_home);
cleanup_shared_service_instance (i);
return NULL;
}
GNUNET_array_append (ss->instances, ss->n_instances, i);
temp = GNUNET_CONFIGURATION_dup (ss->cfg);
(void) GNUNET_asprintf (&i->port_str, "%u", port);
- (void) GNUNET_asprintf (&i->cfg_fn, "%s/config", service_home);
- GNUNET_CONFIGURATION_set_value_string (temp, "PATHS", "SERVICEHOME",
- service_home);
- GNUNET_free (service_home);
+ (void) GNUNET_asprintf (&i->cfg_fn, "%s/config", gnunet_home);
+ GNUNET_CONFIGURATION_set_value_string (temp, "PATHS", "GNUNET_HOME",
+ gnunet_home);
+ GNUNET_free (gnunet_home);
GNUNET_CONFIGURATION_set_value_string (temp, ss->sname, "UNIXPATH",
i->unix_sock);
GNUNET_CONFIGURATION_set_value_string (temp, ss->sname, "PORT",
@@ -1029,9 +1030,9 @@
* Create a new configuration using the given configuration as a template;
* ports and paths will be modified to select available ports on the local
* system. The default configuration will be available in PATHS section under
- * the option DEFAULTCONFIG after the call. SERVICE_HOME is also set in PATHS
+ * the option DEFAULTCONFIG after the call. GNUNET_HOME is also set in PATHS
* section to the temporary directory specific to this configuration. If we run
- * out of "*port" numbers, return SYSERR.
+ * out of "*port" numbers, return #GNUNET_SYSERR.
*
* This is primarily a helper function used internally
* by 'GNUNET_TESTING_peer_configure'.
@@ -1041,7 +1042,7 @@
* @param ports array with port numbers used in the created configuration.
* Will be updated upon successful return. Can be NULL
* @param nports the size of the `ports' array. Will be updated.
- * @return GNUNET_OK on success, GNUNET_SYSERR on error - the configuration
will
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error - the configuration
will
* be incomplete and should not be used there upon
*/
static int
@@ -1058,16 +1059,16 @@
uc.status = GNUNET_OK;
uc.ports = NULL;
uc.nports = 0;
- GNUNET_asprintf (&uc.service_home, "%s/%u", system->tmppath,
+ GNUNET_asprintf (&uc.gnunet_home, "%s/%u", system->tmppath,
system->path_counter++);
- GNUNET_asprintf (&default_config, "%s/config", uc.service_home);
+ GNUNET_asprintf (&default_config, "%s/config", uc.gnunet_home);
GNUNET_CONFIGURATION_set_value_string (cfg, "PATHS", "DEFAULTCONFIG",
default_config);
GNUNET_CONFIGURATION_set_value_string (cfg, "arm", "CONFIG",
default_config);
GNUNET_free (default_config);
- GNUNET_CONFIGURATION_set_value_string (cfg, "PATHS", "SERVICEHOME",
- uc.service_home);
+ GNUNET_CONFIGURATION_set_value_string (cfg, "PATHS", "GNUNET_HOME",
+ uc.gnunet_home);
/* make PORTs and UNIXPATHs unique */
GNUNET_CONFIGURATION_iterate (cfg, &update_config, &uc);
/* allow connections to services from system trusted_ip host */
@@ -1076,7 +1077,7 @@
GNUNET_CONFIGURATION_set_value_string (cfg,
"nat",
"USE_LOCALADDR", "YES");
- GNUNET_free (uc.service_home);
+ GNUNET_free (uc.gnunet_home);
if ((NULL != ports) && (NULL != nports))
{
*ports = uc.ports;
@@ -1092,7 +1093,7 @@
* Create a new configuration using the given configuration as a template;
* ports and paths will be modified to select available ports on the local
* system. The default configuration will be available in PATHS section under
- * the option DEFAULTCONFIG after the call. SERVICE_HOME is also set in PATHS
+ * the option DEFAULTCONFIG after the call. GNUNET_HOME is also set in PATHS
* section to the temporary directory specific to this configuration. If we run
* out of "*port" numbers, return SYSERR.
*
Modified: gnunet/src/transport/plugin_transport_http_server.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_server.c 2013-10-09 10:03:06 UTC
(rev 30038)
+++ gnunet/src/transport/plugin_transport_http_server.c 2013-10-09 10:05:42 UTC
(rev 30039)
@@ -1868,61 +1868,47 @@
* Load ssl certificate
*
* @param plugin the plugin
- * @return GNUNET_OK on success, GNUNET_SYSERR on failure
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
*/
static int
server_load_certificate (struct HTTP_Server_Plugin *plugin)
{
int res = GNUNET_OK;
-
- char *sh;
char *key_file;
char *cert_file;
- /* Get crypto init string from config
- * If not present just use default values */
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (plugin->env->cfg,
- "PATHS",
- "SERVICEHOME",
- &sh))
- {
- GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,
- "Failed to get servicehome!\n");
- return GNUNET_SYSERR;
- }
-
-
- if (GNUNET_OK ==
- GNUNET_CONFIGURATION_get_value_string (plugin->env->cfg,
- plugin->name,
- "CRYPTO_INIT",
- &plugin->crypto_init))
- GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
- "Using crypto init string `%s'\n",
- plugin->crypto_init);
- else
- GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
- "Using default crypto init string \n");
-
- if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_filename (plugin->env->cfg, plugin->name,
"KEY_FILE", &key_file))
{
- GNUNET_break (0);
- GNUNET_asprintf (&key_file, "%s/%s", sh, "https_key.key");
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+ plugin->name, "CERT_FILE");
+ return GNUNET_SYSERR;
}
-
-
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_filename (plugin->env->cfg, plugin->name,
"CERT_FILE", &cert_file))
{
- GNUNET_break (0);
- GNUNET_asprintf (&cert_file, "%s/%s", sh, "https_cert.crt");
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+ plugin->name, "CERT_FILE");
+ GNUNET_free (key_file);
+ return GNUNET_SYSERR;
}
- GNUNET_free (sh);
+ /* Get crypto init string from config. If not present, use
+ * default values */
+ if (GNUNET_OK ==
+ GNUNET_CONFIGURATION_get_value_string (plugin->env->cfg,
+ plugin->name,
+ "CRYPTO_INIT",
+ &plugin->crypto_init))
+ GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
+ "Using crypto init string `%s'\n",
+ plugin->crypto_init);
+ else
+ GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
+ "Using default crypto init string \n");
+
/* read key & certificates from file */
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Trying to loading TLS certificate from key-file `%s'
cert-file`%s'\n",
Modified: gnunet/src/transport/transport.conf.in
===================================================================
--- gnunet/src/transport/transport.conf.in 2013-10-09 10:03:06 UTC (rev
30038)
+++ gnunet/src/transport/transport.conf.in 2013-10-09 10:05:42 UTC (rev
30039)
@@ -2,7 +2,6 @@
AUTOSTART = YES
@UNIXONLY@ PORT = 2091
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-transport
#PREFIX = valgrind
NEIGHBOUR_LIMIT = 50
@@ -10,11 +9,11 @@
ACCEPT_FROM6 = ::1;
PLUGINS = tcp udp
UNIXPATH = /tmp/gnunet-service-transport.sock
-BLACKLIST_FILE = $SERVICEHOME/blacklist
+BLACKLIST_FILE = $GNUNET_CONFIG_HOME/transport/blacklist
UNIX_MATCH_UID = NO
UNIX_MATCH_GID = YES
# DISABLE_SOCKET_FORWARDING = NO
-# USERNAME =
+# USERNAME =
# MAXBUF =
# TIMEOUT =
# DISABLEV6 =
@@ -26,12 +25,12 @@
# Configuration settings related to traffic manipulation for testing purposes
# Distance
# MANIPULATE_DISTANCE_IN = 1
-# MANIPULATE_DISTANCE_OUT = 1
+# MANIPULATE_DISTANCE_OUT = 1
# Delay; WARNING: to large values may lead to peers not connecting!
# MANIPULATE_DELAY_IN = 1 ms
# MANIPULATE_DELAY_OUT = 1 ms
-
+
[transport-unix]
PORT = 22086
TESTING_IGNORE_KEYS = ACCEPT_FROM;
@@ -79,16 +78,16 @@
[transport-https_server]
# EXTERNAL_HOSTNAME = <your hostname/path>
# EXTERNAL_HOSTNAME_ONLY = YES
-# If you have a valid SSL certificate for your external hostname tell,
-# clients to verify it
+# If you have a valid SSL certificate for your external hostname tell,
+# clients to verify it
# VERIFY_EXTERNAL_HOSTNAME = YES
# Does the external hostname use the same port?
# EXTERNAL_HOSTNAME_USE_PORT = YES
PORT = 4433
ADVERTISED_PORT = 4433
CRYPTO_INIT = NORMAL
-KEY_FILE = $SERVICEHOME/https.key
-CERT_FILE = $SERVICEHOME/https.cert
+KEY_FILE = $GNUNET_DATA_HOME/transport/https.key
+CERT_FILE = $GNUNET_DATA_HOME/transport/https.cert
MAX_CONNECTIONS = 128
TESTING_IGNORE_KEYS = ACCEPT_FROM;
Modified: gnunet/src/util/configuration.c
===================================================================
--- gnunet/src/util/configuration.c 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/util/configuration.c 2013-10-09 10:05:42 UTC (rev 30039)
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- (C) 2006, 2007, 2008, 2009 Christian Grothoff (and other contributing
authors)
+ (C) 2006, 2007, 2008, 2009, 2013 Christian Grothoff (and other
contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@ -414,7 +414,7 @@
}
/* For each key = value pair we need to add 4 characters (2
spaces and 1 equal-to character and 1 new line) */
- m_size += strlen (ent->key) + strlen (ent->val) + 4;
+ m_size += strlen (ent->key) + strlen (ent->val) + 4;
}
}
/* A new line after section end */
@@ -449,7 +449,7 @@
GNUNET_free (val);
memcpy (mem + c_size, cbuf, len);
c_size += len;
- GNUNET_free (cbuf);
+ GNUNET_free (cbuf);
}
}
memcpy (mem + c_size, "\n", 1);
@@ -993,7 +993,7 @@
* @param cfg configuration to inspect
* @param section section of interest
* @param option option of interest
- * @return GNUNET_YES if so, GNUNET_NO if not.
+ * @return #GNUNET_YES if so, #GNUNET_NO if not.
*/
int
GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle *cfg,
@@ -1009,71 +1009,183 @@
/**
* Expand an expression of the form "$FOO/BAR" to "DIRECTORY/BAR"
- * where either in the "PATHS" section or the environtment
- * "FOO" is set to "DIRECTORY".
+ * where either in the "PATHS" section or the environtment "FOO" is
+ * set to "DIRECTORY". We also support default expansion,
+ * i.e. ${VARIABLE:-default} will expand to $VARIABLE if VARIABLE is
+ * set in PATHS or the environment, and otherwise to "default". Note
+ * that "default" itself can also be a $-expression, thus
+ * "${VAR1:-{$VAR2}}" will expand to VAR1 and if that is not defined
+ * to VAR2.
*
* @param cfg configuration to use for path expansion
* @param orig string to $-expand (will be freed!)
+ * @param depth recursion depth, used to detect recursive expansions
* @return $-expanded string
*/
-char *
-GNUNET_CONFIGURATION_expand_dollar (const struct GNUNET_CONFIGURATION_Handle
- *cfg, char *orig)
+static char *
+expand_dollar (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ char *orig,
+ unsigned int depth)
{
int i;
char *prefix;
char *result;
+ char *start;
const char *post;
const char *env;
+ char *def;
+ char *end;
+ unsigned int lopen;
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Asked to $-expand %s\n", orig);
-
- if (orig[0] != '$')
+ if (depth > 128)
{
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Doesn't start with $ - not expanding\n");
+ LOG (GNUNET_ERROR_TYPE_WARNING,
+ _("Recursive expansion suspected, aborting $-expansion for term
`%s'\n"),
+ orig);
return orig;
}
- i = 0;
- while ((orig[i] != '/') && (orig[i] != '\\') && (orig[i] != '\0'))
- i++;
- if (orig[i] == '\0')
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Asked to $-expand %s\n", orig);
+ if ('$' != orig[0])
{
- post = "";
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Doesn't start with $ - not expanding\n");
+ return orig;
}
+ if ('{' == orig[1])
+ {
+ start = &orig[2];
+ lopen = 1;
+ end = &orig[1];
+ while (lopen > 0)
+ {
+ end++;
+ switch (*end)
+ {
+ case '}':
+ lopen--;
+ break;
+ case '{':
+ lopen++;
+ break;
+ case '\0':
+ LOG (GNUNET_ERROR_TYPE_WARNING,
+ _("Missing closing `%s' in option `%s'\n"),
+ "}",
+ orig);
+ return orig;
+ default:
+ break;
+ }
+ }
+ *end = '\0';
+ post = end + 1;
+ def = strchr (orig, ':');
+ if (NULL != def)
+ {
+ *def = '\0';
+ def++;
+ if ( ('-' == *def) ||
+ ('=' == *def) )
+ def++;
+ def = GNUNET_strdup (def);
+ }
+ }
else
{
- orig[i] = '\0';
- post = &orig[i + 1];
+ start = &orig[1];
+ def = NULL;
+ i = 0;
+ while ( (orig[i] != '/') &&
+ (orig[i] != '\\') &&
+ (orig[i] != '\0') )
+ i++;
+ if (orig[i] == '\0')
+ {
+ post = "";
+ }
+ else
+ {
+ orig[i] = '\0';
+ post = &orig[i + 1];
+ }
}
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Split into `%s' and `%s'\n", orig, post);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Split into `%s' and `%s' with default %s\n",
+ start,
+ post,
+ def);
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_filename (cfg, "PATHS", &orig[1],
&prefix))
+ GNUNET_CONFIGURATION_get_value_filename (cfg,
+ "PATHS",
+ start,
+ &prefix))
{
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Filename for `%s' is not in PATHS config
section\n", &orig[1]);
- if (NULL == (env = getenv (&orig[1])))
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Filename for `%s' is not in PATHS config section\n",
+ start);
+ if (NULL == (env = getenv (start)))
{
- LOG (GNUNET_ERROR_TYPE_DEBUG, "`%s' is not an environment variable\n",
&orig[1]);
- orig[i] = DIR_SEPARATOR;
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Expanded to `%s' (returning orig)\n",
orig);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "`%s' is not an environment variable\n",
+ start);
+ /* try default */
+ def = expand_dollar (cfg, def, depth + 1);
+ env = def;
+ }
+ if (NULL == env)
+ {
+ orig[strlen (orig)] = DIR_SEPARATOR;
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Expanded to `%s' (returning orig)\n",
+ orig);
return orig;
}
prefix = GNUNET_strdup (env);
}
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Prefix is `%s'\n", prefix);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Prefix is `%s'\n",
+ prefix);
result = GNUNET_malloc (strlen (prefix) + strlen (post) + 2);
strcpy (result, prefix);
- if ((strlen (prefix) == 0) ||
- ((prefix[strlen (prefix) - 1] != DIR_SEPARATOR) && (strlen (post) > 0)))
+ if ( (0 == strlen (prefix)) ||
+ ( (prefix[strlen (prefix) - 1] != DIR_SEPARATOR) &&
+ (strlen (post) > 0) ) )
strcat (result, DIR_SEPARATOR_STR);
strcat (result, post);
+ GNUNET_free_non_null (def);
GNUNET_free (prefix);
GNUNET_free (orig);
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Expanded to `%s'\n", result);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Expanded to `%s'\n",
+ result);
return result;
}
/**
+ * Expand an expression of the form "$FOO/BAR" to "DIRECTORY/BAR"
+ * where either in the "PATHS" section or the environtment "FOO" is
+ * set to "DIRECTORY". We also support default expansion,
+ * i.e. ${VARIABLE:-default} will expand to $VARIABLE if VARIABLE is
+ * set in PATHS or the environment, and otherwise to "default". Note
+ * that "default" itself can also be a $-expression, thus
+ * "${VAR1:-{$VAR2}}" will expand to VAR1 and if that is not defined
+ * to VAR2.
+ *
+ * @param cfg configuration to use for path expansion
+ * @param orig string to $-expand (will be freed!)
+ * @return $-expanded string
+ */
+char *
+GNUNET_CONFIGURATION_expand_dollar (const struct GNUNET_CONFIGURATION_Handle
*cfg,
+ char *orig)
+{
+ return expand_dollar (cfg, orig, 0);
+}
+
+
+/**
* Get a configuration value that should be a string.
*
* @param cfg configuration to inspect
Modified: gnunet/src/util/disk.c
===================================================================
--- gnunet/src/util/disk.c 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/util/disk.c 2013-10-09 10:05:42 UTC (rev 30039)
@@ -1928,78 +1928,6 @@
/**
- * Construct full path to a file inside of the private
- * directory used by GNUnet. Also creates the corresponding
- * directory. If the resulting name is supposed to be
- * a directory, end the last argument in '/' (or pass
- * DIR_SEPARATOR_STR as the last argument before NULL).
- *
- * @param cfg configuration to use (determines HOME)
- * @param service_name name of the service
- * @param ... is NULL-terminated list of
- * path components to append to the
- * private directory name.
- * @return the constructed filename
- */
-char *
-GNUNET_DISK_get_home_filename (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const char *service_name, ...)
-{
- const char *c;
- char *pfx;
- char *ret;
- va_list ap;
- unsigned int needed;
-
- if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_filename (cfg, service_name, "HOME",
&pfx))
- return NULL;
- if (pfx == NULL)
- {
- LOG (GNUNET_ERROR_TYPE_WARNING,
- _("No `%s' specified for service `%s' in configuration.\n"), "HOME",
- service_name);
- return NULL;
- }
- needed = strlen (pfx) + 2;
- if ((pfx[strlen (pfx) - 1] != '/') && (pfx[strlen (pfx) - 1] != '\\'))
- needed++;
- va_start (ap, service_name);
- while (1)
- {
- c = va_arg (ap, const char *);
-
- if (c == NULL)
- break;
- needed += strlen (c);
- if ((c[strlen (c) - 1] != '/') && (c[strlen (c) - 1] != '\\'))
- needed++;
- }
- va_end (ap);
- ret = GNUNET_malloc (needed);
- strcpy (ret, pfx);
- GNUNET_free (pfx);
- va_start (ap, service_name);
- while (1)
- {
- c = va_arg (ap, const char *);
-
- if (c == NULL)
- break;
- if ((c[strlen (c) - 1] != '/') && (c[strlen (c) - 1] != '\\'))
- strcat (ret, DIR_SEPARATOR_STR);
- strcat (ret, c);
- }
- va_end (ap);
- if ((ret[strlen (ret) - 1] != '/') && (ret[strlen (ret) - 1] != '\\'))
- (void) GNUNET_DISK_directory_create_for_file (ret);
- else
- (void) GNUNET_DISK_directory_create (ret);
- return ret;
-}
-
-
-/**
* Handle for a memory-mapping operation.
*/
struct GNUNET_DISK_MapHandle
Modified: gnunet/src/util/os_installation.c
===================================================================
--- gnunet/src/util/os_installation.c 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/util/os_installation.c 2013-10-09 10:05:42 UTC (rev 30039)
@@ -43,6 +43,7 @@
#define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file
(kind, "util", syscall, filename)
+
#if LINUX
/**
* Try to determine path by reading /proc/PID/exe
@@ -115,12 +116,13 @@
}
#endif
+
#if WINDOWS
-
static HINSTANCE dll_instance;
-/* GNUNET_util_cl_init() in common_logging.c is preferred.
+/**
+ * GNUNET_util_cl_init() in common_logging.c is preferred.
* This function is only for thread-local storage (not used in GNUnet)
* and hInstance saving.
*/
@@ -226,6 +228,7 @@
}
#endif
+
#if DARWIN
/**
* Signature of the '_NSGetExecutablePath" function.
@@ -415,8 +418,7 @@
return ret;
/* other attempts here */
LOG (GNUNET_ERROR_TYPE_ERROR,
- _
- ("Could not determine installation path for %s. Set `%s' environment
variable.\n"),
+ _("Could not determine installation path for %s. Set `%s' environment
variable.\n"),
"GNUnet", "GNUNET_PREFIX");
return NULL;
}
@@ -452,7 +454,7 @@
/**
* @brief get the path to a specific GNUnet installation directory or,
- * with GNUNET_IPK_SELF_PREFIX, the current running apps installation directory
+ * with #GNUNET_IPK_SELF_PREFIX, the current running apps installation
directory
* @author Milan
* @return a pointer to the dir path (to be freed by the caller)
*/
@@ -657,9 +659,9 @@
* binary with the -d flag. -d omits a programs main loop and only
* executes all privileged operations in an binary.
* @param params parameters used for w32 privilege checking (can be NULL for
!= w32 )
- * @return GNUNET_YES if the file is SUID (*nix) or can be executed with
current privileges (W32),
- * GNUNET_NO if not SUID (but binary exists),
- * GNUNET_SYSERR on error (no such binary or not executable)
+ * @return #GNUNET_YES if the file is SUID (*nix) or can be executed with
current privileges (W32),
+ * #GNUNET_NO if not SUID (but binary exists),
+ * #GNUNET_SYSERR on error (no such binary or not executable)
*/
int
GNUNET_OS_check_helper_binary (const char *binary, int check_suid, const char
*params)
@@ -704,7 +706,8 @@
#endif
if (NULL == p)
{
- LOG (GNUNET_ERROR_TYPE_INFO, _("Could not find binary `%s' in PATH!\n"),
+ LOG (GNUNET_ERROR_TYPE_INFO,
+ _("Could not find binary `%s' in PATH!\n"),
binary);
return GNUNET_SYSERR;
}
Modified: gnunet/src/util/resolver.conf.in
===================================================================
--- gnunet/src/util/resolver.conf.in 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/util/resolver.conf.in 2013-10-09 10:05:42 UTC (rev 30039)
@@ -2,7 +2,6 @@
AUTOSTART = YES
@address@hidden = 2089
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-resolver
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
Modified: gnunet/src/util/test_disk.c
===================================================================
--- gnunet/src/util/test_disk.c 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/util/test_disk.c 2013-10-09 10:05:42 UTC (rev 30039)
@@ -169,27 +169,6 @@
static int
-testGetHome ()
-{
- struct GNUNET_CONFIGURATION_Handle *cfg;
- char *fn;
- int ret;
-
- cfg = GNUNET_CONFIGURATION_create ();
- GNUNET_assert (cfg != NULL);
- GNUNET_CONFIGURATION_set_value_string (cfg, "service", "HOME",
- "/tmp/test-gnunet-disk-a/b/c");
- fn = GNUNET_DISK_get_home_filename (cfg, "service", "d", "e", NULL);
- GNUNET_assert (fn != NULL);
- GNUNET_CONFIGURATION_destroy (cfg);
- ret = strcmp ("/tmp/test-gnunet-disk-a/b/c/d/e", fn);
- GNUNET_free (fn);
- GNUNET_break (GNUNET_OK ==
- GNUNET_DISK_directory_remove ("/tmp/test-gnunet-disk-a"));
- return ret;
-}
-
-static int
testCanonicalize ()
{
char *fn = GNUNET_strdup ("ab?><|cd*ef:/g\"");
@@ -246,7 +225,6 @@
failureCount += testOpenClose ();
failureCount += testDirScan ();
failureCount += testDirIter ();
- failureCount += testGetHome ();
failureCount += testCanonicalize ();
failureCount += testChangeOwner ();
failureCount += testDirMani ();
Modified: gnunet/src/util/util.conf
===================================================================
--- gnunet/src/util/util.conf 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/util/util.conf 2013-10-09 10:05:42 UTC (rev 30039)
@@ -1,21 +1,42 @@
[PATHS]
+# The PATHS section is special, as filenames including $-expression are
+# expanded using the values from PATHS or the system environment (PATHS
+# is checked first). GNUnet also supports expanding $-expressions using
+# defaults with the syntax "${VAR:-default}". Here, "default" can again
+# be a $-expression.
+#
GNUNET_HOME = $HOME
-GNUNET_DATA_HOME = $GNUNET_HOME/.local/share/gnunet/
-GNUNET_CONFIG_HOME = $GNUNET_HOME/.config/gnunet/
-GNUNET_CACHE_HOME = $GNUNET_HOME/.cache/gnunet/
-GNUNET_RUNTIME_DIR = $GNUNET_HOME/.runtime/gnunet/
+# see XDG Base Directory Specification at
+# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
+# for how these should be used.
+# Persistant data storage
+GNUNET_DATA_HOME = ${XDG_DATA_HOME:-$GNUNET_HOME/.local/share}/gnunet/
+
+# Configuration files
+GNUNET_CONFIG_HOME = ${XDG_CONFIG_HOME:-GNUNET_HOME/.config/}gnunet/
+
+# Cached data, no big deal if lost
+GNUNET_CACHE_HOME = ${XDG_CACHE_HOME:-$GNUNET_HOME/.cache/}gnunet/
+
+# Runtime data (i.e UNIX domain sockets, locks, always lost on system boot)
+GNUNET_RUNTIME_DIR = ${XDG_RUNTIME_DIR:-${TMPDIR:-${TMP:-/tmp}}}gnunet/
+
+# Legacy option...
SERVICEHOME = ~/.gnunet/
# SERVICEHOME = /var/lib/gnunet/
+
# DEFAULTCONFIG = /etc/gnunet.conf
# If 'DEFAULTCONFIG' is not defined, the current
# configuration file is assumed to be the default,
# which is what we want by default...
+
[PEER]
-PRIVATE_KEY = $SERVICEHOME/private_key.ecc
+PRIVATE_KEY = $GNUNET_DATA_HOME/private_key.ecc
+
[TESTING]
SPEEDUP_INTERVAL = 0 ms
SPEEDUP_DELTA = 0 ms
Modified: gnunet/src/vpn/vpn.conf.in
===================================================================
--- gnunet/src/vpn/vpn.conf.in 2013-10-09 10:03:06 UTC (rev 30038)
+++ gnunet/src/vpn/vpn.conf.in 2013-10-09 10:05:42 UTC (rev 30039)
@@ -2,7 +2,6 @@
AUTOSTART = YES
@UNIXONLY@ PORT = 2105
HOSTNAME = localhost
-HOME = $SERVICEHOME
BINARY = gnunet-service-vpn
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r30039 - in gnunet: . src/arm src/ats src/consensus src/conversation src/core src/datastore src/dht src/dns src/dv src/experimentation src/fs src/gns src/hostlist src/identity src/include src/mesh src/multicast src/namestore src/nat src/nse src/peerinfo src/psyc src/psycstore src/regex src/revocation src/scalarproduct src/set src/statistics src/template src/testbed src/testing src/transport src/util src/vpn,
gnunet <=