Hello community,

here is the log from the commit of package disorderfs for openSUSE:Factory 
checked in at 2018-09-17 14:26:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/disorderfs (Old)
 and      /work/SRC/openSUSE:Factory/.disorderfs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "disorderfs"

Mon Sep 17 14:26:46 2018 rev:3 rq:635881 version:0.5.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/disorderfs/disorderfs.changes    2018-01-02 
16:35:24.616020493 +0100
+++ /work/SRC/openSUSE:Factory/.disorderfs.new/disorderfs.changes       
2018-09-17 14:27:07.391747265 +0200
@@ -1,0 +2,7 @@
+Sun Sep 16 04:26:04 UTC 2018 - Bernhard M. Wiedemann <[email protected]>
+
+- Update to 0.5.3
+  * Ensure readdir(2) returns consistent (and unique) inode numbers.
+- Add xattr.patch to fix build with attr-2.4.48
+
+-------------------------------------------------------------------

Old:
----
  disorderfs-0.5.2.tar.bz2
  disorderfs-0.5.2.tar.bz2.asc

New:
----
  disorderfs-0.5.3.tar.bz2
  disorderfs-0.5.3.tar.bz2.asc
  xattr.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ disorderfs.spec ++++++
--- /var/tmp/diff_new_pack.fmqKIX/_old  2018-09-17 14:27:12.207743119 +0200
+++ /var/tmp/diff_new_pack.fmqKIX/_new  2018-09-17 14:27:12.207743119 +0200
@@ -17,18 +17,18 @@
 
 
 Name:           disorderfs
-Version:        0.5.2
+Version:        0.5.3
 Release:        0
 Summary:        FUSE filesystem that introduces non-determinism
 License:        GPL-3.0+
 Group:          Development/Tools/Building
 Url:            https://packages.debian.org/sid/disorderfs
-Source0:        
https://reproducible.alioth.debian.org/releases/%{name}/%{name}-%{version}.tar.bz2
-Source1:        
https://reproducible.alioth.debian.org/releases/%{name}/%{name}-%{version}.tar.bz2.asc
+Source0:        
https://reproducible-builds.org/_lfs/releases/%{name}/%{name}-%{version}.tar.bz2
+Source1:        
https://reproducible-builds.org/_lfs/releases/%{name}/%{name}-%{version}.tar.bz2.asc
 Source2:        %{name}.keyring
+Patch0:         xattr.patch
 BuildRequires:  asciidoc
 BuildRequires:  gcc-c++
-BuildRequires:  libattr-devel
 BuildRequires:  pkgconfig
 BuildRequires:  xsltproc
 BuildRequires:  pkgconfig(fuse)
@@ -42,6 +42,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 make %{?_smp_mflags}

++++++ disorderfs-0.5.2.tar.bz2 -> disorderfs-0.5.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/disorderfs-0.5.2/Makefile 
new/disorderfs-0.5.3/Makefile
--- old/disorderfs-0.5.2/Makefile       2017-08-21 19:13:10.000000000 +0200
+++ new/disorderfs-0.5.3/Makefile       2018-05-12 18:51:47.000000000 +0200
@@ -1,5 +1,6 @@
 #
-# Copyright 2015 Andrew Ayer
+# Copyright 2015 Andrew Ayer <[email protected]>
+# Copyright 2016, 2017 Chris Lamb <[email protected]>
 # 
 # This file is part of disorderfs.
 # 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/disorderfs-0.5.2/disorderfs.1.txt 
new/disorderfs-0.5.3/disorderfs.1.txt
--- old/disorderfs-0.5.2/disorderfs.1.txt       2017-08-21 19:13:10.000000000 
+0200
+++ new/disorderfs-0.5.3/disorderfs.1.txt       2018-05-12 18:51:47.000000000 
+0200
@@ -54,7 +54,7 @@
 *--sort-dirents=yes|no*::
   Whether or not to return directory entries in sorted order (default: no).
   +
-  Note that you need to explictly override the default *--reverse-dirents=no*
+  Note that you need to explicitly override the default *--reverse-dirents=no*
   to get results in expected order.
 
 *--pad-blocks='N'*::
