Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1549657

Summary: qemu: Partial injection of Fedora build flags
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: amit, berrange, cfergeau, ddepaula, dwmw2, itamar, jen, pbonzini, rjones, virt-maint
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-2.11.1-2.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-27 14:22:45 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-27 15:23:16 UTC
/usr/libexec/ksmctl in ksm-2.11.0-4.fc28.1.x86_64 has not been linked with the standard Fedora linker flags (LDFLAGS) from redhat-rpm-config.  From the build log:

+ gcc /builddir/build/SOURCES/ksmctl.c -O2 -g -o ksmctl

gcc is invoked directly from the RPM spec file:

gcc %{_sourcedir}/ksmctl.c -O2 -g -o ksmctl

So fixing this is a matter of adding $RPM_OPT_FLAGS and $RPM_LD_FLAGS to the gcc invocation, or whatever mechanism you prefer.  See https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/buildflags.md for what's available in Fedora 27/28/rawhide.

Comment 1 Florian Weimer 2018-03-19 17:08:04 UTC
Would you please make sure that this gets into Fedora 28 as well?

Comment 2 Florian Weimer 2018-03-19 17:19:25 UTC
So the real problem is this bit in the spec file:

# Temp hack for https://bugzilla.redhat.com/show_bug.cgi?id=1343892
# We'll manually turn on hardened build later in this spec
%undefine _hardened_build

Hopefully that's not needed anymore.

Comment 3 Daniel Berrangé 2018-03-20 12:26:33 UTC
The %undefine _hardend_build hack has been removed in F28 & rawhide now.

Comment 4 Florian Weimer 2018-03-27 14:07:20 UTC
Daniel, would you please file an update in Bodhi so that the changes make it into Fedora 28?  Thanks.

Currently, updates-testing has ksm-2:2.11.1-1.fc28.x86_64, and /usr/libexec/ksmctl is still affected.

Comment 5 Daniel Berrangé 2018-03-27 14:12:03 UTC
Hmm, I submitted an update 6 days ago for updates-testing, and I see it pushed to repos https://bodhi.fedoraproject.org/updates/FEDORA-2018-74acab54cf

Comment 6 Florian Weimer 2018-03-27 14:22:45 UTC
(In reply to Daniel Berrange from comment #5)
> Hmm, I submitted an update 6 days ago for updates-testing, and I see it
> pushed to repos
> https://bodhi.fedoraproject.org/updates/FEDORA-2018-74acab54cf

Sorry, you are right.  After a GNOME crash due to bug 1557332, I ran an outdated query, against f28-build, and not the Fedora 28 + updates-testing composes.