Update of /cvsroot/fink/dists/10.4/unstable/main/finkinfo/utils
In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv26838

Modified Files:
        sshfs.info sshfs.patch 
Log Message:
New upstream release

Index: sshfs.info
===================================================================
RCS file: /cvsroot/fink/dists/10.4/unstable/main/finkinfo/utils/sshfs.info,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- sshfs.info  23 Nov 2007 06:58:50 -0000      1.6
+++ sshfs.info  20 May 2008 06:14:19 -0000      1.7
@@ -1,10 +1,10 @@
 Package: sshfs
-Version: 1.8
+Version: 1.9
 Revision: 1
 Source: mirror:sourceforge:fuse/%n-fuse-%v.tar.gz
-Source-MD5: 3c575cf89a6d3d8ab6063c2f60bd5b25
+Source-MD5: 05c3da4fa0f673f7ce5f480b3023af61
 PatchFile: %n.patch
-PatchFile-MD5: 5d3cec641c22e89dd840c6bbc3af89d4
+PatchFile-MD5: 195a7c8268b8deb3151c8b1015f3b602
 BuildDepends: fuse-dev, glib2-dev, pkgconfig, libgettext3-dev, fink (>= 
0.24.12)
 Depends: fuse-shlibs, glib2-shlibs, libgettext3-shlibs
 

Index: sshfs.patch
===================================================================
RCS file: /cvsroot/fink/dists/10.4/unstable/main/finkinfo/utils/sshfs.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- sshfs.patch 23 Nov 2007 06:58:50 -0000      1.4
+++ sshfs.patch 20 May 2008 06:14:19 -0000      1.5
@@ -1,6 +1,6 @@
 diff -Naur old/Makefile.in new/Makefile.in
---- old/Makefile.in    2007-05-16 04:21:20.000000000 -0700
-+++ new/Makefile.in    2007-09-19 23:05:36.000000000 -0700
+--- old/Makefile.in    2007-12-17 06:45:48.000000000 -0800
++++ new/Makefile.in    2008-01-10 04:04:28.000000000 -0800
 @@ -608,7 +608,11 @@
  @SSH_NODELAY_SO_TRUE@ rm -f "$(DESTDIR)$(libdir)/sshnodelay.so"
  
@@ -15,7 +15,7 @@
  .NOEXPORT:
 diff -Naur old/README.MacFUSE new/README.MacFUSE
 --- old/README.MacFUSE 1969-12-31 16:00:00.000000000 -0800
-+++ new/README.MacFUSE 2007-09-19 23:05:36.000000000 -0700
++++ new/README.MacFUSE 2008-01-10 04:01:39.000000000 -0800
 @@ -0,0 +1,9 @@
 +MacFUSE Project Page:
 +
@@ -27,21 +27,21 @@
 +1. Run ./configure_for_macfuse.sh
 +2. Run make
 diff -Naur old/cache.c new/cache.c
---- old/cache.c        2007-04-18 13:10:46.000000000 -0700
-+++ new/cache.c        2007-09-19 23:05:36.000000000 -0700
-@@ -499,6 +499,9 @@
-     cache.next_oper = oper;
+--- old/cache.c        2007-12-11 14:23:24.000000000 -0800
++++ new/cache.c        2008-01-10 04:01:39.000000000 -0800
+@@ -527,6 +527,9 @@
+       cache.next_oper = oper;
  
-     cache_unity_fill(oper, &cache_oper);
+       cache_unity_fill(oper, &cache_oper);
 +#if (__FreeBSD__ >= 10)
-+    cache_enabled = cache.on;
++      cache_enabled = cache.on;
 +#endif
