Bug 233092

Summary: lang/go: relies on deprecated sys/capability.h header for Capsicum
Product: Ports & Packages Reporter: Ed Maste <emaste>
Component: Individual Port(s)Assignee: Julien Laffaye <jlaffaye>
Status: Closed FIXED    
Severity: Affects Only Me CC: dg, w.schwarzenfeld
Priority: --- Flags: bugzilla: maintainer-feedback? (jlaffaye)
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://github.com/golang/sys/commit/3a27cdcb
Bug Depends on:    
Bug Blocks: 228878, 233090, 233091    

Description Ed Maste freebsd_committer 2018-11-09 18:17:57 UTC
sys/capability.h will be removed before FreeBSD 13. The (now) correct header to use on all supported (and most unsupported) versions of FreeBSD is sys/capsicum.h.

There's no need for autoconf checks etc. to check for both (in the ports tree) but upstream may want to if there's a desire to build on older releases.

go/vendor/golang.org/x/sys/unix/mkerrors.sh
82:#include <sys/capability.h>
Comment 1 Ed Maste freebsd_committer 2018-11-12 17:53:16 UTC
Upstream pull request at https://github.com/golang/go/pull/28742

Port can probably use REINPLACE_CMD to modify the file while waiting on the change to percolate through, or just wait if it gets merged/released quickly.
Comment 2 Ed Maste freebsd_committer 2018-11-12 17:55:00 UTC
Canonical change URL: https://go-review.googlesource.com/c/go/+/148836
Comment 3 Ed Maste freebsd_committer 2018-11-24 22:14:28 UTC
Link to commit that addresses this.
Comment 4 w.schwarzenfeld freebsd_triage 2019-02-11 12:05:17 UTC
ping!
Comment 5 Dmitri Goutnik 2019-03-08 17:48:32 UTC
This was fixed by the upstream [1] and included in go1.12

[1] https://github.com/golang/go/commit/cc5fb5d93dd5880ba9832b1aa5f0914cca5cc0bd#diff-0a9f0278821c88f523571ee62e282314L83
Comment 6 Ed Maste freebsd_committer 2019-06-18 14:18:17 UTC
In go 1.12 per comment #5