Bug 708321 - debuginfo-install should support split debuginfo
debuginfo-install should support split debuginfo
Status: NEW
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
23
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
: Reopened
Depends On: 702089 706973 864601
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-27 05:48 EDT by Jan Kratochvil
Modified: 2016-04-20 08:50 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-17 08:46:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jan Kratochvil 2011-05-27 05:48:44 EDT
Description of problem:
Bug 706973 wants to introduce separate gcc-base-debuginfo.rpm (small, such as for libgcc.rpm) and gcc-debuginfo.rpm (requiring gcc-base-debuginfo.rpm).
But `debuginfo-install libgcc' will still install full gcc-debuginfo.rpm in such case.

Version-Release number of selected component (if applicable):
yum-utils-1.1.28-1.fc14.noarch

How reproducible:
Always

Steps to Reproduce:
debuginfo-install libgcc

Actual results:
gcc-debuginfo installed.

Expected results:
gcc-base-debuginfo installed.

Additional info:
I do not know how it should work, debuginfo-install uses .src.rpm now.

One extension is to be able to specify `debuginfo-install /lib64/libgcc_s.so.1' which could read build-id from it (eu-readelf -n) and `yum install id/d9/9f4f9d6824630d034d7fc660c888800896036f.debug' from it.

It could also support `debuginfo-install d99f4f9d6824630d034d7fc660c888800896036f' directly.

To make `debuginfo-install libgcc-4.5.1-4.fc14.x86_64' working I was thinking libgcc could have some new virtual `provides tag':
debuginforpm(gcc-base-debuginfo)
And when `debuginforpm(*)' gets found by debuginfo-install in that installed rpm it would no longer use the .src.rpm name.
But this is on the yum/rpm maintainers to decide.
Comment 1 James Antill 2011-05-27 11:05:18 EDT
Ok, so this probably needs a few things:

1. We can't just have a flag day, so at worst we need "the new thing" to be something like: 1) Do a lookup for XYZ based on ABCD. 2) If #1 fails, install <base_package_name>-debuginfo.

2. I looked at readelf.c, and getting the buildid seems to be a non-trivial amount of custom code. Having some kind of "simple" C API to call to get it would be a big help for everyone, I think. Wrapping this in python should then be fairly easy.
 At that point going from a command to a buildid should be doable for everyone.

...then we could "easily" add:

  Provides: debuginfo(e3335568a1f94c047008c13a11c9a5ceb79e2609)

...to the debuginfo packages at rpmbuild time. Now, the obvious thing to do is also add something like:

  Provides: buildid(e3335568a1f94c047008c13a11c9a5ceb79e2609)

...to the "normal" packages, and then debuginfo-install/etc. can look for that and do the lookup for the debuginfo package. But IIRC you said that'd be ~20k provides for Fedora, so we might want to look at other options (or just live with an instant 14% growth in provides -- in theory we can fix that problem in other ways).

 Does the above sound sane?

 I guess the rpmbuild part is probably the older BZ you have on "rpm should link buildid to packages" or whatever ... and as I said, it would probably help everyone a lot if the "readelf" part would be a real API (can you open a BZ about that?)
Comment 2 Jan Kratochvil 2011-05-27 11:41:15 EDT
(In reply to comment #1)
> 2. I looked at readelf.c, and getting the buildid seems to be a non-trivial
> amount of custom code. Having some kind of "simple" C API to call to get it
> would be a big help for everyone,
+
> if the "readelf" part would be a real API (can you open a BZ about that?)

I agree, popen of eu-readelf is ugly, it was just to get a picture.  Those several elfutils-libs calls should mjw know to provide a sample code.


> But IIRC you said that'd be ~20k provides for Fedora,

This was an illustration of a set of installed debuginfos on a developer machine, this is very subjective.  There is total 40K build-ids in F14.x86_64:
$ repoquery --disablerepo='*' --enablerepo=fedora-debuginfo --enablerepo=updates-debuginfo -qla|grep -P '^/usr/lib/debug/.build-id/../.{38}$'|sort -u|wc -l
38191


>  Does the above sound sane?
> I guess the rpmbuild part is probably the older BZ you have on "rpm should
> link buildid to packages" or whatever ... and as I said, it would probably
> help everyone a lot

Yes, thanks, but this answer is more for Bug 702089.

I still do not see how to easily map user entered
libgcc-4.5.1-4.fc14.x86_64 to gcc-base-debuginfo-4.5.1-4.fc14.x86_64
as currently I would see it as needing to:
  foreach buildid(XXX) in libgcc-4.5.1-4.fc14.x86_64
    install rpm providing debuginfo(XXX)
which should reduce to the single package dependency:
libgcc-4.5.1-4.fc14.x86_64 to gcc-base-debuginfo-4.5.1-4.fc14.x86_64
and no such direct "libgcc"->"gcc-base-debuginfo" link needs to be present there if you meant it that way.
Comment 3 Mark Wielaard 2011-05-27 15:49:05 EDT
> I agree, popen of eu-readelf is ugly, it was just to get a picture.  Those
> several elfutils-libs calls should mjw know to provide a sample code.

There is also eu-unstrip -n -e <elf_file> which will just give you the (possible) address range build-id@address and .debug file (if installed) of an exe/lib/core file: eu-unstrip -n -e /bin/bash 
0x400000+0x4e52fa d48acb06d58cd4b896cda9c03c583649c18fc8d1@0x400284 /bin/bash /usr/lib/debug/bin/bash.debug

If that is still too ugly, then I can write up some simple C code you can
wrap if you like.
Comment 4 Adam Stokes 2011-08-23 22:02:36 EDT
Hi,

Was curious what the status of this was? I'd like to add myself to the interested parties in having debuginfo-install support build-ids

re:
"It could also support `debuginfo-install
d99f4f9d6824630d034d7fc660c888800896036f' directly."

Thanks
Adam
Comment 5 Fedora End Of Life 2013-04-03 13:35:37 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
Comment 6 Fedora End Of Life 2015-01-09 11:40:48 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 7 Fedora End Of Life 2015-02-17 08:46:04 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 8 Mark Wielaard 2015-02-17 10:01:24 EST
(In reply to Mark Wielaard from comment #3)
> > I agree, popen of eu-readelf is ugly, it was just to get a picture.  Those
> > several elfutils-libs calls should mjw know to provide a sample code.
> 
> There is also eu-unstrip -n -e <elf_file> which will just give you the
> (possible) address range build-id@address and .debug file (if installed) of
> an exe/lib/core file: eu-unstrip -n -e /bin/bash 
> 0x400000+0x4e52fa d48acb06d58cd4b896cda9c03c583649c18fc8d1@0x400284
> /bin/bash /usr/lib/debug/bin/bash.debug
> 
> If that is still too ugly, then I can write up some simple C code you can
> wrap if you like.

BTW. Since elfutils-0.159 there is:

/* Returns the build ID as found in a NT_GNU_BUILD_ID note from either
   a SHT_NOTE section or from a PT_NOTE segment if the ELF file
   doesn't contain any section headers.  On success a pointer to the
   build ID is written to *BUILDID_P, and the positive length of the
   build ID is returned.  Returns 0 if the ELF lacks a NT_GNU_BUILD_ID
   note.  Returns -1 in case of malformed data or other errors.  */
extern ssize_t dwelf_elf_gnu_build_id (Elf *elf, const void **build_idp);
Comment 9 Jan Kurik 2015-07-15 11:15:45 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Note You need to log in before you can comment on or make changes to this bug.