summaryrefslogtreecommitdiff
path: root/src/gns
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns')
-rw-r--r--src/gns/Makefile.am9
-rw-r--r--src/gns/gnunet-gns-proxy-setup-ca.in20
-rw-r--r--src/gns/gnunet-gns.c8
-rwxr-xr-xsrc/gns/test_gnunet_gns.sh.in6
4 files changed, 21 insertions, 22 deletions
diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am
index 9f0e0bbb6..abd5d5b48 100644
--- a/src/gns/Makefile.am
+++ b/src/gns/Makefile.am
@@ -103,17 +103,12 @@ plugin_LTLIBRARIES = \
bin_SCRIPTS = \
gnunet-gns-proxy-setup-ca
-# See: https://www.gnu.org/software/automake/manual/html_node/Scripts.html#Scripts
-do_subst = $(SED) -e 's,[@]pkgdatadir[@],$(pkgdatadir),g'
-
gnunet-gns-proxy-setup-ca: gnunet-gns-proxy-setup-ca.in Makefile
- $(do_subst) < $(srcdir)/gnunet-gns-proxy-setup-ca.in > gnunet-gns-proxy-setup-ca
+ $(AWK) -v bdir="$(bindir)" -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" -v pfx="$(prefix)" -v prl="$(PERL)" -v sysconfdirectory="$(sysconfdir)" -v pkgdatadirectory="$(pkgdatadir)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/gnunet-gns-proxy-setup-ca.in > gnunet-gns-proxy-setup-ca
@chmod +x gnunet-gns-proxy-setup-ca
-do_subst_pkgdatadir = $(SED) -e 's,[@]pkgdatadir[@],$(pkgdatadir),g'
-
test_gnunet_gns.sh: test_gnunet_gns.sh.in Makefile
- $(do_subst_pkgdatadir) < $(srcdir)/test_gnunet_gns.sh.in > test_gnunet_gns.sh
+ $(AWK) -v bdir="$(bindir)" -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" -v pfx="$(prefix)" -v prl="$(PERL)" -v sysconfdirectory="$(sysconfdir)" -v pkgdatadirectory="$(pkgdatadir)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/test_gnunet_gns.sh.in > test_gnunet_gns.sh
@chmod +x test_gnunet_gns.sh
CLEANFILES = test_gnunet_gns.sh
diff --git a/src/gns/gnunet-gns-proxy-setup-ca.in b/src/gns/gnunet-gns-proxy-setup-ca.in
index 7a79c7994..602aadb2a 100644
--- a/src/gns/gnunet-gns-proxy-setup-ca.in
+++ b/src/gns/gnunet-gns-proxy-setup-ca.in
@@ -48,30 +48,30 @@
dir=$(dirname "$0")
-if test -e @pkgdatadir@/progname.sh
+if test -e @PKGDATADIRECTORY@/progname.sh
then
- . @pkgdatadir@/progname.sh
+ . @PKGDATADIRECTORY@/progname.sh
else
. $dir/../../contrib/build-common/sh/lib.sh/progname.sh
fi
-if test -e @pkgdatadir@/existence.sh
+if test -e @PKGDATADIRECTORY@/existence.sh
then
- . @pkgdatadir@/existence.sh
+ . @PKGDATADIRECTORY@/existence.sh
else
. $dir/../../contrib/build-common/sh/lib.sh/existence.sh
fi
-if test -e @pkgdatadir@/msg.sh
+if test -e @PKGDATADIRECTORY@/msg.sh
then
- . @pkgdatadir@/msg.sh
+ . @PKGDATADIRECTORY@/msg.sh
else
. $dir/../../contrib/build-common/sh/lib.sh/msg.sh
fi
-if test -e @pkgdatadir@/version_gnunet.sh
+if test -e @PKGDATADIRECTORY@/version_gnunet.sh
then
- . @pkgdatadir@/version_gnunet.sh
+ . @PKGDATADIRECTORY@/version_gnunet.sh
else
. $dir/../../contrib/build-common/sh/lib.sh/version_gnunet.sh
fi
@@ -143,8 +143,8 @@ generate_ca()
# ------------- openssl
- GNUTLS_CA_TEMPLATE=@pkgdatadir@/gnunet-gns-proxy-ca.template
- OPENSSLCFG=@pkgdatadir@/openssl.cnf
+ GNUTLS_CA_TEMPLATE=@PKGDATADIRECTORY@/gnunet-gns-proxy-ca.template
+ OPENSSLCFG=@PKGDATADIRECTORY@/openssl.cnf
CERTTOOL=""
OPENSSL=0
if test -x $(existence gnunet-certtool)
diff --git a/src/gns/gnunet-gns.c b/src/gns/gnunet-gns.c
index fe51013ed..600a9c9a5 100644
--- a/src/gns/gnunet-gns.c
+++ b/src/gns/gnunet-gns.c
@@ -229,7 +229,6 @@ run (void *cls,
(void) cls;
(void) args;
(void) cfgfile;
- Idna_rc rc;
cfg = c;
to_task = NULL;
@@ -239,12 +238,15 @@ run (void *cls,
if (NULL != (colon = strchr (lookup_name, ':')))
*colon = '\0';
}
+#ifdef LSD001
+ Idna_rc rc;
/**
* If DNS compatibility is requested, we first verify that the
* lookup_name is in a DNS format. If yes, we convert it to UTF-8.
*/
if (GNUNET_YES == dns_compat)
{
+#endif
if (GNUNET_OK != GNUNET_DNSPARSER_check_name (lookup_name))
{
fprintf (stderr,
@@ -253,6 +255,7 @@ run (void *cls,
global_ret = 3;
return;
}
+#ifdef LSD001
if (IDNA_SUCCESS !=
(rc = idna_to_unicode_8z8z (lookup_name, &idna_name,
IDNA_ALLOW_UNASSIGNED)))
@@ -261,11 +264,12 @@ run (void *cls,
_ ("Failed to convert DNS IDNA name `%s' to UTF-8: %s\n"),
lookup_name,
idna_strerror (rc));
- global_ret = 3;
+ global_ret = 4;
return;
}
lookup_name = idna_name;
}
+#endif
if (GNUNET_YES !=
GNUNET_CLIENT_test (cfg,
"arm"))
diff --git a/src/gns/test_gnunet_gns.sh.in b/src/gns/test_gnunet_gns.sh.in
index 66bed0516..8cdd062c7 100755
--- a/src/gns/test_gnunet_gns.sh.in
+++ b/src/gns/test_gnunet_gns.sh.in
@@ -8,9 +8,9 @@
# but this works for now.
dir=$(dirname "$0")
-if test -e @pkgdatadir@/existence.sh
+if test -e @PKGDATADIRECTORY@/existence.sh
then
- . @pkgdatadir@/existence.sh
+ . @PKGDATADIRECTORY@/existence.sh
else
. $dir/../../contrib/build-common/sh/lib.sh/existence.sh
fi
@@ -22,7 +22,7 @@ fi
$LOCATION --version
if test $? != 0
then
- echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX"
+ echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX"
exit 77
fi