[Git][reproducible-builds/disorderfs][rclobus/fuse3] 4 commits: Depend on fuse3 instead of fuse. Thanks to Chris Hofstaedtler. Closes: #1084451

Roland Clobus (@rclobus) gitlab at salsa.debian.org
Tue Dec 9 16:12:00 UTC 2025



Roland Clobus pushed to branch rclobus/fuse3 at Reproducible Builds / disorderfs


Commits:
68a754f3 by Holger Levsen at 2025-12-05T11:05:56+01:00
Depend on fuse3 instead of fuse. Thanks to Chris Hofstaedtler. Closes: #1084451

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
0509735b by Holger Levsen at 2025-12-05T11:06:31+01:00
Drop Rules-Requires-Root: no (now the default)

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
b6b2a9ad by Holger Levsen at 2025-12-07T18:53:26+01:00
build-depend on libfuse3-dev instead of libfuse-dev

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
3996236a by Roland Clobus at 2025-12-09T17:09:57+01:00
WIP: Fix all compiler errors

* The compiler errors are all gone
* The executable file links against libfuse3
* See the many 'DO NOT COMMIT' comments
* All tests fail: find: ‘target’: Transport endpoint is not connected

- - - - -


3 changed files:

- Makefile
- debian/control
- disorderfs.cpp


Changes:

=====================================
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) ## DO NOT COMMIT ## -lulockmgr
 
 # 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


=====================================
debian/control
=====================================
@@ -7,7 +7,6 @@ Uploaders:
 Section: utils
 Priority: optional
 Standards-Version: 4.7.2
-Rules-Requires-Root: no
 Build-Depends:
  asciidoc,
  bc,
@@ -15,7 +14,7 @@ Build-Depends:
  docbook-xml,
  docbook-xsl,
  libattr1-dev,
- libfuse-dev,
+ libfuse3-dev,
  libxml2-utils,
  pkgconf,
  xsltproc,
@@ -26,7 +25,7 @@ Vcs-Browser: https://salsa.debian.org/reproducible-builds/disorderfs
 Package: disorderfs
 Architecture: linux-any
 Depends:
- fuse,
+ fuse3 (>= 3.10.1-3) | fuse (<< 3),
  ${misc:Depends},
  ${shlibs:Depends},
 Description: FUSE filesystem that introduces non-determinism


=====================================
disorderfs.cpp
=====================================
@@ -24,9 +24,12 @@
 #include <string>
 #include <fstream>
 #include <fuse.h>
+// DO NOT COMMIT
+#if 0
 extern "C" {
 #include <ulockmgr.h>
 }
+#endif
 #include <dirent.h>
 #include <iostream>
 #include <memory>
@@ -272,7 +275,9 @@ 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?
+    // DO NOT COMMIT, testing is required
+    //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,13 +300,16 @@ int        main (int argc, char** argv)
      * Initialize disorderfs_fuse_operations
      */
 
+#if 0
+    // DO NOT COMMIT
     /*
      * 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;
+#endif
 
-    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;
@@ -338,7 +346,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,15 +355,15 @@ 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));
     };
@@ -455,7 +464,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 +474,11 @@ int        main (int argc, char** argv)
             std::shuffle(dirents.begin(), dirents.end(), g);
         }
 
+	// DO NOT COMMIT: Is 'plus' tested?
+	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;
             }
         }
@@ -492,10 +503,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 {
+    disorderfs_fuse_operations.truncate = [] (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 {
+    disorderfs_fuse_operations.getattr = [] (const char* path, struct stat* st, struct fuse_file_info* info) -> int {
         if (fstat(info->fh, st) == -1) {
             return -errno;
         }
@@ -503,14 +514,17 @@ int        main (int argc, char** argv)
         return 0;
     };
     if (config.share_locks) {
+#if 0
+	    // DO NOT COMMIT: ulockmgr is currently not linked in
         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));
         };
+#endif
         disorderfs_fuse_operations.flock = [] (const char* path, struct fuse_file_info* info, int op) -> int {
             return wrap(flock(info->fh, op));
         };
     }
-    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/0b56451e319cf9ba18dfac23540b6ccb6b4a8803...3996236af7bb3c11d182321230739e7a1e2111cd

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/disorderfs/-/compare/0b56451e319cf9ba18dfac23540b6ccb6b4a8803...3996236af7bb3c11d182321230739e7a1e2111cd
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/20251209/1e22f0e9/attachment.htm>


More information about the rb-commits mailing list