pkgsrc-Changes archive

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

CVS commit: pkgsrc/filesystems/fuse-sshfs



Module Name:    pkgsrc
Committed By:   vins
Date:           Sun May 10 12:30:36 UTC 2026

Modified Files:
        pkgsrc/filesystems/fuse-sshfs: Makefile distinfo
        pkgsrc/filesystems/fuse-sshfs/patches: patch-cache.c patch-sshfs.c

Log Message:
fuse-sshfs: fix build on Linux


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/filesystems/fuse-sshfs/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/filesystems/fuse-sshfs/distinfo
cvs rdiff -u -r1.3 -r1.4 pkgsrc/filesystems/fuse-sshfs/patches/patch-cache.c
cvs rdiff -u -r1.4 -r1.5 pkgsrc/filesystems/fuse-sshfs/patches/patch-sshfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/filesystems/fuse-sshfs/Makefile
diff -u pkgsrc/filesystems/fuse-sshfs/Makefile:1.15 pkgsrc/filesystems/fuse-sshfs/Makefile:1.16
--- pkgsrc/filesystems/fuse-sshfs/Makefile:1.15 Sun May 10 11:40:18 2026
+++ pkgsrc/filesystems/fuse-sshfs/Makefile      Sun May 10 12:30:36 2026
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.15 2026/05/10 11:40:18 vins Exp $
+# $NetBSD: Makefile,v 1.16 2026/05/10 12:30:36 vins Exp $
 
 DISTNAME=              sshfs-3.7.5
 PKGNAME=               fuse-${DISTNAME}
+PKGREVISION=           1
 CATEGORIES=            filesystems
 MASTER_SITES=          ${MASTER_SITE_GITHUB:=libfuse/}
 GITHUB_PROJECT=                sshfs
@@ -21,16 +22,16 @@ USE_LANGUAGES=      c
 USE_TOOLS=     pkg-config
 USE_FUSE3=     yes
 
-.if !empty(LP32PLATFORMS:@.PLAT.@${MACHINE_PLATFORM:M${.PLAT.}}@)
-CFLAGS+=       -D_FILE_OFFSET_BITS=64
-.endif
+TOOL_DEPENDS+=  ${PYPKGPREFIX}-docutils-[0-9]*:../../textproc/py-docutils
 
-PYTHON_FOR_BUILD_ONLY=         tool
-PYTHON_VERSIONS_INCOMPATIBLE=  27
+PYTHON_FOR_BUILD_ONLY=          tool
+PYTHON_VERSIONS_INCOMPATIBLE=   27
 
-.include "../../lang/python/pyversion.mk"
+.include "../../mk/bsd.prefs.mk"
 
-TOOL_DEPENDS+= ${PYPKGPREFIX}-docutils-[0-9]*:../../textproc/py-docutils
+.if !empty(LP32PLATFORMS:@.PLAT.@${MACHINE_PLATFORM:M${.PLAT.}}@)
+CFLAGS+=       -D_FILE_OFFSET_BITS=64
+.endif
 
 SUBST_CLASSES+=                rst2man
 SUBST_STAGE.rst2man=   pre-configure
@@ -39,5 +40,6 @@ SUBST_SED.rst2man+=   -e "s,rst2man.py,rst
 
 .include "../../devel/glib2/buildlink3.mk"
 .include "../../devel/meson/build.mk"
+.include "../../lang/python/pyversion.mk"
 .include "../../mk/fuse.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/filesystems/fuse-sshfs/distinfo
diff -u pkgsrc/filesystems/fuse-sshfs/distinfo:1.11 pkgsrc/filesystems/fuse-sshfs/distinfo:1.12
--- pkgsrc/filesystems/fuse-sshfs/distinfo:1.11 Sun May 10 11:40:18 2026
+++ pkgsrc/filesystems/fuse-sshfs/distinfo      Sun May 10 12:30:36 2026
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.11 2026/05/10 11:40:18 vins Exp $
+$NetBSD: distinfo,v 1.12 2026/05/10 12:30:36 vins Exp $
 
 BLAKE2s (sshfs-3.7.5.tar.xz) = 19b267c097fd5a432750959897388d9fe73e3b75895cab19584d2b597a1339d5
 SHA512 (sshfs-3.7.5.tar.xz) = c76d8d725c4f8ef8b95c699ae25407fd6789cd5ce94b36d241a6754e4e6d8cae9729bbe9b1e21e421f6148bf822c9441cf6626206ec7540e7b26d298e2616929
 Size (sshfs-3.7.5.tar.xz) = 51604 bytes
