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

837 Commits

Author SHA1 Message Date
Michael Adam
fe6685dbf3 build: rename argument of list_directory_files(): abspath->path
It is never called with an absolute path.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-06-20 23:38:10 +02:00
Amitay Isaacs
4a5ded2b69 wafsamba: allow samba_dist.dist() to be called from a different directory.
Up to now it assumed to be called from the top level srcdir.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-20 23:38:09 +02:00
Stefan Metzmacher
2637890ef4 wafsamba: Fail with error message if perl doesn't provide valid dirs.
We try harder to get valid directories, we now fallback like this:

vendorarch => sitearch => archlib
and
vendorlib => sitelib => privlib

The new options are --with-perl-arch-install-dir and
--with-perl-lib-install-dir.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-05-09 23:10:07 +02:00
Andreas Schneider
0ba276ebad wafsamba: If perl can't provide defaults, define them.
This should fix the installation on FreeBSD.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472

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): Thu May  8 13:55:50 CEST 2014 on sn-devel-104
2014-05-08 13:55:50 +02:00
Gustavo Zacarias
6619055f60 build: make wafsamba CHECK_SIZEOF cross-compile friendly
Use the same trick as commit 0d9bb86293
We do the same array trick iteratively starting from 1 (byte) by powers
of 2 up to 32.

The new 'critical' option is used to make the invocation die or not
according to each test.
The default is True since normally it's expected to find a proper
result and should error out if not.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-05-06 18:14:13 +02:00
Gustavo Zacarias
5ac317e2b6 build: unify and fix endian tests
Unify the endian tests out of lib/ccan/wscript into wafsamba since
they're almost cross-compile friendly.
While at it fix them to be so by moving the preprocessor directives out
of main scope since that will fail.
And keep the WORDS_BIGENDIAN, HAVE_LITTLE_ENDIAN and HAVE_BIG_ENDIAN
defines separate because of different codebases.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-05-06 18:14:13 +02:00
Andreas Schneider
ad3a431670 wafsamba: Add set_target to CHECK_BUNDLED_SYSTEM.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:05 +02:00
Ralph Boehme
85041c88d8 wafsamba: replace dots in library names
Certain libraries use a version number with a dot in the library name,
eg libtracker-sparql-0.16. The dot is passed to the HAVE_LIBXXX macro
but dots aren't allowed in C macros, compiler diagnostic:

  warning: missing whitespace after the macro name

Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-08 19:26:13 +02:00
Stefan Metzmacher
e1ec1f5d8d wafsamba: explicitly use allow_warnings=True for SAMBA_PYTHON()
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): Wed Apr  2 11:04:36 CEST 2014 on sn-devel-104
2014-04-02 11:04:36 +02:00
Stefan Metzmacher
8a1f67b53b wafsamba: add optional allow_warnings(default=True) to SAMBA_{SUBSYSTEM,LIBRARY,MODULE}()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:45 +02:00
Stefan Metzmacher
404f025284 wafsamba: add an optional allow_warnings(default=True) to CURRENT_CFLAGS()
-Werror is now remembered in PICKY_CFLAGS and only added if
allow_warnings is False.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:45 +02:00
Stefan Metzmacher
8cdd9f3a7f wafsamba: split out a conf.ADD_NAMED_CFLAGS() function
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:45 +02:00
Stefan Metzmacher
2f059329b0 wafsamba: use -Werror=declaration-after-statement if available
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:45 +02:00
Stefan Metzmacher
e21aa7bf09 wafsamba: use multiple conf.ADD_CFLAGS() lines for developer CFLAGS
We first check for warn flags then for error flags.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:45 +02:00
Stefan Metzmacher
cc765baa64 wafsamba: allow --bundled-libraries=ALL,!popt
This will not bundle 'popt', but everything else.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:42 +02:00
Stefan Metzmacher
c19e5a0386 wafsamba: allow --bundled-libraries=NONE,popt
This will bundle only 'popt'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:41 +02:00
Stefan Metzmacher
ef380bb2a9 wafsamba: simplify LIB_MUST_BE_BUNDLED()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:41 +02:00
Stefan Metzmacher
9a8e35a049 wafsamba: simplify LIB_MAY_BE_BUNDLED()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:41 +02:00
Stefan Metzmacher
6ae4121da5 wafsamba: allow optional 'checkcode' argument to CHECK_BUNDLED_SYSTEM()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:41 +02:00
Stefan Metzmacher
764706c2b0 wafsamba: allow CHECK_BUNDLED_SYSTEM() to check headers without functions
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:41 +02:00
Stefan Metzmacher
cec109ccf9 wafsamba: simplify CHECK_BUNDLED_SYSTEM_PKG() by just calling CHECK_BUNDLED_SYSTEM()
If checkfunctions is not specified they are the same.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:41 +02:00
Stefan Metzmacher
4dea4e310d wafsamba: port optional 'pkg' option from CHECK_BUNDLED_SYSTEM_PKG() to CHECK_BUNDLED_SYSTEM()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:41 +02:00
Stefan Metzmacher
d88f41f698 wafsamba: require a ';' after STATIC_*_MODULES_PROTO
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:41 +02:00
Stefan Metzmacher
47dbd4ef60 wafsamba: use cluster_support_features in build_options.c
This way 'smbd -b' returns the cluster features of the currently used
libsamba-cluster-support.so.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-03-24 17:09:10 +01:00
Stefan Metzmacher
1c1a2e4596 wafsamba: add CONFIG_RESET()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-03-24 17:09:10 +01:00
Andreas Schneider
48f0183dbe buildtools: Add perl vendorlib configure option.
After this patch has been pushed, we need to change autobuild to compile
with this option or we will not be able to install pidl.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-03-06 09:59:43 +01:00
Andreas Schneider
04685ff4ee buildtools: Rename perl vendorarch configure option.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-03-06 09:59:42 +01:00
Andreas Schneider
c2d58c3c20 Revert "waf: Add option to specify perl vendor dir."
This reverts commit 9b200555fe.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-03-06 09:59:42 +01:00
Andreas Schneider
9b200555fe waf: Add option to specify perl vendor dir.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Feb 27 11:48:54 CET 2014 on sn-devel-104
2014-02-27 11:48:54 +01:00
Gustavo Zacarias
f8c179b80e build: allow some python variable overrides
The python variables (settings) are fetched from a running python
interpreter which usually isn't the target one when cross compiling,
hence libraries and flags aren't the same and can pollute the target build.
Allow some of these variables to be redefined via environment variables
in order to aid cross-compiling.
According to testing python_LDFLAGS and python_LIBDIR should be enough.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Feb 13 06:03:26 CET 2014 on sn-devel-104
2014-02-13 06:03:26 +01:00
David Disseldorp
a8071954fe build: warn about mixed declarations and code
Attempt to use the -Wdeclaration-after-statement cflag when building in
developer mode.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Feb  1 20:20:35 CET 2014 on sn-devel-104
2014-02-01 20:20:35 +01:00
Garming Sam
57ba012c10 docs: define and include entities for the docs
This allows for dynamic default settings to be generated.