-     if (cache.on) {
-         cache_oper.getattr  = oper->oper.getattr ? cache_getattr : NULL;
-         cache_oper.readlink = oper->oper.readlink ? cache_readlink : NULL;
-@@ -552,3 +555,7 @@
+       if (cache.on) {
+               cache_fill(oper, &cache_oper);
+               pthread_mutex_init(&cache.lock, NULL);
+@@ -561,3 +564,7 @@
  
-     return fuse_opt_parse(args, &cache, cache_opts, NULL);
+       return fuse_opt_parse(args, &cache, cache_opts, NULL);
  }
 +
 +#if (__FreeBSD__ >= 10)
@@ -49,7 +49,7 @@
 +#endif
 diff -Naur old/cache.h new/cache.h
 --- old/cache.h        2006-02-20 03:43:23.000000000 -0800
-+++ new/cache.h        2007-09-19 23:05:36.000000000 -0700
++++ new/cache.h        2008-01-10 04:01:39.000000000 -0800
 @@ -26,3 +26,7 @@
  int cache_parse_options(struct fuse_args *args);
  void cache_add_attr(const char *path, const struct stat *stbuf);
@@ -59,8 +59,8 @@
 +extern int cache_enabled;
 +#endif
 diff -Naur old/sshfs.c new/sshfs.c
---- old/sshfs.c        2007-05-16 04:20:48.000000000 -0700
-+++ new/sshfs.c        2007-09-19 23:05:58.000000000 -0700
+--- old/sshfs.c        2007-12-11 14:23:29.000000000 -0800
++++ new/sshfs.c        2008-01-10 04:01:39.000000000 -0800
 @@ -18,7 +18,12 @@
  #include <string.h>
  #include <stdint.h>
@@ -68,7 +68,7 @@
 +#if !(__FreeBSD__ >= 10)
  #include <semaphore.h>
 +#else
-+#define MACFUSE_SSHFS_VERSION "1.0.0"
++#define MACFUSE_SSHFS_VERSION "1.3.0"
 +#include "fuse_darwin.h"
 +#endif
  #include <pthread.h>
@@ -100,210 +100,212 @@
 +#endif
 +
  struct buffer {
-     uint8_t *p;
-     size_t len;
+       uint8_t *p;
+       size_t len;
 @@ -149,6 +168,9 @@
-     int connver;
-     int modifver;
-     int refs;
+       int connver;
+       int modifver;
+       int refs;
 +#if (__FreeBSD__ >= 10)
-+    pthread_mutex_t file_lock;
++      pthread_mutex_t file_lock;
 +#endif
  };
  
  struct sshfs {
 @@ -184,6 +206,10 @@
-     int server_version;
-     unsigned remote_uid;
-     unsigned local_uid;
+       int server_version;
+       unsigned remote_uid;
+       unsigned local_uid;
 +#if (__FreeBSD__ >= 10)
-+    unsigned remote_gid;
-+    unsigned local_gid;
++      unsigned remote_gid;
++      unsigned local_gid;
 +#endif
-     int remote_uid_detected;
-     unsigned blksize;
-     char *progname;
-@@ -585,8 +611,17 @@
-         }
-     }
+       int remote_uid_detected;
+       unsigned blksize;
+       char *progname;
+@@ -589,8 +615,17 @@
+               }
+       }
  
 +#if (__FreeBSD__ >= 10)
-+    if (sshfs.remote_uid_detected) {
-+        if (uid == sshfs.remote_uid)
-+            uid = sshfs.local_uid;
-+        if (gid == sshfs.remote_gid)
-+            gid = sshfs.local_gid;
-+    }
++      if (sshfs.remote_uid_detected) {
++              if (uid == sshfs.remote_uid)
++                      uid = sshfs.local_uid;
++              if (gid == sshfs.remote_gid)
++                      gid = sshfs.local_gid;
++      }
 +#else
-     if (sshfs.remote_uid_detected && uid == sshfs.remote_uid)
-         uid = sshfs.local_uid;
+       if (sshfs.remote_uid_detected && uid == sshfs.remote_uid)
+               uid = sshfs.local_uid;
 +#endif
  
