Bug 1475086 - find-debuginfo.sh barfed and left a stray file that broke the package build
find-debuginfo.sh barfed and left a stray file that broke the package build
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
x86_64 Linux
unspecified Severity urgent
: ---
: ---
Assigned To: Igor Gnatenko
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-07-25 21:45 EDT by Adam Williamson
Modified: 2017-07-26 02:12 EDT (History)
5 users (show)

See Also:
Fixed In Version: rpm-
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-07-26 02:12:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Adam Williamson 2017-07-25 21:45:45 EDT
Trying to build openqa for Rawhide, I hit some kind of bug in the new debuginfo stuff in -37:


Note these messages:

+ /usr/lib/rpm/find-debuginfo.sh -j6 --strict-build-id -m --build-id-seed 4.4-51.20170409gitfead7af.fc27 --unique-debug-suffix -4.4-51.20170409gitfead7af.fc27.noarch --unique-debug-src-base openqa-4.4-51.20170409gitfead7af.fc27.noarch --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/openQA-fead7af87dcb066b88107eef4b0192a76f5814fa
find: 'debug': No such file or directory


error: Installed (but unpackaged) file(s) found:

I suspect the bug may lie in this section in /usr/lib/rpm/find-debuginfo.sh:

if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o -d "${RPM_BUILD_ROOT}/usr/src" ]; then
  ((nout > 0)) ||
  test ! -d "${RPM_BUILD_ROOT}/usr/lib" ||
  (cd "${RPM_BUILD_ROOT}/usr/lib"; find debug -type d) |
  sed 's,^,%dir /usr/lib/,' >> "$LISTFILE"

As I read it, that makes an unsafe assumption that so long as ${RPM_BUILD_ROOT}/usr/lib exists, ${RPM_BUILD_ROOT}/usr/lib/debug will exist (because there is no further check for the existence of ${RPM_BUILD_ROOT}/usr/lib/debug before that "find debug -type d" call).
Comment 1 Igor Gnatenko 2017-07-26 01:31:08 EDT
> find: 'debug': No such file or directory
This was like that for years, so it is fine ;)

> error: Installed (but unpackaged) file(s) found:
>    /debugsourcefiles.list
This is not. I think @mjw sent fix for this particular problem, so I am bacporting this patch.
Comment 2 Igor Gnatenko 2017-07-26 02:12:09 EDT
Yeah, that patch fixes issue with OpenQA.

I will rebuild it once rpm- appears in buildroot.

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