summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-01-30 14:47:20 +0000
committerChristian Grothoff <christian@grothoff.org>2014-01-30 14:47:20 +0000
commitf57cbab24fb7a22fc982eb8b6c4a2d18402be460 (patch)
treeaa04434af42c35c434a233e31a91da5800eeb098
parente4e2c54e62f4eeba2aa2db33bd9cf75e45d99c0c (diff)
fix #3284: support lib/MULTIARCH/ paths in installation, use GNUNET_PREFIX=@libdir@ so that we can extract the value of MULTIARCH during 'make check'
-rw-r--r--contrib/Makefile.am2
-rw-r--r--po/POTFILES.in1
-rw-r--r--src/arm/Makefile.am2
-rw-r--r--src/ats-tests/Makefile.am2
-rw-r--r--src/ats/Makefile.am2
-rw-r--r--src/consensus/Makefile.am2
-rw-r--r--src/conversation/Makefile.am2
-rw-r--r--src/core/Makefile.am2
-rw-r--r--src/datacache/Makefile.am2
-rw-r--r--src/datastore/Makefile.am2
-rw-r--r--src/dht/Makefile.am2
-rw-r--r--src/dns/Makefile.am2
-rw-r--r--src/dv/Makefile.am2
-rw-r--r--src/env/Makefile.am2
-rw-r--r--src/experimentation/Makefile.am2
-rw-r--r--src/fragmentation/Makefile.am2
-rw-r--r--src/fs/Makefile.am2
-rw-r--r--src/gns/Makefile.am2
-rw-r--r--src/gnsrecord/Makefile.am2
-rw-r--r--src/hello/Makefile.am2
-rw-r--r--src/hostlist/Makefile.am2
-rw-r--r--src/identity/Makefile.am2
-rw-r--r--src/include/gnunet_bandwidth_lib.h2
-rw-r--r--src/integration-tests/Makefile.am2
-rw-r--r--src/mesh/Makefile.am2
-rw-r--r--src/multicast/Makefile.am2
-rw-r--r--src/namecache/Makefile.am2
-rw-r--r--src/namestore/Makefile.am2
-rw-r--r--src/nat/Makefile.am2
-rw-r--r--src/nse/Makefile.am2
-rw-r--r--src/peerinfo-tool/Makefile.am2
-rw-r--r--src/peerinfo/Makefile.am2
-rw-r--r--src/psyc/Makefile.am2
-rw-r--r--src/psycstore/Makefile.am2
-rw-r--r--src/pt/Makefile.am2
-rw-r--r--src/regex/Makefile.am2
-rw-r--r--src/revocation/Makefile.am2
-rw-r--r--src/scalarproduct/Makefile.am2
-rw-r--r--src/secretsharing/Makefile.am2
-rw-r--r--src/set/Makefile.am2
-rw-r--r--src/statistics/Makefile.am2
-rw-r--r--src/template/Makefile.am2
-rw-r--r--src/testbed/Makefile.am2
-rw-r--r--src/testing/Makefile.am2
-rw-r--r--src/topology/Makefile.am2
-rw-r--r--src/transport/Makefile.am2
-rw-r--r--src/tun/Makefile.am2
-rw-r--r--src/util/Makefile.am2
-rw-r--r--src/util/configuration.c4
-rw-r--r--src/util/os_installation.c123
-rw-r--r--src/util/test_resolver_api.c8
51 files changed, 143 insertions, 87 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index eacfa8295..c8d301e67 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -83,7 +83,7 @@ check_PROGRAMS = \
test_gnunet_prefix
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5200dbb0b..3f2965010 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -353,6 +353,7 @@ src/util/crypto_hash.c
src/util/crypto_hkdf.c
src/util/crypto_kdf.c
src/util/crypto_mpi.c
+src/util/crypto_paillier.c
src/util/crypto_random.c
src/util/crypto_symmetric.c
src/util/disk.c
diff --git a/src/arm/Makefile.am b/src/arm/Makefile.am
index 7b022fe5d..238a463ec 100644
--- a/src/arm/Makefile.am
+++ b/src/arm/Makefile.am
@@ -72,7 +72,7 @@ check_SCRIPTS = \
endif
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
endif
diff --git a/src/ats-tests/Makefile.am b/src/ats-tests/Makefile.am
index 237acf879..20b7784fe 100644
--- a/src/ats-tests/Makefile.am
+++ b/src/ats-tests/Makefile.am
@@ -45,7 +45,7 @@ check_PROGRAMS = \
$(TESTING_TESTS)
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/ats/Makefile.am b/src/ats/Makefile.am
index 2e4e1651e..8be619980 100644
--- a/src/ats/Makefile.am
+++ b/src/ats/Makefile.am
@@ -145,7 +145,7 @@ check_PROGRAMS = \
$(TESTING_TESTS)
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/consensus/Makefile.am b/src/consensus/Makefile.am
index b14be5681..bd2c94d09 100644
--- a/src/consensus/Makefile.am
+++ b/src/consensus/Makefile.am
@@ -77,7 +77,7 @@ check_PROGRAMS = \
test_consensus_api
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/conversation/Makefile.am b/src/conversation/Makefile.am
index af3b96655..04bf707e5 100644
--- a/src/conversation/Makefile.am
+++ b/src/conversation/Makefile.am
@@ -94,7 +94,7 @@ libexec_PROGRAMS += \
$(AUDIO_HELPER_RECD) \
$(AUDIO_HELPER_PLAY)
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(AUDIO_TESTS)
if BUILD_PULSE_HELPERS
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index 8d9faf2c7..b013db6b3 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -73,7 +73,7 @@ check_PROGRAMS = \
$(TESTING_TESTS)
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/datacache/Makefile.am b/src/datacache/Makefile.am
index f9af4610b..a66395772 100644
--- a/src/datacache/Makefile.am
+++ b/src/datacache/Makefile.am
@@ -122,7 +122,7 @@ check_PROGRAMS = \
$(POSTGRES_TESTS)
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/datastore/Makefile.am b/src/datastore/Makefile.am
index 092f0ede5..2c0aec7a6 100644
--- a/src/datastore/Makefile.am
+++ b/src/datastore/Makefile.am
@@ -170,7 +170,7 @@ check_PROGRAMS = \
$(POSTGRES_TESTS)
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/dht/Makefile.am b/src/dht/Makefile.am
index f35e1e18c..2a4bb7d29 100644
--- a/src/dht/Makefile.am
+++ b/src/dht/Makefile.am
@@ -158,7 +158,7 @@ if HAVE_EXPERIMENTAL
endif
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = test_dht_api $(check_SCRIPTS) \
test_dht_twopeer \
test_dht_line \
diff --git a/src/dns/Makefile.am b/src/dns/Makefile.am
index c2a432ca6..041fc67b2 100644
--- a/src/dns/Makefile.am
+++ b/src/dns/Makefile.am
@@ -115,7 +115,7 @@ libgnunet_plugin_block_dns_la_LDFLAGS = \
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
endif
diff --git a/src/dv/Makefile.am b/src/dv/Makefile.am
index a4b1c4b04..37bd77046 100644
--- a/src/dv/Makefile.am
+++ b/src/dv/Makefile.am
@@ -76,7 +76,7 @@ check_PROGRAMS = \
endif
if ENABLE_TEST_RUN
- TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+ TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/env/Makefile.am b/src/env/Makefile.am
index c3f2aee02..4a79940b2 100644
--- a/src/env/Makefile.am
+++ b/src/env/Makefile.am
@@ -32,7 +32,7 @@ check_PROGRAMS = \
endif
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/experimentation/Makefile.am b/src/experimentation/Makefile.am
index 0c6a96936..a1bc93722 100644
--- a/src/experimentation/Makefile.am
+++ b/src/experimentation/Makefile.am
@@ -25,7 +25,7 @@ check_PROGRAMS = \
$(TEXT_EXP_CLIQUE)
if ENABLE_TEST_RUN
- TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+ TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = \
$(TEXT_EXP_CLIQUE)
endif
diff --git a/src/fragmentation/Makefile.am b/src/fragmentation/Makefile.am
index d85373a10..9b7369aff 100644
--- a/src/fragmentation/Makefile.am
+++ b/src/fragmentation/Makefile.am
@@ -25,7 +25,7 @@ check_PROGRAMS = \
test_fragmentation
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am
index a04591ab2..79637e930 100644
--- a/src/fs/Makefile.am
+++ b/src/fs/Makefile.am
@@ -279,7 +279,7 @@ endif
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;\
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;\
export PATH=@prefix@/bin:$$PATH;\
$(MONKEY)
TESTS = \
diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am
index 41c9032f0..226657e4f 100644
--- a/src/gns/Makefile.am
+++ b/src/gns/Makefile.am
@@ -277,7 +277,7 @@ check_SCRIPTS = \
if ENABLE_TEST_RUN
if HAVE_SQLITE
- TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+ TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_SCRIPTS)
endif
endif
diff --git a/src/gnsrecord/Makefile.am b/src/gnsrecord/Makefile.am
index a5a698e2f..d0d8f3e89 100644
--- a/src/gnsrecord/Makefile.am
+++ b/src/gnsrecord/Makefile.am
@@ -21,7 +21,7 @@ check_PROGRAMS = \
test_gnsrecord_block_expiration
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = \
$(check_PROGRAMS) \
$(check_SCRIPTS)
diff --git a/src/hello/Makefile.am b/src/hello/Makefile.am
index 328a88a48..8f16219e8 100644
--- a/src/hello/Makefile.am
+++ b/src/hello/Makefile.am
@@ -28,7 +28,7 @@ check_PROGRAMS = \
test_friend_hello
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/hostlist/Makefile.am b/src/hostlist/Makefile.am
index 887355d9b..b1c05596b 100644
--- a/src/hostlist/Makefile.am
+++ b/src/hostlist/Makefile.am
@@ -48,7 +48,7 @@ check_PROGRAMS = \
if HAVE_MHD
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = \
test_gnunet_daemon_hostlist \
test_gnunet_daemon_hostlist_reconnect \
diff --git a/src/identity/Makefile.am b/src/identity/Makefile.am
index 616f0b5b0..b14ae57f8 100644
--- a/src/identity/Makefile.am
+++ b/src/identity/Makefile.am
@@ -68,7 +68,7 @@ check_PROGRAMS = \
endif
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/include/gnunet_bandwidth_lib.h b/src/include/gnunet_bandwidth_lib.h
index 0cade7902..a8ebaae3e 100644
--- a/src/include/gnunet_bandwidth_lib.h
+++ b/src/include/gnunet_bandwidth_lib.h
@@ -94,7 +94,7 @@ struct GNUNET_BANDWIDTH_Tracker
/**
* Maximum number of seconds over which bandwidth may "accumulate".
* Note that additionally, we also always allow at least
- * GNUNET_SERVER_MAX_MESSAGE_SIZE to accumulate.
+ * #GNUNET_SERVER_MAX_MESSAGE_SIZE to accumulate.
*/
uint32_t max_carry_s__;
};
diff --git a/src/integration-tests/Makefile.am b/src/integration-tests/Makefile.am
index 2a106d381..2bb97770c 100644
--- a/src/integration-tests/Makefile.am
+++ b/src/integration-tests/Makefile.am
@@ -26,7 +26,7 @@ endif
if HAVE_MHD
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = \
$(check_SCRIPTS)
endif
diff --git a/src/mesh/Makefile.am b/src/mesh/Makefile.am
index 455d45a46..1dda635e3 100644
--- a/src/mesh/Makefile.am
+++ b/src/mesh/Makefile.am
@@ -184,7 +184,7 @@ test_mesh_small_speed_reliable_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = \
$(check_PROGRAMS)
endif
diff --git a/src/multicast/Makefile.am b/src/multicast/Makefile.am
index b65bd65cd..948575804 100644
--- a/src/multicast/Makefile.am
+++ b/src/multicast/Makefile.am
@@ -51,7 +51,7 @@ check_PROGRAMS = \
test_multicast_api
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/namecache/Makefile.am b/src/namecache/Makefile.am
index 41c27e413..c22c20085 100644
--- a/src/namecache/Makefile.am
+++ b/src/namecache/Makefile.am
@@ -47,7 +47,7 @@ check_PROGRAMS = \
endif
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = \
$(check_PROGRAMS)
endif
diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am
index 32d29ebca..e97f74ee7 100644
--- a/src/namestore/Makefile.am
+++ b/src/namestore/Makefile.am
@@ -63,7 +63,7 @@ check_PROGRAMS = \
endif
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = \
$(check_PROGRAMS) \
$(check_SCRIPTS)
diff --git a/src/nat/Makefile.am b/src/nat/Makefile.am
index a7424b8dc..0111cd5b1 100644
--- a/src/nat/Makefile.am
+++ b/src/nat/Makefile.am
@@ -80,7 +80,7 @@ check_PROGRAMS = \
test_nat_test
if ENABLE_TEST_RUN
- TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+ TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/nse/Makefile.am b/src/nse/Makefile.am
index 44c187739..513642423 100644
--- a/src/nse/Makefile.am
+++ b/src/nse/Makefile.am
@@ -80,7 +80,7 @@ check_PROGRAMS = \
endif
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/peerinfo-tool/Makefile.am b/src/peerinfo-tool/Makefile.am
index 1bca57678..bead00989 100644
--- a/src/peerinfo-tool/Makefile.am
+++ b/src/peerinfo-tool/Makefile.am
@@ -29,7 +29,7 @@ check_SCRIPTS = \
endif
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_SCRIPTS)
endif
diff --git a/src/peerinfo/Makefile.am b/src/peerinfo/Makefile.am
index 7dd1581c4..054d5ce13 100644
--- a/src/peerinfo/Makefile.am
+++ b/src/peerinfo/Makefile.am
@@ -57,7 +57,7 @@ endif
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/psyc/Makefile.am b/src/psyc/Makefile.am
index d199bd3a2..d6901922f 100644
--- a/src/psyc/Makefile.am
+++ b/src/psyc/Makefile.am
@@ -59,7 +59,7 @@ check_PROGRAMS = \
endif
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/psycstore/Makefile.am b/src/psycstore/Makefile.am
index 44ac5bb49..d87cd25f0 100644
--- a/src/psycstore/Makefile.am
+++ b/src/psycstore/Makefile.am
@@ -81,7 +81,7 @@ check_PROGRAMS = \
endif
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/pt/Makefile.am b/src/pt/Makefile.am
index ebd662851..816484377 100644
--- a/src/pt/Makefile.am
+++ b/src/pt/Makefile.am
@@ -57,7 +57,7 @@ endif
check_PROGRAMS = $(VPN_TEST)
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/regex/Makefile.am b/src/regex/Makefile.am
index dd02afa19..90b9df7e4 100644
--- a/src/regex/Makefile.am
+++ b/src/regex/Makefile.am
@@ -170,7 +170,7 @@ check_PROGRAMS = \
test_regex_api
if ENABLE_TEST_RUN
- TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+ TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/revocation/Makefile.am b/src/revocation/Makefile.am
index c1aef65cb..14cc11494 100644
--- a/src/revocation/Makefile.am
+++ b/src/revocation/Makefile.am
@@ -74,7 +74,7 @@ check_SCRIPTS = \
test_local_revocation.py
if ENABLE_TEST_RUN
- TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+ TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = \
$(check_SCRIPTS) \
$(check_PROGRAMS)
diff --git a/src/scalarproduct/Makefile.am b/src/scalarproduct/Makefile.am
index b167bacb1..010d7ebfa 100644
--- a/src/scalarproduct/Makefile.am
+++ b/src/scalarproduct/Makefile.am
@@ -67,6 +67,6 @@ check_SCRIPTS = \
test_scalarproduct_negativezero.sh
if ENABLE_TEST_RUN
- TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+ TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_SCRIPTS)
endif
diff --git a/src/secretsharing/Makefile.am b/src/secretsharing/Makefile.am
index 556356b6f..fb519f4b1 100644
--- a/src/secretsharing/Makefile.am
+++ b/src/secretsharing/Makefile.am
@@ -63,7 +63,7 @@ check_PROGRAMS = \
test_secretsharing_api
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/set/Makefile.am b/src/set/Makefile.am
index a02d80b9e..32eb3317c 100644
--- a/src/set/Makefile.am
+++ b/src/set/Makefile.am
@@ -70,7 +70,7 @@ check_PROGRAMS = \
endif
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/statistics/Makefile.am b/src/statistics/Makefile.am
index 3baea5580..991a6156f 100644
--- a/src/statistics/Makefile.am
+++ b/src/statistics/Makefile.am
@@ -58,7 +58,7 @@ check_PROGRAMS = \
test_statistics_api_watch_zero_value
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
endif
diff --git a/src/template/Makefile.am b/src/template/Makefile.am
index 8d8acccea..42d6a95a0 100644
--- a/src/template/Makefile.am
+++ b/src/template/Makefile.am
@@ -38,7 +38,7 @@ check_PROGRAMS = \
test_template_api
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/testbed/Makefile.am b/src/testbed/Makefile.am
index d088b1107..e9e537515 100644
--- a/src/testbed/Makefile.am
+++ b/src/testbed/Makefile.am
@@ -193,7 +193,7 @@ check_PROGRAMS = \
$(underlay_testcases)
if ENABLE_TEST_RUN
- TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+ TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = \
test_testbed_api \
test_testbed_logger_api \
diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am
index c1b41c265..6b229b6fe 100644
--- a/src/testing/Makefile.am
+++ b/src/testing/Makefile.am
@@ -57,7 +57,7 @@ check_PROGRAMS = \
test_testing_sharedservices
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = \
test_testing_portreservation \
test_testing_peerstartup \
diff --git a/src/topology/Makefile.am b/src/topology/Makefile.am
index 4f354a141..b8b534a0a 100644
--- a/src/topology/Makefile.am
+++ b/src/topology/Makefile.am
@@ -46,7 +46,7 @@ check_PROGRAMS = \
endif
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index 699899b2b..bbd811bb8 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -440,7 +440,7 @@ check_PROGRAMS = \
endif
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = \
test_transport_testing_startstop \
test_transport_testing_restart \
diff --git a/src/tun/Makefile.am b/src/tun/Makefile.am
index a27d192cb..ffe58136f 100644
--- a/src/tun/Makefile.am
+++ b/src/tun/Makefile.am
@@ -27,7 +27,7 @@ check_PROGRAMS = \
test_regex
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index a2c55d5c3..f520d1cb4 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -279,7 +279,7 @@ check_PROGRAMS = \
test_common_logging_runtime_loglevels
if ENABLE_TEST_RUN
-TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
+TESTS_ENVIRONMENT=export GNUNET_PREFIX=@libdir@;export PATH=@prefix@/bin:$$PATH;
TESTS = $(check_PROGRAMS)
endif
diff --git a/src/util/configuration.c b/src/util/configuration.c
index ca27b5aef..3d9281e8d 100644
--- a/src/util/configuration.c
+++ b/src/util/configuration.c
@@ -1632,7 +1632,7 @@ GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg,
char *ipath;
ipath = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR);
- if (ipath == NULL)
+ if (NULL == ipath)
return GNUNET_SYSERR;
baseconfig = NULL;
GNUNET_asprintf (&baseconfig, "%s%s", ipath, "config.d");
@@ -1644,7 +1644,7 @@ GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg,
return GNUNET_SYSERR; /* no configuration at all found */
}
GNUNET_free (baseconfig);
- if ((filename != NULL) &&
+ if ((NULL != filename) &&
(GNUNET_OK != GNUNET_CONFIGURATION_parse (cfg, filename)))
{
/* specified configuration not found */
diff --git a/src/util/os_installation.c b/src/util/os_installation.c
index 30e729dc6..02d23688c 100644
--- a/src/util/os_installation.c
+++ b/src/util/os_installation.c
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- (C) 2006 Christian Grothoff (and other contributing authors)
+ (C) 2006-2014 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
@@ -65,7 +65,7 @@ get_path_from_proc_maps ()
while (NULL != fgets (line, sizeof (line), f))
{
if ((1 ==
- SSCANF (line, "%*x-%*x %*c%*c%*c%*c %*x %*2u:%*2u %*u%*[ ]%1023s", dir)) &&
+ SSCANF (line, "%*x-%*x %*c%*c%*c%*c %*x %*2x:%*2x %*u%*[ ]%1023s", dir)) &&
(NULL != (lgu = strstr (dir, "libgnunetutil"))))
{
lgu[0] = '\0';
@@ -101,7 +101,7 @@ get_path_from_proc_exe ()
lnk[size] = '\0';
while ((lnk[size] != '/') && (size > 0))
size--;
- /* test for being in lib/gnunet/libexec/ */
+ /* test for being in lib/gnunet/libexec/ or lib/MULTIARCH/gnunet/libexec */
if ( (size > strlen ("/gnunet/libexec/")) &&
(0 == strcmp ("/gnunet/libexec/",
&lnk[size - strlen ("/gnunet/libexec/")])) )
@@ -465,6 +465,8 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind)
const char *dirname;
char *execpath = NULL;
char *tmp;
+ char *multiarch;
+ char *libdir;
int isbasedir;
/* if wanted, try to get the current app's bin/ */
@@ -513,6 +515,17 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind)
execpath[n - 4] = '\0';
n -= 4;
}
+ multiarch = NULL;
+ if (NULL != (libdir = strstr (execpath, "/lib/")))
+ {
+ /* test for multi-arch path of the form "PREFIX/lib/MULTIARCH/";
+ here we need to re-add 'multiarch' to lib and libexec paths later! */
+ multiarch = &libdir[5];
+ if (NULL == strchr (multiarch, '/'))
+ libdir[0] = '\0'; /* Debian multiarch format, cut of from 'execpath' but preserve in multicarch */
+ else
+ multiarch = NULL; /* maybe not, multiarch still has a '/', which is not OK */
+ }
/* in case this was a directory named foo-bin, remove "foo-" */
while ((n > 1) && (execpath[n - 1] == DIR_SEPARATOR))
execpath[--n] = '\0';
@@ -530,29 +543,48 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind)
{
dirname =
DIR_SEPARATOR_STR "lib" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR;
- tmp = GNUNET_malloc (strlen (execpath) + strlen (dirname) + 1);
- sprintf (tmp, "%s%s", execpath, dirname);
- if ( (GNUNET_YES !=
- GNUNET_DISK_directory_test (tmp, GNUNET_YES)) &&
- (4 == sizeof (void *)) )
+ GNUNET_asprintf (&tmp,
+ "%s%s%s",
+ execpath,
+ dirname,
+ (NULL != multiarch) ? multiarch : "");
+ if (GNUNET_YES ==
+ GNUNET_DISK_directory_test (tmp, GNUNET_YES))
+ {
+ GNUNET_free (execpath);
+ return tmp;
+ }
+ GNUNET_free (tmp);
+ tmp = NULL;
+ if (4 == sizeof (void *))
{
- GNUNET_free (tmp);
dirname =
DIR_SEPARATOR_STR "lib32" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR;
- tmp = GNUNET_malloc (strlen (execpath) + strlen (dirname) + 1);
- sprintf (tmp, "%s%s", execpath, dirname);
+ GNUNET_asprintf (&tmp,
+ "%s%s",
+ execpath,
+ dirname);
}
- if ( (GNUNET_YES !=
- GNUNET_DISK_directory_test (tmp, GNUNET_YES)) &&
- (8 == sizeof (void *)) )
+ if (8 == sizeof (void *))
{
dirname =
DIR_SEPARATOR_STR "lib64" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR;
+ GNUNET_asprintf (&tmp,
+ "%s%s",
+ execpath,
+ dirname);
+ }
+
+ if ( (NULL != tmp) &&
+ (GNUNET_YES ==
+ GNUNET_DISK_directory_test (tmp, GNUNET_YES)) )
+ {
+ GNUNET_free (execpath);
+ return tmp;
}
GNUNET_free (tmp);
}
- else
- dirname = DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR;
+ dirname = DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR;
break;
case GNUNET_OS_IPK_DATADIR:
dirname =
@@ -575,42 +607,63 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind)
if (isbasedir)
{
dirname =
- DIR_SEPARATOR_STR "lib" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR \
- "libexec" DIR_SEPARATOR_STR;
- tmp = GNUNET_malloc (strlen (execpath) + strlen (dirname) + 1);
- sprintf (tmp, "%s%s", execpath, dirname);
- if ( (GNUNET_YES !=
- GNUNET_DISK_directory_test (tmp, GNUNET_YES)) &&
- (4 == sizeof (void *)) )
+ DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR "libexec" DIR_SEPARATOR_STR;
+ GNUNET_asprintf (&tmp,
+ "%s%s%s%s",
+ execpath,
+ DIR_SEPARATOR_STR "lib" DIR_SEPARATOR_STR,
+ (NULL != multiarch) ? multiarch : "",
+ dirname);
+ if (GNUNET_YES ==
+ GNUNET_DISK_directory_test (tmp, GNUNET_YES))
+ {
+ GNUNET_free (execpath);
+ return tmp;
+ }
+ GNUNET_free (tmp);
+ tmp = NULL;
+ if (4 == sizeof (void *))
{
- GNUNET_free (tmp);
dirname =
DIR_SEPARATOR_STR "lib32" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR \
"libexec" DIR_SEPARATOR_STR;
- tmp = GNUNET_malloc (strlen (execpath) + strlen (dirname) + 1);
- sprintf (tmp, "%s%s", execpath, dirname);
+ GNUNET_asprintf (&tmp,
+ "%s%s",
+ execpath,
+ dirname);
}
- if ( (GNUNET_YES !=
- GNUNET_DISK_directory_test (tmp, GNUNET_YES)) &&
- (8 == sizeof (void *)) )
+ if (8 == sizeof (void *))
{
dirname =
DIR_SEPARATOR_STR "lib64" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR \
"libexec" DIR_SEPARATOR_STR;
+ GNUNET_asprintf (&tmp,
+ "%s%s",
+ execpath,
+ dirname);
+ }
+ if ( (NULL != tmp) &&
+ (GNUNET_YES ==
+ GNUNET_DISK_directory_test (tmp, GNUNET_YES)) )
+ {
+ GNUNET_free (execpath);
+ return tmp;
}
+
GNUNET_free (tmp);
}
- else
- dirname =
- DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR \
- "libexec" DIR_SEPARATOR_STR;
+ dirname =
+ DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR \
+ "libexec" DIR_SEPARATOR_STR;
break;
default:
GNUNET_free (execpath);
return NULL;
}
- tmp = GNUNET_malloc (strlen (execpath) + strlen (dirname) + 1);
- sprintf (tmp, "%s%s", execpath, dirname);
+ GNUNET_asprintf (&tmp,
+ "%s%s",
+ execpath,
+ dirname);
GNUNET_free (execpath);
return tmp;
}
diff --git a/src/util/test_resolver_api.c b/src/util/test_resolver_api.c
index 220f4bdac..c94990415 100644
--- a/src/util/test_resolver_api.c
+++ b/src/util/test_resolver_api.c
@@ -199,7 +199,9 @@ check_rootserver_name (void *cls, const char *hostname)
else
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Received invalid rootserver hostname `%s'.\n", hostname);
+ "Received invalid rootserver hostname `%s', expected `%s'\n",
+ hostname,
+ ROOTSERVER_NAME);
GNUNET_break (0);
}
}
@@ -292,11 +294,11 @@ run (void *cls, char *const *args, const char *cfgfile,
rootserver =
gethostbyaddr (&rootserver_addr, sizeof (rootserver_addr), AF_INET);
- if (rootserver == NULL)
+ if (NULL == rootserver)
{
/* Error: resolving IP addresses does not work */
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("gethostbyaddr() could not lookup hostname: %s\n"),
+ "gethostbyaddr() could not lookup hostname: %s\n",
hstrerror (h_errno));
GNUNET_break (0);
}