summaryrefslogtreecommitdiff
path: root/buildtools
Commit message (Collapse)AuthorAgeFilesLines
* pytests: heed assertEquals deprecation warning en-masseDouglas Bagnall2020-02-073-25/+25
| | | | | | | | | | | TestCase.assertEquals() is an alias for TestCase.assertEqual() and has been deprecated since Python 2.7. When we run our tests with in python developer mode (`PYTHONDEVMODE=1 make test`) we get 580 DeprecationWarnings about this. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
* wafsamba: Do not use 'rU' as the 'U' is deprecated in Python 3.9Andreas Schneider2020-02-061-1/+1
| | | | | | | | | | | | | | | | | | See https://docs.python.org/3.9/whatsnew/3.9.html#changes-in-the-python-api "open(), io.open(), codecs.open() and fileinput.FileInput no longer accept 'U' (“universal newline”) in the file mode. This flag was deprecated since Python 3.3. In Python 3, the “universal newline” is used by default when a file is open in text mode. The newline parameter of open() controls how universal newlines works." BUG: https://bugzilla.samba.org/show_bug.cgi?id=14266 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Feb 6 07:30:13 UTC 2020 on sn-devel-184
* lib/fuzzing: Split up automatically build fuzzers into TYPE_{IN,OUT,STRUCT}Andrew Bartlett2019-12-111-1/+13
| | | | | | | | | | | | The advise is that a fuzz target should be as small as possible so we split this up. Splitting up by function would build too many fuzzers, but this should help a little. See for example: https://github.com/google/fuzzing/blob/master/docs/good-fuzz-target.md#large-apis Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@samba.org>
* build: Skip build of python bindings when in fuzzing modeAndrew Bartlett2019-12-101-0/+4
| | | | | | | This will just save a bit of time and space. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* lib/fuzzing: Add mode for the AFL fuzzerAndrew Bartlett2019-12-102-3/+10
| | | | | | | | This is helpful for ensuring the fuzzers still compile in autobuild as no library support is required. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* lib/fuzzing: Link only the required NDR_ subsystems into ndr_fuzz_X binariesAndrew Bartlett2019-12-101-1/+1
| | | | | | | | | This reduces the binary size and shows that we are linked against the correct ndr_table_ global variable. This might help the fuzzing engine know there is not much more of the binary to find if unreachable code is not included. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* lib/fuzzing: add fuzz_ndr_XDouglas Bagnall2019-12-102-3/+11
| | | | | | | | | | | | | | | | | | This NDR fuzzer links with each "interface" in the IDL files to create avsingle binary. This tries to matches what the fuzzing engines desire. It started as a copy of ndrdump but very little of that remains in place. The fancy build rules try to avoid needing a lof of boilerplate in the wscript_build files and ensure new fuzzers are generated and run when new IDL is added automatically. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build: Fix the build without system gssapi headersVolker Lendecke2019-12-101-0/+1
| | | | | | | | | | | | source4/heimdal/lib/gssapi/gssapi/gssapi_krb5.h and gssapi_spnego.h have an #include <gssapi.h> which they need to find via the -I paths Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Tue Dec 10 00:29:55 UTC 2019 on sn-devel-184
* pidl: optionally annotate output for debug purposesDouglas Bagnall2019-12-043-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can sometimes be hard to tell which bit of pidl generated which bit of C. This commit wants to help. If the PIDL_DEVELOPER environment variable is set (via waf --pidl-developer or some other means), pidl will annotate *most* C indicating which lines were generated by which bits of pidl. It looks something like this: _PUBLIC_ enum ndr_err_code ndr_push_auth_session_info(struct ndr_push *ndr, int ndr_flags, const struct auth_session_info *r) { //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseTypePushFunction lib/Parse/Pidl/Samba4/NDR/Parser.pm:3079 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags); //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseStructPush lib/Parse/Pidl/Samba4/NDR/Parser.pm:604 if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseStructPushPrimitives lib/Parse/Pidl/Samba4/NDR/Parser.pm:1448 NDR_CHECK(ndr_push_unique_ptr(ndr, r->security_token)); //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParsePtrPush lib/Parse/Pidl/Samba4/NDR/Parser.pm:604 NDR_CHECK(ndr_push_unique_ptr(ndr, r->unix_token)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->info)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->unix_info)); NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); /* [ignore] 'torture' */ //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseElementPushLevel lib/Parse/Pidl/Samba4/NDR/Parser.pm:729 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->session_key)); //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseDataPush lib/Parse/Pidl/Samba4/NDR/Parser.pm:604 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParsePtrPush lib/Parse/Pidl/Samba4/NDR/Parser.pm:604 /* [ignore] 'credentials' */ //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseElementPushLevel lib/Parse/Pidl/Samba4/NDR/Parser.pm:729 The comments starting with '//:PIDL:' have the function name, the filename, and line number. The comment follows the ordinary output, and uses the '//' style so as not to interfere with multiline /* */ comments if they happen to exist. A '//:PIDL:' comment is added whenever the pidl function or indentation level changes, and very occasionally at other places if pidl runs for a while without either of these things happening. This does not affect pidl parsers that do not inherit from Parse::Pidl::Base, and is careful to have no performance impact on non-debug generation. This may help with semi-automated flow analysis. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:heimdal_build: move krb5-types.h into include/krb5-types.hStefan Metzmacher2019-12-031-1/+1
| | | | | | | | | | | | | | | | | | | source4/heimdal_build/include/ contains public headers, which are needed by callers. source4/heimdal_build/*.h should only be used for building the in tree heimdal itself. Without this an '#include "replace.h"' can catch 'config.h' from source4/heimal_build/config.h before bin/default/include/config.h. This #defines HAVE_CLOSEFROM unconditionally before replace.h can define the replacement for rep_closefrom() on systems without libbsd. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Dec 3 23:36:17 UTC 2019 on sn-devel-184
* build: Do not build selftest binaries for builds without --enable-selftestAndrew Bartlett2019-11-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new for_selftest option to SAMBA_BINARY() and SAMBA3_BINARY() This allows us to be much more consistent (at least in the core Samba) and documents clearly why the binary should not be installed. Not modified are - test_lp_load - notifyd-tests - gendrandperf - test* from examples/libsmbclient - dbwrap_torture - split_tokens - locktest2 - msgtest - msg_sink - msg_source - versiontest - rpc_open_tcp - test_headers As these are not tested in selftest so any change would also be untested. Of course they probably should be added in a different MR. Also not modified (because they are not tests, nor part of the build system) are: - smb2mount - notifydd - log2pacp - debug2html - smbfilter - destroy_netlogon_creds_cli - spotlight2* - tevent_glib_tracker These do however appear to be untested. For now, the source4 forked client tools are left unchanged: - smbclient4 - nmblookup4 Finally, the heimdal binaries are left as install=False as they are either part of the build system or end-user tools that we just don't want to install. These are however tested. The motivation is commit like c34ec003b7d45aa4196ff93a0ac29694b25e5309 and da87fa998ab71328f30bcdf5b41aee8675aee48a, which are both totally correct but are not needed if the selftest is not run on MacOS. There are likely other platforms or build environments where building our test binaries is more pain than valuable, see for example also https://lists.samba.org/archive/samba/2019-November/227137.html Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Isaac Boukris <iboukris@samba.org> Autobuild-User(master): Isaac Boukris <iboukris@samba.org> Autobuild-Date(master): Fri Nov 22 11:48:59 UTC 2019 on sn-devel-184
* lib/fuzzing: Use --fuzz-target-ldflags if specifiedAndrew Bartlett2019-11-202-1/+11
| | | | | | | | | | This makes integration with oss-fuzz possible. Only the fuzzer binaries should be linked with libFuzzer, not things like asn1_compile, so this can not be done via the global ADDITIONAL_LDFLAGS. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Uri Simchoni <uri@samba.org>
* build: Set fuzzer=True on fuzzer binariesDouglas Bagnall2019-11-201-1/+12
| | | | | | | | | This ensures that the binaries are the only binaries built when configured for fuzzing. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* third_party: Update nss_wrapper to version 1.1.7Andreas Schneider2019-11-141-1/+1
| | | | | | | | | | This adds missing support for Address Sanitzer. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Nov 14 23:50:06 UTC 2019 on sn-devel-184
* build: Refuse to build if ADDITIONAL_LDFLAGS or ADDITIONAL_CFLAGS do not workAndrew Bartlett2019-11-131-6/+16
| | | | | | | | | | | This avoids these being silently ignored. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Mulder <dmulder@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Nov 13 10:29:00 UTC 2019 on sn-devel-184
* heimdal_build: Recurse to bld.SAMBA_BINARY()Andrew Bartlett2019-11-131-0/+4
| | | | | | | | | | | | This reduces a little of the duplication added when it was thought that having a distinct waf wrapper on heimdal might allow this to be ported upstream. It will also streamline building a dedicated fuzzing mode in Samba. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Mulder <dmulder@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* build: Remove workaround for missing os.path.relpath in Python < 2.6Andrew Bartlett2019-11-1310-41/+22
| | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Mulder <dmulder@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* buildtools/wafsamba/wscript: typo fixesBjörn Jacke2019-10-311-1/+1
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* buildtools/wafsamba/samba_install.py: typo fixesBjörn Jacke2019-10-311-3/+3
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* waf: Symlink the compile database to the source dir for clangdAndreas Schneider2019-10-241-0/+6
| | | | | | | | | | | https://github.com/ycm-core/YouCompleteMe https://github.com/abingham/emacs-ycmd Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Oct 24 08:11:19 UTC 2019 on sn-devel-184
* waf: Create clang compilation databaseAndreas Schneider2019-10-241-0/+2
| | | | | | | | | http://clang.llvm.org/docs/JSONCompilationDatabase.html This can be used by ymcd or clangd. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* wafsamba: pass environment to cross-execute testsUri Simchoni2019-10-201-1/+2
| | | | | | | | | | | | | This can come in handy for cross-execute scripts in general, and is particularly required by the samba-xc test for cross-answers / cross-execute, because Samba sets LD_LIBRARY_PATH during rpath checks, and the test program needs that in order to successfully run. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846 Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: avoid pre-forking if cross-compilation is enabledUri Simchoni2019-10-201-0/+2
| | | | | | | | | | | | | | | | | | Waf supports pre-forking to run configuration tests, but this doesn't play well with Samba's cross-compilation support, because Samba monkey-patches the actual fork+exec, which doesn't happen in a pre-forked process pool. This patch emulates the impact of WAF_NO_PREFORK env var when cross-compilation is enabled. The blueprint for the solution has been suggested by Thomas Nagy in https://bugzilla.samba.org/show_bug.cgi?id=13846#c7 (item #2) BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846 Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: use test_args instead of exec_args to support cross-compilationUri Simchoni2019-10-202-4/+4
| | | | | | | | | | | | | exec_args seems to have been a custom addition to Samba's copy of waf. Upstream Waf has an identically-purposed parameter called test_args. This parameter is being used for addiing runtime args to test programs that are being run during configuration phases. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846 Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* waf: upgrade to 2.0.18Uri Simchoni2019-10-202-2/+2
| | | | | | | | | | This is required to get the new test_args parameter to conf.check, which facilitates passing arguments to configuration test programs. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846 Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build: add SAMBA_DATADIR as "samba" subdirectory of DATADIRRalph Boehme2019-10-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | DATADIR should have been set to this path from the beginning, too late to change that now as ut's used as parent for two other directory varialbles: SETUPDIR and CODEPAGEDIR. From <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>: datadir The directory for installing idiosyncratic read-only architecture-independent data files for this program. This is usually the same place as ‘datarootdir’, but we use the two separate variables so that you can move these program-specific files without altering the location for Info files, man pages, etc. This should normally be /usr/local/share, but write it as $(datarootdir). (If you are using Autoconf, write it as ‘@datadir@’.) The definition of ‘datadir’ is the same for all packages, so you should install your data in a subdirectory thereof. Most packages install their data under $(datadir)/package-name/. Currently Samba doesn't install any application specific data files, but I'm going to do just that in a subsequent commit. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* samba_version.py: avoid inefficient string concatenationsBjörn Jacke2019-09-211-4/+4
| | | | | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Sep 21 20:50:17 UTC 2019 on sn-devel-184
* samba_deps.py avoid inefficient string concatenationsBjörn Jacke2019-09-211-4/+2
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba_bundled.py avoid inefficient string concatenationsBjörn Jacke2019-09-211-2/+2
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba_autoconf.py: avoid inefficient string concatenationsBjörn Jacke2019-09-211-3/+2
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba_abi.py: avoid inefficient string concatenationsBjörn Jacke2019-09-211-3/+1
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build: Raise minimum python version to 3.5.0 for Samba 4.12Andrew Bartlett2019-09-021-1/+1
| | | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Sep 2 01:14:05 UTC 2019 on sn-devel-184
* third_party: Remove zlib from third_partyAndrew Bartlett2019-08-171-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | We require zlib 1.2.3. We stopped requring a patched zlib with 5631a1b9bc03d6cf31af66b13872255f18979fe8 As discussed on samba-technical here: https://lists.samba.org/archive/samba-technical/2019-May/133476.html In short, zlib contains some (old, now broken) crypto code that while not compiled in Samba is best left out of our tarball to ease crypto audits. It is also very very out of date and is a slightly modified copy of something otherwise very likely available on our supported host OSs. It would be strange to say that GnuTLS and dependencies are an acceptable burden to install but say zlib is a step to far. So it is removed from Samba's third_party with this commit. The diff between zlib in Samba and official zlib 1.2.3 is included in third_party/zlib/last-samba-from-1.2.3.diff Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* Add fuzzing support to build systemMichael Hanselmann2019-08-072-0/+12
| | | | | | | | | | | | | LibFuzzer, Honggfuzz and other programs implement simple interfaces for fuzzing appropriately prepared code. Samba contains quite a lot of parsing code, often a good target for fuzzing. With this change the build system is amended to support building fuzzing binaries (added in later changes). Signed-off-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* wafsamba: change --picky-developer into --disable-warnings-as-errorsStefan Metzmacher2019-08-062-10/+6
| | | | | | | | | | | By default we're using -Werror now if --enable-developer is specified. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Noel Power <npower@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Aug 6 07:50:14 UTC 2019 on sn-devel-184
* third_party: Update uid_wrapper to version 1.2.7Andreas Schneider2019-07-161-1/+1
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Jul 16 17:20:31 UTC 2019 on sn-devel-184
* wafsamba: Use native waf timerLukas Slebodnik2019-06-181-13/+12
| | | | | | | | | | | | __main__:1: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead BUG: https://bugzilla.samba.org/show_bug.cgi?id=13998 Signed-off-by: Lukas Slebodnik <lslebodn@fedoraproject.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* third_party: Update waf to version 2.0.17Andreas Schneider2019-06-052-2/+2
| | | | | | | | | | | | | | | | | | | | | This fixes building Samba, libtalloc, libtevent, libtdb and libldb with Python 3.8. wget https://waf.io/waf-2.0.17.tar.bz2 tar -xf waf-2.0.17.tar.bz2 git rm third_party/waf/waflib/ -r mkdir third_party/waf -p rsync -a waf-2.0.17/waflib/ third_party/waf/waflib/ git add third_party/waf/waflib/ (Then update version number in buildtools/bin/waf and buildtools/wafsamba/wafsamba.py) BUG: https://bugzilla.samba.org/show_bug.cgi?id=13960 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* third_party: Update nss_wrapper to version 1.1.6Andreas Schneider2019-05-231-1/+1
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu May 23 11:10:28 UTC 2019 on sn-devel-184
* samba_autoconf: fix undefined behaviour sanitizer compile flagsGary Lockyer2019-05-161-1/+4
| | | | | | | | Added the -g option, -fsaniize=null and -fsanitize=alignment, removed the -fno-omit-frame-pointer option. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest: enable undefined behaviour sanitizerGary Lockyer2019-05-142-1/+13
| | | | | | | | | | | | | Add a --undefined-sanitizer option to configure, this causes the tests to be run with the undefined behaviout sanitizer enabled. Errors can be suppressed by adding entries to selftest/ubsan.supp Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue May 14 07:20:28 UTC 2019 on sn-devel-184
* wscript: mv --enable-coverage option to globalJoe Guo2019-05-101-0/+11
| | | | | | | We want to enable gcov for all tasks, move it to global wscript. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: Enable warnings about zero-length formatsAndreas Schneider2019-05-071-0/+1
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue May 7 18:45:06 UTC 2019 on sn-devel-184
* wafsamba: Enable warnings about format overflowsAndreas Schneider2019-05-071-0/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* wafsamba: Add compiler check for missing field initializer checkChristof Schmitt2019-04-301-1/+7
| | | | | | | | | | | | | | The commit cf79ee15 wafsamba: Enable warnings for missing field initializer enabled a compiler check for warnings about missing initializers for all developer builds. This fails with older compilers, e.g. gcc on RHEL7. Add a waf check around adding the compiler option to avoid the failure with older compilers. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* waf: only set mandatory to False if not already set by the callerRalph Boehme2019-04-291-1/+3
| | | | | | | | | | | | | | | | | | | There are a bunch of callers that call find_program with mandatory=True, we should not overwrite this when explicity passed, eg: ctx.find_program('objcopy', var='OBJCOPY', mandatory=True) conf.SAMBA_CHECK_PERL(mandatory=True) -> conf.find_program('perl', var='PERL', mandatory=mandatory) With this patch we only change the default from False to True, but allow callers to choose specific behaviour. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Apr 29 17:07:02 UTC 2019 on sn-devel-184
* wafsamba: Enable warnings for missing field initializerAndreas Schneider2019-04-291-0/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* waf: Simplify condition for undefined symbol detectionMichael Hanselmann2019-04-021-5/+4
| | | | | | | | | | | There's no need to check for OpenBSD twice. Signed-off-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <npower@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Tue Apr 2 17:28:40 UTC 2019 on sn-devel-144
* third_party: Update socket_wrapper to version 1.2.3Andreas Schneider2019-03-221-1/+1
| | | | | | | | | | | * Added environment variable to disable deep binding * Fixed installation of socket_wrapper * Fixed several small bugs * Fixed missing NULL check for socket_wrapper_dir() * Fixes building in Samba source tree Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* build: Standardise on calling conf.SAMBA_CHECK_PYTHON() in librariesAndrew Bartlett2019-03-211-15/+8
| | | | | | | | | | | | | We do this by removing the confusing mandatory option to conf.SAMBA_CHECK_PYTHON{,_HEADERS}(), instead just use the value of --disable-python internally This follows the default minimum of Python 3.4 and keeps things consistent with the main Samba build where --disable-python is required to skip building python bindings. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>