gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r3652 - GNUnet GNUnet/src/applications/fs/ecrs GNUnet/src/a


From: grothoff
Subject: [GNUnet-SVN] r3652 - GNUnet GNUnet/src/applications/fs/ecrs GNUnet/src/applications/fs/fsui GNUnet/src/applications/fs/tools gnunet-gtk gnunet-gtk/src/plugins/fs
Date: Sun, 5 Nov 2006 16:00:07 -0800 (PST)

Author: grothoff
Date: 2006-11-05 15:59:55 -0800 (Sun, 05 Nov 2006)
New Revision: 3652

Modified:
   GNUnet/INSTALL
   GNUnet/ltmain.sh
   GNUnet/src/applications/fs/ecrs/download.c
   GNUnet/src/applications/fs/fsui/upload.c
   GNUnet/src/applications/fs/tools/gnunet-download.c
   GNUnet/src/applications/fs/tools/gnunet-insert.c
   GNUnet/todo
   gnunet-gtk/TODO
   gnunet-gtk/src/plugins/fs/download.c
Log:
bugfixes

Modified: GNUnet/INSTALL
===================================================================
--- GNUnet/INSTALL      2006-11-05 14:09:18 UTC (rev 3651)
+++ GNUnet/INSTALL      2006-11-05 23:59:55 UTC (rev 3652)
@@ -1,13 +1,16 @@
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
-Foundation, Inc.
+Installation Instructions
+*************************
 
-   This file is free documentation; the Free Software Foundation gives
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
 
 Basic Installation
 ==================
 
-   These are generic installation instructions.
+These are generic installation instructions.
 
    The `configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
@@ -67,9 +70,9 @@
 Compilers and Options
 =====================
 
-   Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  Run `./configure --help'
-for details on some of the pertinent environment variables.
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about.  Run `./configure --help' for
+details on some of the pertinent environment variables.
 
    You can give `configure' initial values for configuration parameters
 by setting variables in the command line or in the environment.  Here
@@ -82,7 +85,7 @@
 Compiling For Multiple Architectures
 ====================================
 
-   You can compile the package for more than one kind of computer at the
+You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
 own directory.  To do this, you must use a version of `make' that
 supports the `VPATH' variable, such as GNU `make'.  `cd' to the
@@ -99,19 +102,19 @@
 Installation Names
 ==================
 
-   By default, `make install' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc.  You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
 
    You can specify separate installation prefixes for
 architecture-specific files and architecture-independent files.  If you
-give `configure' the option `--exec-prefix=PATH', the package will use
-PATH as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
 
    In addition, if you use an unusual directory layout you can give
-options like `--bindir=PATH' to specify different values for particular
+options like `--bindir=DIR' to specify different values for particular
 kinds of files.  Run `configure --help' for a list of the directories
 you can set and what kinds of files go in them.
 
@@ -122,7 +125,7 @@
 Optional Features
 =================
 
-   Some packages pay attention to `--enable-FEATURE' options to
+Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
 is something like `gnu-as' or `x' (for the X Window System).  The
@@ -137,11 +140,11 @@
 Specifying the System Type
 ==========================
 
-   There may be some features `configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on.  Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
 `--build=TYPE' option.  TYPE can either be a short name for the system
 type, such as `sun4', or a canonical name which has the form:
 
@@ -156,7 +159,7 @@
 need to know the machine type.
 
    If you are _building_ compiler tools for cross-compiling, you should
-use the `--target=TYPE' option to select the type of system they will
+use the option `--target=TYPE' to select the type of system they will
 produce code for.
 
    If you want to _use_ a cross compiler, that generates code for a
@@ -167,9 +170,9 @@
 Sharing Defaults
 ================
 
-   If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
 `configure' looks for `PREFIX/share/config.site' if it exists, then
 `PREFIX/etc/config.site' if it exists.  Or, you can set the
 `CONFIG_SITE' environment variable to the location of the site script.