-     memset(stbuf, 0, sizeof(struct stat));
-     stbuf->st_mode = mode;
-@@ -645,11 +680,33 @@
+       memset(stbuf, 0, sizeof(struct stat));
+       stbuf->st_mode = mode;
+@@ -651,11 +686,33 @@
  #ifdef SSH_NODELAY_WORKAROUND
  static int do_ssh_nodelay_workaround(void)
  {
 +#if (__FreeBSD__ >= 10)
-+    char *oldpreload = getenv("DYLD_INSERT_LIBRARIES");
++      char *oldpreload = getenv("DYLD_INSERT_LIBRARIES");
 +#else
-     char *oldpreload = getenv("LD_PRELOAD");
+       char *oldpreload = getenv("LD_PRELOAD");
 +#endif
-     char *newpreload;
-     char sopath[PATH_MAX];
-     int res;
+       char *newpreload;
+       char sopath[PATH_MAX];
+       int res;
  
 +#if (__FreeBSD__ >= 10)
-+    char *sshfs_program_path_base = NULL;
-+    if (!sshfs_program_path[0]) {
-+        goto nobundle;
-+    }
-+    sshfs_program_path_base = dirname(sshfs_program_path);
-+    if (!sshfs_program_path_base) {
-+        goto nobundle;
-+    }
-+    snprintf(sopath, sizeof(sopath), "%s/%s", sshfs_program_path_base,
-+             SSHNODELAY_SO);
-+    res = access(sopath, R_OK);
-+    if (res == -1) {
-+        goto nobundle;
-+    }
-+    goto pathok;
++      char *sshfs_program_path_base = NULL;
++      if (!sshfs_program_path[0]) {
++              goto nobundle;
++      }
++      sshfs_program_path_base = dirname(sshfs_program_path);
++      if (!sshfs_program_path_base) {
++              goto nobundle;
++      }
++      snprintf(sopath, sizeof(sopath), "%s/%s", sshfs_program_path_base,
++              SSHNODELAY_SO);
++      res = access(sopath, R_OK);
++      if (res == -1) {
++              goto nobundle;
++      }
++      goto pathok;
 +nobundle:
 +#endif
-     snprintf(sopath, sizeof(sopath), "%s/%s", LIBDIR, SSHNODELAY_SO);
-     res = access(sopath, R_OK);
-     if (res == -1) {
-@@ -673,14 +730,22 @@
-             return -1;
-         }
-     }
+       snprintf(sopath, sizeof(sopath), "%s/%s", LIBDIR, SSHNODELAY_SO);
+       res = access(sopath, R_OK);
+       if (res == -1) {
+@@ -680,16 +737,24 @@
+                       return -1;
+               }
+       }
 +#if (__FreeBSD__ >= 10)
 +pathok:
 +#endif
  
-     newpreload = g_strdup_printf("%s%s%s",
-                                  oldpreload ? oldpreload : "",
-                                  oldpreload ? " " : "",
-                                  sopath);
+       newpreload = g_strdup_printf("%s%s%s",
+                                    oldpreload ? oldpreload : "",
+                                    oldpreload ? " " : "",
+                                    sopath);
  
 +#if (__FreeBSD__ >= 10)
