-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libpkg: track lib32 and Linuxulator shlibs #2387
base: main
Are you sure you want to change the base?
Conversation
Note: this is not yet sufficient to fully close #2331 as lib32 and Linuxulator shlibs are not yet backed up if BACKUP_LIBRARIES is set. |
Sponsored by: The FreeBSD Foundation
Sponsored by: The FreeBSD Foundation
387a576
to
d204e77
Compare
Hmm, this PR causes the backup_lib test to fail on Debian for some reason. I will investigate tomorrow. |
When scanning ELF files to generate the shlibs_provided/required lists, pkg now generates entries for lib32 and Linux compat shlibs rather than ignoring all non-native shlibs. The following format is used for shlibs_provided/required entries: libfoo.so.1.0.0 - native (no change to status quo) libfoo.so.1.0.0:32 - compat 32 libfoo.so.1.0.0:Linux - compat Linux libfoo.so.1.0.0:Linux:32 - compat Linux 32 This is only done if targeting FreeBSD for now. References: freebsd#2331 Sponsored by: The FreeBSD Foundation
d204e77
to
0e628a4
Compare
I've realized another blocker to resolve before merging this PR: We need to scan |
Since pkg now tracks 32-bit compat shlib dependencies, we must take the 32-bit compat shlibs provided by the base system into account if not targeting a pkgbase system. Sponsored by: The FreeBSD Foundation
The backup_lib test is failing on Debian because pkg fails to determine that
Furthermore, the OS set in the elf header is very generic, so it wouldn't make sense for pkg to fall back on checking that:
This will also be an issue for detecting Linuxulator shlibs on FreeBSD though we don't have tests for that yet. I will investigate if there is a reliable way to detect ELF files compiled for Linux though I'm a bit worried that there is no universal solution here due to the fragmentation of the Linux ecosystem. |
When scanning ELF files to generate the shlibs_provided/required lists, pkg now generates entries for lib32 and Linux compat shlibs rather than ignoring all non-native shlibs.
The following format is used for shlibs_provided/required entries:
This is only done if targeting FreeBSD for now.
I've marked this as a draft because it depends on the unmerged #2386 and because I would like to add more tests before it is merged.
References: #2331