Whamcloud - gitweb
LU-12511 build: avoid building rpm with --disable-modules 69/38369/3
authorJames Simmons <jsimmons@infradead.org>
Sun, 26 Apr 2020 15:12:14 +0000 (11:12 -0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 7 May 2020 05:43:02 +0000 (05:43 +0000)
If you configure lustre with --disable-modules this will prevent
OpenSFS lustre modules from being built but make rpms will fail
since it still expects built modules. Update the lustre.spec
file to not package any modules when --disable-modules is set.

Test-Parameters: trivial
Change-Id: Ide8d80f5b36f819b486a143e56daf494e6a1fe23
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/38369
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre.spec.in

index 246122a..c51024b 100644 (file)
@@ -444,6 +444,7 @@ make %{?_smp_mflags} -s %{?make_args}
 
 make install DESTDIR=$RPM_BUILD_ROOT
 
+%if %{with lustre_modules}
 # RHEL's kernel_module_path macro expects that all the modules
 # in a kmod package will be in modules_fs_path/<sub packagename>
 # but Lustre installs all of the modules in a single pass into
@@ -467,6 +468,7 @@ mv $basemodpath/fs/llog_test.ko $basemodpath-tests/fs/llog_test.ko
 mkdir -p $RPM_BUILD_ROOT%{_libdir}/lustre/tests/kernel/
 mv $basemodpath/fs/kinode.ko $RPM_BUILD_ROOT%{_libdir}/lustre/tests/kernel/
 %endif
+%endif
 
 :> lustre.files