diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-01-30 14:47:20 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-01-30 14:47:20 +0000 |
commit | f57cbab24fb7a22fc982eb8b6c4a2d18402be460 (patch) | |
tree | aa04434af42c35c434a233e31a91da5800eeb098 | |
parent | e4e2c54e62f4eeba2aa2db33bd9cf75e45d99c0c (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'
51 files changed, 143 insertions, 87 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am index eacfa8295f..c8d301e67e 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 5200dbb0be..3f29650108 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 7b022fe5d6..238a463ec4 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 237acf879b..20b7784fe3 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 2e4e1651e6..8be6199804 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 b14be56815..bd2c94d094 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 af3b96655f..04bf707e54 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 8d9faf2c7e..b013db6b32 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 f9af4610bb..a663957729 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 092f0ede56..2c0aec7a67 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 f35e1e18cf..2a4bb7d292 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 c2a432ca60..041fc67b28 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 a4b1c4b043..37bd770462 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 c3f2aee02e..4a79940b2d 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 0c6a969369..a1bc93722f 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 d85373a104..9b7369aff5 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 a04591ab23..79637e9301 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 41c9032f03..226657e4fe 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 a5a698e2f5..d0d8f3e894 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 328a88a48a..8f16219e80 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 887355d9bc..b1c05596bb 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 616f0b5b0b..b14ae57f8d 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 0cade7902b..a8ebaae3e7 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 2a106d3818..2bb97770c1 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 455d45a460..1dda635e3c 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 b65bd65cd3..9485758043 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 41c27e413a..c22c200858 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 32d29ebca1..e97f74ee78 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 a7424b8dc2..0111cd5b16 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 44c1877390..5136424233 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 1bca57678a..bead00989d 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 7dd1581c4c..054d5ce132 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 d199bd3a28..d6901922f6 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 44ac5bb493..d87cd25f07 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 ebd6628519..8164843773 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 dd02afa197..90b9df7e4c 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 c1aef65cbd..14cc114948 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 b167bacb13..010d7ebfa7 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 556356b6ff..fb519f4b15 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 a02d80b9e1..32eb3317c7 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 3baea55805..991a6156f1 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 8d8acccea0..42d6a95a07 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 d088b1107b..e9e537515c 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 c1b41c265d..6b229b6fe4 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 4f354a1412..b8b534a0a0 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 699899b2bd..bbd811bb80 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 a27d192cba..ffe58136f6 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 a2c55d5c31..f520d1cb4a 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 ca27b5aefe..3d9281e8d2 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 30e729dc63..02d23688cc 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 220f4bdac3..c949904156 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); } |