1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

912 Commits

Author SHA1 Message Date
Jelmer Vernooij
5d672b9a53 Factor out function for finding Git binary.
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-05-19 19:28:19 +02:00
Jelmer Vernooij
8eda4efacd Drop bzr VCS support.
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-05-19 19:28:19 +02:00
Petr Viktorin
91b407fc94 buildtools: Add a helper for running Python tests
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>
2015-05-19 19:28:19 +02:00
Petr Viktorin
6f490000c6 buildtools: Add a helper to iterate through Python environments
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>
2015-05-19 19:28:19 +02:00
Petr Viktorin
616dfae8ff buildtools: Add --extra-python configure option
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>
2015-05-19 19:28:18 +02:00
Petr Viktorin
13a91e5427 buildtools: Expose the Python 3 ABI tag
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>
2015-05-19 19:28:18 +02:00
Richard Sharpe
57568f1900 Convert all uint32/16/8 to _t in a grab-bag of remaining files.
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
2015-05-14 22:16:56 +02:00
Ralph Boehme
ec085fe8b3 Revert "wafsamba: flags from enviroment are put before our own internal versions"
This reverts commit b2bb6aeb80.

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
2015-04-26 18:40:39 +02:00
Michael Adam
3e5d527766 docs: correctly depend on used xsl files and catalog for building manpages.t
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
2015-04-24 15:39:31 +02:00
Petr Viktorin
78cdd5ea7d buildtools: Use all of pyext_PATTERN in map_shlib_extension
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
2015-04-24 04:26:45 +02:00
Petr Viktorin
50311c7606 wafsamba: Add install argument to SAMBA_PYTHON
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>
2015-04-24 01:50:11 +02:00
Michael Adam
b542d1c83f build:wafsamba: fix a typo
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
2015-04-02 16:39:00 +02:00
Jeremy Allison
bdf0a81006 waf: Remove 'linkflags.remove(x)' line added in error.
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
2015-03-31 04:32:52 +02:00
Jelmer Vernooij
483bb682a8 Merge update-waf.sh into update-external.sh
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-26 22:47:22 +01:00
Jelmer Vernooij
90ec37cf90 Move waf into third_party/.
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-26 22:47:22 +01:00
Volker Lendecke
de811f14af lib: Remove tdb_compat
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-03-17 11:30:52 +01:00
Thomas Nagy
3c0e3af395 Transition to waf 1.8: wrapped conf.check_cfg
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>

(forward ported to current master by abartlet)

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-16 03:00:07 +01:00
Thomas Nagy
5771276be9 Transition to waf 1.8: replaced on_results by update_outputs
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-16 03:00:07 +01:00
Jelmer Vernooij
2ab6c10f84 Update the copy of waf to current 1.5
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>
2015-03-16 03:00:06 +01:00
Jelmer Vernooij
ef2c6d0d57 test_duplicate_symbol: Use Samba subunit emitter.
Change-Id: I280495706ff460674244183103306ca717c419a8
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:47 +01:00
Michael Adam
1826f06be7 build:wafadmin: fix use of spaces instead of tabs.
Indentation should not be a mixture of tabs and spaces.
Waf uses tabs.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2015-03-04 14:46:07 +01:00
Volker Lendecke
a3adad7a17 waf: Fix the build on openbsd
We have single-digit vnum='0', make the assignment deal with it

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Mar  3 03:33:24 CET 2015 on sn-devel-104
2015-03-03 03:33:24 +01:00
Garming Sam
63609eba99 build: amend typo for address sanitizer help
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-02-25 01:08:12 +01:00
Alexander Bokovoy
a00d72bf5d wafsamba: make sure build fails when uninitialized variable is detected
In developer build, fail if uninitialized variable is found by GCC.

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Feb 24 20:21:52 CET 2015 on sn-devel-104
2015-02-24 20:21:52 +01:00
Petr Viktorin
a0cbce60f4 buildtools: Use separate storage for each function in runonce
The runonce decorator used shared storage for all functions, and
dispatched only on arguments, so a call would be eliminated if
a different runonce function had already been called with the same
arguments.

Use separate storage for each decorated function.

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Simo Sorce <simo@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2015-02-17 15:41:11 +01:00
Andreas Schneider
cf68c1accb waf: Add address sanitizer configure option.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-01-28 17:17:07 +01:00
Stefan Metzmacher
47155641cb wafsamba: create unique names when building shared modules
After commit 76fdcf5c15, we could endup
with bin/default/source3/auth/libauth-samba4.so being created two times.
Once by SAMBA3_LIBRARY('auth',...) and once again by SAMBA3_MODULE('auth_samba4', ...).

As a result bin/default/source3/auth/libauth-samba4.so gets randomly
overwritten.

SAMBA3_MODULE('auth_samba4', ...) results in
bin/default/source3/auth/libauth_module_samba4.so now.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Jan 19 04:43:53 CET 2015 on sn-devel-104
2015-01-19 04:43:53 +01:00
Stefan Metzmacher
4da20e2e31 wafsamba: remove unused variable in SAMBA_MODULE()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2015-01-19 02:24:03 +01:00
Stefan Metzmacher
85a30cc440 wafsamba: passing 'subsystem' to SAMBA_MODULE() is not optional
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2015-01-19 02:24:03 +01:00
Stefan Metzmacher
7668e457a6 wafsamba: make it possible to pass bundled_name to SAMBA_LIBRARY()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2015-01-19 02:24:03 +01:00
Thomas Nagy
115eb94215 wafadmin: backported the openbsd fixes from waf 1.7
This is a backport from waf 1.5...

Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jan  9 02:02:07 CET 2015 on sn-devel-104
2015-01-09 02:02:07 +01:00
Michael Adam
9f2979a1a4 wafsamba: remove commented out code.
This code has only ever been there as commented out...

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2015-01-08 23:38:07 +01:00
Michael Adam
ffff95d421 Revert "waf: added suncc_wrap"
This reverts commit 65743f932b.