-SHA1 (patch-cache.c) = ecefe5035df00e0da6b381515d56eb7cd8c1e3ae
+SHA1 (patch-cache.c) = e87ac78e44edb274522e8e7abc8b51dd9695d17b
 SHA1 (patch-meson.build) = 2d10515de44239d6fad0fd5f512140d86f4dff7a
-SHA1 (patch-sshfs.c) = 0b324faef95d828ae145765635e89231f1321c7d
+SHA1 (patch-sshfs.c) = 395b6736ed6fdc2f63ddf38f9be27e7b1ddd7fe9
 SHA1 (patch-utils_install__helper.sh) = 7e31f031ecf40731acb4a96b0c23543b7015c290

Index: pkgsrc/filesystems/fuse-sshfs/patches/patch-cache.c
diff -u pkgsrc/filesystems/fuse-sshfs/patches/patch-cache.c:1.3 pkgsrc/filesystems/fuse-sshfs/patches/patch-cache.c:1.4
--- pkgsrc/filesystems/fuse-sshfs/patches/patch-cache.c:1.3     Sun May 10 11:40:18 2026
+++ pkgsrc/filesystems/fuse-sshfs/patches/patch-cache.c Sun May 10 12:30:36 2026
@@ -1,4 +1,4 @@
-$NetBSD: patch-cache.c,v 1.3 2026/05/10 11:40:18 vins Exp $
+$NetBSD: patch-cache.c,v 1.4 2026/05/10 12:30:36 vins Exp $
 
 Impedance adjustment with librefuse which used to provide an old API
 incompatible with FUSE 3.1. This patch can go away when NetBSD 9
