Skip to content
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

RPM packages do not provide automatic resources #738

Open
cottsay opened this issue Oct 29, 2024 · 0 comments
Open

RPM packages do not provide automatic resources #738

cottsay opened this issue Oct 29, 2024 · 0 comments
Assignees

Comments

@cottsay
Copy link
Member

cottsay commented Oct 29, 2024

During the typical RPM build process all installed shared object libraries are enumerated and listed as part of the package metadata. These binaries are also inspected to determine which libraries they require to run and these dependencies are also expressed as part of the package metadata.

This process, sometimes referred to as AutoReqProv, is disabled in packages generated by Bloom for the ROS buildfarm intentionally. The decision mostly stems from a lack of location-awareness in the underlying mechanism which can lead to incorrect behavior. Some specific examples:

  1. A ROS package which provides a shared object library which is also provided by a system package, may be installed by mistake to satisfy an unrelated system package dependency. Even if the ROS package does indeed carry the same library, it may have a different ABI from the system package, and would also only be discoverable if the workspace containing the ROS package had been sourced where the system package was used.
  2. There is effectively no way to differentiate between library provisions in different ROS distributions, so RPM may try to satisfy a dependency across ROS distributions which we obviously don't want to do.

While system packages for Fedora and Enterprise Linux rely on AutoReqProv to resolve runtime shared object library dependencies in RPMs, ROS packages explicitly declare runtime dependencies and shouldn't require this functionality. While these dependencies are manually curated and may be less accurate than what AutoReqProv can provide, the risk of interfering with unrelated system packages on a user's system outweighs the benefits.

Hypothetically speaking, if we were able to modify the AutoReqProv system to be location-aware, it might be possible to re-enable it for ROS packages. It should be noted that unless such a change were contributed upstream into the OS, packages downstream of our own packages would probably need to make the same change.

I don't see any way we could ever enable AutoReqProv with only changes to the templates here, but I'm open to suggestions from other RPM users on possible solutions or mitigations.

Information on automatic dependencies in RPM: http://ftp.rpm.org/max-rpm/s1-rpm-depend-auto-depend.html

Relevant .spec template snippet for disabling AutoReqProv within our directory trees:

%global __provides_exclude_from ^@(InstallationPrefix)/.*$
%global __requires_exclude_from ^@(InstallationPrefix)/.*$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant