Page MenuHomeFreeBSD

Add /lib/capser to the rpath for anything linked against libcasper helpers.
AbandonedPublic

Authored by jhb on Mar 23 2023, 12:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 28, 1:13 PM
Unknown Object (File)
Thu, Apr 25, 6:12 PM
Unknown Object (File)
Dec 12 2023, 6:13 AM
Unknown Object (File)
Nov 1 2023, 8:07 PM
Unknown Object (File)
Sep 30 2023, 8:08 PM
Unknown Object (File)
Aug 6 2023, 10:01 AM
Unknown Object (File)
May 15 2023, 5:39 AM
Unknown Object (File)
May 13 2023, 5:32 PM
Subscribers

Details

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 50534
Build 47425: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Mar 23 2023, 12:49 AM

This is an alternative to D39213. This does not yet remove the path from rtld's default path (which should be done as a followup at some point).

However, I also wonder at why we need these libraries hidden under /lib/casper at all. Other DSOs that we place under subdirectories like /lib/geom are things that are dlopen()'d and not linked to directly by end applications. Even the pam modules are in /usr/lib rather than /usr/lib/pam (and those are dlopen()'d). To me things that we explicitly link to with -l probably should be in /lib or /usr/lib.

markj added a reviewer: oshogbo.
In D39222#892980, @jhb wrote:

This is an alternative to D39213. This does not yet remove the path from rtld's default path (which should be done as a followup at some point).

However, I also wonder at why we need these libraries hidden under /lib/casper at all. Other DSOs that we place under subdirectories like /lib/geom are things that are dlopen()'d and not linked to directly by end applications. Even the pam modules are in /usr/lib rather than /usr/lib/pam (and those are dlopen()'d). To me things that we explicitly link to with -l probably should be in /lib or /usr/lib.

This might be a holdover from the early days of casper, where it was a single system process?

This revision is now accepted and ready to land.Mar 23 2023, 3:18 PM

Oops, I added the wrong Marius, thanks for fixing. :) If these used to be dlopen()'d but are now linked directly, then I think moving them to /lib and retiring /lib/casper altogether is the better fix than this. It would also avoid requiring ports that use casper to start using -rpath (which is a prerequisite for removing it from rtld's default search path).

In D39222#893162, @jhb wrote:

Oops, I added the wrong Marius, thanks for fixing. :) If these used to be dlopen()'d but are now linked directly, then I think moving them to /lib and retiring /lib/casper altogether is the better fix than this. It would also avoid requiring ports that use casper to start using -rpath (which is a prerequisite for removing it from rtld's default search path).

That seems sensible. I can't see how it would break anything.

I don't mind also moving them simply to /lib.