Bug 1948615

Summary: find-debuginfo.sh breaks due to symlink
Product: [Fedora] Fedora Reporter: Ulrich Drepper <drepper>
Component: debugeditAssignee: Mark Wielaard <mjw>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: igor.raits, mjw, packaging-team-maint, pmatilai, pmoravco, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-15 10:10:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ulrich Drepper 2021-04-12 15:38:56 UTC
Description of problem:
In my environment the rpm _topdir path contains a symbol.  I.e., 

  %_topdir /home/drepper/some/path/rpm

could actually be

  %_topdir /some/other/path/rpm

and it would reach the identical directory.  This in general works fine
except that the innards of the RPM scripts use the path name as specified in
the configuration while some of the tools (gcc specifically) uses the real
path.

This becomes a problem in find-debuginfo.sh.  The RPM_ROOT_DIR environment
variable is used (set with the help of %_topdir) and in the debugedit program
this path is used to locate files of interest.  But gcc in the DWARF information (specifically the comp_dir value of the compile_unit die) specifies the real path.

The result is that nothing matches and debugedit incorrectly reports no source files.

Note that I have this setup for a long time.  It might be that my self-built
packages always lack some debug source files.  But the current project is the
first to hit an hard error.  Maybe there were some unrelated source files
reported for other projects and the debugsourcefiles.list file wasn't empty.

Version-Release number of selected component (if applicable):
4.16.1.3-1.fc33

How reproducible:
always

Steps to Reproduce:
1.set %_topdir to a path which includes a symlink
2.compile a package which has a few source files (caveat: see comment)
3.

Actual results:
Error after debugsourcefiles.list is empty

Expected results:
Correct package build

Additional info:
How about just calling realpath on the %_topdir setting early on?  This would fix the problem.

Comment 1 Mark Wielaard 2021-04-24 19:05:37 UTC
Reported upstream to the new debugedit project: https://sourceware.org/bugzilla/show_bug.cgi?id=27776

Comment 2 Ben Cotton 2021-11-04 13:59:11 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

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 33 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 3 Ben Cotton 2021-11-04 14:28:29 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

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 33 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 4 Ben Cotton 2021-11-04 15:26:11 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

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 33 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.