From: Nathaniel Clark Date: Mon, 11 Mar 2019 18:10:30 +0000 (-0400) Subject: LU-9812 spec: Fail rpmbuild if with servers but unconfigured X-Git-Tag: 2.13.55~107 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=a619dc940784cc610f4148e51feed5d52c499413 LU-9812 spec: Fail rpmbuild if with servers but unconfigured Fail rpm build if "--with servers" used, but servers are not being built after ./configure. This would happen if --without ldiskfs but zfs isn't found and thus configure turns off server support. Test-Parameters: trivial Change-Id: I57b07c7b7c5ad5bd73165238969ad3b9d2f3a5ab Signed-off-by: Nathaniel Clark Reviewed-on: https://review.whamcloud.com/28282 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Olaf Faaland-LLNL Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre.spec.in b/lustre.spec.in index 24f18f0..345f726 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -458,6 +458,13 @@ fi --with-linux-obj=%{kobjdir} \ --with-kmp-moddir=%{kmoddir}/%{name} +%if %{with servers} +if ! grep -q define[[:space:]]*HAVE_SERVER_SUPPORT config.h 2> /dev/null; then + echo "Error: Server Support configured but not found" + false +fi +%endif + make %{?_smp_mflags} -s %{?make_args} %install