xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-devtools/perl/files/determinism.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFixes to make the perl build reproducible:
2*4882a593Smuzhiyun
3*4882a593Smuzhiyuna) Remove the \n from configure_attr.sh since it gets quoted differently depending on
4*4882a593Smuzhiyun   whether the shell is bash or dash which can cause the test result to be incorrect.
5*4882a593Smuzhiyun   Reported upstream: https://github.com/arsv/perl-cross/issues/87
6*4882a593Smuzhiyun
7*4882a593Smuzhiyunb) Sort the order of the module lists from configure_mods.sh since otherwise
8*4882a593Smuzhiyun   the result isn't the same leading to makefile differences.
9*4882a593Smuzhiyun   Reported upstream: https://github.com/arsv/perl-cross/issues/88
10*4882a593Smuzhiyun
11*4882a593Smuzhiyunc) Sort the Encode::Byte byte_t.fnm file output (and the makefile depends whilst
12*4882a593Smuzhiyun   there for good measure)
13*4882a593Smuzhiyun   This needs to go to upstream perl (not done)
14*4882a593Smuzhiyun
15*4882a593Smuzhiyund) Use bash for perl-cross configure since otherwise trnl gets set to "\n" with bash
16*4882a593Smuzhiyun   and "" with dash
17*4882a593Smuzhiyun   Reported upstream: https://github.com/arsv/perl-cross/issues/87
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunRP 2020/2/7
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunUpstream-Status: Pending [75% submitted]
22*4882a593SmuzhiyunSigned-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
23*4882a593Smuzhiyun
24*4882a593SmuzhiyunIndex: perl-5.30.1/cpan/Encode/Byte/Makefile.PL
25*4882a593Smuzhiyun===================================================================
26*4882a593Smuzhiyun--- perl-5.30.1.orig/cpan/Encode/Byte/Makefile.PL
27*4882a593Smuzhiyun+++ perl-5.30.1/cpan/Encode/Byte/Makefile.PL
28*4882a593Smuzhiyun@@ -171,7 +171,7 @@ sub postamble
29*4882a593Smuzhiyun     my $lengthsofar = length($str);
30*4882a593Smuzhiyun     my $continuator = '';
31*4882a593Smuzhiyun     $str .= "$table.c : $enc2xs Makefile.PL";
32*4882a593Smuzhiyun-    foreach my $file (@{$tables{$table}})
33*4882a593Smuzhiyun+    foreach my $file (sort (@{$tables{$table}}))
34*4882a593Smuzhiyun     {
35*4882a593Smuzhiyun         $str .= $continuator.' '.$self->catfile($dir,$file);
36*4882a593Smuzhiyun         if ( length($str)-$lengthsofar > 128*$numlines )
37*4882a593Smuzhiyun@@ -189,7 +189,7 @@ sub postamble
38*4882a593Smuzhiyun         qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
39*4882a593Smuzhiyun     open (FILELIST, ">$table.fnm")
40*4882a593Smuzhiyun         || die "Could not open $table.fnm: $!";
41*4882a593Smuzhiyun-    foreach my $file (@{$tables{$table}})
42*4882a593Smuzhiyun+    foreach my $file (sort (@{$tables{$table}}))
43*4882a593Smuzhiyun     {
44*4882a593Smuzhiyun         print FILELIST $self->catfile($dir,$file) . "\n";
45*4882a593Smuzhiyun     }
46