[Git][reproducible-builds/disorderfs][master] 4 commits: move from fuse to fuse3. Closes: #1084451

Holger Levsen (@holger) gitlab at salsa.debian.org
Sat Jan 3 10:57:36 UTC 2026



Holger Levsen pushed to branch master at Reproducible Builds / disorderfs


Commits:
d641fd69 by Roland Clobus at 2026-01-03T11:56:24+01:00
move from fuse to fuse3. Closes: #1084451

(cherry picked from commit e3378e5d17e6cb49e356c87953d19b6211b4a17e)
Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
efe1edf8 by Holger Levsen at 2026-01-03T11:56:52+01:00
bump upstream version

Signed-off-by: Holger Levsen <holger at layer-acht.org>
(cherry picked from commit 20445be5bae3d03ab1182d4ba15f1ee917db6393)
Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
4c592efe by Roland Clobus at 2026-01-03T11:57:01+01:00
Restore the 'use_ino' functionality

(cherry picked from commit d981ab2a61c07f6e94e49de371930eb92e55e446)
Signed-off-by: Holger Levsen <holger at layer-acht.org>
(cherry picked from commit 22dbaee1578acee7420e66d66c051437385d264d)
Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
aa9d8b2a by Holger Levsen at 2026-01-03T11:57:12+01:00
add NEWS entries for 0.6.0 and 0.6.1

Signed-off-by: Holger Levsen <holger at layer-acht.org>
(cherry picked from commit 37fada2665d2c27225831b77a4418146156df135)
Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


4 changed files:

- .gitlab-ci.yml
- Makefile
- NEWS
- disorderfs.cpp


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -8,7 +8,7 @@ stages:
   script:
     - apt-get -q update
     - mount -o remount,rw /dev
-    - apt-get -q -y install --no-install-recommends build-essential libfuse-dev pkg-config bc fuse3
+    - apt-get -q -y install --no-install-recommends build-essential libfuse3-dev pkg-config bc fuse3
     - make test
   except:
     - debian


=====================================
Makefile
=====================================
@@ -30,12 +30,12 @@ HAS_A2X ?= $(shell command -v a2x >/dev/null && echo yes || echo no)
 
 # FUSE
 PKG_CONFIG ?= pkg-config
-FUSE_CFLAGS ?= $(shell $(PKG_CONFIG) --cflags fuse) -DFUSE_USE_VERSION=26
-FUSE_LIBS ?= $(shell $(PKG_CONFIG) --libs fuse) -lulockmgr
+FUSE_CFLAGS ?= $(shell $(PKG_CONFIG) --cflags fuse3) -DFUSE_USE_VERSION=31
+FUSE_LIBS ?= $(shell $(PKG_CONFIG) --libs fuse3)
 
 # CXXFLAGS
 CXXFLAGS += -Wall -Wextra -pedantic -O2 -g
-CXXFLAGS += -std=c++11 -Wno-unused-parameter
+CXXFLAGS += -std=c++20 -Wno-unused-parameter
 CXXFLAGS += $(FUSE_CFLAGS)
 
 # Files


=====================================
NEWS
=====================================
@@ -1,3 +1,9 @@
+v0.6.1 (2026-01-03)
+  * Port to Fuse3.
+
+v0.6.0 (2025-05-19)
+  * Improve portability, especially to FreeBSD.
+
 v0.5.11 (2020-01-19)
   * Improve tests.
   * Add RPM spec file


=====================================
disorderfs.cpp
=====================================
@@ -24,9 +24,6 @@
 #include <string>
 #include <fstream>
 #include <fuse.h>
-extern "C" {
-#include <ulockmgr.h>
-}
 #include <dirent.h>
 #include <iostream>
 #include <memory>
