Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,24 @@
From a033c9ece12b6eead48eed63f106ccdec6159b0c Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 20 Dec 2019 16:26:55 +0100
Subject: [PATCH] CheckLib.pm: do not attempt to run a cross executable
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
inc/Devel/CheckLib.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/inc/Devel/CheckLib.pm b/inc/Devel/CheckLib.pm
index 36a451a..b04acc1 100644
--- a/inc/Devel/CheckLib.pm
+++ b/inc/Devel/CheckLib.pm
@@ -330,7 +330,7 @@ sub assert_lib {
push @missing, $lib if $rv != 0 || !-x $exefile;
my $absexefile = File::Spec->rel2abs($exefile);
$absexefile = '"' . $absexefile . '"' if $absexefile =~ m/\s/;
- push @wrongresult, $lib if $rv == 0 && -x $exefile && system($absexefile) != 0;
+ push @wrongresult, $lib if $rv == 0 && -x $exefile && 0 != 0;
unlink $ofile if -e $ofile;
_cleanup_exe($exefile);
}
@@ -0,0 +1,34 @@
From e8e095b9c71c58f8197d6315359446b6b084cb2b Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Tue, 5 Jun 2018 14:58:42 +0300
Subject: [PATCH] Somehow this module breaks through the perl wrapper and
declares perl binary to be 'perl.real'. This patch forces it back to perl.
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
index 948c476..f537526 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
@@ -1110,6 +1110,9 @@ WARNING
}
foreach my $name (@$names){
+ # Getting MakeMaker.pm use perl wrapper instead of 'perl.real' directly
+ $name =~ s/perl\.real/perl/ if ($name =~ /perl\.real/);
+
my ($abs, $use_dir);
if ($self->file_name_is_absolute($name)) { # /foo/bar
$abs = $name;
@@ -2006,6 +2009,7 @@ sub init_PERL {
$self->{PERL} ||=
$self->find_perl(5.0, \@perls, \@defpath, $Verbose );
+
my $perl = $self->{PERL};
$perl =~ s/^"//;
@@ -0,0 +1,36 @@
From a73fff1fcf0def4ce93964f1b63fe3ad0967259d Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Fri, 18 Feb 2022 09:44:26 +0000
Subject: [PATCH] cpan/Sys-Syslog/Makefile.PL: Fix _PATH_LOG for deterministic
It checks host's path such as /dev/log and uses it, this doesn't make sense for
cross build, and it causes undeterministic, for example, the contianer os
usually doesn't have /dev/log which leads to a different build result since
other host usually has /dev/log, so make it always use the default value to fix
the issue.
Submitted a ticket to upstream: https://rt.cpan.org/Ticket/Display.html?id=141612
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
cpan/Sys-Syslog/Makefile.PL | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cpan/Sys-Syslog/Makefile.PL b/cpan/Sys-Syslog/Makefile.PL
index d09ba69..d44e58c 100644
--- a/cpan/Sys-Syslog/Makefile.PL
+++ b/cpan/Sys-Syslog/Makefile.PL
@@ -130,6 +130,8 @@ else {
$_PATH_LOG = "";
}
+# OE specific
+$_PATH_LOG = "";
# if possible, generate the code that handles the constants with
# ExtUtils::Constant, otherwise use cached copy in fallback/
--
2.31.1
@@ -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
@@ -0,0 +1,29 @@
From a625ec2cc3a0b6116c1f8b831d3480deb621c245 Mon Sep 17 00:00:00 2001
From: Stig Palmquist <git@stig.io>
Date: Tue, 28 Feb 2023 11:54:06 +0100
Subject: [PATCH] Add verify_SSL=>1 to HTTP::Tiny to verify https server
identity
CVE: CVE-2023-31484
Upstream-Status: Backport [https://github.com/andk/cpanpm/commit/9c98370287f4e709924aee7c58ef21c85289a7f0]
Signed-off-by: Soumya <soumya.sambu@windriver.com>
---
cpan/CPAN/lib/CPAN/HTTP/Client.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/cpan/CPAN/lib/CPAN/HTTP/Client.pm b/cpan/CPAN/lib/CPAN/HTTP/Client.pm
index 4fc792c..a616fee 100644
--- a/cpan/CPAN/lib/CPAN/HTTP/Client.pm
+++ b/cpan/CPAN/lib/CPAN/HTTP/Client.pm
@@ -32,6 +32,7 @@ sub mirror {
my $want_proxy = $self->_want_proxy($uri);
my $http = HTTP::Tiny->new(
+ verify_SSL => 1,
$want_proxy ? (proxy => $self->{proxy}) : ()
);
--
2.40.0
@@ -0,0 +1,217 @@
From 77f557ef84698efeb6eed04e4a9704eaf85b741d
From: Stig Palmquist <git@stig.io>
Date: Mon Jun 5 16:46:22 2023 +0200
Subject: [PATCH] Change verify_SSL default to 1, add ENV var to enable
insecure default
- Changes the `verify_SSL` default parameter from `0` to `1`
Based on patch by Dominic Hargreaves:
https://salsa.debian.org/perl-team/interpreter/perl/-/commit/1490431e40e22052f75a0b3449f1f53cbd27ba92
CVE: CVE-2023-31486
- Add check for `$ENV{PERL_HTTP_TINY_SSL_INSECURE_BY_DEFAULT}` that
enables the previous insecure default behaviour if set to `1`.
This provides a workaround for users who encounter problems with the
new `verify_SSL` default.
Example to disable certificate checks:
```
$ PERL_HTTP_TINY_SSL_INSECURE_BY_DEFAULT=1 ./script.pl
```
- Updates to documentation:
- Describe changing the verify_SSL value
- Describe the escape-hatch environment variable
- Remove rationale for not enabling verify_SSL
- Add missing certificate search paths
- Replace "SSL" with "TLS/SSL" where appropriate
- Use "machine-in-the-middle" instead of "man-in-the-middle"
Upstream-Status: Backport [https://github.com/chansen/p5-http-tiny/commit/77f557ef84698efeb6eed04e4a9704eaf85b741d]
Signed-off-by: Soumya <soumya.sambu@windriver.com>
---
cpan/HTTP-Tiny/lib/HTTP/Tiny.pm | 86 ++++++++++++++++++++++-----------
1 file changed, 57 insertions(+), 29 deletions(-)
diff --git a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
index 83ca06d..ebc34a1 100644
--- a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
+++ b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
@@ -40,10 +40,14 @@ sub _croak { require Carp; Carp::croak(@_) }
#pod * C<timeout> — Request timeout in seconds (default is 60) If a socket open,
#pod read or write takes longer than the timeout, the request response status code
#pod will be 599.
-#pod * C<verify_SSL> — A boolean that indicates whether to validate the SSL
-#pod certificate of an C<https> — connection (default is false)
+#pod * C<verify_SSL> — A boolean that indicates whether to validate the TLS/SSL
+#pod certificate of an C<https> — connection (default is true). Changed from false
+#pod to true in version 0.083.
#pod * C<SSL_options> — A hashref of C<SSL_*> — options to pass through to
#pod L<IO::Socket::SSL>
+#pod * C<$ENV{PERL_HTTP_TINY_SSL_INSECURE_BY_DEFAULT}> - Changes the default
+#pod certificate verification behavior to not check server identity if set to 1.
+#pod Only effective if C<verify_SSL> is not set. Added in version 0.083.
#pod
#pod An accessor/mutator method exists for each attribute.
#pod
@@ -111,11 +115,17 @@ sub timeout {
sub new {
my($class, %args) = @_;
+ # Support lower case verify_ssl argument, but only if verify_SSL is not
+ # true.
+ if ( exists $args{verify_ssl} ) {
+ $args{verify_SSL} ||= $args{verify_ssl};
+ }
+
my $self = {
max_redirect => 5,
timeout => defined $args{timeout} ? $args{timeout} : 60,
keep_alive => 1,
- verify_SSL => $args{verify_SSL} || $args{verify_ssl} || 0, # no verification by default
+ verify_SSL => defined $args{verify_SSL} ? $args{verify_SSL} : _verify_SSL_default(),
no_proxy => $ENV{no_proxy},
};
@@ -134,6 +144,13 @@ sub new {
return $self;
}
+sub _verify_SSL_default {
+ my ($self) = @_;
+ # Check if insecure default certificate verification behaviour has been
+ # changed by the user by setting PERL_HTTP_TINY_SSL_INSECURE_BY_DEFAULT=1
+ return (($ENV{PERL_HTTP_TINY_INSECURE_BY_DEFAULT} || '') eq '1') ? 0 : 1;
+}
+
sub _set_proxies {
my ($self) = @_;
@@ -1055,7 +1072,7 @@ sub new {
timeout => 60,
max_line_size => 16384,
max_header_lines => 64,
- verify_SSL => 0,
+ verify_SSL => HTTP::Tiny::_verify_SSL_default(),
SSL_options => {},
%args
}, $class;
@@ -2043,11 +2060,11 @@ proxy
timeout
verify_SSL
-=head1 SSL SUPPORT
+=head1 TLS/SSL SUPPORT
Direct C<https> connections are supported only if L<IO::Socket::SSL> 1.56 or
greater and L<Net::SSLeay> 1.49 or greater are installed. An error will occur
-if new enough versions of these modules are not installed or if the SSL
+if new enough versions of these modules are not installed or if the TLS
encryption fails. You can also use C<HTTP::Tiny::can_ssl()> utility function
that returns boolean to see if the required modules are installed.
@@ -2055,7 +2072,7 @@ An C<https> connection may be made via an C<http> proxy that supports the CONNEC
command (i.e. RFC 2817). You may not proxy C<https> via a proxy that itself
requires C<https> to communicate.
-SSL provides two distinct capabilities:
+TLS/SSL provides two distinct capabilities:
=over 4
@@ -2069,24 +2086,17 @@ Verification of server identity
=back
-B<By default, HTTP::Tiny does not verify server identity>.
-
-Server identity verification is controversial and potentially tricky because it
-depends on a (usually paid) third-party Certificate Authority (CA) trust model
-to validate a certificate as legitimate. This discriminates against servers
-with self-signed certificates or certificates signed by free, community-driven
-CA's such as L<CAcert.org|http://cacert.org>.
+B<By default, HTTP::Tiny verifies server identity>.
-By default, HTTP::Tiny does not make any assumptions about your trust model,
-threat level or risk tolerance. It just aims to give you an encrypted channel
-when you need one.
+This was changed in version 0.083 due to security concerns. The previous default
+behavior can be enabled by setting C<$ENV{PERL_HTTP_TINY_SSL_INSECURE_BY_DEFAULT}>
+to 1.
-Setting the C<verify_SSL> attribute to a true value will make HTTP::Tiny verify
-that an SSL connection has a valid SSL certificate corresponding to the host
-name of the connection and that the SSL certificate has been verified by a CA.
-Assuming you trust the CA, this will protect against a L<man-in-the-middle
-attack|http://en.wikipedia.org/wiki/Man-in-the-middle_attack>. If you are
-concerned about security, you should enable this option.
+Verification is done by checking that that the TLS/SSL connection has a valid
+certificate corresponding to the host name of the connection and that the
+certificate has been verified by a CA. Assuming you trust the CA, this will
+protect against L<machine-in-the-middle
+attacks|http://en.wikipedia.org/wiki/Machine-in-the-middle_attack>.
Certificate verification requires a file containing trusted CA certificates.
@@ -2094,9 +2104,7 @@ If the environment variable C<SSL_CERT_FILE> is present, HTTP::Tiny
will try to find a CA certificate file in that location.
If the L<Mozilla::CA> module is installed, HTTP::Tiny will use the CA file
-included with it as a source of trusted CA's. (This means you trust Mozilla,
-the author of Mozilla::CA, the CPAN mirror where you got Mozilla::CA, the
-toolchain used to install it, and your operating system security, right?)
+included with it as a source of trusted CA's.
If that module is not available, then HTTP::Tiny will search several
system-specific default locations for a CA certificate file:
@@ -2115,13 +2123,33 @@ system-specific default locations for a CA certificate file:
/etc/ssl/ca-bundle.pem
+=item *
+
+/etc/openssl/certs/ca-certificates.crt
+
+=item *
+
+/etc/ssl/cert.pem
+
+=item *
+
+/usr/local/share/certs/ca-root-nss.crt
+
+=item *
+
+/etc/pki/tls/cacert.pem
+
+=item *
+
+/etc/certs/ca-certificates.crt
+
=back
An error will be occur if C<verify_SSL> is true and no CA certificate file
is available.
-If you desire complete control over SSL connections, the C<SSL_options> attribute
-lets you provide a hash reference that will be passed through to
+If you desire complete control over TLS/SSL connections, the C<SSL_options>
+attribute lets you provide a hash reference that will be passed through to
C<IO::Socket::SSL::start_SSL()>, overriding any options set by HTTP::Tiny. For
example, to provide your own trusted CA file:
@@ -2131,7 +2159,7 @@ example, to provide your own trusted CA file:
The C<SSL_options> attribute could also be used for such things as providing a
client certificate for authentication to a server or controlling the choice of
-cipher used for the SSL connection. See L<IO::Socket::SSL> documentation for
+cipher used for the TLS/SSL connection. See L<IO::Socket::SSL> documentation for
details.
=head1 PROXY SUPPORT
--
2.40.0
@@ -0,0 +1,36 @@
From a22785783b17cbaa28afaee4a024d81a1903701d
From: Stig Palmquist <git@stig.io>
Date: Sun Jun 18 11:36:05 2023 +0200
Subject: [PATCH] Fix incorrect env var name for verify_SSL default
The variable to override the verify_SSL default differed slightly in the
documentation from what was checked for in the code.
This commit makes the code use `PERL_HTTP_TINY_SSL_INSECURE_BY_DEFAULT`
as documented, instead of `PERL_HTTP_TINY_INSECURE_BY_DEFAULT` which was
missing `SSL_`
CVE: CVE-2023-31486
Upstream-Status: Backport [https://github.com/chansen/p5-http-tiny/commit/a22785783b17cbaa28afaee4a024d81a1903701d]
Signed-off-by: Soumya <soumya.sambu@windriver.com>
---
cpan/HTTP-Tiny/lib/HTTP/Tiny.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
index ebc34a1..65ac8ff 100644
--- a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
+++ b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
@@ -148,7 +148,7 @@ sub _verify_SSL_default {
my ($self) = @_;
# Check if insecure default certificate verification behaviour has been
# changed by the user by setting PERL_HTTP_TINY_SSL_INSECURE_BY_DEFAULT=1
- return (($ENV{PERL_HTTP_TINY_INSECURE_BY_DEFAULT} || '') eq '1') ? 0 : 1;
+ return (($ENV{PERL_HTTP_TINY_SSL_INSECURE_BY_DEFAULT} || '') eq '1') ? 0 : 1;
}
sub _set_proxies {
--
2.40.0
@@ -0,0 +1,45 @@
Fixes to make the perl build reproducible:
a) Remove the \n from configure_attr.sh since it gets quoted differently depending on
whether the shell is bash or dash which can cause the test result to be incorrect.
Reported upstream: https://github.com/arsv/perl-cross/issues/87
b) Sort the order of the module lists from configure_mods.sh since otherwise
the result isn't the same leading to makefile differences.
Reported upstream: https://github.com/arsv/perl-cross/issues/88
c) Sort the Encode::Byte byte_t.fnm file output (and the makefile depends whilst
there for good measure)
This needs to go to upstream perl (not done)
d) Use bash for perl-cross configure since otherwise trnl gets set to "\n" with bash
and "" with dash
Reported upstream: https://github.com/arsv/perl-cross/issues/87
RP 2020/2/7
Upstream-Status: Pending [75% submitted]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
Index: perl-5.30.1/cpan/Encode/Byte/Makefile.PL
===================================================================
--- perl-5.30.1.orig/cpan/Encode/Byte/Makefile.PL
+++ perl-5.30.1/cpan/Encode/Byte/Makefile.PL
@@ -171,7 +171,7 @@ sub postamble
my $lengthsofar = length($str);
my $continuator = '';
$str .= "$table.c : $enc2xs Makefile.PL";
- foreach my $file (@{$tables{$table}})
+ foreach my $file (sort (@{$tables{$table}}))
{
$str .= $continuator.' '.$self->catfile($dir,$file);
if ( length($str)-$lengthsofar > 128*$numlines )
@@ -189,7 +189,7 @@ sub postamble
qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
open (FILELIST, ">$table.fnm")
|| die "Could not open $table.fnm: $!";
- foreach my $file (@{$tables{$table}})
+ foreach my $file (sort (@{$tables{$table}}))
{
print FILELIST $self->catfile($dir,$file) . "\n";
}
@@ -0,0 +1,20 @@
The code is encoding host compiler parameters into target builds. Avoid
this for our target builds (patch is target specific, not native)
Upstream-Status: Inappropriate [Cross compile hack]
RP 2020/2/18
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Index: perl-5.30.1/cpan/Encode/bin/enc2xs
===================================================================
--- perl-5.30.1.orig/cpan/Encode/bin/enc2xs
+++ perl-5.30.1/cpan/Encode/bin/enc2xs
@@ -195,7 +195,7 @@ sub compiler_info {
# above becomes false.
my $sized = $declaration && !($compat && !$pedantic);
- return ($cpp, $static, $sized);
+ return (0, 1, 1);
}
@@ -0,0 +1,37 @@
From 8e1efba7560d8d55524c7a0f1b0539ddce419b86 Mon Sep 17 00:00:00 2001
From: Brendan O'Dea <bod@debian.org>
Date: Fri, 16 Dec 2005 01:32:14 +1100
Subject: [PATCH 6/8] Remove Errno version check due to upgrade problems with
long-running processes.
Bug-Debian: http://bugs.debian.org/343351
Remove version check which can cause problems for long running
processes embedding perl when upgrading to a newer version,
compatible, but built on a different machine.
Patch-Name: debian/errno_ver.diff
Upstream-Status: Pending
---
ext/Errno/Errno_pm.PL | 5 -----
1 file changed, 5 deletions(-)
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 6251a3c..eeed445 100644
--- a/ext/Errno/Errno_pm.PL
+++ b/ext/Errno/Errno_pm.PL
@@ -294,11 +294,6 @@ EDQ
# they've already declared perl doesn't need to worry about this risk.
if(!$ENV{'PERL_BUILD_EXPAND_CONFIG_VARS'}) {
print <<"CONFIG_CHECK_END";
-use Config;
-"\$Config{'archname'}-\$Config{'osvers'}" eq
-"$archname-$Config{'osvers'}" or
- die "Errno architecture ($archname-$Config{'osvers'}) does not match executable architecture (\$Config{'archname'}-\$Config{'osvers'})";
-
CONFIG_CHECK_END
}
--
2.1.4
@@ -0,0 +1,27 @@
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Index: perl-5.8.8/lib/ExtUtils/MM_Unix.pm
===================================================================
--- perl-5.12.3.orig/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 2008-10-31 22:01:35.000000000 +0000
+++ perl-5.12.3/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 2008-10-31 22:01:35.000000000 +0000
@@ -1597,6 +1597,19 @@
$self->{PERL_LIB} ||= $Config{privlibexp};
$self->{PERL_ARCHLIB} ||= $Config{archlibexp};
$self->{PERL_INC} = $self->catdir("$self->{PERL_ARCHLIB}","CORE"); # wild guess for now
+ # Check for environment override so we'll find the headers in the correct place
+ if (defined $ENV{PERL_LIB})
+ {
+ $self->{PERL_LIB} = $ENV{PERL_LIB};
+ }
+ if (defined $ENV{PERL_ARCHLIB})
+ {
+ $self->{PERL_ARCHLIB} = $ENV{PERL_ARCHLIB};
+ }
+ if (defined $ENV{PERL_INC})
+ {
+ $self->{PERL_INC} = $ENV{PERL_INC};
+ }
my $perl_h;
if (not -f ($perl_h = $self->catfile($self->{PERL_INC},"perl.h"))
@@ -0,0 +1,57 @@
From e789c1a0c9de5928a3b49f5b9d81b63636f5c7bb Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Sun, 27 May 2007 21:04:11 +0000
Subject: [PATCH] perl: 5.8.7 -> 5.8.8 (from OE)
This patch is used for perl-native only. It enables the switching of
configuration files between Config_heavy.pl and
Config_heavy-target.pl by setting the environment variables
PERLCONFIGTARGET - the later containing settings for the target while
the former contains those for the host. This will allow cpan.bbclass
to use the settings appropriate for the native and/or target builds
as required. This also disables the use of the cache since the cached
values would be valid for the host only.
Upstream-Status: Inappropriate [native]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
configpm | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/configpm b/configpm
index 94a4778..99b20c9 100755
--- a/configpm
+++ b/configpm
@@ -687,7 +687,7 @@ sub FETCH {
my($self, $key) = @_;
# check for cached value (which may be undef so we use exists not defined)
- return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key);
+ return $self->fetch_string($key);
}
ENDOFEND
@@ -845,7 +845,21 @@ $config_txt .= sprintf <<'ENDOFTIE', $fast_config;
sub DESTROY { }
sub AUTOLOAD {
- require 'Config_heavy.pl';
+ my $cfgfile = 'Config_heavy.pl';
+ if (defined $ENV{PERLCONFIGTARGET} and $ENV{PERLCONFIGTARGET} eq "yes")
+ {
+ $cfgfile = 'Config_heavy-target.pl';
+ }
+ if (defined $ENV{PERL_ARCHLIB})
+ {
+ push @INC, $ENV{PERL_ARCHLIB};
+ require $cfgfile;
+ pop @INC;
+ }
+ else
+ {
+ require $cfgfile;
+ }
goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
}
@@ -0,0 +1,38 @@
Upstream-Status: Inappropriate [embedded specific]
Allow the location that .so files are searched for for dynamic
loading to be changed via an environment variable. This is to allow
us to load .so's from the host system while building for the target
system.
Update by Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/21
Index: perl-5.24.1/dist/XSLoader/XSLoader_pm.PL
===================================================================
--- perl-5.24.1.orig/dist/XSLoader/XSLoader_pm.PL
+++ perl-5.24.1/dist/XSLoader/XSLoader_pm.PL
@@ -52,6 +52,24 @@ sub load {
my ($caller, $modlibname) = caller();
my $module = $caller;
+ # OE: Allow env to form dynamic loader to look in a different place
+ # This is so it finds the host .so files, not the targets
+ if (defined $ENV{PERLHOSTLIB})
+ {
+ my $hostlib = $ENV{PERLHOSTLIB};
+ my $hostarchlib = $ENV{PERLHOSTARCHLIB};
+ print STDERR "*** Module name IN: $modlibname\n";
+ my ($p1, $p2, $p3, $p4, $p5, $p6, $p7) = $modlibname =~ m/(^(.*lib\w*\/)?)((perl5\/[0-9\.]*\/)?)(([^\/]*)\/)?(.*)$/;
+ print STDERR "*** p1: $p1 p3: $p3 p5: $p5 p7: $p7\n";
+ if ( $p1 ne "" ) {
+ $modlibname = $hostlib.$p7;
+ }
+ if ( $p6 ne "" ) {
+ $modlibname = $hostarchlib.$p7;
+ }
+ print STDERR "*** Module name OUT: $modlibname\n";
+ }
+
if (@_) {
$module = $_[0];
} else {
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,2 @@
#!/bin/sh
cd t && PERL_BUILD_PACKAGING=1 ./TEST | sed -u -e 's|\(.*\) .* ok$|PASS: \1|' -e 's|\(.*\) .* skipped|SKIP: \1|' -e 's|\(.*\) \.\(.*\)|FAIL: \1|'