Bug 275013 - net-mgmt/collectd5: Add libpfctl dep to fix build on main
Summary: net-mgmt/collectd5: Add libpfctl dep to fix build on main
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-10 14:59 UTC by Brad Davis
Modified: 2023-11-29 23:57 UTC (History)
2 users (show)

See Also:


Attachments
patch (3.79 KB, patch)
2023-11-10 14:59 UTC, Brad Davis
no flags Details | Diff
patch (3.78 KB, patch)
2023-11-27 21:22 UTC, Brad Davis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Davis freebsd_committer freebsd_triage 2023-11-10 14:59:48 UTC
Created attachment 246235 [details]
patch
Comment 1 Kristof Provost freebsd_committer freebsd_triage 2023-11-10 15:33:38 UTC
LGTM, but presumably ports@bsdserwis.com needs to approve this.

Although it's net-mgmt/collectd5, not net/collectd5
Comment 2 Krzysztof 2023-11-10 21:18:52 UTC
Comment on attachment 246235 [details]
patch

I've made a bug #274300 2 weeks ago? I don't know why this bug was not "picked up" :-(((

On my testing system libpfctl was in base system, so I think it is not needed to install the same lib from ports. But of course I can be wrong.
Comment 3 Brad Davis freebsd_committer freebsd_triage 2023-11-10 22:22:55 UTC
(In reply to Krzysztof from comment #2)

Oh that is unfortunate.. sorry.. I thought I searched bugzilla but apparently I missed it.

It needs to be installed from ports since that will have the right code for each version of FreeBSD, i.e. libpfctl missing on older versions.  At least that is my understanding, right Kristof?
Comment 4 Brad Davis freebsd_committer freebsd_triage 2023-11-10 22:28:43 UTC
I am also trying to upstream this change:

https://github.com/collectd/collectd/pull/4148
Comment 5 Kristof Provost freebsd_committer freebsd_triage 2023-11-10 22:44:47 UTC
(In reply to Brad Davis from comment #3)
> It needs to be installed from ports since that will have the right code for each version of FreeBSD, i.e. libpfctl missing on older versions.

Correct. The libpfctl in the base system is a private library. I'm surprised that a port managed to build against it. It shouldn't be able to. It definitely shouldn't try.
Comment 6 Brad Davis freebsd_committer freebsd_triage 2023-11-27 21:22:39 UTC
Created attachment 246615 [details]
patch

new patch attached.

I tried your idea from the other bug, LIB_DEPENDS for sysutils/nut requires a shared library, i.e. beginning with lib and ending with .so.
Comment 7 Krzysztof 2023-11-28 18:30:18 UTC
Comment on attachment 246615 [details]
patch

For me it is OK. Thanks a lot
Comment 8 commit-hook freebsd_committer freebsd_triage 2023-11-29 23:57:03 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5b63443a6ea8490165d887f00c250f506f41e0d4

commit 5b63443a6ea8490165d887f00c250f506f41e0d4
Author:     Brad Davis <brd@FreeBSD.org>
AuthorDate: 2023-11-29 23:52:11 +0000
Commit:     Brad Davis <brd@FreeBSD.org>
CommitDate: 2023-11-29 23:55:47 +0000

    net-mgmt/collectd5: Use libpfctl

    PR:             275013
    Reviewed by:    kp
    Approved by:    Krzysztof <ports@bsdserwis.com> (maintainer)
    Sponsored by:   Rubicon Communications, LLC ("Netgate")

 net-mgmt/collectd5/Makefile                    |  9 ++-
 net-mgmt/collectd5/files/patch-src__pf.c (new) | 84 ++++++++++++++++++++++++++
 2 files changed, 90 insertions(+), 3 deletions(-)