pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/filesystems/fuse-sshfs Update to sshfs-3.7.2



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7c9b1b201044
branches:  trunk
changeset: 770526:7c9b1b201044
user:      pho <pho%pkgsrc.org@localhost>
date:      Thu Dec 02 07:28:40 2021 +0000

description:
Update to sshfs-3.7.2

I have added a lot of unpleasant hacks to the code in order to make it
work with NetBSD librefuse. We really should fix it. I will probably
do it later. Release notes from the upstream are as follows:


Release 3.7.2 (2021-06-08)
--------------------------
* Added a secondary check so if a mkdir request fails with EPERM an access request will be
  tried - returning EEXIST if the access was successful.
    Fixes: https://github.com/libfuse/sshfs/issues/243

Release 3.7.1 (2020-11-09)
--------------------------
* Minor bugfixes.

Release 3.7.0 (2020-01-03)
--------------------------
* New max_conns option enables the use of multiple connections to improve responsiveness
  during large file transfers. Thanks to Timo Savola for doing most of the implementation
  work, and thanks to CEA.fr for sponsoring remaining bugfixes and cleanups!

* The `buflimit` workaround is now disabled by default. The corresponding bug in OpenSSH
  has been fixed in 2007
  (cf. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=365541#37), so this shouldn't be
  needed anymore. If you depend on this workaround, please let the SSHFS maintainers know,
  otherwise support for the workaround will be removed completely in a future version.

Release 3.6.0 (2019-11-03)
--------------------------
* Added "-o direct_io" option.
  This option disables the use of page cache in kernel.
  This is useful for example if the file size is not known before reading it.
  For example if you mount /proc dir from a remote host without the direct_io
  option, the read always will return zero bytes instead of actual data.
* Added --verbose option.
* Fixed a number of compiler warnings.
* Improved performance under OS X.

Release 3.5.2 (2019-04-13)
--------------------------
* Fixed "-o idmap=user" to map both UID and GID on all OSs.
* Fixed improper handling of sequential spaces spaces in "ssh_command" option

Release 3.5.1 (2018-12-22)
--------------------------
* Documentation updates
* Build system updates
* Added "BindInterface" as valid "-o" option.

Release 3.5.0 (2018-08-28)
--------------------------
* Fixed error code returned by rename(), allowing proper fallback.
* Port to Cygwin.

Release 3.4.0 (2018-06-29)
--------------------------
* Make utimens(NULL) result in timestamp "now" -- no more touched files
  dated 1970-01-01
* New `createmode` workaround.
* Fix `fstat` workaround regression.

Release 3.3.2 (2018-04-29)
--------------------------
* New `renamexdev` workaround.

Release 3.3.1 (2017-10-25)
--------------------------
* Manpage is now installed in correct directory.
* SSHFS now supports (or rather: ignores) some options that it may
  receive as result of being mounted from ``/etc/mtab``. This includes
  things like ``user``, ``netdev``, or ``auto``.

SSHFS 3.3.0 (2017-09-20)
------------------------
* Dropped support for writeback caching (and, as a consequence,
  "unreliable append" operation). As of kernel 4.14, the FUSE module's
  writeback implementation is not compatible with network filesystems
  and there are no imminent plans to change that.
* Add support for mounting from /etc/fstab
* Dropped support for building with autotools.
* Added missing options to man page.

Release 3.2.0 (2017-08-06)
--------------------------
* Re-enabled writeback cache.
* SSHFS now supports O_APPEND.

Release 3.1.0 (2017-08-04)
--------------------------
* Temporarily disabled the writeback cache feature, since there
  have been reports of dataloss when appending to files when
  writeback caching is enabled.

* Fixed a crash due to a race condition when listing
  directory contents.

* For improved backwards compatibility, SSHFS now also silently
  accepts the old ``-o cache_*`` options.

Release 3.0.0 (2017-07-08)
--------------------------
* sshfs now requires libfuse 3.1.0 or newer.
* When supported by the kernel, sshfs now uses writeback caching.
* The `cache` option has been renamed to `dir_cache` for clarity.
* Added unit tests
* --debug now behaves like -o debug_sshfs, i.e. it enables sshfs
  debugging messages rather than libfuse debugging messages.
* Documented limited hardlink support.
* Added support for building with Meson.
* Added support for more SSH options.
* Dropped support for the *nodelay* workaround - the last OpenSSH
  version for which this was useful was released in 2006.
* Dropped support for the *nodelaysrv* workaround. The same effect
  (enabling NODELAY on the server side *and* enabling X11 forwarding)
  can be achieved by explicitly passing `-o ForwardX11`
* Removed support for `-o workaround=all`. Workarounds should always
  enabled explicitly and only when needed. There is no point in always
  enabling a potentially changing set of workarounds.

Release 2.9 (2017-04-17)
------------------------
* Improved support for Cygwin.
* Various small bugfixes.

Release 2.8 (2016-06-22)
------------------------
* Added support for the "fsync" extension.
* Fixed a build problem with bitbake

diffstat:

 filesystems/fuse-sshfs/Makefile                               |   10 +-
 filesystems/fuse-sshfs/PLIST                                  |    4 +-
 filesystems/fuse-sshfs/distinfo                               |   12 +-
 filesystems/fuse-sshfs/patches/patch-cache.c                  |  227 +++++
 filesystems/fuse-sshfs/patches/patch-meson.build              |   19 +
 filesystems/fuse-sshfs/patches/patch-sshfs.c                  |  420 ++++++++++
 filesystems/fuse-sshfs/patches/patch-utils_install__helper.sh |   18 +
 7 files changed, 699 insertions(+), 11 deletions(-)

diffs (truncated from 760 to 300 lines):

diff -r bc2e66367fb2 -r 7c9b1b201044 filesystems/fuse-sshfs/Makefile
--- a/filesystems/fuse-sshfs/Makefile   Thu Dec 02 00:44:19 2021 +0000
+++ b/filesystems/fuse-sshfs/Makefile   Thu Dec 02 07:28:40 2021 +0000
@@ -1,25 +1,23 @@
-# $NetBSD: Makefile,v 1.3 2020/03/08 16:49:31 wiz Exp $
+# $NetBSD: Makefile,v 1.4 2021/12/02 07:28:40 pho Exp $
 #
 
-DISTNAME=      sshfs-2.7
+DISTNAME=      sshfs-3.7.2
 PKGNAME=       fuse-${DISTNAME}
-PKGREVISION=   1
 CATEGORIES=    filesystems
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=libfuse/}
 GITHUB_PROJECT=        sshfs
 GITHUB_RELEASE=        ${DISTNAME}
