diff options
author | Bertrand Marc <beberking@gmail.com> | 2012-05-02 21:43:37 +0200 |
---|---|---|
committer | Bertrand Marc <beberking@gmail.com> | 2012-05-02 21:43:37 +0200 |
commit | 2b81464a43485fcc8ce079fafdee7b7a171835f4 (patch) | |
tree | 394774c0f735199b57d51a2d3840356317853fe1 /contrib |
Imported Upstream version 0.9.2upstream/0.9.2
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/Makefile.am | 47 | ||||
-rw-r--r-- | contrib/Makefile.in | 687 | ||||
-rwxr-xr-x | contrib/coverage.sh | 14 | ||||
-rw-r--r-- | contrib/gnunet-logo-color.png | bin | 0 -> 6851 bytes | |||
-rw-r--r-- | contrib/gnunet_janitor.py.in | 74 | ||||
-rw-r--r-- | contrib/gnunet_pyexpect.py.in | 83 | ||||
-rw-r--r-- | contrib/hostlist.cgi | 5 | ||||
-rw-r--r-- | contrib/hostlist.php | 35 | ||||
-rwxr-xr-x | contrib/report.sh | 200 | ||||
-rw-r--r-- | contrib/test_gnunet_prefix.c | 65 | ||||
-rw-r--r-- | contrib/testing_hostkeys.dat | bin | 0 -> 3481426 bytes | |||
-rw-r--r-- | contrib/timeout_watchdog.c | 113 |
12 files changed, 1323 insertions, 0 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am new file mode 100644 index 0000000..df6bdc2 --- /dev/null +++ b/contrib/Makefile.am @@ -0,0 +1,47 @@ +INCLUDES = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include + + +if !MINGW +noinst_PROGRAMS = \ + timeout_watchdog + +timeout_watchdog_SOURCES = \ + timeout_watchdog.c +endif + +noinst_SCRIPTS = \ + gnunet_pyexpect.py \ + gnunet_janitor.py + +dist_pkgdata_DATA = \ + gnunet-logo-color.png + +EXTRA_DIST = \ + coverage.sh \ + hostlist.cgi \ + hostlist.php \ + report.sh \ + testing_hostkeys.dat \ + gnunet_pyexpect.py.in \ + gnunet_janitor.py.in + +do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' + +%.py: %.py.in Makefile + $(do_subst) < $< > $@ + chmod +x $@ + +# init_gnunet_redhat \ +# init_gnunet_ubuntu \ +# visualize_stats.sh \ +# gnmessage.sh \ +# junkinsert.sh \ +# junklookup.sh \ +# namespacehelper.sh + + +check_PROGRAMS = \ + test_gnunet_prefix + +test_gnunet_prefix_SOURCES = \ + test_gnunet_prefix.c diff --git a/contrib/Makefile.in b/contrib/Makefile.in new file mode 100644 index 0000000..04a23bf --- /dev/null +++ b/contrib/Makefile.in @@ -0,0 +1,687 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +@MINGW_FALSE@noinst_PROGRAMS = timeout_watchdog$(EXEEXT) +check_PROGRAMS = test_gnunet_prefix$(EXEEXT) +subdir = contrib +DIST_COMMON = $(dist_pkgdata_DATA) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/absolute-header.m4 \ + $(top_srcdir)/m4/align.m4 $(top_srcdir)/m4/argz.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libcurl.m4 \ + $(top_srcdir)/m4/libgcrypt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/libunistring.m4 $(top_srcdir)/m4/ltdl.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/gnunet_config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am_test_gnunet_prefix_OBJECTS = test_gnunet_prefix.$(OBJEXT) +test_gnunet_prefix_OBJECTS = $(am_test_gnunet_prefix_OBJECTS) +test_gnunet_prefix_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__timeout_watchdog_SOURCES_DIST = timeout_watchdog.c +@MINGW_FALSE@am_timeout_watchdog_OBJECTS = timeout_watchdog.$(OBJEXT) +timeout_watchdog_OBJECTS = $(am_timeout_watchdog_OBJECTS) +timeout_watchdog_LDADD = $(LDADD) +SCRIPTS = $(noinst_SCRIPTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(test_gnunet_prefix_SOURCES) $(timeout_watchdog_SOURCES) +DIST_SOURCES = $(test_gnunet_prefix_SOURCES) \ + $(am__timeout_watchdog_SOURCES_DIST) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdatadir)" +DATA = $(dist_pkgdata_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARGZ_H = @ARGZ_H@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFAULT_INTERFACE = @DEFAULT_INTERFACE@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLDIR = @DLLDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXT_LIBS = @EXT_LIBS@ +EXT_LIB_PATH = @EXT_LIB_PATH@ +FGREP = @FGREP@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNUNETDNS_GROUP = @GNUNETDNS_GROUP@ +GN_DAEMON_CONFIG_DIR = @GN_DAEMON_CONFIG_DIR@ +GN_DAEMON_HOME_DIR = @GN_DAEMON_HOME_DIR@ +GN_INTLINCL = @GN_INTLINCL@ +GN_LIBINTL = @GN_LIBINTL@ +GN_LIB_LDFLAGS = @GN_LIB_LDFLAGS@ +GN_PLUGIN_LDFLAGS = @GN_PLUGIN_LDFLAGS@ +GN_USER_HOME_DIR = @GN_USER_HOME_DIR@ +GREP = @GREP@ +HAVE_LIBUNISTRING = @HAVE_LIBUNISTRING@ +INCLTDL = @INCLTDL@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBADD_DL = @LIBADD_DL@ +LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ +LIBADD_DLOPEN = @LIBADD_DLOPEN@ +LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ +LIBCURL = @LIBCURL@ +LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@ +LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ +LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ +LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBLTDL = @LIBLTDL@ +LIBOBJS = @LIBOBJS@ +LIBPREFIX = @LIBPREFIX@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNISTRING = @LIBUNISTRING@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTDLDEPS = @LTDLDEPS@ +LTDLINCL = @LTDLINCL@ +LTDLOPEN = @LTDLOPEN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LTLIBUNISTRING = @LTLIBUNISTRING@ +LT_CONFIG_H = @LT_CONFIG_H@ +LT_DLLOADERS = @LT_DLLOADERS@ +LT_DLPREOPEN = @LT_DLPREOPEN@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +MYSQL_CPPFLAGS = @MYSQL_CPPFLAGS@ +MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSTGRES_CPPFLAGS = @POSTGRES_CPPFLAGS@ +POSTGRES_LDFLAGS = @POSTGRES_LDFLAGS@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SQLITE_CPPFLAGS = @SQLITE_CPPFLAGS@ +SQLITE_LDFLAGS = @SQLITE_LDFLAGS@ +STRIP = @STRIP@ +SUDO_BINARY = @SUDO_BINARY@ +UNIXONLY = @UNIXONLY@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +_libcurl_config = @_libcurl_config@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_target = @build_target@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +ltdl_LIBOBJS = @ltdl_LIBOBJS@ +ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +subdirs = @subdirs@ +sys_symbol_underscore = @sys_symbol_underscore@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include +@MINGW_FALSE@timeout_watchdog_SOURCES = \ +@MINGW_FALSE@ timeout_watchdog.c + +noinst_SCRIPTS = \ + gnunet_pyexpect.py \ + gnunet_janitor.py + +dist_pkgdata_DATA = \ + gnunet-logo-color.png + +EXTRA_DIST = \ + coverage.sh \ + hostlist.cgi \ + hostlist.php \ + report.sh \ + testing_hostkeys.dat \ + gnunet_pyexpect.py.in \ + gnunet_janitor.py.in + +do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' +test_gnunet_prefix_SOURCES = \ + test_gnunet_prefix.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu contrib/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test_gnunet_prefix$(EXEEXT): $(test_gnunet_prefix_OBJECTS) $(test_gnunet_prefix_DEPENDENCIES) + @rm -f test_gnunet_prefix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_gnunet_prefix_OBJECTS) $(test_gnunet_prefix_LDADD) $(LIBS) +timeout_watchdog$(EXEEXT): $(timeout_watchdog_OBJECTS) $(timeout_watchdog_DEPENDENCIES) + @rm -f timeout_watchdog$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timeout_watchdog_OBJECTS) $(timeout_watchdog_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gnunet_prefix.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeout_watchdog.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-dist_pkgdataDATA: $(dist_pkgdata_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" + @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \ + done + +uninstall-dist_pkgdataDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) +check: check-am +all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(pkgdatadir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dist_pkgdataDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-dist_pkgdataDATA + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstPROGRAMS ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dist_pkgdataDATA \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-dist_pkgdataDATA + + +%.py: %.py.in Makefile + $(do_subst) < $< > $@ + chmod +x $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/contrib/coverage.sh b/contrib/coverage.sh new file mode 100755 index 0000000..b53a382 --- /dev/null +++ b/contrib/coverage.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# make sure configure was run with coverage enabled... +lcov --directory . --zerocounters +make check +rm `find * -name "test_*.gc??"` +for n in `find * -name "*.gc??" | grep libs` +do + cd `dirname $n` + mv `basename $n` .. + cd - +done +lcov --directory . --capture --output-file app.info +mkdir -p doc/coverage +genhtml -o doc/coverage app.info diff --git a/contrib/gnunet-logo-color.png b/contrib/gnunet-logo-color.png Binary files differnew file mode 100644 index 0000000..326822e --- /dev/null +++ b/contrib/gnunet-logo-color.png diff --git a/contrib/gnunet_janitor.py.in b/contrib/gnunet_janitor.py.in new file mode 100644 index 0000000..c11ff4f --- /dev/null +++ b/contrib/gnunet_janitor.py.in @@ -0,0 +1,74 @@ +#!@PYTHON@ +# This file is part of GNUnet. +# (C) 2011 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 +# by the Free Software Foundation; either version 2, or (at your +# option) any later version. +# +# GNUnet is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNUnet; see the file COPYING. If not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# +# Finds any gnunet processes still running in the system and kills them +# +# gnunet janitor can be used by invoking `make' like this: +# TESTS_ENVIRONMENT='${top_srcdir}/contrib/gnunet_janitor.py &&' make check + +from __future__ import print_function +import os +import re +import subprocess +import sys +import shutil +import time +import signal + +if os.name == 'nt': + from win32com.client import GetObject + WMI = GetObject('winmgmts:') + +def get_process_list (): + result = [] + if os.name == 'nt': + processes = WMI.InstancesOf('Win32_Process') + for p in processes: + result.append ((p.Properties_('ProcessId').Value, re.sub (r'(.+)\.exe', r'\1', p.Properties_('Name').Value))) + else: + pids = [pid for pid in os.listdir('/proc') if pid.isdigit ()] + for pid in pids: + result.append ((pid, open (os.path.join ('/proc', pid, 'comm'), 'rb').read ())) + return result + +def main (): + procs = get_process_list () + gnunet_procs = [] + for p in procs: + if re.match (r'gnunet-.+', p[1]): + gnunet_procs.append (p) + for p in gnunet_procs: + if re.match (r'gnunet-service-arm', p[1]): + print ("killing arm process {0:5} {1}".format (p[0], p[1])) + try: + os.kill (p[0], signal.SIGTERM) + except OSError as e: + print ("failed: {0}".format (e)) + pass + for p in gnunet_procs: + if not re.match (r'gnunet-service-arm', p[1]): + print ("killing non-arm process {0:5} {1}".format (p[0], p[1])) + try: + os.kill (p[0], signal.SIGTERM) + except OSError as e: + print ("failed: {0}".format (e)) + pass + +if __name__ == '__main__': + sys.exit (main ()) diff --git a/contrib/gnunet_pyexpect.py.in b/contrib/gnunet_pyexpect.py.in new file mode 100644 index 0000000..9e5c83f --- /dev/null +++ b/contrib/gnunet_pyexpect.py.in @@ -0,0 +1,83 @@ +#!@PYTHON@
+# This file is part of GNUnet.
+# (C) 2010 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
+# by the Free Software Foundation; either version 2, or (at your
+# option) any later version.
+#
+# GNUnet is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNUnet; see the file COPYING. If not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# Testcase for gnunet-peerinfo
+from __future__ import print_function
+import os
+import re
+import subprocess
+import sys
+import shutil
+import time
+
+class pexpect (object):
+ def __init__ (self):
+ super (pexpect, self).__init__ ()
+
+ def spawn (self, stdin, arglist, *pargs, **kwargs):
+ env = kwargs.pop ('env', None)
+ if env is None:
+ env = os.environ.copy ()
+ # This messes up some testcases, disable log redirection
+ env.pop ('GNUNET_FORCE_LOGFILE', None)
+ self.proc = subprocess.Popen (arglist, *pargs, env=env, **kwargs)
+ if self.proc is None:
+ print ("Failed to spawn a process {0}".format (arglist))
+ sys.exit (1)
+ if stdin is not None:
+ self.stdo, self.stde = self.proc.communicate (stdin)
+ else:
+ self.stdo, self.stde = self.proc.communicate ()
+ return self.proc
+
+ def expect (self, s, r, flags=0):
+ stream = self.stdo if s == 'stdout' else self.stde
+ if isinstance (r, str):
+ if r == "EOF":
+ if len (stream) == 0:
+ return True
+ else:
+ print ("Failed to find `{1}' in {0}, which is `{2}' ({3})".format (s, r, stream, len (stream)))
+ sys.exit (2)
+ raise ValueError ("Argument `r' should be an instance of re.RegexObject or a special string, but is `{0}'".format (r))
+ m = r.search (stream, flags)
+ if not m:
+ print ("Failed to find `{1}' in {0}, which is is `{2}'".format (s, r.pattern, stream))
+ sys.exit (2)
+ stream = stream[m.end ():]
+ if s == 'stdout':
+ self.stdo = stream
+ else:
+ self.stde = stream
+ return m
+
+ def read (self, s, size=-1):
+ stream = self.stdo if s == 'stdout' else self.stde
+ result = ""
+ if size < 0:
+ result = stream
+ new_stream = ""
+ else:
+ result = stream[0:size]
+ new_stream = stream[size:]
+ if s == 'stdout':
+ self.stdo = new_stream
+ else:
+ self.stde = new_stream
+ return result
diff --git a/contrib/hostlist.cgi b/contrib/hostlist.cgi new file mode 100644 index 0000000..f04246e --- /dev/null +++ b/contrib/hostlist.cgi @@ -0,0 +1,5 @@ +#!/bin/sh +# This is a CGI script to generate the host list on-demand. +# by Michael Wensley, with minor improvements by Christian Grothoff +echo -ne "Content-Type: application/octet-stream\r\n\r\n" +cat /var/lib/gnunet/data/hosts/*.{2,3,4,5,6,8,12,17,23,25} diff --git a/contrib/hostlist.php b/contrib/hostlist.php new file mode 100644 index 0000000..1585615 --- /dev/null +++ b/contrib/hostlist.php @@ -0,0 +1,35 @@ +<?php +// Requires PHP >= 4.3.0 +// Author: "Krasko Oleksandr" <0m3r.mail@gmail.com> +// Minor improvements by Christian Grothoff <christian@grothoff.org> +header("Content-Type: application/octet-stream\r\n\r\n"); +$extmas = array(); +$pv=$_GET['p']; +if (isset($pv)) + { + for ($ii=0;$ii<64;$ii++) + if (0 != ($pv & (1 << $ii))) + $extmas[] = $ii; + } +else + { + $extmas = array('2','3','4','5','6','8','12','17','23','25'); + } +$path = '/var/lib/gnunet/data/hosts/'; // adjust as necessary +$dir = opendir($path); +if (! $dir) + die("Cannot open directory $path.\n"); +$mas = array(); +while ($fname = readdir($dir)) { + $fn = $path . '/' . $fname; + if (is_file($fn)) { + $dpo = strpos($fname, '.') + 1; + $len = strlen($fname); + if (in_array(substr($fname, $dpo - $len), $extmas)) + $mas[] = $fn; + } +} +shuffle($mas); // randomize order +foreach ($mas as $val) + echo file_get_contents($val); +?> diff --git a/contrib/report.sh b/contrib/report.sh new file mode 100755 index 0000000..37a1c41 --- /dev/null +++ b/contrib/report.sh @@ -0,0 +1,200 @@ +#!/bin/sh + +TEST=`type type|grep not` +if test -n "$TEST"; then + WHICH=which +else + WHICH=type +fi + +echo "Please submit the following information with your bug report: " +echo "--------------------------------------------------------------" +OS=`uname -s 2>/dev/null` +echo "OS : $OS" +REL=`uname -r 2>/dev/null` +echo "OS RELEASE : $REL" +HW=`uname -m 2>/dev/null` +echo "HARDWARE : $HW" + +TEST=`$WHICH gcc 2>/dev/null` +if test -n "$TEST"; then + VERS=`gcc --version 2>/dev/null | head -n 1` + echo "gcc : $VERS" +else + echo "gcc : Not Found"; +fi + +TEST=`$WHICH gmake 2>/dev/null` +if test -n "$TEST" ; then + gmake --version 2>/dev/null |\ + awk -F, '{print $1}' |\ + awk '/GNU Make/{print "GNU gmake :",$NF}' +else + TEST=`make --version 2>/dev/null` + if test -n "$TEST"; then + make --version 2>/dev/null |\ + awk -F, '{print $1}' |\ + awk '/GNU Make/{print "make :",$NF}' + else + echo "make : Not Found" + fi +fi + +TEST=`$WHICH autoconf 2>/dev/null` +if test -n "$TEST"; then + autoconf --version |\ + head -n 1 |\ + awk '{\ + if (length($4) == 0) {\ + print "autoconf : "$3\ + } else {\ + print "autoconf : "$4\ + }}' +else + echo "autoconf : Not Found" +fi + +TEST=`$WHICH automake 2>/dev/null` +if test -n "$TEST"; then + automake --version 2>/dev/null |\ + head -n 1 |\ + awk '{print "automake : "$4}' +else + echo "automake : Not Found" +fi + +TEST=`$WHICH libtool 2>/dev/null` +if test -n "$TEST"; then + libtool --version 2>/dev/null |\ + head -n 1 |\ + awk '{print "libtool : "$4}' +else + echo "libtool : Not Found" +fi + +TEST=`$WHICH extract 2>/dev/null` +if test -n "$TEST"; then + extract -v 2>/dev/null |\ + head -n 1 |\ + awk '{print "libextractor : "$2}' +else + echo "libextractor : Not Found" +fi + +if test -x gnunetd; then + gnunetd -v | sed -e "s/v//" 2>/dev/null |\ + awk '{print "GNUnet 0.8 : "$2 (may conflict!)}' +else + echo "GNUnet 0.8 : Not Found (good)" +fi + +TEST=`$WHICH gnunet-arm 2>/dev/null` +if test -n "$TEST"; then + gnunet-arm -v | sed -e "s/v//" 2>/dev/null |\ + awk '{print "GNUnet 0.9 : "$2}' +else + echo "GNUnet 0.9 : Not Found" +fi + +TEST=`$WHICH libgcrypt-config 2> /dev/null` +if test -n "$TEST"; then + libgcrypt-config --version 2> /dev/null | \ + awk '{print "libgcrypt : "$1}' +else + echo "libgcrypt : Not Found" +fi + +TEST=`$WHICH mysql_config 2> /dev/null` +if test -n "$TEST"; then + mysql_config --version 2> /dev/null | \ + awk '{print "mysql : "$1}' +else + echo "mysql : Not Found" +fi + +TEST=`$WHICH pkg-config 2> /dev/null` +if test -n "$TEST"; then + pkg-config --version 2> /dev/null | \ + awk '{print "pkg-config : "$1}' +else + echo "pkg-config : Not Found" +fi + +TEST=`$WHICH pkg-config 2> /dev/null` +if test -n "$TEST"; then + pkg-config --modversion glib-2.0 2> /dev/null | \ + awk '{print "glib2 : "$1}' +else + echo "glib2 : Not Found" +fi + +TEST=`$WHICH pkg-config 2> /dev/null` +if test -n "$TEST"; then + pkg-config --modversion gtk+-2.0 2> /dev/null | \ + awk '{print "gtk2+ : "$1}' +else + echo "gtk2+ : Not Found" +fi + +TEST=`$WHICH dpkg 2> /dev/null` +if test -n "$TEST"; then + LINES=`dpkg -s libgmp3-dev | grep Version | wc -l` + if test "$LINES" = "1" + then + VERSION=`dpkg -s libgmp3-dev | grep Version | awk '{print $2}'` + echo "GMP : libgmp3-dev-$VERSION.deb" + else + echo "GMP : dpkg: libgmp3-dev not installed" + fi +else + TEST=`$WHICH rpm 2> /dev/null` + if test -n "$TEST"; then + rpm -q gmp | sed -e "s/gmp-//" 2> /dev/null | \ + awk '{print "GMP : "$1.rpm}' + else + echo "GMP : Test not available" + fi +fi + +TEST=`$WHICH gettext 2> /dev/null` +if test -n "$TEST"; then + gettext --version | head -n1 2> /dev/null | \ + awk '{print "GNU gettext : "$4}' +else + echo "GNU gettext : Not found" +fi + + +TEST=`$WHICH curl-config 2> /dev/null` +if test -n "$TEST"; then + curl-config --version | head -n1 2> /dev/null | \ + awk '{print "libcurl : "$2}' +else + echo "libcurl : Not found" +fi + + +TEST=`which qmake 2> /dev/null` +if test -x "$TEST"; then + qmake --version | tail -n 1 | awk '{print "Qt : "$4}' +else + echo "Qt : Not found" +fi + +echo -n "MHD : " +TMPFILE=`mktemp /tmp/mhd-version-testXXXXXX` +cat - >$TMPFILE.c <<EOF +#include <microhttpd.h> +#include <stdio.h> +int main() +{ + fprintf (stdout, "%X\n", MHD_VERSION); + return 0; +} +EOF + +gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found" +rm -f $TMPFILE $TMPFILE.bin + + +echo "--------------------------------------------------------------" diff --git a/contrib/test_gnunet_prefix.c b/contrib/test_gnunet_prefix.c new file mode 100644 index 0000000..732e8eb --- /dev/null +++ b/contrib/test_gnunet_prefix.c @@ -0,0 +1,65 @@ +/* + This file is part of GNUnet + (C) 2011 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 + by the Free Software Foundation; either version 2, or (at your + option) any later version. + + GNUnet is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNUnet; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + */ + +/** + * @file contrib/test_gnunet_prefix.c + * @brief test if environment variable GNUNET_PREFIX is set so that + * we have a chance to run tests + * @author Christian Grothoff + */ +#include "platform.h" + + +int +main (int argc, + char **argv) +{ + const char *basename; + const char *dirname; + + basename = getenv ("GNUNET_PREFIX"); + if (NULL == basename) + { + fprintf (stderr, + _("Environment variable GNUNET_PREFIX not set\n")); + fprintf (stderr, + _("Testcases will not work!\n")); + return 1; + } + dirname = DIR_SEPARATOR_STR "share" DIR_SEPARATOR_STR "gnunet" DIR_SEPARATOR_STR "config.d"; + { + char tmp[strlen (basename) + strlen (dirname) + 1]; + sprintf (tmp, "%s%s", basename, dirname); + if (0 != access (tmp, R_OK)) + { + fprintf (stderr, + _("Failed to access `%s': %s\n"), + tmp, + STRERROR (errno)); + fprintf (stderr, + _("Check that you did run `make install' and that GNUNET_PREFIX='%s' is the correct prefix.\n"), + basename); + fprintf (stderr, + _("Testcases will not work!\n")); + return 2; + } + } + return 0; +} diff --git a/contrib/testing_hostkeys.dat b/contrib/testing_hostkeys.dat Binary files differnew file mode 100644 index 0000000..d355fcb --- /dev/null +++ b/contrib/testing_hostkeys.dat diff --git a/contrib/timeout_watchdog.c b/contrib/timeout_watchdog.c new file mode 100644 index 0000000..a33f67a --- /dev/null +++ b/contrib/timeout_watchdog.c @@ -0,0 +1,113 @@ +/* + This file is part of GNUnet + (C) 2010 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 + by the Free Software Foundation; either version 3, or (at your + option) any later version. + + GNUnet is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNUnet; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +/** + * @file contrib/timeout_watchdog.c + * @brief small tool starting a child process, waiting that it terminates or killing it after a given timeout period + * @author Matthias Wachs + */ + +#include <sys/types.h> +#include <sys/wait.h> +#include <signal.h> +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> + +static pid_t child; + +static void +sigchld_handler (int val) +{ + int status = 0; + int ret = 0; + + waitpid (child, &status, 0); + if (WIFEXITED (status) != 0) + { + ret = WEXITSTATUS (status); + printf ("Test process exited with result %u\n", ret); + } + if (WIFSIGNALED (status) != 0) + { + ret = WTERMSIG (status); + printf ("Test process was signaled %u\n", ret); + } + exit (ret); +} + +static void +sigint_handler (int val) +{ + kill (0, val); + exit (val); +} + +int +main (int argc, char *argv[]) +{ + int timeout = 0; + pid_t gpid = 0; + + if (argc < 3) + { + printf + ("arg 1: timeout in sec., arg 2: executable, arg<n> arguments\n"); + exit (1); + } + + timeout = atoi (argv[1]); + + if (timeout == 0) + timeout = 600; + +/* with getpgid() it does not compile, but getpgrp is the BSD version and working */ + gpid = getpgrp (); + + signal (SIGCHLD, sigchld_handler); + signal (SIGABRT, sigint_handler); + signal (SIGFPE, sigint_handler); + signal (SIGILL, sigint_handler); + signal (SIGINT, sigint_handler); + signal (SIGSEGV, sigint_handler); + signal (SIGTERM, sigint_handler); + + child = fork (); + if (child == 0) + { + /* int setpgrp(pid_t pid, pid_t pgid); is not working on this machine */ + //setpgrp (0, pid_t gpid); + if (-1 != gpid) + setpgid (0, gpid); + execvp (argv[2], &argv[2]); + exit (1); + } + if (child > 0) + { + sleep (timeout); + printf ("Child processes were killed after timeout of %u seconds\n", + timeout); + kill (0, SIGTERM); + exit (1); + } + exit (1); +} + +/* end of timeout_watchdog.c */ |