Bug 1581224
Summary: | rpm: Adjustments in ELF processing for file 5.33 output change | |||
---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Florian Weimer <fweimer> | |
Component: | rpm | Assignee: | Mark Wielaard <mjw> | |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 28 | CC: | ignatenko, kdudka, lslebodn, mjw, packaging-team-maint, pmatilai, pmoravco, vmukhame | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | rpm-4.14.1-9.fc28 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1581227 (view as bug list) | Environment: | ||
Last Closed: | 2018-05-27 19:31:33 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1570246, 1581227 |
Description
Florian Weimer
2018-05-22 11:44:23 UTC
I am not sure when brp-strip and brp-strip-shared are used, but for find-debuginfo.sh the fix is easy (although untested): diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh index a7c2db0..90a4494 100755 --- a/scripts/find-debuginfo.sh +++ b/scripts/find-debuginfo.sh @@ -235,6 +235,7 @@ strip_to_debug() $strip_g && case "$(file -bi "$2")" in application/x-sharedlib*) g=-g ;; application/x-executable*) g=-g ;; + application/x-pie-executable*) g=-g ;; esac eu-strip --remove-comment $r $g ${keep_remove_args} -f "$1" "$2" || exit chmod 444 "$1" || exit Note that instead of using find_debuginfo_args="-g" (or _find_debuginfo_opts), which runs [eu-]strip to only remove the .debug sections, but not other non-allocated sections, you could also use find_debuginfo_args="--keep-section .symtab" to explicitly keep the .symtab section (but still strip away everything else). (In reply to Mark Wielaard from comment #1) > I am not sure when brp-strip and brp-strip-shared are used, but for > find-debuginfo.sh the fix is easy (although untested): > > diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh > index a7c2db0..90a4494 100755 > --- a/scripts/find-debuginfo.sh > +++ b/scripts/find-debuginfo.sh > @@ -235,6 +235,7 @@ strip_to_debug() > $strip_g && case "$(file -bi "$2")" in > application/x-sharedlib*) g=-g ;; > application/x-executable*) g=-g ;; > + application/x-pie-executable*) g=-g ;; > esac > eu-strip --remove-comment $r $g ${keep_remove_args} -f "$1" "$2" || exit > chmod 444 "$1" || exit I patched this manually into a buildroot, and can confirm that this change restores the .symtab section for ld.so, so valgrind works again. Thanks! (In reply to Florian Weimer from comment #2) > I patched this manually into a buildroot, and can confirm that this change > restores the .symtab section for ld.so, so valgrind works again. Thanks! Thanks for testing. I posted the patch upstream: http://lists.rpm.org/pipermail/rpm-maint/2018-May/007976.html And added it to fedora rpm and did a build for rawhide (rpm-4.14.1-9.fc29) http://koji.fedoraproject.org/koji/buildinfo?buildID=1084068 If it works out, it should be trivial to add to f28. glibc-2.27.9000-19.fc29.x86_64 unbreaks valgrind. However, that version was built against file-5.33-4.fc29 as well, so it is not clear which change actually fixed matters. 8-) (In reply to Florian Weimer from comment #4) > glibc-2.27.9000-19.fc29.x86_64 unbreaks valgrind. However, that version was > built against file-5.33-4.fc29 as well, so it is not clear which change > actually fixed matters. 8-) Aha, I see file also added a countermeasure in file-5.33-4: - do not classify shared libraries as pie executables (#1581343) Good, then either this or that going into f28 would resolve things. We already have an update for file-5.33-4.fc28 at Bodhi: https://bodhi.fedoraproject.org/updates/FEDORA-2018-d1425c85a7 Despite its karma is +3, it has not yet reached updates-testing, and I see no button to move it forward. # rpm -q file file-5.33-4.fc28.x86_64 # file --mime /sbin/ldconfig /sbin/ldconfig: application/x-pie-executable; charset=binary # file --mime /bin/bash /bin/bash: application/x-pie-executable; charset=binary So the file update is definitely NOT sufficient to fix the find-debuginfo.sh issue. We need the patch from comment 1. I have submitted a new update to fix the MIME output, too: https://bodhi.fedoraproject.org/updates/file-5.33-5.fc28 Sorry for the troubles! rpm-4.14.1-9.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1894f7892a rpm-4.14.1-9.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-1894f7892a rpm-4.14.1-9.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report. |