summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2019-06-21 08:30:30 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-24 10:36:28 +0100
commit08be264c8d132dc1d6f7e6ed0df57d269699edc8 (patch)
tree4fbcf2b485c27fafe1b35581f714d857bb953c26 /meta/recipes-devtools/perl
parent10ce84dd195cb1f2bfcc48dc07ed1019e30ec68e (diff)
downloadpoky-08be264c8d132dc1d6f7e6ed0df57d269699edc8.tar.gz
perl: Reproducible build fixes
Applies two patches that are required to improve the reproducibility of builds. (From OE-Core rev: 9297cabb0aca8212d3cc74f8d26e43abc02ded87) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/perl')
-rw-r--r--meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch30
-rw-r--r--meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch32
-rw-r--r--meta/recipes-devtools/perl/perl_5.30.0.bb5
3 files changed, 67 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch b/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch
new file mode 100644
index 0000000000..07f153162b
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch
@@ -0,0 +1,30 @@
1From 31a2c5555f9ef32f35d7d5ce1fd09a010ba5f5c6 Mon Sep 17 00:00:00 2001
2From: Joshua Watt <JPEWhacker@gmail.com>
3Date: Mon, 17 Jun 2019 10:47:15 -0500
4Subject: [PATCH 1/2] enc2xs: Add environment variable to suppress comments
5
6Comment generation in enc2xs can now be suppressed by setting the
7ENC2XS_NO_COMMENTS environment variable. This allows enc2xs to produce
8reproducible output by omitting the name of the generating program.
9
10Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
11Upstream-status: Accepted [https://github.com/dankogai/p5-encode/pull/145]
12---
13 cpan/Encode/bin/enc2xs | 1 +
14 1 file changed, 1 insertion(+)
15
16diff --git a/cpan/Encode/bin/enc2xs b/cpan/Encode/bin/enc2xs
17index 619b64b757..bfce9ee735 100644
18--- a/cpan/Encode/bin/enc2xs
19+++ b/cpan/Encode/bin/enc2xs
20@@ -144,6 +144,7 @@ getopts('CM:SQqOo:f:n:v',\%opt);
21 $opt{M} and make_makefile_pl($opt{M}, @ARGV);
22 $opt{C} and make_configlocal_pm($opt{C}, @ARGV);
23 $opt{v} ||= $ENV{ENC2XS_VERBOSE};
24+$opt{q} ||= $ENV{ENC2XS_NO_COMMENTS};
25
26 sub verbose {
27 print STDERR @_ if $opt{v};
28--
292.21.0
30
diff --git a/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch b/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch
new file mode 100644
index 0000000000..e70ff67f72
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch
@@ -0,0 +1,32 @@
1From 260ebd15e16cd86b9b58e5c5f3a496b3853ca46d Mon Sep 17 00:00:00 2001
2From: Joshua Watt <JPEWhacker@gmail.com>
3Date: Mon, 17 Jun 2019 10:47:23 -0500
4Subject: [PATCH 2/2] Constant: Fix up shebang
5
6The instructions indicate that the script should be explicitly passed to
7"perl -x", so automatically setting the #! to be ^X is unnecessary and
8makes the file non-reproducible when building because ^X could be the
9absolute path to miniperl.
10
11Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
12Upstream-status: Submitted [https://rt.cpan.org/Public/Bug/Display.html?id=129866]
13---
14 cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm b/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm
18index 14eb809714..d4d074e121 100644
19--- a/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm
20+++ b/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm
21@@ -219,7 +219,7 @@ sub dogfood {
22 Regenerate these constant functions by feeding this entire source file to
23 perl -x
24
25-#!$^X -w
26+#!/usr/bin/env perl -x -w
27 use ExtUtils::Constant qw (constant_types C_constant XS_constant);
28
29 EOT
30--
312.21.0
32
diff --git a/meta/recipes-devtools/perl/perl_5.30.0.bb b/meta/recipes-devtools/perl/perl_5.30.0.bb
index b18a6b6913..e3664290e3 100644
--- a/meta/recipes-devtools/perl/perl_5.30.0.bb
+++ b/meta/recipes-devtools/perl/perl_5.30.0.bb
@@ -19,6 +19,8 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
19 file://perl-dynloader.patch \ 19 file://perl-dynloader.patch \
20 file://0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch \ 20 file://0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch \
21 file://fix-setgroup.patch \ 21 file://fix-setgroup.patch \
22 file://0001-enc2xs-Add-environment-variable-to-suppress-comments.patch \
23 file://0002-Constant-Fix-up-shebang.patch \
22 " 24 "
23SRC_URI_append_class-native = " \ 25SRC_URI_append_class-native = " \
24 file://perl-configpm-switch.patch \ 26 file://perl-configpm-switch.patch \
@@ -37,6 +39,9 @@ DEPENDS += "db gdbm zlib virtual/crypt"
37 39
38PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0" 40PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0"
39 41
42# Don't generate comments in enc2xs output files. They are not reproducible
43export ENC2XS_NO_COMMENTS = "1"
44
40do_unpack_append() { 45do_unpack_append() {
41 bb.build.exec_func('do_copy_perlcross', d) 46 bb.build.exec_func('do_copy_perlcross', d)
42} 47}