2022-11-28 11:23:12 +01:00
|
|
|
commit bf7afdf34ad71b1e644dda34053e491653ca59e7
|
2019-06-04 07:59:12 +02:00
|
|
|
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
|
|
|
|
Date: Mon Mar 25 11:12:56 2019 +0100
|
|
|
|
|
2021-05-18 17:08:31 +02:00
|
|
|
reproducible
|
2019-06-04 07:59:12 +02:00
|
|
|
|
2021-05-18 17:08:31 +02:00
|
|
|
Sort input file list so that mpich builds in a reproducible way
|
2019-06-04 07:59:12 +02:00
|
|
|
in spite of indeterministic filesystem readdir order
|
|
|
|
|
|
|
|
See https://reproducible-builds.org/ for why this is good.
|
|
|
|
|
2021-05-18 17:08:31 +02:00
|
|
|
Without this patch, README.envvar, /usr/lib64/mpi/gcc/mpich/bin/mpivars
|
|
|
|
and other output files varied between builds.
|
|
|
|
|
|
|
|
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
|
2022-12-06 18:25:22 +01:00
|
|
|
|
|
|
|
Also remove any unreproducible timestamps from generated files.
|
2019-06-04 07:59:12 +02:00
|
|
|
|
2021-05-18 17:08:31 +02:00
|
|
|
diff --git maint/extractcvars.in maint/extractcvars.in
|
2022-11-28 11:23:12 +01:00
|
|
|
index b627a6f8d937..879de7bf6d5a 100755
|
2021-05-18 17:08:31 +02:00
|
|
|
--- maint/extractcvars.in
|
|
|
|
+++ maint/extractcvars.in
|
2022-11-28 11:23:12 +01:00
|
|
|
@@ -125,7 +125,7 @@ foreach my $p (@cvars) {
|
|
|
|
print "Categories include: \n".Dumper(@categories) if $debug;
|
|
|
|
print "Cvars include :\n".Dumper(@cvars)."\n" if $debug;
|
|
|
|
|
|
|
|
-my $run_timestamp = localtime();
|
2022-12-06 18:25:22 +01:00
|
|
|
+my $run_timestamp = localtime($ENV{"SOURCE_DATE_EPOCH"} || time);
|
2022-11-28 11:23:12 +01:00
|
|
|
my $uc_ns = uc($ns);
|
|
|
|
|
|
|
|
# Setup output files
|
2019-06-04 07:59:12 +02:00
|
|
|
@@ -594,7 +594,7 @@ sub ExpandDir {
|
|
|
|
my @subdirs = ();
|
|
|
|
my $DIR_HANDLE;
|
|
|
|
opendir $DIR_HANDLE, "$dir" or die "Error: open directory $dir -- $!\n";
|
|
|
|
- while (my $filename = readdir $DIR_HANDLE) {
|
|
|
|
+ for my $filename (sort readdir $DIR_HANDLE) {
|
|
|
|
if ($filename =~ /^\./) {
|
|
|
|
next;
|
|
|
|
} elsif (-d "$dir/$filename") {
|
2021-05-18 17:08:31 +02:00
|
|
|
diff --git maint/extractfixme.in maint/extractfixme.in
|
|
|
|
index 6b2567f037ed..7636fad296b8 100644
|
|
|
|
--- maint/extractfixme.in
|
|
|
|
+++ maint/extractfixme.in
|
2019-06-04 07:59:12 +02:00
|
|
|
@@ -114,7 +114,7 @@ sub ExpandDir {
|
|
|
|
my @otherdirs = ();
|
|
|
|
my @files = ();
|
|
|
|
opendir DIR, "$dir";
|
|
|
|
- while ($filename = readdir DIR) {
|
|
|
|
+ for $filename (sort readdir DIR) {
|
|
|
|
if ($filename =~ /^\./ || $filename eq ".svn") {
|
|
|
|
next;
|
|
|
|
}
|
2021-05-18 17:08:31 +02:00
|
|
|
diff --git maint/extractstrings.in maint/extractstrings.in
|
|
|
|
index 4e8a599c89ca..449a8c007499 100644
|
|
|
|
--- maint/extractstrings.in
|
|
|
|
+++ maint/extractstrings.in
|
|
|
|
@@ -73,7 +73,7 @@ sub GetFileNamesInDirectory {
|
2019-06-04 07:59:12 +02:00
|
|
|
my @filesFound = ();
|
|
|
|
|
|
|
|
opendir DIR, $dir || die "Could not open $dir\n";
|
|
|
|
- while (my $file = readdir DIR) {
|
|
|
|
+ for my $file (sort readdir DIR) {
|
|
|
|
if (! -f "$dir/$file") { next; }
|
|
|
|
if ($file =~ /^\.$/ || $file =~ /^\.\.$/) { next; }
|
|
|
|
if ($file =~ /$pattern/) {
|
2021-05-18 17:08:31 +02:00
|
|
|
@@ -246,7 +246,7 @@ sub processDirs {
|
2019-06-04 07:59:12 +02:00
|
|
|
my @dirs = ();
|
|
|
|
# Find the directories
|
|
|
|
opendir DIR, "$dir" || die "Cannot open $dir\n";
|
|
|
|
- while (my $file = readdir DIR) {
|
|
|
|
+ for my $file (sort readdir DIR) {
|
|
|
|
if (! -d "$dir/$file") { next; }
|
|
|
|
if ($file =~ /^\./) { next; }
|
|
|
|
if ($file =~ /^.svn/) { next; }
|
2021-05-18 17:08:31 +02:00
|
|
|
@@ -273,7 +273,7 @@ sub processDirsAndAction {
|
2019-06-04 07:59:12 +02:00
|
|
|
my @dirs = ();
|
|
|
|
# Find the directories
|
|
|
|
opendir DIR, "$dir" || die "Cannot open $dir\n";
|
|
|
|
- while (my $file = readdir DIR) {
|
|
|
|
+ for my $file (sort readdir DIR) {
|
|
|
|
if (! -d "$dir/$file") { next; }
|
|
|
|
if ($file =~ /^\./) { next; }
|
|
|
|
if ($file =~ /^.svn/) { next; }
|
2021-05-18 17:08:31 +02:00
|
|
|
diff --git maint/gen_subcfg_m4 maint/gen_subcfg_m4
|
|
|
|
index 80654263401d..34cb19ed0649 100755
|
|
|
|
--- maint/gen_subcfg_m4
|
|
|
|
+++ maint/gen_subcfg_m4
|
2019-06-04 07:59:12 +02:00
|
|
|
@@ -118,7 +118,7 @@ while (my $dir = pop @dirstack) {
|
|
|
|
# the stack to continue the traversal
|
|
|
|
opendir DH, $dir
|
|
|
|
or die "unable to open dir='$dir', stopped";
|
|
|
|
- my @contents = readdir DH;
|
|
|
|
+ my @contents = sort readdir DH;
|
|
|
|
foreach my $f (@contents) {
|
|
|
|
# avoid endless recursion
|
|
|
|
next if $f eq "." || $f eq "..";
|
2021-05-18 17:08:31 +02:00
|
|
|
diff --git maint/getcoverage.in maint/getcoverage.in
|
|
|
|
index c9c69f299261..f4fc35be72f6 100644
|
|
|
|
--- maint/getcoverage.in
|
|
|
|
+++ maint/getcoverage.in
|
|
|
|
@@ -779,7 +779,7 @@ sub ExpandDir {
|
2019-06-04 07:59:12 +02:00
|
|
|
my @otherdirs = ();
|
|
|
|
my @files = ();
|
|
|
|
opendir DIR, "$dir";
|
|
|
|
- while ($filename = readdir DIR) {
|
|
|
|
+ for $filename (sort readdir DIR) {
|
|
|
|
if ($filename =~ /^\./ || $filename eq ".svn") {
|
|
|
|
next;
|
|
|
|
}
|