Whamcloud - gitweb
LU-9812 spec: Fail rpmbuild if with servers but unconfigured 82/28282/9
authorNathaniel Clark <nclark@whamcloud.com>
Mon, 11 Mar 2019 18:10:30 +0000 (14:10 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 23 Jun 2020 08:11:37 +0000 (08:11 +0000)
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 <nclark@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/28282
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

index 24f18f0..345f726 100644 (file)
@@ -458,6 +458,13 @@ fi
        --with-linux-obj=%{kobjdir} \
+%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
 make %{?_smp_mflags} -s %{?make_args}