Control: reopen -1 On Sat, Jul 02, 2016 at 09:33:37PM +0200, Reiner Herrmann wrote: > The attached patch fixes the issues I have found so far. > To be reproducible this also requires the pdl patch from #829323 > and there is another issue in ExtUtils::ParseXS remaining, which > is still uninvestigated.
Actually it turned out that the remaining issues are not caused by ExtUtils::ParseXS, but it can be fixed within pdl itself. With the attached patch, I was able to build pdl reproducibly with our prebuilder script. Kind regards, Reiner
diff --git a/debian/patches/reproducible-build.patch b/debian/patches/reproducible-build.patch index 298f0d2..65e6963 100644 --- a/debian/patches/reproducible-build.patch +++ b/debian/patches/reproducible-build.patch @@ -105,3 +105,93 @@ Forwarded: https://sourceforge.net/p/pdl/patches/84/ { $xsout .= "\t$var\n"; } +--- a/Basic/Core/Dev.pm ++++ b/Basic/Core/Dev.pm +@@ -311,7 +311,7 @@ + + print $indent,"switch ($loopvar) {\n\n"; + +- for $case (keys %PDL_DATATYPES) { ++ for $case (sort keys %PDL_DATATYPES) { + + $type = $PDL_DATATYPES{$case}; + +@@ -760,7 +760,7 @@ + # access (read, if set is true then write as well; if postset true then + # read first and write new value after that) + # to piddle's state +- foreach my $name ( keys %flags ) { ++ foreach my $name ( sort keys %flags ) { + my $flag = "PDL_" . ($flags{$name}{FLAG} || uc($name)); + if ( $flags{$name}{set} ) { + print <<"!WITH!SUBS!"; +--- a/Basic/Core/pdlconv.c.PL ++++ b/Basic/Core/pdlconv.c.PL +@@ -73,7 +73,7 @@ + + ##### Generate code for each data type ##### + +-for my $in ( keys %PDL_DATATYPES ) { ++for my $in ( sort keys %PDL_DATATYPES ) { + + my $intype = $PDL_DATATYPES{$in}; + print OUT <<"!WITH!SUBS!"; +@@ -191,7 +191,7 @@ + + ##### Generate code for each pair of data types ##### + +-for my $in ( keys %PDL_DATATYPES ) { ++for my $in ( sort keys %PDL_DATATYPES ) { + + my $intype = $PDL_DATATYPES{$in}; + +@@ -204,7 +204,7 @@ + switch ( targtype ) { + !WITH!SUBS! + +- for my $targ ( keys %PDL_DATATYPES ) { ++ for my $targ ( sort keys %PDL_DATATYPES ) { + + next if $in eq $targ; # Skip duplicates + my $targtype = $PDL_DATATYPES{$targ}; +--- a/Basic/Core/pdlcore.c.PL ++++ b/Basic/Core/pdlcore.c.PL +@@ -1027,7 +1027,7 @@ + */ + !NO!SUBS! + +-for my $in ( keys %PDL_DATATYPES ) { ++for my $in ( sort keys %PDL_DATATYPES ) { + + (my $type = $PDL_DATATYPES{$in}) =~ s/^PDL_//; + +@@ -1079,7 +1079,7 @@ + + # perl loop to emit code for all the PDL types + # +- foreach my $switch_type (keys %PDL::Types::typehash) { ++ foreach my $switch_type (sort keys %PDL::Types::typehash) { + + my $ctype = $PDL::Types::typehash{$switch_type}{ctype}; + +--- a/Basic/Core/Types.pm.PL ++++ b/Basic/Core/Types.pm.PL +@@ -219,6 +219,7 @@ + use Data::Dumper; + local $Data::Dumper::Terse = 1; + local $Data::Dumper::Indent = 1; ++ local $Data::Dumper::Sortkeys = 1; + local $Data::Dumper::Pad = "\t\t"; + my $i = 0; + my $perlcode = ''; +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -266,7 +266,7 @@ + return "[$list]"; + } elsif (ref $entry eq 'HASH') { + my $list = join ",\n", (map {('"'.quotemeta($_).'" => "'. +- quotemeta($entry->{$_}).'"')} keys %$entry); ++ quotemeta($entry->{$_}).'"')} sort keys %$entry); + $list = "\n$list\n\t\t" unless $list =~ /^\s*$/; + return "{$list}"; + } else {
signature.asc
Description: Digital signature