@@ -6,7 +6,25 @@ reaches its EOL, except for one thing (s
 
 --- cache.c.orig       2025-11-11 19:46:43.000000000 +0000
 +++ cache.c
-@@ -269,6 +269,12 @@ uint64_t cache_get_write_ctr(void)
+@@ -21,6 +21,17 @@
+ #define DEFAULT_CACHE_CLEAN_INTERVAL_SECS 60
+ #define DEFAULT_MIN_CACHE_CLEAN_INTERVAL_SECS 5
+ 
++/*
++ ReFuse sets FUSE_H_ to a numerical value, while libfuse leaves it empty.
++ This workaround is only required as long as the patches for NetBSD-9
++ stay in place.
++*/
++
++#if !(FUSE_H_ + 0)
++#  undef  FUSE_H_
++#  define FUSE_H_ 1
++#endif
++
+ struct cache {
+       int on;
+       unsigned int stat_timeout_secs;
+@@ -269,6 +280,12 @@ uint64_t cache_get_write_ctr(void)
        return res;
  }
  
@@ -19,7 +37,7 @@ reaches its EOL, except for one thing (s
  static void *cache_init(struct fuse_conn_info *conn,
                          struct fuse_config *cfg)
  {
-@@ -280,14 +286,23 @@ static void *cache_init(struct fuse_conn
+@@ -280,14 +297,23 @@ static void *cache_init(struct fuse_conn
  
        return res;
  }
@@ -43,7 +61,7 @@ reaches its EOL, except for one thing (s
                if (!err)
                        cache_add_attr(path, stbuf, wrctr);
        }
-@@ -349,15 +364,24 @@ static int cache_releasedir(const char *
+@@ -349,15 +375,24 @@ static int cache_releasedir(const char *
        return err;
  }
  
@@ -68,7 +86,7 @@ reaches its EOL, except for one thing (s
        if (!err) {
                struct cache_dirent *cdent = g_malloc(sizeof(struct cache_dirent));
                cdent->name = g_strdup(name);
-@@ -375,9 +399,14 @@ static int cache_dirfill (void *buf, con
+@@ -375,9 +410,14 @@ static int cache_dirfill (void *buf, con
        return err;
  }
  
@@ -83,7 +101,7 @@ reaches its EOL, except for one thing (s
  {
        struct readdir_handle ch;
        struct file_handle *cfi;
-@@ -394,7 +423,11 @@ static int cache_readdir(const char *pat
+@@ -394,7 +434,11 @@ static int cache_readdir(const char *pat
                time_t now = time(NULL);
                if (node->dir_valid - now >= 0) {
                        for(cdent = (struct cache_dirent**)node->dir->pdata; *cdent != NULL; cdent++) {
@@ -95,7 +113,7 @@ reaches its EOL, except for one thing (s
        }
                        pthread_mutex_unlock(&cache.lock);
                        return 0;
-@@ -421,7 +454,19 @@ static int cache_readdir(const char *pat
+@@ -421,7 +465,19 @@ static int cache_readdir(const char *pat
        ch.dir = g_ptr_array_new();
        g_ptr_array_set_free_func(ch.dir, free_cache_dirent);
        ch.wrctr = cache_get_write_ctr();
@@ -115,7 +133,7 @@ reaches its EOL, except for one thing (s
        g_ptr_array_add(ch.dir, NULL);
        dir = ch.dir;
        if (!err) {
-@@ -473,6 +518,15 @@ static int cache_symlink(const char *fro
+@@ -473,6 +529,15 @@ static int cache_symlink(const char *fro
        return err;
  }
  
@@ -131,7 +149,7 @@ reaches its EOL, except for one thing (s
  static int cache_rename(const char *from, const char *to, unsigned int flags)
  {
        int err = cache.next_oper->rename(from, to, flags);
-@@ -480,6 +534,7 @@ static int cache_rename(const char *from
+@@ -480,6 +545,7 @@ static int cache_rename(const char *from
                cache_do_rename(from, to);
        return err;
  }
@@ -139,7 +157,7 @@ reaches its EOL, except for one thing (s
  
  static int cache_link(const char *from, const char *to)
  {
-@@ -491,6 +546,15 @@ static int cache_link(const char *from, 
+@@ -491,6 +557,15 @@ static int cache_link(const char *from,
        return err;
  }
  
@@ -155,7 +173,7 @@ reaches its EOL, except for one thing (s
  static int cache_chmod(const char *path, mode_t mode,
                         struct fuse_file_info *fi)
  {
-@@ -499,7 +563,17 @@ static int cache_chmod(const char *path,
+@@ -499,7 +574,17 @@ static int cache_chmod(const char *path,
                cache_invalidate(path);
        return err;
  }
@@ -173,7 +191,7 @@ reaches its EOL, except for one thing (s
  static int cache_chown(const char *path, uid_t uid, gid_t gid,
                         struct fuse_file_info *fi)
  {
-@@ -508,7 +582,17 @@ static int cache_chown(const char *path,
+@@ -508,7 +593,17 @@ static int cache_chown(const char *path,
                cache_invalidate(path);
        return err;
  }
@@ -191,7 +209,7 @@ reaches its EOL, except for one thing (s
  static int cache_utimens(const char *path, const struct timespec tv[2],
                         struct fuse_file_info *fi)
  {
-@@ -517,6 +601,7 @@ static int cache_utimens(const char *pat
+@@ -517,6 +612,7 @@ static int cache_utimens(const char *pat
                cache_invalidate(path);
        return err;
  }
@@ -199,7 +217,7 @@ reaches its EOL, except for one thing (s
  
  static int cache_write(const char *path, const char *buf, size_t size,
                         off_t offset, struct fuse_file_info *fi)
-@@ -536,6 +621,15 @@ static int cache_create(const char *path
+@@ -536,6 +632,15 @@ static int cache_create(const char *path
        return err;
  }
  
@@ -215,7 +233,7 @@ reaches its EOL, except for one thing (s
  static int cache_truncate(const char *path, off_t size,
                          struct fuse_file_info *fi)
  {
-@@ -544,6 +638,7 @@ static int cache_truncate(const char *pa
+@@ -544,6 +649,7 @@ static int cache_truncate(const char *pa
                cache_invalidate(path);
        return err;
  }

Index: pkgsrc/filesystems/fuse-sshfs/patches/patch-sshfs.c
diff -u pkgsrc/filesystems/fuse-sshfs/patches/patch-sshfs.c:1.4 pkgsrc/filesystems/fuse-sshfs/patches/patch-sshfs.c:1.5
--- pkgsrc/filesystems/fuse-sshfs/patches/patch-sshfs.c:1.4     Sun May 10 11:40:18 2026
+++ pkgsrc/filesystems/fuse-sshfs/patches/patch-sshfs.c Sun May 10 12:30:36 2026
@@ -1,4 +1,4 @@
-$NetBSD: patch-sshfs.c,v 1.4 2026/05/10 11:40:18 vins Exp $
+$NetBSD: patch-sshfs.c,v 1.5 2026/05/10 12:30:36 vins Exp $
 
 * Impedance adjustment with librefuse which used to provide an old API
   incompatible with FUSE 3.1. This patch can go away when NetBSD 9
@@ -7,7 +7,25 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
 
 --- sshfs.c.orig       2025-11-11 19:46:43.000000000 +0000
 +++ sshfs.c
-@@ -982,7 +982,11 @@ static int buf_get_entries(struct buffer
+@@ -53,6 +53,17 @@
+ 
+ #include "cache.h"
+ 
++/*
++ ReFuse sets FUSE_H_ to a numerical value, while libfuse leaves it empty.
++ This workaround is only required as long as the patches for NetBSD-9 
++ stay in place.
++*/
++
++#if !(FUSE_H_ + 0)
++#  undef  FUSE_H_
++#  define FUSE_H_ 1
++#endif
++
+ #ifndef MAP_LOCKED
+ #  define MAP_LOCKED 0
+ #endif
+@@ -982,7 +993,11 @@ static int buf_get_entries(struct buffer
                                    S_ISLNK(stbuf.st_mode)) {
                                        stbuf.st_mode = 0;
                                }
@@ -19,7 +37,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
                        }
                }
                free(name);
-@@ -1110,7 +1114,7 @@ static int pty_master(char **name)
+@@ -1110,7 +1125,7 @@ static int pty_master(char **name)
  {
        int mfd;
  
@@ -28,7 +46,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
        if (mfd == -1) {
                perror("failed to open pty");
                return -1;
-@@ -1953,6 +1957,21 @@ static int start_processing_thread(struc
+@@ -1953,6 +1968,21 @@ static int start_processing_thread(struc
        return 0;
  }
  
@@ -50,7 +68,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
  static void *sshfs_init(struct fuse_conn_info *conn,
                          struct fuse_config *cfg)
  {
-@@ -1978,6 +1997,7 @@ static void *sshfs_init(struct fuse_conn
+@@ -1978,6 +2008,7 @@ static void *sshfs_init(struct fuse_conn
  
        return NULL;
  }
@@ -58,7 +76,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
  
  static int sftp_request_wait(struct request *req, uint8_t type,
                               uint8_t expect_type, struct buffer *outbuf)
-@@ -2138,7 +2158,11 @@ static int sshfs_access(const char *path
+@@ -2138,7 +2169,11 @@ static int sshfs_access(const char *path
        int err = 0;
  
        if (mask & X_OK) {
@@ -70,7 +88,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
                if (!err) {
                        if (S_ISREG(stbuf.st_mode) &&
                            !(stbuf.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)))
-@@ -2392,11 +2416,15 @@ static int sshfs_opendir(const char *pat
+@@ -2392,11 +2427,15 @@ static int sshfs_opendir(const char *pat
        return err;
  }
  
@@ -89,7 +107,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
        int err;
        struct dir_handle *handle;
  
-@@ -2560,13 +2588,19 @@ static void random_string(char *str, int
+@@ -2560,13 +2599,19 @@ static void random_string(char *str, int
        *str = '\0';
  }
  
@@ -109,7 +127,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
  
        if (sshfs.ext_posix_rename)
                err = sshfs_ext_posix_rename(from, to);
-@@ -2641,19 +2675,24 @@ static inline struct sshfs_file *get_ssh
+@@ -2641,19 +2686,24 @@ static inline struct sshfs_file *get_ssh
        return (struct sshfs_file *) (uintptr_t) fi->fh;
  }
  
@@ -135,7 +153,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
  
        buf_init(&buf, 0);
        if (sf == NULL)
-@@ -2674,19 +2713,24 @@ static int sshfs_chmod(const char *path,
+@@ -2674,19 +2724,24 @@ static int sshfs_chmod(const char *path,
        return err;
  }
  
@@ -161,7 +179,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
  
        if (sshfs.remote_uid_detected) {
                if (uid == sshfs.local_uid)
-@@ -2719,8 +2763,12 @@ static int sshfs_chown(const char *path,
+@@ -2719,8 +2774,12 @@ static int sshfs_chown(const char *path,
        return err;
  }
  
@@ -174,7 +192,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
  
  static void sshfs_inc_modifver(void)
  {
-@@ -2729,10 +2777,13 @@ static void sshfs_inc_modifver(void)
+@@ -2729,10 +2788,13 @@ static void sshfs_inc_modifver(void)
        pthread_mutex_unlock(&sshfs.lock);
  }
  
@@ -189,7 +207,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
        int err;
        struct buffer buf;
        struct sshfs_file *sf = NULL;
-@@ -2745,11 +2796,13 @@ static int sshfs_utimens(const char *pat
+@@ -2745,11 +2807,13 @@ static int sshfs_utimens(const char *pat
        if (msec == 0)
                msec = now.tv_sec;
  
@@ -203,7 +221,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
  
        buf_init(&buf, 0);
        if (sf == NULL)
-@@ -3407,22 +3460,32 @@ static int sshfs_create(const char *path
+@@ -3407,22 +3471,32 @@ static int sshfs_create(const char *path
        return sshfs_open_common(path, mode, fi);
  }
  
@@ -236,7 +254,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
  
        buf_init(&buf, 0);
  
-@@ -3441,19 +3504,37 @@ static int sshfs_truncate(const char *pa
+@@ -3441,19 +3515,37 @@ static int sshfs_truncate(const char *pa
        return err;
  }
  
@@ -274,7 +292,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
  
        buf_init(&buf, 0);
        if(sf == NULL) {
-@@ -3577,15 +3658,23 @@ static int sshfs_truncate_extend(const c
+@@ -3577,15 +3669,23 @@ static int sshfs_truncate_extend(const c
   * If new size is greater than current size, then write a zero byte to
   * the new end of the file.
   */
@@ -298,7 +316,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
                if (err)
                        return err;
                if (stbuf.st_size == size)
-@@ -3593,7 +3682,11 @@ static int sshfs_truncate_workaround(con
+@@ -3593,7 +3693,11 @@ static int sshfs_truncate_workaround(con
                else if (stbuf.st_size > size)
                        return sshfs_truncate_shrink(path, size);
                else
@@ -310,7 +328,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
        }
  }
  
-@@ -4236,7 +4329,9 @@ int main(int argc, char *argv[])
+@@ -4236,7 +4340,9 @@ int main(int argc, char *argv[])
        char *fsname;
        const char *sftp_server;
        struct fuse *fuse;
@@ -320,7 +338,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
        int i;
  
  #ifdef __APPLE__
-@@ -4296,7 +4391,11 @@ int main(int argc, char *argv[])
+@@ -4296,7 +4402,11 @@ int main(int argc, char *argv[])
  
        if (sshfs.show_version) {
                printf("SSHFS version %s\n", PACKAGE_VERSION);
@@ -332,7 +350,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
  #if !defined(__CYGWIN__)
                fuse_lowlevel_version();
  #endif
-@@ -4305,7 +4404,11 @@ int main(int argc, char *argv[])
+@@ -4305,7 +4415,11 @@ int main(int argc, char *argv[])
  
        if (sshfs.show_help) {
                usage(args.argv[0]);
@@ -344,7 +362,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
                exit(0);
        } else if (!sshfs.host) {
                fprintf(stderr, "missing host\n");
-@@ -4439,20 +4542,16 @@ int main(int argc, char *argv[])
+@@ -4439,20 +4553,16 @@ int main(int argc, char *argv[])
                        sizeof(struct fuse_operations), NULL);
        if(fuse == NULL)
                exit(1);
@@ -368,7 +386,7 @@ $NetBSD: patch-sshfs.c,v 1.4 2026/05/10 
        res = fcntl(fuse_session_fd(se), F_SETFD, FD_CLOEXEC);
        if (res == -1)
                perror("WARNING: failed to set FD_CLOEXEC on fuse device");
-@@ -4464,29 +4563,58 @@ int main(int argc, char *argv[])
+@@ -4464,29 +4574,58 @@ int main(int argc, char *argv[])
         */
        res = ssh_connect();
        if (res == -1) {



Home | Main Index | Thread Index | Old Index