mirror of
https://git.yoctoproject.org/poky
synced 2026-04-11 08:02:21 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
10ce84dd19
commit
08be264c8d
@@ -0,0 +1,30 @@
|
||||
From 31a2c5555f9ef32f35d7d5ce1fd09a010ba5f5c6 Mon Sep 17 00:00:00 2001
|
||||
From: Joshua Watt <JPEWhacker@gmail.com>
|
||||
Date: Mon, 17 Jun 2019 10:47:15 -0500
|
||||
Subject: [PATCH 1/2] enc2xs: Add environment variable to suppress comments
|
||||
|
||||
Comment generation in enc2xs can now be suppressed by setting the
|
||||
ENC2XS_NO_COMMENTS environment variable. This allows enc2xs to produce
|
||||
reproducible output by omitting the name of the generating program.
|
||||
|
||||
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
|
||||
Upstream-status: Accepted [https://github.com/dankogai/p5-encode/pull/145]
|
||||
---
|
||||
cpan/Encode/bin/enc2xs | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/cpan/Encode/bin/enc2xs b/cpan/Encode/bin/enc2xs
|
||||
index 619b64b757..bfce9ee735 100644
|
||||
--- a/cpan/Encode/bin/enc2xs
|
||||
+++ b/cpan/Encode/bin/enc2xs
|
||||
@@ -144,6 +144,7 @@ getopts('CM:SQqOo:f:n:v',\%opt);
|
||||
$opt{M} and make_makefile_pl($opt{M}, @ARGV);
|
||||
$opt{C} and make_configlocal_pm($opt{C}, @ARGV);
|
||||
$opt{v} ||= $ENV{ENC2XS_VERBOSE};
|
||||
+$opt{q} ||= $ENV{ENC2XS_NO_COMMENTS};
|
||||
|
||||
sub verbose {
|
||||
print STDERR @_ if $opt{v};
|
||||
--
|
||||
2.21.0
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 260ebd15e16cd86b9b58e5c5f3a496b3853ca46d Mon Sep 17 00:00:00 2001
|
||||
From: Joshua Watt <JPEWhacker@gmail.com>
|
||||
Date: Mon, 17 Jun 2019 10:47:23 -0500
|
||||
Subject: [PATCH 2/2] Constant: Fix up shebang
|
||||
|
||||
The instructions indicate that the script should be explicitly passed to
|
||||
"perl -x", so automatically setting the #! to be ^X is unnecessary and
|
||||
makes the file non-reproducible when building because ^X could be the
|
||||
absolute path to miniperl.
|
||||
|
||||
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
|
||||
Upstream-status: Submitted [https://rt.cpan.org/Public/Bug/Display.html?id=129866]
|
||||
---
|
||||
cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm b/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm
|
||||
index 14eb809714..d4d074e121 100644
|
||||
--- a/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm
|
||||
+++ b/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm
|
||||
@@ -219,7 +219,7 @@ sub dogfood {
|
||||
Regenerate these constant functions by feeding this entire source file to
|
||||
perl -x
|
||||
|
||||
-#!$^X -w
|
||||
+#!/usr/bin/env perl -x -w
|
||||
use ExtUtils::Constant qw (constant_types C_constant XS_constant);
|
||||
|
||||
EOT
|
||||
--
|
||||
2.21.0
|
||||
|
||||
@@ -19,6 +19,8 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
|
||||
file://perl-dynloader.patch \
|
||||
file://0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch \
|
||||
file://fix-setgroup.patch \
|
||||
file://0001-enc2xs-Add-environment-variable-to-suppress-comments.patch \
|
||||
file://0002-Constant-Fix-up-shebang.patch \
|
||||
"
|
||||
SRC_URI_append_class-native = " \
|
||||
file://perl-configpm-switch.patch \
|
||||
@@ -37,6 +39,9 @@ DEPENDS += "db gdbm zlib virtual/crypt"
|
||||
|
||||
PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0"
|
||||
|
||||
# Don't generate comments in enc2xs output files. They are not reproducible
|
||||
export ENC2XS_NO_COMMENTS = "1"
|
||||
|
||||
do_unpack_append() {
|
||||
bb.build.exec_func('do_copy_perlcross', d)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user