Change-Id: If8b93d233fb941bc7e3073ccf4b5ec0b0a231bd9
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-31 21:07:05 +01:00
Christian Ambach
a83f491810 waf:lib/replace change detection of gettext
convert this to an automatic check: if no option is given, try to find gettext
and if found, use it
if user has specified --with-gettext, then bail out if it could not be found
in case of --without-gettext, skip all gettext related configure checks

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

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-03 05:04:44 +01:00
Björn Jacke
af5102fe00 build: test the generic md5 function after importing it from hashlib
otherwise we used the one from md5 which lead to the following warning on SerNet-imini:

the md5 module is deprecated; use hashlib instead import md5

Signed-off-by: Bjoern Jacke <bj@sernet.de>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-08 18:20:19 +13:00
Steven Siloti
319c2d7311 waf: parse LDFLAGS from python
The LDFLAGS returned by get_python_variables may contain additional library
search paths. These need to be parsed out and placed in LIBPATH to maintain
correct ordering of search paths in the final link flags.

Specifically, appending LDFLAGS directly to LINKFLAGS on my system was causing
/usr/lib to be the first search path specified. This lead to linking against
installed libraries rather than the versions from the current build.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Oct 25 02:48:35 CEST 2013 on sn-devel-104
2013-10-25 02:48:35 +02:00
Michael Adam
64f5e24100 build: 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.

Signed-off-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-25 11:55:14 +13:00
Matthieu Patou
096c962bfe Backport 0e97908 from WAF repository: symlink fix for OpenBSD
Author: Thomas Nagy <tnagy1024@gmail.com>
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Kai Blin <kai@samba.org>

Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Sat Sep 21 11:14:30 CEST 2013 on sn-devel-104
2013-09-21 11:14:30 +02:00
Christian Ambach
a742e87b39 waf: add --without-gettext option
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-09 22:46:51 +02:00
Christian Ambach
ce8fbdf76e waf: fix build on AIX7
the same works for AIX 5,6,7 so leave away the version specifics (as autoconf build did)

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-09 22:45:35 +02:00
Andreas Schneider
191e6b9441 waf: Build with RELRO if supported by the compiler.
Make sure we create binaries with full RELocation Read-Only support. See
https://isisblogs.poly.edu/2011/06/01/relro-relocation-read-only/
for more details.

