diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-10-29 16:14:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-10-29 16:14:03 +0000 |
commit | bcbcf005b4864ac5557c31da10521126d8880849 (patch) | |
tree | 444cafefb16e1c5a4ba13ce2db07d6ec1f37675e /src/hostlist | |
parent | 119193d6350bbbd8c6ecbd60ccc8301223d6f6d6 (diff) | |
download | gnunet-bcbcf005b4864ac5557c31da10521126d8880849.tar.gz gnunet-bcbcf005b4864ac5557c31da10521126d8880849.zip |
installing all service, daemon and helper binaries to lib/gnunet/libexec/; updating code to run binaries from new location, which is no longer in PATH
Diffstat (limited to 'src/hostlist')
-rw-r--r-- | src/hostlist/Makefile.am | 4 | ||||
-rw-r--r-- | src/hostlist/test_gnunet_daemon_hostlist.c | 6 | ||||
-rw-r--r-- | src/hostlist/test_gnunet_daemon_hostlist_learning.c | 11 | ||||
-rw-r--r-- | src/hostlist/test_gnunet_daemon_hostlist_reconnect.c | 9 |
4 files changed, 22 insertions, 8 deletions
diff --git a/src/hostlist/Makefile.am b/src/hostlist/Makefile.am index 1df537276..726251aec 100644 --- a/src/hostlist/Makefile.am +++ b/src/hostlist/Makefile.am | |||
@@ -2,6 +2,8 @@ INCLUDES = -I$(top_srcdir)/src/include | |||
2 | 2 | ||
3 | pkgcfgdir= $(pkgdatadir)/config.d/ | 3 | pkgcfgdir= $(pkgdatadir)/config.d/ |
4 | 4 | ||
5 | libexecdir= $(pkglibdir)/libexec/ | ||
6 | |||
5 | dist_pkgcfg_DATA = \ | 7 | dist_pkgcfg_DATA = \ |
6 | hostlist.conf | 8 | hostlist.conf |
7 | 9 | ||
@@ -15,7 +17,7 @@ if HAVE_MHD | |||
15 | endif | 17 | endif |
16 | 18 | ||
17 | if HAVE_LIBCURL | 19 | if HAVE_LIBCURL |
18 | bin_PROGRAMS = \ | 20 | libexec_PROGRAMS = \ |
19 | gnunet-daemon-hostlist | 21 | gnunet-daemon-hostlist |
20 | endif | 22 | endif |
21 | 23 | ||
diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c index 6e9f31a20..5602609ae 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist.c +++ b/src/hostlist/test_gnunet_daemon_hostlist.c | |||
@@ -131,9 +131,12 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message) | |||
131 | static void | 131 | static void |
132 | setup_peer (struct PeerContext *p, const char *cfgname) | 132 | setup_peer (struct PeerContext *p, const char *cfgname) |
133 | { | 133 | { |
134 | char *binary; | ||
135 | |||
136 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | ||
134 | p->cfg = GNUNET_CONFIGURATION_create (); | 137 | p->cfg = GNUNET_CONFIGURATION_create (); |
135 | p->arm_proc = | 138 | p->arm_proc = |
136 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, "gnunet-service-arm", | 139 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary, |
137 | "gnunet-service-arm", | 140 | "gnunet-service-arm", |
138 | "-c", cfgname, NULL); | 141 | "-c", cfgname, NULL); |
139 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); | 142 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); |
@@ -141,6 +144,7 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
141 | GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, ¬ify_connect, NULL); | 144 | GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, ¬ify_connect, NULL); |
142 | GNUNET_assert (p->th != NULL); | 145 | GNUNET_assert (p->th != NULL); |
143 | p->ghh = GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p); | 146 | p->ghh = GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p); |
147 | GNUNET_free (binary); | ||
144 | } | 148 | } |
145 | 149 | ||
146 | 150 | ||
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c index 8a0992dda..b7199637e 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c | |||
@@ -382,10 +382,12 @@ setup_learn_peer (struct PeerContext *p, const char *cfgname) | |||
382 | { | 382 | { |
383 | char *filename; | 383 | char *filename; |
384 | unsigned int result; | 384 | unsigned int result; |
385 | char *binary; | ||
385 | 386 | ||
387 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | ||
386 | p->cfg = GNUNET_CONFIGURATION_create (); | 388 | p->cfg = GNUNET_CONFIGURATION_create (); |
387 | p->arm_proc = | 389 | p->arm_proc = |
388 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, "gnunet-service-arm", | 390 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary, |
389 | "gnunet-service-arm", | 391 | "gnunet-service-arm", |
390 | "-c", cfgname, NULL); | 392 | "-c", cfgname, NULL); |
391 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); | 393 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); |
@@ -408,20 +410,25 @@ setup_learn_peer (struct PeerContext *p, const char *cfgname) | |||
408 | GNUNET_assert (NULL != p->core); | 410 | GNUNET_assert (NULL != p->core); |
409 | p->stats = GNUNET_STATISTICS_create ("hostlist", p->cfg); | 411 | p->stats = GNUNET_STATISTICS_create ("hostlist", p->cfg); |
410 | GNUNET_assert (NULL != p->stats); | 412 | GNUNET_assert (NULL != p->stats); |
413 | GNUNET_free (binary); | ||
411 | } | 414 | } |
412 | 415 | ||
413 | 416 | ||
414 | static void | 417 | static void |
415 | setup_adv_peer (struct PeerContext *p, const char *cfgname) | 418 | setup_adv_peer (struct PeerContext *p, const char *cfgname) |
416 | { | 419 | { |
420 | char *binary; | ||
421 | |||
422 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | ||
417 | p->cfg = GNUNET_CONFIGURATION_create (); | 423 | p->cfg = GNUNET_CONFIGURATION_create (); |
418 | p->arm_proc = | 424 | p->arm_proc = |
419 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, "gnunet-service-arm", | 425 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary, |
420 | "gnunet-service-arm", | 426 | "gnunet-service-arm", |
421 | "-c", cfgname, NULL); | 427 | "-c", cfgname, NULL); |
422 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); | 428 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); |
423 | p->stats = GNUNET_STATISTICS_create ("hostlist", p->cfg); | 429 | p->stats = GNUNET_STATISTICS_create ("hostlist", p->cfg); |
424 | GNUNET_assert (NULL != p->stats); | 430 | GNUNET_assert (NULL != p->stats); |
431 | GNUNET_free (binary); | ||
425 | } | 432 | } |
426 | 433 | ||
427 | 434 | ||
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c index 1b1df9a3a..63baced46 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c | |||
@@ -141,14 +141,14 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message) | |||
141 | static void | 141 | static void |
142 | setup_peer (struct PeerContext *p, const char *cfgname) | 142 | setup_peer (struct PeerContext *p, const char *cfgname) |
143 | { | 143 | { |
144 | char *binary; | ||
145 | |||
146 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | ||
144 | p->cfg = GNUNET_CONFIGURATION_create (); | 147 | p->cfg = GNUNET_CONFIGURATION_create (); |
145 | #if START_ARM | 148 | #if START_ARM |
146 | p->arm_proc = | 149 | p->arm_proc = |
147 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, "gnunet-service-arm", | 150 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary, |
148 | "gnunet-service-arm", | 151 | "gnunet-service-arm", |
149 | #if VERBOSE | ||
150 | "-L", "DEBUG", | ||
151 | #endif | ||
152 | "-c", cfgname, NULL); | 152 | "-c", cfgname, NULL); |
153 | #endif | 153 | #endif |
154 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); | 154 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); |
@@ -156,6 +156,7 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
156 | GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, ¬ify_connect, NULL); | 156 | GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, ¬ify_connect, NULL); |
157 | GNUNET_assert (p->th != NULL); | 157 | GNUNET_assert (p->th != NULL); |
158 | p->ghh = GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p); | 158 | p->ghh = GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p); |
159 | GNUNET_free (binary); | ||
159 | } | 160 | } |
160 | 161 | ||
161 | 162 | ||