@@ -178,7 +181,7 @@
 Defining Variables
 ==================
 
-   Variables not defined in a site shell script can be set in the
+Variables not defined in a site shell script can be set in the
 environment passed to `configure'.  However, some packages may run
 configure again during the build, and the customized values of these
 variables may be lost.  In order to avoid this problem, you should set
@@ -186,14 +189,18 @@
 
      ./configure CC=/usr/local2/bin/gcc
 
-will cause the specified gcc to be used as the C compiler (unless it is
-overridden in the site shell script).
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).  Here is a another example:
 
+     /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/bin/bash'.
+
 `configure' Invocation
 ======================
 
-   `configure' recognizes the following options to control how it
-operates.
+`configure' recognizes the following options to control how it operates.
 
 `--help'
 `-h'

Modified: GNUnet/ltmain.sh
===================================================================
--- GNUnet/ltmain.sh    2006-11-05 14:09:18 UTC (rev 3651)
+++ GNUnet/ltmain.sh    2006-11-05 23:59:55 UTC (rev 3652)
@@ -43,7 +43,7 @@
 
 PROGRAM=ltmain.sh
 PACKAGE=libtool
-VERSION="1.5.22 Debian 1.5.22-4"
+VERSION=1.5.22
 TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
 
 # See if we are running on zsh, and set the options which allow our
@@ -2082,10 +2082,7 @@
        case $pass in
        dlopen) libs="$dlfiles" ;;
        dlpreopen) libs="$dlprefiles" ;;
-       link)
-         libs="$deplibs %DEPLIBS%"
-         test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
-         ;;
+       link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
        esac
       fi
       if test "$pass" = dlopen; then
@@ -3204,11 +3201,6 @@
            age="$number_minor"
            revision="$number_minor"
            ;;
-         *)
-           $echo "$modename: unknown library version type \`$version_type'" 
1>&2
-           $echo "Fatal configuration error.  See the $PACKAGE docs for more 
information." 1>&2
-           exit $EXIT_FAILURE
-           ;;
          esac
          ;;
        no)

Modified: GNUnet/src/applications/fs/ecrs/download.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/download.c  2006-11-05 14:09:18 UTC (rev 
3651)
+++ GNUnet/src/applications/fs/ecrs/download.c  2006-11-05 23:59:55 UTC (rev 
3652)
@@ -1103,15 +1103,17 @@
   }
 
 #if DEBUG_DOWNLOAD
-  IF_GELOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
-       hash2enc(&entry->node->chk.query,
-                &enc));
-  GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
-      "Starting FS search for %s:%llu:%u `%s'\n",
-      entry->node->ctx->ioc->filename,
-      entry->node->offset,
-      entry->node->level,
-      &enc);
+  IF_GELOG(ectx, 
+          GE_DEBUG | GE_REQUEST | GE_USER,
+          hash2enc(&entry->node->chk.query,
+                   &enc));
+  GE_LOG(ectx, 
+        GE_DEBUG | GE_REQUEST | GE_USER,
+        "Starting FS search for %s:%llu:%u `%s'\n",
+        entry->node->ctx->ioc->filename,
+        entry->node->offset,
+        entry->node->level,
+        &enc);
 #endif
 
   if (entry->searchHandle != NULL)

Modified: GNUnet/src/applications/fs/fsui/upload.c
===================================================================
--- GNUnet/src/applications/fs/fsui/upload.c    2006-11-05 14:09:18 UTC (rev 
3651)
+++ GNUnet/src/applications/fs/fsui/upload.c    2006-11-05 23:59:55 UTC (rev 
3652)
@@ -200,12 +200,13 @@
   struct GE_Context * ectx;
   char * filename;
   struct ECRS_URI * uri;
