Bug 220474 - mail/spamassassin unescaped left brace in regex, lib/perl5/site_perl/Mail/SpamAssassin/PerMsgStatus.pm line 921
Summary: mail/spamassassin unescaped left brace in regex, lib/perl5/site_perl/Mail/Spa...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Niclas Zeising
URL: https://bz.apache.org/SpamAssassin/sh...
Keywords: easy, needs-qa, patch-ready
Depends on:
Reported: 2017-07-05 07:28 UTC by Trond.Endrestol
Modified: 2017-08-09 19:33 UTC (History)
1 user (show)

See Also:
zeising: maintainer-feedback-
koobs: merge-quarterly?

Patch for lib/perl5/site_perl/Mail/SpamAssassin/PerMsgStatus.pm post-Perl 5.26 (402 bytes, patch)
2017-07-05 07:28 UTC, Trond.Endrestol
no flags Details | Diff
patch from spamassassin bugzilla. (2.42 KB, patch)
2017-07-11 18:28 UTC, Niclas Zeising
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trond.Endrestol 2017-07-05 07:28:41 UTC
Created attachment 184066 [details]
Patch for lib/perl5/site_perl/Mail/SpamAssassin/PerMsgStatus.pm post-Perl 5.26

After upgrading Perl to 5.26, it started to complain whenever mail/spamassassin is being run:

Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/^(.{ <-- HERE ,200}).*$/ at
/usr/local/lib/perl5/site_perl/Mail/SpamAssassin/PerMsgStatus.pm line 921.

Patch attached.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2017-07-05 07:32:25 UTC
@Trond Thank you for your report & patch. Have it been submitted upstream? If so, please include the issue/pr link in the URL field
Comment 2 Trond.Endrestol 2017-07-05 07:54:10 UTC
(In reply to Kubilay Kocak from comment #1)
I reported it now. See the URL field for details.
Comment 3 Niclas Zeising freebsd_committer 2017-07-11 18:26:01 UTC
Looking at the conversation from spamassassin's bugzilla, I found another patch instead.  I've applied it to our port, can you please test.
Comment 4 Niclas Zeising freebsd_committer 2017-07-11 18:28:00 UTC
Created attachment 184279 [details]
patch from spamassassin bugzilla.

Updated patch, originally from spamassassin bugzilla:
Comment 5 Trond.Endrestol 2017-07-12 14:53:51 UTC
(In reply to Niclas Zeising from comment #4)
I have applied the patch on a running system and restarted sa-spamd. No warnings this time, but I'll wait another 24 hours and see if the patch has any effect, positive or negative.
Comment 6 Trond.Endrestol 2017-07-13 15:59:22 UTC
(In reply to Trond.Endrestol from comment #5)
My 24 hours are up, and I see no unwanted side effects. I recommend the patch go live unless you need more testing.
Comment 7 Mikhail T. 2017-07-24 16:40:11 UTC
To follow the existing convention in the port, the new patch file should be called "patch-bug7404" -- after the upstream's bug:


Inside the file I would've removed the string ".orig" -- the five characters convey no information whatsoever.

zeising, are you planning to commit this some time soon?
Comment 8 Niclas Zeising freebsd_committer 2017-07-27 17:01:16 UTC
I'm not sure it's great to rename the patch, then there's two patches touching the same file, I'm trying to use the FreeBSD ports tree naming convention. I'll try to get this in asap.
Comment 9 Mikhail T. 2017-07-27 17:30:03 UTC
(In reply to Niclas Zeising from comment #8)
Local convention -- within a port -- trumps global convention.

Generally, the "one patch per file" may be too simplistic a principle -- some times patches are grouped by the bug they are fixing or the feature they are adding. This allows to just point the upstream authors to the patch. Also, when the problem is addressed upstream, the single file can be removed.

And if such grouping ends up touching the same file more than once -- so be it, it is not automatically bad...
Comment 10 commit-hook freebsd_committer 2017-08-09 19:31:55 UTC
A commit references this bug:

Author: zeising
Date: Wed Aug  9 19:30:59 UTC 2017
New revision: 447641
URL: https://svnweb.freebsd.org/changeset/ports/447641

  Fix runtime on recent perl versions and change default options

  Add a patch from upstream to fix runtime when using perl 5.26 or later. [0]
  Change default options to include DKIM and SPF checking.
  Bump portrevision.

  PR:		220474 (based on) [0]
  Reported by:	Trond.Endrestol@ximalas.info [0]

Comment 11 Niclas Zeising freebsd_committer 2017-08-09 19:33:00 UTC

Thanks for the patience!