head 1.6; access; symbols pkgsrc-2026Q2:1.6.0.4 pkgsrc-2026Q2-base:1.6 pkgsrc-2026Q1:1.6.0.2 pkgsrc-2026Q1-base:1.6 pkgsrc-2025Q4:1.4.0.6 pkgsrc-2025Q4-base:1.4 pkgsrc-2025Q3:1.4.0.4 pkgsrc-2025Q3-base:1.4 pkgsrc-2025Q2:1.4.0.2 pkgsrc-2025Q2-base:1.4 pkgsrc-2025Q1:1.3.0.2 pkgsrc-2025Q1-base:1.3 pkgsrc-2024Q4:1.2.0.6 pkgsrc-2024Q4-base:1.2 pkgsrc-2024Q3:1.2.0.4 pkgsrc-2024Q3-base:1.2 pkgsrc-2024Q2:1.2.0.2 pkgsrc-2024Q2-base:1.2 pkgsrc-2024Q1:1.1.0.2 pkgsrc-2024Q1-base:1.1; locks; strict; comment @// @; 1.6 date 2026.02.11.17.04.10; author kikadf; state Exp; branches; next 1.5; commitid YMEdKaeF0yXRSYtG; 1.5 date 2026.01.08.17.52.19; author kikadf; state Exp; branches; next 1.4; commitid 4j0vvtbc75jUeCpG; 1.4 date 2025.05.16.19.43.58; author wiz; state Exp; branches; next 1.3; commitid Ah082bnRSWaFtaVF; 1.3 date 2025.02.15.07.40.14; author wiz; state Exp; branches; next 1.2; commitid iV06rQYs809LmxJF; 1.2 date 2024.06.18.18.23.15; author bsiegert; state Exp; branches; next 1.1; commitid Jgf2fAJmfiKvHueF; 1.1 date 2024.03.11.07.49.12; author wiz; state Exp; branches; next ; commitid 2VGVRBaCCnLunI1F; desc @@ 1.6 log @net/megacmd: update to 2.4.0 Tue Dec 16 17:14:02 CET 2025 - linux@@mega.co.nz - Update to version 2.4.0: * Improvements in uploads UX/UI: put now supports printing tag. Fixes in transfers table * Stability improvements: crashes fixes, FUSE deadlocks, ... * Performance boosts: lockless download URL retrievals, removed CPU bottlenecks for large accounts processing, db operations improvements, transfers improvements ... * Typos and other improvements Tue Sep 2 16:43:10 CEST 2025 - linux@@mega.co.nz - Update to version 2.3.0: * FUSE (beta): Added fuse commands on Windows to allow your MEGA folders to be directly mounted to your local drive * Other fixes and improvements to enhance reliability and performance Tue Jun 3 23:20:12 CEST 2025 - linux@@mega.co.nz - Update to version 2.2.0: * Support building for ARM64 in linux * New command "configure" to allow configuring some settings * Support setting max number of nodes in memory * Support setting number of SDK instances used for login in folders to download/import * Other fixes and improvements to enhance reliability and performance - Use builtin mekasdk-10.3.1 @ text @$NetBSD: patch-sdk_src_posix_fs.cpp,v 1.5 2026/01/08 17:52:19 kikadf Exp $ * Fix build on NetBSD, use statvfs * Don't use mntent features on BSDs * O_NOATIME not available on BSDs * Fallback funcs * Fix ctype(3) tolower usage --- sdk/src/posix/fs.cpp.orig 2026-01-13 02:44:33.000000000 +0100 +++ sdk/src/posix/fs.cpp @@@@ -22,7 +22,8 @@@@ * You should have received a copy of the license along with this * program. */ -#ifndef __APPLE__ +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && \ + !defined(__NetBSD__) && !defined(__DragonFly__) #include #endif // ! __APPLE__ @@@@ -32,6 +33,9 @@@@ #include #include #include +#if defined(__NetBSD__) +#define statfs statvfs +#endif #include #include #ifdef TARGET_OS_MAC @@@@ -1112,6 +1116,18 @@@@ int LinuxFileSystemAccess::checkevents([ return result; } +#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__ @@@@ -1537,7 +1553,8 @@@@ string getDistro() { distro = distro.substr(0, 20); } - transform(distro.begin(), distro.end(), distro.begin(), ::tolower); + transform(distro.begin(), distro.end(), distro.begin(), + [](unsigned char c) { return static_cast(std::tolower(c)); }); return distro; } @@@@ -1553,7 +1570,8 @@@@ string getDistroVersion() { version = version.substr(0, 10); } - transform(version.begin(), version.end(), version.begin(), ::tolower); + transform(version.begin(), version.end(), version.begin(), + [](unsigned char c) { return static_cast(std::tolower(c)); }); return version; } #endif @@@@ -1860,6 +1878,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__ #endif //ENABLE_SYNC @@@@ -1916,8 +1944,8 @@@@ private: // open with O_NOATIME if possible int open(const char *path) { -#ifdef TARGET_OS_IPHONE - // building for iOS, there is no O_NOATIME flag +#ifndef O_NOATIME + // building for iOS and BSDs, there is no O_NOATIME flag int fd = ::open(path, O_RDONLY) ; #else // for sync in particular, try to open without setting access-time @@@@ -2167,6 +2195,7 @@@@ ScanResult PosixFileSystemAccess::direct } #ifndef __APPLE__ +#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) // Determine which device contains the specified path. static std::string deviceOf(const std::string& database, @@@@ -2335,6 +2364,7 @@@@ static std::string deviceOf(const std::s // No database has a mapping for this path. return std::string(); } +#endif // Compute legacy filesystem fingerprint. static std::uint64_t fingerprintOf(const std::string& path) @@@@ -2363,6 +2393,7 @@@@ static std::uint64_t fingerprintOf(const return ++value; } +#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) // Determine the UUID of the specified device. static std::string uuidOf(const std::string& device) { @@@@ -2439,6 +2470,7 @@@@ static std::string uuidOf(const std::str // Couldn't determine device's UUID. return std::string(); } +#endif fsfp_t FileSystemAccess::fsFingerprint(const LocalPath& path) const { @@@@ -2449,6 +2481,7 @@@@ fsfp_t FileSystemAccess::fsFingerprint(c if (!fingerprint) return fsfp_t(); +#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) // What device contains the specified path? auto device = deviceOf(path.toPath(false)); @@@@ -2462,6 +2495,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()); @@@@ -2554,6 +2588,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, @@@@ -2635,18 +2678,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 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; @@@@ -2664,7 +2715,7 @@@@ bool PosixFileSystemAccess::getlocalfsty type = FS_UNKNOWN; return true; } -#endif /* __APPLE__ || USE_IOS */ +#endif /* __APPLE__ || USE_IOS || BSDs */ type = FS_UNKNOWN; return false; @ 1.5 log @ net/megacmd: fix crash on NetBSD-11 @ text @d1 1 a1 1 $NetBSD: patch-sdk_src_posix_fs.cpp,v 1.4 2025/05/16 19:43:58 wiz Exp $ d9 1 a9 1 --- sdk/src/posix/fs.cpp.orig 2025-04-02 09:16:59.000000000 +0200 d31 1 a31 1 @@@@ -1018,6 +1022,18 @@@@ int LinuxFileSystemAccess::checkevents([ d50 1 a50 1 @@@@ -1417,7 +1433,8 @@@@ string getDistro() d60 1 a60 1 @@@@ -1433,7 +1450,8 @@@@ string getDistroVersion() d70 1 a70 1 @@@@ -1749,6 +1767,16 @@@@ void LinuxDirNotify::removeWatch(WatchMa d87 1 a87 1 @@@@ -1805,8 +1833,8 @@@@ private: d98 1 a98 1 @@@@ -2065,6 +2093,7 @@@@ ScanResult PosixFileSystemAccess::direct d106 1 a106 1 @@@@ -2233,6 +2262,7 @@@@ static std::string deviceOf(const std::s d114 1 a114 1 @@@@ -2261,6 +2291,7 @@@@ static std::uint64_t fingerprintOf(const d122 1 a122 1 @@@@ -2337,6 +2368,7 @@@@ static std::string uuidOf(const std::str d130 1 a130 1 @@@@ -2347,6 +2379,7 @@@@ fsfp_t FileSystemAccess::fsFingerprint(c d136 1 a136 1 auto device = deviceOf(path.localpath); d138 1 a138 1 @@@@ -2360,6 +2393,7 @@@@ fsfp_t FileSystemAccess::fsFingerprint(c d146 1 a146 1 @@@@ -2452,6 +2486,15 @@@@ DirNotify* LinuxFileSystemAccess::newdir d161 2 a162 2 bool PosixFileSystemAccess::issyncsupported(const LocalPath& localpathArg, bool& isnetwork, SyncError& syncError, SyncWarning& syncWarning) @@@@ -2526,18 +2569,26 @@@@ bool PosixFileSystemAccess::getlocalfsty d190 1 a190 1 @@@@ -2555,7 +2606,7 @@@@ bool PosixFileSystemAccess::getlocalfsty @ 1.4 log @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 @ text @d1 1 a1 1 $NetBSD: patch-sdk_src_posix_fs.cpp,v 1.3 2025/02/15 07:40:14 wiz Exp $ d7 1 d50 21 a70 1 @@@@ -1749,6 +1765,16 @@@@ void LinuxDirNotify::removeWatch(WatchMa d87 1 a87 1 @@@@ -1805,8 +1831,8 @@@@ private: d98 1 a98 1 @@@@ -2065,6 +2091,7 @@@@ ScanResult PosixFileSystemAccess::direct d106 1 a106 1 @@@@ -2233,6 +2260,7 @@@@ static std::string deviceOf(const std::s d114 1 a114 1 @@@@ -2261,6 +2289,7 @@@@ static std::uint64_t fingerprintOf(const d122 1 a122 1 @@@@ -2337,6 +2366,7 @@@@ static std::string uuidOf(const std::str d130 1 a130 1 @@@@ -2347,6 +2377,7 @@@@ fsfp_t FileSystemAccess::fsFingerprint(c d138 1 a138 1 @@@@ -2360,6 +2391,7 @@@@ fsfp_t FileSystemAccess::fsFingerprint(c d146 1 a146 1 @@@@ -2452,6 +2484,15 @@@@ DirNotify* LinuxFileSystemAccess::newdir d162 1 a162 1 @@@@ -2526,18 +2567,26 @@@@ bool PosixFileSystemAccess::getlocalfsty d190 1 a190 1 @@@@ -2555,7 +2604,7 @@@@ bool PosixFileSystemAccess::getlocalfsty @ 1.3 log @net/megacmd: update to 2.0.0 Provided by Robert Bagdan in wip. - Update to version 2.0.0: * New Sync Engine: See sync-issues and sync-ignore commands * Rotating Logger: Introduced a robust rotating logging system across all platforms for better performance and debugging * Platform-specific enhancements: Addressed various file descriptor issues on Linux and macOS, and improved non-ascii support on Windows * Improved overall reliability: Fixed memory leaks, resolved potential data races, and eliminated deadlock scenarios * Fixed an issue when handling double-quoted arguments * Various fixes and refinements to enhance usability and performance - Use builtin megasdk-8.3.1 @ text @d1 1 a1 1 $NetBSD: patch-sdk_src_posix_fs.cpp,v 1.2 2024/06/18 18:23:15 bsiegert Exp $ d6 1 a6 1 * BSDs use LinuxFileSystemAccess d8 1 a8 1 --- sdk/src/posix/fs.cpp.orig 2025-01-24 13:56:57.000000000 +0100 d30 2 a31 2 @@@@ -818,7 +822,8 @@@@ PosixFileSystemAccess::PosixFileSystemAc defaultfolderpermissions = 0700; d34 30 a63 9 -#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 d65 2 a66 17 -#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: d77 1 a77 1 @@@@ -2062,6 +2069,7 @@@@ ScanResult PosixFileSystemAccess::direct d85 1 a85 1 @@@@ -2230,6 +2238,7 @@@@ static std::string deviceOf(const std::s d93 1 a93 1 @@@@ -2258,6 +2267,7 @@@@ static std::uint64_t fingerprintOf(const d101 1 a101 1 @@@@ -2334,6 +2344,7 @@@@ static std::string uuidOf(const std::str d109 1 a109 1 @@@@ -2344,6 +2355,7 @@@@ fsfp_t FileSystemAccess::fsFingerprint(c d117 4 a120 4 @@@@ -2360,6 +2372,7 @@@@ fsfp_t FileSystemAccess::fsFingerprint(c LOG_warn << "Falling back to legacy filesystem fingerprint: " << path; d125 2 a126 2 @@@@ -2419,7 +2432,8 @@@@ unique_ptr PosixFileSystemAc return unique_ptr(new PosixDirAccess()); d128 16 d145 2 a146 2 -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ d148 30 a177 3 #ifdef ENABLE_SYNC DirNotify* LinuxFileSystemAccess::newdirnotify(LocalNode& root, const LocalPath& rootPath, @ 1.2 log @net/megacmd: Update megacmd to 1.7.0 SDK version update to 4.31.0b. The patchset has been updated to be build-able on DragonFly, Free-, Net- and OpenBSD. Pull request is sent to upstream, but hasn't been merged yet. Changelog not available. From Robert Bagdan via pkgsrc-users. @ text @d1 1 a1 1 $NetBSD$ d3 4 a6 1 Fix build on NetBSD, use statvfs d8 1 a8 1 --- sdk/src/posix/fs.cpp.orig 2024-05-17 14:19:43.000000000 +0000 d10 11 a20 2 @@@@ -27,6 +27,9 @@@@ #include d22 1 d27 2 a28 1 #include d30 99 a128 1 #include "mega/osx/osxutils.h" @ 1.1 log @net/megacmd: import megacmd-1.6.3 Packaged for wip by Robert Bagdan. MEGAcmd provides non UI access to MEGA services. It intends to offer all the functionality with your MEGA account via commands. It features synchronization, backup of local folders into your MEGA account and a webdav/streaming server. @ text @d3 1 a3 1 * Add NetBSD support d5 1 a5 1 --- sdk/src/posix/fs.cpp.orig 2023-05-02 16:07:05.000000000 +0000 @