+  size_t tpos;
 
   ectx = utc->shared->ctx->ectx;
   GE_ASSERT(ectx, utc->filename != NULL);
   cpos = utc->child;
   while (cpos != NULL) {
-    if (cpos->state == FSUI_PENDING)
+    if (cpos->state == FSUI_ACTIVE)
       FSUI_uploadThread(cpos);
     cpos = cpos->next;
   }
@@ -266,9 +267,16 @@
   ECRS_delFromMetaData(utc->meta,
                       EXTRACTOR_FILENAME,
                       NULL);
+  /* only publish the last part of the path
+     -- we do not want to publish $HOME or similar
+     trivially deanonymizing information */
+  tpos = strlen(utc->filename) - 1;
+  while ( (tpos > 0) &&
+         (utc->filename[tpos] != '/') )
+    tpos--;
   ECRS_addToMetaData(utc->meta,
                     EXTRACTOR_FILENAME,
-                    utc->filename);
+                    &utc->filename[tpos+1]);
   ECRS_delFromMetaData(utc->meta,
                       EXTRACTOR_SPLIT,
                       NULL);

Modified: GNUnet/src/applications/fs/tools/gnunet-download.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-download.c  2006-11-05 14:09:18 UTC 
(rev 3651)
+++ GNUnet/src/applications/fs/tools/gnunet-download.c  2006-11-05 23:59:55 UTC 
(rev 3652)
@@ -65,7 +65,7 @@
     1, &gnunet_getopt_configure_set_string, &filename },
   { 'R', "recursive", NULL,
     gettext_noop("download a GNUnet directory recursively"),
-    1, &gnunet_getopt_configure_set_one, &do_recursive },
+    0, &gnunet_getopt_configure_set_one, &do_recursive },
   COMMAND_LINE_OPTION_VERSION(PACKAGE_VERSION), /* -v */
   COMMAND_LINE_OPTION_VERBOSE,
   COMMAND_LINE_OPTION_END,

Modified: GNUnet/src/applications/fs/tools/gnunet-insert.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-insert.c    2006-11-05 14:09:18 UTC 
(rev 3651)
+++ GNUnet/src/applications/fs/tools/gnunet-insert.c    2006-11-05 23:59:55 UTC 
(rev 3652)
@@ -82,7 +82,7 @@
 
 static int do_insert;
 
-static int do_direct_references;
+static int do_no_direct_references;
 
 static int do_copy;
 