-+    if (!newpreload || setenv("DYLD_INSERT_LIBRARIES", newpreload, 1) == -1)
-+        fprintf(stderr, "warning: failed set DYLD_INSERT_LIBRARIES for ssh 
nodelay workaround\n");
++      if (!newpreload || setenv("DYLD_INSERT_LIBRARIES", newpreload, 1) == -1)
++              fprintf(stderr, "warning: failed set DYLD_INSERT_LIBRARIES for 
ssh nodelay workaround\n");
 +#else
-     if (!newpreload || setenv("LD_PRELOAD", newpreload, 1) == -1)
-         fprintf(stderr, "warning: failed set LD_PRELOAD for ssh nodelay 
workaround\n");
+       if (!newpreload || setenv("LD_PRELOAD", newpreload, 1) == -1) {
+               fprintf(stderr, "warning: failed set LD_PRELOAD "
+                       "for ssh nodelay workaround\n");
+       }
 +#endif
-     g_free(newpreload);
-     return 0;
+       g_free(newpreload);
+       return 0;
  }
-@@ -1154,6 +1219,10 @@
+@@ -1188,6 +1253,10 @@
  
-     sshfs.remote_uid = stbuf.st_uid;
-     sshfs.local_uid = getuid();
+       sshfs.remote_uid = stbuf.st_uid;
+       sshfs.local_uid = getuid();
 +#if (__FreeBSD__ >= 10)
-+    sshfs.remote_gid = stbuf.st_gid;
-+    sshfs.local_gid = getgid();
++      sshfs.remote_gid = stbuf.st_gid;
++      sshfs.local_gid = getgid();
 +#endif
-     sshfs.remote_uid_detected = 1;
-     DEBUG("remote_uid = %i\n", sshfs.remote_uid);
+       sshfs.remote_uid_detected = 1;
+       DEBUG("remote_uid = %i\n", sshfs.remote_uid);
  
-@@ -1719,6 +1788,14 @@
-     buf_init(&buf, 0);
-     buf_add_path(&buf, path);
-     buf_add_uint32(&buf, SSH_FILEXFER_ATTR_UIDGID);
+@@ -1758,6 +1827,14 @@
+       buf_init(&buf, 0);
+       buf_add_path(&buf, path);
+       buf_add_uint32(&buf, SSH_FILEXFER_ATTR_UIDGID);
 +#if (__FreeBSD__ >= 10)
-+    if (sshfs.remote_uid_detected) {
-+        if (uid == sshfs.local_uid)
-+            uid = sshfs.remote_uid;
-+        if (gid == sshfs.local_gid)
-+            gid = sshfs.remote_gid;
-+    }
++      if (sshfs.remote_uid_detected) {
++              if (uid == sshfs.local_uid)
++                      uid = sshfs.remote_uid;
++              if (gid == sshfs.local_gid)
++                      gid = sshfs.remote_gid;
++      }
 +#endif
-     buf_add_uint32(&buf, uid);
-     buf_add_uint32(&buf, gid);
-     err = sftp_request(SSH_FXP_SETSTAT, &buf, SSH_FXP_STATUS, NULL);
-@@ -1800,6 +1877,9 @@
-     sf = g_new0(struct sshfs_file, 1);
-     list_init(&sf->write_reqs);
-     pthread_cond_init(&sf->write_finished, NULL);
+       buf_add_uint32(&buf, uid);
+       buf_add_uint32(&buf, gid);
+       err = sftp_request(SSH_FXP_SETSTAT, &buf, SSH_FXP_STATUS, NULL);
+@@ -1840,6 +1917,9 @@
+       sf = g_new0(struct sshfs_file, 1);
+       list_init(&sf->write_reqs);
+       pthread_cond_init(&sf->write_finished, NULL);
 +#if (__FreeBSD__ >= 10)
-+    pthread_mutex_init(&sf->file_lock, NULL);
++      pthread_mutex_init(&sf->file_lock, NULL);
 +#endif
-     /* Assume random read after open */
-     sf->is_seq = 0;
-     sf->refs = 1;
-@@ -1832,11 +1912,21 @@
-     }
+       /* Assume random read after open */
+       sf->is_seq = 0;
+       sf->refs = 1;
+@@ -1873,11 +1953,21 @@
+       }
  
-     if (!err) {
+       if (!err) {
 +#if (__FreeBSD__ >= 10)
-+        if (cache_enabled)
-+            cache_add_attr(path, &stbuf);
++              if (cache_enabled)
++                      cache_add_attr(path, &stbuf);
 +#else
-         cache_add_attr(path, &stbuf);
+               cache_add_attr(path, &stbuf);
 +#endif
-         buf_finish(&sf->handle);
-         fi->fh = (unsigned long) sf;
-     } else {
+               buf_finish(&sf->handle);
+               fi->fh = (unsigned long) sf;
+       } else {
 +#if (__FreeBSD__ >= 10)
-+        if (cache_enabled)
-+            cache_invalidate(path);
++              if (cache_enabled)
++                      cache_invalidate(path);
 +#else
-         cache_invalidate(path);
+               cache_invalidate(path);
 +#endif
-         g_free(sf);
-     }
-     buf_free(&buf);
-@@ -1891,14 +1981,32 @@
+               g_free(sf);
+       }
+       buf_free(&buf);
+@@ -1932,14 +2022,32 @@
  
  static void sshfs_file_put(struct sshfs_file *sf)
  {
 +#if (__FreeBSD__ >= 10)
-+    pthread_mutex_lock(&sf->file_lock);
++      pthread_mutex_lock(&sf->file_lock);
 +#endif
-     sf->refs--;
+       sf->refs--;
 +#if (__FreeBSD__ >= 10)
-+    if (!sf->refs) {
-+        pthread_mutex_unlock(&sf->file_lock);
-+        g_free(sf);
-+    } else {
-+        pthread_mutex_unlock(&sf->file_lock);
-+    }
++      if (!sf->refs) {
++              pthread_mutex_unlock(&sf->file_lock);
++              g_free(sf);
++      } else {
++              pthread_mutex_unlock(&sf->file_lock);
++      }
 +#else
-     if (!sf->refs)
-         g_free(sf);
+       if (!sf->refs)
+               g_free(sf);
 +#endif
  }
  
