perl: update to 5.42.1 - #6136
Merged
Merged
Conversation
This was lost somewhere along the way, even if it was present in the original patches in Git for Windows' fork. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In 2f9bedc (perl: Update to 5.38.2, 2023-12-05), the first patch was dropped, but the remainder of the patch files was never renumbered. Let's do that now, to enable easier maintenance of the remaining patch files: This way, they can be applied into a Git worktree that imported the vanilla Perl tar archive, and then can be re-exported via git -C path/to/worktree format-patch -o $PWD -6 --no-signature Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Contributor
Author
|
Full disclosure: This does not completely pass the tests. But one thing first: I guess the Here are the failures:Here is the full output: makepkg-check.txt I am just going ahead and assume that those test failures are not actually critical ;-) |
Contributor
Author
|
Also: https://metacpan.org/dist/perl/view/pod/perl.pod already lists v2.54.2, but https://www.cpan.org/src/5.0/perl-5.42.2.tar.xz.sha256.txt currently still 404s. |
5 tasks
This version was just made available. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Sync the `scrape_verln` function with the version at https://gitlab.archlinux.org/archlinux/packaging/packages/perl/-/blob/main/patchprov which combines the VERSION and package-declaration patterns into a single conditional and skips lines where the match is followed by a comment or semicolon (indicating that the version is computed rather than literal). Also import from Arch Linux the `dumb_modpath` fallback for `__ModuleName__.pm` file naming (used by some distributions). Two additional changes go beyond what Arch Linux carries. First, `podlators` is added to the `%distmods` special-case hash so it resolves to `Pod::Man`. Starting with Perl 5.42, the `podlators` distribution no longer ships a `VERSION` file, so `dist_srcpath` needs this mapping to locate `lib/Pod/Man.pm` instead. Second, `pkgspec` gains explicit v-string handling: when the scraped version starts with `v` (as in `package Pod::Man v6.0.2;`), it is parsed through `version->parse()->normal` instead of bare `eval`. A bare `eval` of a v-string literal produces a binary byte string (e.g. "\x06\x00\x02") rather than the human-readable "6.0.2", which corrupted the PKGBUILD with embedded NUL bytes. The Arch Linux patchprov avoids this problem by also lowercasing all distribution names (`$dist =~ tr/A-Z/a-z/`), which is left commented out here to preserve the mixed-case convention this PKGBUILD has always used for its `provides` array. Assisted-by: Claude Opus 4.6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Generated by running ./patchprov against the extracted perl-5.42.1 source tree. Notable changes: Test2-Suite is no longer bundled in core (it was split out), and many bundled distributions received version bumps. Assisted-by: Claude Opus 4.6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Perl 5.42 ships ExtUtils::MakeMaker 7.76, which changed the pm_to_blib Makefile rule from a single-line perl invocation to a multi-line one with several -e arguments separated by continuation backslashes. The new format adds argument-validation logic that searches for a "--" delimiter in @argv. irssi has its own Makefile_silent.pm that post-processes the MakeMaker-generated Makefile to inject automake-style silent-rule variables. Its pm_to_blib override uses a regex to replace $(NOECHO) with $(PL_AM_V_BLIB) (which expands to an echo command when V=0). The regex anchors at the start of a line and matches through to "-e 'pm_to_blib", but because "." does not cross newlines, it cannot reach from the $(NOECHO) on the first line to the -e 'pm_to_blib on a later continuation line. Instead it matches only the continuation line itself, injecting the echo command mid-argument-list. When V=0, the expansion "@echo BLIB pm_to_blib;" splits the shell command at the semicolon, and the perl one-liner receives "@echo", "BLIB", "pm_to_blib" as arguments instead of the expected "--" delimiter, producing: "Failed to find -- in @echo|BLIB|pm_to_blib". The fix adds "(.*\\\n)*?" before the ".*-e" in the regex so it can consume zero or more continuation lines (reluctantly) before reaching the one containing -e 'pm_to_blib. This lets the match start at the $(NOECHO) line and the replacement correctly places $(PL_AM_V_BLIB) there, as intended. irssi upstream closed this as Won't Fix (irssi/irssi#1571) because autotools support is being removed in irssi 1.5 in favor of meson. Since 1.4.5 is the latest release and MSYS2 still uses the autotools build, we carry this patch until the next irssi version. Assisted-by: Claude Opus 4.6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho
force-pushed
the
upgrade-perl-to-v5.42
branch
from
March 30, 2026 15:37
56751d9 to
357eb10
Compare
SWIG 4.4 dropped the SWIG_NULLPTR define that znc's modpython codegen relied on to detect SWIG >= 4.2.0, causing a build failure: 'SWIG_Python_str_AsChar' was not declared in this scope The SWIG_Python_str_AsChar function was removed in SWIG 4.2.0 and replaced by SWIG_PyUnicode_AsUTF8AndSize. znc's codegen.pl used `#ifdef SWIG_NULLPTR` as a proxy for version detection, but SWIG 4.4 removed SWIG_NULLPTR, so the old code path (which references the removed function) was selected again. This backports the upstream fix from znc/znc@49af1c8 which generates a swig_version.h header by parsing `swig -version` output, and replaces the SWIG_NULLPTR check with a proper `SWIG_VERSION >= 0x040200` comparison. See also znc/znc#1979. Assisted-by: Claude Opus 4.6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Perl 5.42.1 changes the shared library name from msys-perl5_40.dll to msys-perl5_42.dll. All packages that contain compiled XS modules or link against libperl at build time need to be rebuilt so their binaries pick up the new library. The package list was derived from the previous rebuild commit 3ae3cd5 ("perl rebuilds", 2025-08-20) which accompanied the 5.38.4-to-5.40.3 upgrade, with one addition: perl-PadWalker, which was introduced after that commit and builds a compiled XS module (its PKGBUILD lists gcc in makedepends). Four new packages with a perl runtime dependency were also added since then (perl-Class-Inspector, perl-File-ShareDir, perl-File-ShareDir-Install, autoconf2.73) but none of them compile native code against libperl, so they do not require rebuilds here. Assisted-by: Claude Opus 4.6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho
force-pushed
the
upgrade-perl-to-v5.42
branch
from
March 30, 2026 20:14
357eb10 to
8c008e0
Compare
dscho
marked this pull request as ready for review
March 31, 2026 05:36
Contributor
Author
For the record, I have a draft PR open over at dscho#10 trying to address that. Personally, I do not consider this a blocker for this here PR. If anybody has good reasons to make it a blocker, please holler. |
Member
|
very nice, thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates Perl from 5.40.3 to 5.42.1.
The MSYS2-specific patches were rebased onto the new source tree (and renumbered from 0002-0007 to 0001-0006 while at it). Two conflicts came up during the rebase: in
dist/Net-Ping/t/450_service.t, upstream 5.42.1 already addedcygwinto the TODO skip list, making our hunk redundant, so it was dropped. Inhints/cygwin.sh, upstream removed-U__STRICT_ANSI__; we kept our-DPERL_USE_SAFE_PUTENValongside the remaining-D_GNU_SOURCE.The
patchprovscript needed updating because Perl 5.42 uses a new version declaration style (package Name v1.2.3;) and thepodlatorsdistribution no longer ships aVERSIONfile. The core logic (scrape_verln,dist_srcpath) was synced with Arch Linux's version, with two additional changes:podlatorswas added to the%distmodstable (mapping it toPod::Manso the version can be found), andpkgspecgained explicit v-string handling viaversion->parse()because bareevalof a v-string literal produces a binary byte string rather than the human-readable version number. Thetr/A-Z/a-z/line was left commented out to preserve the mixed-case convention in theprovidesarray.The
providesarray was regenerated from the new source tree.Test2-Suiteis no longer bundled in core.