From bab0de2b00129e13bd17ab5c3480eda894159b31 Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Sun, 1 Dec 2019 12:26:11 +0100 Subject: fix #5927 --- src/gns/gnunet-gns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gns/gnunet-gns.c b/src/gns/gnunet-gns.c index fe51013ed..0107a313a 100644 --- a/src/gns/gnunet-gns.c +++ b/src/gns/gnunet-gns.c @@ -261,7 +261,7 @@ 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; -- cgit v1.2.3 From 520dce09be20c1961f0c419e46a773f3247683cc Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Sun, 1 Dec 2019 12:32:14 +0100 Subject: ifdef guard changes for LSD001/0.12 --- src/gns/gnunet-gns.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gns/gnunet-gns.c b/src/gns/gnunet-gns.c index 0107a313a..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))) @@ -266,6 +269,7 @@ run (void *cls, } lookup_name = idna_name; } +#endif if (GNUNET_YES != GNUNET_CLIENT_test (cfg, "arm")) -- cgit v1.2.3 From aede79a15277a74a799e958df97b2f7fd0a8b001 Mon Sep 17 00:00:00 2001 From: ng0 Date: Sun, 1 Dec 2019 12:03:31 +0000 Subject: remove experimental, not yet building code for *BSD (build-system part). --- src/exit/Makefile.am | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/exit/Makefile.am b/src/exit/Makefile.am index 811761ed0..c0323d0d6 100644 --- a/src/exit/Makefile.am +++ b/src/exit/Makefile.am @@ -17,12 +17,6 @@ dist_pkgcfg_DATA = \ if LINUX EXITBIN = gnunet-helper-exit endif -# For testing purposes: -if HAVE_EXPERIMENTAL -if XBSD -EXITBIN = gnunet-helper-exit -endif -endif libexec_PROGRAMS = \ -- cgit v1.2.3 From 24d9ece906cc03e80db617168c9a2d93409e4640 Mon Sep 17 00:00:00 2001 From: ng0 Date: Sun, 1 Dec 2019 19:33:04 +0000 Subject: Add --with-gnunet-logread to configure. --- ChangeLog | 4 ++++ configure.ac | 19 +++++++++++++++++++ contrib/scripts/gnunet-logread/Makefile.am | 12 +++++++++--- contrib/scripts/gnunet-logread/gnunet-logread.in | 2 +- 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6ed48e3e7..4c4e3bf54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Dec 01 19:31:00 UTC 2019 + configure: Add --with-gnunet-logread. + -ng0 + Wed Oct 30 10:50:00 UTC 2019 Released gnunet 0.11.8 -ng0 diff --git a/configure.ac b/configure.ac index 53db0bfaf..6471cb872 100644 --- a/configure.ac +++ b/configure.ac @@ -247,6 +247,25 @@ AC_PATH_PROG( PERL, perl, , $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin ) AC_SUBST([PERL]) +# should we install gnunet-logread? +AC_MSG_CHECKING(whether to install gnunet-logread) +AC_ARG_WITH([gnunet-logread], + [AS_HELP_STRING([--with-gnunet-logread], + [Install gnunet-logread])], + [logread=${withval}], + [logread=no]) +AC_MSG_RESULT($logread) +AS_IF([test "x$logread" = "xyes"], + [AM_CONDITIONAL([GNUNET_LOGREAD], true) + AC_DEFINE([GNUNET_LOGREAD], + [1], + [Installing gnunet-logread])], + [AM_CONDITIONAL([GNUNET_LOGREAD], + false) + AC_DEFINE([GNUNET_LOGREAD], + [0], + [Not installing gnunet-logread])]) + # iptables is a soft requirement to run tests AC_PATH_TARGET_TOOL(VAR_IPTABLES_BINARY, iptables, false) diff --git a/contrib/scripts/gnunet-logread/Makefile.am b/contrib/scripts/gnunet-logread/Makefile.am index 790b58fea..e1183a885 100644 --- a/contrib/scripts/gnunet-logread/Makefile.am +++ b/contrib/scripts/gnunet-logread/Makefile.am @@ -1,7 +1,7 @@ # This Makefile.am is in the public domain AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include -do_subst = $(AWK) -v py="$(PERL)" '{gsub("@PERLEXE@",py); print $$0}' +do_subst = $(AWK) -v prl="$(PERL)" -v pfx="$(prefix)" '{if (/@SUBSTPREFIX@/) { gsub("@SUBSTPREFIX@",pfx)}; gsub("@PERLEXE@",prl); print $$0}' SUFFIXES = .in @@ -17,9 +17,15 @@ CLEANFILES= \ gnunet-logread \ gnunet-logread-ipc-sdedit +if GNUNET_LOGREAD +bin_SCRIPTS = \ + gnunet-logread-ipc \ + $(CLEANFILES) +else noinst_SCRIPTS = \ - $(CLEANFILES) \ - gnunet-logread-ipc + gnunet-logread-ipc \ + $(CLEANFILES) +endif EXTRA_DIST = \ gnunet-logread.in \ diff --git a/contrib/scripts/gnunet-logread/gnunet-logread.in b/contrib/scripts/gnunet-logread/gnunet-logread.in index e27c1d3fc..ce588b8e6 100755 --- a/contrib/scripts/gnunet-logread/gnunet-logread.in +++ b/contrib/scripts/gnunet-logread/gnunet-logread.in @@ -29,7 +29,7 @@ my %levels = ( NONE => 0, ERROR => 1, WARNING => 2, INFO => 4, DEBUG => 8 ); # Message type numbers to names my %msgtypes; -my $prefix = $ENV{GNUNET_PREFIX} || '/usr'; +my $prefix = $ENV{GNUNET_PREFIX} || '@SUBSTPREFIX@'; my $filename = "$prefix/include/gnunet/gnunet_protocols.h"; $ipc = $opts{s} || $DEFAULT_SOCKET; -- cgit v1.2.3 From 93330d9c6d8d5c599a2f12d641c5029aab91d3ad Mon Sep 17 00:00:00 2001 From: ng0 Date: Sun, 1 Dec 2019 20:37:57 +0000 Subject: gnunet-logread: install only when perl has been found (avoid dysfunctional SHa-bang line. --- configure.ac | 4 ++++ contrib/scripts/gnunet-logread/Makefile.am | 2 ++ 2 files changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 6471cb872..ad59c9231 100644 --- a/configure.ac +++ b/configure.ac @@ -242,10 +242,14 @@ AM_PATH_PYTHON([3.4],, [:]) AC_SUBST([PYTHON]) AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) + # perl AC_PATH_PROG( PERL, perl, , $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin ) AC_SUBST([PERL]) +AS_IF([test -x "$PERL"], + [AC_DEFINE_UNQUOTED([HAVE_PERL], [1], [Path to Perl])], + [AC_DEFINE_UNQUOTED([HAVE_PERL], [0], [Path to Perl])]) # should we install gnunet-logread? AC_MSG_CHECKING(whether to install gnunet-logread) diff --git a/contrib/scripts/gnunet-logread/Makefile.am b/contrib/scripts/gnunet-logread/Makefile.am index e1183a885..aa92dfe16 100644 --- a/contrib/scripts/gnunet-logread/Makefile.am +++ b/contrib/scripts/gnunet-logread/Makefile.am @@ -18,6 +18,7 @@ CLEANFILES= \ gnunet-logread-ipc-sdedit if GNUNET_LOGREAD +if HAVE_PERL bin_SCRIPTS = \ gnunet-logread-ipc \ $(CLEANFILES) @@ -26,6 +27,7 @@ noinst_SCRIPTS = \ gnunet-logread-ipc \ $(CLEANFILES) endif +endif EXTRA_DIST = \ gnunet-logread.in \ -- cgit v1.2.3 From d9132e1cba66b5455a627251f377cd95eb008fc1 Mon Sep 17 00:00:00 2001 From: ng0 Date: Sun, 1 Dec 2019 23:19:58 +0000 Subject: convert texinfo checks to proper awk script, add detection for awk/gawk, remove obsolete code. --- Makefile.am | 26 +---------------- configure.ac | 4 +++ contrib/scripts/.gitignore | 1 + contrib/scripts/Makefile.am | 12 ++++++-- contrib/scripts/check-texinfo.awk.in | 55 ++++++++++++++++++++++++++++++++++++ 5 files changed, 70 insertions(+), 28 deletions(-) create mode 100755 contrib/scripts/check-texinfo.awk.in diff --git a/Makefile.am b/Makefile.am index a5b12bad9..aea6c2f6c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -73,28 +73,4 @@ check-python: # exception to add: ignore license files. # exception to add: uref's can go above 79 chars. check-texinfo: - printf "Running basic texinfo linters\n" - printf "...lines containing tabstops?\n" 2>&1 | tee $(top_srcdir)/doc/handbook/texinfo_handbook.log || true - printf "...lines containing tabstops?\n" 2>&1 | tee $(top_srcdir)/doc/tutorial/texinfo_tutorial.log || true - @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/\t/ {print FILENAME":"NR":"$$0}' > $(srcdir)/texinfo_handbook.log || true - @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/\t/ {print FILENAME":"NR":"$$0}' > $(srcdir)/texinfo_tutorial.log || true - printf "...line length over 79 chars?\n" 2>&1 | tee $(top_srcdir)/doc/handbook/texinfo_handbook.log || true - @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk 'length>79 {print FILENAME":"NR":"$$0}' > $(srcdir)/texinfo_handbook.log || true - printf "...line length over 79 chars?\n" 2>&1 | tee $(top_srcdir)/doc/tutorial/texinfo_tutorial.log || true - @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk 'length>79 {print FILENAME":"NR":"$$0}' > $(srcdir)/texinfo_tutorial.log || true - printf "...lines containing macros incompatible with old makeinfo?\n" 2>&1 | tee -a $(top_srcdir)/doc/handbook/texinfo_handbook.log || true - @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/@geq\{\}/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/texinfo_handbook.log || true - printf "...lines containing macros incompatible with old makeinfo?\n" 2>&1 | tee -a $(top_srcdir)/doc/tutorial/texinfo_tutorial.log || true - @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/@geq\{\}/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/texinfo_tutorial.log || true - printf "...lines containing macros incompatible with texi2mdoc?\n" 2>&1 | tee -a $(top_srcdir)/doc/handbook/texinfo_handbook.log || true - @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/@footnote\{/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/texinfo_handbook.log || true - printf "...lines containing macros incompatible with texi2mdoc?\n" 2>&1 | tee -a $(top_srcdir)/doc/tutorial/texinfo_tutorial.log || true - @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/@footnote\{/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/texinfo_tutorial.log || true - printf "...lines telling us what is left TODO or to fix?\n" 2>&1 | tee -a $(top_srcdir)/doc/handbook/texinfo_handbook.log || true - @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/TODO/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/texinfo_handbook.log || true - @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/XXX/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/texinfo_handbook.log || true - printf "...lines telling us what is left TODO or to fix?\n" 2>&1 | tee -a $(top_srcdir)/doc/tutorial/texinfo_tutorial.log || true - @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/TODO/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/texinfo_tutorial.log || true - @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/XXX/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/texinfo_tutorial.log || true - printf "...lines containing a popular typo\n" 2>&1 | tee -a $(top_srcdir)/lint.log || true - @cd $(top_srcdir) ; find . -type f ! -path '*/.*' -name '*' -print0 | xargs -0 awk '/wether/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/lint.log || true + @cd $(top_srcdir); find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 ./contrib/scripts/check-texinfo.awk > $(srcdir)/texinfo_lint.log || true diff --git a/configure.ac b/configure.ac index ad59c9231..e8a450b61 100644 --- a/configure.ac +++ b/configure.ac @@ -251,6 +251,10 @@ AS_IF([test -x "$PERL"], [AC_DEFINE_UNQUOTED([HAVE_PERL], [1], [Path to Perl])], [AC_DEFINE_UNQUOTED([HAVE_PERL], [0], [Path to Perl])]) +# awk +AC_PATH_PROGS( AWK_BINARY, [awk gawk], ,$PATH:/usr/bin/:/usr/local/bin ) +AC_SUBST([AWK_BINARY]) + # should we install gnunet-logread? AC_MSG_CHECKING(whether to install gnunet-logread) AC_ARG_WITH([gnunet-logread], diff --git a/contrib/scripts/.gitignore b/contrib/scripts/.gitignore index 547c89185..3b34b9b69 100644 --- a/contrib/scripts/.gitignore +++ b/contrib/scripts/.gitignore @@ -1,2 +1,3 @@ gnunet-chk.py removetrailingwhitespace.py +check-texinfo.awk diff --git a/contrib/scripts/Makefile.am b/contrib/scripts/Makefile.am index 367e5c4c9..b76e57db7 100644 --- a/contrib/scripts/Makefile.am +++ b/contrib/scripts/Makefile.am @@ -9,7 +9,8 @@ noinst_SCRIPTS = \ removetrailingwhitespace.py \ gnunet_pyexpect.py \ gnunet_janitor.py \ - gnunet-chk.py + gnunet-chk.py \ + check-texinfo.awk bin_SCRIPTS = \ gnunet-bugreport \ @@ -24,12 +25,13 @@ EXTRA_DIST = \ $(SCRIPTS) \ removetrailingwhitespace.py.in \ pydiffer.py.in \ - gnunet-suidfix + gnunet-suidfix \ + check-texinfo.awk.in CLEANFILES = \ $(noinst_SCRIPTS) -do_subst = $(AWK) -v py="$(PYTHON)" '{gsub("@PYTHONEXE@",py); print $$0}' +do_subst = $(AWK) -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" '{if (/@AWKEXE@/) { gsub("@AWKEXE@",awkay)}; gsub("@PYTHONEXE@",py); print $$0}' # Use SUFFIX Extension rules, they are more portable for every # implementation of 'make'. @@ -46,3 +48,7 @@ SUFFIXES = .py.in .py .py.in.py: $(do_subst) < $< > $@ chmod +x $@ + +check-texinfo.awk: check-texinfo.awk.in Makefile + $(do_subst) < $(srcdir)/check-texinfo.awk.in > check-texinfo.awk + chmod +x check-texinfo.awk diff --git a/contrib/scripts/check-texinfo.awk.in b/contrib/scripts/check-texinfo.awk.in new file mode 100755 index 000000000..12f71b5d2 --- /dev/null +++ b/contrib/scripts/check-texinfo.awk.in @@ -0,0 +1,55 @@ +#!@AWKEXE@ -f + +# Dedicated to the Public Domain. +# SPDX-License-Identifier: 0BSD + +BEGIN { + printf "Running basic texinfo linters\n" ; +} + +{ + if(/\t/) { + printf "...lines containing tabstops?\n" ; + print FILENAME":"NR":"$0 ; + } +} + +{ + if(length>79) { + printf "...line length over 79 chars?\n" ; + print FILENAME":"NR":"$0 ; + } +} + +{ + if(/@geq\{\}/) { + printf "...lines containing macros incompatible with old makeinfo?\n" ; + print FILENAME":"NR":"$0 ; + } +} + +{ + if (/@footnote\{/) { + printf "...lines containing macros incompatible with texi2mdoc?\n" ; + print FILENAME":"NR":"$0 ; + } +} + +{ + if (/TODO/) { + printf "...lines telling us what is left TODO?\n" ; + print FILENAME":"NR":"$0 ; + } + + if (/XXX/) { + printf "...lines telling us what is left to fix?\n" ; + print FILENAME":"NR":"$0 ; + } +} + +{ + if (/wether/) { + printf "...lines containing a popular typo\n" ; + print FILENAME":"NR":"$0 ; + } +} -- cgit v1.2.3 From df0af6b7067e6a4ad0a88f2775da28cfc159ee66 Mon Sep 17 00:00:00 2001 From: ng0 Date: Sun, 1 Dec 2019 23:22:26 +0000 Subject: check-texinfo.awk: move comments to the moved code. --- Makefile.am | 2 -- contrib/scripts/check-texinfo.awk.in | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index aea6c2f6c..edcd28b92 100644 --- a/Makefile.am +++ b/Makefile.am @@ -70,7 +70,5 @@ check-python: printf "Running flake8 and 2to3 if detected.\n" $(top_srcdir)/contrib/scripts/lint/lint-python.sh || true -# exception to add: ignore license files. -# exception to add: uref's can go above 79 chars. check-texinfo: @cd $(top_srcdir); find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 ./contrib/scripts/check-texinfo.awk > $(srcdir)/texinfo_lint.log || true diff --git a/contrib/scripts/check-texinfo.awk.in b/contrib/scripts/check-texinfo.awk.in index 12f71b5d2..37e2c9f20 100755 --- a/contrib/scripts/check-texinfo.awk.in +++ b/contrib/scripts/check-texinfo.awk.in @@ -1,7 +1,11 @@ #!@AWKEXE@ -f - +# # Dedicated to the Public Domain. # SPDX-License-Identifier: 0BSD +# +# exception to add: ignore license files. +# exception to add: uref's can go above 79 chars. + BEGIN { printf "Running basic texinfo linters\n" ; -- cgit v1.2.3 From 5a525c0349701d8b511c34ef2deaf0eec7b26f22 Mon Sep 17 00:00:00 2001 From: ng0 Date: Sun, 1 Dec 2019 23:29:37 +0000 Subject: define HAVE_AWK... we require awk for many parts, but for some cases it could make sense to skip it. --- Makefile.am | 2 ++ configure.ac | 3 +++ contrib/scripts/Makefile.am | 9 +++++++++ 3 files changed, 14 insertions(+) diff --git a/Makefile.am b/Makefile.am index edcd28b92..f8725390e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -70,5 +70,7 @@ check-python: printf "Running flake8 and 2to3 if detected.\n" $(top_srcdir)/contrib/scripts/lint/lint-python.sh || true +if HAVE_AWK check-texinfo: @cd $(top_srcdir); find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 ./contrib/scripts/check-texinfo.awk > $(srcdir)/texinfo_lint.log || true +endif diff --git a/configure.ac b/configure.ac index e8a450b61..7de7b26fc 100644 --- a/configure.ac +++ b/configure.ac @@ -254,6 +254,9 @@ AS_IF([test -x "$PERL"], # awk AC_PATH_PROGS( AWK_BINARY, [awk gawk], ,$PATH:/usr/bin/:/usr/local/bin ) AC_SUBST([AWK_BINARY]) +AS_IF([test -x "$AWK_BINARY"], + [AC_DEFINE_UNQUOTED([HAVE_AWK], [1], [Path to awk])], + [AC_DEFINE_UNQUOTED([HAVE_AWK], [0], [Path to awk])]) # should we install gnunet-logread? AC_MSG_CHECKING(whether to install gnunet-logread) diff --git a/contrib/scripts/Makefile.am b/contrib/scripts/Makefile.am index b76e57db7..9416596c7 100644 --- a/contrib/scripts/Makefile.am +++ b/contrib/scripts/Makefile.am @@ -10,7 +10,14 @@ noinst_SCRIPTS = \ gnunet_pyexpect.py \ gnunet_janitor.py \ gnunet-chk.py \ + $(AWK_SCRIPTS) + +if HAVE_AWK +AWK_SCRIPTS = \ check-texinfo.awk +else +AWK_SCRIPTS = +endif bin_SCRIPTS = \ gnunet-bugreport \ @@ -49,6 +56,8 @@ SUFFIXES = .py.in .py $(do_subst) < $< > $@ chmod +x $@ +if HAVE_AWK check-texinfo.awk: check-texinfo.awk.in Makefile $(do_subst) < $(srcdir)/check-texinfo.awk.in > check-texinfo.awk chmod +x check-texinfo.awk +endif -- cgit v1.2.3 From 53f35813d89de6f7c91883277129ffda3ca5b772 Mon Sep 17 00:00:00 2001 From: ng0 Date: Sun, 1 Dec 2019 23:38:19 +0000 Subject: fix failure to build. --- configure.ac | 2 ++ contrib/scripts/Makefile.am | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 7de7b26fc..99713a079 100644 --- a/configure.ac +++ b/configure.ac @@ -247,6 +247,7 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) AC_PATH_PROG( PERL, perl, , $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin ) AC_SUBST([PERL]) +AM_CONDITIONAL([HAVE_PERL], [test -x "$PERL"]) AS_IF([test -x "$PERL"], [AC_DEFINE_UNQUOTED([HAVE_PERL], [1], [Path to Perl])], [AC_DEFINE_UNQUOTED([HAVE_PERL], [0], [Path to Perl])]) @@ -254,6 +255,7 @@ AS_IF([test -x "$PERL"], # awk AC_PATH_PROGS( AWK_BINARY, [awk gawk], ,$PATH:/usr/bin/:/usr/local/bin ) AC_SUBST([AWK_BINARY]) +AM_CONDITIONAL([HAVE_AWK], [test -x "$AWK_BINARY"]) AS_IF([test -x "$AWK_BINARY"], [AC_DEFINE_UNQUOTED([HAVE_AWK], [1], [Path to awk])], [AC_DEFINE_UNQUOTED([HAVE_AWK], [0], [Path to awk])]) diff --git a/contrib/scripts/Makefile.am b/contrib/scripts/Makefile.am index 9416596c7..f55bcabfe 100644 --- a/contrib/scripts/Makefile.am +++ b/contrib/scripts/Makefile.am @@ -10,13 +10,14 @@ noinst_SCRIPTS = \ gnunet_pyexpect.py \ gnunet_janitor.py \ gnunet-chk.py \ - $(AWK_SCRIPTS) + $(awkSCRIPTS) +# FIXME: read into AWK_SCRIPTS autotools builtin. if HAVE_AWK -AWK_SCRIPTS = \ +awkSCRIPTS = \ check-texinfo.awk else -AWK_SCRIPTS = +awkSCRIPTS = endif bin_SCRIPTS = \ -- cgit v1.2.3 From 837a25c2af6b2d9a8db35b3d23d6d898bd89cd88 Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Mon, 2 Dec 2019 11:12:16 +0100 Subject: housekeeping changelog --- ChangeLog | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4c4e3bf54..3b81e09e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,35 @@ Sun Dec 01 19:31:00 UTC 2019 configure: Add --with-gnunet-logread. -ng0 +Sun Dec 1 12:26:11 2019 +0100 + GNS NSS plugin: Reject non-IDNA conforming names and + trigger continue with next NSS plugin. -schanzen + +Sat Nov 30 23:32:03 2019 +0100 + GNS NSS plugin: Disabled if called as root. -CG + +Sat Nov 30 23:08:49 2019 +0100 + Fixed #3795: Switched to new PoW for NSE and GNS revocation. + Functionality is ifdef guarded for 0.12. -CG + +Sat Nov 30 21:05:25 2019 +0100 + Fixed #5978: + Added support for . CNAMEs in the GNS resolver. -schanzen + +Sat Nov 30 20:27:51 2019 +0100 + Fixed #5979: + Added support for . DNS server names in GNS2DNS records. + -schanzen + +Tue Nov 26 18:26:54 2019 +0100 + Crypto change: Use Curve25519 for ECDH and tweetnacl where we can. + Functionality is ifdef guarded for 0.12. -fdold + +Nov 30 15:20:45 2019 +0100 + Fixed #5922: + GNS names are now UTF-8. For DNS, names are converted to IDNA. + Functionality is ifdef guarded for 0.12. -schanzen + Wed Oct 30 10:50:00 UTC 2019 Released gnunet 0.11.8 -ng0 -- cgit v1.2.3 From c8e5e28048dd9605f7958ef95f2a6dd626658069 Mon Sep 17 00:00:00 2001 From: ng0 Date: Mon, 2 Dec 2019 15:30:56 +0000 Subject: rewrite sed logic used in Makefiles and move into dosubst awk script. include 'bin' and its files in dist files, this is where dosubst is located. While the invocation (passing of the variables) is not optimal (yet, will be changed), this will in the end allow sharing code between Makefiles better, and maybe drop sed usage in the future. --- Makefile.am | 4 +- bin/Makefile.am | 6 +++ bin/dosubst.awk | 47 ++++++++++++++++++++++ configure.ac | 1 + contrib/scripts/Makefile.am | 6 +-- doc/man/Makefile.am | 8 +--- doc/man/produce_html.sh.in | 4 +- src/arm/Makefile.am | 6 +-- src/arm/test_gnunet_arm.py.in | 2 +- src/consensus/Makefile.am | 4 +- src/consensus/consensus-simulation.py.in | 2 +- src/dht/Makefile.am | 8 +--- src/dht/test_dht_tools.py.in | 4 +- src/fs/Makefile.am | 10 ++--- src/fs/test_gnunet_fs_idx.py.in | 2 +- src/fs/test_gnunet_fs_psd.py.in | 2 +- src/fs/test_gnunet_fs_rec.py.in | 2 +- src/gns/Makefile.am | 9 +---- src/gns/gnunet-gns-proxy-setup-ca.in | 20 ++++----- src/gns/test_gnunet_gns.sh.in | 6 +-- src/integration-tests/Makefile.am | 20 +++++---- src/integration-tests/gnunet_pyexpect.py.in | 2 +- src/integration-tests/gnunet_testing.py.in | 2 +- .../test_integration_bootstrap_and_connect.py.in | 2 +- .../test_integration_clique.py.in | 2 +- .../test_integration_disconnect.py.in | 2 +- .../test_integration_disconnect_nat.py.in | 2 +- .../test_integration_reconnect.py.in | 2 +- .../test_integration_reconnect_nat.py.in | 2 +- src/peerinfo-tool/Makefile.am | 4 +- src/peerinfo-tool/test_gnunet_peerinfo.py.in | 2 +- src/revocation/Makefile.am | 4 +- src/revocation/test_local_revocation.py.in | 2 +- src/statistics/Makefile.am | 6 +-- src/statistics/test_gnunet_statistics.py.in | 2 +- .../gnunet-transport-certificate-creation.in | 4 +- 36 files changed, 118 insertions(+), 95 deletions(-) create mode 100644 bin/Makefile.am create mode 100755 bin/dosubst.awk diff --git a/Makefile.am b/Makefile.am index f8725390e..62c46cb2b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,9 +3,9 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/include # only documentation (ALL of the documentation) if DOCUMENTATION_ONLY - SUBDIRS = doc + SUBDIRS = bin doc else - SUBDIRS = m4 src po pkgconfig + SUBDIRS = m4 bin src po pkgconfig endif # documentation on / off switch (affects all of the documentation) diff --git a/bin/Makefile.am b/bin/Makefile.am new file mode 100644 index 000000000..6c11e26ef --- /dev/null +++ b/bin/Makefile.am @@ -0,0 +1,6 @@ +EXTRA_DIST = \ + dosubst.awk \ + grephdr.sh \ + grepsrc.sh \ + pogen.sh \ + rename.sh diff --git a/bin/dosubst.awk b/bin/dosubst.awk new file mode 100755 index 000000000..3ed0403dd --- /dev/null +++ b/bin/dosubst.awk @@ -0,0 +1,47 @@ +# Dedicated to the public domain. +# SPDX-License-Identifier: 0BSD +# +# awk script to substitute variables in scripts and applications. +# +# You can pass these variables to it in Makefiles or on the +# commandline: +# bdir="$(bindir)" +# py="$(PYTHON)" +# awkay="$(AWK_BINARY)" +# pfx="$(prefix)" +# prl="$(PERL)" +# sysconfdirectory="$(sysconfdir)" +# pkgdatadirectory="$(pkgdatadir)" + +{ + + if (/@bindirectory@/) { + gsub("@bindirectory@",bdir) ; + } + + if (/@PYTHONEXE@/) { + gsub("@PYTHONEXE@",py) ; + } + + if (/@AWKEXE@/) { + gsub("@AWKEXE@",awkay) ; + } + + if (/@SUBSTPREFIX@/) { + gsub("@SUBSTPREFIX@",pfx) ; + } + + if (/@PERLEXE@/) { + gsub("@PERLEXE@",prl) ; + } + + if (/@SYSCONFDIR@/) { + gsub("@SYSCONFDIR@",sysconfdirectory) ; + } + + if (/@PKGDATADIRECTORY@/) { + gsub("@PKGDATADIRECTORY@",pkgdatadirectory) ; + } + + print $0 ; +} diff --git a/configure.ac b/configure.ac index 99713a079..f6b33dd02 100644 --- a/configure.ac +++ b/configure.ac @@ -1832,6 +1832,7 @@ AC_DEFINE_UNQUOTED(VCS_VERSION, [$vcs_version], [VCS revision/hash or tarball ve AC_CONFIG_FILES([ Makefile +bin/Makefile contrib/Makefile contrib/hellos/Makefile contrib/services/Makefile diff --git a/contrib/scripts/Makefile.am b/contrib/scripts/Makefile.am index f55bcabfe..f8b7ec3d1 100644 --- a/contrib/scripts/Makefile.am +++ b/contrib/scripts/Makefile.am @@ -39,8 +39,6 @@ EXTRA_DIST = \ CLEANFILES = \ $(noinst_SCRIPTS) -do_subst = $(AWK) -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" '{if (/@AWKEXE@/) { gsub("@AWKEXE@",awkay)}; gsub("@PYTHONEXE@",py); print $$0}' - # Use SUFFIX Extension rules, they are more portable for every # implementation of 'make'. # You'll also run into the "'%' is a GNU make extension warning" @@ -54,11 +52,11 @@ do_subst = $(AWK) -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" '{if (/@AWKEXE@/) { SUFFIXES = .py.in .py .py.in.py: - $(do_subst) < $< > $@ + $(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 < $< > $@ chmod +x $@ if HAVE_AWK check-texinfo.awk: check-texinfo.awk.in Makefile - $(do_subst) < $(srcdir)/check-texinfo.awk.in > check-texinfo.awk + $(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)/check-texinfo.awk.in > check-texinfo.awk chmod +x check-texinfo.awk endif diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am index 601a85555..a0283cf44 100644 --- a/doc/man/Makefile.am +++ b/doc/man/Makefile.am @@ -1,11 +1,7 @@ # This Makefile.am is in the public domain -do_subst = $(SED) -e 's,[@]SYSCONFDIR[@],$(sysconfdir),g' - gnunet.conf.5: gnunet.conf.5.in Makefile - $(do_subst) < $(srcdir)/gnunet.conf.5.in > gnunet.conf.5 - -do_subst_pkgdatadir = $(SED) -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' + $(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.conf.5.in > $(srcdir)/gnunet.conf.5 CLEANFILES = gnunet.conf.5 @@ -28,7 +24,7 @@ if HAVE_MANDOC # I want and that the alternatives are depressing and # nonfunctional. produce_html.sh: produce_html.sh.in Makefile - $(do_subst_pkgdatadir) < $(srcdir)/produce_html.sh.in > produce_html.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)/produce_html.sh.in > produce_html.sh @chmod +x produce_html.sh CLEANFILES += produce_html.sh diff --git a/doc/man/produce_html.sh.in b/doc/man/produce_html.sh.in index 962601513..d2bd768a8 100755 --- a/doc/man/produce_html.sh.in +++ b/doc/man/produce_html.sh.in @@ -1,8 +1,8 @@ #!/bin/sh -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 diff --git a/src/arm/Makefile.am b/src/arm/Makefile.am index 43e868805..8a738c5a9 100644 --- a/src/arm/Makefile.am +++ b/src/arm/Makefile.am @@ -88,15 +88,13 @@ test_gnunet_service_arm_SOURCES = \ libgnunetarm.la \ $(top_builddir)/src/util/libgnunetutil.la -do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' - SUFFIXES = .py.in .py .py.in.py: - $(do_subst) < $(srcdir)/$< > $@ + $(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)/$< > $@ chmod +x $@ test_gnunet_arm.py: test_gnunet_arm.py.in Makefile - $(do_subst) < $(srcdir)/test_gnunet_arm.py.in > test_gnunet_arm.py + $(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_arm.py.in > test_gnunet_arm.py chmod +x test_gnunet_arm.py EXTRA_DIST = \ diff --git a/src/arm/test_gnunet_arm.py.in b/src/arm/test_gnunet_arm.py.in index 9605c4eae..e657d4a3f 100644 --- a/src/arm/test_gnunet_arm.py.in +++ b/src/arm/test_gnunet_arm.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ import os import sys diff --git a/src/consensus/Makefile.am b/src/consensus/Makefile.am index 4ad224aa3..24e685fb9 100644 --- a/src/consensus/Makefile.am +++ b/src/consensus/Makefile.am @@ -23,12 +23,10 @@ libexec_PROGRAMS += \ gnunet-service-evil-consensus endif -do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' - SUFFIXES = .py.in .py .py.in.py: - $(do_subst) < $< > $@ + $(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 < $< > $@ chmod +x $@ check-python-style: diff --git a/src/consensus/consensus-simulation.py.in b/src/consensus/consensus-simulation.py.in index c6b97e63f..272a52da2 100644 --- a/src/consensus/consensus-simulation.py.in +++ b/src/consensus/consensus-simulation.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ # This file is part of GNUnet # (C) 2013, 2018 Christian Grothoff (and other contributing authors) # diff --git a/src/dht/Makefile.am b/src/dht/Makefile.am index bf73e8f19..2182d1c7f 100644 --- a/src/dht/Makefile.am +++ b/src/dht/Makefile.am @@ -220,13 +220,7 @@ check_SCRIPTS = \ test_dht_tools.py endif -do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' -e 's,[@]bindir[@],$(bindir),g' - SUFFIXES = .py.in .py .py.in.py: - $(do_subst) < $(srcdir)/$< > $@ + $(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)/$< > $@ chmod +x $@ - -test_dht_tools.py: test_dht_tools.py.in Makefile - $(do_subst) < $(srcdir)/test_dht_tools.py.in > test_dht_tools.py - chmod +x test_dht_tools.py diff --git a/src/dht/test_dht_tools.py.in b/src/dht/test_dht_tools.py.in index c2f95e4b5..20739c45f 100644 --- a/src/dht/test_dht_tools.py.in +++ b/src/dht/test_dht_tools.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ # # This testcase simply checks that the DHT command-line tools work. # It launches a single peer, stores a value "testdata" under "testkey", @@ -20,7 +20,7 @@ import subprocess import time import tempfile -os.environ["PATH"] = "@bindir@" + ":" + os.environ["PATH"] +os.environ["PATH"] = "@bindirectory@" + ":" + os.environ["PATH"] if os.name == "nt": tmp = os.getenv("TEMP") diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am index f0efefc4b..b1555be60 100644 --- a/src/fs/Makefile.am +++ b/src/fs/Makefile.am @@ -525,22 +525,20 @@ perf_gnunet_service_fs_p2p_respect_LDADD = \ $(top_builddir)/src/util/libgnunetutil.la -do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' - test_gnunet_fs_psd.py: test_gnunet_fs_psd.py.in Makefile - $(do_subst) < $(srcdir)/test_gnunet_fs_psd.py.in > test_gnunet_fs_psd.py + $(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_fs_psd.py.in > test_gnunet_fs_psd.py chmod +x test_gnunet_fs_psd.py test_gnunet_fs_rec.py: test_gnunet_fs_rec.py.in Makefile - $(do_subst) < $(srcdir)/test_gnunet_fs_rec.py.in > test_gnunet_fs_rec.py + $(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_fs_rec.py.in > test_gnunet_fs_rec.py chmod +x test_gnunet_fs_rec.py test_gnunet_fs_ns.py: test_gnunet_fs_ns.py.in Makefile - $(do_subst) < $(srcdir)/test_gnunet_fs_ns.py.in > test_gnunet_fs_ns.py + $(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_fs_ns.py.in > test_gnunet_fs_ns.py chmod +x test_gnunet_fs_ns.py test_gnunet_fs_idx.py: test_gnunet_fs_idx.py.in Makefile - $(do_subst) < $(srcdir)/test_gnunet_fs_idx.py.in > test_gnunet_fs_idx.py + $(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_fs_idx.py.in > test_gnunet_fs_idx.py chmod +x test_gnunet_fs_idx.py diff --git a/src/fs/test_gnunet_fs_idx.py.in b/src/fs/test_gnunet_fs_idx.py.in index 2c8c7e8ec..564dd68f2 100755 --- a/src/fs/test_gnunet_fs_idx.py.in +++ b/src/fs/test_gnunet_fs_idx.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ # This file is part of GNUnet. # (C) 2010 Christian Grothoff (and other contributing authors) # diff --git a/src/fs/test_gnunet_fs_psd.py.in b/src/fs/test_gnunet_fs_psd.py.in index abb3d0b83..a25e4eaef 100755 --- a/src/fs/test_gnunet_fs_psd.py.in +++ b/src/fs/test_gnunet_fs_psd.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ # This file is part of GNUnet. # (C) 2010, 2018 Christian Grothoff (and other contributing authors) # diff --git a/src/fs/test_gnunet_fs_rec.py.in b/src/fs/test_gnunet_fs_rec.py.in index f827aa3a5..f7e84e3da 100755 --- a/src/fs/test_gnunet_fs_rec.py.in +++ b/src/fs/test_gnunet_fs_rec.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ # This file is part of GNUnet. # (C) 2010 Christian Grothoff (and other contributing authors) # 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/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 diff --git a/src/integration-tests/Makefile.am b/src/integration-tests/Makefile.am index 8b50def4d..f456544db 100644 --- a/src/integration-tests/Makefile.am +++ b/src/integration-tests/Makefile.am @@ -36,43 +36,41 @@ endif endif endif -do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' - SUFFIXES = .py.in .py .py.in.py: - $(do_subst) < $(srcdir)/$< > $@ + $(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)/$< > $@ chmod +x $@ gnunet_testing.py: gnunet_testing.py.in Makefile - $(do_subst) < $(srcdir)/gnunet_testing.py.in > gnunet_testing.py + $(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_testing.py.in > gnunet_testing.py chmod +x gnunet_testing.py gnunet_pyexpect.py: gnunet_pyexpect.py.in Makefile - $(do_subst) < $(srcdir)/gnunet_pyexpect.py.in > gnunet_pyexpect.py + $(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_pyexpect.py.in > gnunet_pyexpect.py chmod +x gnunet_pyexpect.py test_integration_bootstrap_and_connect.py: test_integration_bootstrap_and_connect.py.in Makefile - $(do_subst) < $(srcdir)/test_integration_bootstrap_and_connect.py.in > test_integration_bootstrap_and_connect.py + $(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_integration_bootstrap_and_connect.py.in > test_integration_bootstrap_and_connect.py chmod +x test_integration_bootstrap_and_connect.py test_integration_disconnect.py: test_integration_disconnect.py.in Makefile - $(do_subst) < $(srcdir)/test_integration_disconnect.py.in > test_integration_disconnect.py + $(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_integration_disconnect.py.in > test_integration_disconnect.py chmod +x test_integration_disconnect.py test_integration_disconnect_nat.py: test_integration_disconnect_nat.py.in Makefile - $(do_subst) < $(srcdir)/test_integration_disconnect_nat.py.in > test_integration_disconnect_nat.py + $(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_integration_disconnect_nat.py.in > test_integration_disconnect_nat.py chmod +x test_integration_disconnect_nat.py test_integration_reconnect.py: test_integration_reconnect.py.in Makefile - $(do_subst) < $(srcdir)/test_integration_reconnect.py.in > test_integration_reconnect.py + $(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_integration_reconnect.py.in > test_integration_reconnect.py chmod +x test_integration_reconnect.py test_integration_reconnect_nat.py: test_integration_reconnect_nat.py.in Makefile - $(do_subst) < $(srcdir)/test_integration_reconnect_nat.py.in > test_integration_reconnect_nat.py + $(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_integration_reconnect_nat.py.in > test_integration_reconnect_nat.py chmod +x test_integration_reconnect_nat.py test_integration_clique.py: test_integration_clique.py.in Makefile - $(do_subst) < $(srcdir)/test_integration_clique.py.in > test_integration_clique.py + $(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_integration_clique.py.in > test_integration_clique.py chmod +x test_integration_clique.py diff --git a/src/integration-tests/gnunet_pyexpect.py.in b/src/integration-tests/gnunet_pyexpect.py.in index aad84e4f7..b8ce52f00 100644 --- a/src/integration-tests/gnunet_pyexpect.py.in +++ b/src/integration-tests/gnunet_pyexpect.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ # This file is part of GNUnet. # (C) 2010 Christian Grothoff (and other contributing authors) # diff --git a/src/integration-tests/gnunet_testing.py.in b/src/integration-tests/gnunet_testing.py.in index 10f9d4475..828f6ff42 100644 --- a/src/integration-tests/gnunet_testing.py.in +++ b/src/integration-tests/gnunet_testing.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ # This file is part of GNUnet. # (C) 2010, 2017, 2018 Christian Grothoff (and other contributing authors) # diff --git a/src/integration-tests/test_integration_bootstrap_and_connect.py.in b/src/integration-tests/test_integration_bootstrap_and_connect.py.in index ddac326cd..441523dfe 100755 --- a/src/integration-tests/test_integration_bootstrap_and_connect.py.in +++ b/src/integration-tests/test_integration_bootstrap_and_connect.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ # This file is part of GNUnet. # (C) 2010, 2018 Christian Grothoff (and other contributing authors) # diff --git a/src/integration-tests/test_integration_clique.py.in b/src/integration-tests/test_integration_clique.py.in index a23c025ca..65df632f0 100755 --- a/src/integration-tests/test_integration_clique.py.in +++ b/src/integration-tests/test_integration_clique.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ # This file is part of GNUnet. # (C) 2010, 2018 Christian Grothoff (and other contributing authors) # diff --git a/src/integration-tests/test_integration_disconnect.py.in b/src/integration-tests/test_integration_disconnect.py.in index 9861728c2..c942042c4 100755 --- a/src/integration-tests/test_integration_disconnect.py.in +++ b/src/integration-tests/test_integration_disconnect.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ # This file is part of GNUnet. # (C) 2010, 2017 Christian Grothoff (and other contributing authors) # diff --git a/src/integration-tests/test_integration_disconnect_nat.py.in b/src/integration-tests/test_integration_disconnect_nat.py.in index d3ff84ebe..2f10818cc 100755 --- a/src/integration-tests/test_integration_disconnect_nat.py.in +++ b/src/integration-tests/test_integration_disconnect_nat.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ # This file is part of GNUnet. # (C) 2010, 2018 Christian Grothoff (and other contributing authors) # diff --git a/src/integration-tests/test_integration_reconnect.py.in b/src/integration-tests/test_integration_reconnect.py.in index 5bffb72e3..97dc94502 100755 --- a/src/integration-tests/test_integration_reconnect.py.in +++ b/src/integration-tests/test_integration_reconnect.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ # This file is part of GNUnet. # (C) 2010, 2017 Christian Grothoff (and other contributing authors) # diff --git a/src/integration-tests/test_integration_reconnect_nat.py.in b/src/integration-tests/test_integration_reconnect_nat.py.in index 751a0484b..7624e7b38 100755 --- a/src/integration-tests/test_integration_reconnect_nat.py.in +++ b/src/integration-tests/test_integration_reconnect_nat.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ # This file is part of GNUnet. # (C) 2010, 2018 Christian Grothoff (and other contributing authors) # diff --git a/src/peerinfo-tool/Makefile.am b/src/peerinfo-tool/Makefile.am index 8a2efba63..05173d551 100644 --- a/src/peerinfo-tool/Makefile.am +++ b/src/peerinfo-tool/Makefile.am @@ -56,10 +56,8 @@ AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PAT TESTS = $(check_SCRIPTS) endif -do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' - test_gnunet_peerinfo.py: test_gnunet_peerinfo.py.in Makefile - $(do_subst) < $(srcdir)/test_gnunet_peerinfo.py.in > test_gnunet_peerinfo.py + $(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_peerinfo.py.in > test_gnunet_peerinfo.py chmod +x test_gnunet_peerinfo.py EXTRA_DIST = \ diff --git a/src/peerinfo-tool/test_gnunet_peerinfo.py.in b/src/peerinfo-tool/test_gnunet_peerinfo.py.in index 5d9daa930..9a87d3649 100755 --- a/src/peerinfo-tool/test_gnunet_peerinfo.py.in +++ b/src/peerinfo-tool/test_gnunet_peerinfo.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ # This file is part of GNUnet. # (C) 2010, 2018 Christian Grothoff (and other contributing authors) # diff --git a/src/revocation/Makefile.am b/src/revocation/Makefile.am index 5e48fb29f..b3b2877ca 100644 --- a/src/revocation/Makefile.am +++ b/src/revocation/Makefile.am @@ -90,10 +90,8 @@ if ENABLE_TEST_RUN $(check_PROGRAMS) endif -do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' - test_local_revocation.py: test_local_revocation.py.in Makefile - $(do_subst) < $(srcdir)/test_local_revocation.py.in > test_local_revocation.py + $(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_local_revocation.py.in > test_local_revocation.py chmod +x test_local_revocation.py EXTRA_DIST = test_revocation.conf \ diff --git a/src/revocation/test_local_revocation.py.in b/src/revocation/test_local_revocation.py.in index d73d0a869..e667c10ce 100644 --- a/src/revocation/test_local_revocation.py.in +++ b/src/revocation/test_local_revocation.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ # This file is part of GNUnet. # (C) 2010, 2018 Christian Grothoff (and other contributing authors) # diff --git a/src/statistics/Makefile.am b/src/statistics/Makefile.am index 6d69d58d8..52f382156 100644 --- a/src/statistics/Makefile.am +++ b/src/statistics/Makefile.am @@ -84,15 +84,13 @@ check_SCRIPTS = \ test_gnunet_statistics.py endif -do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' - SUFFIXES = .py.in .py .py.in.py: - $(do_subst) < $(srcdir)/$< > $@ + $(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)/$< > $@ chmod +x $@ test_gnunet_statistics.py: test_gnunet_statistics.py.in Makefile - $(do_subst) < $(srcdir)/test_gnunet_statistics.py.in > test_gnunet_statistics.py + $(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_statistics.py.in > test_gnunet_statistics.py chmod +x test_gnunet_statistics.py EXTRA_DIST = \ diff --git a/src/statistics/test_gnunet_statistics.py.in b/src/statistics/test_gnunet_statistics.py.in index 3a13c24f3..ce277b13e 100644 --- a/src/statistics/test_gnunet_statistics.py.in +++ b/src/statistics/test_gnunet_statistics.py.in @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!@PYTHONEXE@ import os import sys diff --git a/src/transport/gnunet-transport-certificate-creation.in b/src/transport/gnunet-transport-certificate-creation.in index 1c04089a4..8348dd1b7 100644 --- a/src/transport/gnunet-transport-certificate-creation.in +++ b/src/transport/gnunet-transport-certificate-creation.in @@ -101,9 +101,9 @@ generate_cert_key() { echo "" infomsg "Generating Cert and Key" - + CERTTOOL="" - GNUTLS_CA_TEMPLATE=@pkgdatadir@/gnunet-gns-proxy-ca.template + GNUTLS_CA_TEMPLATE=@PKGDATADIRECTORY@/gnunet-gns-proxy-ca.template OPENSSL=0 if test -z "`gnutls-certtool --version`" > /dev/null then -- cgit v1.2.3