pkgsrc-WIP-changes archive

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

megacmd: add fstype to BSDs



Module Name:	pkgsrc-wip
Committed By:	kikadf <kikadf.01%gmail.com@localhost>
Pushed By:	kikadf
Date:		Fri Apr 18 11:50:54 2025 +0200
Changeset:	1d4bddd3844ec7f23e0483dc174e1683866aa4ca

Modified Files:
	megacmd/TODO
	megacmd/distinfo
	megacmd/patches/patch-sdk_src_posix_fs.cpp
Added Files:
	megacmd/patches/patch-sdk_include_mega_filesystem.h
	megacmd/patches/patch-sdk_src_filesystem.cpp

Log Message:
megacmd: add fstype to BSDs

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=1d4bddd3844ec7f23e0483dc174e1683866aa4ca

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

diffstat:
 megacmd/TODO                                       | 51 ++++++++++++++++++++--
 megacmd/distinfo                                   |  4 +-
 .../patches/patch-sdk_include_mega_filesystem.h    | 17 ++++++++
 megacmd/patches/patch-sdk_src_filesystem.cpp       | 42 ++++++++++++++++++
 megacmd/patches/patch-sdk_src_posix_fs.cpp         | 37 ++++++++++++++++
 5 files changed, 146 insertions(+), 5 deletions(-)

diffs:
diff --git a/megacmd/TODO b/megacmd/TODO
index 6bb1277319..8562aa5f65 100644
--- a/megacmd/TODO
+++ b/megacmd/TODO
@@ -1,4 +1,47 @@
-/usr/pkgsrc/wip/megacmd/work/MEGAcmd-2.1.1_Linux/sdk/src/posix/fs.cpp: In member function 'virtual bool mega::PosixFileSystemAccess::getlocalfstype(const mega::LocalPath&, mega::FileSystemType&) const':
-/usr/pkgsrc/wip/megacmd/work/MEGAcmd-2.1.1_Linux/sdk/src/posix/fs.cpp:2485:61: warning: unused parameter 'path' [-Wunused-parameter]
- 2485 | bool PosixFileSystemAccess::getlocalfstype(const LocalPath& path, FileSystemType& type) const
-      |                                            ~~~~~~~~~~~~~~~~~^~~~
+Not detect changes with inotify, so sync unusable.
+
+libinotify:
+Running test suite...
+..............................................x....................xx..............x...........................x........x.................!......x......x.....................!.x.!....!....!...!.x!.........................x.......!....!.!!!.!.!.....x..........
+
+In test "Directory notifications":
+    failed: receive IN_ACCESS event on reading of directory contents
+   skipped: receive IN_MOVED_FROM event on moving file from directory to another location within the same mount point (parent NOTE_EXTEND kqueue event missed on rename)
+    failed: receive IN_ACCESS with IN_ISDIR on reading of subdirectory contents
+    failed: receive IN_ACCESS event on reading of directory contents
+   skipped: receive IN_MOVED_FROM event on moving file from directory to another location within the same mount point (parent NOTE_EXTEND kqueue event missed on rename)
+    failed: receive IN_ACCESS with IN_ISDIR on reading of subdirectory contents
+
+In test "Update watch flags":
+    failed: receive notifications on modify with flags = IN_ATTRIB | IN_MODIFY
+    failed: receive notifications on modify after watch with IN_MODIFY flag set has been updated with IN_MASK_ADD set and IN_MODIFY unset
+    failed: receive notifications on modify with flags = IN_ATTRIB | IN_MODIFY
+    failed: receive notifications on modify after watch with IN_MODIFY flag set has been updated with IN_MASK_ADD set and IN_MODIFY unset
+
+In test "Update directory flags":
+    failed: receive modify notifications for files in a directory with IN_MODIFY
+    failed: receive modify notifications for files in a directory with IN_MODIFY
+
+In test "Symbolic links":
+   skipped: Start watch successfully on a symlink file with IN_DONT_FOLLOW (O_SYMLINK open() flag missed)
+   skipped: Receive IN_ATTRIB after touching symlink itself (O_SYMLINK open() flag missed)
+   skipped: No IN_MODIFY after modifying symlink source file (O_SYMLINK open() flag missed)
+   skipped: No IN_MODIFY after modifying file via symlink (O_SYMLINK open() flag missed)
+   skipped: Receive IN_MOVE_SELF after moving the symlink (O_SYMLINK open() flag missed)
+   skipped: Receive IN_DELETE_SELF after removing the symlink (O_SYMLINK open() flag missed)
+   skipped: Start watch successfully on a symlink file with IN_DONT_FOLLOW (O_SYMLINK open() flag missed)
+   skipped: Receive IN_ATTRIB after touching symlink itself (O_SYMLINK open() flag missed)
+   skipped: No IN_MODIFY after modifying symlink source file (O_SYMLINK open() flag missed)
+   skipped: No IN_MODIFY after modifying file via symlink (O_SYMLINK open() flag missed)
+   skipped: Receive IN_MOVE_SELF after moving the symlink (O_SYMLINK open() flag missed)
+   skipped: Receive IN_DELETE_SELF after removing the symlink (O_SYMLINK open() flag missed)
+
+In test "Bugfix tests":
+    failed: receive IN_ATTRIB for bugst-workdir/1 on hardlink delete
+    failed: receive IN_ATTRIB for bugst-workdir/1 on hardlink delete
+
+--------------------
+     Run: 259
+  Passed: 233
+  Failed: 12
+ Skipped: 14
diff --git a/megacmd/distinfo b/megacmd/distinfo
index c668e8ff16..31e2474779 100644
--- a/megacmd/distinfo
+++ b/megacmd/distinfo
@@ -10,8 +10,10 @@ SHA1 (patch-CMakeLists.txt) = f8936fbcd4200139fec6ada0bad5644ddb54145b
 SHA1 (patch-build_cmake_modules_megacmd__libraries.cmake) = afabd22177c0437fbe1d13fdf6601832bc60cd96
 SHA1 (patch-sdk_cmake_modules_sdklib__libraries.cmake) = 67c919b57515659075ea43e26e349d9a94180a8c
 SHA1 (patch-sdk_cmake_modules_sdklib__target.cmake) = 33f5b16dc561e37f076c60fa537a4c5b8d8c992e
