Red Hat Bugzilla – Bug 798541
device-mapper-multipath: standard rpm cflags not used during build [rhel-6]
Last modified: 2012-06-20 10:37:51 EDT
Description of problem:
spec file for device-mapper-multipath does not use rpm macro %configure and invokes make without explicitly adding default rpm cflags. As a consequence, build is not made with optimization level and protections expected to be the default for all packages.
Version-Release number of selected component (if applicable):
How do I explicitly add the default rpm cflags? the device-mapper-multipath package doesn't use autoconf or automake so there's not much point in using
Is it possible to run the %configure macro without actually needing it to do
any of the autotools work?
It looks like all I need to do is pass "$RPM_OPT_FLAGS" to make from the spec file.
and then make sure that the Makefiles include those with the other CFLAGS. Or is there something else that needs to be done?
(In reply to comment #4)
> make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
Right, passing in RPM_OPT_FLAGS and adding them to CFLAGS in Makefile.inc should to the trick.
device-mapper-multipath.spec now passes in RPM_OPT_FLAGS, and the Makefiles use it. It did flush out a couple of issues, and I've cleaned up the code so that it doesn't issue warnings about some more things.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
No Documentation needed
No issue found in errata TPS test (include compile test).
No regression found in device-mapper-multipath-0.4.9-56.el6.x86_64.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.