- static struct sshfs_file *sshfs_file_get(struct sshfs_file *sf)
+ static void sshfs_file_get(struct sshfs_file *sf)
  {
 +#if (__FreeBSD__ >= 10)
-+    pthread_mutex_lock(&sf->file_lock);
++      pthread_mutex_lock(&sf->file_lock);
 +#endif
-     sf->refs++;
+       sf->refs++;
 +#if (__FreeBSD__ >= 10)
-+    pthread_mutex_unlock(&sf->file_lock);
++      pthread_mutex_unlock(&sf->file_lock);
 +#endif
-     return sf;
  }
  
-@@ -2533,7 +2641,12 @@
-         exit(1);
+ static int sshfs_release(const char *path, struct fuse_file_info *fi)
+@@ -2583,7 +2691,12 @@
+               exit(1);
  
-     case KEY_VERSION:
+       case KEY_VERSION:
 +#if (__FreeBSD__ >= 10)
-+        fprintf(stderr, "SSHFS version %s (MacFUSE SSHFS %s)\n",
-+                PACKAGE_VERSION, MACFUSE_SSHFS_VERSION);
++              fprintf(stderr, "SSHFS version %s (MacFUSE SSHFS %s)\n",
++                      PACKAGE_VERSION, MACFUSE_SSHFS_VERSION);
 +#else
-         fprintf(stderr, "SSHFS version %s\n", PACKAGE_VERSION);
+               fprintf(stderr, "SSHFS version %s\n", PACKAGE_VERSION);
 +#endif
  #if FUSE_VERSION >= 25
-         fuse_opt_add_arg(outargs, "--version");
-         sshfs_fuse_main(outargs);
-@@ -2599,8 +2712,17 @@
-         fuse_opt_insert_arg(args, 1, "-olarge_read");
+               fuse_opt_add_arg(outargs, "--version");
+               sshfs_fuse_main(outargs);
+@@ -2650,8 +2763,17 @@
+               fuse_opt_insert_arg(args, 1, "-olarge_read");
  }
  
 +#if (__FreeBSD__ >= 10)
