Bug 248460 - devel/sigar: fix after filedesc struct change
Summary: devel/sigar: fix after filedesc struct change
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks: 248453
  Show dependency treegraph
 
Reported: 2020-08-03 22:51 UTC by Ronald Klop
Modified: 2020-08-13 12:32 UTC (History)
1 user (show)

See Also:
fernape: merge-quarterly+


Attachments
rename fd_lastfile to fd_nfiles (makepatch & svn diff) (3.54 KB, patch)
2020-08-03 22:51 UTC, Ronald Klop
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ronald Klop 2020-08-03 22:51:28 UTC
Created attachment 216998 [details]
rename fd_lastfile to fd_nfiles (makepatch & svn diff)

Port devel/sigar does not build on 13-CURRENT since base r363214.
See bug #248453 for links to pkg logs about the breakage.
The attached patch fixes it.

The fix was suggested in a reply to https://lists.freebsd.org/pipermail/freebsd-ports/2020-August/119093.html by Mateusz Guzik (mjg).

"I don't know what they used the counter for, the name "total" is a
little worrisome. Nonetheless, I suspect the code will be fine enough
by unconditionally doing:
 
    procfd->total = filed.fd_nfiles;
 
However, this likely wants to stop using kvm in the first place. The
kernel exports all necessary info using sysctls, see procstat."

The code in the port is highly undocumented, but AFAIK it tries to get the number of open files of the current process.

If this is committed it obsoletes bug #248453.
Comment 1 commit-hook freebsd_committer freebsd_triage 2020-08-13 09:18:24 UTC
A commit references this bug:

Author: fernape
Date: Thu Aug 13 09:17:53 UTC 2020
New revision: 544794
URL: https://svnweb.freebsd.org/changeset/ports/544794

Log:
  devel/sigar: build after filedesc struct change

  In base revision r363214[1] we dropped the fd_lastfile field of the
  filedesc struct. This breaks devel/sigar.

  The applied solution was proposed by mjg@ in this[2] mail thread.

  [1] https://svnweb.freebsd.org/changeset/base/363214
  [2] https://lists.freebsd.org/pipermail/freebsd-ports/2020-August/119093.html

  PR:	248460
  Submitted by:	ronald-lists@klop.ws

Changes:
  head/devel/sigar/files/patch-src_os_darwin_darwin__sigar.c
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2020-08-13 09:18:54 UTC
Committed,

Thanks!
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2020-08-13 09:50:14 UTC
Is quarterly broken on current as well?
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2020-08-13 11:26:33 UTC
(In reply to Kubilay Kocak from comment #3)

Yep...

I'd like to hear from someone using bleeding edge current with quite conservative quaterly branch :)
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-08-13 11:33:46 UTC
A commit references this bug:

Author: fernape
Date: Thu Aug 13 11:33:04 UTC 2020
New revision: 544804
URL: https://svnweb.freebsd.org/changeset/ports/544804

Log:
  MFH: r544794

  devel/sigar: build after filedesc struct change

  In base revision r363214[1] we dropped the fd_lastfile field of the
  filedesc struct. This breaks devel/sigar.

  The applied solution was proposed by mjg@ in this[2] mail thread.

  [1] https://svnweb.freebsd.org/changeset/base/363214
  [2] https://lists.freebsd.org/pipermail/freebsd-ports/2020-August/119093.html

  PR:	248460
  Submitted by:	ronald-lists@klop.ws

  Approved by:	ports-secteam (blanket, build fix)

Changes:
_U  branches/2020Q3/
  branches/2020Q3/devel/sigar/files/patch-src_os_darwin_darwin__sigar.c
Comment 6 Fernando Apesteguía freebsd_committer freebsd_triage 2020-08-13 11:34:41 UTC
MFH'ed.

Thanks koobs@ for the heads up!