Bug 1543829

Summary: lshw: Fedora build flags injection only partially successful
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: lshwAssignee: Terje Røsten <terje.rosten>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: terje.rosten, tuju
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lshw-B.02.18-16.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-17 00:15:35 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: 1539083    

Description Florian Weimer 2018-02-09 12:01:28 UTC
lshw-B.02.18-13.fc28 was not build with all the Fedora build flags.  LDFLAGS injection failed, and /usr/sbin/lshw and /usr/sbin/lshw-gui are not linked correctly.

More information about RPM macros to set CFLAGS and LDFLAGS is available here:
https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/buildflags.md

Comment 1 Terje Røsten 2018-02-11 12:04:41 UTC
Hi!

That web page was useful, however I miss one thing: how to verify binaries were built correctly? Reading large build logs don't scale.

For example this test build:
  https://koji.fedoraproject.org/koji/taskinfo?taskID=24942158

looks good from logs, how can I verify?

Comment 2 Fedora End Of Life 2018-02-20 15:24:30 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 3 Terje Røsten 2018-03-15 19:23:41 UTC
Hi Florian, how can I verify package is built correct?

Comment 4 Florian Weimer 2018-03-16 10:41:55 UTC
(In reply to Terje Røsten from comment #3)
> Hi Florian, how can I verify package is built correct?

You can check the build log.  It should show -Wl,-z,relro -Wl,-z,now on the linker command line.

Once you have the binaries, you can run “checksec --file” on them.  It should report “Full RELRO” and “PIE enabled”.

Comment 5 Terje Røsten 2018-03-16 12:55:35 UTC
Thanks!

Comment 6 Terje Røsten 2018-04-08 16:07:37 UTC
Fixed: https://koji.fedoraproject.org/koji/buildinfo?buildID=1065040

Comment 7 Florian Weimer 2018-04-09 09:52:20 UTC
Would you please fix this issue in Fedora 28 as well?  If you want, I can submit an update for you.

Comment 8 Terje Røsten 2018-04-09 19:56:56 UTC
Yeah, forgor we had branched.

Comment 9 Fedora Update System 2018-04-09 21:07:16 UTC
lshw-B.02.18-16.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-10b24dd7e5

Comment 10 Fedora Update System 2018-04-10 22:51:25 UTC
lshw-B.02.18-16.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-10b24dd7e5

Comment 11 Fedora Update System 2018-04-17 00:15:35 UTC
lshw-B.02.18-16.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.