Hello community, here is the log from the commit of package viruskiller for openSUSE:Factory checked in at 2017-07-21 22:50:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/viruskiller (Old) and /work/SRC/openSUSE:Factory/.viruskiller.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "viruskiller" Fri Jul 21 22:50:11 2017 rev:2 rq:511639 version:1.03 Changes: -------- --- /work/SRC/openSUSE:Factory/viruskiller/viruskiller.changes 2015-06-30 10:18:13.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.viruskiller.new/viruskiller.changes 2017-07-21 22:50:13.909681585 +0200 @@ -1,0 +2,5 @@ +Thu Jul 20 09:18:23 UTC 2017 - bwiedemann@suse.com + +- Add reproducible.patch to sort file list to fix build-compare (boo#1041090) + +------------------------------------------------------------------- New: ---- reproducible.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ viruskiller.spec ++++++ --- /var/tmp/diff_new_pack.AP0UGy/_old 2017-07-21 22:50:15.289486945 +0200 +++ /var/tmp/diff_new_pack.AP0UGy/_new 2017-07-21 22:50:15.293486381 +0200 @@ -27,6 +27,8 @@ Source1: %{name}-icons.tar # PATCH-FIX-OPENSUSE - viruskiller-icons_viruskiller.desktop.patch -- Change to right Desktop Entries Patch0: viruskiller-icons_viruskiller.desktop.patch +# PATCH-FIX-OPENSUSE bmwiedemann -- sort list of files in pak (boo#1041090) +Patch1: reproducible.patch %if 0%{?suse_version} BuildRequires: hicolor-icon-theme BuildRequires: update-desktop-files @@ -52,6 +54,7 @@ %prep %setup -q -a 1 %patch0 +%patch1 -p1 # SED-FIX-OPENSUSE -- Use normal pak, fix paths, , remove docs install via files, # remove png and install from tar ++++++ reproducible.patch ++++++ # PATCH-FIX-OPENSUSE (boo#1041090) When building packages for openSUSE, we do so in disposable VMs, which means every build has a new filesystem and thus ordering of files differs for the readdir call in src/pak.cpp Index: viruskiller-1.03/src/pak.cpp =================================================================== --- viruskiller-1.03.orig/src/pak.cpp +++ viruskiller-1.03/src/pak.cpp @@ -81,7 +81,9 @@ void countFiles(const char *dirName) void recurseDirectory(const char *dirName) { - DIR *dirp, *dirp2; + DIR *dirp2; + int n; + struct dirent **namelist; dirent *dfile; gzFile fp; FILE *infile; @@ -90,9 +92,9 @@ void recurseDirectory(const char *dirNam uLongf cSize = 0; uLongf fSize = 0; - dirp = opendir(dirName); + n = scandir(dirName, &namelist, NULL, alphasort); - if (dirp == NULL) + if (n == -1) { printf("%s: Directory does not exist or is not accessable\n", dirName); return; @@ -101,10 +103,12 @@ void recurseDirectory(const char *dirNam float percentage; long filesize; - while ((dfile = readdir(dirp))) + while (n--) { + dfile = namelist[n]; if (dfile->d_name[0] == '.') { + free(dfile); continue; } @@ -123,7 +127,6 @@ void recurseDirectory(const char *dirNam if (!infile) { printf("Couldn't open %s for reading!\n", filename); - closedir(dirp); gzclose(pak); exit(1); } @@ -155,7 +158,6 @@ void recurseDirectory(const char *dirNam if (!fp) { printf("Couldn't open %s for reading!\n", filename); - closedir(dirp); gzclose(pak); exit(1); } @@ -181,9 +183,10 @@ void recurseDirectory(const char *dirNam fflush(stdout); } } + free(dfile); } - closedir(dirp); + free(namelist); dirs++; }