summaryrefslogtreecommitdiff
path: root/buildtools
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* build: Set default minimum python version to 3.4.0Andrew Bartlett2019-03-211-1/+1
| | | | | | | | | This is the current minimum, but this may change before the 4.11 release. Python 2.x support is no longer available except to build using --disable-python. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* build: Do not make python mandatory to buildAndrew Bartlett2019-03-211-0/+4
| | | | | | | | Clearly we have python or else we would not be running, so this is about if we have a new enough version. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* build: Remove distinct .py3 ABI filesAndrew Bartlett2019-03-211-3/+3
| | | | | | | | The only difference between the two built libraries is pytalloc_CObject_FromTallocPtr() which is deprecated. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* build: Remove bld.gen_python_environments()Andrew Bartlett2019-03-211-10/+0
| | | | | | | This was part of --extra-python support. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* build: Remove --extra-pythonAndrew Bartlett2019-03-214-59/+2
| | | | | | | | | | | This option is quite invasive in waf and was mainly for the python3 transition. Testing with multiple python versions can be done by testing a full compile against multiple versions, likewise multiple different binding versions can be created the same way. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* wafbuild: create missing private library symlinks on platforms without ↵Björn Jacke2019-03-011-1/+1
| | | | | | | | | | | | soname support for shared libs BUG: https://bugzilla.samba.org/show_bug.cgi?id=9557 Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Björn Jacke <bjacke@samba.org> Autobuild-Date(master): Fri Mar 1 17:05:19 UTC 2019 on sn-devel-144
* wafsamba/symbols: change regex to match both rpath and runpath for different ↵Joe Guo2019-02-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | readelf output In `wafsamba.dumplicate_symbols` test, it will use Popen to call: readelf --dynamic bin/default/source3/lib/netapi/examples/netlogon/netlogon_control2 then try to find rpath lib lines from output with regex: re_rpath = re.compile(b'Library rpath: \[(.*)\]') In ubuntu 14.04 docker image, which current CI is using, the actual output from `readelf` is `runpath` instead of 'rpath': ... Library runpath: [/home/gitlab-runner/samba/bin/shared:/home/gitlab-runner/samba/bin/shared/private]\n' ... So the regex never matched, and hide a bug. In Ubuntu 1604 docker image, the output changes to `rpath` and matched the regex, which expose the error in previous commit. Improve the regex to match both `rpath` and `runpath`. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba/symbols: always split Popen output by bytesJoe Guo2019-02-181-1/+2
| | | | | | | | | | | | | | | | | | | In py3, `wafsamba.duplicate_symbols` test may fail: ... elfpipe = subprocess.Popen(['readelf', '--dynamic', binname], stdout=subprocess.PIPE).stdout ... File "./buildtools/wafsamba/symbols.py", line 153, in get_libs rpath.extend(m.group(1).split(":")) TypeError: a bytes-like object is required, not 'str' Because Popen will always return bytestr even in py3, and ":" is a unicode str in py3. Change ":" to b":" to fix. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* waf: fix setting of RPATH_ST variableBjörn Jacke2019-02-171-1/+3
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* wafsamba: we should also remove stale symlinks hereBjörn Jacke2019-02-171-1/+1
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* waf: print the library name in which we search for a functionBjörn Jacke2019-02-171-1/+4
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* waf: use the correct WERROR_CFLAGS in CHECK_CODEBjörn Jacke2019-02-171-7/+2
| | | | | | | all the non gcc version were incorrectly set here till now Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* waf: remove redundant WERROR flagBjörn Jacke2019-02-171-1/+1
| | | | | | | CHECK_CFLAGS always uses WERROR flags Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* waf: remove duplicate WERROR cflagsBjörn Jacke2019-02-171-1/+1
| | | | | | | WERROR flags are already added by the strict=True switch. Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* waf: fix compiler warnings in configure checksBjörn Jacke2019-02-171-4/+4
| | | | | | | | | the studio compiler issued here: warning: statement not reached Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* waf: fix WERROR_CFLAGS checkBjörn Jacke2019-02-171-2/+1
| | | | | | | | | | if we found the right WERROR flags of the compiler then the compiler is right to fail because we explicitly give it an empty file to compile. We should not do that because that makes the almost successful test fail. This fixed the studio compiler test. Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* waf: fix some missing newline compiler warningsBjörn Jacke2019-02-173-6/+7
| | | | | | | | | without a trailing newline the studio compiler issues: warning: newline not last character in file Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* wafsamba/samba_utils.py: override symlink to allow force linkJoe Guo2019-02-132-2/+16
| | | | | | | | | | | | | | | | | | if bin is not empty and I have been sharing the samba tree into a Vagrant environment and we run make, we get annoying linking error like this: File "~/samba/lib/tevent/wscript", line 130, in build installdir='python') File "./buildtools/wafsamba/wafsamba.py", line 745, in SAMBA_SCRIPT os.symlink(link_src, link_dst) FileExistsError: [Errno 17] File exists: '~/samba/lib/tevent/tevent.py' -> '~/samba/bin/default/../python/tevent.py' Makefile:7: recipe for target 'all' failed Override the symlink method to allow force linking. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build: Fixed usage of non-default path to WAFLOCKAliaksei Karaliou2019-02-111-1/+1
| | | | | | | | | | If WAFLOCK environment variable is set, use it to override path to WAF lock file in Samba build scripts. Signed-off-by: Aliaksei Karaliou <akaraliou@panasas.com> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* buildtools/wafsamba: Avoid decode when using python2Noel Power2019-02-117-10/+43
| | | | | | | | | | To avoid problematic type checking for 'str' types which fail when result from str.decode is used. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13777 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build:docs: Get rid of hardcoded 'bin/default'Aliaksei Karaliou2019-02-081-1/+1
| | | | | | | | | | Build scripts for documentation still contain hardcoded path to build destination rather than use proper final build path variables. Signed-off-by: Aliaksei Karaliou <akaraliou@panasas.com> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: David Mulder <dmulder@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* abi_gen.sh: ignore gdb customisations when comparing signaturesDouglas Bagnall2019-02-021-1/+1
| | | | | | | | | | | | If a .gdbinit file says "set print pretty on", the signatures are printed over several lines, and the abi_check fails. So let's ignore .gdbinit files. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Sat Feb 2 20:19:05 CET 2019 on sn-devel-144
* build: replace SAMBA3_ADD_OPTION with samba_add_onoff_optionDavid Disseldorp via samba-technical2019-02-011-3/+1
| | | | | | | | | The former is just an alias for the latter. samba_add_onoff_option() better describes what the function actually does, so use that and remove the alias. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Noel Power <npower@samba.org>
* wafsamba/replace: move __STDC_WANT_LIB_EXT1__ to CFLAGSStefan Metzmacher2019-01-291-0/+9
| | | | | | | | | | | | | | This fixes the build of python bindings, which use memset_s() (via ZERO_STRUCT). In python bindings Python.h needs to be the first header, which means is already includes string.h. Defining __STDC_WANT_LIB_EXT1__ in replace.h is too late in that case. This fixes the --check-c-compiler=gcc --picky-developer on FreeBSD 12. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* waf: let CHECK_SIZEOF check for 64 bit alsoBjoern Jacke2019-01-021-1/+1
| | | | | | | | | | | | wafsamba: utmp can be 64 bit also (like on AIX) BUG: https://bugzilla.samba.org/show_bug.cgi?id=12017 Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Jan 2 14:10:41 CET 2019 on sn-devel-144
* build: Remove --timestamp-dependencies (BROKEN)Andrew Bartlett2018-12-212-22/+0
| | | | | | | | Remove this code marked as broken, we do not need broken configure options making Samba appear to be more complex than it already is. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>