+EXTRACT_SUFX=  .tar.xz
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      https://github.com/libfuse/sshfs/
 COMMENT=       File system client based on the SFTP protocol
 LICENSE=       gnu-gpl-v2
 
-ONLY_FOR_PLATFORM=     Darwin-*-* Linux-*-*
-
-GNU_CONFIGURE= yes
 USE_LANGUAGES= c
 USE_TOOLS=     pkg-config
 
 .include "../../devel/glib2/buildlink3.mk"
+.include "../../devel/meson/build.mk"
 .include "../../mk/fuse.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r bc2e66367fb2 -r 7c9b1b201044 filesystems/fuse-sshfs/PLIST
--- a/filesystems/fuse-sshfs/PLIST      Thu Dec 02 00:44:19 2021 +0000
+++ b/filesystems/fuse-sshfs/PLIST      Thu Dec 02 07:28:40 2021 +0000
@@ -1,3 +1,5 @@
-@comment $NetBSD: PLIST,v 1.1 2016/03/01 11:30:07 jmmv Exp $
+@comment $NetBSD: PLIST,v 1.2 2021/12/02 07:28:40 pho Exp $
 bin/sshfs
 man/man1/sshfs.1
+sbin/mount.fuse.sshfs
+sbin/mount.sshfs
diff -r bc2e66367fb2 -r 7c9b1b201044 filesystems/fuse-sshfs/distinfo
--- a/filesystems/fuse-sshfs/distinfo   Thu Dec 02 00:44:19 2021 +0000
+++ b/filesystems/fuse-sshfs/distinfo   Thu Dec 02 07:28:40 2021 +0000
@@ -1,5 +1,9 @@
-$NetBSD: distinfo,v 1.4 2021/10/26 10:25:28 nia Exp $
+$NetBSD: distinfo,v 1.5 2021/12/02 07:28:40 pho Exp $
 
