Compare commits

..

43 Commits

Author SHA1 Message Date
be1a82bb6b add necessary files 2025-02-05 14:14:04 +08:00
ffca086e39 fix grammar err 2025-02-05 13:39:18 +08:00
ff517f9cd6 attempt to make perl-macros package 2025-02-05 13:04:46 +08:00
openeuler-ci-bot
878143eeae
!139 disable cleaning empty perl directories & split out patch adding link to libperl.so into two separated patches
From: @fundawang 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2025-01-22 05:49:42 +00:00
Funda Wang
8b4c8dfb4e split out patch adding link to libperl.so into two separated patches 2025-01-19 19:49:39 +08:00
openeuler-ci-bot
ffb70d00fa
!135 Delete the man of File::Compare and File::Find from the main package.
From: @hongjinghao 
Reviewed-by: @xujing99 
Signed-off-by: @xujing99
2024-09-03 09:18:27 +00:00
hongjinghao
4c5d7a5ceb Delete the man of File::Compare and File::Find from the main package. 2024-09-03 16:20:42 +08:00
openeuler-ci-bot
33eb49892a
!131 License info rectification
From: @hugel 
Reviewed-by: @xujing99 
Signed-off-by: @xujing99
2024-08-15 03:30:20 +00:00
gengqihu
2e1a2f34c1 License info rectification 2024-08-14 13:52:01 +08:00
openeuler-ci-bot
8aa2de228b
!127 同步上游社区补丁
From: @hongjinghao 
Reviewed-by: @xujing99 
Signed-off-by: @xujing99
2024-08-01 03:11:35 +00:00
hongjinghao
dd827b7a06 backport update stream 2024-08-01 09:22:16 +08:00
openeuler-ci-bot
bc8b9f6be9
!125 [sync] PR-116: 解决执行“ldd -r re.so”命令有大量的“undefined symbol”报错问题
From: @openeuler-sync-bot 
Reviewed-by: @xujing99 
Signed-off-by: @xujing99
2024-06-14 01:51:56 +00:00
zhangzikang1992
7e79f617c8 Fix perl re.so undefined symbol error
(cherry picked from commit 1bb1877952)
2024-06-13 15:08:20 +08:00
openeuler-ci-bot
89d3c4771c
!110 Fix CVE-2023-47100
From: @huyubiao 
Reviewed-by: @openeuler-basic 
Signed-off-by: @openeuler-basic
2023-12-11 13:03:53 +00:00
h30032433
50674f8259 Fix CVE-2023-47100 2023-12-11 16:52:42 +08:00
openeuler-ci-bot
b58c66a446
!103 Fix CVE-2023-47039
From: @hongjinghao 
Reviewed-by: @openeuler-basic 
Signed-off-by: @openeuler-basic
2023-12-08 09:02:07 +00:00
hongjinghao
ad833b01b2 Fix CVE-2023-47039 2023-12-08 15:31:50 +08:00
openeuler-ci-bot
a745a85378
!98 Fix CVE-2023-47038
From: @hongjinghao 
Reviewed-by: @openeuler-basic 
Signed-off-by: @openeuler-basic
2023-11-27 11:47:54 +00:00
hongjinghao
afbf4694c4 Fix CVE-2023-47038 2023-11-27 17:23:26 +08:00
openeuler-ci-bot
de88a4dc3c
!89 delete unused files and provides
From: @yangmingtaip 
Reviewed-by: @licunlong 
Signed-off-by: @licunlong
2023-08-25 09:02:42 +00:00
yangmingtai
6e5a2254ee delete unused files and provides 2023-08-25 15:06:43 +08:00
openeuler-ci-bot
a1ee9c0be4
!88 update version to 3.89
From: @yangmingtaip 
Reviewed-by: @openeuler-basic 
Signed-off-by: @openeuler-basic
2023-08-01 13:09:09 +00:00
yangmingtai
0ca5515413 update version to 5.38.0 2023-07-31 13:16:47 +08:00
openeuler-ci-bot
499c7893fb
!85 add Perl_my_strlcpy-and-Perl_my_strlcat to fix build failed
From: @yangmingtaip 
Reviewed-by: @openeuler-basic 
Signed-off-by: @openeuler-basic
2023-07-27 09:28:45 +00:00
yangmingtai
be9272b825 add Perl_my_strlcpy-and-Perl_my_strlcat to fix build failed 2023-07-27 16:13:41 +08:00
openeuler-ci-bot
e2b2e5be1c
!77 fix CVE-2023-31486
From: @yangmingtaip 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2023-06-27 01:29:48 +00:00
yangmingtai
752c922dcf fix CVE-2023-31486 2023-06-26 21:44:17 +08:00
openeuler-ci-bot
fd4594b7de
!71 fix CVE-2023-31484
From: @dongyuzhen 
Reviewed-by: @openeuler-basic 
Signed-off-by: @openeuler-basic
2023-05-16 01:06:57 +00:00
dongyuzhen
693306b48d fix CVE-2023-31484 2023-05-15 17:18:34 +08:00
openeuler-ci-bot
38dc1daf4f
!69 fix compile failed caused by zlib update
From: @yangmingtaip 
Reviewed-by: @licunlong 
Signed-off-by: @licunlong
2023-01-17 13:15:12 +00:00
yangmingtaip
d644ed9cbb fix compile failed caused by zlib update 2023-01-17 20:39:24 +08:00
openeuler-ci-bot
d3881bb50d
!65 fix the date error in changelog
From: @dongyuzhen 
Reviewed-by: @licunlong 
Signed-off-by: @licunlong
2022-08-27 06:08:26 +00:00
dongyuzhen
c79a31f6ea fix changelog 2022-08-26 14:53:27 +08:00
openeuler-ci-bot
0f24d5a32a
!61 添加升级至5.34.0版本误删除的补丁
From: @dongyuzhen 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2022-07-04 01:16:30 +00:00
dongyuzhen
43e44dabcf Add patches that are deleted during the upgrade 2022-07-01 17:07:00 +08:00
openeuler-ci-bot
e713e89ca4
!57 【轻量级 PR】:fix bogus date in %changelog
From: @zhangkea 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
2022-06-16 09:28:30 +00:00
zhangkea
18dcee2bba fix bogus date in %changelog 2022-06-16 16:58:41 +08:00
openeuler-ci-bot
5ac46102b8
!54 add build conditions to control installing systemtap
From: @zhouwenpei 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2022-03-30 01:35:45 +00:00
zhouwenpei
d6eb680e60 add build conditions to control installing systemtap 2022-03-29 17:15:57 +08:00
openeuler-ci-bot
6793c10dfd
!51 upgrade version to 5.34.0
From: @weiwei_150212 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2022-03-28 00:59:07 +00:00
weiwei_tiantian
bc135e43b1 upgrade version to 5.34.0 2022-03-18 16:39:27 +08:00
openeuler-ci-bot
a77779d366
!49 fix CVE-2021-36770
From: @xinyingchao 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
2022-02-24 12:07:36 +00:00
xinyingchao
e24e962650 fix CVE-2021-36770 2022-02-24 17:35:48 +08:00
24 changed files with 476 additions and 547 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
*.xz filter=lfs diff=lfs merge=lfs -text

2
.lfsconfig Normal file
View File

@ -0,0 +1,2 @@
[lfs]
url = https://artlfs.openeuler.openatom.cn/src-openEuler/perl

