Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-28767

redhat-rpm-config: Auto-generated dependencies from rpmbuild are inconsistent for links to libraries

    • sst_cs_software_management
    • ssg_core_services
    • 20
    • None
    • No
    • CentOS Stream
    • Hide

      AC: No requirements are listed while running /usr/lib/rpm/rpmdeps --requires for 2 libraries generated by gcc:

      • gcc -shared -Wl,-soname,libechosounder2.so -o libechosounder2.so; ln -s libechosounder2.so libechosounder.so
      • gcc -shared -Wl,-soname,libdepth2.so -o libdepth2.so ; ln -s libdepth2.so libdepth.so

      Test: available

      Show
      AC: No requirements are listed while running /usr/lib/rpm/rpmdeps --requires for 2 libraries generated by gcc: gcc -shared -Wl,-soname,libechosounder2.so -o libechosounder2.so; ln -s libechosounder2.so libechosounder.so gcc -shared -Wl,-soname,libdepth2.so -o libdepth2.so ; ln -s libdepth2.so libdepth.so Test: available
    • None
    • Release Note Not Required
    • None

      What were you trying to do that didn't work?

      Auto-generated dependencies from rpmbuild are inconsistent for links to libraries. When there is a link to a library with a name that ends in .so (and doesn't have a version number suffix or similar), then most of the time, nothing is added to Requires, but in some cases, the "target" library is listed after all. More specifically, this generally happens when the actual library name contains the text "so".

      I seems to me that the intention is never to generate dependencies for these links, but the match logic for "magic" data gets confused due to an issue with a pattern in /usr/lib/rpm/fileattrs/libsymlink.attr. I suspect that the data is expanded twice, so that to escape special characters, you need \\ and not just \ - or in this case, a "literal dot" should be written as \\., because \. is actually interpreted as regexp symbol for "any character".

      Please provide the package NVR for which bug is seen: redhat-rpm-config-207-1.el9 (as well as various older releases.)

      How reproducible: Every time

      Steps to reproduce

      1. gcc -shared -Wl,-soname,libechosounder2.so -o libechosounder2.so; ln -s libechosounder2.so libechosounder.so
      2. gcc -shared -Wl,-soname,libdepth2.so -o libdepth2.so ; ln -s libdepth2.so libdepth.so
      3. Use /usr/lib/rpm/rpmdeps to list requirements for libechosounder.so and libdepth.so

      Expected results

      No requirements are listed

      Actual results

      $ /usr/lib/rpm/rpmdeps --requires --rpmfcdebug libechosounder.so libdepth.so
        0 libdepth.so     [none]
        1 libechosounder.so     [libsymlink]
          R libechosounder2.so()(64bit)
      libechosounder2.so()(64bit)

            mdomonko@redhat.com Michal Domonkos
            toralf.lund Toralf Lund
            packaging-team-maint packaging-team-maint
            Software Management QE Software Management QE
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: