Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
ldb
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Timo Aaltonen
ldb
Commits
29b51d14
Unverified
Commit
29b51d14
authored
Sep 19, 2015
by
Jelmer Vernooij
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Imported Upstream version 1.1.21
parent
6536dd06
Changes
163
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
163 changed files
with
4760 additions
and
759 deletions
+4760
-759
ABI/ldb-1.1.21.sigs
ABI/ldb-1.1.21.sigs
+263
-0
ABI/pyldb-util-1.1.21.sigs
ABI/pyldb-util-1.1.21.sigs
+2
-0
buildtools/bin/waf
buildtools/bin/waf
+1
-1
buildtools/examples/run_on_target.py
buildtools/examples/run_on_target.py
+148
-0
buildtools/update-waf.sh
buildtools/update-waf.sh
+0
-13
buildtools/wafsamba/samba3.py
buildtools/wafsamba/samba3.py
+1
-1
buildtools/wafsamba/samba_autoconf.py
buildtools/wafsamba/samba_autoconf.py
+23
-1
buildtools/wafsamba/samba_autoproto.py
buildtools/wafsamba/samba_autoproto.py
+1
-1
buildtools/wafsamba/samba_bundled.py
buildtools/wafsamba/samba_bundled.py
+1
-1
buildtools/wafsamba/samba_conftests.py
buildtools/wafsamba/samba_conftests.py
+0
-1
buildtools/wafsamba/samba_cross.py
buildtools/wafsamba/samba_cross.py
+56
-19
buildtools/wafsamba/samba_deps.py
buildtools/wafsamba/samba_deps.py
+2
-1
buildtools/wafsamba/samba_dist.py
buildtools/wafsamba/samba_dist.py
+0
-6
buildtools/wafsamba/samba_git.py
buildtools/wafsamba/samba_git.py
+57
-0
buildtools/wafsamba/samba_install.py
buildtools/wafsamba/samba_install.py
+84
-77
buildtools/wafsamba/samba_optimisation.py
buildtools/wafsamba/samba_optimisation.py
+0
-42
buildtools/wafsamba/samba_patterns.py
buildtools/wafsamba/samba_patterns.py
+3
-3
buildtools/wafsamba/samba_pidl.py
buildtools/wafsamba/samba_pidl.py
+2
-2
buildtools/wafsamba/samba_python.py
buildtools/wafsamba/samba_python.py
+84
-2
buildtools/wafsamba/samba_utils.py
buildtools/wafsamba/samba_utils.py
+18
-2
buildtools/wafsamba/samba_version.py
buildtools/wafsamba/samba_version.py
+5
-59
buildtools/wafsamba/test_duplicate_symbol.sh
buildtools/wafsamba/test_duplicate_symbol.sh
+1
-1
buildtools/wafsamba/wafsamba.py
buildtools/wafsamba/wafsamba.py
+11
-4
buildtools/wafsamba/wscript
buildtools/wafsamba/wscript
+15
-4
ldb_map/ldb_map_outbound.c
ldb_map/ldb_map_outbound.c
+1
-1
lib/replace/replace.c
lib/replace/replace.c
+14
-10
lib/replace/snprintf.c
lib/replace/snprintf.c
+4
-0
lib/replace/system/select.h
lib/replace/system/select.h
+4
-0
lib/replace/system/threads.h
lib/replace/system/threads.h
+3
-6
lib/replace/test/os2_delete.c
lib/replace/test/os2_delete.c
+2
-1
lib/replace/test/testsuite.c
lib/replace/test/testsuite.c
+17
-0
lib/replace/wscript
lib/replace/wscript
+15
-12
lib/talloc/ABI/pytalloc-util-2.1.2.sigs
lib/talloc/ABI/pytalloc-util-2.1.2.sigs
+6
-0
lib/talloc/ABI/pytalloc-util-2.1.3.sigs
lib/talloc/ABI/pytalloc-util-2.1.3.sigs
+6
-0
lib/talloc/ABI/talloc-2.1.2.sigs
lib/talloc/ABI/talloc-2.1.2.sigs
+64
-0
lib/talloc/ABI/talloc-2.1.3.sigs
lib/talloc/ABI/talloc-2.1.3.sigs
+64
-0
lib/talloc/doc/mainpage.dox
lib/talloc/doc/mainpage.dox
+2
-1
lib/talloc/doc/tutorial_introduction.dox
lib/talloc/doc/tutorial_introduction.dox
+3
-1
lib/talloc/doc/tutorial_threads.dox
lib/talloc/doc/tutorial_threads.dox
+203
-0
lib/talloc/man/talloc.3.xml
lib/talloc/man/talloc.3.xml
+5
-4
lib/talloc/pytalloc-util.pc.in
lib/talloc/pytalloc-util.pc.in
+1
-1
lib/talloc/pytalloc.c
lib/talloc/pytalloc.c
+80
-9
lib/talloc/pytalloc.h
lib/talloc/pytalloc.h
+2
-0
lib/talloc/pytalloc_guide.txt
lib/talloc/pytalloc_guide.txt
+10
-0
lib/talloc/pytalloc_util.c
lib/talloc/pytalloc_util.c
+4
-0
lib/talloc/talloc.c
lib/talloc/talloc.c
+15
-2
lib/talloc/talloc.i
lib/talloc/talloc.i
+0
-31
lib/talloc/talloc_guide.txt
lib/talloc/talloc_guide.txt
+3
-2
lib/talloc/test_pytalloc.c
lib/talloc/test_pytalloc.c
+159
-0
lib/talloc/test_pytalloc.py
lib/talloc/test_pytalloc.py
+117
-0
lib/talloc/testsuite.c
lib/talloc/testsuite.c
+235
-0
lib/talloc/wscript
lib/talloc/wscript
+40
-24
lib/tdb/ABI/tdb-1.3.5.sigs
lib/tdb/ABI/tdb-1.3.5.sigs
+69
-0
lib/tdb/ABI/tdb-1.3.6.sigs
lib/tdb/ABI/tdb-1.3.6.sigs
+69
-0
lib/tdb/ABI/tdb-1.3.7.sigs
lib/tdb/ABI/tdb-1.3.7.sigs
+69
-0
lib/tdb/_tdb_text.py
lib/tdb/_tdb_text.py
+138
-0
lib/tdb/common/lock.c
lib/tdb/common/lock.c
+7
-0
lib/tdb/common/mutex.c
lib/tdb/common/mutex.c
+31
-4
lib/tdb/common/traverse.c
lib/tdb/common/traverse.c
+13
-1
lib/tdb/include/tdb.h
lib/tdb/include/tdb.h
+1
-0
lib/tdb/man/tdbbackup.8.xml
lib/tdb/man/tdbbackup.8.xml
+1
-5
lib/tdb/man/tdbdump.8.xml
lib/tdb/man/tdbdump.8.xml
+1
-0
lib/tdb/man/tdbrestore.8.xml
lib/tdb/man/tdbrestore.8.xml
+1
-0
lib/tdb/man/tdbtool.8.xml
lib/tdb/man/tdbtool.8.xml
+1
-0
lib/tdb/pytdb.c
lib/tdb/pytdb.c
+163
-71
lib/tdb/python/tests/simple.py
lib/tdb/python/tests/simple.py
+184
-56
lib/tdb/test/run-allrecord-traverse-deadlock.c
lib/tdb/test/run-allrecord-traverse-deadlock.c
+203
-0
lib/tdb/test/run-incompatible.c
lib/tdb/test/run-incompatible.c
+5
-3
lib/tdb/test/run-open-during-transaction.c
lib/tdb/test/run-open-during-transaction.c
+1
-0
lib/tdb/tools/tdbrestore.c
lib/tdb/tools/tdbrestore.c
+1
-1
lib/tdb/wscript
lib/tdb/wscript
+33
-21
lib/tevent/ABI/tevent-0.9.23.sigs
lib/tevent/ABI/tevent-0.9.23.sigs
+88
-0
lib/tevent/ABI/tevent-0.9.24.sigs
lib/tevent/ABI/tevent-0.9.24.sigs
+88
-0
lib/tevent/ABI/tevent-0.9.25.sigs
lib/tevent/ABI/tevent-0.9.25.sigs
+88
-0
lib/tevent/bindings.py
lib/tevent/bindings.py
+51
-1
lib/tevent/pytevent.c
lib/tevent/pytevent.c
+248
-93
lib/tevent/testsuite.c
lib/tevent/testsuite.c
+5
-3
lib/tevent/tevent.c
lib/tevent/tevent.c
+4
-1
lib/tevent/tevent.h
lib/tevent/tevent.h
+7
-2
lib/tevent/tevent_internal.h
lib/tevent/tevent_internal.h
+3
-0
lib/tevent/tevent_port.c
lib/tevent/tevent_port.c
+786
-0
lib/tevent/tevent_signal.c
lib/tevent/tevent_signal.c
+1
-1
lib/tevent/wscript
lib/tevent/wscript
+19
-10
pyldb.c
pyldb.c
+55
-25
tests/python/api.py
tests/python/api.py
+42
-0
tests/sample_module.c
tests/sample_module.c
+64
-13
third_party/waf/wafadmin/3rdparty/ParallelDebug.py
third_party/waf/wafadmin/3rdparty/ParallelDebug.py
+0
-2
third_party/waf/wafadmin/3rdparty/batched_cc.py
third_party/waf/wafadmin/3rdparty/batched_cc.py
+0
-1
third_party/waf/wafadmin/3rdparty/boost.py
third_party/waf/wafadmin/3rdparty/boost.py
+0
-1
third_party/waf/wafadmin/3rdparty/build_file_tracker.py
third_party/waf/wafadmin/3rdparty/build_file_tracker.py
+53
-0
third_party/waf/wafadmin/3rdparty/fluid.py
third_party/waf/wafadmin/3rdparty/fluid.py
+0
-1
third_party/waf/wafadmin/3rdparty/gccdeps.py
third_party/waf/wafadmin/3rdparty/gccdeps.py
+0
-1
third_party/waf/wafadmin/3rdparty/go.py
third_party/waf/wafadmin/3rdparty/go.py
+0
-1
third_party/waf/wafadmin/3rdparty/lru_cache.py
third_party/waf/wafadmin/3rdparty/lru_cache.py
+0
-1
third_party/waf/wafadmin/3rdparty/paranoid.py
third_party/waf/wafadmin/3rdparty/paranoid.py
+0
-1
third_party/waf/wafadmin/3rdparty/prefork.py
third_party/waf/wafadmin/3rdparty/prefork.py
+275
-0
third_party/waf/wafadmin/3rdparty/swig.py
third_party/waf/wafadmin/3rdparty/swig.py
+0
-1
third_party/waf/wafadmin/3rdparty/valadoc.py
third_party/waf/wafadmin/3rdparty/valadoc.py
+0
-1
third_party/waf/wafadmin/Build.py
third_party/waf/wafadmin/Build.py
+0
-1
third_party/waf/wafadmin/Configure.py
third_party/waf/wafadmin/Configure.py
+0
-2
third_party/waf/wafadmin/Constants.py
third_party/waf/wafadmin/Constants.py
+0
-1
third_party/waf/wafadmin/Environment.py
third_party/waf/wafadmin/Environment.py
+0
-1
third_party/waf/wafadmin/Logs.py
third_party/waf/wafadmin/Logs.py
+0
-1
third_party/waf/wafadmin/Node.py
third_party/waf/wafadmin/Node.py
+1
-2
third_party/waf/wafadmin/Options.py
third_party/waf/wafadmin/Options.py
+0
-1
third_party/waf/wafadmin/Runner.py
third_party/waf/wafadmin/Runner.py
+0
-1
third_party/waf/wafadmin/Scripting.py
third_party/waf/wafadmin/Scripting.py
+0
-1
third_party/waf/wafadmin/Task.py
third_party/waf/wafadmin/Task.py
+0
-1
third_party/waf/wafadmin/TaskGen.py
third_party/waf/wafadmin/TaskGen.py
+3
-4
third_party/waf/wafadmin/Tools/__init__.py
third_party/waf/wafadmin/Tools/__init__.py
+0
-1
third_party/waf/wafadmin/Tools/ar.py
third_party/waf/wafadmin/Tools/ar.py
+0
-2
third_party/waf/wafadmin/Tools/bison.py
third_party/waf/wafadmin/Tools/bison.py
+0
-1
third_party/waf/wafadmin/Tools/cc.py
third_party/waf/wafadmin/Tools/cc.py
+0
-1
third_party/waf/wafadmin/Tools/ccroot.py
third_party/waf/wafadmin/Tools/ccroot.py
+3
-2
third_party/waf/wafadmin/Tools/compiler_cc.py
third_party/waf/wafadmin/Tools/compiler_cc.py
+0
-1
third_party/waf/wafadmin/Tools/compiler_cxx.py
third_party/waf/wafadmin/Tools/compiler_cxx.py
+0
-1
third_party/waf/wafadmin/Tools/compiler_d.py
third_party/waf/wafadmin/Tools/compiler_d.py
+0
-1
third_party/waf/wafadmin/Tools/config_c.py
third_party/waf/wafadmin/Tools/config_c.py
+0
-1
third_party/waf/wafadmin/Tools/cs.py
third_party/waf/wafadmin/Tools/cs.py
+0
-1
third_party/waf/wafadmin/Tools/cxx.py
third_party/waf/wafadmin/Tools/cxx.py
+0
-1
third_party/waf/wafadmin/Tools/d.py
third_party/waf/wafadmin/Tools/d.py
+0
-1
third_party/waf/wafadmin/Tools/dbus.py
third_party/waf/wafadmin/Tools/dbus.py
+0
-1
third_party/waf/wafadmin/Tools/dmd.py
third_party/waf/wafadmin/Tools/dmd.py
+0
-1
third_party/waf/wafadmin/Tools/flex.py
third_party/waf/wafadmin/Tools/flex.py
+0
-1
third_party/waf/wafadmin/Tools/gas.py
third_party/waf/wafadmin/Tools/gas.py
+0
-1
third_party/waf/wafadmin/Tools/gcc.py
third_party/waf/wafadmin/Tools/gcc.py
+0
-1
third_party/waf/wafadmin/Tools/gdc.py
third_party/waf/wafadmin/Tools/gdc.py
+0
-1
third_party/waf/wafadmin/Tools/glib2.py
third_party/waf/wafadmin/Tools/glib2.py
+0
-1
third_party/waf/wafadmin/Tools/gnome.py
third_party/waf/wafadmin/Tools/gnome.py
+0
-1
third_party/waf/wafadmin/Tools/gnu_dirs.py
third_party/waf/wafadmin/Tools/gnu_dirs.py
+0
-1
third_party/waf/wafadmin/Tools/gob2.py
third_party/waf/wafadmin/Tools/gob2.py
+0
-1
third_party/waf/wafadmin/Tools/gxx.py
third_party/waf/wafadmin/Tools/gxx.py
+1
-2
third_party/waf/wafadmin/Tools/icc.py
third_party/waf/wafadmin/Tools/icc.py
+0
-0
third_party/waf/wafadmin/Tools/icpc.py
third_party/waf/wafadmin/Tools/icpc.py
+0
-0
third_party/waf/wafadmin/Tools/intltool.py
third_party/waf/wafadmin/Tools/intltool.py
+0
-1
third_party/waf/wafadmin/Tools/javaw.py
third_party/waf/wafadmin/Tools/javaw.py
+0
-1
third_party/waf/wafadmin/Tools/kde4.py
third_party/waf/wafadmin/Tools/kde4.py
+0
-1
third_party/waf/wafadmin/Tools/libtool.py
third_party/waf/wafadmin/Tools/libtool.py
+0
-1
third_party/waf/wafadmin/Tools/lua.py
third_party/waf/wafadmin/Tools/lua.py
+0
-1
third_party/waf/wafadmin/Tools/misc.py
third_party/waf/wafadmin/Tools/misc.py
+0
-1
third_party/waf/wafadmin/Tools/msvc.py
third_party/waf/wafadmin/Tools/msvc.py
+3
-4
third_party/waf/wafadmin/Tools/nasm.py
third_party/waf/wafadmin/Tools/nasm.py
+1
-2
third_party/waf/wafadmin/Tools/ocaml.py
third_party/waf/wafadmin/Tools/ocaml.py
+0
-1
third_party/waf/wafadmin/Tools/osx.py
third_party/waf/wafadmin/Tools/osx.py
+0
-1
third_party/waf/wafadmin/Tools/perl.py
third_party/waf/wafadmin/Tools/perl.py
+0
-1
third_party/waf/wafadmin/Tools/preproc.py
third_party/waf/wafadmin/Tools/preproc.py
+0
-2
third_party/waf/wafadmin/Tools/python.py
third_party/waf/wafadmin/Tools/python.py
+9
-6
third_party/waf/wafadmin/Tools/qt4.py
third_party/waf/wafadmin/Tools/qt4.py
+0
-1
third_party/waf/wafadmin/Tools/ruby.py
third_party/waf/wafadmin/Tools/ruby.py
+0
-1
third_party/waf/wafadmin/Tools/suncc.py
third_party/waf/wafadmin/Tools/suncc.py
+0
-0
third_party/waf/wafadmin/Tools/suncxx.py
third_party/waf/wafadmin/Tools/suncxx.py
+0
-0
third_party/waf/wafadmin/Tools/tex.py
third_party/waf/wafadmin/Tools/tex.py
+1
-2
third_party/waf/wafadmin/Tools/unittestw.py
third_party/waf/wafadmin/Tools/unittestw.py
+0
-2
third_party/waf/wafadmin/Tools/vala.py
third_party/waf/wafadmin/Tools/vala.py
+0
-1
third_party/waf/wafadmin/Tools/winres.py
third_party/waf/wafadmin/Tools/winres.py
+0
-1
third_party/waf/wafadmin/Tools/xlc.py
third_party/waf/wafadmin/Tools/xlc.py
+0
-0
third_party/waf/wafadmin/Tools/xlcxx.py
third_party/waf/wafadmin/Tools/xlcxx.py
+0
-0
third_party/waf/wafadmin/Utils.py
third_party/waf/wafadmin/Utils.py
+6
-7
third_party/waf/wafadmin/__init__.py
third_party/waf/wafadmin/__init__.py
+0
-0
third_party/waf/wafadmin/ansiterm.py
third_party/waf/wafadmin/ansiterm.py
+0
-1
third_party/waf/wafadmin/pproc.py
third_party/waf/wafadmin/pproc.py
+0
-1
third_party/waf/wafadmin/py3kfixes.py
third_party/waf/wafadmin/py3kfixes.py
+0
-1
wscript
wscript
+7
-8
No files found.
ABI/ldb-1.1.21.sigs
0 → 100644
View file @
29b51d14
This diff is collapsed.
Click to expand it.
ABI/pyldb-util-1.1.21.sigs
0 → 100644
View file @
29b51d14
pyldb_Dn_FromDn: PyObject *(struct ldb_dn *)
pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **)
buildtools/bin/waf
View file @
29b51d14
...
...
@@ -63,7 +63,7 @@ def test(dir):
except
OSError
:
pass
def
find_lib
():
return
os
.
path
.
abspath
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
)
))
return
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'../../third_party/waf'
))
wafdir
=
find_lib
()
w
=
join
(
wafdir
,
'wafadmin'
)
...
...
buildtools/examples/run_on_target.py
0 → 100755
View file @
29b51d14
#!/usr/bin/env python
#
# Sample run-on-target script
# This is a script that can be used as cross-execute parameter to samba
# configuration process, running the command on a remote target for which
# the cross-compiled configure test was compiled.
#
# To use:
# ./configure \
# --cross-compile \
# '--cross-execute=./buildtools/example/run_on_target.py --host=<host>'
#
# A more elaborate example:
# ./configure \
# --cross-compile \
# '--cross-execute=./buildtools/example/run_on_target.py --host=<host> --user=<user> "--ssh=ssh -i <some key file>" --destdir=/path/to/dir'
#
# Typically this is to be used also with --cross-answers, so that the
# cross answers file gets built and further builds can be made without
# the help of a remote target.
#
# The following assumptions are made:
# 1. rsync is available on build machine and target machine
# 2. A running ssh service on target machine with password-less shell login
# 3. A directory writable by the password-less login user
# 4. The tests on the target can run and provide reliable results
# from the login account's home directory. This is significant
# for example in locking tests which
# create files in the current directory. As a workaround to this
# assumption, the TESTDIR environment variable can be set on the target
# (using ssh command line or server config) and the tests shall
# chdir to that directory.
#
import
sys
import
os
import
subprocess
from
optparse
import
OptionParser
# those are defaults, but can be overidden using command line
SSH
=
'ssh'
USER
=
None
HOST
=
'localhost'
def
xfer_files
(
ssh
,
srcdir
,
host
,
user
,
targ_destdir
):
"""Transfer executable files to target
Use rsync to copy the directory containing program to run
INTO a destination directory on the target. An exact copy
of the source directory is created on the target machine,
possibly deleting files on the target machine which do not
exist on the source directory.
The idea is that the test may include files in addition to
the compiled binary, and all of those files reside alongside
the binary in a source directory.
For example, if the test to run is /foo/bar/test and the
destination directory on the target is /tbaz, then /tbaz/bar
on the target shall be an exact copy of /foo/bar on the source,
including deletion of files inside /tbaz/bar which do not exist
on the source.
"""
userhost
=
host
if
user
:
userhost
=
'
%
s@
%
s'
%
(
user
,
host
)
cmd
=
'rsync --verbose -rl --ignore-times --delete -e "
%
s"
%
s
%
s:
%
s/'
%
\
(
ssh
,
srcdir
,
userhost
,
targ_destdir
)
p
=
subprocess
.
Popen
(
cmd
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
(
out
,
err
)
=
p
.
communicate
()
if
p
.
returncode
!=
0
:
raise
Exception
(
'failed syncing files
\n
stdout:
\n
%
s
\n
stderr:
%
s
\n
'
%
(
out
,
err
))
def
exec_remote
(
ssh
,
host
,
user
,
destdir
,
targdir
,
prog
,
args
):
"""Run a test on the target
Using password-less ssh, run the compiled binary on the target.
An assumption is that there's no need to cd into the target dir,
same as there's no need to do it on a native build.
"""
userhost
=
host
if
user
:
userhost
=
'
%
s@
%
s'
%
(
user
,
host
)
cmd
=
'
%
s
%
s
%
s/
%
s/
%
s'
%
(
ssh
,
userhost
,
destdir
,
targdir
,
prog
)
if
args
:
cmd
=
cmd
+
' '
+
' '
.
join
(
args
)
p
=
subprocess
.
Popen
(
cmd
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
(
out
,
err
)
=
p
.
communicate
()
return
(
p
.
returncode
,
out
)
def
main
(
argv
):
usage
=
"usage:
%
prog [options] <prog> [args]"
parser
=
OptionParser
(
usage
)
parser
.
add_option
(
'--ssh'
,
help
=
"SSH client and additional flags"
,
default
=
SSH
)
parser
.
add_option
(
'--host'
,
help
=
"target host name or IP address"
,
default
=
HOST
)
parser
.
add_option
(
'--user'
,
help
=
"login user on target"
,
default
=
USER
)
parser
.
add_option
(
'--destdir'
,
help
=
"work directory on target"
,
default
=
'~'
)
(
options
,
args
)
=
parser
.
parse_args
(
argv
)
if
len
(
args
)
<
1
:
parser
.
error
(
"please supply test program to run"
)
progpath
=
args
[
0
]
# assume that a test that was not compiled fails (e.g. getconf)
if
progpath
[
0
]
!=
'/'
:
return
(
1
,
""
)
progdir
=
os
.
path
.
dirname
(
progpath
)
prog
=
os
.
path
.
basename
(
progpath
)
targ_progdir
=
os
.
path
.
basename
(
progdir
)
xfer_files
(
options
.
ssh
,
progdir
,
options
.
host
,
options
.
user
,
options
.
destdir
)
(
rc
,
out
)
=
exec_remote
(
options
.
ssh
,
options
.
host
,
options
.
user
,
options
.
destdir
,
targ_progdir
,
prog
,
args
[
1
:])
return
(
rc
,
out
)
if
__name__
==
'__main__'
:
(
rc
,
out
)
=
main
(
sys
.
argv
[
1
:])
sys
.
stdout
.
write
(
out
)
sys
.
exit
(
rc
)
buildtools/update-waf.sh
deleted
100755 → 0
View file @
6536dd06
#!/bin/sh
# Update our copy of waf
TARGETDIR
=
"
`
dirname
$0
`
"
WORKDIR
=
"
`
mktemp
-d
-t
update-waf-XXXXXX
`
"
mkdir
-p
"
$WORKDIR
"
git clone https://code.google.com/p/waf.waf15/
"
$WORKDIR
"
rsync
-C
-avz
--delete
"
$WORKDIR
/wafadmin/"
"
$TARGETDIR
/wafadmin/"
rm
-rf
"
$WORKDIR
"
buildtools/wafsamba/samba3.py
View file @
29b51d14
...
...
@@ -62,7 +62,7 @@ def s3_fix_kwargs(bld, kwargs):
s3reldir
=
os_path_relpath
(
s3dir
,
bld
.
curdir
)
# the extra_includes list is relative to the source3 directory
extra_includes
=
[
'.'
,
'include'
,
'lib'
,
'../lib/tdb_compat'
]
extra_includes
=
[
'.'
,
'include'
,
'lib'
]
# local heimdal paths only included when USING_SYSTEM_KRB5 is not set
if
not
bld
.
CONFIG_SET
(
"USING_SYSTEM_KRB5"
):
extra_includes
+=
[
'../source4/heimdal/lib/com_err'
,
...
...
buildtools/wafsamba/samba_autoconf.py
View file @
29b51d14
...
...
@@ -229,7 +229,18 @@ def CHECK_DECLS(conf, vars, reverse=False, headers=None, always=False):
headers
=
headers
,
msg
=
'Checking for declaration of
%
s'
%
v
,
always
=
always
):
ret
=
False
if
not
CHECK_CODE
(
conf
,
'''
return (int)
%
s;
'''
%
(
v
),
execute
=
False
,
link
=
False
,
msg
=
'Checking for declaration of
%
s (as enum)'
%
v
,
local_include
=
False
,
headers
=
headers
,
define
=
define
,
always
=
always
):
ret
=
False
return
ret
...
...
@@ -677,6 +688,8 @@ def SAMBA_CONFIG_H(conf, path=None):
testflags
=
True
)
conf
.
ADD_CFLAGS
(
'-Werror=return-type -Wreturn-type'
,
testflags
=
True
)
conf
.
ADD_CFLAGS
(
'-Werror=uninitialized -Wuninitialized'
,
testflags
=
True
)
conf
.
ADD_CFLAGS
(
'-Wformat=2 -Wno-format-y2k'
,
testflags
=
True
)
# This check is because for ldb_search(), a NULL format string
...
...
@@ -703,6 +716,11 @@ int main(void) {
if
Options
.
options
.
pedantic
:
conf
.
ADD_CFLAGS
(
'-W'
,
testflags
=
True
)
if
Options
.
options
.
address_sanitizer
:
conf
.
ADD_CFLAGS
(
'-fno-omit-frame-pointer -O1 -fsanitize=address'
,
testflags
=
True
)
conf
.
ADD_LDFLAGS
(
'-fsanitize=address'
,
testflags
=
True
)
conf
.
env
[
'ADDRESS_SANITIZER'
]
=
True
# Let people pass an additional ADDITIONAL_{CFLAGS,LDFLAGS}
# environment variables which are only used the for final build.
...
...
@@ -839,3 +857,7 @@ def SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS(conf):
if
not
sys
.
platform
.
startswith
(
"openbsd"
)
and
conf
.
env
.
undefined_ignore_ldflags
==
[]:
if
conf
.
CHECK_LDFLAGS
([
'-undefined'
,
'dynamic_lookup'
]):
conf
.
env
.
undefined_ignore_ldflags
=
[
'-undefined'
,
'dynamic_lookup'
]
@
conf
def
CHECK_CFG
(
self
,
*
k
,
**
kw
):
return
self
.
check_cfg
(
*
k
,
**
kw
)
buildtools/wafsamba/samba_autoproto.py
View file @
29b51d14
...
...
@@ -13,7 +13,7 @@ def SAMBA_AUTOPROTO(bld, header, source):
name
=
name
,
source
=
source
,
target
=
header
,
on_resul
ts
=
True
,
update_outpu
ts
=
True
,
ext_out
=
'.c'
,
before
=
'cc'
,
rule
=
'${PERL} "${SCRIPT}/mkproto.pl" --srcdir=.. --builddir=. --public=/dev/null --private="${TGT}" ${SRC}'
...
...
buildtools/wafsamba/samba_bundled.py
View file @
29b51d14
...
...
@@ -190,7 +190,7 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
pkg
=
libname
# try pkgconfig first
if
(
conf
.
check_cfg
(
package
=
pkg
,
if
(
conf
.
CHECK_CFG
(
package
=
pkg
,
args
=
'"
%
s >=
%
s" --cflags --libs'
%
(
pkg
,
minversion
),
msg
=
msg
,
uselib_store
=
uselib_store
)
and
check_functions_headers_code
()):
...
...
buildtools/wafsamba/samba_conftests.py
View file @
29b51d14
...
...
@@ -565,7 +565,6 @@ def samba_config_c_parse_flags(line1, uselib, env):
# bugs in the real parse_flags() function.
#
if
x
==
'-Wl,-rpath'
or
x
==
'-Wl,-R'
:
linkflags
.
remove
(
x
)
x
=
lst1
.
pop
(
0
)
if
x
.
startswith
(
'-Wl,'
):
rpath
=
x
[
4
:]
...
...
buildtools/wafsamba/samba_cross.py
View file @
29b51d14
...
...
@@ -2,11 +2,12 @@
import
Utils
,
Logs
,
sys
,
os
,
Options
,
re
from
Configure
import
conf
import
shlex
real_Popen
=
None
ANSWER_UNKNOWN
=
(
254
,
""
)
ANSWER_
FAIL
=
(
255
,
""
)
ANSWER_
NO
=
(
1
,
""
)
ANSWER_OK
=
(
0
,
""
)
cross_answers_incomplete
=
False
...
...
@@ -19,15 +20,27 @@ def add_answer(ca_file, msg, answer):
except
:
Logs
.
error
(
"Unable to open cross-answers file
%
s"
%
ca_file
)
sys
.
exit
(
1
)
(
retcode
,
retstring
)
=
answer
# if retstring is more than one line then we probably
# don't care about its actual content (the tests should
# yield one-line output in order to comply with the cross-answer
# format)
retstring
=
retstring
.
strip
()
if
len
(
retstring
.
split
(
'
\n
'
))
>
1
:
retstring
=
''
answer
=
(
retcode
,
retstring
)
if
answer
==
ANSWER_OK
:
f
.
write
(
'
%
s: OK
\n
'
%
msg
)
elif
answer
==
ANSWER_UNKNOWN
:
f
.
write
(
'
%
s: UNKNOWN
\n
'
%
msg
)
elif
answer
==
ANSWER_
FAIL
:
f
.
write
(
'
%
s:
FAIL
\n
'
%
msg
)
elif
answer
==
ANSWER_
NO
:
f
.
write
(
'
%
s:
NO
\n
'
%
msg
)
else
:
(
retcode
,
retstring
)
=
answer
f
.
write
(
'
%
s: (
%
d, "
%
s")'
%
(
msg
,
retcode
,
retstring
))
if
retcode
==
0
:
f
.
write
(
'
%
s: "
%
s"
\n
'
%
(
msg
,
retstring
))
else
:
f
.
write
(
'
%
s: (
%
d, "
%
s")
\n
'
%
(
msg
,
retcode
,
retstring
))
f
.
close
()
...
...
@@ -36,14 +49,13 @@ def cross_answer(ca_file, msg):
try
:
f
=
open
(
ca_file
,
'r'
)
except
:
add_answer
(
ca_file
,
msg
,
ANSWER_UNKNOWN
)
return
ANSWER_UNKNOWN
for
line
in
f
:
line
=
line
.
strip
()
if
line
==
''
or
line
[
0
]
==
'#'
:
continue
if
line
.
find
(
':'
)
!=
-
1
:
a
=
line
.
split
(
':'
)
a
=
line
.
split
(
':'
,
1
)
thismsg
=
a
[
0
]
.
strip
()
if
thismsg
!=
msg
:
continue
...
...
@@ -56,10 +68,12 @@ def cross_answer(ca_file, msg):
return
ANSWER_UNKNOWN
elif
ans
==
"FAIL"
or
ans
==
"NO"
:
f
.
close
()
return
ANSWER_
FAIL
return
ANSWER_
NO
elif
ans
[
0
]
==
'"'
:
f
.
close
()
return
(
0
,
ans
.
strip
(
'"'
))
elif
ans
[
0
]
==
"'"
:
f
.
close
()
return
(
0
,
ans
.
strip
(
"'"
))
else
:
m
=
re
.
match
(
'
\
(
\
s*(-?
\
d+)
\
s*,
\
s*
\"
(.*)
\"
\
s*
\
)'
,
ans
)
...
...
@@ -69,7 +83,6 @@ def cross_answer(ca_file, msg):
else
:
raise
Utils
.
WafError
(
"Bad answer format '
%
s' in
%
s"
%
(
line
,
ca_file
))
f
.
close
()
add_answer
(
ca_file
,
msg
,
ANSWER_UNKNOWN
)
return
ANSWER_UNKNOWN
...
...
@@ -77,24 +90,47 @@ class cross_Popen(Utils.pproc.Popen):
'''cross-compilation wrapper for Popen'''
def
__init__
(
*
k
,
**
kw
):
(
obj
,
args
)
=
k
if
'--cross-execute'
in
args
:
# when --cross-execute is set, then change the arguments
# to use the cross emulator
i
=
args
.
index
(
'--cross-execute'
)
newargs
=
args
[
i
+
1
]
.
split
()
newargs
.
extend
(
args
[
0
:
i
])
args
=
newargs
elif
'--cross-answers'
in
args
:
use_answers
=
False
ans
=
ANSWER_UNKNOWN
# Three possibilities:
# 1. Only cross-answers - try the cross-answers file, and if
# there's no corresponding answer, add to the file and mark
# the configure process as unfinished.
# 2. Only cross-execute - get the answer from cross-execute
# 3. Both - try the cross-answers file, and if there is no
# corresponding answer - use cross-execute to get an answer,
# and add that answer to the file.
if
'--cross-answers'
in
args
:
# when --cross-answers is set, then change the arguments
# to use the cross answers if available
use_answers
=
True
i
=
args
.
index
(
'--cross-answers'
)
ca_file
=
args
[
i
+
1
]
msg
=
args
[
i
+
2
]
ans
=
cross_answer
(
ca_file
,
msg
)
if
'--cross-execute'
in
args
and
ans
==
ANSWER_UNKNOWN
:
# when --cross-execute is set, then change the arguments
# to use the cross emulator
i
=
args
.
index
(
'--cross-execute'
)
newargs
=
shlex
.
split
(
args
[
i
+
1
])
newargs
.
extend
(
args
[
0
:
i
])
if
use_answers
:
p
=
real_Popen
(
newargs
,
stdout
=
Utils
.
pproc
.
PIPE
,
stderr
=
Utils
.
pproc
.
PIPE
)
ce_out
,
ce_err
=
p
.
communicate
()
ans
=
(
p
.
returncode
,
ce_out
)
add_answer
(
ca_file
,
msg
,
ans
)
else
:
args
=
newargs
if
use_answers
:
if
ans
==
ANSWER_UNKNOWN
:
global
cross_answers_incomplete
cross_answers_incomplete
=
True
add_answer
(
ca_file
,
msg
,
ans
)
(
retcode
,
retstring
)
=
ans
args
=
[
'/bin/sh'
,
'-c'
,
"echo -n '
%
s'; exit
%
d"
%
(
retstring
,
retcode
)]
real_Popen
.
__init__
(
*
(
obj
,
args
),
**
kw
)
...
...
@@ -115,7 +151,8 @@ def SAMBA_CROSS_ARGS(conf, msg=None):
if
conf
.
env
.
CROSS_EXECUTE
:
ret
.
extend
([
'--cross-execute'
,
conf
.
env
.
CROSS_EXECUTE
])
elif
conf
.
env
.
CROSS_ANSWERS
:
if
conf
.
env
.
CROSS_ANSWERS
:
if
msg
is
None
:
raise
Utils
.
WafError
(
"Cannot have NULL msg in cross-answers"
)
ret
.
extend
([
'--cross-answers'
,
os
.
path
.
join
(
Options
.
launch_dir
,
conf
.
env
.
CROSS_ANSWERS
),
msg
])
...
...
buildtools/wafsamba/samba_deps.py
View file @
29b51d14
...
...
@@ -964,7 +964,8 @@ savedeps_version = 3
savedeps_inputs
=
[
'samba_deps'
,
'samba_includes'
,
'local_include'
,
'local_include_first'
,
'samba_cflags'
,
'source'
,
'grouping_library'
,
'samba_ldflags'
,
'allow_undefined_symbols'
,
'use_global_deps'
,
'global_include'
]
savedeps_outputs
=
[
'uselib'
,
'uselib_local'
,
'add_objects'
,
'includes'
,
'ccflags'
,
'ldflags'
,
'samba_deps_extended'
]
savedeps_outputs
=
[
'uselib'
,
'uselib_local'
,
'add_objects'
,
'includes'
,
'ccflags'
,
'ldflags'
,
'samba_deps_extended'
,
'final_libs'
]
savedeps_outenv
=
[
'INC_PATHS'
]
savedeps_envvars
=
[
'NONSHARED_BINARIES'
,
'GLOBAL_DEPENDENCIES'
,
'EXTRA_CFLAGS'
,
'EXTRA_LDFLAGS'
,
'EXTRA_INCLUDES'
]
savedeps_caches
=
[
'GLOBAL_DEPENDENCIES'
,
'TARGET_TYPE'
,
'INIT_FUNCTIONS'
,
'SYSLIB_DEPS'
]
...
...
buildtools/wafsamba/samba_dist.py
View file @
29b51d14
...
...
@@ -86,12 +86,6 @@ def vcs_dir_contents(path):
env
=
dict
(
os
.
environ
)
env
[
"GIT_DIR"
]
=
os
.
path
.
join
(
repo
,
".git"
)
break
elif
os
.
path
.
isdir
(
os
.
path
.
join
(
repo
,
".bzr"
)):
ls_files_cmd
=
[
'bzr'
,
'ls'
,
'--recursive'
,
'--versioned'
,
os_path_relpath
(
path
,
repo
)]
cwd
=
repo
env
=
None
break
repo
=
os
.
path
.
dirname
(
repo
)
if
repo
==
"/"
:
raise
Exception
(
"unsupported or no vcs for
%
s"
%
path
)
...
...
buildtools/wafsamba/samba_git.py
0 → 100644
View file @
29b51d14
import
os
import
subprocess
def
find_git
(
env
=
None
):
"""Find the git binary."""
if
env
is
not
None
and
'GIT'
in
env
:
return
env
[
'GIT'
]
# Get version from GIT
if
os
.
path
.
exists
(
"/usr/bin/git"
):
# this is useful when doing make dist without configuring
return
"/usr/bin/git"
return
None
def
has_submodules
(
path
):
"""Check whether a source directory is git-versioned and has submodules.
:param path: Path to Samba source directory
"""
return
(
os
.
path
.
isdir
(
os
.
path
.
join
(
path
,
".git"
))
and
os
.
path
.
isfile
(
os
.
path
.
join
(
path
,
".gitmodules"
)))
def
read_submodule_status
(
path
,
env
=
None
):
"""Check status of submodules.
:param path: Path to git directory
:param env: Optional waf environment
:return: Yields tuples with submodule relpath and status
(one of: 'out-of-date', 'not-checked-out', 'up-to-date')
:raise RuntimeError: raised when parsing of 'git submodule status' output
fails.
"""
if
not
has_submodules
(
path
):
# No point in running git.
return
git
=
find_git
(
env
)
if
git
is
None
:
return
p
=
subprocess
.
Popen
([
git
,
"submodule"
,
"status"
],
stdout
=
subprocess
.
PIPE
,
cwd
=
path
)
(
stdout
,
stderr
)
=
p
.
communicate
(
None
)
for
l
in
stdout
.
splitlines
():
l
=
l
.
rstrip
()
status
=
l
[
0
]
l
=
l
[
1
:]
parts
=
l
.
split
(
" "
)
if
len
(
parts
)
>
2
and
status
in
(
"-"
,
"+"
):
yield
(
parts
[
1
],
"out-of-date"
)
elif
len
(
parts
)
==
2
and
status
==
"-"
:
yield
(
parts
[
1
],
"not-checked-out"
)
elif
len
(
parts
)
>
2
and
status
==
" "
:
yield
(
parts
[
1
],
"up-to-date"
)
else
:
raise
RuntimeError
(
"Unable to parse submodule status:
%
r,
%
r"
%
(
status
,
parts
))
buildtools/wafsamba/samba_install.py
View file @
29b51d14
...
...
@@ -59,90 +59,97 @@ def install_library(self):
bld
=
self
.
bld
install_ldflags
=
install_rpath
(
self
)
build_ldflags
=
build_rpath
(
bld
)
if
not
Options
.
is_install
or
not
getattr
(
self
,
'samba_install'
,
True
):
# just need to set the build rpath if we are not installing
self
.
env
.
RPATH
=
build_ldflags
return
# setup the install path, expanding variables
install_path
=
getattr
(
self
,
'samba_inst_path'
,
None
)
if
install_path
is
None
:
if
getattr
(
self
,
'private_library'
,
False
):
install_path
=
'${PRIVATELIBDIR}'
else
:
install_path
=
'${LIBDIR}'
install_path
=
bld
.
EXPAND_VARIABLES
(
install_path
)
target_name
=
self
.
target
if
install_ldflags
!=
build_ldflags
:
# we will be creating a new target name, and using that for the
# install link. That stops us from overwriting the existing build
# target, which has different ldflags
self
.
done_install_library
=
True
t
=
self
.
clone
(
'default'
)
t
.
posted
=
False
t
.
target
+=
'.inst'
self
.
env
.
RPATH
=
build_ldflags
else
:
t
=
self
t
.
env
.
RPATH
=
install_ldflags
default_env
=
bld
.
all_envs
[
'default'
]
try
:
if
self
.
env
[
'IS_EXTRA_PYTHON'
]:
bld
.
all_envs
[
'default'
]
=
bld
.
all_envs
[
'extrapython'
]
dev_link
=
None
install_ldflags
=
install_rpath
(
self
)
build_ldflags
=
build_rpath
(
bld
)
# in the following the names are:
# - inst_name is the name with .inst. in it, in the build
# directory
# - install_name is the name in the install directory
# - install_link is a symlink in the install directory, to install_name
if
not
Options
.
is_install
or
not
getattr
(
self
,
'samba_install'
,
True
):
# just need to set the build rpath if we are not installing
self
.
env
.
RPATH
=
build_ldflags
return
if
getattr
(
self
,
'samba_realname'
,
None
):
install_name
=
self
.
samba_realname
install_link
=
None
if
getattr
(
self
,
'soname'
,
''
):
install_link
=
self
.
soname
if
getattr
(
self
,
'samba_type'
,
None
)
==
'PYTHON'
:
inst_name
=
bld
.
make_libname
(
t
.
target
,
nolibprefix
=
True
,
python
=
True
)
# setup the install path, expanding variables
install_path
=
getattr
(
self
,
'samba_inst_path'
,
None
)
if
install_path
is
None
:
if
getattr
(
self
,
'private_library'
,
False
):
install_path
=
'${PRIVATELIBDIR}'
else
:
install_path
=
'${LIBDIR}'
install_path
=
bld
.
EXPAND_VARIABLES
(
install_path
)
target_name
=
self
.
target
if
install_ldflags
!=
build_ldflags
:
# we will be creating a new target name, and using that for the
# install link. That stops us from overwriting the existing build
# target, which has different ldflags
self
.
done_install_library
=
True
t
=
self
.
clone
(
self
.
env
)
t
.
posted
=
False
t
.
target
+=
'.inst'
self
.
env
.
RPATH
=
build_ldflags
else
:
t
=
self
t
.
env
.
RPATH
=
install_ldflags
dev_link
=
None
# in the following the names are:
# - inst_name is the name with .inst. in it, in the build
# directory
# - install_name is the name in the install directory
# - install_link is a symlink in the install directory, to install_name
if
getattr
(
self
,
'samba_realname'
,
None
):
install_name
=
self
.
samba_realname
install_link
=
None
if
getattr
(
self
,
'soname'
,
''
):
install_link
=
self
.
soname
if
getattr
(
self
,
'samba_type'
,
None
)
==
'PYTHON'
:
inst_name
=
bld
.
make_libname
(
t
.
target
,
nolibprefix
=
True
,
python
=
True
)
else
:
inst_name
=
bld
.
make_libname
(
t
.
target
)
elif
self
.
vnum
:
vnum_base
=
self
.
vnum
.
split
(
'.'
)[
0
]
install_name
=
bld
.
make_libname
(
target_name
,
version
=
self
.
vnum
)
install_link
=
bld
.
make_libname
(
target_name
,
version
=
vnum_base
)
inst_name
=
bld
.
make_libname
(
t
.
target
)
if
not
self
.
private_library
:
# only generate the dev link for non-bundled libs
dev_link
=
bld
.
make_libname
(
target_name
)
elif
getattr
(
self
,
'soname'
,
''
):
install_name
=
bld
.
make_libname
(
target_name
)
install_link
=
self
.
soname
inst_name
=
bld
.
make_libname
(
t
.
target
)
elif
self
.
vnum
:
vnum_base
=
self
.
vnum
.
split
(
'.'
)[
0
]
install_name
=
bld
.
make_libname
(
target_name
,
version
=
self
.
vnum
)
install_link
=
bld
.
make_libname
(
target_name
,
version
=
vnum_base
)
inst_name
=
bld
.
make_libname
(
t
.
target
)
if
not
self
.
private_library
:
# only generate the dev link for non-bundled libs
dev_link
=
bld
.
make_libname
(
target_name
)
elif
getattr
(
self
,
'soname'
,
''
):
install_name
=
bld
.
make_libname
(
target_name
)
install_link
=
self
.
soname
inst_name
=
bld
.
make_libname
(
t
.
target
)
else
:
install_name
=
bld
.
make_libname
(
target_name
)
install_link
=
None
inst_name
=
bld
.
make_libname
(
t
.
target
)
if
t
.
env
.
SONAME_ST
:
# ensure we get the right names in the library
if
install_link
:
t
.
env
.
append_value
(
'LINKFLAGS'
,
t
.
env
.
SONAME_ST
%
install_link
)
else
:
t
.
env
.
append_value
(
'LINKFLAGS'
,
t
.
env
.
SONAME_ST
%
install_name
)
t
.
env
.
SONAME_ST
=
''
install_name
=
bld
.
make_libname
(
target_name
)
install_link
=
None
inst_name
=
bld
.
make_libname
(
t
.
target
)
# tell waf to install the library
bld
.
install_as
(
os
.
path
.
join
(
install_path
,
install_name
),
os
.
path
.
join
(
self
.
path
.
abspath
(
bld
.
env
),
inst_name
),
chmod
=
<