[PATCH] build: add option to choose to build with or without JSON audit support

Stefan Metzmacher metze at samba.org
Wed Apr 18 05:24:54 UTC 2018


Hi Douglas,

>> I've prepared an option to disable or enforce the build with support for
>> JSON auth audit, which needs the jansson library.
>>
>> By default the jansson library is auto-detected and is then used for the
>> JSON auth audit method.
> 
> This is largely reverting 8e54bc463adcfbc322249ba626e2c503ca13a864,
> the justification for which was (quoting Andrew Bartlett, 2018-02-11 in
> https://lists.samba.org/archive/samba-technical/2018-February/125542.html):
> 
>>> I worry that changes to our build system could mean we run less tests
>>> than we expect, either if the host changes or if the glue between the
>>> two parts breaks, and we might not notice.
>>>
>>> So instead I propose to make Samba fail to build if jansson is missing
>>> on the AD DC, and lock in the requirement for TLS support in the test
>>> scripts.
> 
> We have ended up before with tests that never get run because they
> depend on config options that nobody uses.
> 
> Is there some way of meeting those concerns in this patch? Would
> squashing this in be acceptable?:

Isn't this part of Björn's patch enough?

+        if conf.CONFIG_GET('ENABLE_SELFTEST') and \
+          (not Options.options.without_ad_dc):
+            raise Utils.WafError('jansson JSON library required for '
+                                 '--enable-selftest when building the
AD DC')

> diff --git a/script/autobuild.py b/script/autobuild.py
> index e00eebda1c1..0dd52ebbc67 100755
> --- a/script/autobuild.py
> +++ b/script/autobuild.py
> @@ -75,7 +75,8 @@ if os.environ.get("AUTOBUILD_SKIP_SAMBA_O3", "0") == "1":
>      defaulttasks.remove("samba-o3")
>  
>  ctdb_configure_params = " --enable-developer --picky-developer ${PREFIX}"
> -samba_configure_params = " --picky-developer ${PREFIX} ${EXTRA_PYTHON} --with-profiling-data"
> +samba_configure_params = (" --picky-developer ${PREFIX} ${EXTRA_PYTHON}"
> +                          " --with-profiling-data --with-json-audit")
>  
> 
> That lets you run make test without jansson but means autobuild
> requires it.

We don't want make test without jansson, we want to build some packages
without json-audit support, even if jansson is installed an the system.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180418/bf91cb0f/signature.sig>


More information about the samba-technical mailing list