Bug 218606

Summary: games/fairymax: Improve regex conformance
Product: Ports & Packages Reporter: Kyle Evans <kevans>
Component: Individual Port(s)Assignee: Larry Rosenman <ler>
Status: Closed FIXED    
Severity: Affects Only Me CC: emaste, kalten, ler
Priority: --- Flags: kalten: maintainer-feedback+
kalten: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 218495    
Attachments:
Description Flags
svn(1) diff of games/fairymax
none
[PATCH] Makefile, ERE and left-brace {v2} none

Description Kyle Evans freebsd_committer 2017-04-12 17:00:02 UTC
Created attachment 181733 [details]
svn(1) diff of games/fairymax

In EREs, left-brace is not to be interpreted as an ordinary character unless escaped. Using left-brace not as a part of a valid interval expression produces undefined results [1].

There is a patch-in-progress to fix our implementation to throw an error if left-brace is not used in a valid manner, it would be good to go ahead and address this before-hand. =)

[1] http://pubs.opengroup.org/onlinepubs/009696899/basedefs/xbd_chap09.html#tag_09_04_03
Comment 1 Kalten 2017-04-18 16:20:31 UTC
Created attachment 181868 [details]
[PATCH] Makefile, ERE and left-brace  {v2}

Greetings!

(In reply to Kyle Evans from comment #0)
> [left-brace in Extended Regular Expression to be escaped]
You are right—However: I want to escape the closing right-braces too (a
question of symmetry with the opening one as well as with escaping of “(”
and its counterpart as already done in the Makefile).

There is a new patch file (sed-fairymax__v2.diff) that does so and sets
PORTREVISION=1.


I think the new (v2) patch is OK.
»poudriere testport -P« is OK.
»portlint -AC« is OK.

The License-Problem remains, but is not part of this very problem report
(and I intend to update games/fairymax anyway and shall address the problem
than)

Regards,
 Kalten
Comment 2 Kyle Evans freebsd_committer 2017-04-18 17:19:56 UTC
(In reply to Kalten from comment #1)

Excellent, thank you! I've marked my patch as obsolete. =)

The PORTREVISION could've probably been left untouched; this should be a no-op since this is only ensuring that { gets treated as a literal, which is the behavior before change as well, but of course this is your discretion.

Thanks!

Kyle Evans
Comment 3 Kalten 2017-04-18 17:48:53 UTC
(In reply to Kyle Evans from comment #2)
> […] I've marked my patch as obsolete. =)
I did search for this option, but was unable to find it—I am sorry.
(Where can I find it now? In an earlier version one could use check boxes
while submitting a new file to mark older files as obsolete)

> The PORTREVISION could've probably been left untouched; this should be a
> no-op since this is only ensuring that { gets treated as a literal, which
> is the behavior before change as well, but of course this is your
> discretion.
In that case: do treat it according to your taste ;-)

I thank you!

Regards,
 Kalten
Comment 4 Kyle Evans freebsd_committer 2017-04-18 17:56:13 UTC
(In reply to Kalten from comment #3)

> I did search for this option, but was unable to find it—I am sorry.
> (Where can I find it now? In an earlier version one could use check boxes
while submitting a new file to mark older files as obsolete)

It looks like you can't obsolete attachments not uploaded by yourself, as I cannot currently mark yours obsolete by adding another attachment. It can be done without adding another file by checking out the 'Details' of the file and marking it obsolete through there, though.

I'm not sure if it's necessary to upload a new patch for this minor correction, it does err on the side of caution and a committer could remove it if they so choose since it's just the one line added there; no real harm.
Comment 5 Kalten 2017-04-18 21:53:19 UTC
(In reply to Kyle Evans from comment #4)
> It looks like you can't obsolete attachments not uploaded by yourself, as
> I cannot currently mark yours obsolete by adding another attachment. It
> can be done without adding another file by checking out the 'Details' of
> the file and marking it obsolete through there, though.
Ah! Thank you!

> I'm not sure if it's necessary to upload a new patch for this minor
> correction, it does err on the side of caution and a committer could
> remove it if they so choose since it's just the one line added there; no
> real harm.
So be it—let us hope, a committer will take care of this soon ;-)

Regards,
 Kalten
Comment 6 Larry Rosenman freebsd_committer 2017-04-26 00:47:28 UTC
take
Comment 7 commit-hook freebsd_committer 2017-04-26 01:02:14 UTC
A commit references this bug:

Author: ler
Date: Wed Apr 26 01:01:29 UTC 2017
New revision: 439425
URL: https://svnweb.freebsd.org/changeset/ports/439425

Log:
  games/fairymax: Improve regex conformance

  PR:		218606
  Submitted by:	Kyle Evans <bsdports@kyle-evans.net>
  Approved by:	Kalten <kalten@gmx.at> (maintainer), adamw (mentor)
  Differential Revision:	https://reviews.freebsd.org/D10502

Changes:
  head/games/fairymax/Makefile
Comment 8 Larry Rosenman freebsd_committer 2017-04-26 01:02:58 UTC
Committed, thanks.