Page MenuHomeFreeBSD

libcasper: Move helper libraries from /lib/casper to /lib.
ClosedPublic

Authored by jhb on Mar 24 2023, 3:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 7, 1:38 AM
Unknown Object (File)
Sat, Oct 19, 3:58 PM
Unknown Object (File)
Oct 1 2024, 5:25 AM
Unknown Object (File)
Sep 29 2024, 10:26 PM
Unknown Object (File)
Sep 29 2024, 10:23 PM
Unknown Object (File)
Sep 29 2024, 8:20 PM
Unknown Object (File)
Sep 29 2024, 10:41 AM
Unknown Object (File)
Sep 29 2024, 1:34 AM

Details

Summary

These libraries are linked to directly by applications rather than
opened at runtime via dlopen().

Diff Detail

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

Event Timeline

jhb requested review of this revision.Mar 24 2023, 3:59 AM

The idea for a separate directory was that we would have many libcasper helpers, and the /lib will get crowdy.
The Casper libraries are quite limited in number so I'm not sure if it's worth it to keep a separate directory here.

In general, I don't mind moving them to "/lib".

If a separate directory is used, we should really use -rpath to do it, but I think that's probably more work than its worth. I think we are not really worried about how many libraries are in /lib and /usr/lib. :)

Taken from a truss output:

open("/lib/libcap_dns.so.2",O_RDONLY|O_CLOEXEC|O_VERIFY,066000) ERR#2 'No such file or directory'
open("/usr/lib/libcap_dns.so.2",O_RDONLY|O_CLOEXEC|O_VERIFY,066000) ERR#2 'No such file or directory'
open("/usr/lib/compat/libcap_dns.so.2",O_RDONLY|O_CLOEXEC|O_VERIFY,066000) ERR#2 'No such file or directory'
open("/usr/local/lib/libcap_dns.so.2",O_RDONLY|O_CLOEXEC|O_VERIFY,066000) ERR#2 'No such file or directory'
open("/usr/local/lib/compat/pkg/libcap_dns.so.2",O_RDONLY|O_CLOEXEC|O_VERIFY,066000) ERR#2 'No such file or directory'
open("/usr/local/lib/perl5/5.30/mach/CORE/libcap_dns.so.2",O_RDONLY|O_CLOEXEC|O_VERIFY,066000) ERR#2 'No such file or directory'
open("/usr/local/lib/perl5/5.32/mach/CORE/libcap_dns.so.2",O_RDONLY|O_CLOEXEC|O_VERIFY,066000) ERR#2 'No such file or directory'
open("/usr/local/llvm11/lib/libcap_dns.so.2",O_RDONLY|O_CLOEXEC|O_VERIFY,066000) ERR#2 'No such file or directory'
open("/usr/local/llvm15/lib/libcap_dns.so.2",O_RDONLY|O_CLOEXEC|O_VERIFY,066000) ERR#2 'No such file or directory'
open("/lib/casper/libcap_dns.so.2",O_RDONLY|O_CLOEXEC|O_VERIFY,066000) = 3 (0x3)

After this change, it'll match on the first attempt.

This revision is now accepted and ready to land.Mar 28 2023, 2:34 PM
Makefile.inc1
3319

Don't we still need this for cleaning up old libs?

Makefile.inc1
3319

Sigh, I guess we do for old entries in Obsoletefiles.inc.

Drop change in list-old-libs

This revision now requires review to proceed.Mar 29 2023, 6:22 PM
This revision is now accepted and ready to land.Mar 29 2023, 7:51 PM