Page MenuHomeFreeBSD

pkgbase: only provide shlibs from /lib,/usr/lib,/usr/lib32
Needs ReviewPublic

Authored by ifreund_freebsdfoundation.org on Tue, Jan 20, 12:53 PM.

Details

Reviewers
emaste
bapt
jrtc27
Group Reviewers
pkgbase
Summary

This results in the following changes to base system packages:

FreeBSD-clang-16 no longer provides:
libclang_rt.asan-i386.so:32
libclang_rt.asan-x86_64.so

FreeBSD-tests-16 no longer provides:
libatexit.so
libdeep.so.0
libenc_test.so
libh_csu.so
libh_tls_dynamic.so.1
libpythagoras.so.0
libsoxstack.so
libval.so.0
libval2.so.0

FreeBSD-utilities-16 no longer provides:
libBIG5.so.5
libDECHanyu.so.5
libEUC.so.5
libEUCTW.so.5
libGBK2K.so.5
libHZ.so.5
libISO2022.so.5
libJOHAB.so.5
libMSKanji.so.5
libUES.so.5
libUTF1632.so.5
libUTF7.so.5
libUTF8.so.5
libVIQR.so.5
libZW.so.5
libiconv_none.so.5
libiconv_std.so.5
libmapper_646.so.5
libmapper_none.so.5
libmapper_parallel.so.5
libmapper_serial.so.5
libmapper_std.so.5
libmapper_zone.so.5

FreeBSD-utilities-lib32-16 no longer provides:
libBIG5.so.5:32
libDECHanyu.so.5:32
libEUC.so.5:32
libEUCTW.so.5:32
libGBK2K.so.5:32
libHZ.so.5:32
libISO2022.so.5:32
libJOHAB.so.5:32
libMSKanji.so.5:32
libUES.so.5:32
libUTF1632.so.5:32
libUTF7.so.5:32
libUTF8.so.5:32
libVIQR.so.5:32
libZW.so.5:32
libiconv_none.so.5:32
libiconv_std.so.5:32
libmapper_646.so.5:32
libmapper_none.so.5:32
libmapper_parallel.so.5:32
libmapper_serial.so.5:32
libmapper_std.so.5:32
libmapper_zone.so.5:32

Sponsored by: The FreeBSD Foundation

Diff Detail

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

Event Timeline

@jrtc27 I'd like some input from you here since you seem to be the most familiar with libcompats beyond compat32.

Currently, pkg will ignore shared libraries with an ELF header that does not match the architecture in pkg config ABI. As an exception, pkg does look at libraries built for the corresponding 32-bit target if pkg config ABI is amd64, aarch64, or powerpc64.

I think this means that pkg already ignores shared libraries completely for other libcompats? What architecture does CheriBSD put in the ELF header for compat shared libraries?

If that is not the case, then I suspect that pkg is conflating shared libraries for libcompats other than compat32. That is, this issue which was solved for compat32 has not been solved in general: https://bugs.freebsd.org/bugzilla//show_bug.cgi?id=265061

Our pkg is old enough to predate that support, but we're also not doing pkgbase yet, so presumably once it's mature enough upstream for us to adopt it downstream we'll first update pkg.

Makefile.inc1
2284

would be the obvious generalisation

2284

But should both of these not be the default for FreeBSD?

Makefile.inc1
2284

But should both of these not be the default for FreeBSD?

pkg used to look at ldconfig paths but that turned out to be problematic in a number of cases, especially when cross building packages, so that support was removed. These SHLIB_PROVIDE_PATHS_* options were added alongside that removal but nobody got around to setting them in src till now.

would be the obvious generalisation

Thanks, that Makefile syntax was not obvious to me at least. I do wonder if it makes sense to commit the generic version now despite the fact that pkg only supports compat32 so far? I guess it wouldn't hurt since pkg ignores unknown options...

Makefile.inc1
2284

I don't see a world in which not generalising is better; by adding the possibly-unknown options, either you get an error, which forces you to use a pkg that understands them so as to not get broken packages, or they're silently ignored, which is no worse than them not being there in the first place (in both cases you have to go digging to figure out why the dependencies are what they are).