diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..05a0e946187b8160d0c54c23a9f8100f44e0f43b --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.xz filter=lfs diff=lfs merge=lfs -text diff --git a/.lfsconfig b/.lfsconfig new file mode 100644 index 0000000000000000000000000000000000000000..06e2786f5ae2cf3efa867439ce7bad5fa13e7f3b --- /dev/null +++ b/.lfsconfig @@ -0,0 +1,2 @@ +[lfs] + url = https://artlfs.openeuler.openatom.cn/src-openEuler/perl diff --git a/perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch b/perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch new file mode 100644 index 0000000000000000000000000000000000000000..d2345c937e3ad277b7c6f65b33bd9f53bc673ad6 --- /dev/null +++ b/perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch @@ -0,0 +1,66 @@ +From 5051aebec66aa530a23c7842f5c77606f208134e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jani=20V=C3=A4limaa?= +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ř + +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. + + + +--- + 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 + diff --git a/perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-MM.patch b/perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-MM.patch index cdc6011751d61fb9966d09554878e900439cbbda..f1f76ac2105732fd817cdad0458755fa75a105b3 100644 --- a/perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-MM.patch +++ b/perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-MM.patch @@ -1,32 +1,24 @@ -From fbdb9a76798ae34a7b53f664e77aaaf1f4040f2f Mon Sep 17 00:00:00 2001 -From: zhangzikang -Date: Wed, 20 Mar 2024 17:44:51 +0800 -Subject: [PATCH] perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-MM-on-Linux +From fc1f8ac36c34c35bad84fb7b99a26ab83c9ba075 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +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 + + + +Signed-off-by: Petr Písař --- - MANIFEST | 1 + - .../lib/ExtUtils/MM_Unix.pm | 8 +++++- - .../lib/ExtUtils/CBuilder/Platform/linux.pm | 26 +++++++++++++++++++ - 3 files changed, 34 insertions(+), 1 deletion(-) - create mode 100644 dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm + cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) -diff --git a/MANIFEST b/MANIFEST -index 6bc115b..0775b2f 100644 ---- a/MANIFEST -+++ b/MANIFEST -@@ -3855,6 +3855,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/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm -index 1761380..4e82dda 100644 +index a8b172f..a3fbce2 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm -@@ -32,6 +32,7 @@ BEGIN { +@@ -30,6 +30,7 @@ BEGIN { $Is{IRIX} = $^O eq 'irix'; $Is{NetBSD} = $^O eq 'netbsd'; $Is{Interix} = $^O eq 'interix'; @@ -34,7 +26,7 @@ index 1761380..4e82dda 100644 $Is{SunOS4} = $^O eq 'sunos'; $Is{Solaris} = $^O eq 'solaris'; $Is{SunOS} = $Is{SunOS4} || $Is{Solaris}; -@@ -1074,7 +1075,7 @@ sub xs_make_dynamic_lib { +@@ -1028,7 +1029,7 @@ sub xs_make_dynamic_lib { push(@m," \$(RM_F) \$\@\n"); my $libs = '$(LDLOADLIBS)'; @@ -43,7 +35,7 @@ index 1761380..4e82dda 100644 # 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 -@@ -1087,6 +1088,11 @@ sub xs_make_dynamic_lib { +@@ -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'; @@ -55,38 +47,6 @@ index 1761380..4e82dda 100644 } } -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..582339b ---- /dev/null -+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm -@@ -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.280230'; -+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; -- -2.33.0 +1.8.1.4 diff --git a/perl-5.38.0.tar.xz b/perl-5.38.0.tar.xz index 428f0d45992cf4a2d8c3b598ecdcc75abd6663c2..520632f6c82027a8cd32b93aae7a21d1a9ea5fb5 100644 Binary files a/perl-5.38.0.tar.xz and b/perl-5.38.0.tar.xz differ diff --git a/perl.spec b/perl.spec index fc0066fa8db80553cee69738aa491ee77a229e47..f1ff66d26a6ccc4a7d073801fa7962ef16ff306f 100644 --- a/perl.spec +++ b/perl.spec @@ -11,6 +11,8 @@ %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)\\)$ @@ -24,7 +26,7 @@ Name: perl 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: 9 +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 @@ -38,6 +40,9 @@ 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-aarch64-ilp32-support.patch @@ -499,6 +504,12 @@ make test_harness %{_mandir}/man3/* %changelog +* Fri Jan 03 2025 Funda Wang - 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 + * Tue Sep 3 2024 hongjinghao - 4:5.38.0-9 - Delete the man of File::Compare and File::Find from the main package. @@ -536,7 +547,7 @@ make test_harness * Mon May 15 2023 dongyuzhen 4:5.34.0-5 - fix CVE-2023-31484 -* Tue Jan 18 2023 4:5.34.0-4 +* Wed Jan 18 2023 yangmingtai 4:5.34.0-4 - fix compile failed caused by zlib update * Fri Jul 01 2022 dongyuzhen 4:5.34.0-3 diff --git a/perl.yaml b/perl.yaml index d7552e2080d7d3eda2924f7fdda1d2643b09164f..20343d7fa2df4898df000fe754c4d741fc65c38d 100644 --- a/perl.yaml +++ b/perl.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: Perl/perl5 tag_prefix: ^v -seperator: . +separator: .