Bug 233460 - net/miniupnpc: use textproc/gsed for install's GNU-isms
Summary: net/miniupnpc: use textproc/gsed for install's GNU-isms
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dirk Meyer
Depends on:
Blocks: 229925
  Show dependency treegraph
Reported: 2018-11-24 02:27 UTC by Kyle Evans
Modified: 2018-11-26 09:44 UTC (History)
3 users (show)

See Also:

svn(1) diff against net/miniupnpc (352 bytes, patch)
2018-11-24 02:27 UTC, Kyle Evans
no flags Details | Diff
Fix sed(1) usage (732 bytes, patch)
2018-11-26 06:37 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans freebsd_committer 2018-11-24 02:27:17 UTC
Created attachment 199505 [details]
svn(1) diff against net/miniupnpc


The install bits of this port attempt this: sed 's/\(.*MINIUPNPC_API_VERSION\s\+\)[0-9]\+/\117/' 

There are two problems of attempting to do this with our sed:

1.) \s is a GNU extension; our sed will pass this through as an escaped \s and regex(3) will interpret it as an escaped ordinary 's'.

2.) \117 is likely expecting character represented by \117 to be inserted, but this will not behave accordingly

Fix this by plopping gsed in place of sed for this port. #1 will be explicitly disallowed in a future version of regex(3), making this ideal for now.


Kyle Evans
Comment 1 Jan Beich freebsd_committer 2018-11-26 06:37:15 UTC
Created attachment 199566 [details]
Fix sed(1) usage

2.) \117 is not a byte but \1$(APIVERSION)
3.) \+ is another GNU extension not understood by BSD regex(3)
Comment 2 Jan Beich freebsd_committer 2018-11-26 06:38:06 UTC
Assign to the maintainer.
Comment 3 Dirk Meyer freebsd_committer 2018-11-26 07:14:04 UTC
With the second patch applied, do we still need gsed?
Comment 4 Jan Beich freebsd_committer 2018-11-26 07:27:06 UTC
Probably not. I've tested attachment 199566 [details] against libc patch from bug 229925.
Comment 5 commit-hook freebsd_committer 2018-11-26 09:43:36 UTC
A commit references this bug:

Author: dinoex
Date: Mon Nov 26 09:43:29 UTC 2018
New revision: 485935
URL: https://svnweb.freebsd.org/changeset/ports/485935

  - fix sed(1) usage
   Jan Beich
  PR:		233460
  Submitted by:	Jan Beich
  Reported by:	Kyle Evans

Comment 6 Dirk Meyer freebsd_committer 2018-11-26 09:44:58 UTC