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

798 Commits

Author SHA1 Message Date
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
Andrew Bartlett
58e3c5323e build: Replace #!/usr/bin/env python with passed in PYTHON=
This means that if we were forced to use a specific python for the build, we
will put that binary into the top of samba-tool, so it continues to work
after the install.

Andrew Bartlett

Reviewed-by: Michael Adam <obnox@samba.org>
2013-04-10 00:13:45 +02:00
Alexander Bokovoy
6058bc9bb6 wafsamba: fix samba_abi for default catch-all case
Only filter out the symbol when positive match was not found and there is
negative match.

ABI signature file generator worked incorrectly for cases when mixture of
positive and negative matches were provided. This resulted in generating empty
signature file for libpdb since there was no catch-all positive match anymore.

Commit 9ba44cc610 removed explicit '*' positive
match and corresponding vscript generator adds '*' by default if global match
list is empty, so this commit introduces feature parity into signature
generator.

Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-09 20:29:18 +02:00
Stefan Metzmacher
81cc940c99 wafsamba: display the default value in help for SAMBA3_ADD_OPTION
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-04-03 09:53:08 +02:00
Andrew Bartlett
afe9343880 build: Do not pass CPP="" to pidl, skip the env variable entirely
This will cause pidl to use $CC -E instead.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25 10:25:36 +01:00
Andrew Bartlett
7dc6dfd90c build: Remove the forced use of only the first part of the compiler string
This corrects parts of 378295c3fe and
301d59caf2.  This is seen if CC="ccache
gcc" and CPP isn't used for some reason.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25 10:23:00 +01:00
Andrew Bartlett
80fce353e7 build: Change bin/default/python -> bin/python symlink to bin/default/python_modules
This avoids a collision with the new top level python directory.

