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)
Sep 30 2024, 4:40 AM
Unknown Object (File)
Sep 27 2024, 9:27 PM
Unknown Object (File)
Sep 26 2024, 10:06 PM
Unknown Object (File)
Sep 26 2024, 8:51 AM
Unknown Object (File)
Sep 23 2024, 11:39 AM
Unknown Object (File)
Sep 22 2024, 2:43 PM
Unknown Object (File)
Sep 22 2024, 2:00 PM
Unknown Object (File)
Sep 19 2024, 3:55 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.