Whamcloud - gitweb
b=21527 Use %configure in the RPM SPEC file
authorBrian J. Murrell <brian@sun.com>
Tue, 30 Mar 2010 18:40:34 +0000 (11:40 -0700)
committerRobert Read <rread@sun.com>
Tue, 30 Mar 2010 18:40:34 +0000 (11:40 -0700)
use the %configure macro defined by the RPM installation so that the
vendor's filesystem hierarchy preferences are observered

i=wangyb
i=yangsheng

Don't use vendors own CFLAGS for the lustre build
(this portion was never inspected but landed some time ago to b1_8
directly in response to build failures due to the overzealous CFLAGS)

lustre.spec.in

index 7c9f3e5..b4a2f7e 100644 (file)
@@ -106,10 +106,10 @@ rm -rf $RPM_BUILD_ROOT
 
 # Set an explicit path to our Linux tree, if we can.
 cd $RPM_BUILD_DIR/lustre-%{version}
 
 # Set an explicit path to our Linux tree, if we can.
 cd $RPM_BUILD_DIR/lustre-%{version}
-./configure @ac_configure_args@ %{?configure_flags:configure_flags} \
-       --sysconfdir=%{_sysconfdir} \
-       --mandir=%{_mandir} \
-       --libdir=%{_libdir}
+# override %optflags so that the vendor's overzealous flags don't create
+# build failures
+%define optflags -g -O2 -Werror
+%configure @ac_configure_args@ %{?configure_flags:configure_flags}
 make -j $RPM_BUILD_NCPUS -s
 
 %install
 make -j $RPM_BUILD_NCPUS -s
 
 %install