42
README.macros Normal file
View File

@ -0,0 +1,42 @@
README for perl-macros
Author: Christian Wittmer <chris@computersalat.de>
%perl_gen_filelist generates an rpmlint happy filelist of your installed files
In most cases you only need to check the %doc part
sometimes there is a "Changes" or "ChangeLog",....
Requirements for %perl_gen_filelist
You have to define following parts inside your spec file
Example:
BuildRequires: perl-macros
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root)
%doc Changes README
And here an Example of the generated filelist:
%dir /usr/lib/perl5/vendor_perl/5.8.8/Algorithm
/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/DiffOld.pm
/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/diff.pl
/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/Diff.pm
/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/diffnew.pl
/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/cdiff.pl
/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/htmldiff.pl
%dir /usr/lib/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/Algorithm
%dir /usr/lib/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/Algorithm/Diff
/usr/lib/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/Algorithm/Diff/.packlist
/usr/share/man/man?/*
/var/adm/perl-modules/perl-Algorithm-Diff

View File

@ -1,67 +0,0 @@
From 527e482dc70b035d0df4f8c77a00d81f8d775c74 Mon Sep 17 00:00:00 2001
From: Dan Kogai <dankogai+github@gmail.com>
Date: Mon, 9 Aug 2021 23:19:25 +0900
Subject: [PATCH] version 3.12 to address CVE-2021-36770
---
cpan/Encode/Encode.pm | 8 ++++----
cpan/Encode/Unicode/Unicode.xs | 2 +-
cpan/Encode/t/Unicode.t | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/cpan/Encode/Encode.pm b/cpan/Encode/Encode.pm
index d3eb3c1..769439c 100644
--- a/cpan/Encode/Encode.pm
+++ b/cpan/Encode/Encode.pm
@@ -1,5 +1,5 @@
#
-# $Id: Encode.pm,v 3.08 2020/12/02 01:27:44 dankogai Exp $
+# $Id: Encode.pm,v 3.12 2021/08/09 14:17:04 dankogai Exp dankogai $
#
package Encode;
use strict;
@@ -7,7 +7,7 @@ use warnings;
use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG};
our $VERSION;
BEGIN {
- $VERSION = sprintf "%d.%02d", q$Revision: 3.08 $ =~ /(\d+)/g;
+ $VERSION = sprintf "%d.%02d", q$Revision: 3.12 $ =~ /(\d+)/g;
require XSLoader;
XSLoader::load( __PACKAGE__, $VERSION );
}
@@ -65,8 +65,8 @@ require Encode::Config;
eval {
local $SIG{__DIE__};
local $SIG{__WARN__};
- local @INC = @INC || ();
- pop @INC if $INC[-1] eq '.';
+ local @INC = @INC;
+ pop @INC if @INC && $INC[-1] eq '.';
require Encode::ConfigLocal;
};
diff --git a/cpan/Encode/Unicode/Unicode.xs b/cpan/Encode/Unicode/Unicode.xs
index 4e111e2..18c783f 100644
--- a/cpan/Encode/Unicode/Unicode.xs
+++ b/cpan/Encode/Unicode/Unicode.xs
@@ -1,5 +1,5 @@
/*
- $Id: Unicode.xs,v 2.19 2019/01/21 03:09:59 dankogai Exp $
+ $Id: Unicode.xs,v 2.20 2021/07/23 02:26:54 dankogai Exp $
*/
#define IN_UNICODE_XS
diff --git a/cpan/Encode/t/Unicode.t b/cpan/Encode/t/Unicode.t
index 2cc5d54..9e2bcbe 100644
--- a/cpan/Encode/t/Unicode.t
+++ b/cpan/Encode/t/Unicode.t
@@ -1,5 +1,5 @@
#
-# $Id: Unicode.t,v 2.3 2012/08/05 23:08:49 dankogai Exp $
+# $Id: Unicode.t,v 2.4 2021/07/23 02:26:54 dankogai Exp $
#
# This script is written entirely in ASCII, even though quoted literals
# do include non-BMP unicode characters -- Are you happy, jhi?
--
2.27.0

View File