The default is to check if the compiler supports RELRO and then enable
it. Specifying '--with-relro' will make it mandatory and
'--without-relro' will disable it.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-07-09 13:00:37 -07:00
Michael Adam
3f24d694e7 build: Add missing new line to replaced python shebang line. (Fix bug #9909)
When configuring with a non-standard python specified in
the PYTHON environment variable, the shebang lines in various
python tools like samba-tool and samba_dnsupdate get replaced.

This replace line for the shebang was missing a newline
which joined the shebang line with the following line,
rendereing those scripts with a nonempty second line unusuable,
for example samba_dnsupdate.

This patch fixes this bug which is bug #9909 on bugzilla.

Pair-Programmed-With: Karolin Seeger <kseeger@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Karolin Seeger <kseeger@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed May 29 13:21:51 CEST 2013 on sn-devel-104
2013-05-29 13:21:51 +02:00
Andrew Bartlett
dd72d85e92 build: Remove unused tool for config.h comparison
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-28 12:17:12 +10:00
David Disseldorp
4e76a77f62 waf: build position independent executables
This patch re-instates support for building Position Independent
Executables using the '-fPIE' and '-pie' compiler and linker flags
respectively.

PIE builds are enabled by default, and can be explicitly disabled using
the '--without-pie' configure argument.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue May 28 02:56:36 CEST 2013 on sn-devel-104
2013-05-28 02:56:36 +02:00
Andrew Bartlett
8903103bd6 build: Do not always regenerate the version.h file
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2013-05-27 11:57:02 +10:00
Andrew Bartlett
c6673b96a5 build: Remove binaries and libraries build groups
Build groups are used in Samba to ensure that even if the dependency
chain for a target is not perfect, that it builds reliably.  This
matters most in the early build stages, where we are building the asn1
compiler and autogenerating files.

Once we get to the main stage, dependencies between C files, libraries
and binaries are much clearer, because the C compiler and linker takes
these as inputs anyway.

Groups were added to our waf build for stability during early
development, as dependency information was first imported from the
previous autoconf/perl based build system.

I don't think we need this distinction in the main build of C files
into .o, and when linking these into binaries, because the invocation
of these tools is very well defined, and we will find any missing
inputs very quickly.

As such, I've removed the libraries and binaries targets,
consolidating them with 'main'

By making this change, a build of smbtorture only on a clean tree
drops from 3778 to 2489 targets, and much of the expensive linker
stage is skipped.  The time for a null build of smbtorture only also
drops from 4.673s to as low as 2.499s on my laptop.

Andrew Bartlett

Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2013-05-27 11:56:46 +10:00
Matthieu Patou
e1b71f1c13 buildtools: Fix compilation warnings
STATIC_%s_MODULES_PROTO is defined on the compilation command line by
-DSTATIC_<something>_MODULES_PROTO which the compiler seems to turn into
define STATIC_<something>_MODULES_PROTO 1 thus yielding a warning due to
unused var

Signed-off-by: Matthieu Patou <mat@matws.net>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-20 21:52:44 +10:00
Kai Blin
61a2ad3c02 swat: Remove swat.
Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Sat May 18 16:32:38 CEST 2013 on sn-devel-104
2013-05-18 16:32:38 +02:00
Vadim Zhukov
2fda6c47f4 More generic check for OpenBSD platform
OpenBSD versioning is different from many other
projects, and, say, 5.0 does not differ from 4.9 more than from 5.1. So the
right approach will be to check that platform name starts with "openbsd"
instead. This is also the thing OpenBSD developers do when patching other
software, so this patch is consistent with already existing practicies.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=9888

Reviewed-by: Lars Müller <lars@samba.org>
Reviewed-by: Björn Jacke <bj@sernet.de>

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri May 17 17:58:16 CEST 2013 on sn-devel-104
2013-05-17 17:58:16 +02:00
Matthieu Patou
1160b699cb configure: print a message when docbook.xsl is missing localy
Signed-off-by: Matthieu Patou <mat@matws.net>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-06 21:05:25 +12:00
Andrew Bartlett
7955bf473f build: Raise minimum python version to 2.5.0 for samba build
RHEL5 has a python26 package for a modern python, and was the main reason we
kept python 2.5 support.

However, this support never actually worked for AD DC installations,
as samba-tool uses a feature only in 2.5 and above.  Very few folks
noticed and those were on RHEL5, and moving to 2.5 allows us to remove
some other workarounds.

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@matws.net>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-04-11 16:44:46 +10:00