build: Put the note from the bottom of the old BUILD_SYSTEMS.txt somewhere useful
authorAndrew Bartlett <abartlet@samba.org>
Wed, 3 Jun 2020 04:06:34 +0000 (16:06 +1200)
committerJeremy Allison <jra@samba.org>
Fri, 12 Jun 2020 22:11:43 +0000 (22:11 +0000)
This statement on how we handle --with options is best placed near where
the options are set, so developers see it when trying to choose the
correct thing to do.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
buildtools/wafsamba/samba_utils.py
source3/wscript
wscript

index f9eae73ae449833bc70a0a9836ec6e0bbe878857..4afee249d3346ed5c5579353c13de0bad6e28189 100644 (file)
@@ -719,6 +719,9 @@ def samba_before_apply_obj_vars(self):
         if is_standard_libpath(v, i):
             v['LIBPATH'].remove(i)
 
+# Samba options are mostly on by default (administrators and packagers
+# specify features to remove, not add), which is why default=True
+
 def samba_add_onoff_option(opt, option, help=(), dest=None, default=True,
                            with_name="with", without_name="without"):
     if default is None:
index 24ade3b0a2b6e9f123b5ab223130e77e8f21fa34..2a341df7c3e2d087ec0dc6aafa46bfc7d86758ce 100644 (file)
@@ -40,6 +40,27 @@ def options(opt):
                          "--with-shared-modules"),
                    action="store", dest='shared_modules', default=None)
 
+# Optional Libraries
+# ------------------
+#
+# Most of the calls to opt.samba_add_onoff_option() implicitly
+# or explicity use default=True
+#
+# To assist users and distributors to build Samba with the full feature
+# set, the build system will abort if our dependent libraries and their
+# header files are not found on the target system.  This will mean for
+# example, that xattr, acl and ldap headers must be installed for the
+# default build to complete.  The configure system will check for these
+# headers, and the error message will indicate the option (such as
+# --without-acl-support) that can be specified to skip this requirement.
+#
+# This will assist users and in particular distributors in building fully
+# functional packages, while allowing those on systems truly without these
+# facilities to continue to build Samba after careful consideration.
+#
+# It also ensures our container image generation in bootstrap/ is correct
+# as otherwise a missing package there would just silently work
+
     opt.samba_add_onoff_option('winbind')
     opt.samba_add_onoff_option('ads')
     opt.samba_add_onoff_option('ldap')
diff --git a/wscript b/wscript
index a195ac33c985b1678c74735db27f188a35912e7c..e50aba255a7e33f1f5df37f3eb2396e72af0216a 100644 (file)
--- a/wscript
+++ b/wscript
@@ -47,6 +47,25 @@ def options(opt):
     opt.RECURSE('lib/crypto')
     opt.RECURSE('ctdb')
 
+# Optional Libraries
+# ------------------
+#
+# Most of the calls to opt.add_option() use default=True for the --with case
+#
+# To assist users and distributors to build Samba with the full feature
+# set, the build system will abort if our dependent libraries and their
+# header files are not found on the target system.  This will mean for
+# example, that xattr, acl and ldap headers must be installed for the
+# default build to complete.  The configure system will check for these
+# headers, and the error message will indicate the option (such as
+# --without-acl-support) that can be specified to skip this requirement.
+#
+# This will assist users and in particular distributors in building fully
+# functional packages, while allowing those on systems truly without these
+# facilities to continue to build Samba after careful consideration.
+#
+# It also ensures our container image generation in bootstrap/ is correct
+# as otherwise a missing package there would just silently work
 
     opt.samba_add_onoff_option('pthreadpool', with_name="enable", without_name="disable", default=True)