summaryrefslogtreecommitdiff
path: root/buildtools
Commit message (Collapse)AuthorAgeFilesLines
* build:wafsamba: Fix TypeError in read_submodule_status()Joseph Sutton2023-05-091-0/+1
| | | | | | | | | parts = l.split(" ") ^^^^^^^^^^^^ TypeError: a bytes-like object is required, not 'str' Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: Normalize strings in gdb output when comparing ABIAlexander Bokovoy2023-04-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an issue with gdb >= 13: libndr.so: symbol ndr_transfer_syntax_ndr64 has changed old_signature: uuid = { time_low = 1903232307, time_mid = 48826, time_hi_and_version = 18743, clock_seq = "\203\031", node = "\265\333\357\234\314\066" }, if_version = 1 new_signature: uuid = { time_low = 1903232307, time_mid = 48826, time_hi_and_version = 18743, clock_seq = "\203\031", node = "\265\333\357\234\3146" }, if_version = 1 \314\066 and \3146 are the same as \066 translates into the char '6'. In order to address this we should do byte comparison in python. Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Alexander Bokovoy <ab@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* buildtools: Remove compile_commands.json symlinkAndreas Schneider2023-03-291-5/+0
| | | | | | | | | | We are telling clangd with the .clangd project config file where to find it. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Mar 29 17:54:05 UTC 2023 on atb-devel-224
* buildtools: Fix code spellingAndreas Schneider2023-03-289-11/+12
| | | | | | Best reviewed with: `git show --word-diff` Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Rowland Penny <rpenny@samba.org>
* wafsamba: Remove unused configure checkJoseph Sutton2023-03-201-5/+0
| | | | | | | | | This check would trigger compiler warnings due to the extra argument passed to eprintf(). HAVE__VA_ARGS__MACRO isn't used anywhere, so we can remove the check. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba_version.py: Avoid resource leakJoseph Sutton2023-03-031-16/+16
| | | | | | | View with 'git show -b'. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* buildtools: fix mutable default argumentsRob van der Linde2023-02-233-5/+15
| | | | | | Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
* Skip running a C program during cross compilationHelmut Grohne2023-02-201-1/+1
| | | | | | | | | When passing --cross-compile, one has to specify a --cross-answers file and this test cannot be performed anyway, so skip it already. Signed-off-by: Helmut Grohne <helmut@subdivi.de> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* waf: Add support for MemorySanitizerAndreas Schneider2023-02-062-2/+18
| | | | | | | | | | | | This currently only works with binaries. As there is no shared library for MSAN it only is statically linked against binaries. This means if we have e.g. a python script trying to load ldb, it will fail with undefined symbols. 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): Mon Feb 6 23:49:04 UTC 2023 on atb-devel-224
* python: Don't use deprecated escape sequencesAndreas Schneider2023-01-207-16/+16
| | | | | | | | | | | | | Certain escape sequences are not valid in Python string literals, and will eventually result in a SyntaxError. Follow up patch of 5045382c6dd04b1bae0eaaae823be908213ff079 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): Fri Jan 20 09:06:49 UTC 2023 on atb-devel-224
* buildtools/wafsamba: Avoid calling lib_func without a prototypeFlorian Weimer2023-01-091-1/+2
| | | | | | | | | | | | This is a backport of commit f4c0a750d4adebcf2342a44e85f04526c34 ("WAF: Fix detection of linker features") to buildtools/wafsamba/samba_conftests.py. It fixes the check for rpath support with compilers in strict C99 mode. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15281 Signed-off-by: Florian Weimer <fweimer@redhat.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* third_party: Update waf to version 2.0.25Andreas Schneider2023-01-062-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* third_party: Update resolv_wrapper to version 1.1.8Andreas Schneider2022-12-211-1/+1
| | | | | | | | | | res_randomid() is marked as deprecated in newer glibc. 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): Wed Dec 21 21:28:42 UTC 2022 on sn-devel-184
* CVE-2022-37966 wafsamba: add support for CHECK_VARIABLE(mandatory=True)Stefan Metzmacher2022-12-131-1/+3
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=15237 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* third_party: Update nss_wrapper to version 1.1.13Andreas Schneider2022-11-091-1/+1
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Nov 9 23:15:07 UTC 2022 on sn-devel-184
* wafsamba: Have CHECK_C_PROTOTYPE() pass through 'lib' into CHECK_CODE()Joseph Sutton2022-11-081-2/+3
| | | | | Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: Add -Werror=implicit-intAndreas Schneider2022-10-271-0/+2
| | | | | | | https://fedoraproject.org/wiki/Changes/PortingToModernC Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* wafsamba: Add -Werror=old-style-definitionAndreas Schneider2022-10-271-0/+2
| | | | | | | See https://fedoraproject.org/wiki/Changes/PortingToModernC Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* wafsamba: allow cflags for CHECK_TYPE[_IN]()Stefan Metzmacher2022-08-151-3/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* third_party: Update socket_wrapper to version 1.3.4Andreas Schneider2022-07-221-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* waf: Check for -Wno-error=array-bounds flagsAndreas Schneider2022-07-191-0/+3
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=15073 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Jul 19 12:17:35 UTC 2022 on sn-devel-184
* third_party: Update nss_wraper to version 1.1.12Andreas Schneider2022-06-241-1/+1
| | | | | | | | 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): Fri Jun 24 22:29:33 UTC 2022 on sn-devel-184
* build: Ensure that SAMBA_GENERATOR() tasks fail on errorAndrew Bartlett2022-06-221-1/+8
| | | | | | | | | | | | | Previously the error from inside the shell was eaten. This showed up particularly as a failure to notice errors when running xsltproc to build the manpages. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Jun 22 16:43:30 UTC 2022 on sn-devel-184
* build: Allow &pathconfig XML entities to be used in all manpages, not just ↵Andrew Bartlett2022-06-221-2/+2
| | | | | | | | smb.conf BUG: https://bugzilla.samba.org/show_bug.cgi?id=15101 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* python: Don't use deprecated escape sequencesJoseph Sutton2022-06-141-1/+1
| | | | | | | | Certain escape sequences are not valid in Python string literals, and will eventually result in a SyntaxError. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* third_party: Update waf to version 2.0.24Andreas Schneider2022-05-232-2/+2
| | | | | | | | | | | | This fixes building of python libraries with Python 3.11! BUG: https://bugzilla.samba.org/show_bug.cgi?id=15071 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon May 23 09:34:51 UTC 2022 on sn-devel-184
* python: Remove redundant assignmentsJoseph Sutton2022-05-101-1/+1
| | | | Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
* wafsamba: Fix previously unreachable exception pathJoseph Sutton2022-05-101-1/+1
| | | | Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
* python: Remove unnecessary 'pass' statementsJoseph Sutton2022-05-101-1/+0
| | | | Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
* Move LSP stuff to buildtools/devel_env.shAndreas Schneider2022-04-011-0/+7
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Apr 1 11:20:35 UTC 2022 on sn-devel-184
* wafsamba: require PYTHONHASHSEED=1 to be exportedStefan Metzmacher2022-03-291-0/+4
| | | | | | | | | | | This avoids a lot of trouble with random build failures, if people try to use waf directly. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Mar 29 23:31:38 UTC 2022 on sn-devel-184
* configure/Makefile: export PYTHONHASHSEED=1 in all 'configure/Makefile' scriptsStefan Metzmacher2022-03-292-4/+11
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: let test_duplicate_symbol.sh export PYTHONHASHSEED=1Stefan Metzmacher2022-03-291-0/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* buildtools: remove unused testwaf.shStefan Metzmacher2022-03-291-70/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* waf: Document the confusing --nonshared-binary, --builtin-libraries, ↵Andrew Bartlett2022-03-281-7/+60
| | | | | | | | | | | | | | --private-libraries and --bundled-libraries These options are confusing to all who encounter them. BUG: https://bugzilla.samba.org/show_bug.cgi?id=8731 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Mar 28 10:06:01 UTC 2022 on sn-devel-184
* wafsamba: Fix call to sorted()Joseph Sutton2022-03-171-3/+3
| | | | | | | | | | | In Python 3, sorted() does not take a 'cmp' parameter, so we need to use the 'key' parameter instead. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Mar 17 01:36:59 UTC 2022 on sn-devel-184
* third_party/heimdal_build: Determine whether time_t is signedJoseph Sutton2022-03-011-0/+17
| | | | | | | | | | | | | | | | | | | | | | | Without this, Heimdal will assume time_t is unsigned, and a wrong assumption will cause 'infinite' ticket lifetimes to be reckoned as from the past, and thus requests will fail with KDC_ERR_NEVER_VALID. This is an adaptation to Heimdal: commit 9ae9902249732237aa1711591604a6adf24963fe Author: Nicolas Williams <nico@twosigma.com> Date: Tue Feb 15 17:01:00 2022 -0600 cf: Check if time_t is signed BUG: https://bugzilla.samba.org/show_bug.cgi?id=14995 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Mar 1 18:07:50 UTC 2022 on sn-devel-184
* buildtools: Reformat shell scriptsAndreas Schneider2022-02-226-81/+80
| | | | | | shfmt -f buildtools | xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* third_party: Update waf to verison 2.0.23Andreas Schneider2022-02-212-3/+2
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Feb 21 10:06:27 UTC 2022 on sn-devel-184
* builtools: Make abi_gen.sh less prone to errorsAndreas Schneider2022-02-151-2/+7
| | | | | | | | | | The mold linker has more hidden symbols and we would need to filter them out with nm, where objdump tells us which symbols are actually hidden. So we just need to filter out whatever is hidden. The use of awk makes it also easier to get what we want. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* wafsamba: replace 'echo -n' with printfSergey V. Lobanov2022-02-111-1/+1
| | | | | | | | | | | This patch makes samba_cross.py compatible with old bash (e.g. 3.2) Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Feb 11 07:58:57 UTC 2022 on sn-devel-184
* wafsamba: Add our own implmentation to generate the clangdbStefan Metzmacher2022-01-211-1/+51
| | | | | | Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* wafsamba: Remove clangdb code which doesn't workStefan Metzmacher2022-01-212-13/+2
| | | | | | | | This generates an incomplete database where defines and includes are missing. Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* HEIMDAL: move code from source4/heimdal* to third_party/heimdal*Stefan Metzmacher2022-01-191-6/+6
| | | | | | | | | | | This makes it clearer that we always want to do heimdal changes via the lorikeet-heimdal repository. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz> Autobuild-User(master): Joseph Sutton <jsutton@samba.org> Autobuild-Date(master): Wed Jan 19 21:41:59 UTC 2022 on sn-devel-184
* s4:heimdal_build: changes required to build after importAndrew Bartlett2022-01-191-1/+1
| | | | | | | | | | | | | | | | | For libtommath we do this by using the list from makefile.commo in in libtommath rather than trying to match the list by hand. This will be easier to maintain over the long term. Thanks to work over many years by: - Gary Lockyer <gary@catalyst.net.nz> - Stefan Metzmacher <metze@samba.org> - Andrew Bartlett <abartlet@samba.org> NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN! Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* build: reduce printf() calls in generated build_options.cDavid Disseldorp2022-01-171-34/+64
| | | | | | | | | | | | | | | | | | | build_options.c is inefficient in multiple ways: 1) it's generated via one python fp.write() call per line 2) the generated code calls output() for each and every build option This commit addresses (2), modifying write_build_options_header() and write_build_options_footer(). write_build_options_section() could also be collapsed into a single output() call, but this may lead to oversize string literals, so has been left as is. I observe no change in smbd --build-options output. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Jan 17 13:17:53 UTC 2022 on sn-devel-184
* build: reduce fp.write calls for build_options.c generationDavid Disseldorp2022-01-171-104/+104
| | | | | | | | | | | | build_options.c is inefficient in multiple ways: 1) it's generated via one python fp.write() call per line 2) the generated code calls output() for each and every build option This commit reduces fp.write() calls for (1). I observe no change in the generated build_options.c . Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* wafsamba: Pass lib to CHECK_DECLS()Andreas Schneider2021-12-061-1/+3
| | | | | | | This is needed if you have headers in non-standard include paths. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build: Only use embedded Heimdal include paths in an embedded Heimdal buildAndrew Bartlett2021-12-061-2/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14924 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
* wafsamba: allow SAMBA_LIBRARY() to get and use original 'version-script.map' ↵Stefan Metzmacher2021-11-302-2/+73
| | | | | | | | | | | | | | for private libraries We'll soon use this for the internal Heimdal build and take the raw version-script.map files in order to create our own .vscript file with our private version suffix. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14780 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>