@@ -43,7 +40,7 @@ extern "C" {
 #include <sys/file.h>
 #include <stddef.h>
 
-#define DISORDERFS_VERSION "0.6.0"
+#define DISORDERFS_VERSION "0.6.1"
 
 namespace {
 std::vector<std::string>        bare_arguments;
@@ -227,7 +224,7 @@ int fuse_opt_proc (void* data, const char* arg, int key, struct fuse_args* outar
         std::clog << "    --reverse-dirents=yes|no  reverse dirent order? (default: yes)" << std::endl;
         std::clog << "    --sort-dirents=yes|no  sort directory entries deterministically instead (default: no)" << std::endl;
         std::clog << "    --pad-blocks=N         add N to st_blocks (default: 1)" << std::endl;
-        std::clog << "    --share-locks=yes|no   share locks with underlying filesystem (BUGGY; default: no)" << std::endl;
+        std::clog << "    --share-locks=yes|no   share locks with underlying filesystem (obsoleted, BUGGY; default: no)" << std::endl;
         std::clog << std::endl;
         fuse_opt_add_arg(outargs, "-ho");
         fuse_main(outargs->argc, outargs->argv, &disorderfs_fuse_operations, nullptr);
@@ -272,7 +269,7 @@ int        main (int argc, char** argv)
 
     // Add some of our own hard-coded FUSE options:
     fuse_opt_add_arg(&fargs, "-o");
-    fuse_opt_add_arg(&fargs, "atomic_o_trunc,default_permissions,use_ino"); // XXX: other mount options?
+    fuse_opt_add_arg(&fargs, "default_permissions"); // XXX: other mount options?
     if (config.multi_user) {
         fuse_opt_add_arg(&fargs, "-o");
         fuse_opt_add_arg(&fargs, "allow_other");
@@ -295,16 +292,16 @@ int        main (int argc, char** argv)
      * Initialize disorderfs_fuse_operations
      */
 
-    /*
-     * Indicate that we should accept UTIME_OMIT (and UTIME_NOW) in the
-     * utimens operations for "touch -m" and "touch -a"
-     */
-    disorderfs_fuse_operations.flag_utime_omit_ok = 1;
-
-    disorderfs_fuse_operations.getattr = [] (const char* path, struct stat* st) -> int {
+    disorderfs_fuse_operations.getattr = [] (const char* path, struct stat* st, struct fuse_file_info *info) -> int {
         Guard g;
-        if (lstat((root + path).c_str(), st) == -1) {
-            return -errno;
+        if (info) {
+          if (fstat(info->fh, st) == -1) {
+              return -errno;
+          }
+        } else {
+          if (lstat((root + path).c_str(), st) == -1) {
+              return -errno;
+          }
         }
         st->st_blocks += config.pad_blocks;
         return 0;
@@ -338,7 +335,8 @@ int        main (int argc, char** argv)
         Guard g;
         return wrap(symlink(target, (root + linkpath).c_str()));
     };
-    disorderfs_fuse_operations.rename = [] (const char* oldpath, const char* newpath) -> int {
+    disorderfs_fuse_operations.rename = [] (const char* oldpath, const char* newpath, unsigned int flags) -> int {
+        // NEEDS TEST: flags may be RENAME_EXCHANGE and RENAME_NOREPLACE
         Guard g;
         return wrap(rename((root + oldpath).c_str(), (root + newpath).c_str()));
     };
@@ -346,17 +344,21 @@ int        main (int argc, char** argv)
         Guard g;
         return wrap(link((root + oldpath).c_str(), (root + newpath).c_str()));
     };
-    disorderfs_fuse_operations.chmod = [] (const char* path, mode_t mode) -> int {
+    disorderfs_fuse_operations.chmod = [] (const char* path, mode_t mode, struct fuse_file_info* info) -> int {
         Guard g;
         return wrap(chmod((root + path).c_str(), mode));
     };
-    disorderfs_fuse_operations.chown = [] (const char* path, uid_t uid, gid_t gid) -> int {
+    disorderfs_fuse_operations.chown = [] (const char* path, uid_t uid, gid_t gid, struct fuse_file_info* info) -> int {
         Guard g;
         return wrap(lchown((root + path).c_str(), uid, gid));
     };
-    disorderfs_fuse_operations.truncate = [] (const char* path, off_t length) -> int {
+    disorderfs_fuse_operations.truncate = [] (const char* path, off_t length, struct fuse_file_info* info) -> int {
         Guard g;
-        return wrap(truncate((root + path).c_str(), length));
+        if (info) {
+          return wrap(ftruncate(info->fh, length));
+        } else {
+          return wrap(truncate((root + path).c_str(), length));
+        }
     };
     disorderfs_fuse_operations.open = [] (const char* path, struct fuse_file_info* info) -> int {
         Guard g;
@@ -455,7 +457,7 @@ int        main (int argc, char** argv)
         set_fuse_data<Dirents*>(info, dirents.release());
         return 0;
     };
-    disorderfs_fuse_operations.readdir = [] (const char* path, void* buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info* info) {
+    disorderfs_fuse_operations.readdir = [] (const char* path, void* buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info* info, enum fuse_readdir_flags flags) {
         Dirents&                dirents = *get_fuse_data<Dirents*>(info);
         struct stat                st;
         memset(&st, 0, sizeof(st));
@@ -465,9 +467,10 @@ int        main (int argc, char** argv)
             std::shuffle(dirents.begin(), dirents.end(), g);
         }
 
+	enum fuse_fill_dir_flags fill_dir_flags = (flags == FUSE_READDIR_DEFAULTS ? FUSE_FILL_DIR_DEFAULTS : FUSE_FILL_DIR_PLUS);
         for (const auto &dirent : dirents) {
             st.st_ino = dirent.second;
-            if (filler(buf, dirent.first.c_str(), &st, 0) != 0) {
+            if (filler(buf, dirent.first.c_str(), &st, 0, fill_dir_flags) != 0) {
                 return -ENOMEM;
             }
         }
@@ -482,6 +485,10 @@ int        main (int argc, char** argv)
         wrap(is_datasync ? fdatasync(info->fh) : fsync(info->fh));
         return 0; // return value is ignored
     };
+    disorderfs_fuse_operations.init = [] (struct fuse_conn_info *conn, struct fuse_config *cfg) -> void * {
+        cfg->use_ino = true;
+        return nullptr;
+    };
     disorderfs_fuse_operations.create = [] (const char* path, mode_t mode, struct fuse_file_info* info) -> int {
         Guard g;
         // XXX: use info->flags?
@@ -492,25 +499,10 @@ int        main (int argc, char** argv)
         info->fh = fd;
         return 0;
     };
-    disorderfs_fuse_operations.ftruncate = [] (const char* path, off_t off, struct fuse_file_info* info) -> int {
-        return wrap(ftruncate(info->fh, off));
-    };
-    disorderfs_fuse_operations.fgetattr = [] (const char* path, struct stat* st, struct fuse_file_info* info) -> int {
-        if (fstat(info->fh, st) == -1) {
-            return -errno;
-        }
-        st->st_blocks += config.pad_blocks;
-        return 0;
-    };
     if (config.share_locks) {
-        disorderfs_fuse_operations.lock = [] (const char* path, struct fuse_file_info* info, int cmd, struct flock* lock) -> int {
-            return ulockmgr_op(info->fh, cmd, lock, &info->lock_owner, sizeof(info->lock_owner));
-        };
-        disorderfs_fuse_operations.flock = [] (const char* path, struct fuse_file_info* info, int op) -> int {
-            return wrap(flock(info->fh, op));
-        };
+        perror_and_die("The share-locks feature is no longer provided in fuse3");
     }
-    disorderfs_fuse_operations.utimens = [] (const char* path, const struct timespec tv[2]) -> int {
+    disorderfs_fuse_operations.utimens = [] (const char* path, const struct timespec tv[2], struct fuse_file_info *info) -> int {
         Guard g;
         return wrap(utimensat(AT_FDCWD, (root + path).c_str(), tv, AT_SYMLINK_NOFOLLOW));
     };



View it on GitLab: https://salsa.debian.org/reproducible-builds/disorderfs/-/compare/6180da08642f5648805d5e97cae5806a0c054663...aa9d8b2a041eac63be00f28c7c7709a656d4a67f

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/disorderfs/-/compare/6180da08642f5648805d5e97cae5806a0c054663...aa9d8b2a041eac63be00f28c7c7709a656d4a67f
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20260103/771ca1b9/attachment.htm>


More information about the rb-commits mailing list