Sat Jan 22 18:32:47 2022 UTC ()
Conditionalise workarounds for old NetBSD librefuse


(pho)
diff -r1.20 -r1.21 pkgsrc/filesystems/fuse-encfs/Makefile
diff -r1.14 -r1.15 pkgsrc/filesystems/fuse-encfs/distinfo
diff -r1.3 -r1.4 pkgsrc/filesystems/fuse-encfs/patches/patch-encfs_FileUtils.cpp
diff -r1.5 -r1.6 pkgsrc/filesystems/fuse-encfs/patches/patch-encfs_main.cpp

cvs diff -r1.20 -r1.21 pkgsrc/filesystems/fuse-encfs/Makefile (expand / switch to unified diff)

--- pkgsrc/filesystems/fuse-encfs/Makefile 2021/12/01 04:45:51 1.20
+++ pkgsrc/filesystems/fuse-encfs/Makefile 2022/01/22 18:32:47 1.21
@@ -1,19 +1,20 @@ @@ -1,19 +1,20 @@
1# $NetBSD: Makefile,v 1.20 2021/12/01 04:45:51 pho Exp $ 1# $NetBSD: Makefile,v 1.21 2022/01/22 18:32:47 pho Exp $
2# 2#
3 3
4GITHUB_PROJECT= encfs 4GITHUB_PROJECT= encfs
5GITHUB_TAG= v${PKGVERSION_NOREV} 5GITHUB_TAG= v${PKGVERSION_NOREV}
6DISTNAME= encfs-1.9.5 6DISTNAME= encfs-1.9.5
 7PKGREVISION= 1
7PKGNAME= fuse-${DISTNAME} 8PKGNAME= fuse-${DISTNAME}
8CATEGORIES= filesystems 9CATEGORIES= filesystems
9MASTER_SITES= ${MASTER_SITE_GITHUB:=vgough/} 10MASTER_SITES= ${MASTER_SITE_GITHUB:=vgough/}
10 11
11MAINTAINER= pkgsrc-users@NetBSD.org 12MAINTAINER= pkgsrc-users@NetBSD.org
12HOMEPAGE= https://vgough.github.io/encfs/ 13HOMEPAGE= https://vgough.github.io/encfs/
13COMMENT= FUSE Encrypted Filesystem 14COMMENT= FUSE Encrypted Filesystem
14LICENSE= gnu-gpl-v3 15LICENSE= gnu-gpl-v3
15 16
16 17
17USE_TOOLS+= autoconf cmake pkg-config 18USE_TOOLS+= autoconf cmake pkg-config
18USE_CMAKE= yes 19USE_CMAKE= yes
19USE_LANGUAGES= c c++ 20USE_LANGUAGES= c c++

cvs diff -r1.14 -r1.15 pkgsrc/filesystems/fuse-encfs/distinfo (expand / switch to unified diff)

--- pkgsrc/filesystems/fuse-encfs/distinfo 2021/12/01 04:45:51 1.14
+++ pkgsrc/filesystems/fuse-encfs/distinfo 2022/01/22 18:32:47 1.15
@@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
1$NetBSD: distinfo,v 1.14 2021/12/01 04:45:51 pho Exp $ 1$NetBSD: distinfo,v 1.15 2022/01/22 18:32:47 pho Exp $
2 2
3BLAKE2s (encfs-1.9.5.tar.gz) = 58fea7cdf47aadffcfbf315f5881ceb77da74e07a964042d7d3a7e8587f13362 3BLAKE2s (encfs-1.9.5.tar.gz) = 58fea7cdf47aadffcfbf315f5881ceb77da74e07a964042d7d3a7e8587f13362
4SHA512 (encfs-1.9.5.tar.gz) = 036e08ca9bc13b44742aebdee49bf7029d0c6b7e59cd6dedc9a09da2af99482859f6a79eddf07e3db296edaf45aafc48fe08488840e765682e9b192dd6ae4c46 4SHA512 (encfs-1.9.5.tar.gz) = 036e08ca9bc13b44742aebdee49bf7029d0c6b7e59cd6dedc9a09da2af99482859f6a79eddf07e3db296edaf45aafc48fe08488840e765682e9b192dd6ae4c46
5Size (encfs-1.9.5.tar.gz) = 2798888 bytes 5Size (encfs-1.9.5.tar.gz) = 2798888 bytes
6SHA1 (patch-encfs_DirNode.cpp) = 960480ee442f534357e3325c5001b6056b2338a6 6SHA1 (patch-encfs_DirNode.cpp) = 960480ee442f534357e3325c5001b6056b2338a6
7SHA1 (patch-encfs_FileUtils.cpp) = 527cd0ee50139a9fc8bb126dfe818a7624dac3dd 7SHA1 (patch-encfs_FileUtils.cpp) = 05e67084abb853d8d01f6da2079994689722a343
8SHA1 (patch-encfs_main.cpp) = 8c1b9f6fa819062928171802f94aac21565c2798 8SHA1 (patch-encfs_main.cpp) = d1215725edce4b6ec766e6b96f46acb441dd4088

