!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
This commit is contained in:
commit
878143eeae
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
2
.lfsconfig
Normal file
2
.lfsconfig
Normal file
@ -0,0 +1,2 @@
|
||||
[lfs]
|
||||
url = https://artlfs.openeuler.openatom.cn/src-openEuler/perl
|
||||
@ -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
|
||||
|
||||
@ -1,32 +1,24 @@
|
||||
From fbdb9a76798ae34a7b53f664e77aaaf1f4040f2f Mon Sep 17 00:00:00 2001
|
||||
From: zhangzikang <zhangzikang@kylinos.cn>
|
||||
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?= <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>
|
||||
---
|
||||
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
|
||||
|
||||
|
||||
Binary file not shown.
15
perl.spec
15
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 <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
|
||||
|
||||
* 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.
|
||||
|
||||
@ -536,7 +547,7 @@ make test_harness
|
||||
* Mon May 15 2023 dongyuzhen <dongyuzhen@h-partners.com> 4:5.34.0-5
|
||||
- fix CVE-2023-31484
|
||||
|
||||
* Tue Jan 18 2023 <yangmingtai@huawei.com> 4:5.34.0-4
|
||||
* 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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user