Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to apply Devel::PatchPerl 1.98 on Perl v5.22.4 #44

Closed
mackdoughe opened this issue Jun 1, 2020 · 4 comments
Closed

Failed to apply Devel::PatchPerl 1.98 on Perl v5.22.4 #44

mackdoughe opened this issue Jun 1, 2020 · 4 comments
Labels

Comments

@mackdoughe
Copy link

This issue is an extension of #42 for Perl v5.22.4 specifically. I used perlbrew to try to install perl-5.22.4 with patchperl v1.98 and got the following error:

Auto-guessed '5.22.4'
patching Configure
patching cpan/Time-Local/t/Local.t
patching pp.c
patching Configure
1 out of 6 hunks FAILED -- saving rejects to file Configure.rej
Died at /home/testuser/perl5/perlbrew/bin/patchperl line 1780.

Looking at Configure.rej you can see:

--- Configure
+++ Configure
@@ -22961,7 +22961,7 @@ fi

 : add -D_FORTIFY_SOURCE if feasible and not already there
 case "$gccversion" in
-4.*)   case "$optimize$ccflags" in
+[456789].*|[1-9][0-9]*)        case "$optimize$ccflags" in
        *-O*)   case "$ccflags$cppsymbols" in
                *_FORTIFY_SOURCE=*) # Don't add it again.
                        echo "You seem to have -D_FORTIFY_SOURCE already, not adding it." >&4

The problem seems to be that it's trying to add that last section to line 22961 but for v5.22.4 it should be at line 23009. I looked at some of the other line numbers for other version numbers and they equally seem to be off so I think this new patch for GCC10 might cause some patching problems due to the line numbers.

@zakame
Copy link

zakame commented Jun 4, 2020

Can confirm this as well while preparing updates for https://github.com/Perl/docker-perl

zakame added a commit to zakame/docker-perl that referenced this issue Jun 4, 2020
@zakame
Copy link

zakame commented Jun 4, 2020

cf https://github.com/Perl/docker-perl/runs/737449815

It also affects patching for 5.24 as well.

zakame added a commit to Perl/docker-perl that referenced this issue Jun 4, 2020
@bingos
Copy link
Owner

bingos commented Jun 4, 2020

patch can fuzz around line number differences. What has happened with the v5.22 and v5.24 maintenance releases is that changes to Configure has been backported.

I have adjusted ( and tested ) the patch application for v5.22 and v5.24 and it should all work fine now.

Version 2.00 will be shortly on CPAN

Many thanks.

bingos added a commit that referenced this issue Jun 4, 2020
#44

Configure changes had been backported to the v5.22 and v5.24
maint releases, so what worked for .0 releases didn't work
for later maint releases.

I have adjusted and tested the patch application criteria
for all v5.22.x and v5.24.x releases.
@bingos bingos added the Fixed label Jun 4, 2020
@mackdoughe
Copy link
Author

Thanks, that fixed it!

clrpackages pushed a commit to clearlinux-pkgs/perl-Devel-PatchPerl that referenced this issue Jun 5, 2020
…to version 2.00

version 2.00 at 2020-06-04 10:20:07 +0000
-----------------------------------------

  Change: 0ab4bf0d8b02af79e1afed7fac9e91b75f1c1fda
  Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
  Date : 2020-06-04 11:20:07 +0000

    Resolve patching issues with v5.22.x and v5.24.x

    bingos/devel-patchperl#44

    Configure changes had been backported to the v5.22 and v5.24 maint
    releases, so what worked for .0 releases didn't work for later maint
    releases.

(NEWS truncated at 15 lines)
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jun 6, 2020
Upstream changes:
version 2.00 at 2020-06-04 10:20:07 +0000
-----------------------------------------

  Change: 0ab4bf0d8b02af79e1afed7fac9e91b75f1c1fda
  Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
  Date : 2020-06-04 11:20:07 +0000

    Resolve patching issues with v5.22.x and v5.24.x

    bingos/devel-patchperl#44

    Configure changes had been backported to the v5.22 and v5.24 maint
    releases, so what worked for .0 releases didn't work for later maint
    releases.

    I have adjusted and tested the patch application criteria for all
    v5.22.x and v5.24.x releases.

-----------------------------------------
version 1.98 at 2020-05-25 18:17:30 +0000
-----------------------------------------

  Change: 25ccc65e1b2bd688983ced340c23561888456921
  Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
  Date : 2020-05-25 19:17:30 +0000

    Added command line switches to patchperl

    --version prints version of Devel::PatchPerl and exits

    --patchlevel will update patchlevel.h even in a git repository

    One may also set the PERL5_PATCHPERL_PATCHLEVEL env var to have the
    same effect as --patchlevel

-----------------------------------------
version 1.96 at 2020-05-25 11:21:50 +0000
-----------------------------------------

  Change: 15cdb6b32538d3cefc779735413f0fe8522aa27b
  Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
  Date : 2020-05-25 12:21:50 +0000

    Resolve reported issue with 1.94 release

    bingos/devel-patchperl#42

    Will successfully patch all the way back to v5.6.0

-----------------------------------------
version 1.94 at 2020-05-24 12:52:39 +0000
-----------------------------------------

  Change: 14c825fc079cb8f0d626b6b9769d048db9771bc0
  Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
  Date : 2020-05-24 13:52:39 +0000

    Added Configure patch for GCC10

    Perl/perl5@9f4e630
    0b91e219

    Fedora 32 now ships with GCC 10 as the system compiler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants