pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/net/megacmd
Module Name: pkgsrc
Committed By: wiz
Date: Fri May 16 19:43:58 UTC 2025
Modified Files:
pkgsrc/net/megacmd: Makefile PLIST distinfo
pkgsrc/net/megacmd/patches: patch-CMakeLists.txt
patch-sdk_cmake_modules_sdklib__libraries.cmake
patch-sdk_include_mega_posix_megafs.h patch-sdk_src_posix_fs.cpp
Added Files:
pkgsrc/net/megacmd/patches: patch-sdk_cmake_config.h.in
patch-sdk_include_mega_filesystem.h patch-sdk_include_mega_sync.h
patch-sdk_include_megaapi__impl.h patch-sdk_src_filesystem.cpp
Log Message:
net/megacmd: update to 2.1.1
Provided by Robert Bagdan in wip.
- Update to version 2.1.1:
* FUSE (beta): Added fuse commands on Linux to allow your MEGA folders to be directly mounted to your local drive
* Delayed sync uploads: Introduced a mechanism to delay to frequently changed sync uploads, and the sync-config command
* Logging: Messages are now printed in standard error, the rotating logger is now configurable and more verbose by default, passwords are now redacted from the logs, and other fixes and refinements
* Fixed a crash when auto-completing a local folder that doesn't exist
* Fixed the confirmcancel command incorrectly reporting failure on success
* Extended speedlimit command to allow increasing max connections
* Other fixes and improvements to enhance reliability and performance
- Use builtin megasdk-9.1.1
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/net/megacmd/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/net/megacmd/PLIST pkgsrc/net/megacmd/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/net/megacmd/patches/patch-CMakeLists.txt \
pkgsrc/net/megacmd/patches/patch-sdk_cmake_modules_sdklib__libraries.cmake
cvs rdiff -u -r0 -r1.1 pkgsrc/net/megacmd/patches/patch-sdk_cmake_config.h.in \
pkgsrc/net/megacmd/patches/patch-sdk_include_mega_filesystem.h \
pkgsrc/net/megacmd/patches/patch-sdk_include_mega_sync.h \
pkgsrc/net/megacmd/patches/patch-sdk_include_megaapi__impl.h \
pkgsrc/net/megacmd/patches/patch-sdk_src_filesystem.cpp
cvs rdiff -u -r1.2 -r1.3 \
pkgsrc/net/megacmd/patches/patch-sdk_include_mega_posix_megafs.h
cvs rdiff -u -r1.3 -r1.4 \
pkgsrc/net/megacmd/patches/patch-sdk_src_posix_fs.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/net/megacmd/Makefile
diff -u pkgsrc/net/megacmd/Makefile:1.12 pkgsrc/net/megacmd/Makefile:1.13
--- pkgsrc/net/megacmd/Makefile:1.12 Sat Apr 19 07:58:12 2025
+++ pkgsrc/net/megacmd/Makefile Fri May 16 19:43:58 2025
@@ -1,12 +1,11 @@
-# $NetBSD: Makefile,v 1.12 2025/04/19 07:58:12 wiz Exp $
+# $NetBSD: Makefile,v 1.13 2025/05/16 19:43:58 wiz Exp $
-DISTNAME= megacmd-2.0.0
-PKGREVISION= 2
+DISTNAME= megacmd-2.1.1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_GITHUB:=meganz/}
GITHUB_PROJECT= MEGAcmd
GITHUB_TAG= ${PKGVERSION_NOREV}_Linux
-SDK_VERSION= v8.3.1
+SDK_VERSION= v9.1.1
GITHUB_SUBMODULES= meganz sdk ${SDK_VERSION} sdk
@@ -32,6 +31,8 @@ CMAKE_CONFIGURE_ARGS+= -DUSE_MEDIAINFO=O
CMAKE_CONFIGURE_ARGS+= -DUSE_FREEIMAGE=OFF
CMAKE_CONFIGURE_ARGS+= -DUSE_FFMPEG=OFF
CMAKE_CONFIGURE_ARGS+= -DUSE_PDFIUM=OFF
+CMAKE_CONFIGURE_ARGS+= -DWITH_FUSE=OFF
+CMAKE_CONFIGURE_ARGS+= -DVCPKG_ROOT=""
CHECK_PORTABILITY_SKIP+= sdk/bindings/ios/3rdparty/*.sh
@@ -45,7 +46,6 @@ post-install:
.include "../../databases/sqlite3/buildlink3.mk"
.include "../../devel/cmake/build.mk"
.include "../../devel/pcre/buildlink3.mk"
-.include "../../devel/libinotify/buildlink3.mk"
.include "../../devel/libuv/buildlink3.mk"
.include "../../devel/readline/buildlink3.mk"
.include "../../net/libcares/buildlink3.mk"
Index: pkgsrc/net/megacmd/PLIST
diff -u pkgsrc/net/megacmd/PLIST:1.3 pkgsrc/net/megacmd/PLIST:1.4
--- pkgsrc/net/megacmd/PLIST:1.3 Sat Feb 15 07:40:13 2025
+++ pkgsrc/net/megacmd/PLIST Fri May 16 19:43:58 2025
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.3 2025/02/15 07:40:13 wiz Exp $
+@comment $NetBSD: PLIST,v 1.4 2025/05/16 19:43:58 wiz Exp $
bin/mega-attr
bin/mega-backup
bin/mega-cancel
@@ -19,6 +19,12 @@ bin/mega-exec
bin/mega-export
bin/mega-find
bin/mega-ftp
+bin/mega-fuse-add
+bin/mega-fuse-config
+bin/mega-fuse-disable
+bin/mega-fuse-enable
+bin/mega-fuse-remove
+bin/mega-fuse-show
bin/mega-get
bin/mega-graphics
bin/mega-help
@@ -52,6 +58,7 @@ bin/mega-showpcr
bin/mega-signup
bin/mega-speedlimit
bin/mega-sync
+bin/mega-sync-config
bin/mega-sync-ignore
bin/mega-sync-issues
bin/mega-thumbnail
Index: pkgsrc/net/megacmd/distinfo
diff -u pkgsrc/net/megacmd/distinfo:1.3 pkgsrc/net/megacmd/distinfo:1.4
--- pkgsrc/net/megacmd/distinfo:1.3 Sat Feb 15 07:40:13 2025
+++ pkgsrc/net/megacmd/distinfo Fri May 16 19:43:58 2025
@@ -1,17 +1,22 @@
-$NetBSD: distinfo,v 1.3 2025/02/15 07:40:13 wiz Exp $
+$NetBSD: distinfo,v 1.4 2025/05/16 19:43:58 wiz Exp $
-BLAKE2s (megacmd-2.0.0.tar.gz) = 46f5f94b6cb1af5dbdb8afb595608f88a14727f33c7aea46a0604fb8c3037b86
-SHA512 (megacmd-2.0.0.tar.gz) = a0ff37c33de492f0751d27f46bd83f506314f43985a247e1fe0de7683f3a8bfc059d05441816147acbda95b349b4d39e56cdac5f3893b697cda4f77efb197ce4
-Size (megacmd-2.0.0.tar.gz) = 2104772 bytes
-BLAKE2s (meganz-sdk-v8.3.1.tar.gz) = 4851001b7556d6a25f6d39e1e082e057b877cf68b55e85eba5b30486f1a0559c
-SHA512 (meganz-sdk-v8.3.1.tar.gz) = d80c7aa7a27f9f56405cd0bb5943135d6fb3590196c1a8f74b41ad3e94dc7704fe905342d6bdd431fc80e38eac74b0d8b11d8b8802b2c868931d0d11bb78f883
-Size (meganz-sdk-v8.3.1.tar.gz) = 4061833 bytes
-SHA1 (patch-CMakeLists.txt) = f8936fbcd4200139fec6ada0bad5644ddb54145b
+BLAKE2s (megacmd-2.1.1.tar.gz) = 493c50974e425b54d952dea2f066b10d8d4dec13721b52808c7cba36074eac5d
+SHA512 (megacmd-2.1.1.tar.gz) = 5b510cca8a1cc8480aa759856ca6f4af5a81967f34b05a03af66334a0004ebe295f7825b3d560d86371f71a57ab60952b3dc8b020480a47b35fee2ec781962bc
+Size (megacmd-2.1.1.tar.gz) = 2087992 bytes
+BLAKE2s (meganz-sdk-v9.1.1.tar.gz) = 3923b242bae105806d10959978ff58a0c0db9e494a1ce04bc59a5bb6cf5946cf
+SHA512 (meganz-sdk-v9.1.1.tar.gz) = bb39b0c5d35caeeed70f373fc9b94dd19b995931d4ba843f1d45a28525a4d4ab681c7d5f992f4e0eb4506a44303fcc771c4e31b216edc0b97b5692bd466b0021
+Size (meganz-sdk-v9.1.1.tar.gz) = 4151889 bytes
+SHA1 (patch-CMakeLists.txt) = 66d843860251fc55eba4e08858b0418dbc9e7fb1
SHA1 (patch-build_cmake_modules_megacmd__libraries.cmake) = afabd22177c0437fbe1d13fdf6601832bc60cd96
-SHA1 (patch-sdk_cmake_modules_sdklib__libraries.cmake) = 67c919b57515659075ea43e26e349d9a94180a8c
+SHA1 (patch-sdk_cmake_config.h.in) = 4cc3eab8be8c11571f4aab834690749335c764ec
+SHA1 (patch-sdk_cmake_modules_sdklib__libraries.cmake) = 65125e82d0921571a9ba44cfbbb816776a8fc987
SHA1 (patch-sdk_cmake_modules_sdklib__target.cmake) = 33f5b16dc561e37f076c60fa537a4c5b8d8c992e
-SHA1 (patch-sdk_include_mega_posix_megafs.h) = b266e3a568925df3227387e16e1cb9f6670d9b4a
-SHA1 (patch-sdk_src_posix_fs.cpp) = 90d71c411c8fd733b9fdef288880fb9d74d12fed
+SHA1 (patch-sdk_include_mega_filesystem.h) = 827dd8098b72ddc397790c60b1a21163a5df45a5
+SHA1 (patch-sdk_include_mega_posix_megafs.h) = a87e49a8a9d387f5325bf41df3fbd27ecd453b02
+SHA1 (patch-sdk_include_mega_sync.h) = 7b73c2619a5fbf33a4df012164876cc4dccfdb84
+SHA1 (patch-sdk_include_megaapi__impl.h) = cd5cd30d989d11d58d0030ebb7a34b3b0963d6fb
+SHA1 (patch-sdk_src_filesystem.cpp) = 3890ea10a66cd2a99925af57b0a3558c617cd6e3
+SHA1 (patch-sdk_src_posix_fs.cpp) = b8516bc9291c79e3f3903491cd19eac506413637
SHA1 (patch-src_megacmdcommonutils.cpp) = 6128e295e1a816ad4d7ea1ec59fa963391eb3bfb
SHA1 (patch-src_megacmdcommonutils.h) = 194d991a02e8e48c9c31c60384549c276e4ee735
SHA1 (patch-src_megacmdshell_megacmdshellcommunications.cpp) = ff794d128ffa6e0626296a504b22f391e0fc923b
Index: pkgsrc/net/megacmd/patches/patch-CMakeLists.txt
diff -u pkgsrc/net/megacmd/patches/patch-CMakeLists.txt:1.1 pkgsrc/net/megacmd/patches/patch-CMakeLists.txt:1.2
--- pkgsrc/net/megacmd/patches/patch-CMakeLists.txt:1.1 Sat Feb 15 07:40:13 2025
+++ pkgsrc/net/megacmd/patches/patch-CMakeLists.txt Fri May 16 19:43:58 2025
@@ -1,4 +1,4 @@
-$NetBSD: patch-CMakeLists.txt,v 1.1 2025/02/15 07:40:13 wiz Exp $
+$NetBSD: patch-CMakeLists.txt,v 1.2 2025/05/16 19:43:58 wiz Exp $
* Use system dependencies instead of vcpkg
* Fix install directories
@@ -6,17 +6,7 @@ $NetBSD: patch-CMakeLists.txt,v 1.1 2025
--- CMakeLists.txt.orig 2025-01-30 14:04:12.000000000 +0100
+++ CMakeLists.txt
-@@ -26,7 +26,8 @@ set(QT_CREATOR_SKIP_VCPKG_SETUP TRUE CAC
- list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/build/cmake/modules) # Modules from MEGAcmd
- list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/sdk/cmake/modules) # Modules from MEGAsdk
-
--set(VCPKG_ROOT "${CMAKE_CURRENT_LIST_DIR}/../vcpkg" CACHE PATH "If set, it will build and use the VCPKG packages defined in the manifest file")
-+#set(VCPKG_ROOT "${CMAKE_CURRENT_LIST_DIR}/../vcpkg" CACHE PATH "If set, it will build and use the VCPKG packages defined in the manifest file")
-+set(VCPKG_ROOT "" CACHE PATH "If set, it will build and use the VCPKG packages defined in the manifest file")
-
- include(detect_host_architecture)
-
-@@ -39,7 +40,7 @@ execute_process(
+@@ -39,7 +39,7 @@ execute_process(
)
endif()
@@ -25,7 +15,7 @@ $NetBSD: patch-CMakeLists.txt,v 1.1 2025
message(STATUS "vcpkg will be cloned into ${VCPKG_ROOT}")
execute_process(
#TODO: have the same for windows ... or at least check if bash is available
-@@ -134,8 +135,8 @@ if(UNIX AND NOT APPLE)
+@@ -134,8 +134,8 @@ if(UNIX AND NOT APPLE)
# If CMAKE_INSTALL_PREFIX is not set, it will set rpath to /opt/....
# Note: using cmake --install --prefix /some/prefix will not set rpath relative to that prefix
# The above can be used for building packages: in which install dir is a path construction folder that will not be there in packages
@@ -36,7 +26,7 @@ $NetBSD: patch-CMakeLists.txt,v 1.1 2025
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
message(STATUS "Overriding default CMAKE_INSTALL_PREFIX to /")
-@@ -457,27 +458,31 @@ elseif(NOT WIN32)
+@@ -457,27 +457,31 @@ elseif(NOT WIN32)
PATTERN "win" EXCLUDE)
install(FILES "${CMAKE_CURRENT_LIST_DIR}/src/client/megacmd_completion.sh"
Index: pkgsrc/net/megacmd/patches/patch-sdk_cmake_modules_sdklib__libraries.cmake
diff -u pkgsrc/net/megacmd/patches/patch-sdk_cmake_modules_sdklib__libraries.cmake:1.1 pkgsrc/net/megacmd/patches/patch-sdk_cmake_modules_sdklib__libraries.cmake:1.2
--- pkgsrc/net/megacmd/patches/patch-sdk_cmake_modules_sdklib__libraries.cmake:1.1 Sat Feb 15 07:40:13 2025
+++ pkgsrc/net/megacmd/patches/patch-sdk_cmake_modules_sdklib__libraries.cmake Fri May 16 19:43:58 2025
@@ -1,11 +1,10 @@
-$NetBSD: patch-sdk_cmake_modules_sdklib__libraries.cmake,v 1.1 2025/02/15 07:40:13 wiz Exp $
+$NetBSD: patch-sdk_cmake_modules_sdklib__libraries.cmake,v 1.2 2025/05/16 19:43:58 wiz Exp $
* Fix to find libcrypto++
-* Add libinotify check
---- sdk/cmake/modules/sdklib_libraries.cmake.orig 2025-01-24 13:56:57.000000000 +0100
+--- sdk/cmake/modules/sdklib_libraries.cmake.orig 2025-04-02 09:16:59.000000000 +0200
+++ sdk/cmake/modules/sdklib_libraries.cmake
-@@ -95,9 +95,12 @@ macro(load_sdklib_libraries)
+@@ -91,7 +91,7 @@ macro(load_sdklib_libraries)
find_package(PkgConfig REQUIRED) # For libraries loaded using pkg-config
@@ -13,9 +12,4 @@ $NetBSD: patch-sdk_cmake_modules_sdklib_
+ pkg_check_modules(cryptopp REQUIRED IMPORTED_TARGET libcryptopp)
target_link_libraries(SDKlib PUBLIC PkgConfig::cryptopp) # TODO: Private for SDK core
-+ pkg_check_modules(inotify REQUIRED IMPORTED_TARGET libinotify)
-+ target_link_libraries(SDKlib PRIVATE PkgConfig::inotify)
-+
pkg_check_modules(sodium REQUIRED IMPORTED_TARGET libsodium)
- target_link_libraries(SDKlib PRIVATE PkgConfig::sodium)
-
Index: pkgsrc/net/megacmd/patches/patch-sdk_include_mega_posix_megafs.h
diff -u pkgsrc/net/megacmd/patches/patch-sdk_include_mega_posix_megafs.h:1.2 pkgsrc/net/megacmd/patches/patch-sdk_include_mega_posix_megafs.h:1.3
--- pkgsrc/net/megacmd/patches/patch-sdk_include_mega_posix_megafs.h:1.2 Sat Feb 15 07:40:13 2025
+++ pkgsrc/net/megacmd/patches/patch-sdk_include_mega_posix_megafs.h Fri May 16 19:43:58 2025
@@ -1,16 +1,36 @@
-$NetBSD: patch-sdk_include_mega_posix_megafs.h,v 1.2 2025/02/15 07:40:13 wiz Exp $
+$NetBSD: patch-sdk_include_mega_posix_megafs.h,v 1.3 2025/05/16 19:43:58 wiz Exp $
-* Use FSACCESS_CLASS of linux on BSDs
+* Add Fallback classes to avoid inotify
---- sdk/include/mega/posix/megafs.h.orig 2025-02-13 10:44:28.677854322 +0100
+--- sdk/include/mega/posix/megafs.h.orig 2025-04-02 09:16:59.000000000 +0200
+++ sdk/include/mega/posix/megafs.h
-@@ -192,7 +192,8 @@ private:
+@@ -260,6 +260,29 @@ private:
- };
+ #endif // ENABLE_SYNC
--#ifdef __linux__
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
-+ defined(__NetBSD__) || defined(__DragonFly__)
-
- #define FSACCESS_CLASS LinuxFileSystemAccess
++#elif defined(USE_PERIODIC)
++
++#define FSACCESS_CLASS FallbackFileSystemAccess
++
++class FallbackFileSystemAccess : public PosixFileSystemAccess
++{
++public:
++ DirNotify* newdirnotify(LocalNode& root,
++ const LocalPath& rootPath,
++ Waiter* waiter) override;
++
++ void addevents(Waiter*, int) override;
++
++ int checkevents(Waiter*) override;
++
++}; // class FallbackFileSystemAccess
++
++class FallbackDirNotify : public DirNotify
++{
++public:
++ FallbackDirNotify(const LocalPath& rootPath);
++};
++
+ #endif // __linux__
+ } // namespace
Index: pkgsrc/net/megacmd/patches/patch-sdk_src_posix_fs.cpp
diff -u pkgsrc/net/megacmd/patches/patch-sdk_src_posix_fs.cpp:1.3 pkgsrc/net/megacmd/patches/patch-sdk_src_posix_fs.cpp:1.4
--- pkgsrc/net/megacmd/patches/patch-sdk_src_posix_fs.cpp:1.3 Sat Feb 15 07:40:14 2025
+++ pkgsrc/net/megacmd/patches/patch-sdk_src_posix_fs.cpp Fri May 16 19:43:58 2025
@@ -1,11 +1,11 @@
-$NetBSD: patch-sdk_src_posix_fs.cpp,v 1.3 2025/02/15 07:40:14 wiz Exp $
+$NetBSD: patch-sdk_src_posix_fs.cpp,v 1.4 2025/05/16 19:43:58 wiz Exp $
* Fix build on NetBSD, use statvfs
* Don't use mntent features on BSDs
* O_NOATIME not available on BSDs
-* BSDs use LinuxFileSystemAccess
+* Fallback funcs
---- sdk/src/posix/fs.cpp.orig 2025-01-24 13:56:57.000000000 +0100
+--- sdk/src/posix/fs.cpp.orig 2025-04-02 09:16:59.000000000 +0200
+++ sdk/src/posix/fs.cpp
@@ -22,7 +22,8 @@
* You should have received a copy of the license along with this
@@ -27,37 +27,43 @@ $NetBSD: patch-sdk_src_posix_fs.cpp,v 1.
#include <sys/types.h>
#include <sys/utsname.h>
#ifdef TARGET_OS_MAC
-@@ -818,7 +822,8 @@ PosixFileSystemAccess::PosixFileSystemAc
- defaultfolderpermissions = 0700;
+@@ -1018,6 +1022,18 @@ int LinuxFileSystemAccess::checkevents([
+ return result;
}
--#ifdef __linux__
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
-+ defined(__NetBSD__) || defined(__DragonFly__)
- #ifdef ENABLE_SYNC
-
- bool LinuxFileSystemAccess::initFilesystemNotificationSystem()
-@@ -878,7 +883,8 @@ bool PosixFileSystemAccess::cwd_static(L
-
- // wake up from filesystem updates
++#elif defined(USE_PERIODIC)
++
++void FallbackFileSystemAccess::addevents([[maybe_unused]] Waiter* waiter, int /*flags*/)
++{
++ //Nothing
++}
++
++int FallbackFileSystemAccess::checkevents([[maybe_unused]] Waiter* waiter)
++{
++ return 0;
++}
++
+ #endif // __linux__
+
+
+@@ -1749,6 +1765,16 @@ void LinuxDirNotify::removeWatch(WatchMa
+ }
+
+ #endif // USE_INOTIFY
++
++#elif defined(USE_PERIODIC)
++
++FallbackDirNotify::FallbackDirNotify(const LocalPath& rootPath):
++ DirNotify(rootPath)
++{
++ // Let the engine know everything's ok.
++ setFailed(0, "");
++}
++
+ #endif // __linux__
--#ifdef __linux__
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
-+ defined(__NetBSD__) || defined(__DragonFly__)
- void LinuxFileSystemAccess::addevents([[maybe_unused]] Waiter* waiter, int /*flags*/)
- {
- #ifdef ENABLE_SYNC
-@@ -1637,7 +1643,8 @@ void PosixFileSystemAccess::statsid(stri
- }
-
- #if defined(ENABLE_SYNC)
--#if defined(__linux__)
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
-+ defined(__NetBSD__) || defined(__DragonFly__)
-
- LinuxDirNotify::LinuxDirNotify(LinuxFileSystemAccess& owner,
- LocalNode& /*root*/,
-@@ -1802,8 +1809,8 @@ private:
+ #endif //ENABLE_SYNC
+@@ -1805,8 +1831,8 @@ private:
// open with O_NOATIME if possible
int open(const char *path)
{
@@ -68,7 +74,7 @@ $NetBSD: patch-sdk_src_posix_fs.cpp,v 1.
int fd = ::open(path, O_RDONLY) ;
#else
// for sync in particular, try to open without setting access-time
-@@ -2062,6 +2069,7 @@ ScanResult PosixFileSystemAccess::direct
+@@ -2065,6 +2091,7 @@ ScanResult PosixFileSystemAccess::direct
}
#ifndef __APPLE__
@@ -76,7 +82,7 @@ $NetBSD: patch-sdk_src_posix_fs.cpp,v 1.
// Determine which device contains the specified path.
static std::string deviceOf(const std::string& database,
-@@ -2230,6 +2238,7 @@ static std::string deviceOf(const std::s
+@@ -2233,6 +2260,7 @@ static std::string deviceOf(const std::s
// No database has a mapping for this path.
return std::string();
}
@@ -84,7 +90,7 @@ $NetBSD: patch-sdk_src_posix_fs.cpp,v 1.
// Compute legacy filesystem fingerprint.
static std::uint64_t fingerprintOf(const std::string& path)
-@@ -2258,6 +2267,7 @@ static std::uint64_t fingerprintOf(const
+@@ -2261,6 +2289,7 @@ static std::uint64_t fingerprintOf(const
return ++value;
}
@@ -92,7 +98,7 @@ $NetBSD: patch-sdk_src_posix_fs.cpp,v 1.
// Determine the UUID of the specified device.
static std::string uuidOf(const std::string& device)
{
-@@ -2334,6 +2344,7 @@ static std::string uuidOf(const std::str
+@@ -2337,6 +2366,7 @@ static std::string uuidOf(const std::str
// Couldn't determine device's UUID.
return std::string();
}
@@ -100,7 +106,7 @@ $NetBSD: patch-sdk_src_posix_fs.cpp,v 1.
fsfp_t FileSystemAccess::fsFingerprint(const LocalPath& path) const
{
-@@ -2344,6 +2355,7 @@ fsfp_t FileSystemAccess::fsFingerprint(c
+@@ -2347,6 +2377,7 @@ fsfp_t FileSystemAccess::fsFingerprint(c
if (!fingerprint)
return fsfp_t();
@@ -108,21 +114,64 @@ $NetBSD: patch-sdk_src_posix_fs.cpp,v 1.
// What device contains the specified path?
auto device = deviceOf(path.localpath);
-@@ -2360,6 +2372,7 @@ fsfp_t FileSystemAccess::fsFingerprint(c
-
- LOG_warn << "Falling back to legacy filesystem fingerprint: "
- << path;
+@@ -2360,6 +2391,7 @@ fsfp_t FileSystemAccess::fsFingerprint(c
+ if (!uuid.empty())
+ return fsfp_t(fingerprint, std::move(uuid));
+ }
+#endif
// Couldn't determine filesystem UUID.
return fsfp_t(fingerprint, std::string());
-@@ -2419,7 +2432,8 @@ unique_ptr<DirAccess> PosixFileSystemAc
- return unique_ptr<DirAccess>(new PosixDirAccess());
+@@ -2452,6 +2484,15 @@ DirNotify* LinuxFileSystemAccess::newdir
+ return new LinuxDirNotify(*this, root, rootPath);
}
+ #endif
++
++#elif defined(USE_PERIODIC)
++DirNotify* FallbackFileSystemAccess::newdirnotify(LocalNode& root,
++ const LocalPath& rootPath,
++ Waiter*)
++{
++ return new FallbackDirNotify(rootPath);
++}
++
+ #endif
+
+ bool PosixFileSystemAccess::issyncsupported(const LocalPath& localpathArg, bool& isnetwork, SyncError& syncError, SyncWarning& syncWarning)
+@@ -2526,18 +2567,26 @@ bool PosixFileSystemAccess::getlocalfsty
+ }
+ #endif /* __linux__ || __ANDROID__ */
--#ifdef __linux__
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
+-#if defined(__APPLE__) || defined(USE_IOS)
++#if defined(__APPLE__) || defined(USE_IOS) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
+ defined(__NetBSD__) || defined(__DragonFly__)
- #ifdef ENABLE_SYNC
- DirNotify* LinuxFileSystemAccess::newdirnotify(LocalNode& root,
- const LocalPath& rootPath,
+ 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 +2604,7 @@ bool PosixFileSystemAccess::getlocalfsty
+ type = FS_UNKNOWN;
+ return true;
+ }
+-#endif /* __APPLE__ || USE_IOS */
++#endif /* __APPLE__ || USE_IOS || BSDs */
+
+ type = FS_UNKNOWN;
+ return false;
Added files:
Index: pkgsrc/net/megacmd/patches/patch-sdk_cmake_config.h.in
diff -u /dev/null pkgsrc/net/megacmd/patches/patch-sdk_cmake_config.h.in:1.1
--- /dev/null Fri May 16 19:43:58 2025
+++ pkgsrc/net/megacmd/patches/patch-sdk_cmake_config.h.in Fri May 16 19:43:58 2025
@@ -0,0 +1,29 @@
+$NetBSD: patch-sdk_cmake_config.h.in,v 1.1 2025/05/16 19:43:58 wiz Exp $
+
+* Use periodic scan instead of filesystem notification on BSDs
+
+--- sdk/cmake/config.h.in.orig 2025-05-12 14:43:30.633759167 +0200
++++ sdk/cmake/config.h.in
+@@ -10,6 +10,12 @@
+ #cmakedefine ENABLE_SYNC 1
+ #endif
+
++/* Define to use periodic scan instead of filesystem notification */
++#if (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)) && \
++ defined(ENABLE_SYNC)
++#define USE_PERIODIC
++#endif
++
+ #ifndef ENABLE_LOG_PERFORMANCE
+ #cmakedefine ENABLE_LOG_PERFORMANCE 1
+ #endif
+@@ -226,7 +232,8 @@
+ #define USE_DB 0
+
+ /* Use inotify API */
+-#if !defined(__APPLE__) && !defined(_WIN32)
++#if !defined(__APPLE__) && !defined(_WIN32) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && \
++ !defined(__NetBSD__) && !defined(__DragonFly__)
+ #define USE_INOTIFY 1
+ #endif
+
Index: pkgsrc/net/megacmd/patches/patch-sdk_include_mega_filesystem.h
diff -u /dev/null pkgsrc/net/megacmd/patches/patch-sdk_include_mega_filesystem.h:1.1
--- /dev/null Fri May 16 19:43:58 2025
+++ pkgsrc/net/megacmd/patches/patch-sdk_include_mega_filesystem.h Fri May 16 19:43:58 2025
@@ -0,0 +1,31 @@
+$NetBSD: patch-sdk_include_mega_filesystem.h,v 1.1 2025/05/16 19:43:58 wiz Exp $
+
+* Add BSD supported filesystems
+
+--- sdk/include/mega/filesystem.h.orig 2025-04-02 09:16:59.000000000 +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 *);
+@@ -233,11 +237,13 @@ class MEGA_API LocalPath
+ friend class ScopedSyncPathRestore;
+ friend class WinFileSystemAccess;
+ friend class PosixFileSystemAccess;
++ friend class FallbackFileSystemAccess;
+ friend struct WinDirAccess;
+ friend struct WinDirNotify;
+ friend class LinuxDirNotify;
+ friend class MacDirNotify;
+ friend class PosixDirNotify;
++ friend class FallbackDirNotify;
+ friend class WinFileAccess;
+ friend class PosixFileAccess;
+ friend void RemoveHiddenFileAttribute(LocalPath& path);
Index: pkgsrc/net/megacmd/patches/patch-sdk_include_mega_sync.h
diff -u /dev/null pkgsrc/net/megacmd/patches/patch-sdk_include_mega_sync.h:1.1
--- /dev/null Fri May 16 19:43:58 2025
+++ pkgsrc/net/megacmd/patches/patch-sdk_include_mega_sync.h Fri May 16 19:43:58 2025
@@ -0,0 +1,22 @@
+$NetBSD: patch-sdk_include_mega_sync.h,v 1.1 2025/05/16 19:43:58 wiz Exp $
+
+* Set ChangeDetectionMethod to USE_PERIODIC
+
+--- sdk/include/mega/sync.h.orig 2025-05-12 14:52:24.963962961 +0200
++++ sdk/include/mega/sync.h
+@@ -224,10 +224,14 @@ public:
+ const MegaClient& client) const;
+
+ // How should the engine detect filesystem changes?
++#ifdef USE_PERIODIC
++ ChangeDetectionMethod mChangeDetectionMethod = CDM_PERIODIC_SCANNING;
++#else
+ ChangeDetectionMethod mChangeDetectionMethod = CDM_NOTIFICATIONS;
++#endif
+
+ // Only meaningful when a sync is in CDM_PERIODIC_SCANNING mode.
+- unsigned mScanIntervalSec = 0;
++ unsigned mScanIntervalSec = 60;
+
+ // enum to string conversion
+ static const char* synctypename(const Type type);
Index: pkgsrc/net/megacmd/patches/patch-sdk_include_megaapi__impl.h
diff -u /dev/null pkgsrc/net/megacmd/patches/patch-sdk_include_megaapi__impl.h:1.1
--- /dev/null Fri May 16 19:43:58 2025
+++ pkgsrc/net/megacmd/patches/patch-sdk_include_megaapi__impl.h Fri May 16 19:43:58 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-sdk_include_megaapi__impl.h,v 1.1 2025/05/16 19:43:58 wiz Exp $
+
+* Use FallbackFileSystemAccess if USE_PERIODIC defined
+
+--- sdk/include/megaapi_impl.h.orig 2025-05-12 14:53:36.536485792 +0200
++++ sdk/include/megaapi_impl.h
+@@ -90,6 +90,8 @@ class MegaSemaphore : public CppSemaphor
+ class MegaWaiter : public PosixWaiter {};
+ #ifdef __APPLE__
+ class MegaFileSystemAccess : public MacFileSystemAccess {};
++ #elif defined(USE_PERIODIC)
++ class MegaFileSystemAccess : public FallbackFileSystemAccess {};
+ #else
+ class MegaFileSystemAccess : public LinuxFileSystemAccess {};
+ #endif
Index: pkgsrc/net/megacmd/patches/patch-sdk_src_filesystem.cpp
diff -u /dev/null pkgsrc/net/megacmd/patches/patch-sdk_src_filesystem.cpp:1.1
--- /dev/null Fri May 16 19:43:58 2025
+++ pkgsrc/net/megacmd/patches/patch-sdk_src_filesystem.cpp Fri May 16 19:43:58 2025
@@ -0,0 +1,42 @@
+$NetBSD: patch-sdk_src_filesystem.cpp,v 1.1 2025/05/16 19:43:58 wiz Exp $
+
+* 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:
Home |
Main Index |
Thread Index |
Old Index