Description of problem: Context: building rpm package, containing some binaries hardlinked to each other. If multiple input files (like binaries in usr/bin) are hardlinked and dwz do not consider compression beneficial, dwz will leave temporary files in /usr/lib/debug/. This, besides unnecessary files, breaks the build with "Installed (but unpackaged) file(s) found". Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. Get a set of hardlinked binaries, which dwz cannot compress anymore (easy to simulate by running dwz on them once) 2. Run `dwz -h ..list of files..` I've also created a simple test case in form of spec file that fails to build: https://gist.github.com/marmarek/c7eb9ca1f3171a5a935bcc4bc5293a37 Build with: mock --spec=dwz-test-pkg.spec --sources=. --buildsrpm && cp /var/lib/mock/fedora-*-x86_64/result/dwz-test-pkg-*.src.rpm ./ && mock --rebuild ./dwz-test-pkg-*.src.rpm Actual results: In addition to original files (still properly hardlinked), there are temporary files with `.#dwz#...` extension. Expected results: No leftovers. Additional info: Running strace shows this: openat(AT_FDCWD, "test-2", O_RDONLY) = 8 fstat(8, {st_mode=S_IFREG|0775, st_size=10584, ...}) = 0 getpid() = 5845 openat(AT_FDCWD, "test-2.#dwz#.G8v2HY", O_RDWR|O_CREAT|O_EXCL, 0600) = 9 close(9) = 0 unlink("test-2.#dwz#.G8v2HY") = 0 link("test-1", "test-2.#dwz#.G8v2HY") = 0 rename("test-2.#dwz#.G8v2HY", "test-2") = 0 close(8) = 0 The problem is with rename() call - while the intention here is to override "test-2" with "test-2.#dwz#.G8v2HY" - those are hardlinks pointing at the same inode. And rename(2) documentation says: If oldpath and newpath are existing hard links referring to the same file, then rename() does nothing, and returns a success status. One possibility would be to unlink() destination file first. The bug applies to fedora-28 too. And probably all other versions too.
(In reply to Marek Marczykowski from comment #0) > Build with: mock --spec=dwz-test-pkg.spec --sources=. --buildsrpm && cp > /var/lib/mock/fedora-*-x86_64/result/dwz-test-pkg-*.src.rpm ./ && mock > --rebuild ./dwz-test-pkg-*.src.rpm This is obviously overkill. Simpler: rpmbuild -bb dwz-test-pkg.spec
Filed here: https://sourceware.org/bugzilla/show_bug.cgi?id=24275
This message is a reminder that Fedora 29 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26. 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 '29'. 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 29 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.
I've just checked and this applies to Fedora 30 too. I haven't tested f31, but I'd assume the same problem, since both have version 0.12.
This message is a reminder that Fedora 30 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26. 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 '30'. 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 30 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.
Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 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.