Package: perl / 5.40.1-6

Metadata

Package Version Patches format
perl 5.40.1-6 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
debian/cpan_definstalldirs.diff | (download)

cpan/CPAN/lib/CPAN/FirstTime.pm | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

 provide a sensible installdirs default for modules installed from
 CPAN.

Some modules which are included in core set INSTALLDIRS => 'perl'
explicitly in Makefile.PL or Build.PL.  This makes sense for the normal @INC
ordering, but not ours.

debian/db_file_ver.diff | (download)

cpan/DB_File/version.c | 2 2 + 0 - 0 !
1 file changed, 2 insertions(+)

 remove overly restrictive db_file version check.

Bug-Debian: http://bugs.debian.org/340047

Package dependencies ensure the correct library is linked at run-time.

debian/doc_info.diff | (download)

pod/perl.pod | 12 10 + 2 - 0 !
1 file changed, 10 insertions(+), 2 deletions(-)

 replace generic man(1) instructions with debian-specific
 information.

Indicate that the user needs to install the perl-doc package.

debian/enc2xs_inc.diff | (download)

cpan/Encode/bin/enc2xs | 8 4 + 4 - 0 !
t/porting/customized.t | 3 3 + 0 - 0 !
2 files changed, 7 insertions(+), 4 deletions(-)

 tweak enc2xs to follow symlinks and ignore missing @inc directories.

Bug-Debian: http://bugs.debian.org/290336