@@ -83,6 +83,37 @@
 file is locked when it really isn't.
 
 
-AUTHOR
-------
+EXAMPLE
+-------
+
+If you are attempting to test a https://reproducible-builds.org[Reproducible
+Builds] issue, it is recommended you use *--sort-dirents=yes* instead of
+*--shuffle-dirents=yes* to ensure that any difference between builds is
+deterministic in itself. For example:
+
+[source,sh]
+----
+$ mkdir rootdir sorted reversed
+$ touch rootdir/a rootdir/b rootdir/c <1>
+
+$ disorderfs --sort-dirents=yes --reverse-dirents=no rootdir sorted <2>
+$ ls -f sorted
+.  ..  a  b  c <3>
+
+$ disorderfs --sort-dirents=yes --reverse-dirents=yes rootdir reversed <4>
+$ ls -f reversed
+c  b  a  ..  . <5>
+----
+<1> First, we create some example files
+<2> Mount *rootdir* in sorted mode...
+<3> ... and the results are in sorted order.
+<4> We mount *rootdir* again, sorting the results in reversed order...
+<3> ... and the directory contents are returned in reverse.
+
+$ fusermount -u sorted
+$ fusermount -u reversed
+
+AUTHORS
+-------
 Andrew Ayer <[email protected]>
