packaging(RHEL-CTDB): add some checks to test the built smbd
authorMichael Adam <obnox@samba.org>
Mon, 7 Dec 2009 13:12:05 +0000 (14:12 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 8 Dec 2009 07:01:52 +0000 (08:01 +0100)
Test whether some required features have been built into smbd.
Can be extended...

Michael

packaging/RHEL-CTDB/samba.spec.tmpl

index 4967dfd200c2d2c72923ea1e08c151e866809889..8d12bdd52779e0102e8d968347f820faa4bb6442 100644 (file)
@@ -270,6 +270,16 @@ fi
 make -j %{numcpu} %{?_smp_mflags} \
        everything modules pam_smbpass
 
+# check that desired suppor has been compiled into smbd:
+export LD_LIBRARY_PATH=./bin
+for test in HAVE_POSIX_ACLS HAVE_LDAP HAVE_KRB5 HAVE_GPFS CLUSTER_SUPPORT
+do
+       if ! $(./bin/smbd -b | grep -q $test ) ; then
+               echo "ERROR: '$test' is not in smbd. Build stopped."
+               exit 1;
+       fi
+done
+
 # Remove some permission bits to avoid to many dependencies
 cd ..
 find examples docs -type f | xargs -r chmod -x