Andrew Bartlett
2013-03-02 02:16:52 +01:00
Stefan Metzmacher
87f255821b wafsamba: add CHECK_VALUEOF() helper
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01 11:58:38 -08:00
Björn Baumbach
d61d2af372 wafsamba: use additional xml catalog file (bug #9512)
Add additional "/usr/local/share/xml/catalog" catalog file
platforms (used by freebsd).
Fix manual page build on freebsd.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-01-15 14:49:19 +01:00
Andrew Bartlett
9dfd0a0dc9 build: Remove bashism from SAMBAMANPAGES rule
In sh, you must assign the variable, then export it.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-10 18:46:22 +11:00
Jelmer Vernooij
e1a819ea18 wafsamba: python-config is not always a script. 2012-12-26 20:48:36 +01:00
Alexander Bokovoy
b6e2be8e14 wafsamba: replace try:except: case with explicit comment about FIPS mode
Since exceptions will be caught be outer try:except: pair anyway, mark
the test of MD5 code by the comment that explains why we need to really
test it.

Do it for both hashlib.md5 and md5 modules.

Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Sat Dec  8 18:41:07 CET 2012 on sn-devel-104
2012-12-08 18:41:07 +01:00
Alexander Bokovoy
56d9c8c4bf wafsamba: Make sure md5 is really work before using it or overriding the hash function
In FIPS mode importing md5 Python module will not cause any error but calling md5.md5()
function will throw ValueError since md5 is not available.

Make sure md5.md5() actually works and if not, fall back to use hash replacement that
we already have in wafsamba.

Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Sat Dec  8 13:30:07 CET 2012 on sn-devel-104
2012-12-08 13:30:07 +01:00
Andreas Schneider
2ad562057a BUG 9459: Install manpages only if we install the target.
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Dec  4 18:07:47 CET 2012 on sn-devel-104
2012-12-04 18:07:47 +01:00
Christian Ambach
3712de7b9c build(waf): support AIX 6.1
on AIX6.1, we need to define _ALL_SOURCE as well, otherwise
system headers with BSD types like u_int cannot be used
2012-11-09 19:15:24 +01:00
Jelmer Vernooij
ec3cbb6c47 wafsamba.abi: Fix abi_match with both excludes and includes.
This fixes a regression introduced by 9c3e294400
which caused internal symbols in libldb to be exposed.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
2012-11-06 08:27:44 +11:00
Jelmer Vernooij
d02c8ba122 wafsamba.samba_abi: Add basic unit tests.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
2012-11-06 08:27:44 +11:00
Andrew Bartlett
97102fa996 buildtools: Remove extra space from global: line
This makes it easier to put the expected values in a file
as we will not have trailing whitespace that is against git style.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2012-11-06 08:27:44 +11:00
Jelmer Vernooij
ea5ef95fbe wafsamba.samba_abi: Refactor abi_write_vscript to take file argument.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
2012-11-06 08:27:43 +11:00
Andrew Bartlett
06eee7f50b build: Remove support for IDL-generated files in git tree
This was added in a9ea3d6fa5 but is no
longer required, as we do not store IDL-generated files in GIT.

Andrew Bartlett
2012-10-28 19:39:00 +11:00
Andreas Schneider
8490c1a503 wafsamba: If we define a realname and a soname create a symlink.
This is needed that libnss_winbind.so.2 and libnss_wins.so.2 will get a
corresponding symlinks.
2012-10-22 09:04:21 +02:00
Stefan Metzmacher
1de9e71475 buildtools/wafsamba: only display 'ok' if the result is True
Otherwise we print the raw value.

metze

Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19 12:14:57 +02:00
Jelmer Vernooij
276460cf8a wafsamba: Ignore some more symbols when checking for dupes. 2012-10-11 15:21:31 +02:00
Andrew Bartlett
0f435a7adc build: Remove --disable-shared
This does not work, and has no known use cases.  Remove it so we do
not waste time trying to support it.

This also removes it for ldb/tdb/ntdb/talloc, but as these are first
shared libraries, and then tools on top of those, rpath or (for
emergency tools) --nonshared-binary= seems more appropriate.

Andrew Bartlett
2012-10-11 14:57:44 +11:00
Jelmer Vernooij
2a797f29aa s4-python: Various formatting fixes.
* Trailing whitespace
* use of "==" where "is" should be used
* double spaces
2012-09-27 18:45:12 +02:00
Ira Cooper
0231575709 waf: Make samba "ok" with directories for install being symlinks
stat -> lstat conversion.  This allows people for whom $PREFIX/var is a
symlink to complete make install.

Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Thu Sep 20 23:26:26 CEST 2012 on sn-devel-104
2012-09-20 23:26:26 +02:00
Alexander Bokovoy
73ed153310 docs-xml: convert smb.conf.5 build to waf
smb.conf(5) is different from other manpages because before it is
built, it gets merged together from a number of smaller files, one
per parameter. So we first create a parameters.all.xml file that
references all these files and then include it into master smb.conf.5.xml

One small issue is how to handle generated files in WAF build
from xi:include perspective as the files are generated in bin/default/docs-xml
rather than in docs-xml. We solve this by further expanding use of XML catalogs
and rewriting virtual path http://www.samba.org/samba/smbdotconf/ to proper
location.

Both docs-xml autoconf and waf builds work correctly now.

Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Mon Sep 17 14:18:31 CEST 2012 on sn-devel-104
2012-09-17 14:18:31 +02:00
Michael Adam
d28f36d16e build:dist: extend meaning of DIST_FILES to also recurse into directories
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-09-12 23:53:12 +02:00
Michael Adam
36b2732426 build:dist: make use of file / distfile more obvious in handling of DIST_FILES in "make dist"
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-09-12 23:53:09 +02:00
Michael Adam
8ea2a468c3 build:dist: extend samba_dist.DIST_FILES() to take optional parameter extend(=False)
This allows to do multpile DIST_FILES() calls that will extend the list
rather than only setting it initially.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-09-12 23:53:02 +02:00
Michael Adam
4989a9dd7c build:waf dist: factor out function to add list of files to the tarball
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-09-12 23:52:56 +02:00
Andreas Schneider
66a87d7cbe wafsamba: Add a SAMBAMANPAGES function. 2012-09-12 12:21:29 +02:00
Alexander Bokovoy
9c3e294400 wafsamba/samba_abi: allow negative matches in abi_match
abi_match keyword for samba libraries allows to selectively
apply ABI versions. samba_abi.py implied !sym to be used to
say 'all symbols but this one' but the actual demotion
of !sym to the local scope was not implemented.

Now abi_match='!sym' properly moves symbol to a local scope.
2012-09-07 12:31:42 +02:00
Alexander Bokovoy
c63dcc97b6 gen_abi.sh: filter out symbols not needed for ABI
gdb does not allow to print definitions of certain section names
and special symbols used for dynamic loading machinery:

__bss_start
_edata
_init
_fini
_end

Please note the space before the pattern, it is needed to avoid
hungry matches of valid symbols with these as substrings (foo_init,
for example).

Without this patch gdb on Fedora 18 breaks when attempting to print
function and struct signature.
2012-09-07 12:31:42 +02:00
Alexander Bokovoy
6b2e7aabb7 wafsamba/samba_abi: fix signature parsing for structures
Signature parsing for structure objects was broken. Existing regexp
was greedingly cutting off additional curly brackets that belonged to
the first and last structure member.
2012-09-07 12:31:42 +02:00
Andreas Schneider
f0da7c509c waf: Create catalog file for manpage generation. 2012-09-07 10:48:57 +02:00
Andreas Schneider
802708b410 wafsamba: Add a CONFIGURE_FILE option. 2012-09-07 10:48:57 +02:00
Andreas Schneider
18eb505b89 wafsamba: Add support for manpages in SAMBA_MODULE. 2012-09-07 10:48:57 +02:00
Andrew Bartlett
4d5471f1c6 build: Remove special case for the build farm
Except in the formatting of the selftest output, this removes the special case
of the build farm, so that an autobuild, a manual make test and the build farm
are more similar.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 21 06:39:04 CEST 2012 on sn-devel-104
2012-08-21 06:39:04 +02:00
Andrew Bartlett
7cd4eb0ca6 build: Remove accidentily added line in samba_version.py
This was incorrectly added in 0e441636af.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 21 03:11:16 CEST 2012 on sn-devel-104
2012-08-21 03:11:16 +02:00