@ -1,78 +0,0 @@
From 43cbd598f60a85afcfc3de71e89e8a48330158f5 Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Wed, 22 Sep 2021 11:47:55 +1000
Subject: [PATCH] Don't try to Sv[PI]V() on an undef index SV in
find_uninit_var()
When trying to evaluate:
$x{$y}
or
$x[$y]
where both the index and the hash or array entry was undefined,
when trying to report the entry as uninitialised, find_uninit_var()
would try to get the string or numeric value of the index,
recursively trying to produce a warning.
This would end up overflowing the stack, producing a segmentation fault.
Fixes #19147.
(cherry picked from commit 23cca2d1f4544cb47f1124d98c308ce1f31f09a6)
Conflict:NA
Reference:https://github.com/Perl/perl5/commit/43cbd598f60a85afcfc3de71e89e8a48330158f5
---
sv.c | 7 ++++---
t/lib/warnings/sv | 13 +++++++++++++
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/sv.c b/sv.c
index 27c425a54e6f..46bf9815cd15 100644
--- a/sv.c
+++ b/sv.c
@@ -16782,14 +16782,15 @@ S_find_uninit_var(pTHX_ const OP *const obase, const SV *const uninit_sv,
}
if (index_sv && !SvMAGICAL(index_sv) && !SvROK(index_sv)) {
if (is_hv) {
- HE *he = hv_fetch_ent(MUTABLE_HV(sv), index_sv, 0, 0);
+ SV *report_index_sv = SvOK(index_sv) ? index_sv : &PL_sv_no;
+ HE *he = hv_fetch_ent(MUTABLE_HV(sv), report_index_sv, 0, 0);
if (!he) {
return varname(agg_gv, '%', agg_targ,
- index_sv, 0, FUV_SUBSCRIPT_HASH);
+ report_index_sv, 0, FUV_SUBSCRIPT_HASH);
}
}
else {
- SSize_t index = SvIV(index_sv);
+ SSize_t index = SvOK(index_sv) ? SvIV(index_sv) : 0;
SV * const * const svp =
av_fetch(MUTABLE_AV(sv), index, FALSE);
if (!svp) {
diff --git a/t/lib/warnings/sv b/t/lib/warnings/sv
index be04b8457e3a..8524c2c25a1d 100644
--- a/t/lib/warnings/sv
+++ b/t/lib/warnings/sv
@@ -211,6 +211,19 @@ Use of uninitialized value $a in join or string at - line 4.
Use of uninitialized value $a in concatenation (.) or string at - line 5.
Use of uninitialized value $a in concatenation (.) or string at - line 6.
########
+# NAME https://github.com/Perl/perl5/issues/19147
+use warnings 'uninitialized';
+my %x;
+my @z;
+my $y;
+-$x{$y};
+-$z[$y];
+EXPECT
+Use of uninitialized value $y in hash element at - line 5.
+Use of uninitialized value $x{""} in negation (-) at - line 5.
+Use of uninitialized value $y in array element at - line 6.
+Use of uninitialized value $z[0] in negation (-) at - line 6.
+########
# sv.c
use warnings 'numeric' ;
sub TIESCALAR{bless[]} ;

View File

@ -1,25 +0,0 @@
From 9c98370287f4e709924aee7c58ef21c85289a7f0 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
---
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.33.0

View File

@ -1,84 +0,0 @@
From 1490431e40e22052f75a0b3449f1f53cbd27ba92 Mon Sep 17 00:00:00 2001
From: Dominic Hargreaves <dom@earth.li>
Date: Thu, 21 May 2020 22:53:37 +0100
Subject: [PATCH] Enable SSL by default in HTTP::Tiny
HTTP::Tiny 0.082, a Perl core module since 5.13.9 and available standalone on CPAN,
has an insecure default TLS configuration where users must opt in to verify certificates.
Reference: https://salsa.debian.org/perl-team/interpreter/perl/-/commit/1490431e40e22052f75a0b3449f1f53cbd27ba92.patch
Conflict:NA
---
cpan/HTTP-Tiny/lib/HTTP/Tiny.pm | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
index 5803e4599f01..5970b6e225f3 100644
--- a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
+++ b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
@@ -40,7 +40,7 @@ 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, an exception is thrown.
#pod * C<verify_SSL> — A boolean that indicates whether to validate the SSL
-#pod certificate of an C<https> — connection (default is false)
+#pod certificate of an C<https> — connection (default is true)
#pod * C<SSL_options> — A hashref of C<SSL_*> — options to pass through to
#pod L<IO::Socket::SSL>
#pod
@@ -112,7 +112,7 @@ sub new {
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 => $args{verify_SSL} // $args{verify_ssl} // 1, # verification by default
no_proxy => $ENV{no_proxy},
};
@@ -1038,7 +1038,7 @@ sub new {
timeout => 60,
max_line_size => 16384,
max_header_lines => 64,
- verify_SSL => 0,
+ verify_SSL => 1,
SSL_options => {},
%args
}, $class;
@@ -1765,7 +1765,7 @@ C<timeout> — Request timeout in seconds (default is 60) If a socket open, read
=item *
-C<verify_SSL> — A boolean that indicates whether to validate the SSL certificate of an C<https> — connection (default is false)
+C<verify_SSL> — A boolean that indicates whether to validate the SSL certificate of an C<https> — connection (default is true)
=item *
@@ -2035,7 +2035,7 @@ Verification of server identity
=back
-B<By default, HTTP::Tiny does not verify server identity>.
+B<By default, HTTP::Tiny verifies server identity>.
Server identity verification is controversial and potentially tricky because it
depends on a (usually paid) third-party Certificate Authority (CA) trust model
@@ -2043,16 +2043,14 @@ 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>.
-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.
-
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.
+attack|http://en.wikipedia.org/wiki/Man-in-the-middle_attack>.
+
+If you are not concerned about security, and this default causes
+problems, you should disable this option.
Certificate verification requires a file containing trusted CA certificates.

View File

@ -10,10 +10,6 @@ even from the PATH.
This protects against a privilege escalation attack where an attacker
in a separate session creates a cmd.exe in a directory where the
target account happens to have its current directory.
Reference:https://github.com/Perl/perl5/commit/906e92715f4ee68ea95086867f4f97b1f4f10ac3
Conflict:Context adaptation
---
t/win32/system.t | 30 ++++++++++++--------
win32/win32.c | 71 +++++++++++++++++++++++++++++++++++++++++-------
@ -172,7 +168,7 @@ index 94248ca168..5d54cf8d4a 100644
+ if (get_shell() < 0)
+ return -1;
+
Newx(argv, (sp - mark) + w32_perlshell_items + 2, char*);
Newx(argv, (sp - mark) + w32_perlshell_items + 2, const char*);
if (SvNIOKp(*(mark+1)) && !SvPOKp(*(mark+1))) {
@@ -765,7 +814,8 @@ do_spawn2_handles(pTHX_ const char *cmd, int exectype, const int *handles)

View File

@ -1,4 +1,4 @@
From 12c313ce49b36160a7ca2e9b07ad5bd92ee4a010 Mon Sep 17 00:00:00 2001
From 92a9eb3d0d52ec7655c1beb29999a5a5219be664 Mon Sep 17 00:00:00 2001
From: Karl Williamson <khw@cpan.org>
Date: Sat, 9 Sep 2023 11:59:09 -0600
Subject: [PATCH] Fix read/write past buffer end: perl-security#140
@ -7,10 +7,10 @@ A package name may be specified in a \p{...} regular expression
construct. If unspecified, "utf8::" is assumed, which is the package
all official Unicode properties are in. By specifying a different
package, one can create a user-defined property with the same
unqualified name as a Unicode one. Such a property is defined by a sub
unqualified name as a Unicode one. Such a property is defined by a sub
whose name begins with "Is" or "In", and if the sub wishes to refer to
an official Unicode property, it must explicitly specify the "utf8::".
S_parse_uniprop_string() is used to parse the interior of both \p{} and
S_parse_uniprop_string() is used to parse the interior of both \p{} and
the user-defined sub lines.
In S_parse_uniprop_string(), it parses the input "name" parameter,
@ -22,12 +22,12 @@ stripped off. I found it convenient to strip off the package specifier
after the "utf8::", and adjusts various other values to compensate.
However, it missed the adjustment of one required one.
This is only a problem when the property name begins with "perl" and
This is only a problem when the property name begins with "perl" and
isn't "perlspace" nor "perlword". All such ones are undocumented
internal properties.
What happens in this case is that the input is reparsed with slightly
different rules in effect as to what is legal versus illegal. The
different rules in effect as to what is legal versus illegal. The
problem is that "lookup_name" no longer is pointing to its initial
value, but "name" is. Thus the space allocated for filling "lookup_name"
is now shorter than "name", and as this shortened "lookup_name" is
@ -43,8 +43,8 @@ vertically for readability.
This can be easily backported to earlier Perl releases.
Reference:https://github.com/Perl/perl5/commit/12c313ce49b36160a7ca2e9b07ad5bd92ee4a010
Conflict:Context adaptation
Reference:https://github.com/Perl/perl5/commit/92a9eb3d0d52ec7655c1beb29999a5a5219be664
Conflict:NA
---
regcomp.c | 17 +++++++++++------
@ -52,10 +52,10 @@ Conflict:Context adaptation
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/regcomp.c b/regcomp.c
index f5e5f58..0d3e9a9 100644
index d3c135f..67aa03e 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -23815,7 +23815,7 @@ S_parse_uniprop_string(pTHX_
@@ -14450,7 +14450,7 @@ S_parse_uniprop_string(pTHX_
* compile perl to know about them) */
bool is_nv_type = FALSE;
@ -64,7 +64,7 @@ index f5e5f58..0d3e9a9 100644
int equals_pos = -1; /* Where the '=' is found, or negative if none */
int slash_pos = -1; /* Where the '/' is found, or negative if none */
int table_index = 0; /* The entry number for this property in the table
@@ -23949,9 +23949,13 @@ S_parse_uniprop_string(pTHX_
@@ -14582,9 +14582,13 @@ S_parse_uniprop_string(pTHX_
* all of them are considered to be for that package. For the purposes of
* parsing the rest of the property, strip it off */
if (non_pkg_begin == STRLENs("utf8::") && memBEGINPs(name, name_len, "utf8::")) {
@ -81,7 +81,7 @@ index f5e5f58..0d3e9a9 100644
stripped_utf8_pkg = TRUE;
}
@@ -24356,7 +24360,8 @@ S_parse_uniprop_string(pTHX_
@@ -14998,7 +15002,8 @@ S_parse_uniprop_string(pTHX_
/* We set the inputs back to 0 and the code below will reparse,
* using strict */
@ -91,7 +91,7 @@ index f5e5f58..0d3e9a9 100644
}
}
@@ -24377,7 +24382,7 @@ S_parse_uniprop_string(pTHX_
@@ -15019,7 +15024,7 @@ S_parse_uniprop_string(pTHX_
* separates two digits */
if (cur == '_') {
if ( stricter
@ -101,11 +101,11 @@ index f5e5f58..0d3e9a9 100644
{
lookup_name[j++] = '_';
diff --git a/t/re/pat_advanced.t b/t/re/pat_advanced.t
index d679870..3b79eec 100644
index d64bd1b..e0266c0 100644
--- a/t/re/pat_advanced.t
+++ b/t/re/pat_advanced.t
@@ -2565,6 +2565,14 @@ EOF
{}, "GH #17278");
@@ -2695,6 +2695,14 @@ EOF_DEBUG_OUT
"Related to Github Issue #19350, forward \\g{x} pattern segv under use re Debug => 'PARSE'");
}
+ { # perl-security#140, read/write past buffer end
@ -115,10 +115,9 @@ index d679870..3b79eec 100644
+ fresh_perl_is('qr/\p{utf8::_perl_surrogate}/', "",
+ {}, "perl-security#140");
+ }
+
# !!! NOTE that tests that aren't at all likely to crash perl should go
# a ways above, above these last ones. There's a comment there that, like
+
{ # GH 20009
my $x = "awesome quotes";
utf8::upgrade($x);
--
2.33.0

View File

@ -0,0 +1,45 @@
From 55a0aab68d5ce90ce8bb7442ba61639c49e50c1d Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Mon, 21 Sep 2020 09:45:33 +0800
Subject: [PATCH] aarch64 ilp32 support
Conflict:NA
Reference:https://build.opensuse.org/package/view_file/devel:ARM:Factory:Contrib:ILP32/perl/aarch64-ilp32.patch?expand=1
---
hints/linux.sh | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/hints/linux.sh b/hints/linux.sh
index c749f0f..27322dc 100644
--- a/hints/linux.sh
+++ b/hints/linux.sh
@@ -311,6 +311,25 @@ sparc*)
;;
esac
+case $archname in
+aarch64-linux)
+ cat >try.c <<'EOM'
+/* Test for ILP32 */
+#include <stdlib.h>
+main() {
+ int ilp32 = 0;
+ #ifdef __ILP32__
+ ilp32 = 1;
+ #endif
+ exit(!ilp32);
+}
+EOM
+ if ${cc:-gcc} $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
+ archname=aarch64-ilp32-linux
+ fi
+ ;;
+esac
+
# SuSE8.2 has /usr/lib/libndbm* which are ld scripts rather than
# true libraries. The scripts cause binding against static
# version of -lgdbm which is a bad idea. So if we have 'nm'
--
2.27.0

View File

@ -1,53 +0,0 @@
From 2425a39797fcc694082a4f6f0be27a2ec736c6b3 Mon Sep 17 00:00:00 2001
From: hongjinghao <hongjinghao@huawei.com>
Date: Tue, 4 Jun 2024 17:26:43 +0800
Subject: [PATCH] fix test case failure caused by zlib
The patching of zlib in openEuler with upstream bug fixes aligns its functionality with newer versions of zlib. However, the version number of zlib within openEuler remains unchanged, indicating the older version. Consequently, the test cases for perl-IO-Compress, which rely on the zlib version number to determine expected outcomes, will fail. To address this, perl-IO-Compress must be updated to accommodate the changes in zlib and remove the versioning-based checks from its test suite.
This bugfix commit for zlib in openEuler resulted in a change in its function behavior:
https://gitee.com/src-openeuler/zlib/pulls/46
---
cpan/Compress-Raw-Zlib/t/02zlib.t | 4 ++--
cpan/IO-Compress/t/cz-03zlib-v1.t | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cpan/Compress-Raw-Zlib/t/02zlib.t b/cpan/Compress-Raw-Zlib/t/02zlib.t
index 64c8944..4c445c9 100644
--- a/cpan/Compress-Raw-Zlib/t/02zlib.t
+++ b/cpan/Compress-Raw-Zlib/t/02zlib.t
@@ -490,7 +490,7 @@ SKIP:
last if $status == Z_STREAM_END or $status != Z_OK ;
}
- cmp_ok $status, '==', Z_DATA_ERROR ;
+ cmp_ok $status, '==', Z_STREAM_END ;
is $GOT, $goodbye ;
@@ -514,7 +514,7 @@ SKIP:
is length($rest), $len2, "expected compressed output";
$GOT = '';
- cmp_ok $k->inflate($rest, $GOT), '==', Z_DATA_ERROR, "inflate returns Z_DATA_ERROR";
+ cmp_ok $k->inflate($rest, $GOT), '==', Z_STREAM_END, "inflate returns Z_DATA_ERROR";
is $GOT, $goodbye ;
}
diff --git a/cpan/IO-Compress/t/cz-03zlib-v1.t b/cpan/IO-Compress/t/cz-03zlib-v1.t
index 9b75f9b..f2757c0 100644
--- a/cpan/IO-Compress/t/cz-03zlib-v1.t
+++ b/cpan/IO-Compress/t/cz-03zlib-v1.t
@@ -700,7 +700,7 @@ EOM
($GOT, $status) = $k->inflate($rest) ;
- ok $status == Z_DATA_ERROR ;
+ ok $status == Z_STREAM_END ;
ok $Z . $GOT eq $goodbye ;
}
--
2.33.0

136
macros.perl Normal file
View File

@ -0,0 +1,136 @@
# macros.perl file
# macros for perl module building. handle with care.
# Useful perl macros (from Artur Frysiak <wiget@t17.ds.pwr.wroc.pl>)
#
%perl_sitearch %(eval "`%{__perl} -V:installsitearch`"; echo $installsitearch)
%perl_sitelib %(eval "`%{__perl} -V:installsitelib`"; echo $installsitelib)
%perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
%perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
%perl_archlib %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib)
%perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib)
# More useful perl macros (from Raul Dias <rsd@swi.com.br>)
#
%perl_version %(perl -V:version | sed "s!.*='!!;s!'.*!!")
%perl_man1ext %(perl -V:man1ext | sed "s!.*='!!;s!'.*!!")
%perl_man3ext %(perl -V:man3ext | sed "s!.*='!!;s!'.*!!")
%perl_man1dir %(perl -V:man1dir | sed "s!.*='!!;s!'.*!!")
%perl_man3dir %(perl -V:man3dir | sed "s!.*='!!;s!'.*!!")
%perl_installman1dir %(perl -V:installman1dir | sed "s!.*='!!;s!'.*!!")
%perl_installman3dir %(perl -V:installman3dir | sed "s!.*='!!;s!'.*!!")
%perl_installarchlib %(perl -V:installarchlib | sed "s!.*='!!;s!'.*!!")
%perl_prefix %{buildroot}
# Macro to encapsulate perl requires (empty for fedora)
# we keep the complicated form even here to easy sync the other macros with
# perl-macros package
#
%perl_requires() \
%if 0%{?suse_version} > 0 \
Requires: perl(:MODULE_COMPAT_%{perl_version}) \
%endif
%libperl_requires() \
%if 0%{?suse_version} > 0 \
Requires: perl = %{perl_version} \
%endif
# suse specific macros
#
%perl_make_install make DESTDIR=$RPM_BUILD_ROOT install_vendor
%perl_process_packlist(n:) \
if test -n "$RPM_BUILD_ROOT" -a -d $RPM_BUILD_ROOT%perl_vendorarch/auto; then \
find $RPM_BUILD_ROOT%perl_vendorarch/auto -name .packlist -print0 | xargs -0 -r rm \
if [ %{_target_cpu} == noarch ]; then \
find $RPM_BUILD_ROOT%perl_vendorarch/auto -depth -type d -print0 | xargs -0 -r rmdir \
fi \
fi \
rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod \
%nil
# macro: perl_gen_filelist (from Christian <chris@computersalat.de>)
# do the rpmlint happy filelist generation
# with %dir in front of directories
#
%perl_gen_filelist(n)\
FILES=%{name}.files\
# fgen_dir func\
# IN: dir\
fgen_dir(){\
%{__cat} >> $FILES << EOF\
%dir ${1}\
EOF\
}\
# fgen_file func\
# IN: file\
fgen_file(){\
%{__cat} >> $FILES << EOF\
${1}\
EOF\
}\
# check for files in %{perl_vendorlib}\
RES=`find ${RPM_BUILD_ROOT}%{perl_vendorlib} -maxdepth 1 -type f`\
if [ -n "$RES" ]; then\
for file in $RES; do\
fgen_file "%{perl_vendorlib}/$(basename ${file})"\
done\
fi\
\
# get all dirs into array\
base_dir="${RPM_BUILD_ROOT}%{perl_vendorlib}/"\
for dir in `find ${base_dir} -type d | sort`; do\
if [ "$dir" = "${base_dir}" ]; then\
continue\
else\
el=${dir#$base_dir}\
all_dir=(${all_dir[@]} $el)\
fi\
done\
\
# build filelist\
for i in ${all_dir[@]}; do\
# do not add "dir {perl_vendorlib/arch}/auto", included in perl package\
if [ "${i}" = "auto" ]; then\
continue\
fi\
if [ "%{perl_vendorlib}/${i}" = "%{perl_vendorarch}/auto" ]; then\
continue\
else\
if [ -d ${base_dir}/${i} ]; then\
if [ "%{perl_vendorlib}/${i}" != "%{perl_vendorarch}" ]; then\
fgen_dir "%{perl_vendorlib}/${i}"\
fi\
RES=`find "${base_dir}/${i}" -maxdepth 1 -type f`\
for file in $RES; do\
fgen_file "%{perl_vendorlib}/${i}/$(basename ${file})"\
done\
fi\
fi\
done\
# add man pages\
# if exist :)\
if [ -d "${RPM_BUILD_ROOT}%{_mandir}" ]; then\
for file in `cd "${RPM_BUILD_ROOT}%{_mandir}" && find . -type f -name "*3pm*"`; do \
if test -e "%{_mandir}/$file" -o -e "%{_mandir}/$file.gz"; then \
mv ${RPM_BUILD_ROOT}%{_mandir}/$file ${RPM_BUILD_ROOT}%{_mandir}/${file/3pm/3pmc} \
fi \
done \
fgen_file "%{_mandir}/man?/*"\
fi\
\
# add packlist file\
# generated fom perllocal.pod\
if [ -f "${RPM_BUILD_ROOT}/var/adm/perl-modules/%{name}" ]; then\
fgen_file "/var/adm/perl-modules/%{name}"\
fi\
\
# check for files in %{_bindir}\
if [ -d ${RPM_BUILD_ROOT}%{_bindir} ]; then\
RES=`find "${RPM_BUILD_ROOT}%{_bindir}" -maxdepth 1 -type f`\
if [ -n "$RES" ]; then\
for file in $RES; do\
fgen_file "%{_bindir}/$(basename ${file})"\
done\
fi\
fi

View File

@ -14,7 +14,7 @@ diff --git a/Makefile.SH b/Makefile.SH
index d1da0a0..7733a32 100755
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -70,11 +70,11 @@ true)
@@ -64,11 +64,11 @@ true)
${revision}.${patchlevel}.${subversion}"
case "$osvers" in
1[5-9]*|[2-9]*)
@ -28,7 +28,7 @@ index d1da0a0..7733a32 100755
;;
esac
;;
@@ -76,13 +76,15 @@ true)
@@ -78,13 +78,15 @@ true)
;;
sunos*)
linklibperl="-lperl"
@ -45,12 +45,12 @@ index d1da0a0..7733a32 100755
;;
aix*)
case "$cc" in
@@ -120,6 +122,9 @@ true)
linklibperl='libperl.x'
DPERL_EXTERNAL_GLOB=''
;;
@@ -127,6 +129,9 @@ true)
;;
esac
;;
+ linux*)
+ shrpldflags="$shrpldflags -Wl,-soname -Wl,libperl.so.${revision}.${patchlevel}"
+ shrpldflags="$shrpldflags -Wl,-soname -Wl,libperl.so.${revision}.${patchlevel}"
+ ;;
esac
case "$ldlibpthname" in

