Bug 233460

Summary: net/miniupnpc: use textproc/gsed for install's GNU-isms
Product: Ports & Packages Reporter: Kyle Evans <kevans>
Component: Individual Port(s)Assignee: Dirk Meyer <dinoex>
Status: Closed FIXED    
Severity: Affects Only Me CC: dinoex, jbeich, johans
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 229925    
Attachments:
Description Flags
svn(1) diff against net/miniupnpc
none
Fix sed(1) usage none

Description Kyle Evans freebsd_committer freebsd_triage 2018-11-24 02:27:17 UTC
Created attachment 199505 [details]
svn(1) diff against net/miniupnpc

Hi,

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.

Thanks,

Kyle Evans
Comment 1 Jan Beich freebsd_committer freebsd_triage 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 freebsd_triage 2018-11-26 06:38:06 UTC
Assign to the maintainer.
Comment 3 Dirk Meyer freebsd_committer freebsd_triage 2018-11-26 07:14:04 UTC
With the second patch applied, do we still need gsed?
Comment 4 Jan Beich freebsd_committer freebsd_triage 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 freebsd_triage 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

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

Changes:
  head/net/miniupnpc/files/patch-Makefile
Comment 6 Dirk Meyer freebsd_committer freebsd_triage 2018-11-26 09:44:58 UTC
Thanks.