-
Notifications
You must be signed in to change notification settings - Fork 297
Allow specifying ignored shlibs in a package manifest #2594
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
Conversation
Sponsored by: The FreeBSD Foundation
Sponsored by: The FreeBSD Foundation
These are the same type of bug fixed in 0116512, unfortunately that commit didn't catch all the instances. Sponsored by: The FreeBSD Foundation
Store ignored provided/required shlibs in the manifest and database.
This commit does not yet do anything with the ignored shlibs other than
read them from a user provided manifest and store them in the database.
Integration with shared library analysis and the existing
SHLIB_{PROVIDE,REQUIRE}_IGNORE_{GLOB,REGEX} global options will be
implemented in the next commit.
Sponsored by: The FreeBSD Foundation
All provided/required shlibs found by pkg_analyse_files() which are not
included in shlibs_{provided,required} due to filtering are now added to
shlibs_{provided,required}_ignore instead.
Furthermore, it is now possible to filter shilbs by adding them to
shlibs_{provided,required}_ignore in a manifest passed to pkg create.
Sponsored by: The FreeBSD Foundation
Sponsored by: The FreeBSD Foundation
|
what do you think if maybe we can add a notion of "optional" shlibs required, which is only considered with if an option is turned on in pkg.conf ? |
951231a to
867ee46
Compare
I'm not quite sure what you are proposing. Are you proposing that we replace the concept of ignored shared libraries with optionally enforced shared library dependencies and allow users to opt in to pkg enforcing such shlib dependencies? What end user use case do you have in mind? |
|
In ports we're using NO_SHLIB_REQUIRES_GLOB to make pkg skip some libs when building provides/requires relations. Doesn't this PR try to solve the same issue with a different approach? |
First of all, this PR includes a bugfix that makes As for the overlapping feature added by this PR, the ability to specify ignored shlibs in the manifest is motivated by the structure of the |
pkgbase will use the same mecanism as NO_SHLIB_REQUIRES_GLOB in ports, this PR, will add the information of what shlibs has been ignored into the manifest, so it will complement what we have in ports. |
yes this is what I was thinking about, but I was over thinking, so ignore my previous comment. |
The FreeBSD-clang package contains a 32-bit shared object at /usr/lib/clang/19/lib/freebsd/libclang_rt.asan-i386.so This is expected, since clang uses this object when compiling for i386 targets with asan enabled. What is not expected is that the FreeBSD-clang package current depends on 32-bit libc packages due to pkg's shared library analysis, making it impossible to install pkgbase on x86_64 without any lib32 packages. This commit leverages a new pkg feature implemented in [1], but could be landed before a pkg version including that feature is released without any ill effects. Unknown keys in package manifests are ignored. [1]: freebsd/pkg#2594 Sponsored by: The FreeBSD Foundation
The FreeBSD-clang package contains a 32-bit shared object at /usr/lib/clang/19/lib/freebsd/libclang_rt.asan-i386.so This is expected, since clang uses this object when compiling for i386 targets with asan enabled. What is not expected is that the FreeBSD-clang package current depends on 32-bit libc packages due to pkg's shared library analysis, making it impossible to install pkgbase on x86_64 without any lib32 packages. This commit leverages a new pkg feature implemented in [1], but could be landed before a pkg version including that feature is released without any ill effects. Unknown keys in package manifests are ignored. [1]: freebsd/pkg#2594 Sponsored by: The FreeBSD Foundation
The FreeBSD-clang package contains a 32-bit shared object at /usr/lib/clang/19/lib/freebsd/libclang_rt.asan-i386.so This is expected, since clang uses this object when compiling for i386 targets with asan enabled. What is not expected is that the FreeBSD-clang package currently depends on 32-bit libc packages due to pkg's shared library analysis, making it impossible to install pkgbase on x86_64 without any lib32 packages. This commit leverages a new pkg feature implemented in [1], but could be landed before a pkg version including that feature is released without any ill effects. Unknown keys in package manifests are ignored. [1]: freebsd/pkg#2594 Sponsored by: The FreeBSD Foundation
The user-facing goal with this branch is to fix: #2544.
With this branch, the following patch for
freebsd/srcfixes the issue: https://reviews.freebsd.org/D54792There were also several pkg bugs discovered and fixed along the way, notably BACKUP_LIBRARIES now respects ignored shlibs. This requires storing ignored shlibs in the pkg database and bumping the database version.
I'd appreciate a thorough review of the changes to the package database code as I haven't touched that part of pkg before.
See the individual commit messages for further details.