determinism.patch 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From 5c4fd57daf125357262aa796057d7be8e78d378e Mon Sep 17 00:00:00 2001
  2. From: Richard Purdie <richard.purdie@linuxfoundation.org>
  3. Date: Wed, 5 Feb 2020 23:54:02 +0000
  4. Subject: [PATCH] Fixes to make the perl build reproducible:
  5. a) Remove the \n from configure_attr.sh since it gets quoted differently depending on
  6. whether the shell is bash or dash which can cause the test result to be incorrect.
  7. Reported upstream: https://github.com/arsv/perl-cross/issues/87
  8. b) Sort the order of the module lists from configure_mods.sh since otherwise
  9. the result isn't the same leading to makefile differences.
  10. Reported upstream: https://github.com/arsv/perl-cross/issues/88
  11. c) Sort the Encode::Byte byte_t.fnm file output (and the makefile depends whilst
  12. there for good measure)
  13. Submitted to upstream perl: https://github.com/dankogai/p5-encode/pull/179
  14. d) Use bash for perl-cross configure since otherwise trnl gets set to "\n" with bash
  15. and "" with dash
  16. Reported upstream: https://github.com/arsv/perl-cross/issues/87
  17. RP 2020/2/7
  18. Upstream-Status: Submitted [see links above]
  19. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
  20. ---
  21. cpan/Encode/Byte/Makefile.PL | 4 ++--
  22. 1 file changed, 2 insertions(+), 2 deletions(-)
  23. diff --git a/cpan/Encode/Byte/Makefile.PL b/cpan/Encode/Byte/Makefile.PL
  24. index 6824bbb..4af4a50 100644
  25. --- a/cpan/Encode/Byte/Makefile.PL
  26. +++ b/cpan/Encode/Byte/Makefile.PL
  27. @@ -171,7 +171,7 @@ sub postamble
  28. my $lengthsofar = length($str);
  29. my $continuator = '';
  30. $str .= "$table.c : $enc2xs Makefile.PL";
  31. - foreach my $file (@{$tables{$table}})
  32. + foreach my $file (sort (@{$tables{$table}}))
  33. {
  34. $str .= $continuator.' '.$self->catfile($dir,$file);
  35. if ( length($str)-$lengthsofar > 128*$numlines )
  36. @@ -189,7 +189,7 @@ sub postamble
  37. qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
  38. open (FILELIST, ">$table.fnm")
  39. || die "Could not open $table.fnm: $!";
  40. - foreach my $file (@{$tables{$table}})
  41. + foreach my $file (sort (@{$tables{$table}}))
  42. {
  43. print FILELIST $self->catfile($dir,$file) . "\n";
  44. }