Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package s3fs for openSUSE:Factory checked in at 2025-12-27 11:29:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/s3fs (Old) and /work/SRC/openSUSE:Factory/.s3fs.new.1928 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "s3fs" Sat Dec 27 11:29:01 2025 rev:23 rq:1324458 version:1.97 Changes: -------- --- /work/SRC/openSUSE:Factory/s3fs/s3fs.changes 2025-12-02 13:21:09.577379571 +0100 +++ /work/SRC/openSUSE:Factory/.s3fs.new.1928/s3fs.changes 2025-12-27 11:29:32.813272479 +0100 @@ -1,0 +2,6 @@ +Wed Dec 24 10:46:12 UTC 2025 - Andreas Stieger <[email protected]> + +- Update to version 1.97: + * Do not honor -o nonempty when compiled with FUSE 3 + +------------------------------------------------------------------- Old: ---- s3fs-1.96.tar.gz New: ---- s3fs-1.97.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ s3fs.spec ++++++ --- /var/tmp/diff_new_pack.wageTU/_old 2025-12-27 11:29:33.589304194 +0100 +++ /var/tmp/diff_new_pack.wageTU/_new 2025-12-27 11:29:33.593304358 +0100 @@ -18,7 +18,7 @@ Name: s3fs -Version: 1.96 +Version: 1.97 Release: 0 Summary: FUSE file system backed by Amazon S3 bucket License: GPL-2.0-or-later ++++++ s3fs-1.96.tar.gz -> s3fs-1.97.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/.github/workflows/ci.yml new/s3fs-fuse-1.97/.github/workflows/ci.yml --- old/s3fs-fuse-1.96/.github/workflows/ci.yml 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/.github/workflows/ci.yml 2025-12-07 21:44:50.000000000 +0100 @@ -62,7 +62,7 @@ - fedora:42 - opensuse/leap:15 - opensuse/leap:16.0 - - alpine:3.22 + - alpine:3.23 container: image: ${{ matrix.container }} @@ -83,7 +83,7 @@ run: zypper install -y tar gzip - name: Install Alpine packages before checkout - if: matrix.container == 'alpine:3.22' + if: matrix.container == 'alpine:3.23' run: apk add --no-progress --no-cache bash - name: Checkout source code @@ -144,10 +144,16 @@ - name: Install brew other packages run: | - S3FS_BREW_PACKAGES='automake cppcheck python3 coreutils gnu-sed shellcheck jq'; - for s3fs_brew_pkg in ${S3FS_BREW_PACKAGES}; do - if brew list | grep -q ${s3fs_brew_pkg}; then if brew outdated | grep -q ${s3fs_brew_pkg}; then HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade ${s3fs_brew_pkg}; fi; else HOMEBREW_NO_AUTO_UPDATE=1 brew install ${s3fs_brew_pkg}; fi - done + S3FS_BREW_PACKAGES=( + automake + coreutils + cppcheck + jq + python3 + shellcheck + ) + HOMEBREW_NO_AUTO_UPDATE=1 brew install "${S3FS_BREW_PACKAGES[@]}" + HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade "${S3FS_BREW_PACKAGES[@]}" - name: Build run: | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/.github/workflows/linux-ci-helper.sh new/s3fs-fuse-1.97/.github/workflows/linux-ci-helper.sh --- old/s3fs-fuse-1.96/.github/workflows/linux-ci-helper.sh 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/.github/workflows/linux-ci-helper.sh 2025-12-07 21:44:50.000000000 +0100 @@ -343,7 +343,7 @@ python3 ) -elif [ "${CONTAINER_FULLNAME}" = "alpine:3.22" ]; then +elif [ "${CONTAINER_FULLNAME}" = "alpine:3.23" ]; then PACKAGE_MANAGER_BIN="apk" PACKAGE_UPDATE_OPTIONS="update --no-progress" PACKAGE_INSTALL_OPTIONS="add --no-progress --no-cache" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/COMPILATION.md new/s3fs-fuse-1.97/COMPILATION.md --- old/s3fs-fuse-1.96/COMPILATION.md 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/COMPILATION.md 2025-12-07 21:44:50.000000000 +0100 @@ -10,9 +10,11 @@ ### Ensure your system satisfies build and runtime dependencies for: -* fuse >= 2.8.4 +* fuse >= 3.0.0 * automake -* gcc-c++ +* C++14 compiler + - gcc-c++ >= 5 + - clang++ >= 3.5 * make * libcurl * libxml2 @@ -53,13 +55,12 @@ ### NOTE - The required libraries/components required to run s3fs are: -* fuse >= 2.8.4 +* fuse >= 3.0.0 * libcurl * libxml2 * openssl/gnutls/nss * mime.types (the package providing depends on the OS) - ## Compilation on Windows (using MSYS2) On Windows, use [MSYS2](https://www.msys2.org/) to compile for itself. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/ChangeLog new/s3fs-fuse-1.97/ChangeLog --- old/s3fs-fuse-1.96/ChangeLog 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/ChangeLog 2025-12-07 21:44:50.000000000 +0100 @@ -1,6 +1,9 @@ ChangeLog for S3FS ------------------ +Version 1.97 -- 7 Dec, 2025 (major changes only) +#2765 Do not honor -o nonempty when compiled with FUSE 3 + Version 1.96 -- 24 Nov, 2025 (major changes only) #1867 - Require FUSE 3 on Linux #2596 - Require C++14 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/Makefile.am new/s3fs-fuse-1.97/Makefile.am --- old/s3fs-fuse-1.96/Makefile.am 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/Makefile.am 2025-12-07 21:44:50.000000000 +0100 @@ -68,20 +68,16 @@ SHELLCHECK_CUSTOM_IGN = --exclude=SC1091 shellcheck: - @if type shellcheck > /dev/null 2>&1; then \ - echo "* ShellCheck version"; \ - $(SHELLCHECK_CMD) --version; \ - echo ""; \ - echo "* Check all sh files with ShellCheck"; \ - LC_ALL=C.UTF-8 $(SHELLCHECK_CMD) $(SHELLCHECK_SH_OPT) $(SHELLCHECK_COMMON_IGN) $$(grep '#![[:space:]]*/bin/sh' $$(find . -type f -name \*.sh) | sed -e 's|^\(.*\):#\!.*$$|\1|g') || exit 1; \ - echo "-> No error was detected."; \ - echo ""; \ - echo "* Check all bash files with ShellCheck"; \ - LC_ALL=C.UTF-8 $(SHELLCHECK_CMD) $(SHELLCHECK_BASH_OPT) $(SHELLCHECK_COMMON_IGN) $$(grep '#![[:space:]]*/bin/bash' $$(find . -type f -name \*.sh) | sed -e 's|^\(.*\):#\!.*$$|\1|g') || exit 1; \ - echo "-> No error was detected."; \ - else \ - echo "* ShellCheck is not installed, so skip this."; \ - fi + echo "* ShellCheck version"; \ + $(SHELLCHECK_CMD) --version; \ + echo ""; \ + echo "* Check all sh files with ShellCheck"; \ + LC_ALL=C.UTF-8 $(SHELLCHECK_CMD) $(SHELLCHECK_SH_OPT) $(SHELLCHECK_COMMON_IGN) $$(find . -type f -name \*.sh | grep -v pjd-pjdfstest | xargs grep -l '^#![[:space:]]*/bin/sh$$') || exit 1; \ + echo "-> No error was detected."; \ + echo ""; \ + echo "* Check all bash files with ShellCheck"; \ + LC_ALL=C.UTF-8 $(SHELLCHECK_CMD) $(SHELLCHECK_BASH_OPT) $(SHELLCHECK_COMMON_IGN) $$(find . -type f -name \*.sh | grep -v pjd-pjdfstest | xargs grep -l '^#![[:space:]]*/bin/bash$$') || exit 1; \ + echo "-> No error was detected."; # # Local variables: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/configure.ac new/s3fs-fuse-1.97/configure.ac --- old/s3fs-fuse-1.96/configure.ac 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/configure.ac 2025-12-07 21:44:50.000000000 +0100 @@ -20,7 +20,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([s3fs],[1.96]) +AC_INIT([s3fs],[1.97]) AC_CONFIG_HEADER([config.h]) AC_CANONICAL_TARGET diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/src/cache_node.cpp new/s3fs-fuse-1.97/src/cache_node.cpp --- old/s3fs-fuse-1.96/src/cache_node.cpp 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/src/cache_node.cpp 2025-12-07 21:44:50.000000000 +0100 @@ -1311,7 +1311,7 @@ // [NOTE] // Directory paths must end with a slash, but strpath does not. // - if(GetPathHasLock() == strpath || GetPathHasLock().substr(0, GetPathHasLock().size() - 1) == strpath){ + if(GetPathHasLock() == strpath || GetPathHasLock().compare(0, GetPathHasLock().size() - 1, strpath) == 0){ if(IsExpiredHasLock()){ // this cache is expired needTruncate = true; @@ -1325,7 +1325,7 @@ } // Checks whether the path of this object is included - if(strpath.substr(0, GetPathHasLock().size()) != GetPathHasLock()){ + if(strpath.compare(0, GetPathHasLock().size(), GetPathHasLock()) != 0){ return std::shared_ptr<StatCacheNode>(); } @@ -1480,7 +1480,7 @@ return false; } - strLeafName = strpath.substr(GetPathHasLock().size()); + strLeafName.assign(strpath, GetPathHasLock().size()); if(strLeafName.empty()){ return false; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/src/curl_util.cpp new/s3fs-fuse-1.97/src/curl_util.cpp --- old/s3fs-fuse-1.96/src/curl_util.cpp 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/src/curl_util.cpp 2025-12-07 21:44:50.000000000 +0100 @@ -129,7 +129,7 @@ std::string strkey = list->data; size_t pos; if(std::string::npos != (pos = strkey.find(':', 0))){ - if (trim(strkey.substr(pos + 1)).empty()) { + if(std::string::npos == strkey.find_first_not_of(SPACES, pos + 1)){ // skip empty-value headers (as they are discarded by libcurl) continue; } @@ -138,7 +138,7 @@ if(!sorted_headers.empty()){ sorted_headers += ";"; } - sorted_headers += lower(strkey); + sorted_headers += lower(std::move(strkey)); } return sorted_headers; @@ -182,7 +182,7 @@ // skip empty-value headers (as they are discarded by libcurl) continue; } - strhead = strkey; + strhead = std::move(strkey); strhead += ":"; strhead += strval; }else{ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/src/fdcache.cpp new/s3fs-fuse-1.97/src/fdcache.cpp --- old/s3fs-fuse-1.96/src/fdcache.cpp 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/src/fdcache.cpp 2025-12-07 21:44:50.000000000 +0100 @@ -188,7 +188,7 @@ if(is_create_dir){ int result; - if(0 != (result = mkdirp(resolved_path + mydirname(path), 0777))){ + if(0 != (result = mkdirp(resolved_path + (path == nullptr ? "" : mydirname(path)), 0777))){ S3FS_PRN_ERR("failed to create dir(%s) by errno(%d).", path, result); return false; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/src/s3fs.cpp new/s3fs-fuse-1.97/src/s3fs.cpp --- old/s3fs-fuse-1.96/src/s3fs.cpp 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/src/s3fs.cpp 2025-12-07 21:44:50.000000000 +0100 @@ -29,7 +29,7 @@ #include <string> #include <unistd.h> #include <utility> -#include <dirent.h> +#include <dirent.h> // NOLINT(misc-include-cleaner) #include <sys/types.h> #include <getopt.h> // NOLINT(misc-include-cleaner) @@ -83,7 +83,9 @@ static std::string mimetype_file; static bool nocopyapi = false; static bool norenameapi = false; +#if FUSE_USE_VERSION < 30 static bool nonempty = false; +#endif static bool allow_other = false; static uid_t s3fs_uid = 0; static gid_t s3fs_gid = 0; @@ -5052,6 +5054,7 @@ return -1; } +#if FUSE_USE_VERSION < 30 if(!nonempty){ const struct dirent *ent; DIR *dp = opendir(mountpoint.c_str()); @@ -5069,6 +5072,7 @@ closedir(dp); } #endif +#endif return 1; } @@ -5158,10 +5162,12 @@ is_remove_cache = true; return 0; } +#if FUSE_USE_VERSION < 30 else if(0 == strcmp(arg, "nonempty")){ nonempty = true; return 1; // need to continue for fuse. } +#endif else if(0 == strcmp(arg, "nomultipart")){ nomultipart = true; return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/src/s3fs_logger.cpp new/s3fs-fuse-1.97/src/s3fs_logger.cpp --- old/s3fs-fuse-1.96/src/s3fs_logger.cpp 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/src/s3fs_logger.cpp 2025-12-07 21:44:50.000000000 +0100 @@ -255,48 +255,44 @@ void s3fs_low_logprn(S3fsLog::Level level, const char* file, const char *func, int line, const char *fmt, ...) { - if(S3fsLog::IsS3fsLogLevel(level)){ - va_list va; - va_start(va, fmt); - size_t len = vsnprintf(nullptr, 0, fmt, va) + 1; - va_end(va); - - auto message = std::make_unique<char[]>(len); - va_start(va, fmt); - vsnprintf(message.get(), len, fmt, va); - va_end(va); - - if(foreground || S3fsLog::IsSetLogFile()){ - S3fsLog::SeekEnd(); - fprintf(S3fsLog::GetOutputLogFile(), "%s%s%s:%s(%d): %s\n", S3fsLog::GetCurrentTime().c_str(), S3fsLog::GetLevelString(level), file, func, line, message.get()); - S3fsLog::Flush(); - }else{ - // TODO: why does this differ from s3fs_low_logprn2? - syslog(S3fsLog::GetSyslogLevel(level), "%s%s:%s(%d): %s", instance_name.c_str(), file, func, line, message.get()); - } + va_list va; + va_start(va, fmt); + size_t len = vsnprintf(nullptr, 0, fmt, va) + 1; + va_end(va); + + auto message = std::make_unique<char[]>(len); + va_start(va, fmt); + vsnprintf(message.get(), len, fmt, va); + va_end(va); + + if(foreground || S3fsLog::IsSetLogFile()){ + S3fsLog::SeekEnd(); + fprintf(S3fsLog::GetOutputLogFile(), "%s%s%s:%s(%d): %s\n", S3fsLog::GetCurrentTime().c_str(), S3fsLog::GetLevelString(level), file, func, line, message.get()); + S3fsLog::Flush(); + }else{ + // TODO: why does this differ from s3fs_low_logprn2? + syslog(S3fsLog::GetSyslogLevel(level), "%s%s:%s(%d): %s", instance_name.c_str(), file, func, line, message.get()); } } void s3fs_low_logprn2(S3fsLog::Level level, int nest, const char* file, const char *func, int line, const char *fmt, ...) { - if(S3fsLog::IsS3fsLogLevel(level)){ - va_list va; - va_start(va, fmt); - size_t len = vsnprintf(nullptr, 0, fmt, va) + 1; - va_end(va); - - auto message = std::make_unique<char[]>(len); - va_start(va, fmt); - vsnprintf(message.get(), len, fmt, va); - va_end(va); - - if(foreground || S3fsLog::IsSetLogFile()){ - S3fsLog::SeekEnd(); - fprintf(S3fsLog::GetOutputLogFile(), "%s%s%s%s:%s(%d): %s\n", S3fsLog::GetCurrentTime().c_str(), S3fsLog::GetLevelString(level), S3fsLog::GetS3fsLogNest(nest), file, func, line, message.get()); - S3fsLog::Flush(); - }else{ - syslog(S3fsLog::GetSyslogLevel(level), "%s%s%s", instance_name.c_str(), S3fsLog::GetS3fsLogNest(nest), message.get()); - } + va_list va; + va_start(va, fmt); + size_t len = vsnprintf(nullptr, 0, fmt, va) + 1; + va_end(va); + + auto message = std::make_unique<char[]>(len); + va_start(va, fmt); + vsnprintf(message.get(), len, fmt, va); + va_end(va); + + if(foreground || S3fsLog::IsSetLogFile()){ + S3fsLog::SeekEnd(); + fprintf(S3fsLog::GetOutputLogFile(), "%s%s%s%s:%s(%d): %s\n", S3fsLog::GetCurrentTime().c_str(), S3fsLog::GetLevelString(level), S3fsLog::GetS3fsLogNest(nest), file, func, line, message.get()); + S3fsLog::Flush(); + }else{ + syslog(S3fsLog::GetSyslogLevel(level), "%s%s%s", instance_name.c_str(), S3fsLog::GetS3fsLogNest(nest), message.get()); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/src/s3fs_logger.h new/s3fs-fuse-1.97/src/s3fs_logger.h --- old/s3fs-fuse-1.96/src/s3fs_logger.h 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/src/s3fs_logger.h 2025-12-07 21:44:50.000000000 +0100 @@ -149,13 +149,17 @@ void s3fs_low_logprn(S3fsLog::Level level, const char* file, const char *func, int line, const char *fmt, ...) __attribute__ ((format (printf, 5, 6))); #define S3FS_LOW_LOGPRN(level, fmt, ...) \ do{ \ - s3fs_low_logprn(level, __FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__); \ + if(S3fsLog::IsS3fsLogLevel(level)){ \ + s3fs_low_logprn(level, __FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__); \ + } \ }while(0) void s3fs_low_logprn2(S3fsLog::Level level, int nest, const char* file, const char *func, int line, const char *fmt, ...) __attribute__ ((format (printf, 6, 7))); #define S3FS_LOW_LOGPRN2(level, nest, fmt, ...) \ do{ \ - s3fs_low_logprn2(level, nest, __FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__); \ + if(S3fsLog::IsS3fsLogLevel(level)){ \ + s3fs_low_logprn2(level, nest, __FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__); \ + } \ }while(0) #define S3FS_LOW_CURLDBG(fmt, ...) \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/src/s3fs_util.cpp new/s3fs-fuse-1.97/src/s3fs_util.cpp --- old/s3fs-fuse-1.96/src/s3fs_util.cpp 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/src/s3fs_util.cpp 2025-12-07 21:44:50.000000000 +0100 @@ -171,18 +171,13 @@ // static std::mutex basename_lock; -std::string mydirname(const std::string& path) -{ - const std::lock_guard<std::mutex> lock(basename_lock); - - return mydirname(path.c_str()); -} - // safe variant of dirname // dirname clobbers path so let it operate on a tmp copy -std::string mydirname(const char* path) +std::string mydirname(std::string path) { - if(!path || '\0' == path[0]){ + const std::lock_guard<std::mutex> lock(basename_lock); + + if(path.empty()){ return ""; } @@ -190,24 +185,17 @@ // Currently, use "&str[pos]" to make it possible to build with C++14. // Once we support C++17 or later, we will use "str.data()". // - std::string strPath = path; - strPath.push_back('\0'); // terminate with a null character and allocate space for it. - std::string result = dirname(&strPath[0]); // NOLINT(readability-container-data-pointer) - return result; -} - -std::string mybasename(const std::string& path) -{ - const std::lock_guard<std::mutex> data_lock(basename_lock); - - return mybasename(path.c_str()); + path.push_back('\0'); // terminate with a null character and allocate space for it. + return dirname(&path[0]); // NOLINT(readability-container-data-pointer) } // safe variant of basename // basename clobbers path so let it operate on a tmp copy -std::string mybasename(const char* path) +std::string mybasename(std::string path) { - if(!path || '\0' == path[0]){ + const std::lock_guard<std::mutex> data_lock(basename_lock); + + if(path.empty()){ return ""; } @@ -215,10 +203,8 @@ // Currently, use "&str[pos]" to make it possible to build with C++14. // Once we support C++17 or later, we will use "str.data()". // - std::string strPath = path; - strPath.push_back('\0'); // terminate with a null character and allocate space for it. - std::string result = basename(&strPath[0]); // NOLINT(readability-container-data-pointer) - return result; + path.push_back('\0'); // terminate with a null character and allocate space for it. + return basename(&path[0]); // NOLINT(readability-container-data-pointer) } // mkdir --parents diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/src/s3fs_util.h new/s3fs-fuse-1.97/src/s3fs_util.h --- old/s3fs-fuse-1.96/src/s3fs_util.h 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/src/s3fs_util.h 2025-12-07 21:44:50.000000000 +0100 @@ -43,10 +43,8 @@ std::string get_username(uid_t uid); int is_uid_include_group(uid_t uid, gid_t gid); -std::string mydirname(const char* path); -std::string mydirname(const std::string& path); -std::string mybasename(const char* path); -std::string mybasename(const std::string& path); +std::string mydirname(std::string path); +std::string mybasename(std::string path); int mkdirp(const std::string& path, mode_t mode); std::string get_exist_directory_path(const std::string& path); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/src/string_util.cpp new/s3fs-fuse-1.97/src/string_util.cpp --- old/s3fs-fuse-1.96/src/string_util.cpp 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/src/string_util.cpp 2025-12-07 21:44:50.000000000 +0100 @@ -19,6 +19,7 @@ */ #include <algorithm> +#include <cstdio> #include <cstdlib> #include <cstring> #include <cerrno> @@ -38,19 +39,20 @@ //------------------------------------------------------------------- std::string str(const struct timespec& value) { - std::ostringstream s; - if(UTIME_OMIT == value.tv_nsec){ - s << "UTIME_OMIT"; + return "UTIME_OMIT"; }else if(UTIME_NOW == value.tv_nsec){ - s << "UTIME_NOW"; + return "UTIME_NOW"; }else{ - s << value.tv_sec; - if(value.tv_nsec != 0){ - s << "." << std::setfill('0') << std::setw(9) << value.tv_nsec; + char buf[64]; + size_t len; + if(value.tv_nsec == 0){ + len = std::snprintf(buf, sizeof(buf), "%ld", value.tv_sec); + }else{ + len = std::snprintf(buf, sizeof(buf), "%ld.%09ld", value.tv_sec, value.tv_nsec); } + return std::string(buf, len); } - return s.str(); } // This source code is from https://gist.github.com/jeremyfromearth/5694aa3a66714254752179ecf3c95582 . @@ -159,8 +161,7 @@ static std::string rawUrlEncode(const std::string &s, const char* except_chars) { std::string result; - for (size_t i = 0; i < s.length(); ++i) { - unsigned char c = s[i]; + for(unsigned char c : s){ if((except_chars && nullptr != strchr(except_chars, c)) || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/test/integration-test-common.sh new/s3fs-fuse-1.97/test/integration-test-common.sh --- old/s3fs-fuse-1.96/test/integration-test-common.sh 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/test/integration-test-common.sh 2025-12-07 21:44:50.000000000 +0100 @@ -350,7 +350,7 @@ -f \ "${@}" & echo $! >&3 - ) 3>pid | "${STDBUF_COMMAND_LINE[@]}" "${SED_BIN}" "${SED_BUFFER_FLAG}" "s/^/s3fs: /" & + ) 3>pid | "${STDBUF_COMMAND_LINE[@]}" awk "{print \"s3fs: \" \$0}" & sleep 1 S3FS_PID=$(<pid) export S3FS_PID diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/test/integration-test-main.sh new/s3fs-fuse-1.97/test/integration-test-main.sh --- old/s3fs-fuse-1.96/test/integration-test-main.sh 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/test/integration-test-main.sh 2025-12-07 21:44:50.000000000 +0100 @@ -262,8 +262,8 @@ echo "123456" >> "${TEST_TEXT_FILE}" - local LINE1; LINE1=$("${SED_BIN}" -n '1,1p' "${TEST_TEXT_FILE}") - local LINE2; LINE2=$("${SED_BIN}" -n '2,2p' "${TEST_TEXT_FILE}") + local LINE1; LINE1=$(sed -n '1,1p' "${TEST_TEXT_FILE}") + local LINE2; LINE2=$(sed -n '2,2p' "${TEST_TEXT_FILE}") if [ "${LINE1}" != "XYZ" ]; then echo "LINE1 was not as expected, got ${LINE1}, expected XYZ" @@ -1979,7 +1979,7 @@ for i in $(seq 5); do local file # shellcheck disable=SC2012,SC2046 - file=$(ls $(seq 5) | "${SED_BIN}" -n "$((RANDOM % 5 + 1))p") + file=$(ls $(seq 5) | sed -n "$((RANDOM % 5 + 1))p") cat "${file}" >/dev/null || true rm -f "${file}" echo "foo" > "${file}" || true @@ -2151,8 +2151,8 @@ # # get lines from cache stat file # - local CACHE_FILE_STAT_LINE_1; CACHE_FILE_STAT_LINE_1=$("${SED_BIN}" -n 1p "${CACHE_DIR}/.${TEST_BUCKET_1}.stat/${CACHE_TESTRUN_DIR}/${BIG_FILE}") - local CACHE_FILE_STAT_LINE_2; CACHE_FILE_STAT_LINE_2=$("${SED_BIN}" -n 2p "${CACHE_DIR}/.${TEST_BUCKET_1}.stat/${CACHE_TESTRUN_DIR}/${BIG_FILE}") + local CACHE_FILE_STAT_LINE_1; CACHE_FILE_STAT_LINE_1=$(sed -n 1p "${CACHE_DIR}/.${TEST_BUCKET_1}.stat/${CACHE_TESTRUN_DIR}/${BIG_FILE}") + local CACHE_FILE_STAT_LINE_2; CACHE_FILE_STAT_LINE_2=$(sed -n 2p "${CACHE_DIR}/.${TEST_BUCKET_1}.stat/${CACHE_TESTRUN_DIR}/${BIG_FILE}") if [ -z "${CACHE_FILE_STAT_LINE_1}" ] || [ -z "${CACHE_FILE_STAT_LINE_2}" ]; then echo "could not get first or second line from cache file stat: ${CACHE_DIR}/.${TEST_BUCKET_1}.stat/${CACHE_TESTRUN_DIR}/${BIG_FILE}" return 1; @@ -2194,7 +2194,7 @@ # # get lines from cache stat file # - CACHE_FILE_STAT_LINE_1=$("${SED_BIN}" -n 1p "${CACHE_DIR}/.${TEST_BUCKET_1}.stat/${CACHE_TESTRUN_DIR}/${BIG_FILE}") + CACHE_FILE_STAT_LINE_1=$(sed -n 1p "${CACHE_DIR}/.${TEST_BUCKET_1}.stat/${CACHE_TESTRUN_DIR}/${BIG_FILE}") local CACHE_FILE_STAT_LINE_E; CACHE_FILE_STAT_LINE_E=$(tail -1 "${CACHE_DIR}/.${TEST_BUCKET_1}.stat/${CACHE_TESTRUN_DIR}/${BIG_FILE}" 2>/dev/null) if [ -z "${CACHE_FILE_STAT_LINE_1}" ] || [ -z "${CACHE_FILE_STAT_LINE_E}" ]; then echo "could not get first or end line from cache file stat: ${CACHE_DIR}/.${TEST_BUCKET_1}.stat/${CACHE_TESTRUN_DIR}/${BIG_FILE}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/s3fs-fuse-1.96/test/test-utils.sh new/s3fs-fuse-1.97/test/test-utils.sh --- old/s3fs-fuse-1.96/test/test-utils.sh 2025-11-24 19:22:23.000000000 +0100 +++ new/s3fs-fuse-1.97/test/test-utils.sh 2025-12-07 21:44:50.000000000 +0100 @@ -71,13 +71,10 @@ export STDBUF_BIN="" fi export TRUNCATE_BIN="gtruncate" - export SED_BIN="gsed" else export STDBUF_BIN="stdbuf" export TRUNCATE_BIN="truncate" - export SED_BIN="sed" fi -export SED_BUFFER_FLAG="--unbuffered" # [NOTE] # Specifying cache disable option depending on stat(coreutils) version
