Bug 220054 - Mk/bsd.java.mk: Use POSIX-compliant regular expressions with grep(1)
Summary: Mk/bsd.java.mk: Use POSIX-compliant regular expressions with grep(1)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kyle Evans
URL:
Keywords:
Depends on:
Blocks: 218385
  Show dependency treegraph
 
Reported: 2017-06-16 17:56 UTC by Kyle Evans
Modified: 2017-07-14 18:20 UTC (History)
8 users (show)

See Also:
koobs: maintainer-feedback? (java)
koobs: exp-run+


Attachments
svn(1) diff of Mk/bsd.java.mk (2.57 KB, patch)
2017-06-16 17:56 UTC, Kyle Evans
no flags Details | Diff
diff -U10 of bsd.java.mk; potentially improved (3.00 KB, patch)
2017-06-27 02:45 UTC, Kyle Evans
no flags Details | Diff
svn(1) diff for exp-run (2.51 KB, patch)
2017-07-12 14:35 UTC, Kyle Evans
koobs: maintainer-approval? (java)
koobs: maintainer-approval? (portmgr)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans freebsd_committer 2017-06-16 17:56:36 UTC
Created attachment 183541 [details]
svn(1) diff of Mk/bsd.java.mk

Noted by Steve Kargl on freebsd-ports@:

bsd.java.mk uses GNU extensions (branching BREs) for version/vendor validation, and bsdgrep(1) has not yet regrown GNU extensions. I'm attaching a patch to go ahead and make these expressions POSIX compliant.
Comment 1 Kyle Evans freebsd_committer 2017-06-27 02:45:39 UTC
Created attachment 183826 [details]
diff -U10 of bsd.java.mk; potentially improved

Alternatively, I propose the attached patch that cleans up the *_REGEXP generation a little bit by properly using make(1) logic *and* uses EREs instead of BREs. I double-checked that the generated patterns remained the same (spoilers: they did).
Comment 2 Kyle Evans freebsd_committer 2017-07-12 14:35:33 UTC
Created attachment 184305 [details]
svn(1) diff for exp-run

Redo the patch, svn(1) diff from base of the ports tree to be applied for the exp-run, for simplicity sake.
Comment 3 Antoine Brodin freebsd_committer 2017-07-14 13:55:03 UTC
Exp-run looks fine.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2017-07-14 14:50:28 UTC
Reporter is committer, assign accordingly. Not sure who's (currently) on java@, but portmgr@ can also approve
Comment 5 commit-hook freebsd_committer 2017-07-14 18:09:20 UTC
A commit references this bug:

Author: kevans
Date: Fri Jul 14 18:09:11 UTC 2017
New revision: 445802
URL: https://svnweb.freebsd.org/changeset/ports/445802

Log:
  Minor cleanup to Java version/vendor/OS validation

  - Use POSIX compliant expressions instead of employing GNU extensions
  (branching in BREs)
  - Simplify regex generation using make(1)'s :ts modifier

  PR:		220054
  Approved by:	bapt (portmgr)

Changes:
  head/Mk/bsd.java.mk
Comment 6 Kyle Evans freebsd_committer 2017-07-14 18:20:58 UTC
Thanks!