From 7a7b4061729bbe70b53100db2feca28f40d7199b Mon Sep 17 00:00:00 2001 From: James Simmons Date: Wed, 18 Sep 2013 09:49:21 -0400 Subject: [PATCH] LU-1199 obdclass: build and install llog_test.ko properly There's a hack in lustre.spec.in to copy the llog_test.ko module into /lib/modules. It's only needed because that module is built unconditionally and is expected to only be installed if --enable-tests is configured. The right way to do this is to only build it at all if --enable-tests is configured and installation comes automatically, The conditional in the spec file for --enable-tests already exists, so it will be packaged correctly without the hack. Signed-off-by: Jeff Mahoney Signed-off-by: James Simmons Change-Id: I2705848e11a96ab6769ebba4481d2d0621f53d3e Reviewed-on: http://review.whamcloud.com/5493 Tested-by: Hudson Reviewed-by: Bob Glossman Tested-by: Maloo Reviewed-by: Dmitry Eremin Reviewed-by: Christopher J. Morrone Reviewed-by: Stephen Champion Reviewed-by: Oleg Drokin --- lustre.spec.in | 8 -------- lustre/obdclass/autoMakefile.am | 4 +++- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/lustre.spec.in b/lustre.spec.in index f6c3e9a..770cced 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -300,14 +300,6 @@ make install DESTDIR=$RPM_BUILD_ROOT # hack to avoid changing the libsysio code for "make install" rm -f $RPM_BUILD_ROOT%{_libdir}/libsysio.a -# hack to include the llog_test module in lustre-tests -llog_base=$RPM_BUILD_DIR/lustre-%{version}/lustre/obdclass/llog_test -if [ -e ${llog_base}.ko ]; then - cp ${llog_base}.ko $RPM_BUILD_ROOT%{?rootdir}/lib/modules/%{kversion}/updates/kernel/fs/lustre -elif [ -e ${llog_base}.o ]; then - cp ${llog_base}.o $RPM_BUILD_ROOT%{?rootdir}/lib/modules/%{kversion}/updates/kernel/fs/lustre -fi - # The .ha_v2 extension identifies the heartbeat resource agent as using # legacy syntax. Install a compatibility symlink to avoid conflicts when # newer-style agents are added. diff --git a/lustre/obdclass/autoMakefile.am b/lustre/obdclass/autoMakefile.am index d131c59..9eada75 100644 --- a/lustre/obdclass/autoMakefile.am +++ b/lustre/obdclass/autoMakefile.am @@ -23,7 +23,9 @@ if MODULES if LINUX modulefs_DATA = obdclass$(KMODEXT) -noinst_DATA = llog_test$(KMODEXT) +if TESTS +modulefs_DATA += llog_test$(KMODEXT) +endif # TESTS endif # LINUX if DARWIN -- 1.8.3.1