Bug 233026 - sysutils/procenv: Fix use of deprecated #include (sys/capability.h).
Summary: sysutils/procenv: Fix use of deprecated #include (sys/capability.h).
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: Ed Maste
Keywords: easy, needs-qa
Depends on: 233176
Blocks: 228878
  Show dependency treegraph
Reported: 2018-11-06 14:02 UTC by Ed Maste
Modified: 2019-01-13 12:48 UTC (History)
3 users (show)

See Also:
koobs: merge-quarterly?

svn-diff-procenv (9.24 KB, patch)
2018-11-07 01:05 UTC, w.schwarzenfeld
no flags Details | Diff
svn-diff-procenv-0.50 (3.99 KB, patch)
2018-11-07 02:52 UTC, w.schwarzenfeld
koobs: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer 2018-11-06 14:02:24 UTC
By inspection, work/procenv-0.36/src/procenv.h:

#include <sys/capability.h>

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.
Comment 1 w.schwarzenfeld freebsd_triage 2018-11-07 01:05:20 UTC
Created attachment 199037 [details]

Replace deprecated header with capsicum.h and update to 0.40.
Comment 2 Tobias Kortkamp freebsd_committer 2018-11-07 01:21:13 UTC
Comment on attachment 199037 [details]

Project moved to GitHub [0,1] and there are newer releases there.
Also see [2] from Ed.

Walter, can you send the patches upstream?

[0] https://launchpad.net/procenv/+announcement/13689
[1] https://github.com/jamesodhunt/procenv
[2] https://github.com/jamesodhunt/procenv/issues/6
Comment 3 w.schwarzenfeld freebsd_triage 2018-11-07 02:02:10 UTC
Ok, I was to fast, let's wait for upstream.
Comment 4 w.schwarzenfeld freebsd_triage 2018-11-07 02:52:29 UTC
Created attachment 199039 [details]

Ok, tried again. In this version only two occurances of capabilities.h. I deleted both, but not replaced
it with capsicum.h. If I understand right, it is not needed.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2018-11-07 03:06:58 UTC
Reporter is committer, assign accordingly.

@Tobik Feel free to self-assign this if we (or Ed) would like to skip ports approval for Ed. Alternatively, we can ports approve the attachment for Ed to commit, though the change still needs review/QA confirmation

We should also separate the 'bugfix' from the version update so that the former may be merged to quarterly. Alternatively, if the version update is bugfixes only, the whole change can be committed and merged together

patch-file(s) should be commented with upstream issue/pr/commit references where available
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2018-11-07 03:09:55 UTC
Comment on attachment 199039 [details]

Approved by: portmgr (unmaintained port)

Pending review, QA and ports approval
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2018-11-07 03:10:29 UTC
Comment on attachment 199039 [details]

Reporter to review
Comment 8 commit-hook freebsd_committer 2018-11-09 16:37:19 UTC
A commit references this bug:

Author: swills
Date: Fri Nov  9 16:37:09 UTC 2018
New revision: 484524
URL: https://svnweb.freebsd.org/changeset/ports/484524

  devel/jfrog-cli: update to 1.20.2

  PR:		233026
  Submitted by:	Antoine Levy-Lambert <antoine.levy.lambert@gmail.com>

Comment 9 w.schwarzenfeld freebsd_triage 2018-11-09 16:57:58 UTC
I think the commit reference is in the wrong PR.
Comment 10 w.schwarzenfeld freebsd_triage 2018-11-09 17:00:08 UTC
A typo jfrog-cli is bug #233036.
Comment 11 Ed Maste freebsd_committer 2018-11-12 16:17:07 UTC
(In reply to w.schwarzenfeld from comment #4)
> I deleted both, but not replaced
> it with capsicum.h. If I understand right, it is not needed.

If a port uses Capsicum it should include <sys/capsicum.h>; there are ports that want Linux capabilities and include sys/capability.h, those should not be switched to include capsicum.h.

Looking at sysutils/procenv it does use Capsicum capabilities (look for cap_rights_t / cap_rights_get etc.) and should be including sys/capsicum.h on FreeBSD.
Comment 12 w.schwarzenfeld freebsd_triage 2018-11-12 17:48:02 UTC
Comment on attachment 199039 [details]

Ok, I obsolete it. platform-headers.h is not really clear for me.
Comment 13 w.schwarzenfeld freebsd_triage 2018-11-12 18:09:19 UTC
Should I make the update PR before capability.h  fix?
Comment 14 Ed Maste freebsd_committer 2018-11-12 18:24:18 UTC
(In reply to w.schwarzenfeld from comment #13)
IMO yes, do the update first then the change for capability.h.
Comment 15 Kurt Jaeger freebsd_committer 2019-01-13 12:48:09 UTC
The include of sys/capability.h was fixed with the upgrade in PR#233176.