Conflicts:
	buildtools/wafsamba/samba_optimisation.py

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-01-08 23:38:07 +01:00
Stefan Metzmacher
d7bd51a79d wafsamba: generate an empty.c file if a SAMBA_{LIBRARY,SUBSYSTEM} doesn't have any source files
This is better than passing '-' as filename to the compiler/linker.
This replaces commit 65743f932b.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=9334
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10315

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-01-08 23:38:07 +01:00
Ralph Boehme
a6bda1f2bc wafsamba: flags from enviroment are put before our own internal versions
Ensure user provided CPPFLAGS and LDFLAGS are put *behind* our
internally computed compiler and linker flags.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10877

Pair-Programmed-With: Michael Adam <obnox@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2015-01-08 23:38:07 +01:00
Michael Adam
707dc16987 wafsamba: filter out standard library paths from RPATH and LIBPATH
We should avoid passing them explicitly to the compiler/linker.

We ask the compiler with the '-print-search-dirs' argument
or fallback to [ '/usr/lib', '/usr/lib64' ].

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-01-08 23:38:07 +01:00
Michael Adam
dc808a466e wafsamba: fix ordering problems with lib-provided and internal RPATHs
When a library or system (like cups) provides an RPATH,
e.g. with -Wl,-R or -Wl,-rpath, this was added by waf
to the LINKFLAGS, wich was later prepended to our RPATH.
But if the path by chance contains an older version of
one of our internal libraries like talloc, this would lead
to linking the too old talloc into our binaries.

This has been observed on, e.g., FreeBSD, but it is a general
problem.

This patch fixes the problem by specially parsing the RPATH
linker options from the pkg-config(, cups-config, ....) output
and putting the paths into the RPATH_<lib> container, which
is then later correctly appended to our internal RPATH.

This is a better fix than commit 64f5e24100
as it touches wafsamba only. 64f5e24100
is already in waf 1.5 upstream, but has some possible bugs,
e.g. it doesn't handle -Wl,-R, (with ',' at the end)
or some combinations where the path is given via an additional
-Wl,/path argument.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10548

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-01-08 23:38:07 +01:00
Stefan Metzmacher
d744c7c080 wafsamba: make it possible to specify ADDITIONAL_{CFLAGS,LDFLAGS} as env var to ./configure
CFLAGS and LDFLAGS are also used during the configure checks and might impact
their results.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08 23:38:07 +01:00
Stefan Metzmacher
46fdd6221e wafsamba: improve -fvisibility=hidden, we should check it together this WERROR_CFLAGS
GCC ignores -fvisibility=hidden with a warning instead of failing
om some platforms (e.g. Solaris).

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11031

Based on a patch from Tom Schulz <schulz@adi.com>.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08 23:38:07 +01:00
Stefan Metzmacher
52eb8854ff wafsamba: let CURRENT_CFLAGS() use bld.env.VISIBILITY_CFLAGS
This is better than a hardcoded value in multiple places.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08 23:38:07 +01:00
Stefan Metzmacher
4683fc0f1d wafsamba: move -fvisibility=hidden checks from lib/replace to wafsamba
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08 23:38:07 +01:00
Stefan Metzmacher
208be32c6a wafsamba: move '-fstack-protector' checks from lib/replace to wafsamba
This moves the check to the end of the configure run,
which means we no longer use this on configure checks,
but only for the real build.

This behavior is similar than our developer cflags.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08 23:38:07 +01:00
Stefan Metzmacher
0f4ce418ae wafsamba: move WERROR_CFLAGS checks from lib/replace to wafsamba
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08 23:38:07 +01:00
Stefan Metzmacher
7a3dc66852 wafsamba: move compiler / cflags related stuff from lib/replace to wafsamba
We should have this just in one central place.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08 23:38:07 +01:00
Stefan Metzmacher
ab4b988ba2 wafsamba: let TO_LIST(mylist) return a copy of mylist
In most cases we have TO_LIST(mystring) which returns an independent
list.

newlist = TO_LIST(mylist) returned just a reference to mylist.
Which means newlist.append("end") would also modify mylist.

TO_LIST() should always return an independent list.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08 23:38:06 +01:00
Ralph Boehme
89cc31f5cf wafsamba: check for rpath compiler/linker flags
Older SunOS linker only support -Wl,-R,/path instead of -Wl,-rpath,/path.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-12-19 13:15:12 +01:00
Stefan Metzmacher
76fdcf5c15 wafsamba: fill PRIVATE_NAME() logic again
We append bld.env.PRIVATE_EXTENSION to the name of private libraries
again, but only unless they have a abi_directory, vnum or soname defined.

This avoids naming conflicts with system libraries, e.g. libidmap.so
on Solaris

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-12-19 13:15:12 +01:00
Stefan Metzmacher
82e583b04b wafsamba: add optional keep_underscore=True to SAMBA_LIBRARY()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9299

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-12-19 13:15:12 +01:00
Stefan Metzmacher
7c7d3ebb41 wafsamba: change the default to allow_warnings=False for CURRENT_CFLAGS()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-25 07:25:46 +01:00
Stefan Metzmacher
994eea61cc wafsamba: change the default to allow_warnings=False for SAMBA_{SUBSYSTEM,LIBRARY,MODULE}()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-25 07:25:46 +01:00