[PATCH] Do not compile lib/sysquotas*.c in configure

Andrew Bartlett abartlet at samba.org
Tue Jun 5 01:00:12 MDT 2012


Looking further at the configure tests for quotas, I've changed my mind.
They really should be cleaned up before we port them to waf.

I'm wondering what folks think about the attached patch.  In short, it
simply keeps the tests in tests/sysquotas.c without compiling
lib/sysquotas.c

If our users get compile failures with the lesser check, then they will
report them to us, or use --without-quotas.  Both of these are much
better options than silently disabling the functionality due to
unrelated errors in the quota implementation. 

To do this, I also had to add a test for the NFS quotas code.  This
fails on my system (it always did via the full test), but a success case
should be obtained (otherwise I can check via sles8 on the build farm). 

This is the diff of the config.h on my system before and after the
patch.  (I installed XFS headers to double-check that case).  It shows
that with these patches we actually gain Fedora 16 as a quota-supported
platform!

diff -u /tmp/config.h /tmp/new-config.h 
--- /tmp/config.h	2012-06-05 16:42:08.391064065 +1000
+++ /tmp/new-config.h	2012-06-05 16:48:02.699657071 +1000
@@ -1477,7 +1477,7 @@
 /* Do we have rl_completion_matches? */
 #define HAVE_NEW_LIBREADLINE 1
 
-/* Whether nfs quota support is available */
+/* NFS quota support is available */
 /* #undef HAVE_NFS_QUOTAS */
 
 /* Whether no ACLs support is available */
@@ -2152,7 +2152,7 @@
 /* #undef HAVE_SYS_PTRACE_H */
 
 /* Whether the new lib/sysquotas.c interface can be used */
-/* #undef HAVE_SYS_QUOTAS */
+#define HAVE_SYS_QUOTAS 1
 
 /* Define to 1 if you have the <sys/quota.h> header file. */
 #define HAVE_SYS_QUOTA_H 1
@@ -2928,7 +2928,7 @@
 /* #undef WITH_PTHREADPOOL */
 
 /* Whether to use disk quota support */
-/* #undef WITH_QUOTAS */
+#define WITH_QUOTAS 1
 
 /* Whether to include sendfile() support */
 #define WITH_SENDFILE 1

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-build-Do-not-compile-lib-sysquotas-.c-files-as-part-.patch
Type: text/x-patch
Size: 4996 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20120605/6c668295/attachment.bin>


More information about the samba-technical mailing list