Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 674742 - x11-wm/fvwm-2.6.8-r1 : FvwmPerl broken after update from dev-lang/perl-5.24.3-r1 to 5.26.2 due to regex error
Summary: x11-wm/fvwm-2.6.8-r1 : FvwmPerl broken after update from dev-lang/perl-5.24.3...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: perl-5.26 perl-5.28-stable
  Show dependency tree
 
Reported: 2019-01-06 23:21 UTC by Phil Stracchino (Unix Ronin)
Modified: 2019-05-11 22:18 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix now-illegal regex at FvwmPerl line 324 (FvwmPerl-illegal-regex.patch,537 bytes, patch)
2019-01-07 01:51 UTC, Phil Stracchino (Unix Ronin)
Details | Diff
Revised patch based at the correct filesystem level in the work dir (FvwmPerl-illegal-regex.patch-r1,515 bytes, patch)
2019-01-07 01:57 UTC, Phil Stracchino (Unix Ronin)
Details | Diff
Patch to update fvwm-2.6.8-r1.ebuild to fvwm-2.6.8-r2.ebuild incorporating regex patch (fvwm-2.6.8-r2.ebuild.patch,473 bytes, patch)
2019-01-07 02:06 UTC, Phil Stracchino (Unix Ronin)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Stracchino (Unix Ronin) 2019-01-06 23:21:25 UTC
After updating yesterday from dev-lang/perl-5.24.3-r1 to dev-lang/perl-5.26.2, all fvwm functions which use the FvwmPerl module to execute inline Perl code silently fail.

This is the simplest example function I have:

DestroyFunc SetPidginPage
AddToFunc SetPidginPage
+               I       . GotoPage %{ (localtime(time()))[6]%6 ? 0 : 1 }% 1

This function, which I call immediately before launching Pidgin in my StartFunction, sets the active screen page to (0,1) on weekdays or to (1,1) on weekends.  It worked yesterday morning.  Today, with no other invervening change except the Perl update, it no longer works.  All fvwm functions 
that use FvwmPerl are completely failing.

I was able, after much experimentation and debugging, to finally trap the following error:

Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\% { <-- HERE  ( .*? ) } \%/ at /usr/lib64/fvwm/2.6.8/FvwmPerl line 324.

The offending line:

	$$text_ref =~ s/\Q$quote1\E { ( .*? ) } \Q$quote2\E/

Changing it to:

	$$text_ref =~ s/\Q$quote1\E \{ ( .*? ) \} \Q$quote2\E/

appears to have fixed the problem, and suddenly FvwmPerl is working again.
Comment 1 Phil Stracchino (Unix Ronin) 2019-01-07 01:51:21 UTC
Created attachment 560154 [details, diff]
Patch to fix now-illegal regex at FvwmPerl line 324

The attached patch to fvwm-2.6.8/modules/FvwmPerl/FvwmPerl.in fixes the problem.
Comment 2 Phil Stracchino (Unix Ronin) 2019-01-07 01:57:04 UTC
Created attachment 560156 [details, diff]
Revised patch based at the correct filesystem level in the work dir

Correction, patch is based one directory too high, rebasing it correctly in work/fvwm-2.6 8 instead of work/.
Comment 3 Phil Stracchino (Unix Ronin) 2019-01-07 02:06:25 UTC
Created attachment 560158 [details, diff]
Patch to update fvwm-2.6.8-r1.ebuild to fvwm-2.6.8-r2.ebuild incorporating regex patch

Please feel free to rename files as appropriate.  I have tested this patched ebuild and verified that it works and produces a correctly working FvwmPerl module.
Comment 4 Phil Stracchino (Unix Ronin) 2019-01-07 02:10:51 UTC
NOTE:
It's possible I locally fixed this after a *previous* Perl update but just never submitted patches to gentoo because I expected the fvwm maintainers to fix it upstream, and recompiling after this Perl update undid my manual fix.
Comment 5 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-01-07 21:55:22 UTC
Also worth mentioning I built and tested 2.6.5-r2, without issue, on Perl 5.28[1] (which is subject to all the problems with 5.26 exhibited in this bug report)

The question for me is why src_test *didn't* fail, and that, when we can determine why that is, we should make it so in future, it *would* fail.

Then my exhaustive testing[2] would be useful for detecting real bugs with Perl, not a waste of time


1: https://github.com/kentfredric/gentoo-perl-triage/blame/5.28.0/index/x11-wm-f
2: https://github.com/kentfredric/gentoo-perl-triage/commits/5.28.0
Comment 6 Phil Stracchino (Unix Ronin) 2019-01-07 22:57:00 UTC
fvwm and FvwmPerl will BUILD just fine with this problem intact, and pass all build tests.  The FvwmPerl module will even load without errors at runtime.  It just won't *work*, but to make it fail you've got to actually call it, and that won't happen unless you activate at least one fvwm user-defined function that uses inline Perl.
Comment 7 Jesse Harris 2019-03-16 03:04:38 UTC
Is it worth sending a PR upstream to the fvwm project? I can't imagine this would only affect Gentoo.
Comment 8 Larry the Git Cow gentoo-dev 2019-05-11 22:18:36 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66b7a3f2cc41dbec839e53e98e97a8d86744e5ef

commit 66b7a3f2cc41dbec839e53e98e97a8d86744e5ef
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2019-05-11 22:16:33 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2019-05-11 22:18:19 +0000

    x11-wm/fvwm: Add Perl 5.26 / 5.28 fix, bug 674742
    
    Closes: https://bugs.gentoo.org/674742
    Package-Manager: Portage-2.3.66, Repoman-2.3.12
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 x11-wm/fvwm/files/fvwm-2.6.8-perl528.patch |  15 +++
 x11-wm/fvwm/fvwm-2.6.5-r3.ebuild           | 169 +++++++++++++++++++++++++++++
 x11-wm/fvwm/fvwm-2.6.8-r2.ebuild           | 158 +++++++++++++++++++++++++++
 3 files changed, 342 insertions(+)