- ignore missing directories,
- follow symlinks (/usr/share/perl/5.8 -> 5.8.4).
- filter "." out when running "enc2xs -C", it's unnecessary and causes
  issues with follow => 1 (see #603686 and [rt.cpan.org #64585])

debian/errno_ver.diff | (download)

ext/Errno/Errno_pm.PL | 16 0 + 16 - 0 !
1 file changed, 16 deletions(-)

 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,
debian/libperl_embed_doc.diff | (download)

lib/ExtUtils/Embed.pm | 3 3 + 0 - 0 !
1 file changed, 3 insertions(+)

 note that libperl-dev package is required for embedded linking

Bug-Debian: http://bugs.debian.org/186778

fixes/respect_umask.diff | (download)

cpan/ExtUtils-Install/lib/ExtUtils/Install.pm | 18 9 + 9 - 0 !
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 18 9 + 9 - 0 !
2 files changed, 18 insertions(+), 18 deletions(-)

 respect umask during installation

This is needed to satisfy Debian policy regarding group-writable
site directories.

debian/writable_site_dirs.diff | (download)

cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 6 3 + 3 - 0 !
1 file changed, 3 insertions(+), 3 deletions(-)

 set umask approproately for site install directories

Policy requires group writable site directories

debian/extutils_set_libperl_path.diff | (download)

cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 eu:mm: set location of libperl.a under /usr/lib

The Debian packaging moves libperl.a a couple of levels up from the
CORE directory to match other static libraries.

debian/no_packlist_perllocal.diff | (download)

cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 35 3 + 32 - 0 !
1 file changed, 3 insertions(+), 32 deletions(-)

 don't install .packlist or perllocal.pod for perl or vendor


debian/fakeroot.diff | (download)

Makefile.SH | 7 2 + 5 - 0 !
1 file changed, 2 insertions(+), 5 deletions(-)

 postpone ld_library_path evaluation to the binary targets.

Modify the setting of LD_LIBRARY_PATH to append pre-existing values at the
time the rule is evaluated rather than when the Makefile is created.

This is required when building packages with dpkg-buildpackage and fakeroot,
since fakeroot (which now sets LD_LIBRARY_PATH) is not used for the "build"
rule where the Makefile is created, but is for the clean/binary* targets.

debian/instmodsh_doc.diff | (download)

cpan/ExtUtils-MakeMaker/bin/instmodsh | 4 3 + 1 - 0 !
1 file changed, 3 insertions(+), 1 deletion(-)

 debian policy doesn't install .packlist files for core or vendor.


debian/ld_run_path.diff | (download)

cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm | 2 2 + 0 - 0 !
1 file changed, 2 insertions(+)

 remove standard libs from ld_run_path as per debian policy.


debian/libnet_config_path.diff | (download)

cpan/libnet/lib/Net/Config.pm | 7 3 + 4 - 0 !
1 file changed, 3 insertions(+), 4 deletions(-)

 set location of libnet.cfg to /etc/perl/net as /usr may not be
 writable.


debian/perlivp.diff | (download)

utils/perlivp.PL | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 make perlivp skip include directories in /usr/local

Bug-Debian: http://bugs.debian.org/510895

On Sat, Jan 10, 2009 at 12:37:18AM +1100, Brendan O'Dea wrote:
> On Wed, Jan 7, 2009 at 12:21 AM, Niko Tyni <ntyni@debian.org> wrote:

> > We could create the directories in a postinst script, but I'm not sure
> > I see the point. They will be created automatically when installing
> > CPAN modules.
>
> The directories are intentionally not created, as this way they are
> excluded from the search path at start-up, saving a bunch of wasted
> stats at use/require time in the common case that the user has not
> installed any local packages.  As Niko points out, they will be
> created as required.

Signed-off-by: Niko Tyni <ntyni@debian.org>

debian/squelch locale warnings.diff | (download)

locale.c | 3 3 + 0 - 0 !
pod/perllocale.pod | 8 8 + 0 - 0 !
2 files changed, 11 insertions(+)

 squelch locale warnings in debian package maintainer scripts

Bug-Debian: http://bugs.debian.org/508764

The system locales are rather frequently out of sync with the C library
during package upgrades, causing a huge amount of useless Perl locale
warnings. Squelch them when running package maintainer scripts, detected
by the DPKG_RUNNING_VERSION environment variable.

Any real locale problem will show up after the system upgrade too, and
the warning will be triggered normally again at that point.

debian/patchlevel.diff | (download)

patchlevel.h | 3 3 + 0 - 0 !
1 file changed, 3 insertions(+)

 list packaged patches in patchlevel.h

fixes/document_makemaker_ccflags.diff | (download)

cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm | 4 4 + 0 - 0 !
1 file changed, 4 insertions(+)

 document that ccflags should include $config{ccflags}

Bug: https://rt.cpan.org/Public/Bug/Display.html?id=68613
Bug-Debian: http://bugs.debian.org/628522

Compiling XS extensions without $Config{ccflags} can break the
binary interface on some platforms.

debian/find_html2text.diff | (download)

cpan/CPAN/lib/CPAN/Distribution.pm | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 configure cpan::distribution with correct name of html2text

Bug-Debian: http://bugs.debian.org/640479

If you use cpan from Debian you usually wind up trying to read online
documentation through it. Unfortunately cpan can't find the
html2text.pl script even though it is installed using the Debian
package 'html2text'.

Please see the attached patch for a quick fix of this issue.

[Maintainer's note: html2text in Debian is not the same implementation
as the html2text.pl which is expected, but should provide similar
functionality].

debian/perl5db x terminal emulator.patch | (download)

lib/perl5db.pl | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 invoke x-terminal-emulator rather than xterm in perl5db.pl

In Debian systems, xterm might not exist or might not be the preferred
terminal emulator. Use x-terminal-emulator instead

Bug-Debian: http://bugs.debian.org/668490
debian/cpan missing site dirs.diff | (download)

cpan/CPAN/lib/CPAN/FirstTime.pm | 31 27 + 4 - 0 !
1 file changed, 27 insertions(+), 4 deletions(-)

 fix cpan::firsttime defaults with nonexisting site dirs if a parent
 is writable

The site directories do not exist on a typical Debian system.  The build
systems will create them when necessary, so there's no need for a prompt
suggesting local::lib if the first existing parent directory is writable.

Also, writability of the core directories is not interesting as we
explicitly tell CPAN not to touch those with INSTALLDIRS=site.

Bug-Debian: http://bugs.debian.org/688842

debian/makemaker pasthru.diff | (download)

cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 pass ld settings through to subdirectories

[rt.cpan.org #28632] fixed most issues with passing LD down to
subdirectory Makefile.PL files. However, there are some distributions
(including Wx, Par::Packer, and Verilog-Perl) that explicitly set
LD. Those still can't be overridden from the command line. Adding LD to
the PASTHRU list fixes this.

Bug-Debian: https://bugs.debian.org/758471

debian/makemaker manext.diff | (download)

cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm | 2 1 + 1 - 0 !
cpan/ExtUtils-MakeMaker/t/build_man.t | 8 4 + 4 - 0 !
2 files changed, 5 insertions(+), 5 deletions(-)

 make eu::makemaker honour mannext settings in generated manpage
 headers

This was inherited from early changes by Brendan O'Dea, previously
debian/kfreebsd softupdates.diff | (download)

t/op/stat.t | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 work around debian bug#796798

kFreeBSD 10 (possibly only with softupdates enabled) may defer
calculating the mtime for more than 2 seconds.  Work around this
with a stat() call to calculate the mtime immediately.

(Modified to only stat() on kfreebsd by Niko Tyni)

Bug-Debian: https://bugs.debian.org/796798

debian/hurd softupdates.diff | (download)

t/op/stat.t | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 fix t/op/stat.t failures on hurd

We already do this on GNU/kFreeBSD, and GNU/Hurd seems to need same
treatment.

Bug-Debian: https://bugs.debian.org/822735

fixes/math_complex_doc_great_circle.diff | (download)

dist/Math-Complex/lib/Math/Trig.pm | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 math::trig: clarify definition of great_circle_midpoint

Bug: https://rt.cpan.org/Ticket/Display.html?id=114104
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=697567

fixes/math_complex_doc_angle_units.diff | (download)

dist/Math-Complex/lib/Math/Trig.pm | 5 5 + 0 - 0 !
1 file changed, 5 insertions(+)

 math::trig: document angle units

Bug: https://rt.cpan.org/Ticket/Display.html?id=114106
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731505

fixes/cpan_web_link.diff | (download)

cpan/CPAN/lib/CPAN.pm | 3 3 + 0 - 0 !
1 file changed, 3 insertions(+)

 cpan: add link to main cpan web site

Bug: https://github.com/andk/cpanpm/pull/96
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=367291

debian/installman utf8.diff | (download)

installman | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 generate man pages with utf-8 characters

This fixes totally incorrectly rendered manual pages like
perlunicook and perltw.

TODO: should probably be a Configure option for proper upstreaming.

Bug-Debian: https://bugs.debian.org/840211

debian/perldoc pager.diff | (download)

cpan/Pod-Perldoc/lib/Pod/Perldoc/ToTerm.pm | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 fix perldoc terminal escapes when sensible-pager is less

This is a temporary fix while upstream is reworking the
pager handling.

Bug: https://rt.cpan.org/Public/Bug/Display.html?id=120229
Bug-Debian: https://bugs.debian.org/870340

debian/prune_libs.diff | (download)

regen-configure/U/modified/Myinit.U | 3 1 + 2 - 0 !
regen-configure/U/perl/End.U | 2 1 + 1 - 0 !
2 files changed, 2 insertions(+), 3 deletions(-)

 prune the list of libraries wanted to what we actually need.

Bug-Debian: http://bugs.debian.org/128355

We want to keep the dependencies on perl-base as small as possible,
and some of the original list may be present on buildds (see Bug#128355).

(Backported to metaconfig unit probes by Niko Tyni)

debian/mod_paths.diff | (download)

perl.c | 62 62 + 0 - 0 !
1 file changed, 62 insertions(+)

 tweak @inc ordering for debian

Our order is:

    etc (Debian specific, for config files)
    site (5.8.1)
    vendor (all)
    core in perl-base (Debian specific, via APPLLIB_EXP)
    core (5.8.1)
    site (version-indep)
    site (pre-5.8.1)

The rationale being that an admin (via site), or module packager
(vendor) can chose to shadow core modules when there is a newer
version than is included in core.

(later updates by Niko Tyni)

debian/deprecate with apt.diff | (download)

lib/deprecate.pm | 15 14 + 1 - 0 !
1 file changed, 14 insertions(+), 1 deletion(-)

 point users to debian packages of deprecated core modules

Bug-Debian: http://bugs.debian.org/747628

debian/perlbug editor.diff | (download)

utils/perlbug.PL | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 use "editor" as the default perlbug editor, as per debian policy

Bug-Debian: https://bugs.debian.org/922609

debian/eu mm perl base.diff | (download)

cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm | 2 2 + 0 - 0 !
1 file changed, 2 insertions(+)

 suppress an extutils::makemaker warning about our non-default @inc

fixes/io_socket_ip_ipv6.diff | (download)

cpan/IO-Socket-IP/lib/IO/Socket/IP.pm | 24 21 + 3 - 0 !
1 file changed, 21 insertions(+), 3 deletions(-)

 disable getaddrinfo(3) ai_addrconfig for localhost and ipv4 numeric
 addresses

I_ADDRCONFIG can be a bad default for systems with a dual protocol
loopback device but just IPv6 connectivity. In such a case,
getaddrinfo(3) on 127.0.0.1 or 0.0.0.0 will fail with EAI_ADDRFAMILY
even though the loopback device is able to handle them.

debian/usrmerge lib64.diff | (download)

regen-configure/U/modified/libpth.U | 1 0 + 1 - 0 !
1 file changed, 1 deletion(-)

 configure / libpth.u: do not adjust glibpth when /usr/lib64 is
 present.

debian/usrmerge realpath.diff | (download)

regen-configure/U/modified/libpth.U | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

 configure / libpth.u: use realpath --no-symlinks on debian

This makes the libpth probe results identical on usrmerged (/lib -> /usr/lib etc.)
vs. non-usrmerged systems.

Bug-Debian: https://bugs.debian.org/914128

fixes/x32 io msg skip.diff | (download)

t/io/msg.t | 3 3 + 0 - 0 !
1 file changed, 3 insertions(+)

 skip io/msg.t on x32 due to broken system v message queues

Bug-Debian: https://bugs.debian.org/922609

debian/configure regen.diff | (download)

Configure | 10 4 + 6 - 0 !
1 file changed, 4 insertions(+), 6 deletions(-)

 regenerate configure et al. after probe unit changes

Bug-Debian: https://bugs.debian.org/762638

fixes/json pp options.diff | (download)

cpan/JSON-PP/bin/json_pp | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 fix json_pp option handling

Getopt-Long ignores case by default, so -v never worked.

Getopt-Long 2.55 / Perl 5.40 started to warn about this.

Bug: https://github.com/makamaka/JSON-PP/issues/88
Bug-Debian: https://bugs.debian.org/1078058

fixes/test harness bailout.diff | (download)

cpan/Test-Harness/lib/TAP/Harness.pm | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 prevent double summary on bail-out

(backported to Debian 5.40.0 Perl core package by Niko Tyni)

fixes/CVE 2024 56406.diff | (download)

op.c | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 cve-2024-56406: heap-buffer-overflow with tr//

This was due to underallocating needed space.  If the translation forces
something to become UTF-8 that is initially bytes, that UTF-8 could
now require two bytes where previously a single one would do.

(cherry picked from commit f93109c8a6950aafbd7488d98e112552033a3686)

commit 385e8759c3ff1e7f7f996bd4ea391074d61d48c1
fixes/CVE 2025 40909 metaconfig.diff | (download)

regen-configure/U/perl/d_fdopendir.U | 27 27 + 0 - 0 !
1 file changed, 27 insertions(+)

 check for fdopendir

fixes/CVE 2025 40909 1.diff | (download)

Configure | 6 6 + 0 - 0 !
Cross/config.sh-arm-linux | 1 1 + 0 - 0 !
Cross/config.sh-arm-linux-n770 | 1 1 + 0 - 0 !
Porting/Glossary | 5 5 + 0 - 0 !
Porting/config.sh | 1 1 + 0 - 0 !
config_h.SH | 6 6 + 0 - 0 !
configure.com | 1 1 + 0 - 0 !
plan9/config_sh.sample | 1 1 + 0 - 0 !
sv.c | 91 3 + 88 - 0 !
t/op/threads-dirh.t | 104 1 + 103 - 0 !
win32/config.gc | 1 1 + 0 - 0 !
win32/config.vc | 1 1 + 0 - 0 !
12 files changed, 28 insertions(+), 191 deletions(-)

 cve-2025-40909: clone dirhandles without fchdir

This uses fdopendir and dup to dirhandles. This means it won't change
working directory during thread cloning, which prevents race conditions
that can happen if a third thread is active at the same time.

(cherry picked from commit 918bfff86ca8d6d4e4ec5b30994451e0bd74aba9)

fixes/CVE 2025 40909 2.diff | (download)

Cross/config.sh-arm-linux | 2 1 + 1 - 0 !
Cross/config.sh-arm-linux-n770 | 2 1 + 1 - 0 !
config_h.SH | 2 1 + 1 - 0 !
plan9/config_sh.sample | 2 1 + 1 - 0 !
4 files changed, 4 insertions(+), 4 deletions(-)

 minor corrections to 1f9097b342e0e37d619dfab6ea82ea99611b30bf

(cherry picked from commit d19a96bcde20e2c6d237c843120d4a2dda0bda6e)

fixes/CVE 2025 40909 3.diff | (download)

sv.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 use perllio_dup_cloexec in perl_dirp_dup to set o_cloexec

dup doesn't mark the new descriptor as close-on-exec, which can lead to
a descriptor leaking to the new process.

(cherry picked from commit d6f09a896842e5288af5d3817756b67a919ad7ad)

fixes/CVE 2025 40909 metaconfig reorder.diff | (download)

Configure | 10 5 + 5 - 0 !
config_h.SH | 13 7 + 6 - 0 !
2 files changed, 12 insertions(+), 11 deletions(-)

 slightly reorder configure and config_h.sh to match metaconfig
 output

Although these are originally generated files, they were changed upstream
before changing the generator (metaconfig). The resulting orderings don't
quite match.