+Chris Lamb <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/disorderfs-0.5.2/disorderfs.cpp 
new/disorderfs-0.5.3/disorderfs.cpp
--- old/disorderfs-0.5.2/disorderfs.cpp 2017-08-21 19:13:10.000000000 +0200
+++ new/disorderfs-0.5.3/disorderfs.cpp 2018-05-12 18:51:47.000000000 +0200
@@ -1,5 +1,6 @@
 /*
- * Copyright 2015, 2016 Andrew Ayer
+ * Copyright 2015, 2016 Andrew Ayer <[email protected]>
+ * Copyright 2016, 2017 Chris Lamb <[email protected]>
  *
  * This file is part of disorderfs.
  *
@@ -42,7 +43,7 @@
 #include <sys/file.h>
 #include <stddef.h>
 
-#define DISORDERFS_VERSION "0.5.2"
+#define DISORDERFS_VERSION "0.5.3"
 
 namespace {
        std::vector<std::string>        bare_arguments;
@@ -67,7 +68,7 @@
        }
 
        int wrap (int retval) { return retval == -1 ? -errno : 0; }
-       using Dirents = std::vector<std::string>;
+       using Dirents = std::vector<std::pair<std::string, ino_t>>;
 
        // The libc versions of seteuid, etc. set the credentials for all 
threads.
        // We need to set credentials for a single thread only, so call the 
syscalls directly.
@@ -269,7 +270,7 @@
 
        // 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"); // XXX: 
other mount options?
+       fuse_opt_add_arg(&fargs, "atomic_o_trunc,default_permissions,use_ino"); 
// XXX: other mount options?
        if (config.multi_user) {
                fuse_opt_add_arg(&fargs, "-o");
                fuse_opt_add_arg(&fargs, "allow_other");
@@ -428,7 +429,7 @@
                struct dirent*  dirent_p;
                int             res;
                while ((res = readdir_r(d, &dirent_storage, &dirent_p)) == 0 && 
dirent_p) {
-                       dirents->emplace_back(dirent_p->d_name);
+                       dirents->emplace_back(std::make_pair(dirent_p->d_name, 
dirent_p->d_ino));
                }
                if (config.sort_dirents) {
                        std::sort(dirents->begin(), dirents->end());
@@ -446,14 +447,17 @@
        };
        disorderfs_fuse_operations.readdir = [] (const char* path, void* buf, 
fuse_fill_dir_t filler, off_t offset, struct fuse_file_info* info) {
                Dirents&                dirents = 
*get_fuse_data<Dirents*>(info);
+               struct stat             st;
+               memset(&st, 0, sizeof(st));
                if (config.shuffle_dirents) {
                        std::random_device      rd;
                        std::mt19937            g(rd());
                        std::shuffle(dirents.begin(), dirents.end(), g);
                }
 
-               for (const std::string& dirent : dirents) {
-                       if (filler(buf, dirent.c_str(), nullptr, 0) != 0) {
+               for (const auto dirent : dirents) {
+                       st.st_ino = dirent.second;
+                       if (filler(buf, dirent.first.c_str(), &st, 0) != 0) {
                                return -ENOMEM;
                        }
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/disorderfs-0.5.2/tests/inodes 
new/disorderfs-0.5.3/tests/inodes
--- old/disorderfs-0.5.2/tests/inodes   1970-01-01 01:00:00.000000000 +0100
+++ new/disorderfs-0.5.3/tests/inodes   2018-05-12 18:51:47.000000000 +0200
@@ -0,0 +1,87 @@
+#!/bin/sh
+
+. ./common
+
+TEMPDIR="$(mktemp -d -t inodes.XXXXXXXXXX)"
+
+trap "Unmount 2>/dev/null; rm -rf ${TEMPDIR}" EXIT
+
+Setup () {
+       cat >${TEMPDIR}/inodes.cpp <<EOF
+#include <dirent.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/syscall.h>
+
+#include <map>
+#include <iostream>
+
+struct linux_dirent {
+       unsigned long   d_ino;
+       off_t           d_off;
+       unsigned short  d_reclen;
+       char            d_name[];
+};
+
+#define BUF_SIZE 1024
+
+void perror_and_die (const char* s)
+{
+       std::perror(s);
+       std::abort();
+}
+
+int
+main(int argc, char *argv[])
+{
+       int                             fd, nread, ret = EXIT_SUCCESS;
+       char                            buf[BUF_SIZE];
+       struct stat                     st;
+       const std::string               dirname = argc > 1 ? argv[1] : ".";
+       struct linux_dirent             *d;
+       std::map<ino_t, std::string>    inodes;
+
+       if ((fd = open(dirname.c_str(), O_RDONLY | O_DIRECTORY)) == -1)
+               perror_and_die("open");
+
+       while ((nread = syscall(SYS_getdents, fd, buf, BUF_SIZE)) > 0) {
+               for (int pos = 0; pos < nread; pos += d->d_reclen) {
+                       d = (struct linux_dirent *) (buf + pos);
+
+                       std::string filename = dirname + "/" + 
std::string(d->d_name);
+                       if (stat(filename.c_str(), &st) == -1)
+                               perror_and_die("stat");
+
+                       if (d->d_ino != st.st_ino) {
+                               std::cerr << filename << ": inode from getdents 
does not match stat: "
+                                       << d->d_ino << " != " << st.st_ino << 
std::endl;
+                               ret = EXIT_FAILURE;
+                       }
+
+                       if (inodes.find(d->d_ino) == inodes.end()) {
+                               inodes[d->d_ino] = filename;
+                       } else {
+                               std::cerr << filename << ": duplicate inode: " 
<< d->d_ino
+                                       << " used by " << inodes[d->d_ino] << 
std::endl;
+                               ret = EXIT_FAILURE;
+                       }
+               }
+       }
+
+       if (nread == -1)
+               perror_and_die("open");
+
+       exit(ret);
+}
+EOF
+       g++ -Wall -o${TEMPDIR}/inodes ${TEMPDIR}/inodes.cpp || Fail "Could not 
compile testcase"
+}
+
+Setup
+Mount
+${TEMPDIR}/inodes target || Fail "inodes"
+Unmount


++++++ xattr.patch ++++++
commit 387844fa06bf98d400b74007f267606620919a6e
Author: Bernhard M. Wiedemann <[email protected]>
Date:   Sun Sep 16 06:07:11 2018 +0200

    Use sys/xattr.h
    
    from glibc, because libattr-2.4.48 dropped its xattr.h
    
    Similar to
    https://github.com/pmem/pmemfile/pull/253
    https://github.com/rpm-software-management/librepo/pull/122

diff --git a/disorderfs.cpp b/disorderfs.cpp
index aa83ab2..abdbd67 100644
--- a/disorderfs.cpp
+++ b/disorderfs.cpp
@@ -37,7 +37,7 @@ extern "C" {
 #include <vector>
 #include <random>
 #include <algorithm>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
 #include <sys/types.h>
 #include <sys/syscall.h>
 #include <sys/file.h>

Reply via email to