@@ -236,9 +236,9 @@
   { 'd', "disable-creation-time", NULL,
     gettext_noop("disable adding the creation time to the metadata of the 
uploaded file"),
     0, &gnunet_getopt_configure_set_one, &do_disable_creation_time },
-  { 'D', "direct", NULL,
-    gettext_noop("use libextractor to add additional direct references to 
directory entries"),
-    0, &gnunet_getopt_configure_set_one, &do_direct_references },
+  { 'D', "disable-direct", NULL,
+    gettext_noop("do not use libextractor to add additional references to 
directory entries and/or the published file"),
+    0, &gnunet_getopt_configure_set_one, &do_no_direct_references },
   { 'e', "extract", NULL,
     gettext_noop("print list of extracted keywords that would be used, but do 
not perform upload"),
     0, &gnunet_getopt_configure_set_one, &extract_only },
@@ -454,7 +454,7 @@
                        priority,                       
                        ! do_insert,
                        YES,
-                       do_direct_references,                   
+                       ! do_no_direct_references,                      
                        meta,
                        gloKeywords,
                        topKeywords);

Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2006-11-05 14:09:18 UTC (rev 3651)
+++ GNUnet/todo 2006-11-05 23:59:55 UTC (rev 3652)
@@ -14,7 +14,9 @@
 
 0.7.1 [11'06] (aka "stabilization")
 - fix critical known bugs:
-  * keyword extraction does NOT happen with gnunet-insert [RCpre0, #1145]
+  * recursive gnunet-download stopped working [RCpre0]
+    ?: no reply from gnunetd (we seem to send queries, but gnunetd does not 
respond!)
+       => insert error? wrong query?
   * gnunet-download stopped working [RCpre0]
     Possibly related to #1144, #1143
   * fix connection problem reported by Nils! [RCpre0]

Modified: gnunet-gtk/TODO
===================================================================
--- gnunet-gtk/TODO     2006-11-05 14:09:18 UTC (rev 3651)
+++ gnunet-gtk/TODO     2006-11-05 23:59:55 UTC (rev 3652)
@@ -2,6 +2,7 @@
 - support new FSUI apis: [pre0]
   * insert 21.pdf, search 21, search application/pdf, stop insert, abort 
search (summary), stop search (search), exit => crash
   * (inserted 21.pdf), search application/pdf, download => no progress!
+     => related to existing bug in GNUnet with recursive download???
   * test, test, test!
 - disable inactive buttons (if no search/download 
   is selected to operate on) [ medium ] [pre1]

Modified: gnunet-gtk/src/plugins/fs/download.c
===================================================================
--- gnunet-gtk/src/plugins/fs/download.c        2006-11-05 14:09:18 UTC (rev 
3651)
+++ gnunet-gtk/src/plugins/fs/download.c        2006-11-05 23:59:55 UTC (rev 
3652)
@@ -383,6 +383,41 @@
 /* **************** user download events ******************** */
 
 /**
+ * Check if a download for the given filename is
+ * already running.
+ *
+ * @return OK if no download is pending, SYSERR if
+ *  such a download is already active.
+ */ 
+static int
+check_pending(const char * filename,
+             GtkTreeIter * parent) {
+  GtkTreeModel * model;
+  GtkTreeIter iter;
+  const char * name;
+
+  model = GTK_TREE_MODEL(download_summary);
+  if (gtk_tree_model_iter_children(model,
+                                  &iter,
+                                  parent)) {
+    do {       
+      gtk_tree_model_get(model,
+                        &iter,
+                        DOWNLOAD_FILENAME, &name,
+                        -1);
+      if ( (name != NULL) &&
+          (0 == strcmp(name, filename)) )
+       return SYSERR;
+      if (SYSERR == check_pending(filename,
+                                 &iter))
+       return SYSERR;
+    } while (gtk_tree_model_iter_next(model,
+                                     &iter));
+  }
+  return OK;
+}
+
+/**
  * The user clicked the download button.
  * Start the download of the selected entry.
  */
@@ -544,17 +579,24 @@
                                                      - 
strlen(GNUNET_DIRECTORY_EXT)],
                      GNUNET_DIRECTORY_EXT)) ) )
     strcat(idc_final_download_destination, GNUNET_DIRECTORY_EXT);
-   
-  addLogEntry(_("Downloading `%s'"), idc_name);
-  FSUI_startDownload(ctx,
-                    getSpinButtonValue(searchContext->searchXML,
-                                       "downloadAnonymitySpinButton"),
-                    NO, /* FIXME: isRecursive */
-                    idc_uri,
-                    idc_meta,
-                    idc_final_download_destination,
-                    searchContext->fsui_list,
-                    (parentContext != NULL) ? parentContext->fsui_list : NULL);
+
+  /* FIXME: check that there is no pending download
+     for idc_name! */
+  if (OK == check_pending(idc_name,
+                         NULL)) {
+    addLogEntry(_("Downloading `%s'"), idc_name);
+    FSUI_startDownload(ctx,
+                      getSpinButtonValue(searchContext->searchXML,
+                                         "downloadAnonymitySpinButton"),
+                      NO, /* FIXME: isRecursive */
+                      idc_uri,
+                      idc_meta,
+                      idc_final_download_destination,
+                      searchContext->fsui_list,
+                      (parentContext != NULL) ? parentContext->fsui_list : 
NULL);
+  } else {
+    addLogEntry(_("ERROR: already downloading `%s'"), idc_name);
+  }
   FREE(uri_name);
   FREE(dirPath);
   FREENONNULL(final_download_dir);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]