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 <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I2705848e11a96ab6769ebba4481d2d0621f53d3e
Reviewed-on: http://review.whamcloud.com/5493
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Stephen Champion <schamp@sgi.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
# 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.
if LINUX
modulefs_DATA = obdclass$(KMODEXT)
-noinst_DATA = llog_test$(KMODEXT)
+if TESTS
+modulefs_DATA += llog_test$(KMODEXT)
+endif # TESTS
endif # LINUX
if DARWIN