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
URL:
Keywords: easy, needs-qa
Depends on: 233176
Blocks: 228878
  Show dependency treegraph
 
Reported: 2018-11-06 14:02 UTC by Ed Maste
Modified: 2019-08-06 01:38 UTC (History)
3 users (show)

See Also:
koobs: merge-quarterly?


Attachments
svn-diff-procenv (9.24 KB, patch)
2018-11-07 01:05 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-procenv-0.50 (3.99 KB, patch)
2018-11-07 02:52 UTC, Walter Schwarzenfeld
koobs: maintainer-approval+
Details | Diff
svn-diff-procenv (727 bytes, patch)
2019-08-05 10:34 UTC, Walter Schwarzenfeld
no flags Details | Diff

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

#if defined (HAVE_SYS_CAPABILITY_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 Walter Schwarzenfeld 2018-11-07 01:05:20 UTC
Created attachment 199037 [details]
svn-diff-procenv

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

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 Walter Schwarzenfeld 2018-11-07 02:02:10 UTC
Ok, I was to fast, let's wait for upstream.
Comment 4 Walter Schwarzenfeld 2018-11-07 02:52:29 UTC
Created attachment 199039 [details]
svn-diff-procenv-0.50

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]
svn-diff-procenv-0.50

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]
svn-diff-procenv-0.50

Reporter to review
Comment 8 commit-hook freebsd_committer freebsd_triage 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

Log:
  devel/jfrog-cli: update to 1.20.2

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

Changes:
  head/devel/jfrog-cli/Makefile
  head/devel/jfrog-cli/distinfo
  head/devel/jfrog-cli/files/
  head/devel/jfrog-cli/files/patch-jfrog-cli_utils_lock_utils__unix.go
Comment 9 Walter Schwarzenfeld 2018-11-09 16:57:58 UTC
I think the commit reference is in the wrong PR.
Comment 10 Walter Schwarzenfeld 2018-11-09 17:00:08 UTC
A typo jfrog-cli is bug #233036.
Comment 11 Ed Maste freebsd_committer freebsd_triage 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 Walter Schwarzenfeld 2018-11-12 17:48:02 UTC
Comment on attachment 199039 [details]
svn-diff-procenv-0.50

Ok, I obsolete it. platform-headers.h is not really clear for me.
Comment 13 Walter Schwarzenfeld 2018-11-12 18:09:19 UTC
Should I make the update PR before capability.h  fix?
Comment 14 Ed Maste freebsd_committer freebsd_triage 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 freebsd_triage 2019-01-13 12:48:09 UTC
The include of sys/capability.h was fixed with the upgrade in PR#233176.
Comment 16 Walter Schwarzenfeld 2019-08-05 10:16:52 UTC
Reopen, port has mark BROKEN in port r508153.
-->
In file included from platform/freebsd/platform.c:19:
In file included from ./platform/freebsd/platform-freebsd.h:26:
/usr/include/sys/capability.h:43:2: error: this file includes <sys/capability.h> which is deprecated [-Werror,-W#warnings]
#warning this file includes <sys/capability.h> which is deprecated
Comment 17 Walter Schwarzenfeld 2019-08-05 10:34:54 UTC
Created attachment 206290 [details]
svn-diff-procenv
Comment 18 Walter Schwarzenfeld 2019-08-05 16:27:48 UTC
Fixed in r508180.
Comment 19 Walter Schwarzenfeld 2019-08-05 16:28:21 UTC
ports r508180.
Comment 20 Ed Maste freebsd_committer freebsd_triage 2019-08-06 01:38:56 UTC
Thanks!