@@ -313,50 +315,50 @@
 +#endif
  {
 +#if (__FreeBSD__ >= 10)
-+    if (!realpath(*exec_path, sshfs_program_path)) {
-+        memset(sshfs_program_path, 0, PATH_MAX);
-+    }
++      if (!realpath(*exec_path, sshfs_program_path)) {
++              memset(sshfs_program_path, 0, PATH_MAX);
++      }
 +#endif
-     int res;
-     struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
-     char *tmp;
-@@ -2608,13 +2730,21 @@
-     char *base_path;
-     const char *sftp_server;
+       int res;
+       struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
+       char *tmp;
+@@ -2660,13 +2782,21 @@
+       const char *sftp_server;
+       int libver;
  
 +#if (__FreeBSD__ >= 10)
-+    /* Until this gets fixed somewhere else. */
-+    g_slice_set_config(G_SLICE_CONFIG_ALWAYS_MALLOC, TRUE);
++      /* Until this gets fixed somewhere else. */
++      g_slice_set_config(G_SLICE_CONFIG_ALWAYS_MALLOC, TRUE);
 +#endif
-     g_thread_init(NULL);
+       g_thread_init(NULL);
  
-     sshfs.blksize = 4096;
-     sshfs.max_read = 65536;
-     sshfs.nodelay_workaround = 1;
-     sshfs.nodelaysrv_workaround = 0;
+       sshfs.blksize = 4096;
+       sshfs.max_read = 65536;
+       sshfs.nodelay_workaround = 1;
+       sshfs.nodelaysrv_workaround = 0;
 +#if (__FreeBSD__ >= 10)
-+    sshfs.rename_workaround = 1;
++      sshfs.rename_workaround = 1;
 +#else
-     sshfs.rename_workaround = 0;
+       sshfs.rename_workaround = 0;
 +#endif
-     sshfs.truncate_workaround = 0;
-     sshfs.buflimit_workaround = 1;
-     sshfs.ssh_ver = 2;
-@@ -2624,6 +2754,10 @@
-     ssh_add_arg("-a");
-     ssh_add_arg("-oClearAllForwardings=yes");
+       sshfs.truncate_workaround = 0;
+       sshfs.buflimit_workaround = 1;
+       sshfs.ssh_ver = 2;
+@@ -2676,6 +2806,10 @@
+       ssh_add_arg("-a");
+       ssh_add_arg("-oClearAllForwardings=yes");
  
 +#if (__FreeBSD__ >= 10)
-+    sshfs.detect_uid = 1;
++      sshfs.detect_uid = 1;
 +#endif
 +
-     if (fuse_opt_parse(&args, &sshfs, sshfs_opts, sshfs_opt_proc) == -1 ||
-         parse_workarounds() == -1)
-         exit(1);
+       if (fuse_opt_parse(&args, &sshfs, sshfs_opts, sshfs_opt_proc) == -1 ||
+           parse_workarounds() == -1)
+               exit(1);
 diff -Naur old/sshnodelay.c new/sshnodelay.c
---- old/sshnodelay.c   2006-02-01 01:43:22.000000000 -0800
-+++ new/sshnodelay.c   2007-09-19 23:05:36.000000000 -0700
-@@ -5,6 +5,31 @@
+--- old/sshnodelay.c   2007-12-11 14:23:29.000000000 -0800
++++ new/sshnodelay.c   2008-01-10 04:01:39.000000000 -0800
+@@ -5,6 +5,32 @@
  #include <netinet/in.h>
  #include <netinet/tcp.h>
  
@@ -365,33 +367,33 @@
 +int custom_connect(int sock, const struct sockaddr *addr, socklen_t addrlen);
 +
 +typedef struct interpose_s {
-+    void *new_func;
-+    void *orig_func;
++      void *new_func;
++      void *orig_func;
 +} interpose_t;
 +
 +static const interpose_t interposers[] \
-+    __attribute__ ((section("__DATA, __interpose"))) = {
-+        { (void *)custom_connect,  (void *)connect  },
-+    };
-+   
++      __attribute__ ((section("__DATA, __interpose"))) = {
++      { (void *)custom_connect,  (void *)connect  },
++};
++
 +int custom_connect(int sock, const struct sockaddr *addr, socklen_t addrlen)
 +{
-+    int res = connect(sock, addr, addrlen);
-+    if (!res && addr->sa_family == AF_INET) {
-+        int opt = 1;
-+        setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt));
-+    }
-+    return res;
++      int res = connect(sock, addr, addrlen);
++      if (!res && addr->sa_family == AF_INET) {
++              int opt = 1;
++              setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt));
++      }
++      return res;
 +}
 +
 +#else
++
  int connect(int sock, const struct sockaddr *addr, socklen_t addrlen)
  {
-     int (*next_connect)(int, const struct sockaddr *, socklen_t) =
-@@ -14,5 +39,5 @@
-         int opt = 1;
-         setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt));
-     }
--    return res;
+       int (*next_connect)(int, const struct sockaddr *, socklen_t) =
+@@ -16,3 +42,5 @@
+       }
+       return res;
  }
++
 +#endif


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to