cvs diff -r1.3 -r1.4 pkgsrc/filesystems/fuse-encfs/patches/patch-encfs_FileUtils.cpp (expand / switch to unified diff)

--- pkgsrc/filesystems/fuse-encfs/patches/patch-encfs_FileUtils.cpp 2021/12/01 04:45:52 1.3
+++ pkgsrc/filesystems/fuse-encfs/patches/patch-encfs_FileUtils.cpp 2022/01/22 18:32:47 1.4
@@ -1,22 +1,21 @@ @@ -1,22 +1,21 @@
1$NetBSD: patch-encfs_FileUtils.cpp,v 1.3 2021/12/01 04:45:52 pho Exp $ 1$NetBSD: patch-encfs_FileUtils.cpp,v 1.4 2022/01/22 18:32:47 pho Exp $
2 2
3NetBSD ReFUSE doesn't have the fuse_unmount from FUSE 2.2 - FUSE 2.9. 3NetBSD ReFUSE didn't have the fuse_unmount from FUSE 2.2 - FUSE 2.9.
4Workaround by using the version belonging to FUSE >= 3.0. 4Workaround by using the version belonging to FUSE >= 3.0.
5 5
6This might be a temporal aberration: NetBSD ReFUSE had the newer FUSE 6Already fixed in HEAD.
7API before upstream FUSE did. 
8 7
9--- encfs/FileUtils.cpp.orig 2018-04-27 08:52:22.000000000 +0000 8--- encfs/FileUtils.cpp.orig 2018-04-27 08:52:22.000000000 +0000
10+++ encfs/FileUtils.cpp 9+++ encfs/FileUtils.cpp
11@@ -1734,7 +1734,11 @@ RootPtr initFS(EncFS_Context *ctx, const 10@@ -1734,7 +1734,11 @@ RootPtr initFS(EncFS_Context *ctx, const
12  11
13 void unmountFS(const char *mountPoint) { 12 void unmountFS(const char *mountPoint) {
14 // fuse_unmount returns void, is assumed to succeed 13 // fuse_unmount returns void, is assumed to succeed
15+#if defined(__NetBSD__) 14+#if defined(__NetBSD__) && FUSE_H_ < 20211204
16+ fuse_unmount(fuse_get_context()->fuse); 15+ fuse_unmount(fuse_get_context()->fuse);
17+#else 16+#else
18 fuse_unmount(mountPoint, nullptr); 17 fuse_unmount(mountPoint, nullptr);
19+#endif 18+#endif
20 #ifdef __APPLE__ 19 #ifdef __APPLE__
21 // fuse_unmount does not work on Mac OS, see #428 20 // fuse_unmount does not work on Mac OS, see #428
22 // However it makes encfs to hang, so we must unmount 21 // However it makes encfs to hang, so we must unmount

cvs diff -r1.5 -r1.6 pkgsrc/filesystems/fuse-encfs/patches/patch-encfs_main.cpp (expand / switch to unified diff)

--- pkgsrc/filesystems/fuse-encfs/patches/patch-encfs_main.cpp 2021/12/01 04:45:52 1.5
+++ pkgsrc/filesystems/fuse-encfs/patches/patch-encfs_main.cpp 2022/01/22 18:32:47 1.6
@@ -1,20 +1,16 @@ @@ -1,20 +1,16 @@
1$NetBSD: patch-encfs_main.cpp,v 1.5 2021/12/01 04:45:52 pho Exp $ 1$NetBSD: patch-encfs_main.cpp,v 1.6 2022/01/22 18:32:47 pho Exp $
2 2
3Work around older FUSE API on NetBSD. 3Work around older FUSE API on NetBSD. Already fixed in HEAD.
4  
5\todo Determine how to qualify this by version. 
6\todo Enhance API in NetBSD. 
7\todo File with encfs upstream. 
8 4
9--- encfs/main.cpp.orig 2018-04-27 08:52:22.000000000 +0000 5--- encfs/main.cpp.orig 2018-04-27 08:52:22.000000000 +0000
10+++ encfs/main.cpp 6+++ encfs/main.cpp
11@@ -619,7 +619,9 @@ void *encfs_init(fuse_conn_info *conn) { 7@@ -619,7 +619,9 @@ void *encfs_init(fuse_conn_info *conn) {
12 auto *ctx = (EncFS_Context *)fuse_get_context()->private_data; 8 auto *ctx = (EncFS_Context *)fuse_get_context()->private_data;
13  9
14 // set fuse connection options 10 // set fuse connection options
15+#ifndef __NetBSD__ /* XXX FUSE API too old */ 11+#if !defined(__NetBSD__) || FUSE_H_ >= 20211204 /* XXX FUSE API too old */
16 conn->async_read = 1u; 12 conn->async_read = 1u;
17+#endif 13+#endif
18  14
19 #ifdef __CYGWIN__ 15 #ifdef __CYGWIN__
20 // WinFsp needs this to partially handle read-only FS 16 // WinFsp needs this to partially handle read-only FS