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

856 Commits

Author SHA1 Message Date
Michael Adam
1f878b9986 Revert "buildtools: Rename perl vendorarch configure option."
This reverts commit 04685ff4ee.

We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state.
Everything special is now in buildtools/wafsamba/samba_perl.py.

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

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

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Sep  9 03:07:20 CEST 2014 on sn-devel-104
2014-09-09 03:07:20 +02:00
Michael Adam
0b91f7d806 Revert "buildtools: Add perl vendorlib configure option."
This reverts commit 48f0183dbe.

We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state.
Everything special is now in buildtools/wafsamba/samba_perl.py.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-09-09 00:39:07 +02:00
Michael Adam
42990ca3c8 Revert "wafsamba: If perl can't provide defaults, define them."
This reverts commit 0ba276ebad.

We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state.
Everything special is now in buildtools/wafsamba/samba_perl.py.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-09-09 00:39:07 +02:00
Michael Adam
c5dd2f18dd Revert "wafsamba: Fail with error message if perl doesn't provide valid dirs."
This reverts commit 2637890ef4.

We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state.
Everything special is now in buildtools/wafsamba/samba_perl.py.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-09-09 00:39:07 +02:00
Michael Adam
f73a0c2af9 wafsamba: add perl_fixup parameter to INSTALL_FILES
This fixes the search path for modules when installing
a perl "binary" by replacing a line 'use lib "$RealBin/lib";'
which works for the build directory with the appropriate
"use lib" line.

This is a step in allowing to install perl modules under the
prefix directory again.

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-09-05 19:47:06 +02:00
Michael Adam
75c3e240e0 wafsamba: add samba_perl.py with SAMBA_CHECK_PERL() higher level check.
This checks for the perl binary, sets PERL and PERL_SPECIFIED
as well es the PERL_ARCH_INSTALL_DIR and PERL_LIB_INSTALL_DIR.

We want to avoid installing the perl modules outside the prefix.
I.e. generally,the perl modules should be installed
under "$prefix/share/perl5".

This improves the fixes for bug #10472.

The new strategy for automatically setting the paths is this:

- if the prefix equals perl's vendorprefix, then
  - PERL_LIB_INSTALL_DIR is set to perl's vendorlib dir
  - PERL_ARCH_INSTALL_DIR is set to perl's vendorarch dir
- otherwise:
  - PERL_LIB_INSTALL_DIR is set to ${DATADIR}/perl5
    (usually ${PREFIX}/share/perl5)
  - PERL_ARCH_INSTALL_DIR is set to ${LIBDIR}/perl5
    (usually ${PREFIX}/lib/perl5)

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-09-05 19:47:06 +02:00
Stefan Metzmacher
a41a9ad074 wafsamba: let SAMBA_BLDOPTIONS() use dep_vars=['defines'] instead of always=True
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:06 +02:00
Stefan Metzmacher
7316653a82 wafsamba: fix dependencies on environment variables for python_fixup
We now checksum the sourcecode of copy_and_fix_python_path()
and the env variables used by this function.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:06 +02:00
Stefan Metzmacher
04bb8ff7e6 wafsamba: allow an optional dep_vars list to be passed to SAMBA_GENERATOR()
This can be used to checksum variables used in the rule function.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:06 +02:00
Stefan Metzmacher
da8c763545 wafsamba: fix dependency for SAMBA_GENERATOR() when passing vars!=None
vars can only be a dictionary as that's the only thing bld.EXPAND_VARIABLES()
accepts.

We need to checksum the whole vars dictionary into the dependencies.

We set task.env.SAMBA_GENERATOR_VARS = vars and add SAMBA_GENERATOR_VARS
to the dep_vars.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:05 +02:00
Stefan Metzmacher
ee8fbbd417 wafsamba: fix dependency calculation for SAMBA_GENERATOR()
We need to checksum the rule as string command of the
sourcecode of the python function.

This is stored in the 'ruledeps' envariable on the waf Task.
See exec_rule() in wafadmin/TaskGen.py.

    dep_vars = getattr(self, 'dep_vars', ['ruledeps'])
    if dep_vars:
        tsk.dep_vars = dep_vars
    if isinstance(self.rule, str):
        tsk.env.ruledeps = self.rule
    else:
        # only works if the function is in a global module such as a waf tool
        tsk.env.ruledeps = Utils.h_fun(self.rule)

If there's no 'dep_vars' it defaults to ['ruledeps'].
As we pass our own 'dep_vars' we need to explicitly add
'ruledeps'.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:05 +02:00
Michael Adam
210d7de34f wafsamba: improve wording in a comment
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-09-05 19:47:05 +02:00
Michael Adam
ca06fac2c8 wafsamba: remove unused variable from copy_and_fix_python_path
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-09-05 19:47:05 +02:00
Amitay Isaacs
4f105b27b7 wafsamba: Correctly locate the 'third_party' directory
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-08-21 09:11:06 +02:00
Jeremy Allison
a4fa65811d Don't build iniparser anymore.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-08-14 21:27:13 +02:00
Ira Cooper
38de110b02 third_party/popt: Initial support for popt.
ctdb, ldb, and samba are supported builds for third_party popt.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-09 18:26:17 +02:00
Ira Cooper
ba8ee8c9e0 third_party/zlib: Initial support for zlib
Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-09 18:26:16 +02:00
Ira Cooper
f46b79bdb8 third_party/iniparser: Initial support for iniparser.
This is the initial support for iniparser, as well the basic
third_party framework.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-09 18:26:16 +02:00
Volker Lendecke
b3d1d56b5e smbd/nmbd: Remove HAVE_LONGLONG
We always have 64-bit variables available by now

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-22 15:32:39 +02:00
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