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

Enhance requires with version information from the build root. #2372

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from

Commits on Mar 11, 2024

  1. Enhance requires with version information from the build root.

    The --libtool-version-fallback option will cause elfdeps to
    try to use the version information in the shared object's filename
    for shared objects that don't provide versioned symbols. This
    additional information allows rpm to track minor-version
    dependencies.
    
    When dlmopen() loads a library, it runs functions with the
    __attribute__((constructor)) function attribute, and when they are
    closed, it runs functions with __attribute__((destructor)). This
    isn't always safe. Some libraries (like gobject) do not support
    being opened and closed, and they'll result in a SEGV if they're
    opened more than once. That will happen if elfdeps examines a
    shared object that is linked to gobject, and then later another
    one (or libgobject itself). However, if we fork and then open
    only one shared object and then exit, we don't cause that problem.
    gordonmessmer committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    9450b5f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2ee4efd View commit details
    Browse the repository at this point in the history
  3. Use C-style comments.

    gordonmessmer committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    36c3f93 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b94b314 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9ad633e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c7ab5b1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    dc08d7c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    302bcc0 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    09aeee2 View commit details
    Browse the repository at this point in the history
  10. Add tests for the elf dependency generator fallback version feature.

    These tests are not compatible with fakechroot, for two reasons.
    While fakechroot supports dlmopen(), it will convert relative paths
    to absolute paths, which prevents library path searching.  The test
    could be run from the data directory so that the relative path's
    absolute path expansion was correct, and dlmopen() will succeed.
    However, linkmap->l_name will have the real path, not a chrooted
    path, and when that is passed to readlink(), fakechroot will try
    to expand a path that already includes the chroot prefix.  So,
    even when the library can be loaded with dlmopen(), the symlink
    can't be resolved to find the path that contains the version.
    gordonmessmer committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    207ac2e View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    7fd2201 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    7445008 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3c412b8 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2024

  1. Rather than read the version for an ELF shared object directly

    from the symlink target, generate ".elf-version/<so>" files
    containing the value of the _elf_so_version macro.  These files
    are then used by the elfdeps tool to generate the provides and
    requires.
    gordonmessmer committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    9cb6fc8 View commit details
    Browse the repository at this point in the history