-BLAKE2s (sshfs-2.7.tar.gz) = 127adb5052b76f8d0a3d54fe83b2ac9acde72b788f113baccabaec09bdcd42df
-SHA512 (sshfs-2.7.tar.gz) = e8b00bc3661140d59c6735f1f76d1bd4c63ebc04b578cbcebca88c2f1df8b2cea18c86ff24bef5d40ce286319b55d906632bea53e6b37aff76744072250aec1b
-Size (sshfs-2.7.tar.gz) = 153014 bytes
+BLAKE2s (sshfs-3.7.2.tar.xz) = a770780be6c0d5b26ebb9b7b43c35c8a689e226a619f03cdaee847598c81d025
+SHA512 (sshfs-3.7.2.tar.xz) = 1612d515869a8b38c0bc3d79eaf80e8b4da1a9710c9668e6ec23e6b77313063ae0bee66ab9e9e0f70d98eaa1334425b2087dd93cc4618af3ac6ac191acf7f838
+Size (sshfs-3.7.2.tar.xz) = 53160 bytes
+SHA1 (patch-cache.c) = 9a089852ab3ad77d2b77c4323c5d65ed9f05036a
+SHA1 (patch-meson.build) = dd9549c3d099a4137089757bd743c8c0bbb63b35
+SHA1 (patch-sshfs.c) = 4f06a3c945de2f4b3b8e5935b28c6fca0d50a355
+SHA1 (patch-utils_install__helper.sh) = 7e31f031ecf40731acb4a96b0c23543b7015c290
diff -r bc2e66367fb2 -r 7c9b1b201044 filesystems/fuse-sshfs/patches/patch-cache.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-sshfs/patches/patch-cache.c      Thu Dec 02 07:28:40 2021 +0000
@@ -0,0 +1,227 @@
+$NetBSD: patch-cache.c,v 1.1 2021/12/02 07:28:40 pho Exp $
+
+Impedance adjustment with librefuse. Never send this to the
+upstream. It's our code that needs to be fixed, not theirs!
+
+TODO: This patch should *really* be gone, except for one thing (see
+comments). Update librefuse.
+
+--- cache.c.orig       2021-06-08 08:52:08.000000000 +0000
++++ cache.c
+@@ -251,6 +251,12 @@ uint64_t cache_get_write_ctr(void)
+       return res;
+ }
+ 
++#if defined(__NetBSD__) && FUSE_MAJOR_VERSION < 3
++static void *cache_init(struct fuse_conn_info *conn __attribute__((__unused__)))
++{
++      return cache.next_oper->init(NULL);
++}
++#else
+ static void *cache_init(struct fuse_conn_info *conn,
+                         struct fuse_config *cfg)
+ {
+@@ -262,14 +268,23 @@ static void *cache_init(struct fuse_conn
+ 
+       return res;
+ }
++#endif
+ 
++#if FUSE_MAJOR_VERSION < 3
++static int cache_getattr(const char *path, struct stat *stbuf)
++#else
+ static int cache_getattr(const char *path, struct stat *stbuf,
+                        struct fuse_file_info *fi)
++#endif
+ {
+       int err = cache_get_attr(path, stbuf);
+       if (err) {
+               uint64_t wrctr = cache_get_write_ctr();
++#if FUSE_MAJOR_VERSION < 3
++              err = cache.next_oper->getattr(path, stbuf);
++#else
+               err = cache.next_oper->getattr(path, stbuf, fi);
++#endif
+               if (!err)
+                       cache_add_attr(path, stbuf, wrctr);
+       }
+@@ -331,15 +346,24 @@ static int cache_releasedir(const char *
+       return err;
+ }
+ 
++#if FUSE_MAJOR_VERSION < 3
++static int cache_dirfill (void *buf, const char *name,
++                        const struct stat *stbuf, off_t off)
++#else
+ static int cache_dirfill (void *buf, const char *name,
+                         const struct stat *stbuf, off_t off,
+                         enum fuse_fill_dir_flags flags)
++#endif
+ {
+       int err;
+       struct readdir_handle *ch;
+ 
+       ch = (struct readdir_handle*) buf;
++#if FUSE_MAJOR_VERSION < 3
++      err = ch->filler(ch->buf, name, stbuf, off);
++#else
+       err = ch->filler(ch->buf, name, stbuf, off, flags);
++#endif
+       if (!err) {
+               g_ptr_array_add(ch->dir, g_strdup(name));
+               if (stbuf->st_mode & S_IFMT) {
+@@ -354,9 +378,14 @@ static int cache_dirfill (void *buf, con
+       return err;
+ }
+ 
++#if FUSE_MAJOR_VERSION < 3
++static int cache_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
++                       off_t offset, struct fuse_file_info *fi)
++#else
+ static int cache_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
+                        off_t offset, struct fuse_file_info *fi,
+                        enum fuse_readdir_flags flags)
++#endif
+ {
+       struct readdir_handle ch;
+       struct file_handle *cfi;
+@@ -373,7 +402,11 @@ static int cache_readdir(const char *pat
+               if (node->dir_valid - now >= 0) {
+                       for(dir = node->dir; *dir != NULL; dir++)
+                               // FIXME: What about st_mode?
++#if FUSE_MAJOR_VERSION < 3
++                              filler(buf, *dir, NULL, 0);
++#else
+                               filler(buf, *dir, NULL, 0, 0);
++#endif
+                       pthread_mutex_unlock(&cache.lock);
+                       return 0;
+               }
+@@ -398,7 +431,19 @@ static int cache_readdir(const char *pat
+       ch.filler = filler;
+       ch.dir = g_ptr_array_new();
+       ch.wrctr = cache_get_write_ctr();
++#if FUSE_MAJOR_VERSION < 3
++      err = cache.next_oper->readdir(path, &ch, cache_dirfill, offset, fi);
++#else
+       err = cache.next_oper->readdir(path, &ch, cache_dirfill, offset, fi, flags);
++#endif
++      /* fi->fh is set to an underlying file handle at this
++       * point. We must set it back to the cache file_handle or
++       * otherwise cache_releasedir() will dereference a wrong
++       * pointer. I believe this is an upstream bug but have no idea
++       * why it works on Linux. FUSE doesn't call releasedir()
++       * perhaps? */
++      fi->fh = (unsigned long) cfi;
++
+       g_ptr_array_add(ch.dir, NULL);
+       dir = (char **) ch.dir->pdata;
+       if (!err) {
+@@ -451,6 +496,15 @@ static int cache_symlink(const char *fro
+       return err;
+ }
+ 
++#if FUSE_MAJOR_VERSION < 3
++static int cache_rename(const char *from, const char *to)
++{
++      int err = cache.next_oper->rename(from, to);
++      if (!err)
++              cache_do_rename(from, to);
++      return err;
++}
++#else
+ static int cache_rename(const char *from, const char *to, unsigned int flags)
+ {
+       int err = cache.next_oper->rename(from, to, flags);
+@@ -458,6 +512,7 @@ static int cache_rename(const char *from
+               cache_do_rename(from, to);
+       return err;
+ }
++#endif
+ 
+ static int cache_link(const char *from, const char *to)
+ {
+@@ -469,6 +524,15 @@ static int cache_link(const char *from, 
+       return err;
+ }
+ 
++#if FUSE_MAJOR_VERSION < 3
++static int cache_chmod(const char *path, mode_t mode)
++{
++      int err = cache.next_oper->chmod(path, mode);
++      if (!err)
++              cache_invalidate(path);
++      return err;
++}
++#else
+ static int cache_chmod(const char *path, mode_t mode,
+                        struct fuse_file_info *fi)
+ {
+@@ -477,7 +541,17 @@ static int cache_chmod(const char *path,
+               cache_invalidate(path);
+       return err;
+ }
++#endif
+ 
++#if FUSE_MAJOR_VERSION < 3
++static int cache_chown(const char *path, uid_t uid, gid_t gid)
++{
++      int err = cache.next_oper->chown(path, uid, gid);
++      if (!err)
++              cache_invalidate(path);
++      return err;
++}
++#else
+ static int cache_chown(const char *path, uid_t uid, gid_t gid,
+                        struct fuse_file_info *fi)
+ {
+@@ -486,7 +560,17 @@ static int cache_chown(const char *path,
+               cache_invalidate(path);
+       return err;
+ }
++#endif
+ 
++#if FUSE_MAJOR_VERSION < 3
++static int cache_utimens(const char *path, const struct timespec tv[2])
++{
++      int err = cache.next_oper->utimens(path, tv);
++      if (!err)
++              cache_invalidate(path);
++      return err;
++}
++#else
+ static int cache_utimens(const char *path, const struct timespec tv[2],
+                        struct fuse_file_info *fi)
+ {
+@@ -495,6 +579,7 @@ static int cache_utimens(const char *pat
+               cache_invalidate(path);
+       return err;
+ }
++#endif
+ 
+ static int cache_write(const char *path, const char *buf, size_t size,
+                        off_t offset, struct fuse_file_info *fi)
+@@ -514,6 +599,15 @@ static int cache_create(const char *path
+       return err;
+ }
+ 
++#if FUSE_MAJOR_VERSION < 3
++static int cache_truncate(const char *path, off_t size)
++{
++      int err = cache.next_oper->truncate(path, size);
++      if (!err)
++              cache_invalidate(path);
++      return err;
++}
++#else
+ static int cache_truncate(const char *path, off_t size,
+                         struct fuse_file_info *fi)
+ {
+@@ -522,6 +616,7 @@ static int cache_truncate(const char *pa
+               cache_invalidate(path);
+       return err;
+ }
++#endif
+ 
+ static void cache_fill(struct fuse_operations *oper,
+                      struct fuse_operations *cache_oper)
diff -r bc2e66367fb2 -r 7c9b1b201044 filesystems/fuse-sshfs/patches/patch-meson.build
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-sshfs/patches/patch-meson.build  Thu Dec 02 07:28:40 2021 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-meson.build,v 1.1 2021/12/02 07:28:40 pho Exp $
+
+Impedance adjustment with librefuse. Never send this to the
+upstream. It's our code that needs to be fixed, not theirs!
+



Home | Main Index | Thread Index | Old Index