summaryrefslogtreecommitdiff
path: root/buildtools
Commit message (Collapse)AuthorAgeFilesLines
* wafsamba: detect programmer errors in CHECK_BUNDLED_SYSTEM()Stefan Metzmacher2015-11-041-25/+25
| | | | | | | | | | | | | | | | All prerequisite libraries of CHECK_BUNDLED_SYSTEM[_PKG](onlyif='lib1 lib2') need to be checked before. That means conf.env['FOUND_SYSTEMLIB_lib1'] and conf.env['FOUND_SYSTEMLIB_lib2'] need to exist independed of its value (True or False). Otherwise this is a logic error. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11458 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Nov 4 18:38:18 CET 2015 on sn-devel-104
* build:wafsamba: Remove the now unneeded special treatment of rpath flagsThomas Nagy2015-11-021-55/+1
| | | | | | | | | | | | The flags parsing fixes were backported to waf 1.5 from waf 1.8. There is no reason to keep the flags parsing fixes in Samba. Signed-off-by: Thomas Nagy <tnagy@waf.io> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Nov 2 03:35:31 CET 2015 on sn-devel-104
* buildtools: Ignore exact Python version for ABI checkingPetr Viktorin2015-11-012-2/+13
| | | | | | | | | | | | | | | | Utilities for Python libraries are built for a specific Python version. Starting with Python 3, the Python version is recorded in the shared library filename as an ABI tag, e.g. "pytalloc.cpython-34m.so. The exact version doesn't matter for Samba's ABI check. Replace the ABI tag with a simpler one that just records the major version of Python. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sun Nov 1 01:09:06 CET 2015 on sn-devel-104
* build:wafsamba: Removed hard-coded class names from build scriptsThomas Nagy2015-10-281-4/+3
| | | | | | | | | | | Using hard-coded class names prevents subclassing and make it hard to reason about the workflow. The wscript files read during the build must be read during the installation phase as well. Signed-off-by: Thomas Nagy <tnagy@waf.io> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* build:wafsamba: removed most import * statementsThomas Nagy2015-10-2822-58/+64
| | | | | | | | | | | | | The 'import *' statements make it more difficult to reason about the modules and tends to conceal bugs. These changes enable running pyflakes against most of the build scripts. Signed-off-by: Thomas Nagy <tnagy@waf.io> Reviewed-by: Andrew Bartlet <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Oct 28 12:52:17 CET 2015 on sn-devel-104
* build: --picky-developer implies --enable-developerMartin Schwenke2015-10-271-1/+5
| | | | | | | | | | | | Have --picky-developer enable --enable-developer too, instead of requiring both options to be specified. This makes it obey the principle of least surprise. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Tue Oct 27 07:19:33 CET 2015 on sn-devel-104
* build:wafsamba: dead code removal in gettext detectionThomas Nagy2015-10-271-3/+0
| | | | | | | | | | | | Since the --gettext-location command-line option has no effect, the misleading code is removed. The samba functions ADD_CFLAGS must also be used in the future Signed-off-by: Thomas Nagy <tnagy@waf.io> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Oct 27 03:34:28 CET 2015 on sn-devel-104
* build:wafsamba: Enable feature-compatible declaration for Waf 1.8Thomas Nagy2015-10-137-15/+15
| | | | | | | | | In Waf 1.8 the declaration is features='c', not features='cc'. These changes prepare the replacement of Waf 1.5 by Waf 1.8 for Samba. Signed-off-by: Thomas Nagy <tnagy@waf.io> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build: Move __attribute__ ((destructor)) and ((constructor)) tests to wafsambaAndrew Bartlett2015-10-091-0/+34
| | | | | | | | This allows us to use them in talloc as well. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
* build: improve stack protector checkGustavo Zacarias2015-09-211-3/+17
| | | | | | | | | | | | | | | | | | | | | Testing a toolchain for proper -fstack-protector must go beyond ensuring the compiler and linker accept the option. If the test C program does nothing with the stack then guards aren't inserted and/or are optimized away giving the false impression that it works when in fact the libc might not support it. Update the check to a program that uses the stack, hence making a link fail if proper support isn't available, for example in non-ssp enabled uclibc toolchains like this: test.c:(.text.startup+0x64): undefined reference to `__stack_chk_fail' Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <rb@sernet.de> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Sep 21 23:29:13 CEST 2015 on sn-devel-104
* build:wafsamba: Use the Waf 1.8 API get_tgen_by_name instead of name_to_objThomas Nagy2015-09-025-40/+40
| | | | | | | | | Signed-off-by: Thomas Nagy <tnagy@waf.io> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Sep 2 03:49:51 CEST 2015 on sn-devel-104
* build:wafsamba: Close file handles in the build scripts tooThomas Nagy2015-09-027-49/+14
| | | | | | Signed-off-by: Thomas Nagy <tnagy@waf.io> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: don't add -DSTATIC_%s_MODULES* arguments for ↵Stefan Metzmacher2015-08-061-0/+3
| | | | | | | | | | | | | | | SAMBA_LIBRARY(pyembed=True) Python helper libraries don't have any modules and having something like '.cpython-34m' in the name, e.g. STATIC_pytalloc-util.cpython-34m_MODULES breaks the build. Another way to fix this would be removing PYTHON_SO_ABI_FLAG from the name. This allows --extra-python=/usr/bin/python3 to work on Ubuntu 14.04. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* buildtools: Fix crash on invalid --extra-python optionPetr Viktorin2015-07-211-1/+1
| | | | | | Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* buildtools: Don't configure Python more than oncePetr Viktorin2015-07-211-0/+4
| | | | | | Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* wafsamba: Cache final_libs for each targetAmitay Isaacs2015-06-301-1/+2
| | | | | | | | | | | | The code for saving/loading dependencies does not cache final_libs for each target. If wafsamba tries to reuse the saved dependencies, then it does not get the dependencies on the private libraries correctly. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Tue Jun 30 09:44:10 CEST 2015 on sn-devel-104
* Always use Samba's CHECK_CFG instead of waf check_cfgThomas Nagy2015-06-261-1/+1
|
* Remove PYTHONDIR and PYTHONARCHDIR in a single placeThomas Nagy2015-06-261-0/+4
|
* wafsamba: Also build libraries with RELRO protectionAndreas Schneider2015-06-191-0/+2
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11346 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Jun 19 12:51:48 CEST 2015 on sn-devel-104
* wafsamba: let CHECK_DECLS() find enum valuesStefan Metzmacher2015-06-121-1/+12
| | | | | | | | In the current state this still generates the same config.h at least on ubuntu 14.04 amd64. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* wafsamba: remove unused allow_warnings=True from SAMBA_PYTHON()Stefan Metzmacher2015-06-121-1/+0
| | | | | | | This is not needed anymore all python bindings build without wawrnings now. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* buildtools: Always reset the build environmentPetr Viktorin2015-06-101-81/+82
| | | | | | | | | | | | | In install_library, the Build object's environment was not reset after an early return, so the extrapython env would be used in subsequent build steps. Wrap everything in a try-finally block to make sure the env is reset. (Almost all of the change is indentation, `git show -w` recommended.) Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* waf: add a sample run-on-target scriptUri Simchoni2015-05-201-0/+148
| | | | | | | | | | This is a sample script that can be used with the --cross-execute configure switch to run configure tests on a remote target for which samba is being cross-compiled. Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* waf: Fix parsing of cross-answers file in case answer includes a colonUri Simchoni2015-05-201-1/+1
| | | | | | | | | | The answer provided in the cross-answers file may include a colon, as in: Checking uname version type: "#57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014" Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* waf: allow cross-execute program to have arguments with spacesUri Simchoni2015-05-201-1/+2
| | | | | | | | | | | | | | | | | | | | | When cross-compiling samba using the cross-execute method, allow the cross-excute command to have arguments that contain spaces by quoting them. For example: ./configure --cross-compile '--cross-execute=ce-program "par am"' In this case, for each cross test whose binary is /path/testprog, waf shall run the equivalent of running from a shell: ce-program "par am" /path/testprog This is useful for passing an arbitrary argument list to a subprocess of the cross-execute program, such as in buildtools/examples/run_on_target.py Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* waf: improve readability of cross-answers generated by cross-executeUri Simchoni2015-05-201-5/+8
| | | | | | | | | | | | | | When generating a result for cross-answers from the (retcode, retstring) tuple: - (0, "output") indicated as "output" - 1 is interpreted as generic fail code, instead of 255, because most if not all tests fail with 1 as exit code rather than 255 - For failing test, use NO instead of FAIL, because that's not necessarily a failure (it could mean that something is NOT broken) Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* Adds a new mode to samba cross-compiling.Uri Simchoni2015-05-201-12/+34
| | | | | | | | | | | | When both --cross-answers and --cross-execute are set, this means: - Use cross-answers - If answer is unknown, then instead of adding UNKNOWN to the cross-answers file and failing configure, the new mode runs cross-execute to determine the answer and adds that to the cross-answers file. Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* waf: sanitize and fix added cross answerUri Simchoni2015-05-201-2/+11
| | | | | | | | | | | | | | | | When configuring samba for cross-compilation using the cross-answers method, the function add_answer receives the standard output and exit code of a configuration test and updates the cross-answers file accordingly. This patch sanitizes the standard output to conform to the cross-answers file format - one line of output. It also adds a missing newline. (Note - at this point add_answer is only ever called with empty output but this change is significant for the reminder of this patchset) Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* waf: always close cross answers fileUri Simchoni2015-05-201-0/+2
| | | | | | | | | | When configuring samba for cross-compilation using the cross-answers file, the file is not closed in a couple of cases - fix that. Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* Factor out submodule presence checking.Jelmer Vernooij2015-05-191-1/+10
| | | | | | | | Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue May 19 22:17:48 CEST 2015 on sn-devel-104
* Make waf fail if submodules are out of date.Jelmer Vernooij2015-05-191-0/+34
| | | | | | | | | | | | | | | | | | Instead, suggest the user run 'git submodule update'. This should prevent users from accidentally building Samba against outdated or too new versions of the bundled third party libraries after switching branches. I've opted to make this an error rather than actually running 'git submodule update' directly, as the latter could cause unpredictable behaviour. If we find that manually updating submodules is too cumbersome, we can always change this. The normal mode of operation for developers should not involve any submodules at all, but system versions of these libraries. Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Factor out function for finding Git binary.Jelmer Vernooij2015-05-192-6/+19
| | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Drop bzr VCS support.Jelmer Vernooij2015-05-192-59/+0
| | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* buildtools: Add a helper for running Python testsPetr Viktorin2015-05-192-0/+22
| | | | | | | | | | | Add the function samba_utils.RUN_PYTHON_TESTS for running a Python test. When building for multiple Python versions, all are tested. Also, add the list of configured Python interpreters to build config. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* buildtools: Add a helper to iterate through Python environmentsPetr Viktorin2015-05-192-0/+28
| | | | | | | | | This prevents code duplication to ensure the "extrapython" build is the same as the normal one. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* buildtools: Add --extra-python configure optionPetr Viktorin2015-05-194-4/+48
| | | | | | | | | This allows building Python support for two different Python versions at the same time. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* buildtools: Expose the Python 3 ABI tagPetr Viktorin2015-05-191-0/+12
| | | | | | | | | | | | Expose the tag in the env to allow using it in pkg-config files Add a "pyembed_libname" function to correctly form library names. (This can't be done automatically in SAMBA_LIBRARY because the name could be used as a dependency for another library) Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* Convert all uint32/16/8 to _t in a grab-bag of remaining files.Richard Sharpe2015-05-141-3/+3
| | | | | | | | | | I still need to fix the rpc stuff, but we are almost there. Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 14 22:16:56 CEST 2015 on sn-devel-104
* Revert "wafsamba: flags from enviroment are put before our own internal ↵Ralph Boehme2015-04-261-42/+0
| | | | | | | | | | | | versions" This reverts commit b2bb6aeb8057ac725f6ad12378344b201c3a3ba2. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Sun Apr 26 18:40:39 CEST 2015 on sn-devel-104
* docs: correctly depend on used xsl files and catalog for building manpages.tMichael Adam2015-04-241-1/+3
| | | | | | | | | | So changes in (e.g.) our man.xsl will trigger a rebuild of the manpages. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Apr 24 15:39:31 CEST 2015 on sn-devel-104
* buildtools: Use all of pyext_PATTERN in map_shlib_extensionPetr Viktorin2015-04-241-1/+1
| | | | | | | | | | | | | | | | In Python 3, C extension module filenames have an ABI tag; the pyext_PATTERN is e.g. "%s.cpython-34m.so". The build system was only using the last dot-separated element of that extension (the ".so"). Use the whole extension when constructing the final filename. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Fri Apr 24 04:26:45 CEST 2015 on sn-devel-104
* wafsamba: Add install argument to SAMBA_PYTHONPetr Viktorin2015-04-241-0/+2
| | | | | | | | This allows building Python modules that are only used for testing. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* build:wafsamba: fix a typoMichael Adam2015-04-021-3/+3
| | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Apr 2 16:39:01 CEST 2015 on sn-devel-104
* waf: Remove 'linkflags.remove(x)' line added in error.Jeremy Allison2015-03-311-1/+0
| | | | | | | | | | | | Fixes bug #11165 - Bug in configure scripts when system-mitkrb5 is used https://bugzilla.samba.org/show_bug.cgi?id=11165 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Mar 31 04:32:52 CEST 2015 on sn-devel-104
* Merge update-waf.sh into update-external.shJelmer Vernooij2015-03-261-13/+0
| | | | | Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Move waf into third_party/.Jelmer Vernooij2015-03-2677-18407/+1
| | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Remove tdb_compatVolker Lendecke2015-03-171-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* Transition to waf 1.8: wrapped conf.check_cfgThomas Nagy2015-03-162-1/+5
| | | | | | | | Reviewed-By: Jelmer Vernooij <jelmer@samba.org> (forward ported to current master by abartlet) Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Transition to waf 1.8: replaced on_results by update_outputsThomas Nagy2015-03-163-4/+4
| | | | | | Reviewed-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Update the copy of waf to current 1.5Jelmer Vernooij2015-03-166-9/+339
| | | | | | | | | | | | After making the update, this commit reverts the upstream addition of LDVERSION support in Python.py, which is necessary for Python 3 support in waf. This change conflicts with the last remaining Samba-specific change in waf to help with cross-compilation. Change-Id: Iedfdc0199e9d10dfbd910c4eab50c23f984b6e2d Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>