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 - qemu: Partial injection of Fedora build flags
Summary: qemu: Partial injection of Fedora build flags
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Virtualization Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: Fedora28BuildFlags
TreeView+ depends on / blocked
 
Reported: 2018-02-27 15:23 UTC by Florian Weimer
Modified: 2018-03-27 14:22 UTC (History)
10 users (show)

Fixed In Version: qemu-2.11.1-2.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-27 14:22:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1558516 0 unspecified CLOSED ksmctl is built without any hardening flags set [rhel-7.6] 2022-05-16 11:32:56 UTC
Red Hat Bugzilla 1558520 1 None None None 2022-05-16 11:32:56 UTC

Internal Links: 1558516 1558520

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.


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