+SHA1 (patch-sdk_include_mega_filesystem.h) = 287ac85c9ac80a96b49269983ff67c5ee5cb4a11
 SHA1 (patch-sdk_include_mega_posix_megafs.h) = b266e3a568925df3227387e16e1cb9f6670d9b4a
-SHA1 (patch-sdk_src_posix_fs.cpp) = 94a4d050f11e60e088b55603e9e9a9365f078a83
+SHA1 (patch-sdk_src_filesystem.cpp) = 3890ea10a66cd2a99925af57b0a3558c617cd6e3
+SHA1 (patch-sdk_src_posix_fs.cpp) = e537a61f9c97408d2192b7d602329d2b6ac8fb1d
 SHA1 (patch-src_megacmdcommonutils.cpp) = 6128e295e1a816ad4d7ea1ec59fa963391eb3bfb
 SHA1 (patch-src_megacmdcommonutils.h) = 194d991a02e8e48c9c31c60384549c276e4ee735
 SHA1 (patch-src_megacmdshell_megacmdshellcommunications.cpp) = ff794d128ffa6e0626296a504b22f391e0fc923b
diff --git a/megacmd/patches/patch-sdk_include_mega_filesystem.h b/megacmd/patches/patch-sdk_include_mega_filesystem.h
new file mode 100644
index 0000000000..b15285f235
--- /dev/null
+++ b/megacmd/patches/patch-sdk_include_mega_filesystem.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Add BSD supported filesystems
+
+--- sdk/include/mega/filesystem.h.orig	2025-04-17 16:17:57.087434545 +0200
++++ sdk/include/mega/filesystem.h
+@@ -51,6 +51,10 @@ enum FileSystemType
+     FS_SMB = 12,
+     FS_SMB2 = 13,
+     FS_LIFS = 14,
++    FS_FFS = 15,
++    FS_HAMMER = 16,
++    FS_UFS = 17,
++    FS_ZFS = 18,
+ };
+ 
+ typedef void (*asyncfscallback)(void *);
diff --git a/megacmd/patches/patch-sdk_src_filesystem.cpp b/megacmd/patches/patch-sdk_src_filesystem.cpp
new file mode 100644
index 0000000000..e633f76f36
--- /dev/null
+++ b/megacmd/patches/patch-sdk_src_filesystem.cpp
@@ -0,0 +1,42 @@
+$NetBSD$
+
+* Add BSD supported filesystems
+
+--- sdk/src/filesystem.cpp.orig	2025-04-17 16:07:37.374980956 +0200
++++ sdk/src/filesystem.cpp
+@@ -785,8 +785,12 @@ const char *FileSystemAccess::fstypetost
+             return "EXFAT";
+         case FS_FAT32:
+             return "FAT32";
++        case FS_FFS:
++            return "FFS";
+         case FS_EXT:
+             return "EXT";
++        case FS_HAMMER :
++            return "HAMMER";
+         case FS_HFS:
+             return "HFS";
+         case FS_APFS:
+@@ -809,6 +813,10 @@ const char *FileSystemAccess::fstypetost
+             return "SMB2";
+         case FS_LIFS:
+             return "LIFS";
++        case FS_UFS:
++            return "UFS";
++        case FS_ZFS:
++            return "ZFS";
+         case FS_UNKNOWN:    // fall through
+             return "UNKNOWN FS";
+     }
+@@ -884,7 +892,11 @@ bool FileSystemAccess::islocalfscompatib
+     case FS_APFS:
+     case FS_EXT:
+     case FS_F2FS:
++    case FS_FFS:
++    case FS_HAMMER:
++    case FS_UFS:
+     case FS_XFS:
++    case FS_ZFS:
+         return character != '/';
+     case FS_EXFAT:
+     case FS_FAT32:
diff --git a/megacmd/patches/patch-sdk_src_posix_fs.cpp b/megacmd/patches/patch-sdk_src_posix_fs.cpp
index 993b3ca221..8e2ba76c29 100644
--- a/megacmd/patches/patch-sdk_src_posix_fs.cpp
+++ b/megacmd/patches/patch-sdk_src_posix_fs.cpp
@@ -126,3 +126,40 @@ $NetBSD: patch-sdk_src_posix_fs.cpp,v 1.3 2025/02/15 07:40:14 wiz Exp $
  #ifdef ENABLE_SYNC
  DirNotify* LinuxFileSystemAccess::newdirnotify(LocalNode& root,
      const LocalPath& rootPath,
+@@ -2526,18 +2540,26 @@ bool PosixFileSystemAccess::getlocalfsty
+     }
+ #endif /* __linux__ || __ANDROID__ */
+ 
+-#if defined(__APPLE__) || defined(USE_IOS)
++#if defined(__APPLE__) || defined(USE_IOS) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
++    defined(__NetBSD__) || defined(__DragonFly__)
+     static const map<string, FileSystemType> filesystemTypes = {
+         {"apfs",        FS_APFS},
+         {"exfat",       FS_EXFAT},
++        {"ext2fs",      FS_EXT},
++        {"ffs",         FS_FFS},
++        {"hammer",      FS_HAMMER},
++        {"hammer2",     FS_HAMMER},
+         {"hfs",         FS_HFS},
+         {"msdos",       FS_FAT32},
++        {"msdosfs",     FS_FAT32},
+         {"nfs",         FS_NFS},
+         {"ntfs",        FS_NTFS}, // Apple NTFS
+         {"smbfs",       FS_SMB},
+         {"tuxera_ntfs", FS_NTFS}, // Tuxera NTFS for Mac
++        {"ufs",         FS_UFS},
+         {"ufsd_NTFS",   FS_NTFS},  // Paragon NTFS for Mac
+         {"lifs",        FS_LIFS},  // on macos (in Ventura at least), external USB with exFAT are reported as "lifs"
++        {"zfs",         FS_ZFS},
+     }; /* filesystemTypes */
+ 
+     struct statfs statbuf;
+@@ -2555,7 +2577,7 @@ bool PosixFileSystemAccess::getlocalfsty
+         type = FS_UNKNOWN;
+         return true;
+     }
+-#endif /* __APPLE__ || USE_IOS */
++#endif /* __APPLE__ || USE_IOS || BSDs */
+ 
+     type = FS_UNKNOWN;
+     return false;


Home | Main Index | Thread Index | Old Index