Bug 1948615 - find-debuginfo.sh breaks due to symlink
Summary: find-debuginfo.sh breaks due to symlink
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: debugedit
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mark Wielaard
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-12 15:38 UTC by Ulrich Drepper
Modified: 2021-11-15 10:10 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-15 10:10:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Sourceware 27776 0 P2 NEW symlinks in directory build path might break debugedit base/dest replacement 2021-04-24 19:05:37 UTC

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.


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