Bug 255651 - ports-mgmt/portlint: Says that USE_LDCONFIG isn't needed when it is needed
Summary: ports-mgmt/portlint: Says that USE_LDCONFIG isn't needed when it is needed
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: Joe Marcus Clarke
Depends on:
Reported: 2021-05-06 08:37 UTC by Yuri Victorovich
Modified: 2021-06-14 17:59 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (marcus)


Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2021-05-06 08:37:10 UTC
Testcase: security/kuku

> $ portlint -C
> WARN: /disk-samsung/freebsd-ports/security/kuku/pkg-plist: You have defined USE_LDCONFIG, but this port does not install shared objects in the format lib*.so.[0-9] which ldconfig(8) needs to register them in the hints file.
> 0 fatal errors and 1 warning found.

This port installs:
> lib/libkuku.so
> lib/libkuku.so.2.1
> lib/libkuku.so.2.1.0
therefore USE_LDCONFIG is needed.

Comment 1 Chris Hutchinson 2021-05-06 15:15:41 UTC
What does pkg-plist say?
IOW are those libraries listed?

# make -DBATCH check-plist


Comment 2 Yuri Victorovich freebsd_committer 2021-05-06 16:56:55 UTC
(In reply to Chris Hutchinson from comment #1)

They are listed, there are no plist issues.
Comment 3 Joe Marcus Clarke freebsd_committer 2021-05-14 16:40:42 UTC
According to the ldconfig(8) man page, filenames must conform to the pattern "lib*.so.[0-9]", which these do not.  And if you run ldconfig against these libraries, elf hints are not processed.  The port needs to install libkuku.so.2 for ldconfig to properly process the library.
Comment 4 Yuri Victorovich freebsd_committer 2021-05-27 02:53:33 UTC
ldconfig(8) has been updated and doesn't contain the limitation "lib*.so.[0-9]" any more. [1]

[1] https://reviews.freebsd.org/D30272
Comment 5 Yuri Victorovich freebsd_committer 2021-06-04 22:58:16 UTC
There is another case when USE_LDCONFIG is always needed - when the directory is not lib.

Testcase where portlint complains when it shouldn't: audio/carla
Comment 6 Joe Marcus Clarke freebsd_committer 2021-06-07 21:35:17 UTC
Thanks, Yuri.  Seems like ldconfig itself needs to be changed, at least in the list_elf_hints() function.  It still enforces the old pattern and thus won't print those libraries.  But that doesn't seem to affect the actual linker.
Comment 7 Joe Marcus Clarke freebsd_committer 2021-06-14 17:59:22 UTC
Fixed in 2.19.7.