View File

@ -23,14 +23,14 @@ diff --git a/MANIFEST b/MANIFEST
index 6af238c..d4f0c56 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -784,6 +784,7 @@ cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS390.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS390.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm MakeMaker methods for QNX
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm MakeMaker methods for Unix
+cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm Independed MM methods
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm MakeMaker methods for U/WIN
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm MakeMaker methods for VMS
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm MakeMaker methods for VOS
@@ -1037,6 +1037,7 @@ cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS390.pm
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS390.pm MakeMaker methods for OS 390
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm MakeMaker methods for QNX
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm MakeMaker methods for Unix
+cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm Independed MM methods
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm MakeMaker methods for U/WIN
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm MakeMaker methods for VMS
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm MakeMaker methods for VOS
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm
new file mode 100644
index 0000000..6bbc0d8

View File

@ -46,7 +46,7 @@ index cd0bb6f..0c395ac 100644
} else {
RETVAL = NULL;
@@ -289,15 +291,17 @@ gdbm_DESTROY(db)
PREINIT:
PREINIT:
int i = store_value;
CODE:
- if (gdbm_file_close(db)) {

View File

@ -1,73 +0,0 @@
diff -aurpN a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 2023-09-08 16:58:12.482566546 +0800
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 2023-09-08 17:02:56.171807359 +0800
@@ -31,6 +31,7 @@ BEGIN {
$Is{IRIX} = $^O eq 'irix';
$Is{NetBSD} = $^O eq 'netbsd';
$Is{Interix} = $^O eq 'interix';
+ $Is{Linux} = $^O eq 'linux';
$Is{SunOS4} = $^O eq 'sunos';
$Is{Solaris} = $^O eq 'solaris';
$Is{SunOS} = $Is{SunOS4} || $Is{Solaris};
@@ -1060,7 +1061,7 @@ sub xs_make_dynamic_lib {
push(@m," \$(RM_F) \$\@\n");
my $libs = '$(LDLOADLIBS)';
- if (($Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
+ if (($Is{Linux} || $Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
# Use nothing on static perl platforms, and to the flags needed
# to link against the shared libperl library on shared perl
# platforms. We peek at lddlflags to see if we need -Wl,-R
@@ -1073,6 +1074,11 @@ sub xs_make_dynamic_lib {
# The Android linker will not recognize symbols from
# libperl unless the module explicitly depends on it.
$libs .= ' "-L$(PERL_INC)" -lperl';
+ } else {
+ if ($ENV{PERL_CORE}) {
+ $libs .= ' "-L$(PERL_INC)"';
+ }
+ $libs .= ' -lperl';
}
}
diff -aurpN a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm 1970-01-01 08:00:00.000000000 +0800
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm 2023-09-08 17:09:16.773017629 +0800
@@ -0,0 +1,26 @@
+package ExtUtils::CBuilder::Platform::linux;
+
+use strict;
+use ExtUtils::CBuilder::Platform::Unix;
+use File::Spec;
+
+use vars qw($VERSION @ISA);
+$VERSION = '0.280236';
+our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
+
+sub link {
+ my ($self, %args) = @_;
+ my $cf = $self->{config};
+
+ # Link XS modules to libperl.so explicitly because multiple
+ # dlopen(, RTLD_LOCAL) hides libperl symbols from XS module.
+ local $cf->{lddlflags} = $cf->{lddlflags};
+ if ($ENV{PERL_CORE}) {
+ $cf->{lddlflags} .= ' -L' . $self->perl_inc();
+ }
+ $cf->{lddlflags} .= ' -lperl';
+
+ return $self->SUPER::link(%args);
+}
+
+1;
diff -aurpN a/MANIFEST b/MANIFEST
--- a/MANIFEST 2023-09-08 16:59:28.747862538 +0800
+++ b/MANIFEST 2023-09-08 17:00:43.036559444 +0800
@@ -3535,6 +3535,7 @@ dist/ExtUtils-CBuilder/lib/ExtUtils/CBui
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm CBuilder methods for cygwin
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm CBuilder methods for darwin
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm CBuilder methods for OSF
+dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm CBuilder methods for Linux
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm CBuilder methods for OS/2
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm CBuilder methods for Unix
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm CBuilder methods for VMS

Binary file not shown.

View File

@ -1,40 +0,0 @@
From aacd2398e766500cb5d83c4d76b642fcf31d997a Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <gray@gnu.org>
Date: Wed, 23 Jun 2021 10:26:50 +0300
Subject: [PATCH 1/3] Fix GDBM_File to compile with version 1.20 and earlier
* ext/GDBM_File/GDBM_File.xs (ITEM_NOT_FOUND): Define conditionally,
depending on the GDBM_VERSION_MAJOR and GDBM_VERSION_MINOR.
Don't assume GDBM_ITEM_NOT_FOUND is a define (it isn't since
gdbm commit d3e27957).
---
ext/GDBM_File/GDBM_File.xs | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs
index cd0bb6f26f..494c2889ca 100644
--- a/ext/GDBM_File/GDBM_File.xs
+++ b/ext/GDBM_File/GDBM_File.xs
@@ -145,14 +145,13 @@ output_datum(pTHX_ SV *arg, char *str, int size)
#define gdbm_setopt(db,optflag,optval,optlen) not_here("gdbm_setopt")
#endif
-#ifndef GDBM_ITEM_NOT_FOUND
-# define GDBM_ITEM_NOT_FOUND GDBM_NO_ERROR
-#endif
-
+#if GDBM_VERSION_MAJOR == 1 && GDBM_VERSION_MINOR < 13
/* Prior to 1.13, gdbm_fetch family functions set gdbm_errno to GDBM_NO_ERROR
if the requested key did not exist */
-#define ITEM_NOT_FOUND() \
- (gdbm_errno == GDBM_ITEM_NOT_FOUND || gdbm_errno == GDBM_NO_ERROR)
+# define ITEM_NOT_FOUND() (gdbm_errno == GDBM_NO_ERROR)
+#else
+# define ITEM_NOT_FOUND() (gdbm_errno == GDBM_ITEM_NOT_FOUND)
+#endif
#define CHECKDB(db) do { \
if (!db->dbp) { \
--
2.31.1

View File

@ -1,25 +0,0 @@
From ea57297a58b8f10ab885c19eec48ea076116cc1f Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <gray@gnu.org>
Date: Wed, 23 Jun 2021 14:24:47 +0300
Subject: [PATCH 2/3] Raise version number in ext/GDBM_File/GDBM_File.pm
---
ext/GDBM_File/GDBM_File.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ext/GDBM_File/GDBM_File.pm b/ext/GDBM_File/GDBM_File.pm
index d837536f80..cb08d091b8 100644
--- a/ext/GDBM_File/GDBM_File.pm
+++ b/ext/GDBM_File/GDBM_File.pm
@@ -363,7 +363,7 @@ require XSLoader;
);
# This module isn't dual life, so no need for dev version numbers.
-$VERSION = '1.19';
+$VERSION = '1.20';
XSLoader::load();
--
2.31.1

View File

@ -0,0 +1,66 @@
From 5051aebec66aa530a23c7842f5c77606f208134e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jani=20V=C3=A4limaa?= <wally@mageia.org>
Date: Sat, 18 Jan 2025 15:25:52 +0200
Subject: [PATCH] Link XS modules to libperl.so with EU::CBuilder on Linux
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Based on patch from Petr Písař <ppisar@redhat.com>
Patch is modified to use extra_linker_flags to pass -lperl after object .o files.
In that way -Wl,--as-needed linker flag doesn't strip libperl dependecy.
<https://bugzilla.redhat.com/show_bug.cgi?id=960048>
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327585#50>
---
MANIFEST | 1 +
.../lib/ExtUtils/CBuilder/Platform/linux.pm | 24 +++++++++++++++++++
2 files changed, 25 insertions(+)
create mode 100644 dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
diff --git a/MANIFEST b/MANIFEST
index 2eb9ca4..31bac12 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -4104,6 +4104,7 @@ dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm CBuilder method
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm CBuilder methods for cygwin
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm CBuilder methods for darwin
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm CBuilder methods for OSF
+dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm CBuilder methods for Linux
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm CBuilder methods for OS/2
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm CBuilder methods for Unix
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm CBuilder methods for VMS
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
new file mode 100644
index 0000000..060515a
--- /dev/null
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
@@ -0,0 +1,24 @@
+package ExtUtils::CBuilder::Platform::linux;
+
+use strict;
+use ExtUtils::CBuilder::Platform::Unix;
+use File::Spec;
+
+use vars qw($VERSION @ISA);
+$VERSION = '0.280206';
+@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
+
+sub link {
+ my ($self, %args) = @_;
+
+ # Link XS modules to libperl.so explicitly because multiple
+ # dlopen(, RTLD_LOCAL) hides libperl symbols from XS module.
+ $args{extra_linker_flags} = [
+ '-lperl',
+ $self->split_like_shell($args{extra_linker_flags})
+ ];
+
+ return $self->SUPER::link(%args);
+}
+
+1;
--
2.47.1

View File

@ -0,0 +1,52 @@
From fc1f8ac36c34c35bad84fb7b99a26ab83c9ba075 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 3 Jul 2013 12:59:09 +0200
Subject: [PATCH] Link XS modules to libperl.so with EU::MM on Linux
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
<https://bugzilla.redhat.com/show_bug.cgi?id=960048>
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327585#50>
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
index a8b172f..a3fbce2 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
@@ -30,6 +30,7 @@ BEGIN {
$Is{IRIX} = $^O eq 'irix';
$Is{NetBSD} = $^O eq 'netbsd';
$Is{Interix} = $^O eq 'interix';
+ $Is{Linux} = $^O eq 'linux';
$Is{SunOS4} = $^O eq 'sunos';
$Is{Solaris} = $^O eq 'solaris';
$Is{SunOS} = $Is{SunOS4} || $Is{Solaris};
@@ -1028,7 +1029,7 @@ sub xs_make_dynamic_lib {
push(@m," \$(RM_F) \$\@\n");
my $libs = '$(LDLOADLIBS)';
- if (($Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
+ if (($Is{Linux} || $Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
# Use nothing on static perl platforms, and to the flags needed
# to link against the shared libperl library on shared perl
# platforms. We peek at lddlflags to see if we need -Wl,-R
@@ -1041,6 +1042,11 @@ sub xs_make_dynamic_lib {
# The Android linker will not recognize symbols from
# libperl unless the module explicitly depends on it.
$libs .= ' "-L$(PERL_INC)" -lperl';
+ } else {
+ if ($ENV{PERL_CORE}) {
+ $libs .= ' "-L$(PERL_INC)"';
+ }
+ $libs .= ' -lperl';
}
}
--
1.8.1.4

3
perl-5.38.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eca551caec3bc549a4e590c0015003790bdd1a604ffe19cc78ee631d51f7072e
size 13565448

152
perl.spec
View File

@ -1,4 +1,3 @@
%global perl_libdir %{_libdir}/perl5
%global perl_datadir %{_datadir}/perl5
%global perl_vendor_libdir %{perl_libdir}/vendor_perl
%global perl_vendor_datadir %{perl_datadir}/vendor_perl
@ -11,42 +10,49 @@
%global __provides_exclude_from ^%{_libexecdir}/perl5-tests/.*$
%global __requires_exclude_from ^%{_libexecdir}/perl5-tests/.*$
%global __brp_clean_perl_files %{nil}
#provides module without verion, no need to provide
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\((charnames|DynaLoader|DB)\\)$
%global perl_version 5.34.0
%global perl_version 5.38.0
%global perl_compat perl(:MODULE_COMPAT_5.34.0)
%global perl_compat perl(:MODULE_COMPAT_5.38.0)
%bcond_without systemtap
Name: perl
License: (GPL+ or Artistic) and (GPLv2+ or Artistic) and MIT and UCD and Public Domain and BSD
License: (GPL-1.0-or-later or Artistic-1.0-perl) and (GPL-2.0-or-later or Artistic-1.0-perl) and MIT and UCD and Public Domain and BSD
Epoch: 4
Version: %{perl_version}
Release: 12
Release: 10
Summary: A highly capable, feature-rich programming language
Url: https://www.perl.org/
Source0: https://www.cpan.org/src/5.0/%{name}-%{version}.tar.xz
# adding files for perl-macros virtual package
Source1: macros.perl
Source2: README.macros
Patch1: perl-5.22.1-Provide-ExtUtils-MM-methods-as-standalone-ExtUtils-M.patch
Patch2: perl-5.16.3-create_libperl_soname.patch
Patch3: perl-5.22.0-Install-libperl.so-to-shrpdir-on-Linux.patch
Patch4: perl-5.34.0-Destroy-GDBM-NDBM-ODBM-SDBM-_File-objects-only-from-.patch
Patch5: perl-5.35.1-Fix-GDBM_File-to-compile-with-version-1.20-and-earli.patch
Patch6: perl-5.35.1-Raise-version-number-in-ext-GDBM_File-GDBM_File.pm.patch
Patch7: change-lib-to-lib64.patch
Patch8: disable-rpath-by-default.patch
Patch9: perl-5.34.0-Link-XS-modules-to-libperl.so-with-EU-MM-on-Linux.patch
Patch5: change-lib-to-lib64.patch
Patch6: disable-rpath-by-default.patch
Patch7: backport-CVE-2023-47100-CVE-2023-47038.patch
Patch8: backport-CVE-2023-47039.patch
Patch9: perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-MM.patch
# Please note that Patch10 comes from mageia, which will put libperl.so into extra_linker_flags.
# So it is different from redhat/fedora, which puts libperl.so into lddlflags
Patch10: perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
Patch6000: backport-CVE-2021-36770.patch
Patch6001: backport-CVE-2023-31484.patch
Patch6002: backport-CVE-2023-31486.patch
Patch6003: backport-CVE-2022-48522.patch
Patch6004: backport-CVE-2023-47100-CVE-2023-47038.patch
Patch6005: backport-CVE-2023-47039.patch
Patch6006: fix-test-case-failure-caused-by-zlib.patch
Patch6000: backport-aarch64-ilp32-support.patch
BuildRequires: gcc bash findutils coreutils make tar procps bzip2-devel gdbm-devel perl-File-Compare perl-File-Find
BuildRequires: zlib-devel systemtap-sdt-devel perl-interpreter perl-generators
BuildRequires: zlib-devel perl-interpreter perl-generators
%if %{with systemtap}
BuildRequires: systemtap-sdt-devel
%endif
Requires: perl-libs = %{epoch}:%{version}-%{release}
Requires: perl-version perl-threads perl-threads-shared perl-parent
@ -72,11 +78,12 @@ Provides: perl-Attribute-Handlers perl-interpreter perl(bytes_heavy.pl) pe
Provides: perl-ExtUtils-Embed perl-ExtUtils-Miniperl perl-IO perl-IO-Zlib perl-Locale-Maketext-Simple perl-Math-Complex
Provides: perl-Module-Loaded perl-Net-Ping perl-Pod-Html perl-SelfLoader perl-Test perl-Time-Piece perl-libnetcfg perl-open perl-utils
Provides: perl-Errno perl-Memoize perl-File-Compare perl-File-Find
Provides: perl-macros = 2.0
Obsoletes: perl-Attribute-Handlers perl-interpreter perl-Errno perl-ExtUtils-Embed perl-Net-Ping
Obsoletes: perl-ExtUtils-Miniperl perl-IO perl-IO-Zlib perl-Locale-Maketext-Simple perl-Math-Complex perl-Memoize perl-Module-Loaded
Obsoletes: perl-Pod-Html perl-SelfLoader perl-Test perl-Time-Piece perl-libnetcfg perl-open perl-utils perl-File-Compare perl-File-Find
Obsoletes: perl-macros < 2.0
%description
Perl 5 is a highly capable, feature-rich programming language with over 30 years of development.
@ -85,7 +92,7 @@ prototyping and large scale development projects.
%package libs
Summary: The libraries for the perl
License: (GPL+ or Artistic) and HSRL and MIT and UCD
License: (GPL-1.0-or-later or Artistic-1.0-perl) and MIT and UCD
Provides: %perl_compat
Provides: perl(:VERSION) = %{perl_version}
Provides: perl(:WITH_64BIT) perl(:WITH_ITHREADS) perl(:WITH_THREADS)
@ -98,9 +105,12 @@ This package is the shared library for perl.
%package devel
Summary: Development files for %{name}
License: (GPL+ or Artistic) and UCD
License: (GPL-1.0-or-later or Artistic-1.0-perl) and UCD
Requires: perl = %{epoch}:%{version}-%{release} system-rpm-config systemtap-sdt-devel
Requires: perl = %{epoch}:%{version}-%{release} system-rpm-config
%if %{with systemtap}
Requires: systemtap-sdt-devel
%endif
Requires: perl(ExtUtils::ParseXS) perl(Devel::PPPort)
Requires: %perl_compat
@ -141,7 +151,10 @@ sed -i '/\(bzip2\|zlib\)-src/d' MANIFEST
-Dvendorarch="%{perl_vendor_libdir}" -Darchname="%{_arch}-%{_os}-thread-multi" \
-Dlibpth="/usr/local/lib64 /lib64 %{_prefix}/lib64" \
-Duseshrplib -Dusethreads -Duseithreads -Ui_ndbm -Di_gdbm \
-Dusedtrace='/usr/bin/dtrace' -Ubincompat5005 -Dusesitecustomize \
%if %{with systemtap}
-Dusedtrace='/usr/bin/dtrace' \
%endif
-Ubincompat5005 -Dusesitecustomize \
-Duselargefiles -Dd_semctl_semun -Di_db -Duse64bitint \
-Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dscriptdir='%{_bindir}' \
-Dinstallusrbinperl=n -Uversiononly -Dpager='/usr/bin/less -isr' \
@ -203,6 +216,9 @@ done
%{perl_new} -MConfig -i -pn \
-e 's"\A#!(?:perl|\./perl|/perl|/usr/bin/perl|/usr/bin/env perl)\b"$Config{startperl}"' \
$(find %{buildroot}%{_libexecdir}/perl5-tests/perl-tests -type f)
# install macros.perl file
install -D -m 644 %{SOURCE2} %{build}%{_rpmconfigdir}/macros.d/macros.perl
# not sure how to install README.macros
%check
%{perl_new} -I/lib regen/lib_cleanup.pl
@ -425,6 +441,9 @@ make test_harness
%dir %{perl_datadir}
%{perl_datadir}/*
# macros
%{_rpmconfigdir}/macros.d/macros.perl
%files libs
%license Artistic Copying
%doc AUTHORS README Changes
@ -489,68 +508,81 @@ make test_harness
%exclude %{_mandir}/man3/{Time::HiRes.*,Time::Local.*,Socket.3*,threads.3*,threads::shared*,Unicode::Collate.*}
%exclude %{_mandir}/man3/{Unicode::Collate::*,Unicode::Normalize.*,version.3*,version::Internals.3*,Devel::PPPort*}
%doc README Changes
%doc README Changes
%{_mandir}/man1/*
%{_mandir}/man3/*
%changelog
* Tue Jun 4 2024 hongjinghao <hongjinghao@huawei.com> - 4:5.34.0-12
- fix test case failure caused by zlib
* Fri Jan 03 2025 Funda Wang <fundawang@yeah.net> - 4:5.38.0-10
- split out patch adding link to libperl.so into two separated patches,
and sync it with mageia, which is a better version than fedora
- disable cleaning empty perl directories
- use git lfs storage
* Mon Dec 11 2023 huyubiao <huyubiao@huawei.com> - 4:5.34.0-11
- Fix CVE-2023-47038, CVE-2023-47100, CVE-2023-47039
* Tue Sep 3 2024 hongjinghao <hongjinghao@huawei.com> - 4:5.38.0-9
- Delete the man of File::Compare and File::Find from the main package.
* Fri Sep 8 2023 zhangzikang <zhangzikang@kylinos.cn> - 4:5.34.0-10
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix-perl-re.so-undefined-symbol-error
* Wed Aug 14 2024 gengqihu <gengqihu2@h-partners.com> - 4:5.38.0-8
- License info rectification
* Fri Aug 25 2023 yangmingtai <yangmingtai@huawei.com> - 4:5.34.0-9
- fix CVE-2022-48522
* Wed Jul 31 2024 hongjinghao <hongjinghao@huawei.com> - 4:5.38.0-7
- sync patch from upstream
backport-aarch64-ilp32-support.patch
* Mon Jun 26 2023 yangmingtai <yangmingtai@huawei.com> - 4:5.34.0-8
* Wed Mar 20 2024 zhangzikang <zhangzikang@kylinos.cn> - 4:5.38.0-6
- Fix perl re.so undefined symbol error
* Mon Dec 11 2023 huyubiao <huyubiao@huawei.com> - 4:5.38.0.5
- Fix CVE-2023-47100
* Fri Dec 8 2023 hongjinghao <hongjinghao@huawei.com> - 4:5.38.0.4
- Fix CVE-2023-48039
* Mon Nov 27 2023 hongjinghao <hongjinghao@huawei.com> - 4:5.38.0.3
- Fix CVE-2023-47038
* Fri Aug 25 2023 yangmingtai <yangmingtai@huawei.com> - 4:5.38.0-2
- delete unused files and provides
* Mon Jul 31 2023 yangmingtai <yangmingtai@huawei.com> - 4:5.38.0-1
- update version to 5.38.0
* Thu Jul 27 2023 yangmingtai <yangmingtai@huawei.com> - 4:5.34.0-7
- add Perl_my_strlcpy-and-Perl_my_strlcat to fix build failed
* Mon Jun 26 2023 yangmingtai <yangmingtai@huawei.com> - 4:5.34.0-6
- fix CVE-2023-31486
* Mon May 15 2023 dongyuzhen <dongyuzhen@h-partners.com> 4:5.34.0-7
* Mon May 15 2023 dongyuzhen <dongyuzhen@h-partners.com> 4:5.34.0-5
- fix CVE-2023-31484
* Fri Jul 01 2022 dongyuzhen <dongyuzhen@h-partners.com> 4:5.34.0-6
* Wed Jan 18 2023 yangmingtai <yangmingtai@huawei.com> 4:5.34.0-4
- fix compile failed caused by zlib update
* Fri Jul 01 2022 dongyuzhen <dongyuzhen@h-partners.com> 4:5.34.0-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Add patches that are deleted during the upgrade
* Tue Jun 21 2022 tianwei<tianwei@h-partners.com> 4:5.34.0-5
- Type:bugfix
* Tue Mar 29 2022 zhouwenpei<zhouwenpei1@h-partners.com> 4:5.34.0-2
- Type:NA
- ID:NA
- SUG:NA
- DESC:delete maninfo of Compare and Find packages from perl
- DESC:add build conditions to control installing systemtap
* Mon Mar 28 2022 tianwei<tianwei@h-partners.com> 4:5.34.0-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:delete low version files
* Thu Feb 24 2022 yuanxin<yuanxin24@h-partners.com> 4:5.34.0-3
- Type:CVE
- ID:CVE-2021-36770
- SUG:NA
- DESC:fix CVE-2021-36770
* Wed Jan 05 2022 tianwei<tianwei12@huawei.com> 4:5.34.0-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix perl version required for devel
* Wed Dec 29 2021 tianwei<tianwei12@huawei.com> 4:5.34.0-1
* Fri Mar 18 2022 tianwei<tianwei12@h-partners.com> 4:5.34.0-1
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:upgrade version to 5.34.0
* Thu Feb 24 2022 yuanxin<yuanxin24@h-partners.com> 4:5.32.0-9
- Type:CVE
- ID:CVE-2021-36770
- SUG:NA
- DESC:fix CVE-2021-36770
* Thu Aug 5 2021 yuanxin<yuanxin24@huawei.com> 4:5.32.0-8
- Type:bugfix
- ID:NA

View File

@ -1,4 +1,4 @@
version_control: github
src_repo: Perl/perl5
tag_prefix: ^v
seperator: .
separator: .