diff --git a/perl-5.34.0-Link-XS-modules-to-libperl.so-with-EU-MM-on-Linux.patch b/perl-5.34.0-Link-XS-modules-to-libperl.so-with-EU-MM-on-Linux.patch new file mode 100644 index 0000000000000000000000000000000000000000..76e4c0c69bae8b247f26adc01e2a2441e610f263 --- /dev/null +++ b/perl-5.34.0-Link-XS-modules-to-libperl.so-with-EU-MM-on-Linux.patch @@ -0,0 +1,73 @@ +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 diff --git a/perl.spec b/perl.spec index ee988b8249b6d71eb98bafed32e43b21e000f42f..d1d05f676b137447a1c3f00672a39fb9f3a18c12 100644 --- a/perl.spec +++ b/perl.spec @@ -22,7 +22,7 @@ Name: perl License: (GPL+ or Artistic) and (GPLv2+ or Artistic) 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 @@ -35,6 +35,7 @@ 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 Patch6000: backport-CVE-2021-36770.patch Patch6001: backport-CVE-2023-31484.patch @@ -490,6 +491,12 @@ make test_harness %{_mandir}/man3/* %changelog +* Fri Sep 8 2023 zhangzikang - 4:5.34.0-10 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix-perl-re.so-undefined-symbol-error + * Fri Aug 25 2023 yangmingtai - 4:5.34.0-9 - fix CVE-2022-48522