Merge ~ahasenack/ubuntu/+source/ldb:disco-ldb-1.5.4 into ubuntu/+source/ldb:ubuntu/devel
- Git
- lp:~ahasenack/ubuntu/+source/ldb
- disco-ldb-1.5.4
- Merge into ubuntu/devel
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Andreas Hasenack | ||||||||
Approved revision: | 2ae45486dfdf504f80ce1329dd60b66e340c1d76 | ||||||||
Merged at revision: | 2ae45486dfdf504f80ce1329dd60b66e340c1d76 | ||||||||
Proposed branch: | ~ahasenack/ubuntu/+source/ldb:disco-ldb-1.5.4 | ||||||||
Merge into: | ubuntu/+source/ldb:ubuntu/devel | ||||||||
Diff against target: |
83025 lines (+48316/-4993) 345 files modified
ABI/ldb-1.5.1.sigs (+1/-0) ABI/ldb-1.5.2.sigs (+280/-0) ABI/ldb-1.5.3.sigs (+280/-0) ABI/ldb-1.5.4.sigs (+280/-0) ABI/pyldb-util-1.5.4.sigs (+2/-0) ABI/pyldb-util.py3-1.5.0.sigs (+2/-0) ABI/pyldb-util.py3-1.5.1.sigs (+2/-0) ABI/pyldb-util.py3-1.5.2.sigs (+2/-0) ABI/pyldb-util.py3-1.5.3.sigs (+2/-0) ABI/pyldb-util.py3-1.5.4.sigs (+2/-0) Makefile (+3/-1) _ldb_text.py (+1/-3) buildtools/bin/waf (+111/-21) buildtools/examples/run_on_target.py (+1/-1) buildtools/wafsamba/configure_file.py (+4/-2) buildtools/wafsamba/generic_cc.py (+51/-52) buildtools/wafsamba/pkgconfig.py (+2/-2) buildtools/wafsamba/samba3.py (+5/-4) buildtools/wafsamba/samba_abi.py (+16/-10) buildtools/wafsamba/samba_autoconf.py (+61/-52) buildtools/wafsamba/samba_autoproto.py (+3/-3) buildtools/wafsamba/samba_bundled.py (+11/-11) buildtools/wafsamba/samba_conftests.py (+27/-25) buildtools/wafsamba/samba_cross.py (+14/-13) buildtools/wafsamba/samba_deps.py (+23/-14) buildtools/wafsamba/samba_dist.py (+42/-9) buildtools/wafsamba/samba_git.py (+1/-1) buildtools/wafsamba/samba_headers.py (+7/-6) buildtools/wafsamba/samba_install.py (+6/-5) buildtools/wafsamba/samba_patterns.py (+10/-3) buildtools/wafsamba/samba_perl.py (+8/-5) buildtools/wafsamba/samba_pidl.py (+18/-12) buildtools/wafsamba/samba_python.py (+31/-21) buildtools/wafsamba/samba_third_party.py (+7/-7) buildtools/wafsamba/samba_utils.py (+158/-109) buildtools/wafsamba/samba_version.py (+8/-5) buildtools/wafsamba/samba_waf18.py (+429/-0) buildtools/wafsamba/samba_wildcard.py (+8/-9) buildtools/wafsamba/stale_files.py (+4/-2) buildtools/wafsamba/symbols.py (+16/-16) buildtools/wafsamba/test_duplicate_symbol.sh (+1/-1) buildtools/wafsamba/tests/test_abi.py (+1/-1) buildtools/wafsamba/wafsamba.py (+43/-114) buildtools/wafsamba/wscript (+30/-51) common/ldb.c (+0/-3) common/ldb_controls.c (+101/-7) common/ldb_dn.c (+35/-0) common/ldb_ldif.c (+4/-3) common/ldb_match.c (+35/-6) common/ldb_msg.c (+4/-2) common/ldb_parse.c (+1/-1) configure (+1/-1) debian/changelog (+29/-0) debian/control (+17/-16) debian/libldb1.install (+2/-0) debian/libldb1.symbols (+8/-2) debian/patches/00_Enable-make-test-even-without-lmdb.patch (+21/-31) debian/patches/series (+0/-7) debian/python3-ldb-dev.install (+4/-0) debian/python3-ldb.install (+2/-0) debian/python3-ldb.symbols.amd64 (+3/-0) debian/python3-ldb.symbols.arm64 (+3/-0) debian/python3-ldb.symbols.armhf (+3/-0) debian/python3-ldb.symbols.common (+25/-0) debian/python3-ldb.symbols.i386 (+3/-0) debian/python3-ldb.symbols.ppc64el (+3/-0) debian/python3-ldb.symbols.s390x (+3/-0) debian/rules (+13/-18) dev/null (+0/-129) include/ldb.h (+3/-0) ldb_key_value/ldb_kv.c (+1950/-0) ldb_key_value/ldb_kv.h (+265/-0) ldb_key_value/ldb_kv_cache.c (+143/-135) ldb_key_value/ldb_kv_index.c (+568/-504) ldb_key_value/ldb_kv_search.c (+94/-104) ldb_mdb/ldb_mdb.c (+65/-57) ldb_tdb/ldb_tdb.c (+215/-2116) ldb_tdb/ldb_tdb.h (+0/-232) ldb_tdb/ldb_tdb_err_map.c (+84/-0) lib/replace/Makefile (+2/-1) lib/replace/README (+1/-0) lib/replace/configure (+1/-1) lib/replace/getifaddrs.c (+1/-1) lib/replace/replace.c (+109/-0) lib/replace/replace.h (+46/-27) lib/replace/snprintf.c (+72/-72) lib/replace/system/dir.h (+2/-2) lib/replace/system/filesys.h (+4/-4) lib/replace/system/gssapi.h (+6/-6) lib/replace/system/kerberos.h (+2/-2) lib/replace/system/readline.h (+1/-1) lib/replace/system/threads.h (+27/-0) lib/replace/wscript (+70/-17) lib/talloc/ABI/pytalloc-util-2.1.15.sigs (+16/-0) lib/talloc/ABI/pytalloc-util-2.1.16.sigs (+16/-0) lib/talloc/ABI/pytalloc-util.py3-2.1.15.sigs (+15/-0) lib/talloc/ABI/pytalloc-util.py3-2.1.16.sigs (+15/-0) lib/talloc/ABI/talloc-2.1.15.sigs (+65/-0) lib/talloc/ABI/talloc-2.1.16.sigs (+65/-0) lib/talloc/Makefile (+3/-1) lib/talloc/configure (+1/-1) lib/talloc/talloc.c (+7/-2) lib/talloc/talloc.h (+13/-2) lib/talloc/test_pytalloc.py (+3/-2) lib/talloc/wscript (+20/-22) lib/tdb/ABI/tdb-1.3.17.sigs (+73/-0) lib/tdb/ABI/tdb-1.3.18.sigs (+73/-0) lib/tdb/Makefile (+3/-1) lib/tdb/_tdb_text.py (+0/-1) lib/tdb/common/dump.c (+10/-1) lib/tdb/common/freelist.c (+34/-59) lib/tdb/common/io.c (+2/-2) lib/tdb/common/lock.c (+2/-2) lib/tdb/common/open.c (+48/-55) lib/tdb/common/summary.c (+8/-0) lib/tdb/common/tdb.c (+170/-105) lib/tdb/common/tdb_private.h (+11/-2) lib/tdb/common/traverse.c (+110/-6) lib/tdb/configure (+1/-1) lib/tdb/include/tdb.h (+68/-1) lib/tdb/pytdb.c (+34/-18) lib/tdb/python/tdbdump.py (+1/-1) lib/tdb/python/tests/simple.py (+1/-1) lib/tdb/test/run-circular-chain.c (+42/-0) lib/tdb/test/run-circular-freelist.c (+50/-0) lib/tdb/test/run-marklock-deadlock.c (+1/-1) lib/tdb/test/run-mutex-openflags2.c (+0/-7) lib/tdb/test/run-traverse-chain.c (+94/-0) lib/tdb/test/test_tdbbackup.sh (+54/-0) lib/tdb/tools/tdbbackup.c (+28/-7) lib/tdb/tools/tdbdump.c (+3/-1) lib/tdb/tools/tdbtorture.c (+17/-6) lib/tdb/wscript (+33/-18) lib/tevent/ABI/tevent-0.9.38.sigs (+126/-0) lib/tevent/ABI/tevent-0.9.39.sigs (+126/-0) lib/tevent/Makefile (+3/-2) lib/tevent/bindings.py (+4/-0) lib/tevent/configure (+1/-1) lib/tevent/doc/tevent_request.dox (+1/-1) lib/tevent/pytevent.c (+6/-2) lib/tevent/testsuite.c (+2/-1) lib/tevent/tevent.h (+14/-7) lib/tevent/tevent.py (+1/-1) lib/tevent/tevent_fd.c (+1/-0) lib/tevent/tevent_immediate.c (+1/-0) lib/tevent/tevent_req.c (+6/-4) lib/tevent/tevent_signal.c (+1/-0) lib/tevent/tevent_threads.c (+3/-1) lib/tevent/tevent_timed.c (+1/-0) lib/tevent/tevent_wrapper.c (+3/-2) lib/tevent/wscript (+12/-11) pyldb.c (+98/-21) tests/ldb_kv_ops_test.c (+129/-129) tests/ldb_lmdb_test.c (+5/-4) tests/ldb_match_test.c (+191/-0) tests/ldb_match_test.valgrind (+16/-0) tests/ldb_mod_op_test.c (+2/-1) tests/ldb_msg.c (+1/-0) tests/ldb_tdb_test.c (+5/-4) tests/python/api.py (+129/-39) tests/python/index.py (+8/-7) tests/test_ldb_dn.c (+117/-0) third_party/cmocka/cmocka.c (+193/-68) third_party/cmocka/cmocka.h (+21/-7) third_party/cmocka/wscript (+1/-1) third_party/popt/wscript (+7/-4) third_party/waf/waflib/Build.py (+1474/-0) third_party/waf/waflib/ConfigSet.py (+361/-0) third_party/waf/waflib/Configure.py (+638/-0) third_party/waf/waflib/Context.py (+737/-0) third_party/waf/waflib/Errors.py (+68/-0) third_party/waf/waflib/Logs.py (+379/-0) third_party/waf/waflib/Node.py (+970/-0) third_party/waf/waflib/Options.py (+342/-0) third_party/waf/waflib/Runner.py (+586/-0) third_party/waf/waflib/Scripting.py (+613/-0) third_party/waf/waflib/Task.py (+1281/-0) third_party/waf/waflib/TaskGen.py (+917/-0) third_party/waf/waflib/Tools/__init__.py (+1/-1) third_party/waf/waflib/Tools/ar.py (+24/-0) third_party/waf/waflib/Tools/asm.py (+73/-0) third_party/waf/waflib/Tools/bison.py (+49/-0) third_party/waf/waflib/Tools/c.py (+39/-0) third_party/waf/waflib/Tools/c_aliases.py (+144/-0) third_party/waf/waflib/Tools/c_config.py (+1352/-0) third_party/waf/waflib/Tools/c_osx.py (+193/-0) third_party/waf/waflib/Tools/c_preproc.py (+1091/-0) third_party/waf/waflib/Tools/c_tests.py (+229/-0) third_party/waf/waflib/Tools/ccroot.py (+775/-0) third_party/waf/waflib/Tools/clang.py (+29/-0) third_party/waf/waflib/Tools/clangxx.py (+30/-0) third_party/waf/waflib/Tools/compiler_c.py (+110/-0) third_party/waf/waflib/Tools/compiler_cxx.py (+111/-0) third_party/waf/waflib/Tools/compiler_d.py (+85/-0) third_party/waf/waflib/Tools/compiler_fc.py (+73/-0) third_party/waf/waflib/Tools/cs.py (+211/-0) third_party/waf/waflib/Tools/cxx.py (+40/-0) third_party/waf/waflib/Tools/d.py (+97/-0) third_party/waf/waflib/Tools/d_config.py (+64/-0) third_party/waf/waflib/Tools/d_scan.py (+211/-0) third_party/waf/waflib/Tools/dbus.py (+70/-0) third_party/waf/waflib/Tools/dmd.py (+80/-0) third_party/waf/waflib/Tools/errcheck.py (+237/-0) third_party/waf/waflib/Tools/fc.py (+187/-0) third_party/waf/waflib/Tools/fc_config.py (+488/-0) third_party/waf/waflib/Tools/fc_scan.py (+114/-0) third_party/waf/waflib/Tools/flex.py (+62/-0) third_party/waf/waflib/Tools/g95.py (+66/-0) third_party/waf/waflib/Tools/gas.py (+18/-0) third_party/waf/waflib/Tools/gcc.py (+156/-0) third_party/waf/waflib/Tools/gdc.py (+55/-0) third_party/waf/waflib/Tools/gfortran.py (+93/-0) third_party/waf/waflib/Tools/glib2.py (+489/-0) third_party/waf/waflib/Tools/gnu_dirs.py (+131/-0) third_party/waf/waflib/Tools/gxx.py (+157/-0) third_party/waf/waflib/Tools/icc.py (+30/-0) third_party/waf/waflib/Tools/icpc.py (+30/-0) third_party/waf/waflib/Tools/ifort.py (+413/-0) third_party/waf/waflib/Tools/intltool.py (+231/-0) third_party/waf/waflib/Tools/irixcc.py (+66/-0) third_party/waf/waflib/Tools/javaw.py (+464/-0) third_party/waf/waflib/Tools/ldc2.py (+56/-0) third_party/waf/waflib/Tools/lua.py (+38/-0) third_party/waf/waflib/Tools/md5_tstamp.py (+39/-0) third_party/waf/waflib/Tools/msvc.py (+1020/-0) third_party/waf/waflib/Tools/nasm.py (+26/-0) third_party/waf/waflib/Tools/nobuild.py (+24/-0) third_party/waf/waflib/Tools/perl.py (+156/-0) third_party/waf/waflib/Tools/python.py (+627/-0) third_party/waf/waflib/Tools/qt5.py (+796/-0) third_party/waf/waflib/Tools/ruby.py (+186/-0) third_party/waf/waflib/Tools/suncc.py (+67/-0) third_party/waf/waflib/Tools/suncxx.py (+67/-0) third_party/waf/waflib/Tools/tex.py (+543/-0) third_party/waf/waflib/Tools/vala.py (+355/-0) third_party/waf/waflib/Tools/waf_unit_test.py (+296/-0) third_party/waf/waflib/Tools/winres.py (+78/-0) third_party/waf/waflib/Tools/xlc.py (+65/-0) third_party/waf/waflib/Tools/xlcxx.py (+65/-0) third_party/waf/waflib/Utils.py (+1021/-0) third_party/waf/waflib/__init__.py (+1/-1) third_party/waf/waflib/ansiterm.py (+342/-0) third_party/waf/waflib/extras/__init__.py (+3/-0) third_party/waf/waflib/extras/batched_cc.py (+173/-0) third_party/waf/waflib/extras/biber.py (+58/-0) third_party/waf/waflib/extras/bjam.py (+128/-0) third_party/waf/waflib/extras/blender.py (+108/-0) third_party/waf/waflib/extras/boo.py (+81/-0) third_party/waf/waflib/extras/boost.py (+525/-0) third_party/waf/waflib/extras/build_file_tracker.py (+28/-0) third_party/waf/waflib/extras/build_logs.py (+110/-0) third_party/waf/waflib/extras/buildcopy.py (+82/-0) third_party/waf/waflib/extras/c_bgxlc.py (+32/-0) third_party/waf/waflib/extras/c_dumbpreproc.py (+72/-0) third_party/waf/waflib/extras/c_emscripten.py (+87/-0) third_party/waf/waflib/extras/c_nec.py (+74/-0) third_party/waf/waflib/extras/cabal.py (+152/-0) third_party/waf/waflib/extras/cfg_altoptions.py (+110/-0) third_party/waf/waflib/extras/clang_compilation_database.py (+85/-0) third_party/waf/waflib/extras/codelite.py (+875/-0) third_party/waf/waflib/extras/color_gcc.py (+39/-0) third_party/waf/waflib/extras/color_rvct.py (+51/-0) third_party/waf/waflib/extras/compat15.py (+406/-0) third_party/waf/waflib/extras/cppcheck.py (+585/-0) third_party/waf/waflib/extras/cpplint.py (+222/-0) third_party/waf/waflib/extras/cross_gnu.py (+227/-0) third_party/waf/waflib/extras/cython.py (+146/-0) third_party/waf/waflib/extras/dcc.py (+72/-0) third_party/waf/waflib/extras/distnet.py (+430/-0) third_party/waf/waflib/extras/doxygen.py (+227/-0) third_party/waf/waflib/extras/dpapi.py (+87/-0) third_party/waf/waflib/extras/eclipse.py (+431/-0) third_party/waf/waflib/extras/erlang.py (+110/-0) third_party/waf/waflib/extras/fast_partial.py (+518/-0) third_party/waf/waflib/extras/fc_bgxlf.py (+32/-0) third_party/waf/waflib/extras/fc_cray.py (+51/-0) third_party/waf/waflib/extras/fc_nag.py (+61/-0) third_party/waf/waflib/extras/fc_nec.py (+60/-0) third_party/waf/waflib/extras/fc_open64.py (+58/-0) third_party/waf/waflib/extras/fc_pgfortran.py (+68/-0) third_party/waf/waflib/extras/fc_solstudio.py (+62/-0) third_party/waf/waflib/extras/fc_xlf.py (+63/-0) third_party/waf/waflib/extras/file_to_object.py (+137/-0) third_party/waf/waflib/extras/fluid.py (+13/-9) third_party/waf/waflib/extras/freeimage.py (+74/-0) third_party/waf/waflib/extras/fsb.py (+31/-0) third_party/waf/waflib/extras/fsc.py (+64/-0) third_party/waf/waflib/extras/gccdeps.py (+214/-0) third_party/waf/waflib/extras/gdbus.py (+87/-0) third_party/waf/waflib/extras/gob2.py (+5/-5) third_party/waf/waflib/extras/halide.py (+151/-0) third_party/waf/waflib/extras/javatest.py (+118/-0) third_party/waf/waflib/extras/kde4.py (+93/-0) third_party/waf/waflib/extras/local_rpath.py (+19/-0) third_party/waf/waflib/extras/make.py (+142/-0) third_party/waf/waflib/extras/midl.py (+69/-0) third_party/waf/waflib/extras/msvcdeps.py (+256/-0) third_party/waf/waflib/extras/msvs.py (+1048/-0) third_party/waf/waflib/extras/netcache_client.py (+390/-0) third_party/waf/waflib/extras/objcopy.py (+50/-0) third_party/waf/waflib/extras/ocaml.py (+142/-91) third_party/waf/waflib/extras/package.py (+76/-0) third_party/waf/waflib/extras/parallel_debug.py (+459/-0) third_party/waf/waflib/extras/pch.py (+148/-0) third_party/waf/waflib/extras/pep8.py (+106/-0) third_party/waf/waflib/extras/pgicc.py (+75/-0) third_party/waf/waflib/extras/pgicxx.py (+20/-0) third_party/waf/waflib/extras/proc.py (+54/-0) third_party/waf/waflib/extras/protoc.py (+243/-0) third_party/waf/waflib/extras/pyqt5.py (+241/-0) third_party/waf/waflib/extras/pytest.py (+225/-0) third_party/waf/waflib/extras/qnxnto.py (+72/-0) third_party/waf/waflib/extras/qt4.py (+695/-0) third_party/waf/waflib/extras/relocation.py (+85/-0) third_party/waf/waflib/extras/remote.py (+327/-0) third_party/waf/waflib/extras/resx.py (+35/-0) third_party/waf/waflib/extras/review.py (+325/-0) third_party/waf/waflib/extras/rst.py (+260/-0) third_party/waf/waflib/extras/run_do_script.py (+139/-0) third_party/waf/waflib/extras/run_m_script.py (+88/-0) third_party/waf/waflib/extras/run_py_script.py (+104/-0) third_party/waf/waflib/extras/run_r_script.py (+86/-0) third_party/waf/waflib/extras/sas.py (+71/-0) third_party/waf/waflib/extras/satellite_assembly.py (+57/-0) third_party/waf/waflib/extras/scala.py (+128/-0) third_party/waf/waflib/extras/slow_qt4.py (+96/-0) third_party/waf/waflib/extras/softlink_libs.py (+76/-0) third_party/waf/waflib/extras/stale.py (+98/-0) third_party/waf/waflib/extras/stracedeps.py (+174/-0) third_party/waf/waflib/extras/swig.py (+237/-0) third_party/waf/waflib/extras/syms.py (+84/-0) third_party/waf/waflib/extras/ticgt.py (+300/-0) third_party/waf/waflib/extras/unity.py (+108/-0) third_party/waf/waflib/extras/use_config.py (+185/-0) third_party/waf/waflib/extras/valadoc.py (+127/-99) third_party/waf/waflib/extras/waf_xattr.py (+150/-0) third_party/waf/waflib/extras/why.py (+78/-0) third_party/waf/waflib/extras/win32_opts.py (+170/-0) third_party/waf/waflib/extras/wix.py (+87/-0) third_party/waf/waflib/extras/xcode6.py (+727/-0) third_party/waf/waflib/fixpy2.py (+64/-0) third_party/waf/waflib/processor.py (+64/-0) tools/ldbdump.c (+3/-1) tools/ldbsearch.c (+5/-0) wscript (+60/-43) |
||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Christian Ehrhardt (community) | Approve | ||
Canonical Server | Pending | ||
Review via email: mp+364092@code.launchpad.net |
Commit message
Description of the change
PPA with builds: ppa:ahasenack/
https:/
Bileto ticket:
https:/
It was green, but recent uploads removed the dep8 test history. I have to copy the packages over again.
We are going ahead of Debian.
This is part of the effort to remove python2 from the desktop iso. That requires samba to be updated to 4.10 (bug #1818518), and a newer ldb is needed by samba 4.10.
Furthermore, we can now build python3-ldb{,-dev} packages. The python2 versions of these (python-ldb and python-ldb-dev) are being dropped. Their reverse depends are:
$ reverse-depends python-ldb
Reverse-Depends
===============
* python-ldb-dev
* python-samba
$ reverse-depends python-ldb-dev
No reverse dependencies found
Something odd (to me) happened when updating the symbols of the libldb1 package. Commit b0791cb7dec98f5
--- a/debian/
+++ b/debian/
@@ -55,8 +55,13 @@ libldb.so.1 #PACKAGE# #MINVER#
LDB_1.
LDB_1.
LDB_1.
- LDB_1.4.2@LDB_1.4.2 2:1.4.2
- LDB_1.4.3@LDB_1.4.3 2:1.4.3
+#MISSING: 2:1.5.4# LDB_1.4.2@LDB_1.4.2 2:1.4.2
+#MISSING: 2:1.5.4# LDB_1.4.3@LDB_1.4.3 2:1.4.3
...
There was no error during package build due to those missing symbols, but that may just be some default behavior. I checked debian's previous attempt to update ldb to 1.5 (https:/
I'm also not sure why debian was explicitly excluding ldb.so (in the case of the python2 package) from the python-ldb symbols. From their d/rules:
override_
I repeated that for the python3-ldb package, just fixing the ldb.so name to match the name of that extension in the py3 world: "dh_makeshlibs -Xldb. -ppython3-ldb -- -c4". That also matches what debian did when they briefly had ldb 1.5: https:/
I'm not excluding tevent via -X (like debian did back then) because d/rules is already removing the extension a few lines up:
override_
rm $(DESTDIR)
rm $(DESTDIR)
But maybe I should, exactly because of that? There are no "*tevent*" symbols in the generated symbols files anyway.
Finally, I also had to generate per-architecture symbols files for this package.
As you can see, I have more questions about this ldb packaging than I had about the others. It doens't help that so far we have been just relying on debian for this, and all of a sudden we have to "adopt" it. We can perhaps go ahead with some of these unanswered, because of the FFe time constraints, and then engage with debian and reach a consensus, and fix whatever is still needed.
If you, dear reviewer :), prefer that I engage with Debian right now, that's fine. I just didn't want to have too many different sources of input right now (debian, foundations, server) for fear of delaying this too much, and trying to be perfect from the beginning.
Christian Ehrhardt (paelzer) wrote : | # |
Christian Ehrhardt (paelzer) wrote : | # |
Typo "uspport" in e39b88b72166413
Christian Ehrhardt (paelzer) wrote : | # |
I just see the typo is also in the changelog (more important)
Christian Ehrhardt (paelzer) wrote : | # |
In TDB you stopped dropping python2, here you still do it - intentional?
Christian Ehrhardt (paelzer) wrote : | # |
The changelog has the same indenting issue as tdb - the majority of lines should be indented under " New upstream version: 1.5.4 (LP: #1818525)"
And some other changes are tied to "d/control: add python3 packages (LP: #1440381)"
Indenting those would make two groups of changes which are easier to be understood.
There are a few cleanups which I can't link to one or the other, so they might correctly be top level elements.
Christian Ehrhardt (paelzer) wrote : | # |
We already talked about Python:Versions
These seem more critical as it is "using undefiend Var"
dpkg-gencontrol: warning: Breaks field of package python3-ldb: substitution variable ${python:Breaks} used, but is not defined
dpkg-gencontrol: warning: Provides field of package python3-ldb: substitution variable ${python:Provides} used, but is not defined
dpkg-gencontrol: warning: Breaks field of package python3-ldb: substitution variable ${python:Breaks} used, but is not defined
dpkg-gencontrol: warning: Provides field of package python3-ldb: substitution variable ${python:Provides} used, but is not defined
Either remove the statements in d/control or make sure the Var is reasonably defined
Christian Ehrhardt (paelzer) wrote : | # |
Same question for the cleanup as on tdb - don't you want to use find to be ready for future changes not needing to update d/rules?
OTOH this will be a lot of merge churn - so maybe just suggest that to Debian.
Christian Ehrhardt (paelzer) wrote : | # |
Note: In future you should get build time checks on ABI/*.sigs that seems similar to .symbols
So most likely whenever you see a change in *.sigs it should be detected and reflected in *.symbols.
This didn't exist in prior versions, so it won't help now
Christian Ehrhardt (paelzer) wrote : | # |
I admit a lot of changes, but I think you are fine.
Most of what I found are minor cleanups - so I give you an ack on the current state but would appreciate the cleanups and clarifications I mentioned - OTOH if for the FFe this needs to be rushed it should as-is not break the world.
Andreas Hasenack (ahasenack) wrote : | # |
just tdb needs python2, because of bzr-git. The others don't have outside reverse-depends.
Andreas Hasenack (ahasenack) wrote : | # |
Tagged and uploaded
$ git push pkg upload/
Enumerating objects: 587, done.
Counting objects: 100% (586/586), done.
Delta compression using up to 4 threads
Compressing objects: 100% (280/280), done.
Writing objects: 100% (427/427), 506.55 KiB | 207.00 KiB/s, done.
Total 427 (delta 194), reused 352 (delta 142)
To ssh://git.
* [new tag] upload/
$ dput ubuntu ../ldb_
Checking signature on .changes
gpg: ../ldb_
Checking signature on .dsc
gpg: ../ldb_
Uploading to ubuntu (via ftp to upload.ubuntu.com):
Uploading ldb_1.5.
Uploading ldb_1.5.
Uploading ldb_1.5.
Uploading ldb_1.5.
Uploading ldb_1.5.
Successfully uploaded packages.
Preview Diff
1 | diff --git a/ABI/ldb-1.4.2.sigs b/ABI/ldb-1.5.0.sigs |
2 | similarity index 100% |
3 | rename from ABI/ldb-1.4.2.sigs |
4 | rename to ABI/ldb-1.5.0.sigs |
5 | diff --git a/ABI/ldb-1.4.3.sigs b/ABI/ldb-1.5.1.sigs |
6 | similarity index 92% |
7 | rename from ABI/ldb-1.4.3.sigs |
8 | rename to ABI/ldb-1.5.1.sigs |
9 | index a31b84e..0c1234f 100644 |
10 | --- a/ABI/ldb-1.4.3.sigs |
11 | +++ b/ABI/ldb-1.5.1.sigs |
12 | @@ -35,6 +35,7 @@ ldb_dn_add_base: bool (struct ldb_dn *, struct ldb_dn *) |
13 | ldb_dn_add_base_fmt: bool (struct ldb_dn *, const char *, ...) |
14 | ldb_dn_add_child: bool (struct ldb_dn *, struct ldb_dn *) |
15 | ldb_dn_add_child_fmt: bool (struct ldb_dn *, const char *, ...) |
16 | +ldb_dn_add_child_val: bool (struct ldb_dn *, const char *, struct ldb_val) |
17 | ldb_dn_alloc_casefold: char *(TALLOC_CTX *, struct ldb_dn *) |
18 | ldb_dn_alloc_linearized: char *(TALLOC_CTX *, struct ldb_dn *) |
19 | ldb_dn_canonical_ex_string: char *(TALLOC_CTX *, struct ldb_dn *) |
20 | diff --git a/ABI/ldb-1.5.2.sigs b/ABI/ldb-1.5.2.sigs |
21 | new file mode 100644 |
22 | index 0000000..0c1234f |
23 | --- /dev/null |
24 | +++ b/ABI/ldb-1.5.2.sigs |
25 | @@ -0,0 +1,280 @@ |
26 | +ldb_add: int (struct ldb_context *, const struct ldb_message *) |
27 | +ldb_any_comparison: int (struct ldb_context *, void *, ldb_attr_handler_t, const struct ldb_val *, const struct ldb_val *) |
28 | +ldb_asprintf_errstring: void (struct ldb_context *, const char *, ...) |
29 | +ldb_attr_casefold: char *(TALLOC_CTX *, const char *) |
30 | +ldb_attr_dn: int (const char *) |
31 | +ldb_attr_in_list: int (const char * const *, const char *) |
32 | +ldb_attr_list_copy: const char **(TALLOC_CTX *, const char * const *) |
33 | +ldb_attr_list_copy_add: const char **(TALLOC_CTX *, const char * const *, const char *) |
34 | +ldb_base64_decode: int (char *) |
35 | +ldb_base64_encode: char *(TALLOC_CTX *, const char *, int) |
36 | +ldb_binary_decode: struct ldb_val (TALLOC_CTX *, const char *) |
37 | +ldb_binary_encode: char *(TALLOC_CTX *, struct ldb_val) |
38 | +ldb_binary_encode_string: char *(TALLOC_CTX *, const char *) |
39 | +ldb_build_add_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
40 | +ldb_build_del_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
41 | +ldb_build_extended_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const char *, void *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
42 | +ldb_build_mod_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
43 | +ldb_build_rename_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, struct ldb_dn *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
44 | +ldb_build_search_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, enum ldb_scope, const char *, const char * const *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
45 | +ldb_build_search_req_ex: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, enum ldb_scope, struct ldb_parse_tree *, const char * const *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
46 | +ldb_casefold: char *(struct ldb_context *, TALLOC_CTX *, const char *, size_t) |
47 | +ldb_casefold_default: char *(void *, TALLOC_CTX *, const char *, size_t) |
48 | +ldb_check_critical_controls: int (struct ldb_control **) |
49 | +ldb_comparison_binary: int (struct ldb_context *, void *, const struct ldb_val *, const struct ldb_val *) |
50 | +ldb_comparison_fold: int (struct ldb_context *, void *, const struct ldb_val *, const struct ldb_val *) |
51 | +ldb_connect: int (struct ldb_context *, const char *, unsigned int, const char **) |
52 | +ldb_control_to_string: char *(TALLOC_CTX *, const struct ldb_control *) |
53 | +ldb_controls_except_specified: struct ldb_control **(struct ldb_control **, TALLOC_CTX *, struct ldb_control *) |
54 | +ldb_debug: void (struct ldb_context *, enum ldb_debug_level, const char *, ...) |
55 | +ldb_debug_add: void (struct ldb_context *, const char *, ...) |
56 | +ldb_debug_end: void (struct ldb_context *, enum ldb_debug_level) |
57 | +ldb_debug_set: void (struct ldb_context *, enum ldb_debug_level, const char *, ...) |
58 | +ldb_delete: int (struct ldb_context *, struct ldb_dn *) |
59 | +ldb_dn_add_base: bool (struct ldb_dn *, struct ldb_dn *) |
60 | +ldb_dn_add_base_fmt: bool (struct ldb_dn *, const char *, ...) |
61 | +ldb_dn_add_child: bool (struct ldb_dn *, struct ldb_dn *) |
62 | +ldb_dn_add_child_fmt: bool (struct ldb_dn *, const char *, ...) |
63 | +ldb_dn_add_child_val: bool (struct ldb_dn *, const char *, struct ldb_val) |
64 | +ldb_dn_alloc_casefold: char *(TALLOC_CTX *, struct ldb_dn *) |
65 | +ldb_dn_alloc_linearized: char *(TALLOC_CTX *, struct ldb_dn *) |
66 | +ldb_dn_canonical_ex_string: char *(TALLOC_CTX *, struct ldb_dn *) |
67 | +ldb_dn_canonical_string: char *(TALLOC_CTX *, struct ldb_dn *) |
68 | +ldb_dn_check_local: bool (struct ldb_module *, struct ldb_dn *) |
69 | +ldb_dn_check_special: bool (struct ldb_dn *, const char *) |
70 | +ldb_dn_compare: int (struct ldb_dn *, struct ldb_dn *) |
71 | +ldb_dn_compare_base: int (struct ldb_dn *, struct ldb_dn *) |
72 | +ldb_dn_copy: struct ldb_dn *(TALLOC_CTX *, struct ldb_dn *) |
73 | +ldb_dn_escape_value: char *(TALLOC_CTX *, struct ldb_val) |
74 | +ldb_dn_extended_add_syntax: int (struct ldb_context *, unsigned int, const struct ldb_dn_extended_syntax *) |
75 | +ldb_dn_extended_filter: void (struct ldb_dn *, const char * const *) |
76 | +ldb_dn_extended_syntax_by_name: const struct ldb_dn_extended_syntax *(struct ldb_context *, const char *) |
77 | +ldb_dn_from_ldb_val: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const struct ldb_val *) |
78 | +ldb_dn_get_casefold: const char *(struct ldb_dn *) |
79 | +ldb_dn_get_comp_num: int (struct ldb_dn *) |
80 | +ldb_dn_get_component_name: const char *(struct ldb_dn *, unsigned int) |
81 | +ldb_dn_get_component_val: const struct ldb_val *(struct ldb_dn *, unsigned int) |
82 | +ldb_dn_get_extended_comp_num: int (struct ldb_dn *) |
83 | +ldb_dn_get_extended_component: const struct ldb_val *(struct ldb_dn *, const char *) |
84 | +ldb_dn_get_extended_linearized: char *(TALLOC_CTX *, struct ldb_dn *, int) |
85 | +ldb_dn_get_ldb_context: struct ldb_context *(struct ldb_dn *) |
86 | +ldb_dn_get_linearized: const char *(struct ldb_dn *) |
87 | +ldb_dn_get_parent: struct ldb_dn *(TALLOC_CTX *, struct ldb_dn *) |
88 | +ldb_dn_get_rdn_name: const char *(struct ldb_dn *) |
89 | +ldb_dn_get_rdn_val: const struct ldb_val *(struct ldb_dn *) |
90 | +ldb_dn_has_extended: bool (struct ldb_dn *) |
91 | +ldb_dn_is_null: bool (struct ldb_dn *) |
92 | +ldb_dn_is_special: bool (struct ldb_dn *) |
93 | +ldb_dn_is_valid: bool (struct ldb_dn *) |
94 | +ldb_dn_map_local: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *) |
95 | +ldb_dn_map_rebase_remote: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *) |
96 | +ldb_dn_map_remote: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *) |
97 | +ldb_dn_minimise: bool (struct ldb_dn *) |
98 | +ldb_dn_new: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const char *) |
99 | +ldb_dn_new_fmt: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const char *, ...) |
100 | +ldb_dn_remove_base_components: bool (struct ldb_dn *, unsigned int) |
101 | +ldb_dn_remove_child_components: bool (struct ldb_dn *, unsigned int) |
102 | +ldb_dn_remove_extended_components: void (struct ldb_dn *) |
103 | +ldb_dn_replace_components: bool (struct ldb_dn *, struct ldb_dn *) |
104 | +ldb_dn_set_component: int (struct ldb_dn *, int, const char *, const struct ldb_val) |
105 | +ldb_dn_set_extended_component: int (struct ldb_dn *, const char *, const struct ldb_val *) |
106 | +ldb_dn_update_components: int (struct ldb_dn *, const struct ldb_dn *) |
107 | +ldb_dn_validate: bool (struct ldb_dn *) |
108 | +ldb_dump_results: void (struct ldb_context *, struct ldb_result *, FILE *) |
109 | +ldb_error_at: int (struct ldb_context *, int, const char *, const char *, int) |
110 | +ldb_errstring: const char *(struct ldb_context *) |
111 | +ldb_extended: int (struct ldb_context *, const char *, void *, struct ldb_result **) |
112 | +ldb_extended_default_callback: int (struct ldb_request *, struct ldb_reply *) |
113 | +ldb_filter_from_tree: char *(TALLOC_CTX *, const struct ldb_parse_tree *) |
114 | +ldb_get_config_basedn: struct ldb_dn *(struct ldb_context *) |
115 | +ldb_get_create_perms: unsigned int (struct ldb_context *) |
116 | +ldb_get_default_basedn: struct ldb_dn *(struct ldb_context *) |
117 | +ldb_get_event_context: struct tevent_context *(struct ldb_context *) |
118 | +ldb_get_flags: unsigned int (struct ldb_context *) |
119 | +ldb_get_opaque: void *(struct ldb_context *, const char *) |
120 | +ldb_get_root_basedn: struct ldb_dn *(struct ldb_context *) |
121 | +ldb_get_schema_basedn: struct ldb_dn *(struct ldb_context *) |
122 | +ldb_global_init: int (void) |
123 | +ldb_handle_get_event_context: struct tevent_context *(struct ldb_handle *) |
124 | +ldb_handle_new: struct ldb_handle *(TALLOC_CTX *, struct ldb_context *) |
125 | +ldb_handle_use_global_event_context: void (struct ldb_handle *) |
126 | +ldb_handler_copy: int (struct ldb_context *, void *, const struct ldb_val *, struct ldb_val *) |
127 | +ldb_handler_fold: int (struct ldb_context *, void *, const struct ldb_val *, struct ldb_val *) |
128 | +ldb_init: struct ldb_context *(TALLOC_CTX *, struct tevent_context *) |
129 | +ldb_ldif_message_redacted_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *) |
130 | +ldb_ldif_message_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *) |
131 | +ldb_ldif_parse_modrdn: int (struct ldb_context *, const struct ldb_ldif *, TALLOC_CTX *, struct ldb_dn **, struct ldb_dn **, bool *, struct ldb_dn **, struct ldb_dn **) |
132 | +ldb_ldif_read: struct ldb_ldif *(struct ldb_context *, int (*)(void *), void *) |
133 | +ldb_ldif_read_file: struct ldb_ldif *(struct ldb_context *, FILE *) |
134 | +ldb_ldif_read_file_state: struct ldb_ldif *(struct ldb_context *, struct ldif_read_file_state *) |
135 | +ldb_ldif_read_free: void (struct ldb_context *, struct ldb_ldif *) |
136 | +ldb_ldif_read_string: struct ldb_ldif *(struct ldb_context *, const char **) |
137 | +ldb_ldif_write: int (struct ldb_context *, int (*)(void *, const char *, ...), void *, const struct ldb_ldif *) |
138 | +ldb_ldif_write_file: int (struct ldb_context *, FILE *, const struct ldb_ldif *) |
139 | +ldb_ldif_write_redacted_trace_string: char *(struct ldb_context *, TALLOC_CTX *, const struct ldb_ldif *) |
140 | +ldb_ldif_write_string: char *(struct ldb_context *, TALLOC_CTX *, const struct ldb_ldif *) |
141 | +ldb_load_modules: int (struct ldb_context *, const char **) |
142 | +ldb_map_add: int (struct ldb_module *, struct ldb_request *) |
143 | +ldb_map_delete: int (struct ldb_module *, struct ldb_request *) |
144 | +ldb_map_init: int (struct ldb_module *, const struct ldb_map_attribute *, const struct ldb_map_objectclass *, const char * const *, const char *, const char *) |
145 | +ldb_map_modify: int (struct ldb_module *, struct ldb_request *) |
146 | +ldb_map_rename: int (struct ldb_module *, struct ldb_request *) |
147 | +ldb_map_search: int (struct ldb_module *, struct ldb_request *) |
148 | +ldb_match_message: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, enum ldb_scope, bool *) |
149 | +ldb_match_msg: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, struct ldb_dn *, enum ldb_scope) |
150 | +ldb_match_msg_error: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, struct ldb_dn *, enum ldb_scope, bool *) |
151 | +ldb_match_msg_objectclass: int (const struct ldb_message *, const char *) |
152 | +ldb_mod_register_control: int (struct ldb_module *, const char *) |
153 | +ldb_modify: int (struct ldb_context *, const struct ldb_message *) |
154 | +ldb_modify_default_callback: int (struct ldb_request *, struct ldb_reply *) |
155 | +ldb_module_call_chain: char *(struct ldb_request *, TALLOC_CTX *) |
156 | +ldb_module_connect_backend: int (struct ldb_context *, const char *, const char **, struct ldb_module **) |
157 | +ldb_module_done: int (struct ldb_request *, struct ldb_control **, struct ldb_extended *, int) |
158 | +ldb_module_flags: uint32_t (struct ldb_context *) |
159 | +ldb_module_get_ctx: struct ldb_context *(struct ldb_module *) |
160 | +ldb_module_get_name: const char *(struct ldb_module *) |
161 | +ldb_module_get_ops: const struct ldb_module_ops *(struct ldb_module *) |
162 | +ldb_module_get_private: void *(struct ldb_module *) |
163 | +ldb_module_init_chain: int (struct ldb_context *, struct ldb_module *) |
164 | +ldb_module_load_list: int (struct ldb_context *, const char **, struct ldb_module *, struct ldb_module **) |
165 | +ldb_module_new: struct ldb_module *(TALLOC_CTX *, struct ldb_context *, const char *, const struct ldb_module_ops *) |
166 | +ldb_module_next: struct ldb_module *(struct ldb_module *) |
167 | +ldb_module_popt_options: struct poptOption **(struct ldb_context *) |
168 | +ldb_module_send_entry: int (struct ldb_request *, struct ldb_message *, struct ldb_control **) |
169 | +ldb_module_send_referral: int (struct ldb_request *, char *) |
170 | +ldb_module_set_next: void (struct ldb_module *, struct ldb_module *) |
171 | +ldb_module_set_private: void (struct ldb_module *, void *) |
172 | +ldb_modules_hook: int (struct ldb_context *, enum ldb_module_hook_type) |
173 | +ldb_modules_list_from_string: const char **(struct ldb_context *, TALLOC_CTX *, const char *) |
174 | +ldb_modules_load: int (const char *, const char *) |
175 | +ldb_msg_add: int (struct ldb_message *, const struct ldb_message_element *, int) |
176 | +ldb_msg_add_empty: int (struct ldb_message *, const char *, int, struct ldb_message_element **) |
177 | +ldb_msg_add_fmt: int (struct ldb_message *, const char *, const char *, ...) |
178 | +ldb_msg_add_linearized_dn: int (struct ldb_message *, const char *, struct ldb_dn *) |
179 | +ldb_msg_add_steal_string: int (struct ldb_message *, const char *, char *) |
180 | +ldb_msg_add_steal_value: int (struct ldb_message *, const char *, struct ldb_val *) |
181 | +ldb_msg_add_string: int (struct ldb_message *, const char *, const char *) |
182 | +ldb_msg_add_value: int (struct ldb_message *, const char *, const struct ldb_val *, struct ldb_message_element **) |
183 | +ldb_msg_canonicalize: struct ldb_message *(struct ldb_context *, const struct ldb_message *) |
184 | +ldb_msg_check_string_attribute: int (const struct ldb_message *, const char *, const char *) |
185 | +ldb_msg_copy: struct ldb_message *(TALLOC_CTX *, const struct ldb_message *) |
186 | +ldb_msg_copy_attr: int (struct ldb_message *, const char *, const char *) |
187 | +ldb_msg_copy_shallow: struct ldb_message *(TALLOC_CTX *, const struct ldb_message *) |
188 | +ldb_msg_diff: struct ldb_message *(struct ldb_context *, struct ldb_message *, struct ldb_message *) |
189 | +ldb_msg_difference: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message *, struct ldb_message *, struct ldb_message **) |
190 | +ldb_msg_element_compare: int (struct ldb_message_element *, struct ldb_message_element *) |
191 | +ldb_msg_element_compare_name: int (struct ldb_message_element *, struct ldb_message_element *) |
192 | +ldb_msg_element_equal_ordered: bool (const struct ldb_message_element *, const struct ldb_message_element *) |
193 | +ldb_msg_find_attr_as_bool: int (const struct ldb_message *, const char *, int) |
194 | +ldb_msg_find_attr_as_dn: struct ldb_dn *(struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, const char *) |
195 | +ldb_msg_find_attr_as_double: double (const struct ldb_message *, const char *, double) |
196 | +ldb_msg_find_attr_as_int: int (const struct ldb_message *, const char *, int) |
197 | +ldb_msg_find_attr_as_int64: int64_t (const struct ldb_message *, const char *, int64_t) |
198 | +ldb_msg_find_attr_as_string: const char *(const struct ldb_message *, const char *, const char *) |
199 | +ldb_msg_find_attr_as_uint: unsigned int (const struct ldb_message *, const char *, unsigned int) |
200 | +ldb_msg_find_attr_as_uint64: uint64_t (const struct ldb_message *, const char *, uint64_t) |
201 | +ldb_msg_find_common_values: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message_element *, struct ldb_message_element *, uint32_t) |
202 | +ldb_msg_find_duplicate_val: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message_element *, struct ldb_val **, uint32_t) |
203 | +ldb_msg_find_element: struct ldb_message_element *(const struct ldb_message *, const char *) |
204 | +ldb_msg_find_ldb_val: const struct ldb_val *(const struct ldb_message *, const char *) |
205 | +ldb_msg_find_val: struct ldb_val *(const struct ldb_message_element *, struct ldb_val *) |
206 | +ldb_msg_new: struct ldb_message *(TALLOC_CTX *) |
207 | +ldb_msg_normalize: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_message **) |
208 | +ldb_msg_remove_attr: void (struct ldb_message *, const char *) |
209 | +ldb_msg_remove_element: void (struct ldb_message *, struct ldb_message_element *) |
210 | +ldb_msg_rename_attr: int (struct ldb_message *, const char *, const char *) |
211 | +ldb_msg_sanity_check: int (struct ldb_context *, const struct ldb_message *) |
212 | +ldb_msg_sort_elements: void (struct ldb_message *) |
213 | +ldb_next_del_trans: int (struct ldb_module *) |
214 | +ldb_next_end_trans: int (struct ldb_module *) |
215 | +ldb_next_init: int (struct ldb_module *) |
216 | +ldb_next_prepare_commit: int (struct ldb_module *) |
217 | +ldb_next_read_lock: int (struct ldb_module *) |
218 | +ldb_next_read_unlock: int (struct ldb_module *) |
219 | +ldb_next_remote_request: int (struct ldb_module *, struct ldb_request *) |
220 | +ldb_next_request: int (struct ldb_module *, struct ldb_request *) |
221 | +ldb_next_start_trans: int (struct ldb_module *) |
222 | +ldb_op_default_callback: int (struct ldb_request *, struct ldb_reply *) |
223 | +ldb_options_find: const char *(struct ldb_context *, const char **, const char *) |
224 | +ldb_pack_data: int (struct ldb_context *, const struct ldb_message *, struct ldb_val *) |
225 | +ldb_parse_control_from_string: struct ldb_control *(struct ldb_context *, TALLOC_CTX *, const char *) |
226 | +ldb_parse_control_strings: struct ldb_control **(struct ldb_context *, TALLOC_CTX *, const char **) |
227 | +ldb_parse_tree: struct ldb_parse_tree *(TALLOC_CTX *, const char *) |
228 | +ldb_parse_tree_attr_replace: void (struct ldb_parse_tree *, const char *, const char *) |
229 | +ldb_parse_tree_copy_shallow: struct ldb_parse_tree *(TALLOC_CTX *, const struct ldb_parse_tree *) |
230 | +ldb_parse_tree_walk: int (struct ldb_parse_tree *, int (*)(struct ldb_parse_tree *, void *), void *) |
231 | +ldb_qsort: void (void * const, size_t, size_t, void *, ldb_qsort_cmp_fn_t) |
232 | +ldb_register_backend: int (const char *, ldb_connect_fn, bool) |
233 | +ldb_register_extended_match_rule: int (struct ldb_context *, const struct ldb_extended_match_rule *) |
234 | +ldb_register_hook: int (ldb_hook_fn) |
235 | +ldb_register_module: int (const struct ldb_module_ops *) |
236 | +ldb_rename: int (struct ldb_context *, struct ldb_dn *, struct ldb_dn *) |
237 | +ldb_reply_add_control: int (struct ldb_reply *, const char *, bool, void *) |
238 | +ldb_reply_get_control: struct ldb_control *(struct ldb_reply *, const char *) |
239 | +ldb_req_get_custom_flags: uint32_t (struct ldb_request *) |
240 | +ldb_req_is_untrusted: bool (struct ldb_request *) |
241 | +ldb_req_location: const char *(struct ldb_request *) |
242 | +ldb_req_mark_trusted: void (struct ldb_request *) |
243 | +ldb_req_mark_untrusted: void (struct ldb_request *) |
244 | +ldb_req_set_custom_flags: void (struct ldb_request *, uint32_t) |
245 | +ldb_req_set_location: void (struct ldb_request *, const char *) |
246 | +ldb_request: int (struct ldb_context *, struct ldb_request *) |
247 | +ldb_request_add_control: int (struct ldb_request *, const char *, bool, void *) |
248 | +ldb_request_done: int (struct ldb_request *, int) |
249 | +ldb_request_get_control: struct ldb_control *(struct ldb_request *, const char *) |
250 | +ldb_request_get_status: int (struct ldb_request *) |
251 | +ldb_request_replace_control: int (struct ldb_request *, const char *, bool, void *) |
252 | +ldb_request_set_state: void (struct ldb_request *, int) |
253 | +ldb_reset_err_string: void (struct ldb_context *) |
254 | +ldb_save_controls: int (struct ldb_control *, struct ldb_request *, struct ldb_control ***) |
255 | +ldb_schema_attribute_add: int (struct ldb_context *, const char *, unsigned int, const char *) |
256 | +ldb_schema_attribute_add_with_syntax: int (struct ldb_context *, const char *, unsigned int, const struct ldb_schema_syntax *) |
257 | +ldb_schema_attribute_by_name: const struct ldb_schema_attribute *(struct ldb_context *, const char *) |
258 | +ldb_schema_attribute_fill_with_syntax: int (struct ldb_context *, TALLOC_CTX *, const char *, unsigned int, const struct ldb_schema_syntax *, struct ldb_schema_attribute *) |
259 | +ldb_schema_attribute_remove: void (struct ldb_context *, const char *) |
260 | +ldb_schema_attribute_remove_flagged: void (struct ldb_context *, unsigned int) |
261 | +ldb_schema_attribute_set_override_handler: void (struct ldb_context *, ldb_attribute_handler_override_fn_t, void *) |
262 | +ldb_schema_set_override_GUID_index: void (struct ldb_context *, const char *, const char *) |
263 | +ldb_schema_set_override_indexlist: void (struct ldb_context *, bool) |
264 | +ldb_search: int (struct ldb_context *, TALLOC_CTX *, struct ldb_result **, struct ldb_dn *, enum ldb_scope, const char * const *, const char *, ...) |
265 | +ldb_search_default_callback: int (struct ldb_request *, struct ldb_reply *) |
266 | +ldb_sequence_number: int (struct ldb_context *, enum ldb_sequence_type, uint64_t *) |
267 | +ldb_set_create_perms: void (struct ldb_context *, unsigned int) |
268 | +ldb_set_debug: int (struct ldb_context *, void (*)(void *, enum ldb_debug_level, const char *, va_list), void *) |
269 | +ldb_set_debug_stderr: int (struct ldb_context *) |
270 | +ldb_set_default_dns: void (struct ldb_context *) |
271 | +ldb_set_errstring: void (struct ldb_context *, const char *) |
272 | +ldb_set_event_context: void (struct ldb_context *, struct tevent_context *) |
273 | +ldb_set_flags: void (struct ldb_context *, unsigned int) |
274 | +ldb_set_modules_dir: void (struct ldb_context *, const char *) |
275 | +ldb_set_opaque: int (struct ldb_context *, const char *, void *) |
276 | +ldb_set_require_private_event_context: void (struct ldb_context *) |
277 | +ldb_set_timeout: int (struct ldb_context *, struct ldb_request *, int) |
278 | +ldb_set_timeout_from_prev_req: int (struct ldb_context *, struct ldb_request *, struct ldb_request *) |
279 | +ldb_set_utf8_default: void (struct ldb_context *) |
280 | +ldb_set_utf8_fns: void (struct ldb_context *, void *, char *(*)(void *, void *, const char *, size_t)) |
281 | +ldb_setup_wellknown_attributes: int (struct ldb_context *) |
282 | +ldb_should_b64_encode: int (struct ldb_context *, const struct ldb_val *) |
283 | +ldb_standard_syntax_by_name: const struct ldb_schema_syntax *(struct ldb_context *, const char *) |
284 | +ldb_strerror: const char *(int) |
285 | +ldb_string_to_time: time_t (const char *) |
286 | +ldb_string_utc_to_time: time_t (const char *) |
287 | +ldb_timestring: char *(TALLOC_CTX *, time_t) |
288 | +ldb_timestring_utc: char *(TALLOC_CTX *, time_t) |
289 | +ldb_transaction_cancel: int (struct ldb_context *) |
290 | +ldb_transaction_cancel_noerr: int (struct ldb_context *) |
291 | +ldb_transaction_commit: int (struct ldb_context *) |
292 | +ldb_transaction_prepare_commit: int (struct ldb_context *) |
293 | +ldb_transaction_start: int (struct ldb_context *) |
294 | +ldb_unpack_data: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *) |
295 | +ldb_unpack_data_only_attr_list: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *, const char * const *, unsigned int, unsigned int *) |
296 | +ldb_unpack_data_only_attr_list_flags: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *, const char * const *, unsigned int, unsigned int, unsigned int *) |
297 | +ldb_val_dup: struct ldb_val (TALLOC_CTX *, const struct ldb_val *) |
298 | +ldb_val_equal_exact: int (const struct ldb_val *, const struct ldb_val *) |
299 | +ldb_val_map_local: struct ldb_val (struct ldb_module *, void *, const struct ldb_map_attribute *, const struct ldb_val *) |
300 | +ldb_val_map_remote: struct ldb_val (struct ldb_module *, void *, const struct ldb_map_attribute *, const struct ldb_val *) |
301 | +ldb_val_string_cmp: int (const struct ldb_val *, const char *) |
302 | +ldb_val_to_time: int (const struct ldb_val *, time_t *) |
303 | +ldb_valid_attr_name: int (const char *) |
304 | +ldb_vdebug: void (struct ldb_context *, enum ldb_debug_level, const char *, va_list) |
305 | +ldb_wait: int (struct ldb_handle *, enum ldb_wait_type) |
306 | diff --git a/ABI/ldb-1.5.3.sigs b/ABI/ldb-1.5.3.sigs |
307 | new file mode 100644 |
308 | index 0000000..0c1234f |
309 | --- /dev/null |
310 | +++ b/ABI/ldb-1.5.3.sigs |
311 | @@ -0,0 +1,280 @@ |
312 | +ldb_add: int (struct ldb_context *, const struct ldb_message *) |
313 | +ldb_any_comparison: int (struct ldb_context *, void *, ldb_attr_handler_t, const struct ldb_val *, const struct ldb_val *) |
314 | +ldb_asprintf_errstring: void (struct ldb_context *, const char *, ...) |
315 | +ldb_attr_casefold: char *(TALLOC_CTX *, const char *) |
316 | +ldb_attr_dn: int (const char *) |
317 | +ldb_attr_in_list: int (const char * const *, const char *) |
318 | +ldb_attr_list_copy: const char **(TALLOC_CTX *, const char * const *) |
319 | +ldb_attr_list_copy_add: const char **(TALLOC_CTX *, const char * const *, const char *) |
320 | +ldb_base64_decode: int (char *) |
321 | +ldb_base64_encode: char *(TALLOC_CTX *, const char *, int) |
322 | +ldb_binary_decode: struct ldb_val (TALLOC_CTX *, const char *) |
323 | +ldb_binary_encode: char *(TALLOC_CTX *, struct ldb_val) |
324 | +ldb_binary_encode_string: char *(TALLOC_CTX *, const char *) |
325 | +ldb_build_add_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
326 | +ldb_build_del_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
327 | +ldb_build_extended_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const char *, void *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
328 | +ldb_build_mod_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
329 | +ldb_build_rename_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, struct ldb_dn *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
330 | +ldb_build_search_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, enum ldb_scope, const char *, const char * const *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
331 | +ldb_build_search_req_ex: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, enum ldb_scope, struct ldb_parse_tree *, const char * const *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
332 | +ldb_casefold: char *(struct ldb_context *, TALLOC_CTX *, const char *, size_t) |
333 | +ldb_casefold_default: char *(void *, TALLOC_CTX *, const char *, size_t) |
334 | +ldb_check_critical_controls: int (struct ldb_control **) |
335 | +ldb_comparison_binary: int (struct ldb_context *, void *, const struct ldb_val *, const struct ldb_val *) |
336 | +ldb_comparison_fold: int (struct ldb_context *, void *, const struct ldb_val *, const struct ldb_val *) |
337 | +ldb_connect: int (struct ldb_context *, const char *, unsigned int, const char **) |
338 | +ldb_control_to_string: char *(TALLOC_CTX *, const struct ldb_control *) |
339 | +ldb_controls_except_specified: struct ldb_control **(struct ldb_control **, TALLOC_CTX *, struct ldb_control *) |
340 | +ldb_debug: void (struct ldb_context *, enum ldb_debug_level, const char *, ...) |
341 | +ldb_debug_add: void (struct ldb_context *, const char *, ...) |
342 | +ldb_debug_end: void (struct ldb_context *, enum ldb_debug_level) |
343 | +ldb_debug_set: void (struct ldb_context *, enum ldb_debug_level, const char *, ...) |
344 | +ldb_delete: int (struct ldb_context *, struct ldb_dn *) |
345 | +ldb_dn_add_base: bool (struct ldb_dn *, struct ldb_dn *) |
346 | +ldb_dn_add_base_fmt: bool (struct ldb_dn *, const char *, ...) |
347 | +ldb_dn_add_child: bool (struct ldb_dn *, struct ldb_dn *) |
348 | +ldb_dn_add_child_fmt: bool (struct ldb_dn *, const char *, ...) |
349 | +ldb_dn_add_child_val: bool (struct ldb_dn *, const char *, struct ldb_val) |
350 | +ldb_dn_alloc_casefold: char *(TALLOC_CTX *, struct ldb_dn *) |
351 | +ldb_dn_alloc_linearized: char *(TALLOC_CTX *, struct ldb_dn *) |
352 | +ldb_dn_canonical_ex_string: char *(TALLOC_CTX *, struct ldb_dn *) |
353 | +ldb_dn_canonical_string: char *(TALLOC_CTX *, struct ldb_dn *) |
354 | +ldb_dn_check_local: bool (struct ldb_module *, struct ldb_dn *) |
355 | +ldb_dn_check_special: bool (struct ldb_dn *, const char *) |
356 | +ldb_dn_compare: int (struct ldb_dn *, struct ldb_dn *) |
357 | +ldb_dn_compare_base: int (struct ldb_dn *, struct ldb_dn *) |
358 | +ldb_dn_copy: struct ldb_dn *(TALLOC_CTX *, struct ldb_dn *) |
359 | +ldb_dn_escape_value: char *(TALLOC_CTX *, struct ldb_val) |
360 | +ldb_dn_extended_add_syntax: int (struct ldb_context *, unsigned int, const struct ldb_dn_extended_syntax *) |
361 | +ldb_dn_extended_filter: void (struct ldb_dn *, const char * const *) |
362 | +ldb_dn_extended_syntax_by_name: const struct ldb_dn_extended_syntax *(struct ldb_context *, const char *) |
363 | +ldb_dn_from_ldb_val: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const struct ldb_val *) |
364 | +ldb_dn_get_casefold: const char *(struct ldb_dn *) |
365 | +ldb_dn_get_comp_num: int (struct ldb_dn *) |
366 | +ldb_dn_get_component_name: const char *(struct ldb_dn *, unsigned int) |
367 | +ldb_dn_get_component_val: const struct ldb_val *(struct ldb_dn *, unsigned int) |
368 | +ldb_dn_get_extended_comp_num: int (struct ldb_dn *) |
369 | +ldb_dn_get_extended_component: const struct ldb_val *(struct ldb_dn *, const char *) |
370 | +ldb_dn_get_extended_linearized: char *(TALLOC_CTX *, struct ldb_dn *, int) |
371 | +ldb_dn_get_ldb_context: struct ldb_context *(struct ldb_dn *) |
372 | +ldb_dn_get_linearized: const char *(struct ldb_dn *) |
373 | +ldb_dn_get_parent: struct ldb_dn *(TALLOC_CTX *, struct ldb_dn *) |
374 | +ldb_dn_get_rdn_name: const char *(struct ldb_dn *) |
375 | +ldb_dn_get_rdn_val: const struct ldb_val *(struct ldb_dn *) |
376 | +ldb_dn_has_extended: bool (struct ldb_dn *) |
377 | +ldb_dn_is_null: bool (struct ldb_dn *) |
378 | +ldb_dn_is_special: bool (struct ldb_dn *) |
379 | +ldb_dn_is_valid: bool (struct ldb_dn *) |
380 | +ldb_dn_map_local: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *) |
381 | +ldb_dn_map_rebase_remote: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *) |
382 | +ldb_dn_map_remote: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *) |
383 | +ldb_dn_minimise: bool (struct ldb_dn *) |
384 | +ldb_dn_new: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const char *) |
385 | +ldb_dn_new_fmt: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const char *, ...) |
386 | +ldb_dn_remove_base_components: bool (struct ldb_dn *, unsigned int) |
387 | +ldb_dn_remove_child_components: bool (struct ldb_dn *, unsigned int) |
388 | +ldb_dn_remove_extended_components: void (struct ldb_dn *) |
389 | +ldb_dn_replace_components: bool (struct ldb_dn *, struct ldb_dn *) |
390 | +ldb_dn_set_component: int (struct ldb_dn *, int, const char *, const struct ldb_val) |
391 | +ldb_dn_set_extended_component: int (struct ldb_dn *, const char *, const struct ldb_val *) |
392 | +ldb_dn_update_components: int (struct ldb_dn *, const struct ldb_dn *) |
393 | +ldb_dn_validate: bool (struct ldb_dn *) |
394 | +ldb_dump_results: void (struct ldb_context *, struct ldb_result *, FILE *) |
395 | +ldb_error_at: int (struct ldb_context *, int, const char *, const char *, int) |
396 | +ldb_errstring: const char *(struct ldb_context *) |
397 | +ldb_extended: int (struct ldb_context *, const char *, void *, struct ldb_result **) |
398 | +ldb_extended_default_callback: int (struct ldb_request *, struct ldb_reply *) |
399 | +ldb_filter_from_tree: char *(TALLOC_CTX *, const struct ldb_parse_tree *) |
400 | +ldb_get_config_basedn: struct ldb_dn *(struct ldb_context *) |
401 | +ldb_get_create_perms: unsigned int (struct ldb_context *) |
402 | +ldb_get_default_basedn: struct ldb_dn *(struct ldb_context *) |
403 | +ldb_get_event_context: struct tevent_context *(struct ldb_context *) |
404 | +ldb_get_flags: unsigned int (struct ldb_context *) |
405 | +ldb_get_opaque: void *(struct ldb_context *, const char *) |
406 | +ldb_get_root_basedn: struct ldb_dn *(struct ldb_context *) |
407 | +ldb_get_schema_basedn: struct ldb_dn *(struct ldb_context *) |
408 | +ldb_global_init: int (void) |
409 | +ldb_handle_get_event_context: struct tevent_context *(struct ldb_handle *) |
410 | +ldb_handle_new: struct ldb_handle *(TALLOC_CTX *, struct ldb_context *) |
411 | +ldb_handle_use_global_event_context: void (struct ldb_handle *) |
412 | +ldb_handler_copy: int (struct ldb_context *, void *, const struct ldb_val *, struct ldb_val *) |
413 | +ldb_handler_fold: int (struct ldb_context *, void *, const struct ldb_val *, struct ldb_val *) |
414 | +ldb_init: struct ldb_context *(TALLOC_CTX *, struct tevent_context *) |
415 | +ldb_ldif_message_redacted_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *) |
416 | +ldb_ldif_message_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *) |
417 | +ldb_ldif_parse_modrdn: int (struct ldb_context *, const struct ldb_ldif *, TALLOC_CTX *, struct ldb_dn **, struct ldb_dn **, bool *, struct ldb_dn **, struct ldb_dn **) |
418 | +ldb_ldif_read: struct ldb_ldif *(struct ldb_context *, int (*)(void *), void *) |
419 | +ldb_ldif_read_file: struct ldb_ldif *(struct ldb_context *, FILE *) |
420 | +ldb_ldif_read_file_state: struct ldb_ldif *(struct ldb_context *, struct ldif_read_file_state *) |
421 | +ldb_ldif_read_free: void (struct ldb_context *, struct ldb_ldif *) |
422 | +ldb_ldif_read_string: struct ldb_ldif *(struct ldb_context *, const char **) |
423 | +ldb_ldif_write: int (struct ldb_context *, int (*)(void *, const char *, ...), void *, const struct ldb_ldif *) |
424 | +ldb_ldif_write_file: int (struct ldb_context *, FILE *, const struct ldb_ldif *) |
425 | +ldb_ldif_write_redacted_trace_string: char *(struct ldb_context *, TALLOC_CTX *, const struct ldb_ldif *) |
426 | +ldb_ldif_write_string: char *(struct ldb_context *, TALLOC_CTX *, const struct ldb_ldif *) |
427 | +ldb_load_modules: int (struct ldb_context *, const char **) |
428 | +ldb_map_add: int (struct ldb_module *, struct ldb_request *) |
429 | +ldb_map_delete: int (struct ldb_module *, struct ldb_request *) |
430 | +ldb_map_init: int (struct ldb_module *, const struct ldb_map_attribute *, const struct ldb_map_objectclass *, const char * const *, const char *, const char *) |
431 | +ldb_map_modify: int (struct ldb_module *, struct ldb_request *) |
432 | +ldb_map_rename: int (struct ldb_module *, struct ldb_request *) |
433 | +ldb_map_search: int (struct ldb_module *, struct ldb_request *) |
434 | +ldb_match_message: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, enum ldb_scope, bool *) |
435 | +ldb_match_msg: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, struct ldb_dn *, enum ldb_scope) |
436 | +ldb_match_msg_error: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, struct ldb_dn *, enum ldb_scope, bool *) |
437 | +ldb_match_msg_objectclass: int (const struct ldb_message *, const char *) |
438 | +ldb_mod_register_control: int (struct ldb_module *, const char *) |
439 | +ldb_modify: int (struct ldb_context *, const struct ldb_message *) |
440 | +ldb_modify_default_callback: int (struct ldb_request *, struct ldb_reply *) |
441 | +ldb_module_call_chain: char *(struct ldb_request *, TALLOC_CTX *) |
442 | +ldb_module_connect_backend: int (struct ldb_context *, const char *, const char **, struct ldb_module **) |
443 | +ldb_module_done: int (struct ldb_request *, struct ldb_control **, struct ldb_extended *, int) |
444 | +ldb_module_flags: uint32_t (struct ldb_context *) |
445 | +ldb_module_get_ctx: struct ldb_context *(struct ldb_module *) |
446 | +ldb_module_get_name: const char *(struct ldb_module *) |
447 | +ldb_module_get_ops: const struct ldb_module_ops *(struct ldb_module *) |
448 | +ldb_module_get_private: void *(struct ldb_module *) |
449 | +ldb_module_init_chain: int (struct ldb_context *, struct ldb_module *) |
450 | +ldb_module_load_list: int (struct ldb_context *, const char **, struct ldb_module *, struct ldb_module **) |
451 | +ldb_module_new: struct ldb_module *(TALLOC_CTX *, struct ldb_context *, const char *, const struct ldb_module_ops *) |
452 | +ldb_module_next: struct ldb_module *(struct ldb_module *) |
453 | +ldb_module_popt_options: struct poptOption **(struct ldb_context *) |
454 | +ldb_module_send_entry: int (struct ldb_request *, struct ldb_message *, struct ldb_control **) |
455 | +ldb_module_send_referral: int (struct ldb_request *, char *) |
456 | +ldb_module_set_next: void (struct ldb_module *, struct ldb_module *) |
457 | +ldb_module_set_private: void (struct ldb_module *, void *) |
458 | +ldb_modules_hook: int (struct ldb_context *, enum ldb_module_hook_type) |
459 | +ldb_modules_list_from_string: const char **(struct ldb_context *, TALLOC_CTX *, const char *) |
460 | +ldb_modules_load: int (const char *, const char *) |
461 | +ldb_msg_add: int (struct ldb_message *, const struct ldb_message_element *, int) |
462 | +ldb_msg_add_empty: int (struct ldb_message *, const char *, int, struct ldb_message_element **) |
463 | +ldb_msg_add_fmt: int (struct ldb_message *, const char *, const char *, ...) |
464 | +ldb_msg_add_linearized_dn: int (struct ldb_message *, const char *, struct ldb_dn *) |
465 | +ldb_msg_add_steal_string: int (struct ldb_message *, const char *, char *) |
466 | +ldb_msg_add_steal_value: int (struct ldb_message *, const char *, struct ldb_val *) |
467 | +ldb_msg_add_string: int (struct ldb_message *, const char *, const char *) |
468 | +ldb_msg_add_value: int (struct ldb_message *, const char *, const struct ldb_val *, struct ldb_message_element **) |
469 | +ldb_msg_canonicalize: struct ldb_message *(struct ldb_context *, const struct ldb_message *) |
470 | +ldb_msg_check_string_attribute: int (const struct ldb_message *, const char *, const char *) |
471 | +ldb_msg_copy: struct ldb_message *(TALLOC_CTX *, const struct ldb_message *) |
472 | +ldb_msg_copy_attr: int (struct ldb_message *, const char *, const char *) |
473 | +ldb_msg_copy_shallow: struct ldb_message *(TALLOC_CTX *, const struct ldb_message *) |
474 | +ldb_msg_diff: struct ldb_message *(struct ldb_context *, struct ldb_message *, struct ldb_message *) |
475 | +ldb_msg_difference: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message *, struct ldb_message *, struct ldb_message **) |
476 | +ldb_msg_element_compare: int (struct ldb_message_element *, struct ldb_message_element *) |
477 | +ldb_msg_element_compare_name: int (struct ldb_message_element *, struct ldb_message_element *) |
478 | +ldb_msg_element_equal_ordered: bool (const struct ldb_message_element *, const struct ldb_message_element *) |
479 | +ldb_msg_find_attr_as_bool: int (const struct ldb_message *, const char *, int) |
480 | +ldb_msg_find_attr_as_dn: struct ldb_dn *(struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, const char *) |
481 | +ldb_msg_find_attr_as_double: double (const struct ldb_message *, const char *, double) |
482 | +ldb_msg_find_attr_as_int: int (const struct ldb_message *, const char *, int) |
483 | +ldb_msg_find_attr_as_int64: int64_t (const struct ldb_message *, const char *, int64_t) |
484 | +ldb_msg_find_attr_as_string: const char *(const struct ldb_message *, const char *, const char *) |
485 | +ldb_msg_find_attr_as_uint: unsigned int (const struct ldb_message *, const char *, unsigned int) |
486 | +ldb_msg_find_attr_as_uint64: uint64_t (const struct ldb_message *, const char *, uint64_t) |
487 | +ldb_msg_find_common_values: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message_element *, struct ldb_message_element *, uint32_t) |
488 | +ldb_msg_find_duplicate_val: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message_element *, struct ldb_val **, uint32_t) |
489 | +ldb_msg_find_element: struct ldb_message_element *(const struct ldb_message *, const char *) |
490 | +ldb_msg_find_ldb_val: const struct ldb_val *(const struct ldb_message *, const char *) |
491 | +ldb_msg_find_val: struct ldb_val *(const struct ldb_message_element *, struct ldb_val *) |
492 | +ldb_msg_new: struct ldb_message *(TALLOC_CTX *) |
493 | +ldb_msg_normalize: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_message **) |
494 | +ldb_msg_remove_attr: void (struct ldb_message *, const char *) |
495 | +ldb_msg_remove_element: void (struct ldb_message *, struct ldb_message_element *) |
496 | +ldb_msg_rename_attr: int (struct ldb_message *, const char *, const char *) |
497 | +ldb_msg_sanity_check: int (struct ldb_context *, const struct ldb_message *) |
498 | +ldb_msg_sort_elements: void (struct ldb_message *) |
499 | +ldb_next_del_trans: int (struct ldb_module *) |
500 | +ldb_next_end_trans: int (struct ldb_module *) |
501 | +ldb_next_init: int (struct ldb_module *) |
502 | +ldb_next_prepare_commit: int (struct ldb_module *) |
503 | +ldb_next_read_lock: int (struct ldb_module *) |
504 | +ldb_next_read_unlock: int (struct ldb_module *) |
505 | +ldb_next_remote_request: int (struct ldb_module *, struct ldb_request *) |
506 | +ldb_next_request: int (struct ldb_module *, struct ldb_request *) |
507 | +ldb_next_start_trans: int (struct ldb_module *) |
508 | +ldb_op_default_callback: int (struct ldb_request *, struct ldb_reply *) |
509 | +ldb_options_find: const char *(struct ldb_context *, const char **, const char *) |
510 | +ldb_pack_data: int (struct ldb_context *, const struct ldb_message *, struct ldb_val *) |
511 | +ldb_parse_control_from_string: struct ldb_control *(struct ldb_context *, TALLOC_CTX *, const char *) |
512 | +ldb_parse_control_strings: struct ldb_control **(struct ldb_context *, TALLOC_CTX *, const char **) |
513 | +ldb_parse_tree: struct ldb_parse_tree *(TALLOC_CTX *, const char *) |
514 | +ldb_parse_tree_attr_replace: void (struct ldb_parse_tree *, const char *, const char *) |
515 | +ldb_parse_tree_copy_shallow: struct ldb_parse_tree *(TALLOC_CTX *, const struct ldb_parse_tree *) |
516 | +ldb_parse_tree_walk: int (struct ldb_parse_tree *, int (*)(struct ldb_parse_tree *, void *), void *) |
517 | +ldb_qsort: void (void * const, size_t, size_t, void *, ldb_qsort_cmp_fn_t) |
518 | +ldb_register_backend: int (const char *, ldb_connect_fn, bool) |
519 | +ldb_register_extended_match_rule: int (struct ldb_context *, const struct ldb_extended_match_rule *) |
520 | +ldb_register_hook: int (ldb_hook_fn) |
521 | +ldb_register_module: int (const struct ldb_module_ops *) |
522 | +ldb_rename: int (struct ldb_context *, struct ldb_dn *, struct ldb_dn *) |
523 | +ldb_reply_add_control: int (struct ldb_reply *, const char *, bool, void *) |
524 | +ldb_reply_get_control: struct ldb_control *(struct ldb_reply *, const char *) |
525 | +ldb_req_get_custom_flags: uint32_t (struct ldb_request *) |
526 | +ldb_req_is_untrusted: bool (struct ldb_request *) |
527 | +ldb_req_location: const char *(struct ldb_request *) |
528 | +ldb_req_mark_trusted: void (struct ldb_request *) |
529 | +ldb_req_mark_untrusted: void (struct ldb_request *) |
530 | +ldb_req_set_custom_flags: void (struct ldb_request *, uint32_t) |
531 | +ldb_req_set_location: void (struct ldb_request *, const char *) |
532 | +ldb_request: int (struct ldb_context *, struct ldb_request *) |
533 | +ldb_request_add_control: int (struct ldb_request *, const char *, bool, void *) |
534 | +ldb_request_done: int (struct ldb_request *, int) |
535 | +ldb_request_get_control: struct ldb_control *(struct ldb_request *, const char *) |
536 | +ldb_request_get_status: int (struct ldb_request *) |
537 | +ldb_request_replace_control: int (struct ldb_request *, const char *, bool, void *) |
538 | +ldb_request_set_state: void (struct ldb_request *, int) |
539 | +ldb_reset_err_string: void (struct ldb_context *) |
540 | +ldb_save_controls: int (struct ldb_control *, struct ldb_request *, struct ldb_control ***) |
541 | +ldb_schema_attribute_add: int (struct ldb_context *, const char *, unsigned int, const char *) |
542 | +ldb_schema_attribute_add_with_syntax: int (struct ldb_context *, const char *, unsigned int, const struct ldb_schema_syntax *) |
543 | +ldb_schema_attribute_by_name: const struct ldb_schema_attribute *(struct ldb_context *, const char *) |
544 | +ldb_schema_attribute_fill_with_syntax: int (struct ldb_context *, TALLOC_CTX *, const char *, unsigned int, const struct ldb_schema_syntax *, struct ldb_schema_attribute *) |
545 | +ldb_schema_attribute_remove: void (struct ldb_context *, const char *) |
546 | +ldb_schema_attribute_remove_flagged: void (struct ldb_context *, unsigned int) |
547 | +ldb_schema_attribute_set_override_handler: void (struct ldb_context *, ldb_attribute_handler_override_fn_t, void *) |
548 | +ldb_schema_set_override_GUID_index: void (struct ldb_context *, const char *, const char *) |
549 | +ldb_schema_set_override_indexlist: void (struct ldb_context *, bool) |
550 | +ldb_search: int (struct ldb_context *, TALLOC_CTX *, struct ldb_result **, struct ldb_dn *, enum ldb_scope, const char * const *, const char *, ...) |
551 | +ldb_search_default_callback: int (struct ldb_request *, struct ldb_reply *) |
552 | +ldb_sequence_number: int (struct ldb_context *, enum ldb_sequence_type, uint64_t *) |
553 | +ldb_set_create_perms: void (struct ldb_context *, unsigned int) |
554 | +ldb_set_debug: int (struct ldb_context *, void (*)(void *, enum ldb_debug_level, const char *, va_list), void *) |
555 | +ldb_set_debug_stderr: int (struct ldb_context *) |
556 | +ldb_set_default_dns: void (struct ldb_context *) |
557 | +ldb_set_errstring: void (struct ldb_context *, const char *) |
558 | +ldb_set_event_context: void (struct ldb_context *, struct tevent_context *) |
559 | +ldb_set_flags: void (struct ldb_context *, unsigned int) |
560 | +ldb_set_modules_dir: void (struct ldb_context *, const char *) |
561 | +ldb_set_opaque: int (struct ldb_context *, const char *, void *) |
562 | +ldb_set_require_private_event_context: void (struct ldb_context *) |
563 | +ldb_set_timeout: int (struct ldb_context *, struct ldb_request *, int) |
564 | +ldb_set_timeout_from_prev_req: int (struct ldb_context *, struct ldb_request *, struct ldb_request *) |
565 | +ldb_set_utf8_default: void (struct ldb_context *) |
566 | +ldb_set_utf8_fns: void (struct ldb_context *, void *, char *(*)(void *, void *, const char *, size_t)) |
567 | +ldb_setup_wellknown_attributes: int (struct ldb_context *) |
568 | +ldb_should_b64_encode: int (struct ldb_context *, const struct ldb_val *) |
569 | +ldb_standard_syntax_by_name: const struct ldb_schema_syntax *(struct ldb_context *, const char *) |
570 | +ldb_strerror: const char *(int) |
571 | +ldb_string_to_time: time_t (const char *) |
572 | +ldb_string_utc_to_time: time_t (const char *) |
573 | +ldb_timestring: char *(TALLOC_CTX *, time_t) |
574 | +ldb_timestring_utc: char *(TALLOC_CTX *, time_t) |
575 | +ldb_transaction_cancel: int (struct ldb_context *) |
576 | +ldb_transaction_cancel_noerr: int (struct ldb_context *) |
577 | +ldb_transaction_commit: int (struct ldb_context *) |
578 | +ldb_transaction_prepare_commit: int (struct ldb_context *) |
579 | +ldb_transaction_start: int (struct ldb_context *) |
580 | +ldb_unpack_data: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *) |
581 | +ldb_unpack_data_only_attr_list: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *, const char * const *, unsigned int, unsigned int *) |
582 | +ldb_unpack_data_only_attr_list_flags: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *, const char * const *, unsigned int, unsigned int, unsigned int *) |
583 | +ldb_val_dup: struct ldb_val (TALLOC_CTX *, const struct ldb_val *) |
584 | +ldb_val_equal_exact: int (const struct ldb_val *, const struct ldb_val *) |
585 | +ldb_val_map_local: struct ldb_val (struct ldb_module *, void *, const struct ldb_map_attribute *, const struct ldb_val *) |
586 | +ldb_val_map_remote: struct ldb_val (struct ldb_module *, void *, const struct ldb_map_attribute *, const struct ldb_val *) |
587 | +ldb_val_string_cmp: int (const struct ldb_val *, const char *) |
588 | +ldb_val_to_time: int (const struct ldb_val *, time_t *) |
589 | +ldb_valid_attr_name: int (const char *) |
590 | +ldb_vdebug: void (struct ldb_context *, enum ldb_debug_level, const char *, va_list) |
591 | +ldb_wait: int (struct ldb_handle *, enum ldb_wait_type) |
592 | diff --git a/ABI/ldb-1.5.4.sigs b/ABI/ldb-1.5.4.sigs |
593 | new file mode 100644 |
594 | index 0000000..0c1234f |
595 | --- /dev/null |
596 | +++ b/ABI/ldb-1.5.4.sigs |
597 | @@ -0,0 +1,280 @@ |
598 | +ldb_add: int (struct ldb_context *, const struct ldb_message *) |
599 | +ldb_any_comparison: int (struct ldb_context *, void *, ldb_attr_handler_t, const struct ldb_val *, const struct ldb_val *) |
600 | +ldb_asprintf_errstring: void (struct ldb_context *, const char *, ...) |
601 | +ldb_attr_casefold: char *(TALLOC_CTX *, const char *) |
602 | +ldb_attr_dn: int (const char *) |
603 | +ldb_attr_in_list: int (const char * const *, const char *) |
604 | +ldb_attr_list_copy: const char **(TALLOC_CTX *, const char * const *) |
605 | +ldb_attr_list_copy_add: const char **(TALLOC_CTX *, const char * const *, const char *) |
606 | +ldb_base64_decode: int (char *) |
607 | +ldb_base64_encode: char *(TALLOC_CTX *, const char *, int) |
608 | +ldb_binary_decode: struct ldb_val (TALLOC_CTX *, const char *) |
609 | +ldb_binary_encode: char *(TALLOC_CTX *, struct ldb_val) |
610 | +ldb_binary_encode_string: char *(TALLOC_CTX *, const char *) |
611 | +ldb_build_add_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
612 | +ldb_build_del_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
613 | +ldb_build_extended_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const char *, void *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
614 | +ldb_build_mod_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
615 | +ldb_build_rename_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, struct ldb_dn *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
616 | +ldb_build_search_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, enum ldb_scope, const char *, const char * const *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
617 | +ldb_build_search_req_ex: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, enum ldb_scope, struct ldb_parse_tree *, const char * const *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) |
618 | +ldb_casefold: char *(struct ldb_context *, TALLOC_CTX *, const char *, size_t) |
619 | +ldb_casefold_default: char *(void *, TALLOC_CTX *, const char *, size_t) |
620 | +ldb_check_critical_controls: int (struct ldb_control **) |
621 | +ldb_comparison_binary: int (struct ldb_context *, void *, const struct ldb_val *, const struct ldb_val *) |
622 | +ldb_comparison_fold: int (struct ldb_context *, void *, const struct ldb_val *, const struct ldb_val *) |
623 | +ldb_connect: int (struct ldb_context *, const char *, unsigned int, const char **) |
624 | +ldb_control_to_string: char *(TALLOC_CTX *, const struct ldb_control *) |
625 | +ldb_controls_except_specified: struct ldb_control **(struct ldb_control **, TALLOC_CTX *, struct ldb_control *) |
626 | +ldb_debug: void (struct ldb_context *, enum ldb_debug_level, const char *, ...) |
627 | +ldb_debug_add: void (struct ldb_context *, const char *, ...) |
628 | +ldb_debug_end: void (struct ldb_context *, enum ldb_debug_level) |
629 | +ldb_debug_set: void (struct ldb_context *, enum ldb_debug_level, const char *, ...) |
630 | +ldb_delete: int (struct ldb_context *, struct ldb_dn *) |
631 | +ldb_dn_add_base: bool (struct ldb_dn *, struct ldb_dn *) |
632 | +ldb_dn_add_base_fmt: bool (struct ldb_dn *, const char *, ...) |
633 | +ldb_dn_add_child: bool (struct ldb_dn *, struct ldb_dn *) |
634 | +ldb_dn_add_child_fmt: bool (struct ldb_dn *, const char *, ...) |
635 | +ldb_dn_add_child_val: bool (struct ldb_dn *, const char *, struct ldb_val) |
636 | +ldb_dn_alloc_casefold: char *(TALLOC_CTX *, struct ldb_dn *) |
637 | +ldb_dn_alloc_linearized: char *(TALLOC_CTX *, struct ldb_dn *) |
638 | +ldb_dn_canonical_ex_string: char *(TALLOC_CTX *, struct ldb_dn *) |
639 | +ldb_dn_canonical_string: char *(TALLOC_CTX *, struct ldb_dn *) |
640 | +ldb_dn_check_local: bool (struct ldb_module *, struct ldb_dn *) |
641 | +ldb_dn_check_special: bool (struct ldb_dn *, const char *) |
642 | +ldb_dn_compare: int (struct ldb_dn *, struct ldb_dn *) |
643 | +ldb_dn_compare_base: int (struct ldb_dn *, struct ldb_dn *) |
644 | +ldb_dn_copy: struct ldb_dn *(TALLOC_CTX *, struct ldb_dn *) |
645 | +ldb_dn_escape_value: char *(TALLOC_CTX *, struct ldb_val) |
646 | +ldb_dn_extended_add_syntax: int (struct ldb_context *, unsigned int, const struct ldb_dn_extended_syntax *) |
647 | +ldb_dn_extended_filter: void (struct ldb_dn *, const char * const *) |
648 | +ldb_dn_extended_syntax_by_name: const struct ldb_dn_extended_syntax *(struct ldb_context *, const char *) |
649 | +ldb_dn_from_ldb_val: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const struct ldb_val *) |
650 | +ldb_dn_get_casefold: const char *(struct ldb_dn *) |
651 | +ldb_dn_get_comp_num: int (struct ldb_dn *) |
652 | +ldb_dn_get_component_name: const char *(struct ldb_dn *, unsigned int) |
653 | +ldb_dn_get_component_val: const struct ldb_val *(struct ldb_dn *, unsigned int) |
654 | +ldb_dn_get_extended_comp_num: int (struct ldb_dn *) |
655 | +ldb_dn_get_extended_component: const struct ldb_val *(struct ldb_dn *, const char *) |
656 | +ldb_dn_get_extended_linearized: char *(TALLOC_CTX *, struct ldb_dn *, int) |
657 | +ldb_dn_get_ldb_context: struct ldb_context *(struct ldb_dn *) |
658 | +ldb_dn_get_linearized: const char *(struct ldb_dn *) |
659 | +ldb_dn_get_parent: struct ldb_dn *(TALLOC_CTX *, struct ldb_dn *) |
660 | +ldb_dn_get_rdn_name: const char *(struct ldb_dn *) |
661 | +ldb_dn_get_rdn_val: const struct ldb_val *(struct ldb_dn *) |
662 | +ldb_dn_has_extended: bool (struct ldb_dn *) |
663 | +ldb_dn_is_null: bool (struct ldb_dn *) |
664 | +ldb_dn_is_special: bool (struct ldb_dn *) |
665 | +ldb_dn_is_valid: bool (struct ldb_dn *) |
666 | +ldb_dn_map_local: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *) |
667 | +ldb_dn_map_rebase_remote: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *) |
668 | +ldb_dn_map_remote: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *) |
669 | +ldb_dn_minimise: bool (struct ldb_dn *) |
670 | +ldb_dn_new: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const char *) |
671 | +ldb_dn_new_fmt: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const char *, ...) |
672 | +ldb_dn_remove_base_components: bool (struct ldb_dn *, unsigned int) |
673 | +ldb_dn_remove_child_components: bool (struct ldb_dn *, unsigned int) |
674 | +ldb_dn_remove_extended_components: void (struct ldb_dn *) |
675 | +ldb_dn_replace_components: bool (struct ldb_dn *, struct ldb_dn *) |
676 | +ldb_dn_set_component: int (struct ldb_dn *, int, const char *, const struct ldb_val) |
677 | +ldb_dn_set_extended_component: int (struct ldb_dn *, const char *, const struct ldb_val *) |
678 | +ldb_dn_update_components: int (struct ldb_dn *, const struct ldb_dn *) |
679 | +ldb_dn_validate: bool (struct ldb_dn *) |
680 | +ldb_dump_results: void (struct ldb_context *, struct ldb_result *, FILE *) |
681 | +ldb_error_at: int (struct ldb_context *, int, const char *, const char *, int) |
682 | +ldb_errstring: const char *(struct ldb_context *) |
683 | +ldb_extended: int (struct ldb_context *, const char *, void *, struct ldb_result **) |
684 | +ldb_extended_default_callback: int (struct ldb_request *, struct ldb_reply *) |
685 | +ldb_filter_from_tree: char *(TALLOC_CTX *, const struct ldb_parse_tree *) |
686 | +ldb_get_config_basedn: struct ldb_dn *(struct ldb_context *) |
687 | +ldb_get_create_perms: unsigned int (struct ldb_context *) |
688 | +ldb_get_default_basedn: struct ldb_dn *(struct ldb_context *) |
689 | +ldb_get_event_context: struct tevent_context *(struct ldb_context *) |
690 | +ldb_get_flags: unsigned int (struct ldb_context *) |
691 | +ldb_get_opaque: void *(struct ldb_context *, const char *) |
692 | +ldb_get_root_basedn: struct ldb_dn *(struct ldb_context *) |
693 | +ldb_get_schema_basedn: struct ldb_dn *(struct ldb_context *) |
694 | +ldb_global_init: int (void) |
695 | +ldb_handle_get_event_context: struct tevent_context *(struct ldb_handle *) |
696 | +ldb_handle_new: struct ldb_handle *(TALLOC_CTX *, struct ldb_context *) |
697 | +ldb_handle_use_global_event_context: void (struct ldb_handle *) |
698 | +ldb_handler_copy: int (struct ldb_context *, void *, const struct ldb_val *, struct ldb_val *) |
699 | +ldb_handler_fold: int (struct ldb_context *, void *, const struct ldb_val *, struct ldb_val *) |
700 | +ldb_init: struct ldb_context *(TALLOC_CTX *, struct tevent_context *) |
701 | +ldb_ldif_message_redacted_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *) |
702 | +ldb_ldif_message_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *) |
703 | +ldb_ldif_parse_modrdn: int (struct ldb_context *, const struct ldb_ldif *, TALLOC_CTX *, struct ldb_dn **, struct ldb_dn **, bool *, struct ldb_dn **, struct ldb_dn **) |
704 | +ldb_ldif_read: struct ldb_ldif *(struct ldb_context *, int (*)(void *), void *) |
705 | +ldb_ldif_read_file: struct ldb_ldif *(struct ldb_context *, FILE *) |
706 | +ldb_ldif_read_file_state: struct ldb_ldif *(struct ldb_context *, struct ldif_read_file_state *) |
707 | +ldb_ldif_read_free: void (struct ldb_context *, struct ldb_ldif *) |
708 | +ldb_ldif_read_string: struct ldb_ldif *(struct ldb_context *, const char **) |
709 | +ldb_ldif_write: int (struct ldb_context *, int (*)(void *, const char *, ...), void *, const struct ldb_ldif *) |
710 | +ldb_ldif_write_file: int (struct ldb_context *, FILE *, const struct ldb_ldif *) |
711 | +ldb_ldif_write_redacted_trace_string: char *(struct ldb_context *, TALLOC_CTX *, const struct ldb_ldif *) |
712 | +ldb_ldif_write_string: char *(struct ldb_context *, TALLOC_CTX *, const struct ldb_ldif *) |
713 | +ldb_load_modules: int (struct ldb_context *, const char **) |
714 | +ldb_map_add: int (struct ldb_module *, struct ldb_request *) |
715 | +ldb_map_delete: int (struct ldb_module *, struct ldb_request *) |
716 | +ldb_map_init: int (struct ldb_module *, const struct ldb_map_attribute *, const struct ldb_map_objectclass *, const char * const *, const char *, const char *) |
717 | +ldb_map_modify: int (struct ldb_module *, struct ldb_request *) |
718 | +ldb_map_rename: int (struct ldb_module *, struct ldb_request *) |
719 | +ldb_map_search: int (struct ldb_module *, struct ldb_request *) |
720 | +ldb_match_message: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, enum ldb_scope, bool *) |
721 | +ldb_match_msg: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, struct ldb_dn *, enum ldb_scope) |
722 | +ldb_match_msg_error: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, struct ldb_dn *, enum ldb_scope, bool *) |
723 | +ldb_match_msg_objectclass: int (const struct ldb_message *, const char *) |
724 | +ldb_mod_register_control: int (struct ldb_module *, const char *) |
725 | +ldb_modify: int (struct ldb_context *, const struct ldb_message *) |
726 | +ldb_modify_default_callback: int (struct ldb_request *, struct ldb_reply *) |
727 | +ldb_module_call_chain: char *(struct ldb_request *, TALLOC_CTX *) |
728 | +ldb_module_connect_backend: int (struct ldb_context *, const char *, const char **, struct ldb_module **) |
729 | +ldb_module_done: int (struct ldb_request *, struct ldb_control **, struct ldb_extended *, int) |
730 | +ldb_module_flags: uint32_t (struct ldb_context *) |
731 | +ldb_module_get_ctx: struct ldb_context *(struct ldb_module *) |
732 | +ldb_module_get_name: const char *(struct ldb_module *) |
733 | +ldb_module_get_ops: const struct ldb_module_ops *(struct ldb_module *) |
734 | +ldb_module_get_private: void *(struct ldb_module *) |
735 | +ldb_module_init_chain: int (struct ldb_context *, struct ldb_module *) |
736 | +ldb_module_load_list: int (struct ldb_context *, const char **, struct ldb_module *, struct ldb_module **) |
737 | +ldb_module_new: struct ldb_module *(TALLOC_CTX *, struct ldb_context *, const char *, const struct ldb_module_ops *) |
738 | +ldb_module_next: struct ldb_module *(struct ldb_module *) |
739 | +ldb_module_popt_options: struct poptOption **(struct ldb_context *) |
740 | +ldb_module_send_entry: int (struct ldb_request *, struct ldb_message *, struct ldb_control **) |
741 | +ldb_module_send_referral: int (struct ldb_request *, char *) |
742 | +ldb_module_set_next: void (struct ldb_module *, struct ldb_module *) |
743 | +ldb_module_set_private: void (struct ldb_module *, void *) |
744 | +ldb_modules_hook: int (struct ldb_context *, enum ldb_module_hook_type) |
745 | +ldb_modules_list_from_string: const char **(struct ldb_context *, TALLOC_CTX *, const char *) |
746 | +ldb_modules_load: int (const char *, const char *) |
747 | +ldb_msg_add: int (struct ldb_message *, const struct ldb_message_element *, int) |
748 | +ldb_msg_add_empty: int (struct ldb_message *, const char *, int, struct ldb_message_element **) |
749 | +ldb_msg_add_fmt: int (struct ldb_message *, const char *, const char *, ...) |
750 | +ldb_msg_add_linearized_dn: int (struct ldb_message *, const char *, struct ldb_dn *) |
751 | +ldb_msg_add_steal_string: int (struct ldb_message *, const char *, char *) |
752 | +ldb_msg_add_steal_value: int (struct ldb_message *, const char *, struct ldb_val *) |
753 | +ldb_msg_add_string: int (struct ldb_message *, const char *, const char *) |
754 | +ldb_msg_add_value: int (struct ldb_message *, const char *, const struct ldb_val *, struct ldb_message_element **) |
755 | +ldb_msg_canonicalize: struct ldb_message *(struct ldb_context *, const struct ldb_message *) |
756 | +ldb_msg_check_string_attribute: int (const struct ldb_message *, const char *, const char *) |
757 | +ldb_msg_copy: struct ldb_message *(TALLOC_CTX *, const struct ldb_message *) |
758 | +ldb_msg_copy_attr: int (struct ldb_message *, const char *, const char *) |
759 | +ldb_msg_copy_shallow: struct ldb_message *(TALLOC_CTX *, const struct ldb_message *) |
760 | +ldb_msg_diff: struct ldb_message *(struct ldb_context *, struct ldb_message *, struct ldb_message *) |
761 | +ldb_msg_difference: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message *, struct ldb_message *, struct ldb_message **) |
762 | +ldb_msg_element_compare: int (struct ldb_message_element *, struct ldb_message_element *) |
763 | +ldb_msg_element_compare_name: int (struct ldb_message_element *, struct ldb_message_element *) |
764 | +ldb_msg_element_equal_ordered: bool (const struct ldb_message_element *, const struct ldb_message_element *) |
765 | +ldb_msg_find_attr_as_bool: int (const struct ldb_message *, const char *, int) |
766 | +ldb_msg_find_attr_as_dn: struct ldb_dn *(struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, const char *) |
767 | +ldb_msg_find_attr_as_double: double (const struct ldb_message *, const char *, double) |
768 | +ldb_msg_find_attr_as_int: int (const struct ldb_message *, const char *, int) |
769 | +ldb_msg_find_attr_as_int64: int64_t (const struct ldb_message *, const char *, int64_t) |
770 | +ldb_msg_find_attr_as_string: const char *(const struct ldb_message *, const char *, const char *) |
771 | +ldb_msg_find_attr_as_uint: unsigned int (const struct ldb_message *, const char *, unsigned int) |
772 | +ldb_msg_find_attr_as_uint64: uint64_t (const struct ldb_message *, const char *, uint64_t) |
773 | +ldb_msg_find_common_values: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message_element *, struct ldb_message_element *, uint32_t) |
774 | +ldb_msg_find_duplicate_val: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message_element *, struct ldb_val **, uint32_t) |
775 | +ldb_msg_find_element: struct ldb_message_element *(const struct ldb_message *, const char *) |
776 | +ldb_msg_find_ldb_val: const struct ldb_val *(const struct ldb_message *, const char *) |
777 | +ldb_msg_find_val: struct ldb_val *(const struct ldb_message_element *, struct ldb_val *) |
778 | +ldb_msg_new: struct ldb_message *(TALLOC_CTX *) |
779 | +ldb_msg_normalize: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_message **) |
780 | +ldb_msg_remove_attr: void (struct ldb_message *, const char *) |
781 | +ldb_msg_remove_element: void (struct ldb_message *, struct ldb_message_element *) |
782 | +ldb_msg_rename_attr: int (struct ldb_message *, const char *, const char *) |
783 | +ldb_msg_sanity_check: int (struct ldb_context *, const struct ldb_message *) |
784 | +ldb_msg_sort_elements: void (struct ldb_message *) |
785 | +ldb_next_del_trans: int (struct ldb_module *) |
786 | +ldb_next_end_trans: int (struct ldb_module *) |
787 | +ldb_next_init: int (struct ldb_module *) |
788 | +ldb_next_prepare_commit: int (struct ldb_module *) |
789 | +ldb_next_read_lock: int (struct ldb_module *) |
790 | +ldb_next_read_unlock: int (struct ldb_module *) |
791 | +ldb_next_remote_request: int (struct ldb_module *, struct ldb_request *) |
792 | +ldb_next_request: int (struct ldb_module *, struct ldb_request *) |
793 | +ldb_next_start_trans: int (struct ldb_module *) |
794 | +ldb_op_default_callback: int (struct ldb_request *, struct ldb_reply *) |
795 | +ldb_options_find: const char *(struct ldb_context *, const char **, const char *) |
796 | +ldb_pack_data: int (struct ldb_context *, const struct ldb_message *, struct ldb_val *) |
797 | +ldb_parse_control_from_string: struct ldb_control *(struct ldb_context *, TALLOC_CTX *, const char *) |
798 | +ldb_parse_control_strings: struct ldb_control **(struct ldb_context *, TALLOC_CTX *, const char **) |
799 | +ldb_parse_tree: struct ldb_parse_tree *(TALLOC_CTX *, const char *) |
800 | +ldb_parse_tree_attr_replace: void (struct ldb_parse_tree *, const char *, const char *) |
801 | +ldb_parse_tree_copy_shallow: struct ldb_parse_tree *(TALLOC_CTX *, const struct ldb_parse_tree *) |
802 | +ldb_parse_tree_walk: int (struct ldb_parse_tree *, int (*)(struct ldb_parse_tree *, void *), void *) |
803 | +ldb_qsort: void (void * const, size_t, size_t, void *, ldb_qsort_cmp_fn_t) |
804 | +ldb_register_backend: int (const char *, ldb_connect_fn, bool) |
805 | +ldb_register_extended_match_rule: int (struct ldb_context *, const struct ldb_extended_match_rule *) |
806 | +ldb_register_hook: int (ldb_hook_fn) |
807 | +ldb_register_module: int (const struct ldb_module_ops *) |
808 | +ldb_rename: int (struct ldb_context *, struct ldb_dn *, struct ldb_dn *) |
809 | +ldb_reply_add_control: int (struct ldb_reply *, const char *, bool, void *) |
810 | +ldb_reply_get_control: struct ldb_control *(struct ldb_reply *, const char *) |
811 | +ldb_req_get_custom_flags: uint32_t (struct ldb_request *) |
812 | +ldb_req_is_untrusted: bool (struct ldb_request *) |
813 | +ldb_req_location: const char *(struct ldb_request *) |
814 | +ldb_req_mark_trusted: void (struct ldb_request *) |
815 | +ldb_req_mark_untrusted: void (struct ldb_request *) |
816 | +ldb_req_set_custom_flags: void (struct ldb_request *, uint32_t) |
817 | +ldb_req_set_location: void (struct ldb_request *, const char *) |
818 | +ldb_request: int (struct ldb_context *, struct ldb_request *) |
819 | +ldb_request_add_control: int (struct ldb_request *, const char *, bool, void *) |
820 | +ldb_request_done: int (struct ldb_request *, int) |
821 | +ldb_request_get_control: struct ldb_control *(struct ldb_request *, const char *) |
822 | +ldb_request_get_status: int (struct ldb_request *) |
823 | +ldb_request_replace_control: int (struct ldb_request *, const char *, bool, void *) |
824 | +ldb_request_set_state: void (struct ldb_request *, int) |
825 | +ldb_reset_err_string: void (struct ldb_context *) |
826 | +ldb_save_controls: int (struct ldb_control *, struct ldb_request *, struct ldb_control ***) |
827 | +ldb_schema_attribute_add: int (struct ldb_context *, const char *, unsigned int, const char *) |
828 | +ldb_schema_attribute_add_with_syntax: int (struct ldb_context *, const char *, unsigned int, const struct ldb_schema_syntax *) |
829 | +ldb_schema_attribute_by_name: const struct ldb_schema_attribute *(struct ldb_context *, const char *) |
830 | +ldb_schema_attribute_fill_with_syntax: int (struct ldb_context *, TALLOC_CTX *, const char *, unsigned int, const struct ldb_schema_syntax *, struct ldb_schema_attribute *) |
831 | +ldb_schema_attribute_remove: void (struct ldb_context *, const char *) |
832 | +ldb_schema_attribute_remove_flagged: void (struct ldb_context *, unsigned int) |
833 | +ldb_schema_attribute_set_override_handler: void (struct ldb_context *, ldb_attribute_handler_override_fn_t, void *) |
834 | +ldb_schema_set_override_GUID_index: void (struct ldb_context *, const char *, const char *) |
835 | +ldb_schema_set_override_indexlist: void (struct ldb_context *, bool) |
836 | +ldb_search: int (struct ldb_context *, TALLOC_CTX *, struct ldb_result **, struct ldb_dn *, enum ldb_scope, const char * const *, const char *, ...) |
837 | +ldb_search_default_callback: int (struct ldb_request *, struct ldb_reply *) |
838 | +ldb_sequence_number: int (struct ldb_context *, enum ldb_sequence_type, uint64_t *) |
839 | +ldb_set_create_perms: void (struct ldb_context *, unsigned int) |
840 | +ldb_set_debug: int (struct ldb_context *, void (*)(void *, enum ldb_debug_level, const char *, va_list), void *) |
841 | +ldb_set_debug_stderr: int (struct ldb_context *) |
842 | +ldb_set_default_dns: void (struct ldb_context *) |
843 | +ldb_set_errstring: void (struct ldb_context *, const char *) |
844 | +ldb_set_event_context: void (struct ldb_context *, struct tevent_context *) |
845 | +ldb_set_flags: void (struct ldb_context *, unsigned int) |
846 | +ldb_set_modules_dir: void (struct ldb_context *, const char *) |
847 | +ldb_set_opaque: int (struct ldb_context *, const char *, void *) |
848 | +ldb_set_require_private_event_context: void (struct ldb_context *) |
849 | +ldb_set_timeout: int (struct ldb_context *, struct ldb_request *, int) |
850 | +ldb_set_timeout_from_prev_req: int (struct ldb_context *, struct ldb_request *, struct ldb_request *) |
851 | +ldb_set_utf8_default: void (struct ldb_context *) |
852 | +ldb_set_utf8_fns: void (struct ldb_context *, void *, char *(*)(void *, void *, const char *, size_t)) |
853 | +ldb_setup_wellknown_attributes: int (struct ldb_context *) |
854 | +ldb_should_b64_encode: int (struct ldb_context *, const struct ldb_val *) |
855 | +ldb_standard_syntax_by_name: const struct ldb_schema_syntax *(struct ldb_context *, const char *) |
856 | +ldb_strerror: const char *(int) |
857 | +ldb_string_to_time: time_t (const char *) |
858 | +ldb_string_utc_to_time: time_t (const char *) |
859 | +ldb_timestring: char *(TALLOC_CTX *, time_t) |
860 | +ldb_timestring_utc: char *(TALLOC_CTX *, time_t) |
861 | +ldb_transaction_cancel: int (struct ldb_context *) |
862 | +ldb_transaction_cancel_noerr: int (struct ldb_context *) |
863 | +ldb_transaction_commit: int (struct ldb_context *) |
864 | +ldb_transaction_prepare_commit: int (struct ldb_context *) |
865 | +ldb_transaction_start: int (struct ldb_context *) |
866 | +ldb_unpack_data: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *) |
867 | +ldb_unpack_data_only_attr_list: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *, const char * const *, unsigned int, unsigned int *) |
868 | +ldb_unpack_data_only_attr_list_flags: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *, const char * const *, unsigned int, unsigned int, unsigned int *) |
869 | +ldb_val_dup: struct ldb_val (TALLOC_CTX *, const struct ldb_val *) |
870 | +ldb_val_equal_exact: int (const struct ldb_val *, const struct ldb_val *) |
871 | +ldb_val_map_local: struct ldb_val (struct ldb_module *, void *, const struct ldb_map_attribute *, const struct ldb_val *) |
872 | +ldb_val_map_remote: struct ldb_val (struct ldb_module *, void *, const struct ldb_map_attribute *, const struct ldb_val *) |
873 | +ldb_val_string_cmp: int (const struct ldb_val *, const char *) |
874 | +ldb_val_to_time: int (const struct ldb_val *, time_t *) |
875 | +ldb_valid_attr_name: int (const char *) |
876 | +ldb_vdebug: void (struct ldb_context *, enum ldb_debug_level, const char *, va_list) |
877 | +ldb_wait: int (struct ldb_handle *, enum ldb_wait_type) |
878 | diff --git a/ABI/pyldb-util-1.4.2.sigs b/ABI/pyldb-util-1.5.0.sigs |
879 | similarity index 100% |
880 | rename from ABI/pyldb-util-1.4.2.sigs |
881 | rename to ABI/pyldb-util-1.5.0.sigs |
882 | diff --git a/ABI/pyldb-util-1.4.3.sigs b/ABI/pyldb-util-1.5.1.sigs |
883 | similarity index 100% |
884 | rename from ABI/pyldb-util-1.4.3.sigs |
885 | rename to ABI/pyldb-util-1.5.1.sigs |
886 | diff --git a/ABI/pyldb-util.py3-1.4.2.sigs b/ABI/pyldb-util-1.5.2.sigs |
887 | similarity index 100% |
888 | rename from ABI/pyldb-util.py3-1.4.2.sigs |
889 | rename to ABI/pyldb-util-1.5.2.sigs |
890 | diff --git a/ABI/pyldb-util.py3-1.4.3.sigs b/ABI/pyldb-util-1.5.3.sigs |
891 | similarity index 100% |
892 | rename from ABI/pyldb-util.py3-1.4.3.sigs |
893 | rename to ABI/pyldb-util-1.5.3.sigs |
894 | diff --git a/ABI/pyldb-util-1.5.4.sigs b/ABI/pyldb-util-1.5.4.sigs |
895 | new file mode 100644 |
896 | index 0000000..74d6719 |
897 | --- /dev/null |
898 | +++ b/ABI/pyldb-util-1.5.4.sigs |
899 | @@ -0,0 +1,2 @@ |
900 | +pyldb_Dn_FromDn: PyObject *(struct ldb_dn *) |
901 | +pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **) |
902 | diff --git a/ABI/pyldb-util.py3-1.5.0.sigs b/ABI/pyldb-util.py3-1.5.0.sigs |
903 | new file mode 100644 |
904 | index 0000000..74d6719 |
905 | --- /dev/null |
906 | +++ b/ABI/pyldb-util.py3-1.5.0.sigs |
907 | @@ -0,0 +1,2 @@ |
908 | +pyldb_Dn_FromDn: PyObject *(struct ldb_dn *) |
909 | +pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **) |
910 | diff --git a/ABI/pyldb-util.py3-1.5.1.sigs b/ABI/pyldb-util.py3-1.5.1.sigs |
911 | new file mode 100644 |
912 | index 0000000..74d6719 |
913 | --- /dev/null |
914 | +++ b/ABI/pyldb-util.py3-1.5.1.sigs |
915 | @@ -0,0 +1,2 @@ |
916 | +pyldb_Dn_FromDn: PyObject *(struct ldb_dn *) |
917 | +pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **) |
918 | diff --git a/ABI/pyldb-util.py3-1.5.2.sigs b/ABI/pyldb-util.py3-1.5.2.sigs |
919 | new file mode 100644 |
920 | index 0000000..74d6719 |
921 | --- /dev/null |
922 | +++ b/ABI/pyldb-util.py3-1.5.2.sigs |
923 | @@ -0,0 +1,2 @@ |
924 | +pyldb_Dn_FromDn: PyObject *(struct ldb_dn *) |
925 | +pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **) |
926 | diff --git a/ABI/pyldb-util.py3-1.5.3.sigs b/ABI/pyldb-util.py3-1.5.3.sigs |
927 | new file mode 100644 |
928 | index 0000000..74d6719 |
929 | --- /dev/null |
930 | +++ b/ABI/pyldb-util.py3-1.5.3.sigs |
931 | @@ -0,0 +1,2 @@ |
932 | +pyldb_Dn_FromDn: PyObject *(struct ldb_dn *) |
933 | +pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **) |
934 | diff --git a/ABI/pyldb-util.py3-1.5.4.sigs b/ABI/pyldb-util.py3-1.5.4.sigs |
935 | new file mode 100644 |
936 | index 0000000..74d6719 |
937 | --- /dev/null |
938 | +++ b/ABI/pyldb-util.py3-1.5.4.sigs |
939 | @@ -0,0 +1,2 @@ |
940 | +pyldb_Dn_FromDn: PyObject *(struct ldb_dn *) |
941 | +pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **) |
942 | diff --git a/Makefile b/Makefile |
943 | index 5acfcbc..b82723f 100644 |
944 | --- a/Makefile |
945 | +++ b/Makefile |
946 | @@ -1,6 +1,8 @@ |
947 | # simple makefile wrapper to run waf |
948 | |
949 | -WAF=WAF_MAKE=1 PATH=buildtools/bin:../../buildtools/bin:$$PATH waf |
950 | +WAF_BIN=`PATH=buildtools/bin:../../buildtools/bin:$$PATH which waf` |
951 | +WAF_BINARY=$(PYTHON) $(WAF_BIN) |
952 | +WAF=PYTHONHASHSEED=1 WAF_MAKE=1 $(WAF_BINARY) |
953 | |
954 | all: |
955 | $(WAF) build |
956 | diff --git a/_ldb_text.py b/_ldb_text.py |
957 | index f6f1ac0..e0505e1 100644 |
958 | --- a/_ldb_text.py |
959 | +++ b/_ldb_text.py |
960 | @@ -3,9 +3,6 @@ |
961 | # Copyright (C) 2015 Petr Viktorin <pviktori@redhat.com> |
962 | # Published under the GNU LGPLv3 or later |
963 | |
964 | -import sys |
965 | -import functools |
966 | - |
967 | import ldb |
968 | |
969 | |
970 | @@ -92,6 +89,7 @@ class MessageElementTextWrapper(_WrapBase): |
971 | def set_flags(self): |
972 | return self._wrapped.set_flags |
973 | |
974 | + |
975 | _wrap_element = MessageElementTextWrapper._wrap |
976 | |
977 | |
978 | diff --git a/buildtools/bin/waf b/buildtools/bin/waf |
979 | index 1b0f466..3ee4d5b 100755 |
980 | --- a/buildtools/bin/waf |
981 | +++ b/buildtools/bin/waf |
982 | @@ -1,7 +1,7 @@ |
983 | -#!/usr/bin/env python |
984 | -# encoding: ISO-8859-1 |
985 | -# Thomas Nagy, 2005-2010 |
986 | - |
987 | +#!/usr/bin/env python3 |
988 | +# encoding: latin-1 |
989 | +# Thomas Nagy, 2005-2018 |
990 | +# |
991 | """ |
992 | Redistribution and use in source and binary forms, with or without |
993 | modification, are permitted provided that the following conditions |
994 | @@ -30,25 +30,24 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
995 | POSSIBILITY OF SUCH DAMAGE. |
996 | """ |
997 | |
998 | -import os, sys |
999 | -if sys.hexversion<0x203000f: raise ImportError("Waf requires Python >= 2.3") |
1000 | - |
1001 | -if 'PSYCOWAF' in os.environ: |
1002 | - try:import psyco;psyco.full() |
1003 | - except:pass |
1004 | +import os, sys, inspect |
1005 | |
1006 | -VERSION="1.5.19" |
1007 | +VERSION="2.0.8" |
1008 | REVISION="x" |
1009 | +GIT="x" |
1010 | INSTALL="x" |
1011 | C1='x' |
1012 | C2='x' |
1013 | +C3='x' |
1014 | cwd = os.getcwd() |
1015 | join = os.path.join |
1016 | |
1017 | +if sys.hexversion<0x206000f: |
1018 | + raise ImportError('Python >= 2.6 is required to create the waf file') |
1019 | + |
1020 | WAF='waf' |
1021 | def b(x): |
1022 | return x |
1023 | - |
1024 | if sys.hexversion>0x300000f: |
1025 | WAF='waf3' |
1026 | def b(x): |
1027 | @@ -58,20 +57,111 @@ def err(m): |
1028 | print(('\033[91mError: %s\033[0m' % m)) |
1029 | sys.exit(1) |
1030 | |
1031 | -def test(dir): |
1032 | - try: os.stat(join(dir, 'wafadmin')); return os.path.abspath(dir) |
1033 | +def unpack_wafdir(dir, src): |
1034 | + f = open(src,'rb') |
1035 | + c = 'corrupt archive (%d)' |
1036 | + while 1: |
1037 | + line = f.readline() |
1038 | + if not line: err('run waf-light from a folder containing waflib') |
1039 | + if line == b('#==>\n'): |
1040 | + txt = f.readline() |
1041 | + if not txt: err(c % 1) |
1042 | + if f.readline() != b('#<==\n'): err(c % 2) |
1043 | + break |
1044 | + if not txt: err(c % 3) |
1045 | + txt = txt[1:-1].replace(b(C1), b('\n')).replace(b(C2), b('\r')).replace(b(C3), b('\x00')) |
1046 | + |
1047 | + import shutil, tarfile |
1048 | + try: shutil.rmtree(dir) |
1049 | except OSError: pass |
1050 | + try: |
1051 | + for x in ('Tools', 'extras'): |
1052 | + os.makedirs(join(dir, 'waflib', x)) |
1053 | + except OSError: |
1054 | + err("Cannot unpack waf lib into %s\nMove waf in a writable directory" % dir) |
1055 | + |
1056 | + os.chdir(dir) |
1057 | + tmp = 't.bz2' |
1058 | + t = open(tmp,'wb') |
1059 | + try: t.write(txt) |
1060 | + finally: t.close() |
1061 | + |
1062 | + try: |
1063 | + t = tarfile.open(tmp) |
1064 | + except: |
1065 | + try: |
1066 | + os.system('bunzip2 t.bz2') |
1067 | + t = tarfile.open('t') |
1068 | + tmp = 't' |
1069 | + except: |
1070 | + os.chdir(cwd) |
1071 | + try: shutil.rmtree(dir) |
1072 | + except OSError: pass |
1073 | + err("Waf cannot be unpacked, check that bzip2 support is present") |
1074 | + |
1075 | + try: |
1076 | + for x in t: t.extract(x) |
1077 | + finally: |
1078 | + t.close() |
1079 | + |
1080 | + for x in ('Tools', 'extras'): |
1081 | + os.chmod(join('waflib',x), 493) |
1082 | + |
1083 | + if sys.hexversion<0x300000f: |
1084 | + sys.path = [join(dir, 'waflib')] + sys.path |
1085 | + import fixpy2 |
1086 | + fixpy2.fixdir(dir) |
1087 | + |
1088 | + os.remove(tmp) |
1089 | + os.chdir(cwd) |
1090 | + |
1091 | + try: dir = unicode(dir, 'mbcs') |
1092 | + except: pass |
1093 | + try: |
1094 | + from ctypes import windll |
1095 | + windll.kernel32.SetFileAttributesW(dir, 2) |
1096 | + except: |
1097 | + pass |
1098 | + |
1099 | +def test(dir): |
1100 | + try: |
1101 | + os.stat(join(dir, 'waflib')) |
1102 | + return os.path.abspath(dir) |
1103 | + except OSError: |
1104 | + pass |
1105 | |
1106 | def find_lib(): |
1107 | - return os.path.abspath(os.path.join(os.path.dirname(__file__), '../../third_party/waf')) |
1108 | + path = '../../third_party/waf' |
1109 | + paths = [path, path+'/waflib'] |
1110 | + return [os.path.abspath(os.path.join(os.path.dirname(__file__), x)) for x in paths] |
1111 | |
1112 | wafdir = find_lib() |
1113 | -w = join(wafdir, 'wafadmin') |
1114 | -t = join(w, 'Tools') |
1115 | -f = join(w, '3rdparty') |
1116 | -sys.path = [w, t, f] + sys.path |
1117 | +for p in wafdir: |
1118 | + sys.path.insert(0, p) |
1119 | |
1120 | if __name__ == '__main__': |
1121 | - import Scripting |
1122 | - Scripting.prepare(t, cwd, VERSION, wafdir) |
1123 | + #import extras.compat15#PRELUDE |
1124 | + import sys |
1125 | + |
1126 | + from waflib.Tools import ccroot, c, ar, compiler_c, gcc |
1127 | + sys.modules['cc'] = c |
1128 | + sys.modules['ccroot'] = ccroot |
1129 | + sys.modules['ar'] = ar |
1130 | + sys.modules['compiler_cc'] = compiler_c |
1131 | + sys.modules['gcc'] = gcc |
1132 | + |
1133 | + from waflib import Options |
1134 | + Options.lockfile = os.environ.get('WAFLOCK', '.lock-wscript') |
1135 | + if os.path.isfile(Options.lockfile) and os.stat(Options.lockfile).st_size == 0: |
1136 | + os.environ['NOCLIMB'] = "1" |
1137 | + # there is a single top-level, but libraries must build independently |
1138 | + os.environ['NO_LOCK_IN_TOP'] = "1" |
1139 | + |
1140 | + from waflib import Task |
1141 | + class o(object): |
1142 | + display = None |
1143 | + Task.classes['cc_link'] = o |
1144 | + |
1145 | + from waflib import Scripting |
1146 | + Scripting.waf_entry_point(cwd, VERSION, wafdir[0]) |
1147 | |
1148 | diff --git a/buildtools/examples/run_on_target.py b/buildtools/examples/run_on_target.py |
1149 | index 8322759..79c5730 100755 |
1150 | --- a/buildtools/examples/run_on_target.py |
1151 | +++ b/buildtools/examples/run_on_target.py |
1152 | @@ -1,4 +1,4 @@ |
1153 | -#!/usr/bin/env python |
1154 | +#!/usr/bin/env python3 |
1155 | |
1156 | # |
1157 | # Sample run-on-target script |
1158 | diff --git a/buildtools/wafsamba/configure_file.py b/buildtools/wafsamba/configure_file.py |
1159 | index e28282b..6ad4354 100644 |
1160 | --- a/buildtools/wafsamba/configure_file.py |
1161 | +++ b/buildtools/wafsamba/configure_file.py |
1162 | @@ -1,7 +1,9 @@ |
1163 | # handle substitution of variables in .in files |
1164 | |
1165 | -import re, os |
1166 | -import Build, sys, Logs |
1167 | +import sys |
1168 | +import re |
1169 | +import os |
1170 | +from waflib import Build, Logs |
1171 | from samba_utils import SUBST_VARS_RECURSIVE |
1172 | |
1173 | def subst_at_vars(task): |
1174 | diff --git a/buildtools/wafsamba/generic_cc.py b/buildtools/wafsamba/generic_cc.py |
1175 | index 504e902..1352c54 100644 |
1176 | --- a/buildtools/wafsamba/generic_cc.py |
1177 | +++ b/buildtools/wafsamba/generic_cc.py |
1178 | @@ -3,69 +3,68 @@ |
1179 | # based on suncc.py from waf |
1180 | |
1181 | import os, optparse |
1182 | -import Utils, Options, Configure |
1183 | -import ccroot, ar |
1184 | -from Configure import conftest |
1185 | +from waflib import Errors |
1186 | +from waflib.Tools import ccroot, ar |
1187 | +from waflib.Configure import conf |
1188 | |
1189 | -from compiler_cc import c_compiler |
1190 | +# |
1191 | +# Let waflib provide useful defaults, but |
1192 | +# provide generic_cc as last resort fallback on |
1193 | +# all platforms |
1194 | +# |
1195 | +from waflib.Tools.compiler_c import c_compiler |
1196 | +for key in c_compiler.keys(): |
1197 | + c_compiler[key].append('generic_cc') |
1198 | |
1199 | -c_compiler['default'] = ['gcc', 'generic_cc'] |
1200 | -c_compiler['hpux'] = ['gcc', 'generic_cc'] |
1201 | - |
1202 | -@conftest |
1203 | +@conf |
1204 | def find_generic_cc(conf): |
1205 | v = conf.env |
1206 | cc = None |
1207 | - if v['CC']: cc = v['CC'] |
1208 | - elif 'CC' in conf.environ: cc = conf.environ['CC'] |
1209 | - if not cc: cc = conf.find_program('cc', var='CC') |
1210 | - if not cc: conf.fatal('generic_cc was not found') |
1211 | - cc = conf.cmd_to_list(cc) |
1212 | - v['CC'] = cc |
1213 | - v['CC_NAME'] = 'generic' |
1214 | - |
1215 | -@conftest |
1216 | -def generic_cc_common_flags(conf): |
1217 | - v = conf.env |
1218 | + if v.CC: |
1219 | + cc = v.CC |
1220 | + elif 'CC' in conf.environ: |
1221 | + cc = conf.environ['CC'] |
1222 | + if not cc: |
1223 | + cc = conf.find_program('cc', var='CC') |
1224 | + if not cc: |
1225 | + conf.fatal('generic_cc was not found') |
1226 | |
1227 | - v['CC_SRC_F'] = '' |
1228 | - v['CC_TGT_F'] = ['-c', '-o', ''] |
1229 | - v['CPPPATH_ST'] = '-I%s' # template for adding include paths |
1230 | + try: |
1231 | + conf.cmd_and_log(cc + ['--version']) |
1232 | + except Errors.WafError: |
1233 | + conf.fatal('%r --version could not be executed' % cc) |
1234 | |
1235 | - # linker |
1236 | - if not v['LINK_CC']: v['LINK_CC'] = v['CC'] |
1237 | - v['CCLNK_SRC_F'] = '' |
1238 | - v['CCLNK_TGT_F'] = ['-o', ''] |
1239 | + v.CC = cc |
1240 | + v.CC_NAME = 'generic_cc' |
1241 | |
1242 | - v['LIB_ST'] = '-l%s' # template for adding libs |
1243 | - v['LIBPATH_ST'] = '-L%s' # template for adding libpaths |
1244 | - v['STATICLIB_ST'] = '-l%s' |
1245 | - v['STATICLIBPATH_ST'] = '-L%s' |
1246 | - v['CCDEFINES_ST'] = '-D%s' |
1247 | +@conf |
1248 | +def generic_cc_common_flags(conf): |
1249 | + v = conf.env |
1250 | |
1251 | -# v['SONAME_ST'] = '-Wl,-h -Wl,%s' |
1252 | -# v['SHLIB_MARKER'] = '-Bdynamic' |
1253 | -# v['STATICLIB_MARKER'] = '-Bstatic' |
1254 | + v.CC_SRC_F = '' |
1255 | + v.CC_TGT_F = ['-c', '-o'] |
1256 | + v.CPPPATH_ST = '-I%s' |
1257 | + v.DEFINES_ST = '-D%s' |
1258 | |
1259 | - # program |
1260 | - v['program_PATTERN'] = '%s' |
1261 | + if not v.LINK_CC: |
1262 | + v.LINK_CC = v.CC |
1263 | |
1264 | - # shared library |
1265 | -# v['shlib_CCFLAGS'] = ['-Kpic', '-DPIC'] |
1266 | -# v['shlib_LINKFLAGS'] = ['-G'] |
1267 | - v['shlib_PATTERN'] = 'lib%s.so' |
1268 | + v.CCLNK_SRC_F = '' |
1269 | + v.CCLNK_TGT_F = ['-o'] |
1270 | |
1271 | - # static lib |
1272 | -# v['staticlib_LINKFLAGS'] = ['-Bstatic'] |
1273 | -# v['staticlib_PATTERN'] = 'lib%s.a' |
1274 | + v.LIB_ST = '-l%s' # template for adding libs |
1275 | + v.LIBPATH_ST = '-L%s' # template for adding libpaths |
1276 | + v.STLIB_ST = '-l%s' |
1277 | + v.STLIBPATH_ST = '-L%s' |
1278 | |
1279 | -detect = ''' |
1280 | -find_generic_cc |
1281 | -find_cpp |
1282 | -find_ar |
1283 | -generic_cc_common_flags |
1284 | -cc_load_tools |
1285 | -cc_add_flags |
1286 | -link_add_flags |
1287 | -''' |
1288 | + v.cprogram_PATTERN = '%s' |
1289 | + v.cshlib_PATTERN = 'lib%s.so' |
1290 | + v.cstlib_PATTERN = 'lib%s.a' |
1291 | |
1292 | +def configure(conf): |
1293 | + conf.find_generic_cc() |
1294 | + conf.find_ar() |
1295 | + conf.generic_cc_common_flags() |
1296 | + conf.cc_load_tools() |
1297 | + conf.cc_add_flags() |
1298 | + conf.link_add_flags() |
1299 | diff --git a/buildtools/wafsamba/hpuxcc.py b/buildtools/wafsamba/hpuxcc.py |
1300 | deleted file mode 100644 |
1301 | index c263556..0000000 |
1302 | --- a/buildtools/wafsamba/hpuxcc.py |
1303 | +++ /dev/null |
1304 | @@ -1,56 +0,0 @@ |
1305 | -# compiler definition for HPUX |
1306 | -# based on suncc.py from waf |
1307 | - |
1308 | -import os, optparse, sys |
1309 | -import Utils, Options, Configure |
1310 | -import ccroot, ar |
1311 | -from Configure import conftest |
1312 | -import gcc |
1313 | - |
1314 | - |
1315 | -@conftest |
1316 | -def gcc_modifier_hpux(conf): |
1317 | - v=conf.env |
1318 | - v['CCFLAGS_DEBUG']=['-g'] |
1319 | - v['CCFLAGS_RELEASE']=['-O2'] |
1320 | - v['CC_SRC_F']='' |
1321 | - v['CC_TGT_F']=['-c','-o',''] |
1322 | - v['CPPPATH_ST']='-I%s' |
1323 | - if not v['LINK_CC']:v['LINK_CC']=v['CC'] |
1324 | - v['CCLNK_SRC_F']='' |
1325 | - v['CCLNK_TGT_F']=['-o',''] |
1326 | - v['LIB_ST']='-l%s' |
1327 | - v['LIBPATH_ST']='-L%s' |
1328 | - v['STATICLIB_ST']='-l%s' |
1329 | - v['STATICLIBPATH_ST']='-L%s' |
1330 | - v['RPATH_ST']='-Wl,-rpath,%s' |
1331 | - v['CCDEFINES_ST']='-D%s' |
1332 | - v['SONAME_ST']='-Wl,-h,%s' |
1333 | - v['SHLIB_MARKER']=[] |
1334 | -# v['STATICLIB_MARKER']='-Wl,-Bstatic' |
1335 | - v['FULLSTATIC_MARKER']='-static' |
1336 | - v['program_PATTERN']='%s' |
1337 | - v['shlib_CCFLAGS']=['-fPIC','-DPIC'] |
1338 | - v['shlib_LINKFLAGS']=['-shared'] |
1339 | - v['shlib_PATTERN']='lib%s.sl' |
1340 | -# v['staticlib_LINKFLAGS']=['-Wl,-Bstatic'] |
1341 | - v['staticlib_PATTERN']='lib%s.a' |
1342 | - |
1343 | -gcc.gcc_modifier_hpux = gcc_modifier_hpux |
1344 | - |
1345 | -from TaskGen import feature, after |
1346 | -@feature('cprogram', 'cshlib') |
1347 | -@after('apply_link', 'apply_lib_vars', 'apply_obj_vars') |
1348 | -def hpux_addfullpath(self): |
1349 | - if sys.platform == 'hp-ux11': |
1350 | - link = getattr(self, 'link_task', None) |
1351 | - if link: |
1352 | - lst = link.env.LINKFLAGS |
1353 | - buf = [] |
1354 | - for x in lst: |
1355 | - if x.startswith('-L'): |
1356 | - p2 = x[2:] |
1357 | - if not os.path.isabs(p2): |
1358 | - x = x[:2] + self.bld.srcnode.abspath(link.env) + "/../" + x[2:].lstrip('.') |
1359 | - buf.append(x) |
1360 | - link.env.LINKFLAGS = buf |
1361 | diff --git a/buildtools/wafsamba/irixcc.py b/buildtools/wafsamba/irixcc.py |
1362 | deleted file mode 100644 |
1363 | index f3cb451..0000000 |
1364 | --- a/buildtools/wafsamba/irixcc.py |
1365 | +++ /dev/null |
1366 | @@ -1,79 +0,0 @@ |
1367 | - |
1368 | -# compiler definition for irix/MIPSpro cc compiler |
1369 | -# based on suncc.py from waf |
1370 | - |
1371 | -import os, optparse |
1372 | -import Utils, Options, Configure |
1373 | -import ccroot, ar |
1374 | -from Configure import conftest |
1375 | - |
1376 | -from compiler_cc import c_compiler |
1377 | - |
1378 | -c_compiler['irix'] = ['gcc', 'irixcc'] |
1379 | - |
1380 | -@conftest |
1381 | -def find_irixcc(conf): |
1382 | - v = conf.env |
1383 | - cc = None |
1384 | - if v['CC']: cc = v['CC'] |
1385 | - elif 'CC' in conf.environ: cc = conf.environ['CC'] |
1386 | - if not cc: cc = conf.find_program('cc', var='CC') |
1387 | - if not cc: conf.fatal('irixcc was not found') |
1388 | - cc = conf.cmd_to_list(cc) |
1389 | - |
1390 | - try: |
1391 | - if Utils.cmd_output(cc + ['-c99'] + ['-version']) != '': |
1392 | - conf.fatal('irixcc %r was not found' % cc) |
1393 | - except ValueError: |
1394 | - conf.fatal('irixcc -v could not be executed') |
1395 | - |
1396 | - conf.env.append_unique('CCFLAGS', '-c99') |
1397 | - |
1398 | - v['CC'] = cc |
1399 | - v['CC_NAME'] = 'irix' |
1400 | - |
1401 | -@conftest |
1402 | -def irixcc_common_flags(conf): |
1403 | - v = conf.env |
1404 | - |
1405 | - v['CC_SRC_F'] = '' |
1406 | - v['CC_TGT_F'] = ['-c', '-o', ''] |
1407 | - v['CPPPATH_ST'] = '-I%s' # template for adding include paths |
1408 | - |
1409 | - # linker |
1410 | - if not v['LINK_CC']: v['LINK_CC'] = v['CC'] |
1411 | - v['CCLNK_SRC_F'] = '' |
1412 | - v['CCLNK_TGT_F'] = ['-o', ''] |
1413 | - |
1414 | - v['LIB_ST'] = '-l%s' # template for adding libs |
1415 | - v['LIBPATH_ST'] = '-L%s' # template for adding libpaths |
1416 | - v['STATICLIB_ST'] = '-l%s' |
1417 | - v['STATICLIBPATH_ST'] = '-L%s' |
1418 | - v['CCDEFINES_ST'] = '-D%s' |
1419 | - |
1420 | -# v['SONAME_ST'] = '-Wl,-h -Wl,%s' |
1421 | -# v['SHLIB_MARKER'] = '-Bdynamic' |
1422 | -# v['STATICLIB_MARKER'] = '-Bstatic' |
1423 | - |
1424 | - # program |
1425 | - v['program_PATTERN'] = '%s' |
1426 | - |
1427 | - # shared library |
1428 | -# v['shlib_CCFLAGS'] = ['-Kpic', '-DPIC'] |
1429 | -# v['shlib_LINKFLAGS'] = ['-G'] |
1430 | - v['shlib_PATTERN'] = 'lib%s.so' |
1431 | - |
1432 | - # static lib |
1433 | -# v['staticlib_LINKFLAGS'] = ['-Bstatic'] |
1434 | -# v['staticlib_PATTERN'] = 'lib%s.a' |
1435 | - |
1436 | -detect = ''' |
1437 | -find_irixcc |
1438 | -find_cpp |
1439 | -find_ar |
1440 | -irixcc_common_flags |
1441 | -cc_load_tools |
1442 | -cc_add_flags |
1443 | -link_add_flags |
1444 | -''' |
1445 | - |
1446 | diff --git a/buildtools/wafsamba/nothreads.py b/buildtools/wafsamba/nothreads.py |
1447 | deleted file mode 100644 |
1448 | index 9bd33e8..0000000 |
1449 | --- a/buildtools/wafsamba/nothreads.py |
1450 | +++ /dev/null |
1451 | @@ -1,219 +0,0 @@ |
1452 | -# encoding: utf-8 |
1453 | -# Thomas Nagy, 2005-2008 (ita) |
1454 | - |
1455 | -# this replaces the core of Runner.py in waf with a varient that works |
1456 | -# on systems with completely broken threading (such as Python 2.5.x on |
1457 | -# AIX). For simplicity we enable this when JOBS=1, which is triggered |
1458 | -# by the compatibility makefile used for the waf build. That also ensures |
1459 | -# this code is tested, as it means it is used in the build farm, and by |
1460 | -# anyone using 'make' to build Samba with waf |
1461 | - |
1462 | -"Execute the tasks" |
1463 | - |
1464 | -import sys, random, threading |
1465 | -try: from Queue import Queue |
1466 | -except ImportError: from queue import Queue |
1467 | -import Utils, Options |
1468 | -from Constants import EXCEPTION, CRASHED, MAXJOBS, ASK_LATER, SKIPPED, SKIP_ME, SUCCESS |
1469 | - |
1470 | -GAP = 15 |
1471 | - |
1472 | -run_old = threading.Thread.run |
1473 | -def run(*args, **kwargs): |
1474 | - try: |
1475 | - run_old(*args, **kwargs) |
1476 | - except (KeyboardInterrupt, SystemExit): |
1477 | - raise |
1478 | - except: |
1479 | - sys.excepthook(*sys.exc_info()) |
1480 | -threading.Thread.run = run |
1481 | - |
1482 | - |
1483 | -class TaskConsumer(object): |
1484 | - consumers = 1 |
1485 | - |
1486 | -def process(tsk): |
1487 | - m = tsk.master |
1488 | - if m.stop: |
1489 | - m.out.put(tsk) |
1490 | - return |
1491 | - |
1492 | - try: |
1493 | - tsk.generator.bld.printout(tsk.display()) |
1494 | - if tsk.__class__.stat: ret = tsk.__class__.stat(tsk) |
1495 | - # actual call to task's run() function |
1496 | - else: ret = tsk.call_run() |
1497 | - except Exception as e: |
1498 | - tsk.err_msg = Utils.ex_stack() |
1499 | - tsk.hasrun = EXCEPTION |
1500 | - |
1501 | - # TODO cleanup |
1502 | - m.error_handler(tsk) |
1503 | - m.out.put(tsk) |
1504 | - return |
1505 | - |
1506 | - if ret: |
1507 | - tsk.err_code = ret |
1508 | - tsk.hasrun = CRASHED |
1509 | - else: |
1510 | - try: |
1511 | - tsk.post_run() |
1512 | - except Utils.WafError: |
1513 | - pass |
1514 | - except Exception: |
1515 | - tsk.err_msg = Utils.ex_stack() |
1516 | - tsk.hasrun = EXCEPTION |
1517 | - else: |
1518 | - tsk.hasrun = SUCCESS |
1519 | - if tsk.hasrun != SUCCESS: |
1520 | - m.error_handler(tsk) |
1521 | - |
1522 | - m.out.put(tsk) |
1523 | - |
1524 | -class Parallel(object): |
1525 | - """ |
1526 | - keep the consumer threads busy, and avoid consuming cpu cycles |
1527 | - when no more tasks can be added (end of the build, etc) |
1528 | - """ |
1529 | - def __init__(self, bld, j=2): |
1530 | - |
1531 | - # number of consumers |
1532 | - self.numjobs = j |
1533 | - |
1534 | - self.manager = bld.task_manager |
1535 | - self.manager.current_group = 0 |
1536 | - |
1537 | - self.total = self.manager.total() |
1538 | - |
1539 | - # tasks waiting to be processed - IMPORTANT |
1540 | - self.outstanding = [] |
1541 | - self.maxjobs = MAXJOBS |
1542 | - |
1543 | - # tasks that are awaiting for another task to complete |
1544 | - self.frozen = [] |
1545 | - |
1546 | - # tasks returned by the consumers |
1547 | - self.out = Queue(0) |
1548 | - |
1549 | - self.count = 0 # tasks not in the producer area |
1550 | - |
1551 | - self.processed = 1 # progress indicator |
1552 | - |
1553 | - self.stop = False # error condition to stop the build |
1554 | - self.error = False # error flag |
1555 | - |
1556 | - def get_next(self): |
1557 | - "override this method to schedule the tasks in a particular order" |
1558 | - if not self.outstanding: |
1559 | - return None |
1560 | - return self.outstanding.pop(0) |
1561 | - |
1562 | - def postpone(self, tsk): |
1563 | - "override this method to schedule the tasks in a particular order" |
1564 | - # TODO consider using a deque instead |
1565 | - if random.randint(0, 1): |
1566 | - self.frozen.insert(0, tsk) |
1567 | - else: |
1568 | - self.frozen.append(tsk) |
1569 | - |
1570 | - def refill_task_list(self): |
1571 | - "called to set the next group of tasks" |
1572 | - |
1573 | - while self.count > self.numjobs + GAP or self.count >= self.maxjobs: |
1574 | - self.get_out() |
1575 | - |
1576 | - while not self.outstanding: |
1577 | - if self.count: |
1578 | - self.get_out() |
1579 | - |
1580 | - if self.frozen: |
1581 | - self.outstanding += self.frozen |
1582 | - self.frozen = [] |
1583 | - elif not self.count: |
1584 | - (jobs, tmp) = self.manager.get_next_set() |
1585 | - if jobs is not None: |
1586 | - self.maxjobs = jobs |
1587 | - if tmp: |
1588 | - self.outstanding += tmp |
1589 | - break |
1590 | - |
1591 | - def get_out(self): |
1592 | - "the tasks that are put to execute are all collected using get_out" |
1593 | - ret = self.out.get() |
1594 | - self.manager.add_finished(ret) |
1595 | - if not self.stop and getattr(ret, 'more_tasks', None): |
1596 | - self.outstanding += ret.more_tasks |
1597 | - self.total += len(ret.more_tasks) |
1598 | - self.count -= 1 |
1599 | - |
1600 | - def error_handler(self, tsk): |
1601 | - "by default, errors make the build stop (not thread safe so be careful)" |
1602 | - if not Options.options.keep: |
1603 | - self.stop = True |
1604 | - self.error = True |
1605 | - |
1606 | - def start(self): |
1607 | - "execute the tasks" |
1608 | - |
1609 | - while not self.stop: |
1610 | - |
1611 | - self.refill_task_list() |
1612 | - |
1613 | - # consider the next task |
1614 | - tsk = self.get_next() |
1615 | - if not tsk: |
1616 | - if self.count: |
1617 | - # tasks may add new ones after they are run |
1618 | - continue |
1619 | - else: |
1620 | - # no tasks to run, no tasks running, time to exit |
1621 | - break |
1622 | - |
1623 | - if tsk.hasrun: |
1624 | - # if the task is marked as "run", just skip it |
1625 | - self.processed += 1 |
1626 | - self.manager.add_finished(tsk) |
1627 | - continue |
1628 | - |
1629 | - try: |
1630 | - st = tsk.runnable_status() |
1631 | - except Exception as e: |
1632 | - self.processed += 1 |
1633 | - if self.stop and not Options.options.keep: |
1634 | - tsk.hasrun = SKIPPED |
1635 | - self.manager.add_finished(tsk) |
1636 | - continue |
1637 | - self.error_handler(tsk) |
1638 | - self.manager.add_finished(tsk) |
1639 | - tsk.hasrun = EXCEPTION |
1640 | - tsk.err_msg = Utils.ex_stack() |
1641 | - continue |
1642 | - |
1643 | - if st == ASK_LATER: |
1644 | - self.postpone(tsk) |
1645 | - elif st == SKIP_ME: |
1646 | - self.processed += 1 |
1647 | - tsk.hasrun = SKIPPED |
1648 | - self.manager.add_finished(tsk) |
1649 | - else: |
1650 | - # run me: put the task in ready queue |
1651 | - tsk.position = (self.processed, self.total) |
1652 | - self.count += 1 |
1653 | - self.processed += 1 |
1654 | - tsk.master = self |
1655 | - |
1656 | - process(tsk) |
1657 | - |
1658 | - # self.count represents the tasks that have been made available to the consumer threads |
1659 | - # collect all the tasks after an error else the message may be incomplete |
1660 | - while self.error and self.count: |
1661 | - self.get_out() |
1662 | - |
1663 | - #print loop |
1664 | - assert (self.count == 0 or self.stop) |
1665 | - |
1666 | - |
1667 | -# enable nothreads |
1668 | -import Runner |
1669 | -Runner.process = process |
1670 | -Runner.Parallel = Parallel |
1671 | diff --git a/buildtools/wafsamba/pkgconfig.py b/buildtools/wafsamba/pkgconfig.py |
1672 | index 999bad4..b83d5f3 100644 |
1673 | --- a/buildtools/wafsamba/pkgconfig.py |
1674 | +++ b/buildtools/wafsamba/pkgconfig.py |
1675 | @@ -1,7 +1,7 @@ |
1676 | # handle substitution of variables in pc files |
1677 | |
1678 | import os, re, sys |
1679 | -import Build, Logs |
1680 | +from waflib import Build, Logs |
1681 | from samba_utils import SUBST_VARS_RECURSIVE, TO_LIST |
1682 | |
1683 | def subst_at_vars(task): |
1684 | @@ -52,7 +52,7 @@ def PKG_CONFIG_FILES(bld, pc_files, vnum=None, extra_name=None): |
1685 | rule=subst_at_vars, |
1686 | source=f+'.in', |
1687 | target=target) |
1688 | - bld.add_manual_dependency(bld.path.find_or_declare(f), bld.env['PREFIX']) |
1689 | + bld.add_manual_dependency(bld.path.find_or_declare(f), bld.env['PREFIX'].encode('utf8')) |
1690 | t.vars = [] |
1691 | if t.env.RPATH_ON_INSTALL: |
1692 | t.env.LIB_RPATH = t.env.RPATH_ST % t.env.LIBDIR |
1693 | diff --git a/buildtools/wafsamba/samba3.py b/buildtools/wafsamba/samba3.py |
1694 | index 44daff9..5375679 100644 |
1695 | --- a/buildtools/wafsamba/samba3.py |
1696 | +++ b/buildtools/wafsamba/samba3.py |
1697 | @@ -1,11 +1,12 @@ |
1698 | # a waf tool to add autoconf-like macros to the configure section |
1699 | # and for SAMBA_ macros for building libraries, binaries etc |
1700 | |
1701 | -import Options, Build, os |
1702 | -from samba_utils import os_path_relpath, TO_LIST, samba_add_onoff_option |
1703 | +import os |
1704 | +from waflib import Options, Build |
1705 | +from samba_utils import os_path_relpath, TO_LIST |
1706 | from samba_autoconf import library_flags |
1707 | |
1708 | -Options.Handler.SAMBA3_ADD_OPTION = samba_add_onoff_option |
1709 | +Options.OptionsContext.SAMBA3_ADD_OPTION = Options.OptionsContext.samba_add_onoff_option |
1710 | |
1711 | def SAMBA3_IS_STATIC_MODULE(bld, module): |
1712 | '''Check whether module is in static list''' |
1713 | @@ -32,7 +33,7 @@ def s3_fix_kwargs(bld, kwargs): |
1714 | '''fix the build arguments for s3 build rules to include the |
1715 | necessary includes, subdir and cflags options ''' |
1716 | s3dir = os.path.join(bld.env.srcdir, 'source3') |
1717 | - s3reldir = os_path_relpath(s3dir, bld.curdir) |
1718 | + s3reldir = os_path_relpath(s3dir, bld.path.abspath()) |
1719 | |
1720 | # the extra_includes list is relative to the source3 directory |
1721 | extra_includes = [ '.', 'include', 'lib' ] |
1722 | diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py |
1723 | index 4603e76..5e7686d 100644 |
1724 | --- a/buildtools/wafsamba/samba_abi.py |
1725 | +++ b/buildtools/wafsamba/samba_abi.py |
1726 | @@ -1,7 +1,13 @@ |
1727 | # functions for handling ABI checking of libraries |
1728 | |
1729 | -import Options, Utils, os, Logs, samba_utils, sys, Task, fnmatch, re, Build |
1730 | -from TaskGen import feature, before, after |
1731 | +import os |
1732 | +import sys |
1733 | +import re |
1734 | +import fnmatch |
1735 | + |
1736 | +from waflib import Options, Utils, Logs, Task, Build, Errors |
1737 | +from waflib.TaskGen import feature, before, after |
1738 | +from wafsamba import samba_utils |
1739 | |
1740 | # these type maps cope with platform specific names for common types |
1741 | # please add new type mappings into the list below |
1742 | @@ -10,7 +16,7 @@ abi_type_maps = { |
1743 | 'struct __va_list_tag *' : 'va_list' |
1744 | } |
1745 | |
1746 | -version_key = lambda x: map(int, x.split(".")) |
1747 | +version_key = lambda x: list(map(int, x.split("."))) |
1748 | |
1749 | def normalise_signature(sig): |
1750 | '''normalise a signature from gdb''' |
1751 | @@ -79,7 +85,7 @@ def abi_check_task(self): |
1752 | libpath = self.inputs[0].abspath(self.env) |
1753 | libname = os.path.basename(libpath) |
1754 | |
1755 | - sigs = Utils.cmd_output([abi_gen, libpath]) |
1756 | + sigs = samba_utils.get_string(Utils.cmd_output([abi_gen, libpath])) |
1757 | parsed_sigs = parse_sigs(sigs, self.ABI_MATCH) |
1758 | |
1759 | sig_file = self.ABI_FILE |
1760 | @@ -87,7 +93,7 @@ def abi_check_task(self): |
1761 | old_sigs = samba_utils.load_file(sig_file) |
1762 | if old_sigs is None or Options.options.ABI_UPDATE: |
1763 | if not save_sigs(sig_file, parsed_sigs): |
1764 | - raise Utils.WafError('Failed to save ABI file "%s"' % sig_file) |
1765 | + raise Errors.WafError('Failed to save ABI file "%s"' % sig_file) |
1766 | Logs.warn('Generated ABI signatures %s' % sig_file) |
1767 | return |
1768 | |
1769 | @@ -112,14 +118,14 @@ def abi_check_task(self): |
1770 | got_error = True |
1771 | |
1772 | if got_error: |
1773 | - raise Utils.WafError('ABI for %s has changed - please fix library version then build with --abi-update\nSee http://wiki.samba.org/index.php/Waf#ABI_Checking for more information\nIf you have not changed any ABI, and your platform always gives this error, please configure with --abi-check-disable to skip this check' % libname) |
1774 | + raise Errors.WafError('ABI for %s has changed - please fix library version then build with --abi-update\nSee http://wiki.samba.org/index.php/Waf#ABI_Checking for more information\nIf you have not changed any ABI, and your platform always gives this error, please configure with --abi-check-disable to skip this check' % libname) |
1775 | |
1776 | |
1777 | -t = Task.task_type_from_func('abi_check', abi_check_task, color='BLUE', ext_in='.bin') |
1778 | +t = Task.task_factory('abi_check', abi_check_task, color='BLUE', ext_in='.bin') |
1779 | t.quiet = True |
1780 | # allow "waf --abi-check" to force re-checking the ABI |
1781 | if '--abi-check' in sys.argv: |
1782 | - Task.always_run(t) |
1783 | + t.always_run = True |
1784 | |
1785 | @after('apply_link') |
1786 | @feature('abi_check') |
1787 | @@ -184,8 +190,8 @@ def abi_write_vscript(f, libname, current_version, versions, symmap, abi_match): |
1788 | f.write("}%s;\n\n" % last_key) |
1789 | last_key = " %s" % symver |
1790 | f.write("%s {\n" % current_version) |
1791 | - local_abi = filter(lambda x: x[0] == '!', abi_match) |
1792 | - global_abi = filter(lambda x: x[0] != '!', abi_match) |
1793 | + local_abi = list(filter(lambda x: x[0] == '!', abi_match)) |
1794 | + global_abi = list(filter(lambda x: x[0] != '!', abi_match)) |
1795 | f.write("\tglobal:\n") |
1796 | if len(global_abi) > 0: |
1797 | for x in global_abi: |
1798 | diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py |
1799 | index f2b3ec8..6208e3b 100644 |
1800 | --- a/buildtools/wafsamba/samba_autoconf.py |
1801 | +++ b/buildtools/wafsamba/samba_autoconf.py |
1802 | @@ -1,9 +1,10 @@ |
1803 | # a waf tool to add autoconf-like macros to the configure section |
1804 | |
1805 | import os, sys |
1806 | -import Build, Options, preproc, Logs |
1807 | -from Configure import conf |
1808 | -from TaskGen import feature |
1809 | +from waflib import Build, Options, Logs, Context |
1810 | +from waflib.Configure import conf |
1811 | +from waflib.TaskGen import feature |
1812 | +from waflib.Tools import c_preproc as preproc |
1813 | from samba_utils import TO_LIST, GET_TARGET_TYPE, SET_TARGET_TYPE, unique_list, mkdir_p |
1814 | |
1815 | missing_headers = set() |
1816 | @@ -18,7 +19,7 @@ def DEFINE(conf, d, v, add_to_cflags=False, quote=False): |
1817 | '''define a config option''' |
1818 | conf.define(d, v, quote=quote) |
1819 | if add_to_cflags: |
1820 | - conf.env.append_value('CCDEFINES', d + '=' + str(v)) |
1821 | + conf.env.append_value('CFLAGS', '-D%s=%s' % (d, str(v))) |
1822 | |
1823 | def hlist_to_string(conf, headers=None): |
1824 | '''convert a headers list to a set of #include lines''' |
1825 | @@ -44,11 +45,11 @@ def COMPOUND_START(conf, msg): |
1826 | if v != [] and v != 0: |
1827 | conf.env.in_compound = v + 1 |
1828 | return |
1829 | - conf.check_message_1(msg) |
1830 | - conf.saved_check_message_1 = conf.check_message_1 |
1831 | - conf.check_message_1 = null_check_message_1 |
1832 | - conf.saved_check_message_2 = conf.check_message_2 |
1833 | - conf.check_message_2 = null_check_message_2 |
1834 | + conf.start_msg(msg) |
1835 | + conf.saved_check_message_1 = conf.start_msg |
1836 | + conf.start_msg = null_check_message_1 |
1837 | + conf.saved_check_message_2 = conf.end_msg |
1838 | + conf.end_msg = null_check_message_2 |
1839 | conf.env.in_compound = 1 |
1840 | |
1841 | |
1842 | @@ -58,9 +59,9 @@ def COMPOUND_END(conf, result): |
1843 | conf.env.in_compound -= 1 |
1844 | if conf.env.in_compound != 0: |
1845 | return |
1846 | - conf.check_message_1 = conf.saved_check_message_1 |
1847 | - conf.check_message_2 = conf.saved_check_message_2 |
1848 | - p = conf.check_message_2 |
1849 | + conf.start_msg = conf.saved_check_message_1 |
1850 | + conf.end_msg = conf.saved_check_message_2 |
1851 | + p = conf.end_msg |
1852 | if result is True: |
1853 | p('ok') |
1854 | elif not result: |
1855 | @@ -99,7 +100,7 @@ def CHECK_HEADER(conf, h, add_headers=False, lib=None): |
1856 | ret = conf.check(fragment='%s\nint main(void) { return 0; }' % hdrs, |
1857 | type='nolink', |
1858 | execute=0, |
1859 | - ccflags=ccflags, |
1860 | + cflags=ccflags, |
1861 | mandatory=False, |
1862 | includes=cpppath, |
1863 | uselib=lib.upper(), |
1864 | @@ -322,7 +323,7 @@ def CHECK_SIZEOF(conf, vars, headers=None, define=None, critical=True): |
1865 | ret = False |
1866 | if v_define is None: |
1867 | v_define = 'SIZEOF_%s' % v.upper().replace(' ', '_') |
1868 | - for size in list((1, 2, 4, 8, 16, 32)): |
1869 | + for size in list((1, 2, 4, 8, 16, 32, 64)): |
1870 | if CHECK_CODE(conf, |
1871 | 'static int test_array[1 - 2 * !(((long int)(sizeof(%s))) <= %d)];' % (v, size), |
1872 | define=v_define, |
1873 | @@ -383,12 +384,10 @@ def CHECK_CODE(conf, code, define, |
1874 | else: |
1875 | execute = 0 |
1876 | |
1877 | - defs = conf.get_config_header() |
1878 | - |
1879 | if addmain: |
1880 | - fragment='%s\n%s\n int main(void) { %s; return 0; }\n' % (defs, hdrs, code) |
1881 | + fragment='%s\n int main(void) { %s; return 0; }\n' % (hdrs, code) |
1882 | else: |
1883 | - fragment='%s\n%s\n%s\n' % (defs, hdrs, code) |
1884 | + fragment='%s\n%s\n' % (hdrs, code) |
1885 | |
1886 | if msg is None: |
1887 | msg="Checking for %s" % define |
1888 | @@ -403,10 +402,11 @@ def CHECK_CODE(conf, code, define, |
1889 | extra_cflags = "-Werror" |
1890 | elif conf.env["CC_NAME"] == "xlc": |
1891 | extra_cflags = "-qhalt=w" |
1892 | - cflags.append(extra_cflags) |
1893 | + if extra_cflags: |
1894 | + cflags.append(extra_cflags) |
1895 | |
1896 | if local_include: |
1897 | - cflags.append('-I%s' % conf.curdir) |
1898 | + cflags.append('-I%s' % conf.path.abspath()) |
1899 | |
1900 | if not link: |
1901 | type='nolink' |
1902 | @@ -431,11 +431,11 @@ def CHECK_CODE(conf, code, define, |
1903 | |
1904 | conf.COMPOUND_START(msg) |
1905 | |
1906 | - ret = conf.check(fragment=fragment, |
1907 | + try: |
1908 | + ret = conf.check(fragment=fragment, |
1909 | execute=execute, |
1910 | define_name = define, |
1911 | - mandatory = mandatory, |
1912 | - ccflags=cflags, |
1913 | + cflags=cflags, |
1914 | ldflags=ldflags, |
1915 | includes=includes, |
1916 | uselib=uselib, |
1917 | @@ -444,22 +444,30 @@ def CHECK_CODE(conf, code, define, |
1918 | quote=quote, |
1919 | exec_args=exec_args, |
1920 | define_ret=define_ret) |
1921 | - if not ret and CONFIG_SET(conf, define): |
1922 | - # sometimes conf.check() returns false, but it |
1923 | - # sets the define. Maybe a waf bug? |
1924 | - ret = True |
1925 | - if ret: |
1926 | + except Exception: |
1927 | + if always: |
1928 | + conf.DEFINE(define, 0) |
1929 | + else: |
1930 | + conf.undefine(define) |
1931 | + conf.COMPOUND_END(False) |
1932 | + if mandatory: |
1933 | + raise |
1934 | + return False |
1935 | + else: |
1936 | + # Success is indicated by ret but we should unset |
1937 | + # defines set by WAF's c_config.check() because it |
1938 | + # defines it to int(ret) and we want to undefine it |
1939 | + if not ret: |
1940 | + conf.undefine(define) |
1941 | + conf.COMPOUND_END(False) |
1942 | + return False |
1943 | if not define_ret: |
1944 | conf.DEFINE(define, 1) |
1945 | conf.COMPOUND_END(True) |
1946 | else: |
1947 | - conf.COMPOUND_END(conf.env[define]) |
1948 | + conf.DEFINE(define, ret, quote=quote) |
1949 | + conf.COMPOUND_END(ret) |
1950 | return True |
1951 | - if always: |
1952 | - conf.DEFINE(define, 0) |
1953 | - conf.COMPOUND_END(False) |
1954 | - return False |
1955 | - |
1956 | |
1957 | |
1958 | @conf |
1959 | @@ -490,8 +498,9 @@ def CHECK_CFLAGS(conf, cflags, fragment='int main(void) { return 0; }\n'): |
1960 | check_cflags.extend(conf.env['WERROR_CFLAGS']) |
1961 | return conf.check(fragment=fragment, |
1962 | execute=0, |
1963 | + mandatory=False, |
1964 | type='nolink', |
1965 | - ccflags=check_cflags, |
1966 | + cflags=check_cflags, |
1967 | msg="Checking compiler accepts %s" % cflags) |
1968 | |
1969 | @conf |
1970 | @@ -547,12 +556,15 @@ def library_flags(self, libs): |
1971 | # note that we do not add the -I and -L in here, as that is added by the waf |
1972 | # core. Adding it here would just change the order that it is put on the link line |
1973 | # which can cause system paths to be added before internal libraries |
1974 | - extra_ccflags = TO_LIST(getattr(self.env, 'CCFLAGS_%s' % lib.upper(), [])) |
1975 | + extra_ccflags = TO_LIST(getattr(self.env, 'CFLAGS_%s' % lib.upper(), [])) |
1976 | extra_ldflags = TO_LIST(getattr(self.env, 'LDFLAGS_%s' % lib.upper(), [])) |
1977 | extra_cpppath = TO_LIST(getattr(self.env, 'CPPPATH_%s' % lib.upper(), [])) |
1978 | ccflags.extend(extra_ccflags) |
1979 | ldflags.extend(extra_ldflags) |
1980 | cpppath.extend(extra_cpppath) |
1981 | + |
1982 | + extra_cpppath = TO_LIST(getattr(self.env, 'INCLUDES_%s' % lib.upper(), [])) |
1983 | + cpppath.extend(extra_cpppath) |
1984 | if 'EXTRA_LDFLAGS' in self.env: |
1985 | ldflags.extend(self.env['EXTRA_LDFLAGS']) |
1986 | |
1987 | @@ -585,9 +597,9 @@ int foo() |
1988 | |
1989 | (ccflags, ldflags, cpppath) = library_flags(conf, lib) |
1990 | if shlib: |
1991 | - res = conf.check(features='c cshlib', fragment=fragment, lib=lib, uselib_store=lib, ccflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False) |
1992 | + res = conf.check(features='c cshlib', fragment=fragment, lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False) |
1993 | else: |
1994 | - res = conf.check(lib=lib, uselib_store=lib, ccflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False) |
1995 | + res = conf.check(lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False) |
1996 | |
1997 | if not res: |
1998 | if mandatory: |
1999 | @@ -661,8 +673,8 @@ def CHECK_FUNCS_IN(conf, list, library, mandatory=False, checklibc=False, |
2000 | @conf |
2001 | def IN_LAUNCH_DIR(conf): |
2002 | '''return True if this rule is being run from the launch directory''' |
2003 | - return os.path.realpath(conf.curdir) == os.path.realpath(Options.launch_dir) |
2004 | -Options.Handler.IN_LAUNCH_DIR = IN_LAUNCH_DIR |
2005 | + return os.path.realpath(conf.path.abspath()) == os.path.realpath(Context.launch_dir) |
2006 | +Options.OptionsContext.IN_LAUNCH_DIR = IN_LAUNCH_DIR |
2007 | |
2008 | |
2009 | @conf |
2010 | @@ -687,11 +699,11 @@ def SAMBA_CONFIG_H(conf, path=None): |
2011 | } |
2012 | ''', |
2013 | execute=0, |
2014 | - ccflags=[ '-Werror', '-Wp,-D_FORTIFY_SOURCE=2', stack_protect_flag], |
2015 | + cflags=[ '-Werror', '-Wp,-D_FORTIFY_SOURCE=2', stack_protect_flag], |
2016 | mandatory=False, |
2017 | msg='Checking if compiler accepts %s' % (stack_protect_flag)) |
2018 | if flag_supported: |
2019 | - conf.ADD_CFLAGS('-Wp,-D_FORTIFY_SOURCE=2 %s' % (stack_protect_flag)) |
2020 | + conf.ADD_CFLAGS('%s' % (stack_protect_flag)) |
2021 | break |
2022 | |
2023 | flag_supported = conf.check(fragment=''' |
2024 | @@ -705,7 +717,7 @@ def SAMBA_CONFIG_H(conf, path=None): |
2025 | } |
2026 | ''', |
2027 | execute=0, |
2028 | - ccflags=[ '-Werror', '-fstack-clash-protection'], |
2029 | + cflags=[ '-Werror', '-fstack-clash-protection'], |
2030 | mandatory=False, |
2031 | msg='Checking if compiler accepts -fstack-clash-protection') |
2032 | if flag_supported: |
2033 | @@ -793,9 +805,12 @@ int main(void) { |
2034 | conf.env['EXTRA_LDFLAGS'].extend(conf.env['ADDITIONAL_LDFLAGS']) |
2035 | |
2036 | if path is None: |
2037 | - conf.write_config_header('config.h', top=True) |
2038 | + conf.write_config_header('default/config.h', top=True, remove=False) |
2039 | else: |
2040 | - conf.write_config_header(path) |
2041 | + conf.write_config_header(os.path.join(conf.variant, path), remove=False) |
2042 | + for key in conf.env.define_key: |
2043 | + conf.undefine(key, from_env=False) |
2044 | + conf.env.define_key = [] |
2045 | conf.SAMBA_CROSS_CHECK_COMPLETE() |
2046 | |
2047 | |
2048 | @@ -882,9 +897,6 @@ def CHECK_CC_ENV(conf): |
2049 | The build farm sometimes puts a space at the start""" |
2050 | if os.environ.get('CC'): |
2051 | conf.env.CC = TO_LIST(os.environ.get('CC')) |
2052 | - if len(conf.env.CC) == 1: |
2053 | - # make for nicer logs if just a single command |
2054 | - conf.env.CC = conf.env.CC[0] |
2055 | |
2056 | |
2057 | @conf |
2058 | @@ -894,7 +906,7 @@ def SETUP_CONFIGURE_CACHE(conf, enable): |
2059 | # when -C is chosen, we will use a private cache and will |
2060 | # not look into system includes. This roughtly matches what |
2061 | # autoconf does with -C |
2062 | - cache_path = os.path.join(conf.blddir, '.confcache') |
2063 | + cache_path = os.path.join(conf.bldnode.abspath(), '.confcache') |
2064 | mkdir_p(cache_path) |
2065 | Options.cache_global = os.environ['WAFCACHE'] = cache_path |
2066 | else: |
2067 | @@ -918,6 +930,3 @@ def SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS(conf): |
2068 | if conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup']): |
2069 | conf.env.undefined_ignore_ldflags = ['-undefined', 'dynamic_lookup'] |
2070 | |
2071 | -@conf |
2072 | -def CHECK_CFG(self, *k, **kw): |
2073 | - return self.check_cfg(*k, **kw) |
2074 | diff --git a/buildtools/wafsamba/samba_autoproto.py b/buildtools/wafsamba/samba_autoproto.py |
2075 | index b2b5233..ace434f 100644 |
2076 | --- a/buildtools/wafsamba/samba_autoproto.py |
2077 | +++ b/buildtools/wafsamba/samba_autoproto.py |
2078 | @@ -1,13 +1,13 @@ |
2079 | # waf build tool for building automatic prototypes from C source |
2080 | |
2081 | import os |
2082 | -import Build |
2083 | +from waflib import Build |
2084 | from samba_utils import SET_TARGET_TYPE, os_path_relpath |
2085 | |
2086 | def SAMBA_AUTOPROTO(bld, header, source): |
2087 | '''rule for samba prototype generation''' |
2088 | bld.SET_BUILD_GROUP('prototypes') |
2089 | - relpath = os_path_relpath(bld.curdir, bld.srcnode.abspath()) |
2090 | + relpath = os_path_relpath(bld.path.abspath(), bld.srcnode.abspath()) |
2091 | name = os.path.join(relpath, header) |
2092 | SET_TARGET_TYPE(bld, name, 'PROTOTYPE') |
2093 | t = bld( |
2094 | @@ -16,7 +16,7 @@ def SAMBA_AUTOPROTO(bld, header, source): |
2095 | target = header, |
2096 | update_outputs=True, |
2097 | ext_out='.c', |
2098 | - before ='cc', |
2099 | + before ='c', |
2100 | rule = '${PERL} "${SCRIPT}/mkproto.pl" --srcdir=.. --builddir=. --public=/dev/null --private="${TGT}" ${SRC}' |
2101 | ) |
2102 | t.env.SCRIPT = os.path.join(bld.srcnode.abspath(), 'source4/script') |
2103 | diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py |
2104 | index 253d604..60ce7da 100644 |
2105 | --- a/buildtools/wafsamba/samba_bundled.py |
2106 | +++ b/buildtools/wafsamba/samba_bundled.py |
2107 | @@ -1,9 +1,9 @@ |
2108 | # functions to support bundled libraries |
2109 | |
2110 | import sys |
2111 | -import Build, Options, Logs |
2112 | -from Configure import conf |
2113 | -from samba_utils import TO_LIST |
2114 | +from waflib import Build, Options, Logs |
2115 | +from waflib.Configure import conf |
2116 | +from wafsamba import samba_utils |
2117 | |
2118 | def PRIVATE_NAME(bld, name, private_extension, private_library): |
2119 | '''possibly rename a library to include a bundled extension''' |
2120 | @@ -51,19 +51,19 @@ Build.BuildContext.BUILTIN_LIBRARY = BUILTIN_LIBRARY |
2121 | |
2122 | def BUILTIN_DEFAULT(opt, builtins): |
2123 | '''set a comma separated default list of builtin libraries for this package''' |
2124 | - if 'BUILTIN_LIBRARIES_DEFAULT' in Options.options: |
2125 | + if 'BUILTIN_LIBRARIES_DEFAULT' in Options.options.__dict__: |
2126 | return |
2127 | - Options.options['BUILTIN_LIBRARIES_DEFAULT'] = builtins |
2128 | -Options.Handler.BUILTIN_DEFAULT = BUILTIN_DEFAULT |
2129 | + Options.options.__dict__['BUILTIN_LIBRARIES_DEFAULT'] = builtins |
2130 | +Options.OptionsContext.BUILTIN_DEFAULT = BUILTIN_DEFAULT |
2131 | |
2132 | |
2133 | def PRIVATE_EXTENSION_DEFAULT(opt, extension, noextension=''): |
2134 | '''set a default private library extension''' |
2135 | - if 'PRIVATE_EXTENSION_DEFAULT' in Options.options: |
2136 | + if 'PRIVATE_EXTENSION_DEFAULT' in Options.options.__dict__: |
2137 | return |
2138 | - Options.options['PRIVATE_EXTENSION_DEFAULT'] = extension |
2139 | - Options.options['PRIVATE_EXTENSION_EXCEPTION'] = noextension |
2140 | -Options.Handler.PRIVATE_EXTENSION_DEFAULT = PRIVATE_EXTENSION_DEFAULT |
2141 | + Options.options.__dict__['PRIVATE_EXTENSION_DEFAULT'] = extension |
2142 | + Options.options.__dict__['PRIVATE_EXTENSION_EXCEPTION'] = noextension |
2143 | +Options.OptionsContext.PRIVATE_EXTENSION_DEFAULT = PRIVATE_EXTENSION_DEFAULT |
2144 | |
2145 | |
2146 | def minimum_library_version(conf, libname, default): |
2147 | @@ -139,7 +139,7 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0', |
2148 | # We always do a logic validation of 'onlyif' first |
2149 | missing = [] |
2150 | if onlyif: |
2151 | - for l in TO_LIST(onlyif): |
2152 | + for l in samba_utils.TO_LIST(onlyif): |
2153 | f = 'FOUND_SYSTEMLIB_%s' % l |
2154 | if not f in conf.env: |
2155 | Logs.error('ERROR: CHECK_BUNDLED_SYSTEM(%s) - ' % (libname) + |
2156 | diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py |
2157 | index b52727b..7d9b531 100644 |
2158 | --- a/buildtools/wafsamba/samba_conftests.py |
2159 | +++ b/buildtools/wafsamba/samba_conftests.py |
2160 | @@ -2,34 +2,35 @@ |
2161 | # to test for commonly needed configuration options |
2162 | |
2163 | import os, shutil, re |
2164 | -import Build, Configure, Utils, Options, Logs |
2165 | -from Configure import conf |
2166 | -from samba_utils import TO_LIST, ADD_LD_LIBRARY_PATH |
2167 | +from waflib import Build, Configure, Utils, Options, Logs, Errors |
2168 | +from waflib.Configure import conf |
2169 | +from samba_utils import TO_LIST, ADD_LD_LIBRARY_PATH, get_string |
2170 | |
2171 | |
2172 | def add_option(self, *k, **kw): |
2173 | '''syntax help: provide the "match" attribute to opt.add_option() so that folders can be added to specific config tests''' |
2174 | + Options.OptionsContext.parser = self |
2175 | match = kw.get('match', []) |
2176 | if match: |
2177 | del kw['match'] |
2178 | opt = self.parser.add_option(*k, **kw) |
2179 | opt.match = match |
2180 | return opt |
2181 | -Options.Handler.add_option = add_option |
2182 | +Options.OptionsContext.add_option = add_option |
2183 | |
2184 | @conf |
2185 | def check(self, *k, **kw): |
2186 | '''Override the waf defaults to inject --with-directory options''' |
2187 | |
2188 | if not 'env' in kw: |
2189 | - kw['env'] = self.env.copy() |
2190 | + kw['env'] = self.env.derive() |
2191 | |
2192 | # match the configuration test with specific options, for example: |
2193 | # --with-libiconv -> Options.options.iconv_open -> "Checking for library iconv" |
2194 | additional_dirs = [] |
2195 | if 'msg' in kw: |
2196 | msg = kw['msg'] |
2197 | - for x in Options.Handler.parser.parser.option_list: |
2198 | + for x in Options.OptionsContext.parser.parser.option_list: |
2199 | if getattr(x, 'match', None) and msg in x.match: |
2200 | d = getattr(Options.options, x.dest, '') |
2201 | if d: |
2202 | @@ -46,12 +47,12 @@ def check(self, *k, **kw): |
2203 | add_options_dir(additional_dirs, kw['env']) |
2204 | |
2205 | self.validate_c(kw) |
2206 | - self.check_message_1(kw['msg']) |
2207 | + self.start_msg(kw['msg']) |
2208 | ret = None |
2209 | try: |
2210 | ret = self.run_c_code(*k, **kw) |
2211 | except Configure.ConfigurationError as e: |
2212 | - self.check_message_2(kw['errmsg'], 'YELLOW') |
2213 | + self.end_msg(kw['errmsg'], 'YELLOW') |
2214 | if 'mandatory' in kw and kw['mandatory']: |
2215 | if Logs.verbose > 1: |
2216 | raise |
2217 | @@ -59,7 +60,7 @@ def check(self, *k, **kw): |
2218 | self.fatal('the configuration failed (see %r)' % self.log.name) |
2219 | else: |
2220 | kw['success'] = ret |
2221 | - self.check_message_2(self.ret_msg(kw['okmsg'], kw)) |
2222 | + self.end_msg(self.ret_msg(kw['okmsg'], kw)) |
2223 | |
2224 | # success! keep the CPPPATH/LIBPATH |
2225 | add_options_dir(additional_dirs, self.env) |
2226 | @@ -162,7 +163,7 @@ def find_config_dir(conf): |
2227 | '''find a directory to run tests in''' |
2228 | k = 0 |
2229 | while k < 10000: |
2230 | - dir = os.path.join(conf.blddir, '.conf_check_%d' % k) |
2231 | + dir = os.path.join(conf.bldnode.abspath(), '.conf_check_%d' % k) |
2232 | try: |
2233 | shutil.rmtree(dir) |
2234 | except OSError: |
2235 | @@ -337,7 +338,8 @@ def CHECK_LIBRARY_SUPPORT(conf, rpath=False, version_script=False, msg=None): |
2236 | |
2237 | # we need to run the program, try to get its result |
2238 | args = conf.SAMBA_CROSS_ARGS(msg=msg) |
2239 | - proc = Utils.pproc.Popen([lastprog] + args, stdout=Utils.pproc.PIPE, stderr=Utils.pproc.PIPE) |
2240 | + proc = Utils.subprocess.Popen([lastprog] + args, |
2241 | + stdout=Utils.subprocess.PIPE, stderr=Utils.subprocess.PIPE) |
2242 | (out, err) = proc.communicate() |
2243 | w = conf.log.write |
2244 | w(str(out)) |
2245 | @@ -364,7 +366,7 @@ def CHECK_PERL_MANPAGE(conf, msg=None, section=None): |
2246 | else: |
2247 | msg = "perl manpage generation" |
2248 | |
2249 | - conf.check_message_1(msg) |
2250 | + conf.start_msg(msg) |
2251 | |
2252 | dir = find_config_dir(conf) |
2253 | |
2254 | @@ -381,28 +383,28 @@ WriteMakefile( |
2255 | """) |
2256 | back = os.path.abspath('.') |
2257 | os.chdir(bdir) |
2258 | - proc = Utils.pproc.Popen(['perl', 'Makefile.PL'], |
2259 | - stdout=Utils.pproc.PIPE, |
2260 | - stderr=Utils.pproc.PIPE) |
2261 | + proc = Utils.subprocess.Popen(['perl', 'Makefile.PL'], |
2262 | + stdout=Utils.subprocess.PIPE, |
2263 | + stderr=Utils.subprocess.PIPE) |
2264 | (out, err) = proc.communicate() |
2265 | os.chdir(back) |
2266 | |
2267 | ret = (proc.returncode == 0) |
2268 | if not ret: |
2269 | - conf.check_message_2('not found', color='YELLOW') |
2270 | + conf.end_msg('not found', color='YELLOW') |
2271 | return |
2272 | |
2273 | if section: |
2274 | man = Utils.readf(os.path.join(bdir,'Makefile')) |
2275 | m = re.search('MAN%sEXT\s+=\s+(\w+)' % section, man) |
2276 | if not m: |
2277 | - conf.check_message_2('not found', color='YELLOW') |
2278 | + conf.end_msg('not found', color='YELLOW') |
2279 | return |
2280 | ext = m.group(1) |
2281 | - conf.check_message_2(ext) |
2282 | + conf.end_msg(ext) |
2283 | return ext |
2284 | |
2285 | - conf.check_message_2('ok') |
2286 | + conf.end_msg('ok') |
2287 | return True |
2288 | |
2289 | |
2290 | @@ -416,7 +418,7 @@ def CHECK_COMMAND(conf, cmd, msg=None, define=None, on_target=True, boolean=Fals |
2291 | if on_target: |
2292 | cmd.extend(conf.SAMBA_CROSS_ARGS(msg=msg)) |
2293 | try: |
2294 | - ret = Utils.cmd_output(cmd) |
2295 | + ret = get_string(Utils.cmd_output(cmd)) |
2296 | except: |
2297 | conf.COMPOUND_END(False) |
2298 | return False |
2299 | @@ -486,13 +488,13 @@ def CHECK_XSLTPROC_MANPAGES(conf): |
2300 | return False |
2301 | |
2302 | s='http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl' |
2303 | - conf.CHECK_COMMAND('%s --nonet %s 2> /dev/null' % (conf.env.XSLTPROC, s), |
2304 | + conf.CHECK_COMMAND('%s --nonet %s 2> /dev/null' % (conf.env.get_flat('XSLTPROC'), s), |
2305 | msg='Checking for stylesheet %s' % s, |
2306 | define='XSLTPROC_MANPAGES', on_target=False, |
2307 | boolean=True) |
2308 | if not conf.CONFIG_SET('XSLTPROC_MANPAGES'): |
2309 | - print "A local copy of the docbook.xsl wasn't found on your system" \ |
2310 | - " consider installing package like docbook-xsl" |
2311 | + print("A local copy of the docbook.xsl wasn't found on your system" \ |
2312 | + " consider installing package like docbook-xsl") |
2313 | |
2314 | # |
2315 | # Determine the standard libpath for the used compiler, |
2316 | @@ -506,12 +508,12 @@ def CHECK_STANDARD_LIBPATH(conf): |
2317 | # at least gcc and clang support this: |
2318 | try: |
2319 | cmd = conf.env.CC + ['-print-search-dirs'] |
2320 | - out = Utils.cmd_output(cmd).split('\n') |
2321 | + out = get_string(Utils.cmd_output(cmd)).split('\n') |
2322 | except ValueError: |
2323 | # option not supported by compiler - use a standard list of directories |
2324 | dirlist = [ '/usr/lib', '/usr/lib64' ] |
2325 | except: |
2326 | - raise Utils.WafError('Unexpected error running "%s"' % (cmd)) |
2327 | + raise Errors.WafError('Unexpected error running "%s"' % (cmd)) |
2328 | else: |
2329 | dirlist = [] |
2330 | for line in out: |
2331 | diff --git a/buildtools/wafsamba/samba_cross.py b/buildtools/wafsamba/samba_cross.py |
2332 | index b8f2000..8863c2c 100644 |
2333 | --- a/buildtools/wafsamba/samba_cross.py |
2334 | +++ b/buildtools/wafsamba/samba_cross.py |
2335 | @@ -1,8 +1,9 @@ |
2336 | # functions for handling cross-compilation |
2337 | |
2338 | import os, sys, re, shlex |
2339 | -import Utils, Logs, Options |
2340 | -from Configure import conf |
2341 | +from waflib import Utils, Logs, Options, Errors, Context |
2342 | +from waflib.Configure import conf |
2343 | +from wafsamba import samba_utils |
2344 | |
2345 | real_Popen = None |
2346 | |
2347 | @@ -81,12 +82,12 @@ def cross_answer(ca_file, msg): |
2348 | f.close() |
2349 | return (int(m.group(1)), m.group(2)) |
2350 | else: |
2351 | - raise Utils.WafError("Bad answer format '%s' in %s" % (line, ca_file)) |
2352 | + raise Errors.WafError("Bad answer format '%s' in %s" % (line, ca_file)) |
2353 | f.close() |
2354 | return ANSWER_UNKNOWN |
2355 | |
2356 | |
2357 | -class cross_Popen(Utils.pproc.Popen): |
2358 | +class cross_Popen(Utils.subprocess.Popen): |
2359 | '''cross-compilation wrapper for Popen''' |
2360 | def __init__(*k, **kw): |
2361 | (obj, args) = k |
2362 | @@ -118,10 +119,10 @@ class cross_Popen(Utils.pproc.Popen): |
2363 | newargs.extend(args[0:i]) |
2364 | if use_answers: |
2365 | p = real_Popen(newargs, |
2366 | - stdout=Utils.pproc.PIPE, |
2367 | - stderr=Utils.pproc.PIPE) |
2368 | + stdout=Utils.subprocess.PIPE, |
2369 | + stderr=Utils.subprocess.PIPE) |
2370 | ce_out, ce_err = p.communicate() |
2371 | - ans = (p.returncode, ce_out) |
2372 | + ans = (p.returncode, samba_utils.get_string(ce_out)) |
2373 | add_answer(ca_file, msg, ans) |
2374 | else: |
2375 | args = newargs |
2376 | @@ -144,8 +145,8 @@ def SAMBA_CROSS_ARGS(conf, msg=None): |
2377 | |
2378 | global real_Popen |
2379 | if real_Popen is None: |
2380 | - real_Popen = Utils.pproc.Popen |
2381 | - Utils.pproc.Popen = cross_Popen |
2382 | + real_Popen = Utils.subprocess.Popen |
2383 | + Utils.subprocess.Popen = cross_Popen |
2384 | |
2385 | ret = [] |
2386 | |
2387 | @@ -154,11 +155,11 @@ def SAMBA_CROSS_ARGS(conf, msg=None): |
2388 | |
2389 | if conf.env.CROSS_ANSWERS: |
2390 | if msg is None: |
2391 | - raise Utils.WafError("Cannot have NULL msg in cross-answers") |
2392 | - ret.extend(['--cross-answers', os.path.join(Options.launch_dir, conf.env.CROSS_ANSWERS), msg]) |
2393 | + raise Errors.WafError("Cannot have NULL msg in cross-answers") |
2394 | + ret.extend(['--cross-answers', os.path.join(Context.launch_dir, conf.env.CROSS_ANSWERS), msg]) |
2395 | |
2396 | if ret == []: |
2397 | - raise Utils.WafError("Cannot cross-compile without either --cross-execute or --cross-answers") |
2398 | + raise Errors.WafError("Cannot cross-compile without either --cross-execute or --cross-answers") |
2399 | |
2400 | return ret |
2401 | |
2402 | @@ -167,5 +168,5 @@ def SAMBA_CROSS_CHECK_COMPLETE(conf): |
2403 | '''check if we have some unanswered questions''' |
2404 | global cross_answers_incomplete |
2405 | if conf.env.CROSS_COMPILE and cross_answers_incomplete: |
2406 | - raise Utils.WafError("Cross answers file %s is incomplete" % conf.env.CROSS_ANSWERS) |
2407 | + raise Errors.WafError("Cross answers file %s is incomplete" % conf.env.CROSS_ANSWERS) |
2408 | return True |
2409 | diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py |
2410 | index 978a5e9..f8c3880 100644 |
2411 | --- a/buildtools/wafsamba/samba_deps.py |
2412 | +++ b/buildtools/wafsamba/samba_deps.py |
2413 | @@ -2,9 +2,10 @@ |
2414 | |
2415 | import os, sys, re, time |
2416 | |
2417 | -import Build, Environment, Options, Logs, Utils |
2418 | -from Logs import debug |
2419 | -from Configure import conf |
2420 | +from waflib import Build, Options, Logs, Utils, Errors |
2421 | +from waflib.Logs import debug |
2422 | +from waflib.Configure import conf |
2423 | +from waflib import ConfigSet |
2424 | |
2425 | from samba_bundled import BUILTIN_LIBRARY |
2426 | from samba_utils import LOCAL_CACHE, TO_LIST, get_tgt_list, unique_list, os_path_relpath |
2427 | @@ -85,7 +86,7 @@ def build_dependencies(self): |
2428 | # extra link flags from pkg_config |
2429 | libs = self.final_syslibs.copy() |
2430 | |
2431 | - (ccflags, ldflags, cpppath) = library_flags(self, list(libs)) |
2432 | + (cflags, ldflags, cpppath) = library_flags(self, list(libs)) |
2433 | new_ldflags = getattr(self, 'samba_ldflags', [])[:] |
2434 | new_ldflags.extend(ldflags) |
2435 | self.ldflags = new_ldflags |
2436 | @@ -102,7 +103,7 @@ def build_dependencies(self): |
2437 | self.sname, self.uselib, self.uselib_local, self.add_objects) |
2438 | |
2439 | if self.samba_type in ['SUBSYSTEM']: |
2440 | - # this is needed for the ccflags of libs that come from pkg_config |
2441 | + # this is needed for the cflags of libs that come from pkg_config |
2442 | self.uselib = list(self.final_syslibs) |
2443 | self.uselib.extend(list(self.direct_syslibs)) |
2444 | for lib in self.final_libs: |
2445 | @@ -235,7 +236,7 @@ def add_init_functions(self): |
2446 | if sentinel == 'NULL': |
2447 | proto = "extern void __%s_dummy_module_proto(void)" % (sname) |
2448 | cflags.append('-DSTATIC_%s_MODULES_PROTO=%s' % (sname, proto)) |
2449 | - self.ccflags = cflags |
2450 | + self.cflags = cflags |
2451 | return |
2452 | |
2453 | for m in modules: |
2454 | @@ -257,7 +258,7 @@ def add_init_functions(self): |
2455 | proto += '_MODULE_PROTO(%s)' % f |
2456 | proto += "extern void __%s_dummy_module_proto(void)" % (m) |
2457 | cflags.append('-DSTATIC_%s_MODULES_PROTO=%s' % (m, proto)) |
2458 | - self.ccflags = cflags |
2459 | + self.cflags = cflags |
2460 | |
2461 | |
2462 | def check_duplicate_sources(bld, tgt_list): |
2463 | @@ -271,6 +272,9 @@ def check_duplicate_sources(bld, tgt_list): |
2464 | tpath = os.path.normpath(os_path_relpath(t.path.abspath(bld.env), t.env.BUILD_DIRECTORY + '/default')) |
2465 | obj_sources = set() |
2466 | for s in source_list: |
2467 | + if not isinstance(s, str): |
2468 | + print('strange path in check_duplicate_sources %r' % s) |
2469 | + s = s.abspath() |
2470 | p = os.path.normpath(os.path.join(tpath, s)) |
2471 | if p in obj_sources: |
2472 | Logs.error("ERROR: source %s appears twice in target '%s'" % (p, t.sname)) |
2473 | @@ -299,7 +303,7 @@ def check_duplicate_sources(bld, tgt_list): |
2474 | Logs.warn("WARNING: source %s is in more than one target: %s" % (s, subsystems[s].keys())) |
2475 | for tname in subsystems[s]: |
2476 | if len(subsystems[s][tname]) > 1: |
2477 | - raise Utils.WafError("ERROR: source %s is in more than one subsystem of target '%s': %s" % (s, tname, subsystems[s][tname])) |
2478 | + raise Errors.WafError("ERROR: source %s is in more than one subsystem of target '%s': %s" % (s, tname, subsystems[s][tname])) |
2479 | |
2480 | return True |
2481 | |
2482 | @@ -372,7 +376,7 @@ def add_samba_attributes(bld, tgt_list): |
2483 | t.samba_abspath = t.path.abspath(bld.env) |
2484 | t.samba_deps_extended = t.samba_deps[:] |
2485 | t.samba_includes_extended = TO_LIST(t.samba_includes)[:] |
2486 | - t.ccflags = getattr(t, 'samba_cflags', '') |
2487 | + t.cflags = getattr(t, 'samba_cflags', '') |
2488 | |
2489 | def replace_grouping_libraries(bld, tgt_list): |
2490 | '''replace dependencies based on grouping libraries |
2491 | @@ -715,6 +719,11 @@ def reduce_objects(bld, tgt_list): |
2492 | if t.sname in rely_on: |
2493 | dup = dup.difference(rely_on[t.sname]) |
2494 | if dup: |
2495 | + # Do not remove duplicates of BUILTINS |
2496 | + d = next(iter(dup)) |
2497 | + if BUILTIN_LIBRARY(bld, d): |
2498 | + continue |
2499 | + |
2500 | debug('deps: removing dups from %s of type %s: %s also in %s %s', |
2501 | t.sname, t.samba_type, dup, t2.samba_type, l) |
2502 | new = new.difference(dup) |
2503 | @@ -951,7 +960,7 @@ savedeps_inputs = ['samba_deps', 'samba_includes', 'local_include', 'local_incl |
2504 | 'source', 'grouping_library', 'samba_ldflags', 'allow_undefined_symbols', |
2505 | 'use_global_deps', 'global_include' ] |
2506 | savedeps_outputs = ['uselib', 'uselib_local', 'add_objects', 'includes', |
2507 | - 'ccflags', 'ldflags', 'samba_deps_extended', 'final_libs'] |
2508 | + 'cflags', 'ldflags', 'samba_deps_extended', 'final_libs'] |
2509 | savedeps_outenv = ['INC_PATHS'] |
2510 | savedeps_envvars = ['NONSHARED_BINARIES', 'GLOBAL_DEPENDENCIES', 'EXTRA_CFLAGS', 'EXTRA_LDFLAGS', 'EXTRA_INCLUDES' ] |
2511 | savedeps_caches = ['GLOBAL_DEPENDENCIES', 'TARGET_TYPE', 'INIT_FUNCTIONS', 'SYSLIB_DEPS'] |
2512 | @@ -960,7 +969,7 @@ savedeps_files = ['buildtools/wafsamba/samba_deps.py'] |
2513 | def save_samba_deps(bld, tgt_list): |
2514 | '''save the dependency calculations between builds, to make |
2515 | further builds faster''' |
2516 | - denv = Environment.Environment() |
2517 | + denv = ConfigSet.ConfigSet() |
2518 | |
2519 | denv.version = savedeps_version |
2520 | denv.savedeps_inputs = savedeps_inputs |
2521 | @@ -1007,15 +1016,15 @@ def save_samba_deps(bld, tgt_list): |
2522 | if tdeps != {}: |
2523 | denv.outenv[t.sname] = tdeps |
2524 | |
2525 | - depsfile = os.path.join(bld.bdir, "sambadeps") |
2526 | + depsfile = os.path.join(bld.cache_dir, "sambadeps") |
2527 | denv.store_fast(depsfile) |
2528 | |
2529 | |
2530 | |
2531 | def load_samba_deps(bld, tgt_list): |
2532 | '''load a previous set of build dependencies if possible''' |
2533 | - depsfile = os.path.join(bld.bdir, "sambadeps") |
2534 | - denv = Environment.Environment() |
2535 | + depsfile = os.path.join(bld.cache_dir, "sambadeps") |
2536 | + denv = ConfigSet.ConfigSet() |
2537 | try: |
2538 | debug('deps: checking saved dependencies') |
2539 | denv.load_fast(depsfile) |
2540 | diff --git a/buildtools/wafsamba/samba_dist.py b/buildtools/wafsamba/samba_dist.py |
2541 | index 8d51632..6af7bb4 100644 |
2542 | --- a/buildtools/wafsamba/samba_dist.py |
2543 | +++ b/buildtools/wafsamba/samba_dist.py |
2544 | @@ -2,13 +2,41 @@ |
2545 | # uses git ls-files to get file lists |
2546 | |
2547 | import os, sys, tarfile |
2548 | -import Utils, Scripting, Logs, Options |
2549 | -from Configure import conf |
2550 | -from samba_utils import os_path_relpath |
2551 | +from waflib import Utils, Scripting, Logs, Options |
2552 | +from waflib.Configure import conf |
2553 | +from samba_utils import os_path_relpath, get_string |
2554 | +from waflib import Context |
2555 | |
2556 | dist_dirs = None |
2557 | dist_files = None |
2558 | dist_blacklist = "" |
2559 | +dist_archive = None |
2560 | + |
2561 | +class Dist(Context.Context): |
2562 | + # TODO remove |
2563 | + cmd = 'dist' |
2564 | + fun = 'dist' |
2565 | + def execute(self): |
2566 | + Context.g_module.dist() |
2567 | + |
2568 | +class DistCheck(Scripting.DistCheck): |
2569 | + fun = 'distcheck' |
2570 | + cmd = 'distcheck' |
2571 | + def execute(self): |
2572 | + Options.options.distcheck_args = '' |
2573 | + if Context.g_module.distcheck is Scripting.distcheck: |
2574 | + # default |
2575 | + Context.g_module.distcheck(self) |
2576 | + else: |
2577 | + Context.g_module.distcheck() |
2578 | + Context.g_module.dist() |
2579 | + self.check() |
2580 | + def get_arch_name(self): |
2581 | + global dist_archive |
2582 | + return dist_archive |
2583 | + def make_distcheck_cmd(self, tmpdir): |
2584 | + waf = os.path.abspath(sys.argv[0]) |
2585 | + return [sys.executable, waf, 'configure', 'build', 'install', 'uninstall', '--destdir=' + tmpdir] |
2586 | |
2587 | def add_symlink(tar, fname, abspath, basedir): |
2588 | '''handle symlinks to directories that may move during packaging''' |
2589 | @@ -69,7 +97,7 @@ def add_tarfile(tar, fname, abspath, basedir): |
2590 | tinfo.gid = 0 |
2591 | tinfo.uname = 'root' |
2592 | tinfo.gname = 'root' |
2593 | - fh = open(abspath) |
2594 | + fh = open(abspath, "rb") |
2595 | tar.addfile(tinfo, fileobj=fh) |
2596 | fh.close() |
2597 | |
2598 | @@ -91,7 +119,7 @@ def vcs_dir_contents(path): |
2599 | repo = os.path.dirname(repo) |
2600 | if repo == "/": |
2601 | raise Exception("unsupported or no vcs for %s" % path) |
2602 | - return Utils.cmd_output(ls_files_cmd, cwd=cwd, env=env).split() |
2603 | + return get_string(Utils.cmd_output(ls_files_cmd, cwd=cwd, env=env)).split('\n') |
2604 | |
2605 | |
2606 | def dist(appname='', version=''): |
2607 | @@ -136,12 +164,14 @@ def dist(appname='', version=''): |
2608 | |
2609 | if not isinstance(appname, str) or not appname: |
2610 | # this copes with a mismatch in the calling arguments for dist() |
2611 | - appname = Utils.g_module.APPNAME |
2612 | - version = Utils.g_module.VERSION |
2613 | + appname = Context.g_module.APPNAME |
2614 | + version = Context.g_module.VERSION |
2615 | if not version: |
2616 | - version = Utils.g_module.VERSION |
2617 | + version = Context.g_module.VERSION |
2618 | |
2619 | - srcdir = os.path.normpath(os.path.join(os.path.dirname(Utils.g_module.root_path), Utils.g_module.srcdir)) |
2620 | + srcdir = os.path.normpath( |
2621 | + os.path.join(os.path.dirname(Context.g_module.root_path), |
2622 | + Context.g_module.top)) |
2623 | |
2624 | if not dist_dirs: |
2625 | Logs.error('You must use samba_dist.DIST_DIRS() to set which directories to package') |
2626 | @@ -218,6 +248,9 @@ def dist(appname='', version=''): |
2627 | else: |
2628 | Logs.info('Created %s' % dist_name) |
2629 | |
2630 | + # TODO use the ctx object instead |
2631 | + global dist_archive |
2632 | + dist_archive = dist_name |
2633 | return dist_name |
2634 | |
2635 | |
2636 | diff --git a/buildtools/wafsamba/samba_git.py b/buildtools/wafsamba/samba_git.py |
2637 | index c58a579..09a204f 100644 |
2638 | --- a/buildtools/wafsamba/samba_git.py |
2639 | +++ b/buildtools/wafsamba/samba_git.py |
2640 | @@ -4,7 +4,7 @@ import subprocess |
2641 | def find_git(env=None): |
2642 | """Find the git binary.""" |
2643 | if env is not None and 'GIT' in env: |
2644 | - return env['GIT'] |
2645 | + return env.get_flat('GIT') |
2646 | |
2647 | # Get version from GIT |
2648 | if os.path.exists("/usr/bin/git"): |
2649 | diff --git a/buildtools/wafsamba/samba_headers.py b/buildtools/wafsamba/samba_headers.py |
2650 | index 0a80082..a268c01 100644 |
2651 | --- a/buildtools/wafsamba/samba_headers.py |
2652 | +++ b/buildtools/wafsamba/samba_headers.py |
2653 | @@ -1,7 +1,7 @@ |
2654 | # specialist handling of header files for Samba |
2655 | |
2656 | import os, re, sys, fnmatch |
2657 | -import Build, Logs, Utils |
2658 | +from waflib import Build, Logs, Utils, Errors |
2659 | from samba_utils import TO_LIST, os_path_relpath |
2660 | |
2661 | |
2662 | @@ -99,7 +99,7 @@ def create_public_header(task): |
2663 | os.unlink(tgt) |
2664 | sys.stderr.write("%s:%u:Error: unable to resolve public header %s (maybe try one of %s)\n" % ( |
2665 | os.path.relpath(src, os.getcwd()), linenumber, hpath, suggested)) |
2666 | - raise Utils.WafError("Unable to resolve header path '%s' in public header '%s' in directory %s" % ( |
2667 | + raise Errors.WafError("Unable to resolve header path '%s' in public header '%s' in directory %s" % ( |
2668 | hpath, relsrc, task.env.RELPATH)) |
2669 | infile.close() |
2670 | outfile.close() |
2671 | @@ -148,11 +148,12 @@ def PUBLIC_HEADERS(bld, public_headers, header_path=None, public_headers_install |
2672 | else: |
2673 | h_name = h |
2674 | inst_name = os.path.basename(h) |
2675 | - relpath1 = os_path_relpath(bld.srcnode.abspath(), bld.curdir) |
2676 | - relpath2 = os_path_relpath(bld.curdir, bld.srcnode.abspath()) |
2677 | + curdir = bld.path.abspath() |
2678 | + relpath1 = os_path_relpath(bld.srcnode.abspath(), curdir) |
2679 | + relpath2 = os_path_relpath(curdir, bld.srcnode.abspath()) |
2680 | targetdir = os.path.normpath(os.path.join(relpath1, bld.env.build_public_headers, inst_path)) |
2681 | - if not os.path.exists(os.path.join(bld.curdir, targetdir)): |
2682 | - raise Utils.WafError("missing source directory %s for public header %s" % (targetdir, inst_name)) |
2683 | + if not os.path.exists(os.path.join(curdir, targetdir)): |
2684 | + raise Errors.WafError("missing source directory %s for public header %s" % (targetdir, inst_name)) |
2685 | target = os.path.join(targetdir, inst_name) |
2686 | |
2687 | # the source path of the header, relative to the top of the source tree |
2688 | diff --git a/buildtools/wafsamba/samba_install.py b/buildtools/wafsamba/samba_install.py |
2689 | index 21035bf..47bc0cb 100644 |
2690 | --- a/buildtools/wafsamba/samba_install.py |
2691 | +++ b/buildtools/wafsamba/samba_install.py |
2692 | @@ -4,8 +4,8 @@ |
2693 | # library use |
2694 | |
2695 | import os |
2696 | -import Utils |
2697 | -from TaskGen import feature, before, after |
2698 | +from waflib import Utils, Errors |
2699 | +from waflib.TaskGen import feature, before, after |
2700 | from samba_utils import LIB_PATH, MODE_755, install_rpath, build_rpath |
2701 | |
2702 | @feature('install_bin') |
2703 | @@ -45,7 +45,7 @@ def install_binary(self): |
2704 | |
2705 | # tell waf to install the right binary |
2706 | bld.install_as(os.path.join(install_path, orig_target), |
2707 | - os.path.join(self.path.abspath(bld.env), self.target), |
2708 | + self.path.find_or_declare(self.target), |
2709 | chmod=MODE_755) |
2710 | |
2711 | |
2712 | @@ -143,8 +143,9 @@ def install_library(self): |
2713 | |
2714 | # tell waf to install the library |
2715 | bld.install_as(os.path.join(install_path, install_name), |
2716 | - os.path.join(self.path.abspath(bld.env), inst_name), |
2717 | + self.path.find_or_declare(inst_name), |
2718 | chmod=MODE_755) |
2719 | + |
2720 | if install_link and install_link != install_name: |
2721 | # and the symlink if needed |
2722 | bld.symlink_as(os.path.join(install_path, install_link), os.path.basename(install_name)) |
2723 | @@ -227,7 +228,7 @@ def symlink_bin(self): |
2724 | return |
2725 | |
2726 | if not self.link_task.outputs or not self.link_task.outputs[0]: |
2727 | - raise Utils.WafError('no outputs found for %s in symlink_bin' % self.name) |
2728 | + raise Errors.WafError('no outputs found for %s in symlink_bin' % self.name) |
2729 | binpath = self.link_task.outputs[0].abspath(self.env) |
2730 | bldpath = os.path.join(self.bld.env.BUILD_DIRECTORY, self.link_task.outputs[0].name) |
2731 | |
2732 | diff --git a/buildtools/wafsamba/samba_optimisation.py b/buildtools/wafsamba/samba_optimisation.py |
2733 | deleted file mode 100644 |
2734 | index 5008f83..0000000 |
2735 | --- a/buildtools/wafsamba/samba_optimisation.py |
2736 | +++ /dev/null |
2737 | @@ -1,269 +0,0 @@ |
2738 | -# This file contains waf optimisations for Samba |
2739 | - |
2740 | -# most of these optimisations are possible because of the restricted build environment |
2741 | -# that Samba has. For example, Samba doesn't attempt to cope with Win32 paths during the |
2742 | -# build, and Samba doesn't need build varients |
2743 | - |
2744 | -# overall this makes some build tasks quite a bit faster |
2745 | - |
2746 | -import os |
2747 | -import Build, Utils, Node |
2748 | -from TaskGen import feature, after, before |
2749 | -import preproc |
2750 | - |
2751 | -@feature('c', 'cc', 'cxx') |
2752 | -@after('apply_type_vars', 'apply_lib_vars', 'apply_core') |
2753 | -def apply_incpaths(self): |
2754 | - lst = [] |
2755 | - |
2756 | - try: |
2757 | - kak = self.bld.kak |
2758 | - except AttributeError: |
2759 | - kak = self.bld.kak = {} |
2760 | - |
2761 | - # TODO move the uselib processing out of here |
2762 | - for lib in self.to_list(self.uselib): |
2763 | - for path in self.env['CPPPATH_' + lib]: |
2764 | - if not path in lst: |
2765 | - lst.append(path) |
2766 | - if preproc.go_absolute: |
2767 | - for path in preproc.standard_includes: |
2768 | - if not path in lst: |
2769 | - lst.append(path) |
2770 | - |
2771 | - for path in self.to_list(self.includes): |
2772 | - if not path in lst: |
2773 | - if preproc.go_absolute or path[0] != '/': # os.path.isabs(path): |
2774 | - lst.append(path) |
2775 | - else: |
2776 | - self.env.prepend_value('CPPPATH', path) |
2777 | - |
2778 | - for path in lst: |
2779 | - node = None |
2780 | - if path[0] == '/': # os.path.isabs(path): |
2781 | - if preproc.go_absolute: |
2782 | - node = self.bld.root.find_dir(path) |
2783 | - elif path[0] == '#': |
2784 | - node = self.bld.srcnode |
2785 | - if len(path) > 1: |
2786 | - try: |
2787 | - node = kak[path] |
2788 | - except KeyError: |
2789 | - kak[path] = node = node.find_dir(path[1:]) |
2790 | - else: |
2791 | - try: |
2792 | - node = kak[(self.path.id, path)] |
2793 | - except KeyError: |
2794 | - kak[(self.path.id, path)] = node = self.path.find_dir(path) |
2795 | - |
2796 | - if node: |
2797 | - self.env.append_value('INC_PATHS', node) |
2798 | - |
2799 | -@feature('c', 'cc') |
2800 | -@after('apply_incpaths') |
2801 | -def apply_obj_vars_cc(self): |
2802 | - """after apply_incpaths for INC_PATHS""" |
2803 | - env = self.env |
2804 | - app = env.append_unique |
2805 | - cpppath_st = env['CPPPATH_ST'] |
2806 | - |
2807 | - lss = env['_CCINCFLAGS'] |
2808 | - |
2809 | - try: |
2810 | - cac = self.bld.cac |
2811 | - except AttributeError: |
2812 | - cac = self.bld.cac = {} |
2813 | - |
2814 | - # local flags come first |
2815 | - # set the user-defined includes paths |
2816 | - for i in env['INC_PATHS']: |
2817 | - |
2818 | - try: |
2819 | - lss.extend(cac[i.id]) |
2820 | - except KeyError: |
2821 | - |
2822 | - cac[i.id] = [cpppath_st % i.bldpath(env), cpppath_st % i.srcpath(env)] |
2823 | - lss.extend(cac[i.id]) |
2824 | - |
2825 | - env['_CCINCFLAGS'] = lss |
2826 | - # set the library include paths |
2827 | - for i in env['CPPPATH']: |
2828 | - app('_CCINCFLAGS', cpppath_st % i) |
2829 | - |
2830 | -import Node, Environment |
2831 | - |
2832 | -def vari(self): |
2833 | - return "default" |
2834 | -Environment.Environment.variant = vari |
2835 | - |
2836 | -def variant(self, env): |
2837 | - if not env: return 0 |
2838 | - elif self.id & 3 == Node.FILE: return 0 |
2839 | - else: return "default" |
2840 | -Node.Node.variant = variant |
2841 | - |
2842 | - |
2843 | -import TaskGen, Task |
2844 | - |
2845 | -def create_task(self, name, src=None, tgt=None): |
2846 | - task = Task.TaskBase.classes[name](self.env, generator=self) |
2847 | - if src: |
2848 | - task.set_inputs(src) |
2849 | - if tgt: |
2850 | - task.set_outputs(tgt) |
2851 | - return task |
2852 | -TaskGen.task_gen.create_task = create_task |
2853 | - |
2854 | -def hash_constraints(self): |
2855 | - a = self.attr |
2856 | - sum = hash((str(a('before', '')), |
2857 | - str(a('after', '')), |
2858 | - str(a('ext_in', '')), |
2859 | - str(a('ext_out', '')), |
2860 | - self.__class__.maxjobs)) |
2861 | - return sum |
2862 | -Task.TaskBase.hash_constraints = hash_constraints |
2863 | - |
2864 | -def hash_env_vars(self, env, vars_lst): |
2865 | - idx = str(id(env)) + str(vars_lst) |
2866 | - try: |
2867 | - return self.cache_sig_vars[idx] |
2868 | - except KeyError: |
2869 | - pass |
2870 | - |
2871 | - m = Utils.md5() |
2872 | - m.update(''.join([str(env[a]) for a in vars_lst])) |
2873 | - |
2874 | - ret = self.cache_sig_vars[idx] = m.digest() |
2875 | - return ret |
2876 | -Build.BuildContext.hash_env_vars = hash_env_vars |
2877 | - |
2878 | - |
2879 | -def store_fast(self, filename): |
2880 | - file = open(filename, 'wb') |
2881 | - data = self.get_merged_dict() |
2882 | - try: |
2883 | - Build.cPickle.dump(data, file, -1) |
2884 | - finally: |
2885 | - file.close() |
2886 | -Environment.Environment.store_fast = store_fast |
2887 | - |
2888 | -def load_fast(self, filename): |
2889 | - file = open(filename, 'rb') |
2890 | - try: |
2891 | - data = Build.cPickle.load(file) |
2892 | - finally: |
2893 | - file.close() |
2894 | - self.table.update(data) |
2895 | -Environment.Environment.load_fast = load_fast |
2896 | - |
2897 | -def is_this_a_static_lib(self, name): |
2898 | - try: |
2899 | - cache = self.cache_is_this_a_static_lib |
2900 | - except AttributeError: |
2901 | - cache = self.cache_is_this_a_static_lib = {} |
2902 | - try: |
2903 | - return cache[name] |
2904 | - except KeyError: |
2905 | - ret = cache[name] = 'cstaticlib' in self.bld.get_tgen_by_name(name).features |
2906 | - return ret |
2907 | -TaskGen.task_gen.is_this_a_static_lib = is_this_a_static_lib |
2908 | - |
2909 | -def shared_ancestors(self): |
2910 | - try: |
2911 | - cache = self.cache_is_this_a_static_lib |
2912 | - except AttributeError: |
2913 | - cache = self.cache_is_this_a_static_lib = {} |
2914 | - try: |
2915 | - return cache[id(self)] |
2916 | - except KeyError: |
2917 | - |
2918 | - ret = [] |
2919 | - if 'cshlib' in self.features: # or 'cprogram' in self.features: |
2920 | - if getattr(self, 'uselib_local', None): |
2921 | - lst = self.to_list(self.uselib_local) |
2922 | - ret = [x for x in lst if not self.is_this_a_static_lib(x)] |
2923 | - cache[id(self)] = ret |
2924 | - return ret |
2925 | -TaskGen.task_gen.shared_ancestors = shared_ancestors |
2926 | - |
2927 | -@feature('c', 'cc', 'cxx') |
2928 | -@after('apply_link', 'init_cc', 'init_cxx', 'apply_core') |
2929 | -def apply_lib_vars(self): |
2930 | - """after apply_link because of 'link_task' |
2931 | - after default_cc because of the attribute 'uselib'""" |
2932 | - |
2933 | - # after 'apply_core' in case if 'cc' if there is no link |
2934 | - |
2935 | - env = self.env |
2936 | - app = env.append_value |
2937 | - seen_libpaths = set([]) |
2938 | - |
2939 | - # OPTIMIZATION 1: skip uselib variables already added (700ms) |
2940 | - seen_uselib = set([]) |
2941 | - |
2942 | - # 1. the case of the libs defined in the project (visit ancestors first) |
2943 | - # the ancestors external libraries (uselib) will be prepended |
2944 | - self.uselib = self.to_list(self.uselib) |
2945 | - names = self.to_list(self.uselib_local) |
2946 | - |
2947 | - seen = set([]) |
2948 | - tmp = Utils.deque(names) # consume a copy of the list of names |
2949 | - while tmp: |
2950 | - lib_name = tmp.popleft() |
2951 | - # visit dependencies only once |
2952 | - if lib_name in seen: |
2953 | - continue |
2954 | - |
2955 | - y = self.get_tgen_by_name(lib_name) |
2956 | - if not y: |
2957 | - raise Utils.WafError('object %r was not found in uselib_local (required by %r)' % (lib_name, self.name)) |
2958 | - y.post() |
2959 | - seen.add(lib_name) |
2960 | - |
2961 | - # OPTIMIZATION 2: pre-compute ancestors shared libraries (100ms) |
2962 | - tmp.extend(y.shared_ancestors()) |
2963 | - |
2964 | - # link task and flags |
2965 | - if getattr(y, 'link_task', None): |
2966 | - |
2967 | - link_name = y.target[y.target.rfind('/') + 1:] |
2968 | - if 'cstaticlib' in y.features: |
2969 | - app('STATICLIB', link_name) |
2970 | - elif 'cshlib' in y.features or 'cprogram' in y.features: |
2971 | - # WARNING some linkers can link against programs |
2972 | - app('LIB', link_name) |
2973 | - |
2974 | - # the order |
2975 | - self.link_task.set_run_after(y.link_task) |
2976 | - |
2977 | - # for the recompilation |
2978 | - dep_nodes = getattr(self.link_task, 'dep_nodes', []) |
2979 | - self.link_task.dep_nodes = dep_nodes + y.link_task.outputs |
2980 | - |
2981 | - # OPTIMIZATION 3: reduce the amount of function calls |
2982 | - # add the link path too |
2983 | - par = y.link_task.outputs[0].parent |
2984 | - if id(par) not in seen_libpaths: |
2985 | - seen_libpaths.add(id(par)) |
2986 | - tmp_path = par.bldpath(self.env) |
2987 | - if not tmp_path in env['LIBPATH']: |
2988 | - env.prepend_value('LIBPATH', tmp_path) |
2989 | - |
2990 | - |
2991 | - # add ancestors uselib too - but only propagate those that have no staticlib |
2992 | - for v in self.to_list(y.uselib): |
2993 | - if v not in seen_uselib: |
2994 | - seen_uselib.add(v) |
2995 | - if not env['STATICLIB_' + v]: |
2996 | - if not v in self.uselib: |
2997 | - self.uselib.insert(0, v) |
2998 | - |
2999 | - # 2. the case of the libs defined outside |
3000 | - for x in self.uselib: |
3001 | - for v in self.p_flag_vars: |
3002 | - val = self.env[v + '_' + x] |
3003 | - if val: |
3004 | - self.env.append_value(v, val) |
3005 | - |
3006 | - |
3007 | diff --git a/buildtools/wafsamba/samba_patterns.py b/buildtools/wafsamba/samba_patterns.py |
3008 | index 2b93937..d0fe965 100644 |
3009 | --- a/buildtools/wafsamba/samba_patterns.py |
3010 | +++ b/buildtools/wafsamba/samba_patterns.py |
3011 | @@ -1,6 +1,7 @@ |
3012 | # a waf tool to add extension based build patterns for Samba |
3013 | |
3014 | -import Build |
3015 | +import sys |
3016 | +from waflib import Build |
3017 | from wafsamba import samba_version_file |
3018 | |
3019 | def write_version_header(task): |
3020 | @@ -146,13 +147,19 @@ def write_build_options_section(fp, keys, section): |
3021 | fp.write("\n") |
3022 | |
3023 | def write_build_options(task): |
3024 | - tbl = task.env['defines'] |
3025 | + tbl = task.env |
3026 | keys_option_with = [] |
3027 | keys_option_utmp = [] |
3028 | keys_option_have = [] |
3029 | keys_header_sys = [] |
3030 | keys_header_other = [] |
3031 | keys_misc = [] |
3032 | + if sys.hexversion>0x300000f: |
3033 | + trans_table = bytes.maketrans(b'.-()', b'____') |
3034 | + else: |
3035 | + import string |
3036 | + trans_table = string.maketrans('.-()', '____') |
3037 | + |
3038 | for key in tbl: |
3039 | if key.startswith("HAVE_UT_UT_") or key.find("UTMP") >= 0: |
3040 | keys_option_utmp.append(key) |
3041 | @@ -169,7 +176,7 @@ def write_build_options(task): |
3042 | l = key.split("(") |
3043 | keys_misc.append(l[0]) |
3044 | else: |
3045 | - keys_misc.append(key) |
3046 | + keys_misc.append(key.translate(trans_table)) |
3047 | |
3048 | tgt = task.outputs[0].bldpath(task.env) |
3049 | f = open(tgt, 'w') |
3050 | diff --git a/buildtools/wafsamba/samba_perl.py b/buildtools/wafsamba/samba_perl.py |
3051 | index 2e9a53a..e019acb 100644 |
3052 | --- a/buildtools/wafsamba/samba_perl.py |
3053 | +++ b/buildtools/wafsamba/samba_perl.py |
3054 | @@ -1,6 +1,6 @@ |
3055 | -import Utils |
3056 | -from Configure import conf |
3057 | - |
3058 | +from waflib import Utils |
3059 | +from waflib.Configure import conf |
3060 | +from samba_utils import get_string |
3061 | done = {} |
3062 | |
3063 | @conf |
3064 | @@ -9,13 +9,16 @@ def SAMBA_CHECK_PERL(conf, mandatory=True, version=(5,0,0)): |
3065 | return |
3066 | done["done"] = True |
3067 | conf.find_program('perl', var='PERL', mandatory=mandatory) |
3068 | - conf.check_tool('perl') |
3069 | + conf.load('perl') |
3070 | path_perl = conf.find_program('perl') |
3071 | conf.env.PERL_SPECIFIED = (conf.env.PERL != path_perl) |
3072 | conf.check_perl_version(version) |
3073 | |
3074 | def read_perl_config_var(cmd): |
3075 | - return Utils.to_list(Utils.cmd_output([conf.env.PERL, '-MConfig', '-e', cmd])) |
3076 | + output = Utils.cmd_output([conf.env.get_flat('PERL'), '-MConfig', '-e', cmd]) |
3077 | + if not isinstance(output, str): |
3078 | + output = get_string(output) |
3079 | + return Utils.to_list(output) |
3080 | |
3081 | def check_perl_config_var(var): |
3082 | conf.start_msg("Checking for perl $Config{%s}:" % var) |
3083 | diff --git a/buildtools/wafsamba/samba_pidl.py b/buildtools/wafsamba/samba_pidl.py |
3084 | index 9651e4d..3fecfa9 100644 |
3085 | --- a/buildtools/wafsamba/samba_pidl.py |
3086 | +++ b/buildtools/wafsamba/samba_pidl.py |
3087 | @@ -1,8 +1,8 @@ |
3088 | # waf build tool for building IDL files with pidl |
3089 | |
3090 | import os |
3091 | -import Build |
3092 | -from TaskGen import feature, before |
3093 | +from waflib import Build, Utils |
3094 | +from waflib.TaskGen import feature, before |
3095 | from samba_utils import SET_TARGET_TYPE, TO_LIST, LOCAL_CACHE |
3096 | |
3097 | def SAMBA_PIDL(bld, pname, source, |
3098 | @@ -76,9 +76,9 @@ def SAMBA_PIDL(bld, pname, source, |
3099 | else: |
3100 | cc = 'CC="%s"' % bld.CONFIG_GET("CC") |
3101 | |
3102 | - t = bld(rule='cd .. && %s %s ${PERL} "${PIDL}" --quiet ${OPTIONS} --outputdir ${OUTPUTDIR} -- "${SRC[0].abspath(env)}"' % (cpp, cc), |
3103 | + t = bld(rule='cd ${PIDL_LAUNCH_DIR} && %s %s ${PERL} ${PIDL} --quiet ${OPTIONS} --outputdir ${OUTPUTDIR} -- "${IDLSRC}"' % (cpp, cc), |
3104 | ext_out = '.c', |
3105 | - before = 'cc', |
3106 | + before = 'c', |
3107 | update_outputs = True, |
3108 | shell = True, |
3109 | source = source, |
3110 | @@ -86,18 +86,22 @@ def SAMBA_PIDL(bld, pname, source, |
3111 | name = name, |
3112 | samba_type = 'PIDL') |
3113 | |
3114 | - # prime the list of nodes we are dependent on with the cached pidl sources |
3115 | - t.allnodes = pidl_src_nodes |
3116 | |
3117 | - t.env.PIDL = os.path.join(bld.srcnode.abspath(), 'pidl/pidl') |
3118 | + t.env.PIDL_LAUNCH_DIR = bld.srcnode.path_from(bld.bldnode) |
3119 | + pnode = bld.srcnode.find_resource('pidl/pidl') |
3120 | + t.env.PIDL = pnode.path_from(bld.srcnode) |
3121 | t.env.OPTIONS = TO_LIST(options) |
3122 | - t.env.OUTPUTDIR = bld.bldnode.name + '/' + bld.path.find_dir(output_dir).bldpath(t.env) |
3123 | + snode = t.path.find_resource(source[0]) |
3124 | + t.env.IDLSRC = snode.path_from(bld.srcnode) |
3125 | + t.env.OUTPUTDIR = bld.bldnode.path_from(bld.srcnode) + '/' + bld.path.find_dir(output_dir).path_from(bld.srcnode) |
3126 | + |
3127 | + bld.add_manual_dependency(snode, pidl_src_nodes) |
3128 | |
3129 | if generate_tables and table_header_idx is not None: |
3130 | pidl_headers = LOCAL_CACHE(bld, 'PIDL_HEADERS') |
3131 | pidl_headers[name] = [bld.path.find_or_declare(out_files[table_header_idx])] |
3132 | |
3133 | - t.more_includes = '#' + bld.path.relpath_gen(bld.srcnode) |
3134 | + t.more_includes = '#' + bld.path.path_from(bld.srcnode) |
3135 | Build.BuildContext.SAMBA_PIDL = SAMBA_PIDL |
3136 | |
3137 | |
3138 | @@ -117,13 +121,15 @@ Build.BuildContext.SAMBA_PIDL_LIST = SAMBA_PIDL_LIST |
3139 | @before('exec_rule') |
3140 | def collect(self): |
3141 | pidl_headers = LOCAL_CACHE(self.bld, 'PIDL_HEADERS') |
3142 | + # The first source is tables.pl itself |
3143 | + self.source = Utils.to_list(self.source) |
3144 | for (name, hd) in pidl_headers.items(): |
3145 | y = self.bld.get_tgen_by_name(name) |
3146 | self.bld.ASSERT(y is not None, 'Failed to find PIDL header %s' % name) |
3147 | y.post() |
3148 | for node in hd: |
3149 | self.bld.ASSERT(node is not None, 'Got None as build node generating PIDL table for %s' % name) |
3150 | - self.source += " " + node.relpath_gen(self.path) |
3151 | + self.source.append(node) |
3152 | |
3153 | |
3154 | def SAMBA_PIDL_TABLES(bld, name, target): |
3155 | @@ -131,9 +137,9 @@ def SAMBA_PIDL_TABLES(bld, name, target): |
3156 | bld.SET_BUILD_GROUP('main') |
3157 | t = bld( |
3158 | features = 'collect', |
3159 | - rule = '${PERL} ${SRC} --output ${TGT} | sed "s|default/||" > ${TGT}', |
3160 | + rule = '${PERL} ${SRC} > ${TGT}', |
3161 | ext_out = '.c', |
3162 | - before = 'cc', |
3163 | + before = 'c', |
3164 | update_outputs = True, |
3165 | shell = True, |
3166 | source = '../../librpc/tables.pl', |
3167 | diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py |
3168 | index cb99fe9..fac0e34 100644 |
3169 | --- a/buildtools/wafsamba/samba_python.py |
3170 | +++ b/buildtools/wafsamba/samba_python.py |
3171 | @@ -1,11 +1,11 @@ |
3172 | # waf build tool for building IDL files with pidl |
3173 | |
3174 | -import os |
3175 | -import Build, Logs, Utils, Configure |
3176 | -from Configure import conf |
3177 | +import os, sys |
3178 | +from waflib import Build, Logs, Utils, Configure, Errors |
3179 | +from waflib.Configure import conf |
3180 | |
3181 | @conf |
3182 | -def SAMBA_CHECK_PYTHON(conf, mandatory=True, version=(2,4,2)): |
3183 | +def SAMBA_CHECK_PYTHON(conf, mandatory=True, version=(2,6,0)): |
3184 | # enable tool to build python extensions |
3185 | if conf.env.HAVE_PYTHON_H: |
3186 | conf.check_python_version(version) |
3187 | @@ -14,23 +14,25 @@ def SAMBA_CHECK_PYTHON(conf, mandatory=True, version=(2,4,2)): |
3188 | interpreters = [] |
3189 | |
3190 | if conf.env['EXTRA_PYTHON']: |
3191 | - conf.all_envs['extrapython'] = conf.env.copy() |
3192 | + conf.all_envs['extrapython'] = conf.env.derive() |
3193 | conf.setenv('extrapython') |
3194 | conf.env['PYTHON'] = conf.env['EXTRA_PYTHON'] |
3195 | conf.env['IS_EXTRA_PYTHON'] = 'yes' |
3196 | conf.find_program('python', var='PYTHON', mandatory=True) |
3197 | - conf.check_tool('python') |
3198 | + conf.load('python') |
3199 | try: |
3200 | - conf.check_python_version((3, 3, 0)) |
3201 | + conf.check_python_version(version) |
3202 | except Exception: |
3203 | - Logs.warn('extra-python needs to be Python 3.3 or later') |
3204 | + Logs.warn('extra-python needs to be Python %s.%s.%s or later' % |
3205 | + (version[0], version[1], version[2])) |
3206 | raise |
3207 | interpreters.append(conf.env['PYTHON']) |
3208 | conf.setenv('default') |
3209 | |
3210 | - conf.find_program('python', var='PYTHON', mandatory=mandatory) |
3211 | - conf.check_tool('python') |
3212 | - path_python = conf.find_program('python') |
3213 | + conf.find_program('python3', var='PYTHON', mandatory=mandatory) |
3214 | + conf.load('python') |
3215 | + path_python = conf.find_program('python3') |
3216 | + |
3217 | conf.env.PYTHON_SPECIFIED = (conf.env.PYTHON != path_python) |
3218 | conf.check_python_version(version) |
3219 | |
3220 | @@ -42,14 +44,16 @@ def SAMBA_CHECK_PYTHON(conf, mandatory=True, version=(2,4,2)): |
3221 | def SAMBA_CHECK_PYTHON_HEADERS(conf, mandatory=True): |
3222 | if conf.env.disable_python: |
3223 | if mandatory: |
3224 | - raise Utils.WafError("Cannot check for python headers when " |
3225 | + raise Errors.WafError("Cannot check for python headers when " |
3226 | "--disable-python specified") |
3227 | |
3228 | conf.msg("python headers", "Check disabled due to --disable-python") |
3229 | # we don't want PYTHONDIR in config.h, as otherwise changing |
3230 | # --prefix causes a complete rebuild |
3231 | - del(conf.env.defines['PYTHONDIR']) |
3232 | - del(conf.env.defines['PYTHONARCHDIR']) |
3233 | + conf.env.DEFINES = [x for x in conf.env.DEFINES |
3234 | + if not x.startswith('PYTHONDIR=') |
3235 | + and not x.startswith('PYTHONARCHDIR=')] |
3236 | + |
3237 | return |
3238 | |
3239 | if conf.env["python_headers_checked"] == []: |
3240 | @@ -64,21 +68,22 @@ def SAMBA_CHECK_PYTHON_HEADERS(conf, mandatory=True): |
3241 | if conf.env['EXTRA_PYTHON']: |
3242 | extraversion = conf.all_envs['extrapython']['PYTHON_VERSION'] |
3243 | if extraversion == conf.env['PYTHON_VERSION']: |
3244 | - raise Utils.WafError("extrapython %s is same as main python %s" % ( |
3245 | + raise Errors.WafError("extrapython %s is same as main python %s" % ( |
3246 | extraversion, conf.env['PYTHON_VERSION'])) |
3247 | else: |
3248 | conf.msg("python headers", "using cache") |
3249 | |
3250 | # we don't want PYTHONDIR in config.h, as otherwise changing |
3251 | # --prefix causes a complete rebuild |
3252 | - del(conf.env.defines['PYTHONDIR']) |
3253 | - del(conf.env.defines['PYTHONARCHDIR']) |
3254 | + conf.env.DEFINES = [x for x in conf.env.DEFINES |
3255 | + if not x.startswith('PYTHONDIR=') |
3256 | + and not x.startswith('PYTHONARCHDIR=')] |
3257 | |
3258 | def _check_python_headers(conf, mandatory): |
3259 | try: |
3260 | - Configure.ConfigurationError |
3261 | - conf.check_python_headers(mandatory=mandatory) |
3262 | - except Configure.ConfigurationError: |
3263 | + conf.errors.ConfigurationError |
3264 | + conf.check_python_headers() |
3265 | + except conf.errors.ConfigurationError: |
3266 | if mandatory: |
3267 | raise |
3268 | |
3269 | @@ -95,6 +100,11 @@ def _check_python_headers(conf, mandatory): |
3270 | conf.env.append_unique('LIBPATH_PYEMBED', lib[2:]) # strip '-L' |
3271 | conf.env['LINKFLAGS_PYEMBED'].remove(lib) |
3272 | |
3273 | + # same as in waf 1.5, keep only '-fno-strict-aliasing' |
3274 | + # and ignore defines such as NDEBUG _FORTIFY_SOURCE=2 |
3275 | + conf.env.DEFINES_PYEXT = [] |
3276 | + conf.env.CFLAGS_PYEXT = ['-fno-strict-aliasing'] |
3277 | + |
3278 | return |
3279 | |
3280 | def PYTHON_BUILD_IS_ENABLED(self): |
3281 | @@ -145,7 +155,7 @@ def SAMBA_PYTHON(bld, name, |
3282 | source = bld.EXPAND_VARIABLES(source, vars=vars) |
3283 | |
3284 | if realname is not None: |
3285 | - link_name = 'python_modules/%s' % realname |
3286 | + link_name = 'python/%s' % realname |
3287 | else: |
3288 | link_name = None |
3289 | |
3290 | diff --git a/buildtools/wafsamba/samba_third_party.py b/buildtools/wafsamba/samba_third_party.py |
3291 | index 1144f81..e0dd3e1 100644 |
3292 | --- a/buildtools/wafsamba/samba_third_party.py |
3293 | +++ b/buildtools/wafsamba/samba_third_party.py |
3294 | @@ -1,12 +1,12 @@ |
3295 | # functions to support third party libraries |
3296 | |
3297 | import os |
3298 | -import Utils, Build |
3299 | -from Configure import conf |
3300 | +from waflib import Utils, Build, Context |
3301 | +from waflib.Configure import conf |
3302 | |
3303 | @conf |
3304 | def CHECK_FOR_THIRD_PARTY(conf): |
3305 | - return os.path.exists(os.path.join(Utils.g_module.srcdir, 'third_party')) |
3306 | + return os.path.exists(os.path.join(Context.g_module.top, 'third_party')) |
3307 | |
3308 | Build.BuildContext.CHECK_FOR_THIRD_PARTY = CHECK_FOR_THIRD_PARTY |
3309 | |
3310 | @@ -36,18 +36,18 @@ Build.BuildContext.CHECK_POPT = CHECK_POPT |
3311 | |
3312 | @conf |
3313 | def CHECK_CMOCKA(conf): |
3314 | - return conf.CHECK_BUNDLED_SYSTEM_PKG('cmocka', minversion='1.1.1') |
3315 | + return conf.CHECK_BUNDLED_SYSTEM_PKG('cmocka', minversion='1.1.3') |
3316 | |
3317 | Build.BuildContext.CHECK_CMOCKA = CHECK_CMOCKA |
3318 | |
3319 | @conf |
3320 | def CHECK_SOCKET_WRAPPER(conf): |
3321 | - return conf.CHECK_BUNDLED_SYSTEM_PKG('socket_wrapper', minversion='1.1.9') |
3322 | + return conf.CHECK_BUNDLED_SYSTEM_PKG('socket_wrapper', minversion='1.2.1') |
3323 | Build.BuildContext.CHECK_SOCKET_WRAPPER = CHECK_SOCKET_WRAPPER |
3324 | |
3325 | @conf |
3326 | def CHECK_NSS_WRAPPER(conf): |
3327 | - return conf.CHECK_BUNDLED_SYSTEM_PKG('nss_wrapper', minversion='1.1.3') |
3328 | + return conf.CHECK_BUNDLED_SYSTEM_PKG('nss_wrapper', minversion='1.1.5') |
3329 | Build.BuildContext.CHECK_NSS_WRAPPER = CHECK_NSS_WRAPPER |
3330 | |
3331 | @conf |
3332 | @@ -62,5 +62,5 @@ Build.BuildContext.CHECK_UID_WRAPPER = CHECK_UID_WRAPPER |
3333 | |
3334 | @conf |
3335 | def CHECK_PAM_WRAPPER(conf): |
3336 | - return conf.CHECK_BUNDLED_SYSTEM_PKG('pam_wrapper', minversion='1.0.4') |
3337 | + return conf.CHECK_BUNDLED_SYSTEM_PKG('pam_wrapper', minversion='1.0.7') |
3338 | Build.BuildContext.CHECK_PAM_WRAPPER = CHECK_PAM_WRAPPER |
3339 | diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py |
3340 | index c20f61e..bc36d1f 100644 |
3341 | --- a/buildtools/wafsamba/samba_utils.py |
3342 | +++ b/buildtools/wafsamba/samba_utils.py |
3343 | @@ -1,30 +1,91 @@ |
3344 | # a waf tool to add autoconf-like macros to the configure section |
3345 | # and for SAMBA_ macros for building libraries, binaries etc |
3346 | |
3347 | -import os, sys, re, fnmatch, shlex |
3348 | +import os, sys, re, fnmatch, shlex, inspect |
3349 | from optparse import SUPPRESS_HELP |
3350 | -import Build, Options, Utils, Task, Logs, Configure |
3351 | -from TaskGen import feature, before, after |
3352 | -from Configure import conf, ConfigurationContext |
3353 | -from Logs import debug |
3354 | +from waflib import Build, Options, Utils, Task, Logs, Configure, Errors, Context |
3355 | +from waflib import Scripting |
3356 | +from waflib.TaskGen import feature, before, after |
3357 | +from waflib.Configure import ConfigurationContext |
3358 | +from waflib.Logs import debug |
3359 | +from waflib import ConfigSet |
3360 | +from waflib.Build import CACHE_SUFFIX |
3361 | |
3362 | # TODO: make this a --option |
3363 | LIB_PATH="shared" |
3364 | |
3365 | |
3366 | +PY3 = sys.version_info[0] == 3 |
3367 | + |
3368 | +if PY3: |
3369 | + |
3370 | + # helper function to get a string from a variable that maybe 'str' or |
3371 | + # 'bytes' if 'bytes' then it is decoded using 'utf8'. If 'str' is passed |
3372 | + # it is returned unchanged |
3373 | + # Using this function is PY2/PY3 code should ensure in most cases |
3374 | + # the PY2 code runs unchanged in PY2 whereas the code in PY3 possibly |
3375 | + # decodes the variable (see PY2 implementation of this function below) |
3376 | + def get_string(bytesorstring): |
3377 | + tmp = bytesorstring |
3378 | + if isinstance(bytesorstring, bytes): |
3379 | + tmp = bytesorstring.decode('utf8') |
3380 | + elif not isinstance(bytesorstring, str): |
3381 | + raise ValueError('Expected byte of string for %s:%s' % (type(bytesorstring), bytesorstring)) |
3382 | + return tmp |
3383 | + |
3384 | +else: |
3385 | + |
3386 | + # Helper function to return string. |
3387 | + # if 'str' or 'unicode' passed in they are returned unchanged |
3388 | + # otherwise an exception is generated |
3389 | + # Using this function is PY2/PY3 code should ensure in most cases |
3390 | + # the PY2 code runs unchanged in PY2 whereas the code in PY3 possibly |
3391 | + # decodes the variable (see PY3 implementation of this function above) |
3392 | + def get_string(bytesorstring): |
3393 | + tmp = bytesorstring |
3394 | + if not(isinstance(bytesorstring, str) or isinstance(bytesorstring, unicode)): |
3395 | + raise ValueError('Expected str or unicode for %s:%s' % (type(bytesorstring), bytesorstring)) |
3396 | + return tmp |
3397 | + |
3398 | # sigh, python octal constants are a mess |
3399 | MODE_644 = int('644', 8) |
3400 | +MODE_744 = int('744', 8) |
3401 | MODE_755 = int('755', 8) |
3402 | +MODE_777 = int('777', 8) |
3403 | + |
3404 | +def conf(f): |
3405 | + # override in order to propagate the argument "mandatory" |
3406 | + def fun(*k, **kw): |
3407 | + mandatory = True |
3408 | + if 'mandatory' in kw: |
3409 | + mandatory = kw['mandatory'] |
3410 | + del kw['mandatory'] |
3411 | + |
3412 | + try: |
3413 | + return f(*k, **kw) |
3414 | + except Errors.ConfigurationError: |
3415 | + if mandatory: |
3416 | + raise |
3417 | + |
3418 | + fun.__name__ = f.__name__ |
3419 | + if 'mandatory' in inspect.getsource(f): |
3420 | + fun = f |
3421 | + |
3422 | + setattr(Configure.ConfigurationContext, f.__name__, fun) |
3423 | + setattr(Build.BuildContext, f.__name__, fun) |
3424 | + return f |
3425 | +Configure.conf = conf |
3426 | +Configure.conftest = conf |
3427 | |
3428 | @conf |
3429 | def SET_TARGET_TYPE(ctx, target, value): |
3430 | '''set the target type of a target''' |
3431 | cache = LOCAL_CACHE(ctx, 'TARGET_TYPE') |
3432 | if target in cache and cache[target] != 'EMPTY': |
3433 | - Logs.error("ERROR: Target '%s' in directory %s re-defined as %s - was %s" % (target, ctx.curdir, value, cache[target])) |
3434 | + Logs.error("ERROR: Target '%s' in directory %s re-defined as %s - was %s" % (target, ctx.path.abspath(), value, cache[target])) |
3435 | sys.exit(1) |
3436 | LOCAL_CACHE_SET(ctx, 'TARGET_TYPE', target, value) |
3437 | - debug("task_gen: Target '%s' created of type '%s' in %s" % (target, value, ctx.curdir)) |
3438 | + debug("task_gen: Target '%s' created of type '%s' in %s" % (target, value, ctx.path.abspath())) |
3439 | return True |
3440 | |
3441 | |
3442 | @@ -101,7 +162,7 @@ def LOCAL_CACHE_SET(ctx, cachename, key, value): |
3443 | def ASSERT(ctx, expression, msg): |
3444 | '''a build assert call''' |
3445 | if not expression: |
3446 | - raise Utils.WafError("ERROR: %s\n" % msg) |
3447 | + raise Errors.WafError("ERROR: %s\n" % msg) |
3448 | Build.BuildContext.ASSERT = ASSERT |
3449 | |
3450 | |
3451 | @@ -122,9 +183,9 @@ def dict_concat(d1, d2): |
3452 | |
3453 | def ADD_COMMAND(opt, name, function): |
3454 | '''add a new top level command to waf''' |
3455 | - Utils.g_module.__dict__[name] = function |
3456 | + Context.g_module.__dict__[name] = function |
3457 | opt.name = function |
3458 | -Options.Handler.ADD_COMMAND = ADD_COMMAND |
3459 | +Options.OptionsContext.ADD_COMMAND = ADD_COMMAND |
3460 | |
3461 | |
3462 | @feature('c', 'cc', 'cshlib', 'cprogram') |
3463 | @@ -199,8 +260,10 @@ def subst_vars_error(string, env): |
3464 | if re.match('\$\{\w+\}', v): |
3465 | vname = v[2:-1] |
3466 | if not vname in env: |
3467 | - raise KeyError("Failed to find variable %s in %s" % (vname, string)) |
3468 | + raise KeyError("Failed to find variable %s in %s in env %s <%s>" % (vname, string, env.__class__, str(env))) |
3469 | v = env[vname] |
3470 | + if isinstance(v, list): |
3471 | + v = ' '.join(v) |
3472 | out.append(v) |
3473 | return ''.join(out) |
3474 | |
3475 | @@ -212,51 +275,6 @@ def SUBST_ENV_VAR(ctx, varname): |
3476 | Build.BuildContext.SUBST_ENV_VAR = SUBST_ENV_VAR |
3477 | |
3478 | |
3479 | -def ENFORCE_GROUP_ORDERING(bld): |
3480 | - '''enforce group ordering for the project. This |
3481 | - makes the group ordering apply only when you specify |
3482 | - a target with --target''' |
3483 | - if Options.options.compile_targets: |
3484 | - @feature('*') |
3485 | - @before('exec_rule', 'apply_core', 'collect') |
3486 | - def force_previous_groups(self): |
3487 | - if getattr(self.bld, 'enforced_group_ordering', False): |
3488 | - return |
3489 | - self.bld.enforced_group_ordering = True |
3490 | - |
3491 | - def group_name(g): |
3492 | - tm = self.bld.task_manager |
3493 | - return [x for x in tm.groups_names if id(tm.groups_names[x]) == id(g)][0] |
3494 | - |
3495 | - my_id = id(self) |
3496 | - bld = self.bld |
3497 | - stop = None |
3498 | - for g in bld.task_manager.groups: |
3499 | - for t in g.tasks_gen: |
3500 | - if id(t) == my_id: |
3501 | - stop = id(g) |
3502 | - debug('group: Forcing up to group %s for target %s', |
3503 | - group_name(g), self.name or self.target) |
3504 | - break |
3505 | - if stop is not None: |
3506 | - break |
3507 | - if stop is None: |
3508 | - return |
3509 | - |
3510 | - for i in xrange(len(bld.task_manager.groups)): |
3511 | - g = bld.task_manager.groups[i] |
3512 | - bld.task_manager.current_group = i |
3513 | - if id(g) == stop: |
3514 | - break |
3515 | - debug('group: Forcing group %s', group_name(g)) |
3516 | - for t in g.tasks_gen: |
3517 | - if not getattr(t, 'forced_groups', False): |
3518 | - debug('group: Posting %s', t.name or t.target) |
3519 | - t.forced_groups = True |
3520 | - t.post() |
3521 | -Build.BuildContext.ENFORCE_GROUP_ORDERING = ENFORCE_GROUP_ORDERING |
3522 | - |
3523 | - |
3524 | def recursive_dirlist(dir, relbase, pattern=None): |
3525 | '''recursive directory list''' |
3526 | ret = [] |
3527 | @@ -312,8 +330,7 @@ def EXPAND_VARIABLES(ctx, varstr, vars=None): |
3528 | if not isinstance(varstr, str): |
3529 | return varstr |
3530 | |
3531 | - import Environment |
3532 | - env = Environment.Environment() |
3533 | + env = ConfigSet.ConfigSet() |
3534 | ret = varstr |
3535 | # substitute on user supplied dict if avaiilable |
3536 | if vars is not None: |
3537 | @@ -345,16 +362,18 @@ def RUN_COMMAND(cmd, |
3538 | return os.WEXITSTATUS(status) |
3539 | if os.WIFSIGNALED(status): |
3540 | return - os.WTERMSIG(status) |
3541 | - Logs.error("Unknown exit reason %d for command: %s" (status, cmd)) |
3542 | + Logs.error("Unknown exit reason %d for command: %s" % (status, cmd)) |
3543 | return -1 |
3544 | |
3545 | |
3546 | def RUN_PYTHON_TESTS(testfiles, pythonpath=None, extra_env=None): |
3547 | env = LOAD_ENVIRONMENT() |
3548 | if pythonpath is None: |
3549 | - pythonpath = os.path.join(Utils.g_module.blddir, 'python') |
3550 | + pythonpath = os.path.join(Context.g_module.out, 'python') |
3551 | result = 0 |
3552 | for interp in env.python_interpreters: |
3553 | + if not isinstance(interp, str): |
3554 | + interp = ' '.join(interp) |
3555 | for testfile in testfiles: |
3556 | cmd = "PYTHONPATH=%s %s %s" % (pythonpath, interp, testfile) |
3557 | if extra_env: |
3558 | @@ -374,16 +393,15 @@ try: |
3559 | # Even if hashlib.md5 exists, it may be unusable. |
3560 | # Try to use MD5 function. In FIPS mode this will cause an exception |
3561 | # and we'll get to the replacement code |
3562 | - foo = md5('abcd') |
3563 | + foo = md5(b'abcd') |
3564 | except: |
3565 | try: |
3566 | import md5 |
3567 | # repeat the same check here, mere success of import is not enough. |
3568 | # Try to use MD5 function. In FIPS mode this will cause an exception |
3569 | - foo = md5.md5('abcd') |
3570 | + foo = md5.md5(b'abcd') |
3571 | except: |
3572 | - import Constants |
3573 | - Constants.SIG_NIL = hash('abcd') |
3574 | + Context.SIG_NIL = hash('abcd') |
3575 | class replace_md5(object): |
3576 | def __init__(self): |
3577 | self.val = None |
3578 | @@ -409,20 +427,20 @@ except: |
3579 | def LOAD_ENVIRONMENT(): |
3580 | '''load the configuration environment, allowing access to env vars |
3581 | from new commands''' |
3582 | - import Environment |
3583 | - env = Environment.Environment() |
3584 | + env = ConfigSet.ConfigSet() |
3585 | try: |
3586 | - env.load('.lock-wscript') |
3587 | - env.load(env.blddir + '/c4che/default.cache.py') |
3588 | - except: |
3589 | + p = os.path.join(Context.g_module.out, 'c4che/default'+CACHE_SUFFIX) |
3590 | + env.load(p) |
3591 | + except (OSError, IOError): |
3592 | pass |
3593 | return env |
3594 | |
3595 | |
3596 | def IS_NEWER(bld, file1, file2): |
3597 | '''return True if file1 is newer than file2''' |
3598 | - t1 = os.stat(os.path.join(bld.curdir, file1)).st_mtime |
3599 | - t2 = os.stat(os.path.join(bld.curdir, file2)).st_mtime |
3600 | + curdir = bld.path.abspath() |
3601 | + t1 = os.stat(os.path.join(curdir, file1)).st_mtime |
3602 | + t2 = os.stat(os.path.join(curdir, file2)).st_mtime |
3603 | return t1 > t2 |
3604 | Build.BuildContext.IS_NEWER = IS_NEWER |
3605 | |
3606 | @@ -432,40 +450,38 @@ def RECURSE(ctx, directory): |
3607 | '''recurse into a directory, relative to the curdir or top level''' |
3608 | try: |
3609 | visited_dirs = ctx.visited_dirs |
3610 | - except: |
3611 | + except AttributeError: |
3612 | visited_dirs = ctx.visited_dirs = set() |
3613 | - d = os.path.join(ctx.curdir, directory) |
3614 | + d = os.path.join(ctx.path.abspath(), directory) |
3615 | if os.path.exists(d): |
3616 | abspath = os.path.abspath(d) |
3617 | else: |
3618 | - abspath = os.path.abspath(os.path.join(Utils.g_module.srcdir, directory)) |
3619 | + abspath = os.path.abspath(os.path.join(Context.g_module.top, directory)) |
3620 | ctxclass = ctx.__class__.__name__ |
3621 | key = ctxclass + ':' + abspath |
3622 | if key in visited_dirs: |
3623 | # already done it |
3624 | return |
3625 | visited_dirs.add(key) |
3626 | - relpath = os_path_relpath(abspath, ctx.curdir) |
3627 | - if ctxclass == 'Handler': |
3628 | - return ctx.sub_options(relpath) |
3629 | - if ctxclass == 'ConfigurationContext': |
3630 | - return ctx.sub_config(relpath) |
3631 | - if ctxclass == 'BuildContext': |
3632 | - return ctx.add_subdirs(relpath) |
3633 | - Logs.error('Unknown RECURSE context class', ctxclass) |
3634 | + relpath = os_path_relpath(abspath, ctx.path.abspath()) |
3635 | + if ctxclass in ['tmp', 'OptionsContext', 'ConfigurationContext', 'BuildContext']: |
3636 | + return ctx.recurse(relpath) |
3637 | + if 'waflib.extras.compat15' in sys.modules: |
3638 | + return ctx.recurse(relpath) |
3639 | + Logs.error('Unknown RECURSE context class: {}'.format(ctxclass)) |
3640 | raise |
3641 | -Options.Handler.RECURSE = RECURSE |
3642 | +Options.OptionsContext.RECURSE = RECURSE |
3643 | Build.BuildContext.RECURSE = RECURSE |
3644 | |
3645 | |
3646 | -def CHECK_MAKEFLAGS(bld): |
3647 | +def CHECK_MAKEFLAGS(options): |
3648 | '''check for MAKEFLAGS environment variable in case we are being |
3649 | called from a Makefile try to honor a few make command line flags''' |
3650 | if not 'WAF_MAKE' in os.environ: |
3651 | return |
3652 | makeflags = os.environ.get('MAKEFLAGS') |
3653 | if makeflags is None: |
3654 | - return |
3655 | + makeflags = "" |
3656 | jobs_set = False |
3657 | jobs = None |
3658 | # we need to use shlex.split to cope with the escaping of spaces |
3659 | @@ -473,7 +489,7 @@ def CHECK_MAKEFLAGS(bld): |
3660 | for opt in shlex.split(makeflags): |
3661 | # options can come either as -x or as x |
3662 | if opt[0:2] == 'V=': |
3663 | - Options.options.verbose = Logs.verbose = int(opt[2:]) |
3664 | + options.verbose = Logs.verbose = int(opt[2:]) |
3665 | if Logs.verbose > 0: |
3666 | Logs.zones = ['runner'] |
3667 | if Logs.verbose > 2: |
3668 | @@ -487,26 +503,53 @@ def CHECK_MAKEFLAGS(bld): |
3669 | # this is also how "make test TESTS=testpattern" works, and |
3670 | # "make VERBOSE=1" as well as things like "make SYMBOLCHECK=1" |
3671 | loc = opt.find('=') |
3672 | - setattr(Options.options, opt[0:loc], opt[loc+1:]) |
3673 | + setattr(options, opt[0:loc], opt[loc+1:]) |
3674 | elif opt[0] != '-': |
3675 | for v in opt: |
3676 | if re.search(r'j[0-9]*$', v): |
3677 | jobs_set = True |
3678 | jobs = opt.strip('j') |
3679 | elif v == 'k': |
3680 | - Options.options.keep = True |
3681 | + options.keep = True |
3682 | elif re.search(r'-j[0-9]*$', opt): |
3683 | jobs_set = True |
3684 | jobs = opt.strip('-j') |
3685 | elif opt == '-k': |
3686 | - Options.options.keep = True |
3687 | + options.keep = True |
3688 | if not jobs_set: |
3689 | # default to one job |
3690 | - Options.options.jobs = 1 |
3691 | + options.jobs = 1 |
3692 | elif jobs_set and jobs: |
3693 | - Options.options.jobs = int(jobs) |
3694 | - |
3695 | -Build.BuildContext.CHECK_MAKEFLAGS = CHECK_MAKEFLAGS |
3696 | + options.jobs = int(jobs) |
3697 | + |
3698 | +waflib_options_parse_cmd_args = Options.OptionsContext.parse_cmd_args |
3699 | +def wafsamba_options_parse_cmd_args(self, _args=None, cwd=None, allow_unknown=False): |
3700 | + (options, commands, envvars) = \ |
3701 | + waflib_options_parse_cmd_args(self, |
3702 | + _args=_args, |
3703 | + cwd=cwd, |
3704 | + allow_unknown=allow_unknown) |
3705 | + CHECK_MAKEFLAGS(options) |
3706 | + if options.jobs == 1: |
3707 | + # |
3708 | + # waflib.Runner.Parallel processes jobs inline if the possible number |
3709 | + # of jobs is just 1. But (at least in waf <= 2.0.12) it still calls |
3710 | + # create a waflib.Runner.Spawner() which creates a single |
3711 | + # waflib.Runner.Consumer() thread that tries to process jobs from the |
3712 | + # queue. |
3713 | + # |
3714 | + # This has strange effects, which are not noticed typically, |
3715 | + # but at least on AIX python has broken threading and fails |
3716 | + # in random ways. |
3717 | + # |
3718 | + # So we just add a dummy Spawner class. |
3719 | + class NoOpSpawner(object): |
3720 | + def __init__(self, master): |
3721 | + return |
3722 | + from waflib import Runner |
3723 | + Runner.Spawner = NoOpSpawner |
3724 | + return options, commands, envvars |
3725 | +Options.OptionsContext.parse_cmd_args = wafsamba_options_parse_cmd_args |
3726 | |
3727 | option_groups = {} |
3728 | |
3729 | @@ -518,7 +561,7 @@ def option_group(opt, name): |
3730 | gr = opt.add_option_group(name) |
3731 | option_groups[name] = gr |
3732 | return gr |
3733 | -Options.Handler.option_group = option_group |
3734 | +Options.OptionsContext.option_group = option_group |
3735 | |
3736 | |
3737 | def save_file(filename, contents, create_dir=False): |
3738 | @@ -547,9 +590,9 @@ def load_file(filename): |
3739 | |
3740 | def reconfigure(ctx): |
3741 | '''rerun configure if necessary''' |
3742 | - import Configure, samba_wildcard, Scripting |
3743 | if not os.path.exists(".lock-wscript"): |
3744 | - raise Utils.WafError('configure has not been run') |
3745 | + raise Errors.WafError('configure has not been run') |
3746 | + import samba_wildcard |
3747 | bld = samba_wildcard.fake_build_environment() |
3748 | Configure.autoconfig = True |
3749 | Scripting.check_configured(bld) |
3750 | @@ -566,7 +609,7 @@ def map_shlib_extension(ctx, name, python=False): |
3751 | if python: |
3752 | return ctx.env.pyext_PATTERN % root1 |
3753 | else: |
3754 | - (root2, ext2) = os.path.splitext(ctx.env.shlib_PATTERN) |
3755 | + (root2, ext2) = os.path.splitext(ctx.env.cshlib_PATTERN) |
3756 | return root1+ext2 |
3757 | Build.BuildContext.map_shlib_extension = map_shlib_extension |
3758 | |
3759 | @@ -588,7 +631,7 @@ def make_libname(ctx, name, nolibprefix=False, version=None, python=False): |
3760 | if python: |
3761 | libname = apply_pattern(name, ctx.env.pyext_PATTERN) |
3762 | else: |
3763 | - libname = apply_pattern(name, ctx.env.shlib_PATTERN) |
3764 | + libname = apply_pattern(name, ctx.env.cshlib_PATTERN) |
3765 | if nolibprefix and libname[0:3] == 'lib': |
3766 | libname = libname[3:] |
3767 | if version: |
3768 | @@ -622,7 +665,7 @@ def get_tgt_list(bld): |
3769 | tgt_list.append(t) |
3770 | return tgt_list |
3771 | |
3772 | -from Constants import WSCRIPT_FILE |
3773 | +from waflib.Context import WSCRIPT_FILE |
3774 | def PROCESS_SEPARATE_RULE(self, rule): |
3775 | ''' cause waf to process additional script based on `rule'. |
3776 | You should have file named wscript_<stage>_rule in the current directory |
3777 | @@ -633,15 +676,21 @@ def PROCESS_SEPARATE_RULE(self, rule): |
3778 | stage = 'configure' |
3779 | elif isinstance(self, Build.BuildContext): |
3780 | stage = 'build' |
3781 | - file_path = os.path.join(self.curdir, WSCRIPT_FILE+'_'+stage+'_'+rule) |
3782 | - txt = load_file(file_path) |
3783 | - if txt: |
3784 | - dc = {'ctx': self} |
3785 | - if getattr(self.__class__, 'pre_recurse', None): |
3786 | - dc = self.pre_recurse(txt, file_path, self.curdir) |
3787 | - exec(compile(txt, file_path, 'exec'), dc) |
3788 | - if getattr(self.__class__, 'post_recurse', None): |
3789 | - dc = self.post_recurse(txt, file_path, self.curdir) |
3790 | + file_path = os.path.join(self.path.abspath(), WSCRIPT_FILE+'_'+stage+'_'+rule) |
3791 | + node = self.root.find_node(file_path) |
3792 | + if node: |
3793 | + try: |
3794 | + cache = self.recurse_cache |
3795 | + except AttributeError: |
3796 | + cache = self.recurse_cache = {} |
3797 | + if node not in cache: |
3798 | + cache[node] = True |
3799 | + self.pre_recurse(node) |
3800 | + try: |
3801 | + function_code = node.read('rU', None) |
3802 | + exec(compile(function_code, node.abspath(), 'exec'), self.exec_dict) |
3803 | + finally: |
3804 | + self.post_recurse(node) |
3805 | |
3806 | Build.BuildContext.PROCESS_SEPARATE_RULE = PROCESS_SEPARATE_RULE |
3807 | ConfigurationContext.PROCESS_SEPARATE_RULE = PROCESS_SEPARATE_RULE |
3808 | @@ -698,4 +747,4 @@ def samba_add_onoff_option(opt, option, help=(), dest=None, default=True, |
3809 | default=default) |
3810 | opt.add_option(without_val, help=SUPPRESS_HELP, action="store_false", |
3811 | dest=dest) |
3812 | -Options.Handler.samba_add_onoff_option = samba_add_onoff_option |
3813 | +Options.OptionsContext.samba_add_onoff_option = samba_add_onoff_option |
3814 | diff --git a/buildtools/wafsamba/samba_version.py b/buildtools/wafsamba/samba_version.py |
3815 | index be26439..f0e7b4d 100644 |
3816 | --- a/buildtools/wafsamba/samba_version.py |
3817 | +++ b/buildtools/wafsamba/samba_version.py |
3818 | @@ -1,5 +1,5 @@ |
3819 | -import os |
3820 | -import Utils |
3821 | +import os, sys |
3822 | +from waflib import Utils, Context |
3823 | import samba_utils |
3824 | from samba_git import find_git |
3825 | |
3826 | @@ -14,7 +14,7 @@ def git_version_summary(path, env=None): |
3827 | environ = dict(os.environ) |
3828 | environ["GIT_DIR"] = '%s/.git' % path |
3829 | environ["GIT_WORK_TREE"] = path |
3830 | - git = Utils.cmd_output(env.GIT + ' show --pretty=format:"%h%n%ct%n%H%n%cd" --stat HEAD', silent=True, env=environ) |
3831 | + git = samba_utils.get_string(Utils.cmd_output(env.GIT + ' show --pretty=format:"%h%n%ct%n%H%n%cd" --stat HEAD', silent=True, env=environ)) |
3832 | |
3833 | lines = git.splitlines() |
3834 | if not lines or len(lines) < 4: |
3835 | @@ -198,7 +198,10 @@ also accepted as dictionary entries here |
3836 | for name in sorted(self.vcs_fields.keys()): |
3837 | string+="#define SAMBA_VERSION_%s " % name |
3838 | value = self.vcs_fields[name] |
3839 | - if isinstance(value, basestring): |
3840 | + string_types = str |
3841 | + if sys.version_info[0] < 3: |
3842 | + string_types = basestring |
3843 | + if isinstance(value, string_types): |
3844 | string += "\"%s\"" % value |
3845 | elif type(value) is int: |
3846 | string += "%d" % value |
3847 | @@ -260,5 +263,5 @@ def load_version(env=None, is_install=True): |
3848 | env = samba_utils.LOAD_ENVIRONMENT() |
3849 | |
3850 | version = samba_version_file("./VERSION", ".", env, is_install=is_install) |
3851 | - Utils.g_module.VERSION = version.STRING |
3852 | + Context.g_module.VERSION = version.STRING |
3853 | return version |
3854 | diff --git a/buildtools/wafsamba/samba_waf18.py b/buildtools/wafsamba/samba_waf18.py |
3855 | new file mode 100644 |
3856 | index 0000000..cc310fb |
3857 | --- /dev/null |
3858 | +++ b/buildtools/wafsamba/samba_waf18.py |
3859 | @@ -0,0 +1,429 @@ |
3860 | +# compatibility layer for building with more recent waf versions |
3861 | + |
3862 | +import os, shlex, sys |
3863 | +from waflib import Build, Configure, Node, Utils, Options, Logs, TaskGen |
3864 | +from waflib import ConfigSet |
3865 | +from waflib.TaskGen import feature, after |
3866 | +from waflib.Configure import conf, ConfigurationContext |
3867 | + |
3868 | +from waflib.Tools.flex import decide_ext |
3869 | + |
3870 | +# This version of flexfun runs in tsk.get_cwd() as opposed to the |
3871 | +# bld.variant_dir: since input paths adjusted against tsk.get_cwd(), we have to |
3872 | +# use tsk.get_cwd() for the work directory as well. |
3873 | +def flexfun(tsk): |
3874 | + env = tsk.env |
3875 | + bld = tsk.generator.bld |
3876 | + def to_list(xx): |
3877 | + if isinstance(xx, str): |
3878 | + return [xx] |
3879 | + return xx |
3880 | + tsk.last_cmd = lst = [] |
3881 | + lst.extend(to_list(env.FLEX)) |
3882 | + lst.extend(to_list(env.FLEXFLAGS)) |
3883 | + inputs = [a.path_from(tsk.get_cwd()) for a in tsk.inputs] |
3884 | + if env.FLEX_MSYS: |
3885 | + inputs = [x.replace(os.sep, '/') for x in inputs] |
3886 | + lst.extend(inputs) |
3887 | + lst = [x for x in lst if x] |
3888 | + txt = bld.cmd_and_log(lst, cwd=tsk.get_cwd(), env=env.env or None, quiet=0) |
3889 | + tsk.outputs[0].write(txt.replace('\r\n', '\n').replace('\r', '\n')) # issue #1207 |
3890 | + |
3891 | +TaskGen.declare_chain( |
3892 | + name = 'flex', |
3893 | + rule = flexfun, # issue #854 |
3894 | + ext_in = '.l', |
3895 | + decider = decide_ext, |
3896 | +) |
3897 | + |
3898 | + |
3899 | +for y in (Build.BuildContext, Build.CleanContext, Build.InstallContext, Build.UninstallContext, Build.ListContext): |
3900 | + class tmp(y): |
3901 | + variant = 'default' |
3902 | + |
3903 | +def abspath(self, env=None): |
3904 | + if env and hasattr(self, 'children'): |
3905 | + return self.get_bld().abspath() |
3906 | + return self.old_abspath() |
3907 | +Node.Node.old_abspath = Node.Node.abspath |
3908 | +Node.Node.abspath = abspath |
3909 | + |
3910 | +def bldpath(self, env=None): |
3911 | + return self.abspath() |
3912 | + #return self.path_from(self.ctx.bldnode.parent) |
3913 | +Node.Node.bldpath = bldpath |
3914 | + |
3915 | +def srcpath(self, env=None): |
3916 | + return self.abspath() |
3917 | + #return self.path_from(self.ctx.bldnode.parent) |
3918 | +Node.Node.srcpath = srcpath |
3919 | + |
3920 | +def store_fast(self, filename): |
3921 | + file = open(filename, 'wb') |
3922 | + data = self.get_merged_dict() |
3923 | + try: |
3924 | + Build.cPickle.dump(data, file, -1) |
3925 | + finally: |
3926 | + file.close() |
3927 | +ConfigSet.ConfigSet.store_fast = store_fast |
3928 | + |
3929 | +def load_fast(self, filename): |
3930 | + file = open(filename, 'rb') |
3931 | + try: |
3932 | + data = Build.cPickle.load(file) |
3933 | + finally: |
3934 | + file.close() |
3935 | + self.table.update(data) |
3936 | +ConfigSet.ConfigSet.load_fast = load_fast |
3937 | + |
3938 | +@feature('c', 'cxx', 'd', 'asm', 'fc', 'includes') |
3939 | +@after('propagate_uselib_vars', 'process_source') |
3940 | +def apply_incpaths(self): |
3941 | + lst = self.to_incnodes(self.to_list(getattr(self, 'includes', [])) + self.env['INCLUDES']) |
3942 | + self.includes_nodes = lst |
3943 | + cwdx = getattr(self.bld, 'cwdx', self.bld.bldnode) |
3944 | + self.env['INCPATHS'] = [x.path_from(cwdx) for x in lst] |
3945 | + |
3946 | +@conf |
3947 | +def define(self, key, val, quote=True, comment=None): |
3948 | + assert key and isinstance(key, str) |
3949 | + |
3950 | + if val is None: |
3951 | + val = () |
3952 | + elif isinstance(val, bool): |
3953 | + val = int(val) |
3954 | + |
3955 | + # waf 1.5 |
3956 | + self.env[key] = val |
3957 | + |
3958 | + if isinstance(val, int) or isinstance(val, float): |
3959 | + s = '%s=%s' |
3960 | + else: |
3961 | + s = quote and '%s="%s"' or '%s=%s' |
3962 | + app = s % (key, str(val)) |
3963 | + |
3964 | + ban = key + '=' |
3965 | + lst = self.env.DEFINES |
3966 | + for x in lst: |
3967 | + if x.startswith(ban): |
3968 | + lst[lst.index(x)] = app |
3969 | + break |
3970 | + else: |
3971 | + self.env.append_value('DEFINES', app) |
3972 | + |
3973 | + self.env.append_unique('define_key', key) |
3974 | + |
3975 | +# compat15 removes this but we want to keep it |
3976 | +@conf |
3977 | +def undefine(self, key, from_env=True, comment=None): |
3978 | + assert key and isinstance(key, str) |
3979 | + |
3980 | + ban = key + '=' |
3981 | + self.env.DEFINES = [x for x in self.env.DEFINES if not x.startswith(ban)] |
3982 | + self.env.append_unique('define_key', key) |
3983 | + # waf 1.5 |
3984 | + if from_env: |
3985 | + self.env[key] = () |
3986 | + |
3987 | +class ConfigurationContext(Configure.ConfigurationContext): |
3988 | + def init_dirs(self): |
3989 | + self.setenv('default') |
3990 | + self.env.merge_config_header = True |
3991 | + return super(ConfigurationContext, self).init_dirs() |
3992 | + |
3993 | +def find_program_samba(self, *k, **kw): |
3994 | + kw['mandatory'] = False |
3995 | + ret = self.find_program_old(*k, **kw) |
3996 | + return ret |
3997 | +Configure.ConfigurationContext.find_program_old = Configure.ConfigurationContext.find_program |
3998 | +Configure.ConfigurationContext.find_program = find_program_samba |
3999 | + |
4000 | +Build.BuildContext.ENFORCE_GROUP_ORDERING = Utils.nada |
4001 | +Build.BuildContext.AUTOCLEANUP_STALE_FILES = Utils.nada |
4002 | + |
4003 | +@conf |
4004 | +def check(self, *k, **kw): |
4005 | + '''Override the waf defaults to inject --with-directory options''' |
4006 | + |
4007 | + # match the configuration test with speficic options, for example: |
4008 | + # --with-libiconv -> Options.options.iconv_open -> "Checking for library iconv" |
4009 | + self.validate_c(kw) |
4010 | + |
4011 | + additional_dirs = [] |
4012 | + if 'msg' in kw: |
4013 | + msg = kw['msg'] |
4014 | + for x in Options.OptionsContext.parser.parser.option_list: |
4015 | + if getattr(x, 'match', None) and msg in x.match: |
4016 | + d = getattr(Options.options, x.dest, '') |
4017 | + if d: |
4018 | + additional_dirs.append(d) |
4019 | + |
4020 | + # we add the additional dirs twice: once for the test data, and again if the compilation test suceeds below |
4021 | + def add_options_dir(dirs, env): |
4022 | + for x in dirs: |
4023 | + if not x in env.CPPPATH: |
4024 | + env.CPPPATH = [os.path.join(x, 'include')] + env.CPPPATH |
4025 | + if not x in env.LIBPATH: |
4026 | + env.LIBPATH = [os.path.join(x, 'lib')] + env.LIBPATH |
4027 | + |
4028 | + add_options_dir(additional_dirs, kw['env']) |
4029 | + |
4030 | + self.start_msg(kw['msg'], **kw) |
4031 | + ret = None |
4032 | + try: |
4033 | + ret = self.run_build(*k, **kw) |
4034 | + except self.errors.ConfigurationError: |
4035 | + self.end_msg(kw['errmsg'], 'YELLOW', **kw) |
4036 | + if Logs.verbose > 1: |
4037 | + raise |
4038 | + else: |
4039 | + self.fatal('The configuration failed') |
4040 | + else: |
4041 | + kw['success'] = ret |
4042 | + # success! time for brandy |
4043 | + add_options_dir(additional_dirs, self.env) |
4044 | + |
4045 | + ret = self.post_check(*k, **kw) |
4046 | + if not ret: |
4047 | + self.end_msg(kw['errmsg'], 'YELLOW', **kw) |
4048 | + self.fatal('The configuration failed %r' % ret) |
4049 | + else: |
4050 | + self.end_msg(self.ret_msg(kw['okmsg'], kw), **kw) |
4051 | + return ret |
4052 | + |
4053 | +@conf |
4054 | +def CHECK_LIBRARY_SUPPORT(conf, rpath=False, version_script=False, msg=None): |
4055 | + '''see if the platform supports building libraries''' |
4056 | + |
4057 | + if msg is None: |
4058 | + if rpath: |
4059 | + msg = "rpath library support" |
4060 | + else: |
4061 | + msg = "building library support" |
4062 | + |
4063 | + def build(bld): |
4064 | + lib_node = bld.srcnode.make_node('libdir/liblc1.c') |
4065 | + lib_node.parent.mkdir() |
4066 | + lib_node.write('int lib_func(void) { return 42; }\n', 'w') |
4067 | + main_node = bld.srcnode.make_node('main.c') |
4068 | + main_node.write('int main(void) {return !(lib_func() == 42);}', 'w') |
4069 | + linkflags = [] |
4070 | + if version_script: |
4071 | + script = bld.srcnode.make_node('ldscript') |
4072 | + script.write('TEST_1.0A2 { global: *; };\n', 'w') |
4073 | + linkflags.append('-Wl,--version-script=%s' % script.abspath()) |
4074 | + bld(features='c cshlib', source=lib_node, target='lib1', linkflags=linkflags, name='lib1') |
4075 | + o = bld(features='c cprogram', source=main_node, target='prog1', uselib_local='lib1') |
4076 | + if rpath: |
4077 | + o.rpath = [lib_node.parent.abspath()] |
4078 | + def run_app(self): |
4079 | + args = conf.SAMBA_CROSS_ARGS(msg=msg) |
4080 | + env = dict(os.environ) |
4081 | + env['LD_LIBRARY_PATH'] = self.inputs[0].parent.abspath() + os.pathsep + env.get('LD_LIBRARY_PATH', '') |
4082 | + self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args, env=env) |
4083 | + o.post() |
4084 | + bld(rule=run_app, source=o.link_task.outputs[0]) |
4085 | + |
4086 | + # ok, so it builds |
4087 | + try: |
4088 | + conf.check(build_fun=build, msg='Checking for %s' % msg) |
4089 | + except conf.errors.ConfigurationError: |
4090 | + return False |
4091 | + return True |
4092 | + |
4093 | +@conf |
4094 | +def CHECK_NEED_LC(conf, msg): |
4095 | + '''check if we need -lc''' |
4096 | + def build(bld): |
4097 | + lib_node = bld.srcnode.make_node('libdir/liblc1.c') |
4098 | + lib_node.parent.mkdir() |
4099 | + lib_node.write('#include <stdio.h>\nint lib_func(void) { FILE *f = fopen("foo", "r");}\n', 'w') |
4100 | + bld(features='c cshlib', source=[lib_node], linkflags=conf.env.EXTRA_LDFLAGS, target='liblc') |
4101 | + try: |
4102 | + conf.check(build_fun=build, msg=msg, okmsg='-lc is unnecessary', errmsg='-lc is necessary') |
4103 | + except conf.errors.ConfigurationError: |
4104 | + return False |
4105 | + return True |
4106 | + |
4107 | +# already implemented on "waf -v" |
4108 | +def order(bld, tgt_list): |
4109 | + return True |
4110 | +Build.BuildContext.check_group_ordering = order |
4111 | + |
4112 | +@conf |
4113 | +def CHECK_CFG(self, *k, **kw): |
4114 | + if 'args' in kw: |
4115 | + kw['args'] = shlex.split(kw['args']) |
4116 | + if not 'mandatory' in kw: |
4117 | + kw['mandatory'] = False |
4118 | + kw['global_define'] = True |
4119 | + return self.check_cfg(*k, **kw) |
4120 | + |
4121 | +def cmd_output(cmd, **kw): |
4122 | + |
4123 | + silent = False |
4124 | + if 'silent' in kw: |
4125 | + silent = kw['silent'] |
4126 | + del(kw['silent']) |
4127 | + |
4128 | + if 'e' in kw: |
4129 | + tmp = kw['e'] |
4130 | + del(kw['e']) |
4131 | + kw['env'] = tmp |
4132 | + |
4133 | + kw['shell'] = isinstance(cmd, str) |
4134 | + kw['stdout'] = Utils.subprocess.PIPE |
4135 | + if silent: |
4136 | + kw['stderr'] = Utils.subprocess.PIPE |
4137 | + |
4138 | + try: |
4139 | + p = Utils.subprocess.Popen(cmd, **kw) |
4140 | + output = p.communicate()[0] |
4141 | + except OSError as e: |
4142 | + raise ValueError(str(e)) |
4143 | + |
4144 | + if p.returncode: |
4145 | + if not silent: |
4146 | + msg = "command execution failed: %s -> %r" % (cmd, str(output)) |
4147 | + raise ValueError(msg) |
4148 | + output = '' |
4149 | + return output |
4150 | +Utils.cmd_output = cmd_output |
4151 | + |
4152 | + |
4153 | +@TaskGen.feature('c', 'cxx', 'd') |
4154 | +@TaskGen.before('apply_incpaths', 'propagate_uselib_vars') |
4155 | +@TaskGen.after('apply_link', 'process_source') |
4156 | +def apply_uselib_local(self): |
4157 | + """ |
4158 | + process the uselib_local attribute |
4159 | + execute after apply_link because of the execution order set on 'link_task' |
4160 | + """ |
4161 | + env = self.env |
4162 | + from waflib.Tools.ccroot import stlink_task |
4163 | + |
4164 | + # 1. the case of the libs defined in the project (visit ancestors first) |
4165 | + # the ancestors external libraries (uselib) will be prepended |
4166 | + self.uselib = self.to_list(getattr(self, 'uselib', [])) |
4167 | + self.includes = self.to_list(getattr(self, 'includes', [])) |
4168 | + names = self.to_list(getattr(self, 'uselib_local', [])) |
4169 | + get = self.bld.get_tgen_by_name |
4170 | + seen = set() |
4171 | + seen_uselib = set() |
4172 | + tmp = Utils.deque(names) # consume a copy of the list of names |
4173 | + if tmp: |
4174 | + if Logs.verbose: |
4175 | + Logs.warn('compat: "uselib_local" is deprecated, replace by "use"') |
4176 | + while tmp: |
4177 | + lib_name = tmp.popleft() |
4178 | + # visit dependencies only once |
4179 | + if lib_name in seen: |
4180 | + continue |
4181 | + |
4182 | + y = get(lib_name) |
4183 | + y.post() |
4184 | + seen.add(lib_name) |
4185 | + |
4186 | + # object has ancestors to process (shared libraries): add them to the end of the list |
4187 | + if getattr(y, 'uselib_local', None): |
4188 | + for x in self.to_list(getattr(y, 'uselib_local', [])): |
4189 | + obj = get(x) |
4190 | + obj.post() |
4191 | + if getattr(obj, 'link_task', None): |
4192 | + if not isinstance(obj.link_task, stlink_task): |
4193 | + tmp.append(x) |
4194 | + |
4195 | + # link task and flags |
4196 | + if getattr(y, 'link_task', None): |
4197 | + |
4198 | + link_name = y.target[y.target.rfind(os.sep) + 1:] |
4199 | + if isinstance(y.link_task, stlink_task): |
4200 | + env.append_value('STLIB', [link_name]) |
4201 | + else: |
4202 | + # some linkers can link against programs |
4203 | + env.append_value('LIB', [link_name]) |
4204 | + |
4205 | + # the order |
4206 | + self.link_task.set_run_after(y.link_task) |
4207 | + |
4208 | + # for the recompilation |
4209 | + self.link_task.dep_nodes += y.link_task.outputs |
4210 | + |
4211 | + # add the link path too |
4212 | + tmp_path = y.link_task.outputs[0].parent.bldpath() |
4213 | + if not tmp_path in env['LIBPATH']: |
4214 | + env.prepend_value('LIBPATH', [tmp_path]) |
4215 | + |
4216 | + # add ancestors uselib too - but only propagate those that have no staticlib defined |
4217 | + for v in self.to_list(getattr(y, 'uselib', [])): |
4218 | + if v not in seen_uselib: |
4219 | + seen_uselib.add(v) |
4220 | + if not env['STLIB_' + v]: |
4221 | + if not v in self.uselib: |
4222 | + self.uselib.insert(0, v) |
4223 | + |
4224 | + # if the library task generator provides 'export_includes', add to the include path |
4225 | + # the export_includes must be a list of paths relative to the other library |
4226 | + if getattr(y, 'export_includes', None): |
4227 | + self.includes.extend(y.to_incnodes(y.export_includes)) |
4228 | + |
4229 | +@TaskGen.feature('cprogram', 'cxxprogram', 'cstlib', 'cxxstlib', 'cshlib', 'cxxshlib', 'dprogram', 'dstlib', 'dshlib') |
4230 | +@TaskGen.after('apply_link') |
4231 | +def apply_objdeps(self): |
4232 | + "add the .o files produced by some other object files in the same manner as uselib_local" |
4233 | + names = getattr(self, 'add_objects', []) |
4234 | + if not names: |
4235 | + return |
4236 | + names = self.to_list(names) |
4237 | + |
4238 | + get = self.bld.get_tgen_by_name |
4239 | + seen = [] |
4240 | + while names: |
4241 | + x = names[0] |
4242 | + |
4243 | + # visit dependencies only once |
4244 | + if x in seen: |
4245 | + names = names[1:] |
4246 | + continue |
4247 | + |
4248 | + # object does not exist ? |
4249 | + y = get(x) |
4250 | + |
4251 | + # object has ancestors to process first ? update the list of names |
4252 | + if getattr(y, 'add_objects', None): |
4253 | + added = 0 |
4254 | + lst = y.to_list(y.add_objects) |
4255 | + lst.reverse() |
4256 | + for u in lst: |
4257 | + if u in seen: |
4258 | + continue |
4259 | + added = 1 |
4260 | + names = [u]+names |
4261 | + if added: |
4262 | + continue # list of names modified, loop |
4263 | + |
4264 | + # safe to process the current object |
4265 | + y.post() |
4266 | + seen.append(x) |
4267 | + |
4268 | + for t in getattr(y, 'compiled_tasks', []): |
4269 | + self.link_task.inputs.extend(t.outputs) |
4270 | + |
4271 | +@TaskGen.after('apply_link') |
4272 | +def process_obj_files(self): |
4273 | + if not hasattr(self, 'obj_files'): |
4274 | + return |
4275 | + for x in self.obj_files: |
4276 | + node = self.path.find_resource(x) |
4277 | + self.link_task.inputs.append(node) |
4278 | + |
4279 | +@TaskGen.taskgen_method |
4280 | +def add_obj_file(self, file): |
4281 | + """Small example on how to link object files as if they were source |
4282 | + obj = bld.create_obj('cc') |
4283 | + obj.add_obj_file('foo.o')""" |
4284 | + if not hasattr(self, 'obj_files'): |
4285 | + self.obj_files = [] |
4286 | + if not 'process_obj_files' in self.meths: |
4287 | + self.meths.append('process_obj_files') |
4288 | + self.obj_files.append(file) |
4289 | diff --git a/buildtools/wafsamba/samba_wildcard.py b/buildtools/wafsamba/samba_wildcard.py |
4290 | index ed3e0c2..6173ce8 100644 |
4291 | --- a/buildtools/wafsamba/samba_wildcard.py |
4292 | +++ b/buildtools/wafsamba/samba_wildcard.py |
4293 | @@ -1,15 +1,15 @@ |
4294 | # based on playground/evil in the waf svn tree |
4295 | |
4296 | import os, datetime, fnmatch |
4297 | -import Scripting, Utils, Options, Logs, Environment |
4298 | -from Constants import SRCDIR, BLDDIR |
4299 | +from waflib import Scripting, Utils, Options, Logs, Errors |
4300 | +from waflib import ConfigSet, Context |
4301 | from samba_utils import LOCAL_CACHE, os_path_relpath |
4302 | |
4303 | def run_task(t, k): |
4304 | '''run a single build task''' |
4305 | ret = t.run() |
4306 | if ret: |
4307 | - raise Utils.WafError("Failed to build %s: %u" % (k, ret)) |
4308 | + raise Errors.WafError("Failed to build %s: %u" % (k, ret)) |
4309 | |
4310 | |
4311 | def run_named_build_task(cmd): |
4312 | @@ -45,7 +45,7 @@ def run_named_build_task(cmd): |
4313 | |
4314 | |
4315 | if not found: |
4316 | - raise Utils.WafError("Unable to find build target matching %s" % cmd) |
4317 | + raise Errors.WafError("Unable to find build target matching %s" % cmd) |
4318 | |
4319 | |
4320 | def rewrite_compile_targets(): |
4321 | @@ -125,7 +125,7 @@ def wildcard_main(missing_cmd_fn): |
4322 | def fake_build_environment(info=True, flush=False): |
4323 | """create all the tasks for the project, but do not run the build |
4324 | return the build context in use""" |
4325 | - bld = getattr(Utils.g_module, 'build_context', Utils.Context)() |
4326 | + bld = getattr(Context.g_module, 'build_context', Utils.Context)() |
4327 | bld = Scripting.check_configured(bld) |
4328 | |
4329 | Options.commands['install'] = False |
4330 | @@ -134,16 +134,15 @@ def fake_build_environment(info=True, flush=False): |
4331 | bld.is_install = 0 # False |
4332 | |
4333 | try: |
4334 | - proj = Environment.Environment(Options.lockfile) |
4335 | + proj = ConfigSet.ConfigSet(Options.lockfile) |
4336 | except IOError: |
4337 | - raise Utils.WafError("Project not configured (run 'waf configure' first)") |
4338 | + raise Errors.WafError("Project not configured (run 'waf configure' first)") |
4339 | |
4340 | - bld.load_dirs(proj[SRCDIR], proj[BLDDIR]) |
4341 | bld.load_envs() |
4342 | |
4343 | if info: |
4344 | Logs.info("Waf: Entering directory `%s'" % bld.bldnode.abspath()) |
4345 | - bld.add_subdirs([os.path.split(Utils.g_module.root_path)[0]]) |
4346 | + bld.add_subdirs([os.path.split(Context.g_module.root_path)[0]]) |
4347 | |
4348 | bld.pre_build() |
4349 | if flush: |
4350 | diff --git a/buildtools/wafsamba/stale_files.py b/buildtools/wafsamba/stale_files.py |
4351 | index 2dd08e1..175f573 100644 |
4352 | --- a/buildtools/wafsamba/stale_files.py |
4353 | +++ b/buildtools/wafsamba/stale_files.py |
4354 | @@ -14,7 +14,9 @@ nodes/tasks, in which case the method will have to be modified |
4355 | to exclude some folders for example. |
4356 | """ |
4357 | |
4358 | -import Logs, Build, os, samba_utils, Options, Utils |
4359 | +from waflib import Logs, Build, Options, Utils, Errors |
4360 | +import os |
4361 | +from wafsamba import samba_utils |
4362 | from Runner import Parallel |
4363 | |
4364 | old_refill_task_list = Parallel.refill_task_list |
4365 | @@ -46,7 +48,7 @@ def replace_refill_task_list(self): |
4366 | |
4367 | # paranoia |
4368 | if bin_base[-4:] != '/bin': |
4369 | - raise Utils.WafError("Invalid bin base: %s" % bin_base) |
4370 | + raise Errors.WafError("Invalid bin base: %s" % bin_base) |
4371 | |
4372 | # obtain the expected list of files |
4373 | expected = [] |
4374 | diff --git a/buildtools/wafsamba/symbols.py b/buildtools/wafsamba/symbols.py |
4375 | index 7ff4bac..4eab8e4 100644 |
4376 | --- a/buildtools/wafsamba/symbols.py |
4377 | +++ b/buildtools/wafsamba/symbols.py |
4378 | @@ -2,8 +2,8 @@ |
4379 | # using nm, producing a set of exposed defined/undefined symbols |
4380 | |
4381 | import os, re, subprocess |
4382 | -import Utils, Build, Options, Logs |
4383 | -from Logs import debug |
4384 | +from waflib import Utils, Build, Options, Logs, Errors |
4385 | +from waflib.Logs import debug |
4386 | from samba_utils import TO_LIST, LOCAL_CACHE, get_tgt_list, os_path_relpath |
4387 | |
4388 | # these are the data structures used in symbols.py: |
4389 | @@ -59,12 +59,12 @@ def symbols_extract(bld, objfiles, dynamic=False): |
4390 | |
4391 | for line in nmpipe: |
4392 | line = line.strip() |
4393 | - if line.endswith(':'): |
4394 | + if line.endswith(b':'): |
4395 | filename = line[:-1] |
4396 | ret[filename] = { "PUBLIC": set(), "UNDEFINED" : set() } |
4397 | continue |
4398 | - cols = line.split(" ") |
4399 | - if cols == ['']: |
4400 | + cols = line.split(b" ") |
4401 | + if cols == [b'']: |
4402 | continue |
4403 | # see if the line starts with an address |
4404 | if len(cols) == 3: |
4405 | @@ -73,10 +73,10 @@ def symbols_extract(bld, objfiles, dynamic=False): |
4406 | else: |
4407 | symbol_type = cols[0] |
4408 | symbol = cols[1] |
4409 | - if symbol_type in "BDGTRVWSi": |
4410 | + if symbol_type in b"BDGTRVWSi": |
4411 | # its a public symbol |
4412 | ret[filename]["PUBLIC"].add(symbol) |
4413 | - elif symbol_type in "U": |
4414 | + elif symbol_type in b"U": |
4415 | ret[filename]["UNDEFINED"].add(symbol) |
4416 | |
4417 | # add to the cache |
4418 | @@ -106,10 +106,10 @@ def find_ldd_path(bld, libname, binary): |
4419 | lddpipe = subprocess.Popen(['ldd', binary], stdout=subprocess.PIPE).stdout |
4420 | for line in lddpipe: |
4421 | line = line.strip() |
4422 | - cols = line.split(" ") |
4423 | - if len(cols) < 3 or cols[1] != "=>": |
4424 | + cols = line.split(b" ") |
4425 | + if len(cols) < 3 or cols[1] != b"=>": |
4426 | continue |
4427 | - if cols[0].startswith("libc."): |
4428 | + if cols[0].startswith(b"libc."): |
4429 | # save this one too |
4430 | bld.env.libc_path = cols[2] |
4431 | if cols[0].startswith(libname): |
4432 | @@ -119,8 +119,8 @@ def find_ldd_path(bld, libname, binary): |
4433 | |
4434 | |
4435 | # some regular expressions for parsing readelf output |
4436 | -re_sharedlib = re.compile('Shared library: \[(.*)\]') |
4437 | -re_rpath = re.compile('Library rpath: \[(.*)\]') |
4438 | +re_sharedlib = re.compile(b'Shared library: \[(.*)\]') |
4439 | +re_rpath = re.compile(b'Library rpath: \[(.*)\]') |
4440 | |
4441 | def get_libs(bld, binname): |
4442 | '''find the list of linked libraries for any binary or library |
4443 | @@ -410,7 +410,7 @@ def check_library_deps(bld, t): |
4444 | if dep2 == name and t.in_library != t2.in_library: |
4445 | Logs.warn("WARNING: mutual dependency %s <=> %s" % (name, real_name(t2.sname))) |
4446 | Logs.warn("Libraries should match. %s != %s" % (t.in_library, t2.in_library)) |
4447 | - # raise Utils.WafError("illegal mutual dependency") |
4448 | + # raise Errors.WafError("illegal mutual dependency") |
4449 | |
4450 | |
4451 | def check_syslib_collisions(bld, tgt_list): |
4452 | @@ -430,7 +430,7 @@ def check_syslib_collisions(bld, tgt_list): |
4453 | Logs.error("ERROR: Target '%s' has symbols '%s' which is also in syslib '%s'" % (t.sname, common, lib)) |
4454 | has_error = True |
4455 | if has_error: |
4456 | - raise Utils.WafError("symbols in common with system libraries") |
4457 | + raise Errors.WafError("symbols in common with system libraries") |
4458 | |
4459 | |
4460 | def check_dependencies(bld, t): |
4461 | @@ -546,7 +546,7 @@ def symbols_whyneeded(task): |
4462 | |
4463 | why = Options.options.WHYNEEDED.split(":") |
4464 | if len(why) != 2: |
4465 | - raise Utils.WafError("usage: WHYNEEDED=TARGET:DEPENDENCY") |
4466 | + raise Errors.WafError("usage: WHYNEEDED=TARGET:DEPENDENCY") |
4467 | target = why[0] |
4468 | subsystem = why[1] |
4469 | |
4470 | @@ -579,7 +579,7 @@ def report_duplicate(bld, binname, sym, libs, fail_on_error): |
4471 | else: |
4472 | libnames.append(lib) |
4473 | if fail_on_error: |
4474 | - raise Utils.WafError("%s: Symbol %s linked in multiple libraries %s" % (binname, sym, libnames)) |
4475 | + raise Errors.WafError("%s: Symbol %s linked in multiple libraries %s" % (binname, sym, libnames)) |
4476 | else: |
4477 | print("%s: Symbol %s linked in multiple libraries %s" % (binname, sym, libnames)) |
4478 | |
4479 | diff --git a/buildtools/wafsamba/test_duplicate_symbol.sh b/buildtools/wafsamba/test_duplicate_symbol.sh |
4480 | index 89a4027..46f44a6 100755 |
4481 | --- a/buildtools/wafsamba/test_duplicate_symbol.sh |
4482 | +++ b/buildtools/wafsamba/test_duplicate_symbol.sh |
4483 | @@ -5,7 +5,7 @@ |
4484 | |
4485 | subunit_start_test duplicate_symbols |
4486 | |
4487 | -if ./buildtools/bin/waf build --dup-symbol-check; then |
4488 | +if $PYTHON ./buildtools/bin/waf build --dup-symbol-check; then |
4489 | subunit_pass_test duplicate_symbols |
4490 | else |
4491 | echo | subunit_fail_test duplicate_symbols |
4492 | diff --git a/buildtools/wafsamba/tests/test_abi.py b/buildtools/wafsamba/tests/test_abi.py |
4493 | index 7489214..d6bdb04 100644 |
4494 | --- a/buildtools/wafsamba/tests/test_abi.py |
4495 | +++ b/buildtools/wafsamba/tests/test_abi.py |
4496 | @@ -21,7 +21,7 @@ from wafsamba.samba_abi import ( |
4497 | normalise_signature, |
4498 | ) |
4499 | |
4500 | -from cStringIO import StringIO |
4501 | +from samba.compat import StringIO |
4502 | |
4503 | |
4504 | class NormaliseSignatureTests(TestCase): |
4505 | diff --git a/buildtools/wafsamba/tru64cc.py b/buildtools/wafsamba/tru64cc.py |
4506 | deleted file mode 100644 |
4507 | index e1bbb1d..0000000 |
4508 | --- a/buildtools/wafsamba/tru64cc.py |
4509 | +++ /dev/null |
4510 | @@ -1,77 +0,0 @@ |
4511 | - |
4512 | -# compiler definition for tru64/OSF1 cc compiler |
4513 | -# based on suncc.py from waf |
4514 | - |
4515 | -import os, optparse |
4516 | -import Utils, Options, Configure |
4517 | -import ccroot, ar |
4518 | -from Configure import conftest |
4519 | - |
4520 | -from compiler_cc import c_compiler |
4521 | - |
4522 | -c_compiler['osf1V'] = ['gcc', 'tru64cc'] |
4523 | - |
4524 | -@conftest |
4525 | -def find_tru64cc(conf): |
4526 | - v = conf.env |
4527 | - cc = None |
4528 | - if v['CC']: cc = v['CC'] |
4529 | - elif 'CC' in conf.environ: cc = conf.environ['CC'] |
4530 | - if not cc: cc = conf.find_program('cc', var='CC') |
4531 | - if not cc: conf.fatal('tru64cc was not found') |
4532 | - cc = conf.cmd_to_list(cc) |
4533 | - |
4534 | - try: |
4535 | - if not Utils.cmd_output(cc + ['-V']): |
4536 | - conf.fatal('tru64cc %r was not found' % cc) |
4537 | - except ValueError: |
4538 | - conf.fatal('tru64cc -V could not be executed') |
4539 | - |
4540 | - v['CC'] = cc |
4541 | - v['CC_NAME'] = 'tru64' |
4542 | - |
4543 | -@conftest |
4544 | -def tru64cc_common_flags(conf): |
4545 | - v = conf.env |
4546 | - |
4547 | - v['CC_SRC_F'] = '' |
4548 | - v['CC_TGT_F'] = ['-c', '-o', ''] |
4549 | - v['CPPPATH_ST'] = '-I%s' # template for adding include paths |
4550 | - |
4551 | - # linker |
4552 | - if not v['LINK_CC']: v['LINK_CC'] = v['CC'] |
4553 | - v['CCLNK_SRC_F'] = '' |
4554 | - v['CCLNK_TGT_F'] = ['-o', ''] |
4555 | - |
4556 | - v['LIB_ST'] = '-l%s' # template for adding libs |
4557 | - v['LIBPATH_ST'] = '-L%s' # template for adding libpaths |
4558 | - v['STATICLIB_ST'] = '-l%s' |
4559 | - v['STATICLIBPATH_ST'] = '-L%s' |
4560 | - v['CCDEFINES_ST'] = '-D%s' |
4561 | - |
4562 | -# v['SONAME_ST'] = '-Wl,-h -Wl,%s' |
4563 | -# v['SHLIB_MARKER'] = '-Bdynamic' |
4564 | -# v['STATICLIB_MARKER'] = '-Bstatic' |
4565 | - |
4566 | - # program |
4567 | - v['program_PATTERN'] = '%s' |
4568 | - |
4569 | - # shared library |
4570 | -# v['shlib_CCFLAGS'] = ['-Kpic', '-DPIC'] |
4571 | - v['shlib_LINKFLAGS'] = ['-shared'] |
4572 | - v['shlib_PATTERN'] = 'lib%s.so' |
4573 | - |
4574 | - # static lib |
4575 | -# v['staticlib_LINKFLAGS'] = ['-Bstatic'] |
4576 | -# v['staticlib_PATTERN'] = 'lib%s.a' |
4577 | - |
4578 | -detect = ''' |
4579 | -find_tru64cc |
4580 | -find_cpp |
4581 | -find_ar |
4582 | -tru64cc_common_flags |
4583 | -cc_load_tools |
4584 | -cc_add_flags |
4585 | -link_add_flags |
4586 | -''' |
4587 | - |
4588 | diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py |
4589 | index 12d5421..a077026 100644 |
4590 | --- a/buildtools/wafsamba/wafsamba.py |
4591 | +++ b/buildtools/wafsamba/wafsamba.py |
4592 | @@ -1,14 +1,14 @@ |
4593 | # a waf tool to add autoconf-like macros to the configure section |
4594 | # and for SAMBA_ macros for building libraries, binaries etc |
4595 | |
4596 | -import Build, os, sys, Options, Task, Utils, cc, TaskGen, fnmatch, re, shutil, Logs, Constants |
4597 | -from Configure import conf |
4598 | -from Logs import debug |
4599 | +import os, sys, re, shutil, fnmatch |
4600 | +from waflib import Build, Options, Task, Utils, TaskGen, Logs, Context, Errors |
4601 | +from waflib.Configure import conf |
4602 | +from waflib.Logs import debug |
4603 | from samba_utils import SUBST_VARS_RECURSIVE |
4604 | TaskGen.task_gen.apply_verif = Utils.nada |
4605 | |
4606 | # bring in the other samba modules |
4607 | -from samba_optimisation import * |
4608 | from samba_utils import * |
4609 | from samba_version import * |
4610 | from samba_autoconf import * |
4611 | @@ -25,27 +25,19 @@ import samba_install |
4612 | import samba_conftests |
4613 | import samba_abi |
4614 | import samba_headers |
4615 | -import tru64cc |
4616 | -import irixcc |
4617 | -import hpuxcc |
4618 | import generic_cc |
4619 | import samba_dist |
4620 | import samba_wildcard |
4621 | -import stale_files |
4622 | import symbols |
4623 | import pkgconfig |
4624 | import configure_file |
4625 | - |
4626 | -# some systems have broken threading in python |
4627 | -if os.environ.get('WAF_NOTHREADS') == '1': |
4628 | - import nothreads |
4629 | +import samba_waf18 |
4630 | |
4631 | LIB_PATH="shared" |
4632 | |
4633 | os.environ['PYTHONUNBUFFERED'] = '1' |
4634 | |
4635 | - |
4636 | -if Constants.HEXVERSION < 0x105019: |
4637 | +if Context.HEXVERSION not in (0x2000800,): |
4638 | Logs.error(''' |
4639 | Please use the version of waf that comes with Samba, not |
4640 | a system installed version. See http://wiki.samba.org/index.php/Waf |
4641 | @@ -55,26 +47,25 @@ Alternatively, please run ./configure and make as usual. That will |
4642 | call the right version of waf.''') |
4643 | sys.exit(1) |
4644 | |
4645 | - |
4646 | @conf |
4647 | def SAMBA_BUILD_ENV(conf): |
4648 | '''create the samba build environment''' |
4649 | - conf.env.BUILD_DIRECTORY = conf.blddir |
4650 | - mkdir_p(os.path.join(conf.blddir, LIB_PATH)) |
4651 | - mkdir_p(os.path.join(conf.blddir, LIB_PATH, "private")) |
4652 | - mkdir_p(os.path.join(conf.blddir, "modules")) |
4653 | - mkdir_p(os.path.join(conf.blddir, 'python/samba/dcerpc')) |
4654 | + conf.env.BUILD_DIRECTORY = conf.bldnode.abspath() |
4655 | + mkdir_p(os.path.join(conf.env.BUILD_DIRECTORY, LIB_PATH)) |
4656 | + mkdir_p(os.path.join(conf.env.BUILD_DIRECTORY, LIB_PATH, "private")) |
4657 | + mkdir_p(os.path.join(conf.env.BUILD_DIRECTORY, "modules")) |
4658 | + mkdir_p(os.path.join(conf.env.BUILD_DIRECTORY, 'python/samba/dcerpc')) |
4659 | # this allows all of the bin/shared and bin/python targets |
4660 | # to be expressed in terms of build directory paths |
4661 | - mkdir_p(os.path.join(conf.blddir, 'default')) |
4662 | - for (source, target) in [('shared', 'shared'), ('modules', 'modules'), ('python', 'python_modules')]: |
4663 | - link_target = os.path.join(conf.blddir, 'default/' + target) |
4664 | + mkdir_p(os.path.join(conf.env.BUILD_DIRECTORY, 'default')) |
4665 | + for (source, target) in [('shared', 'shared'), ('modules', 'modules'), ('python', 'python')]: |
4666 | + link_target = os.path.join(conf.env.BUILD_DIRECTORY, 'default/' + target) |
4667 | if not os.path.lexists(link_target): |
4668 | os.symlink('../' + source, link_target) |
4669 | |
4670 | # get perl to put the blib files in the build directory |
4671 | - blib_bld = os.path.join(conf.blddir, 'default/pidl/blib') |
4672 | - blib_src = os.path.join(conf.srcdir, 'pidl/blib') |
4673 | + blib_bld = os.path.join(conf.env.BUILD_DIRECTORY, 'default/pidl/blib') |
4674 | + blib_src = os.path.join(conf.srcnode.abspath(), 'pidl/blib') |
4675 | mkdir_p(blib_bld + '/man1') |
4676 | mkdir_p(blib_bld + '/man3') |
4677 | if os.path.islink(blib_src): |
4678 | @@ -148,7 +139,7 @@ def SAMBA_LIBRARY(bld, libname, source, |
4679 | public_headers = None |
4680 | |
4681 | if private_library and public_headers: |
4682 | - raise Utils.WafError("private library '%s' must not have public header files" % |
4683 | + raise Errors.WafError("private library '%s' must not have public header files" % |
4684 | libname) |
4685 | |
4686 | if LIB_MUST_BE_PRIVATE(bld, libname): |
4687 | @@ -225,13 +216,13 @@ def SAMBA_LIBRARY(bld, libname, source, |
4688 | # we don't want any public libraries without version numbers |
4689 | if (not private_library and target_type != 'PYTHON' and not realname): |
4690 | if vnum is None and soname is None: |
4691 | - raise Utils.WafError("public library '%s' must have a vnum" % |
4692 | + raise Errors.WafError("public library '%s' must have a vnum" % |
4693 | libname) |
4694 | if pc_files is None: |
4695 | - raise Utils.WafError("public library '%s' must have pkg-config file" % |
4696 | + raise Errors.WafError("public library '%s' must have pkg-config file" % |
4697 | libname) |
4698 | if public_headers is None and not bld.env['IS_EXTRA_PYTHON']: |
4699 | - raise Utils.WafError("public library '%s' must have header files" % |
4700 | + raise Errors.WafError("public library '%s' must have header files" % |
4701 | libname) |
4702 | |
4703 | if bundled_name is not None: |
4704 | @@ -273,7 +264,7 @@ def SAMBA_LIBRARY(bld, libname, source, |
4705 | vscript = None |
4706 | if bld.env.HAVE_LD_VERSION_SCRIPT: |
4707 | if private_library: |
4708 | - version = "%s_%s" % (Utils.g_module.APPNAME, Utils.g_module.VERSION) |
4709 | + version = "%s_%s" % (Context.g_module.APPNAME, Context.g_module.VERSION) |
4710 | elif vnum: |
4711 | version = "%s_%s" % (libname, vnum) |
4712 | else: |
4713 | @@ -282,17 +273,17 @@ def SAMBA_LIBRARY(bld, libname, source, |
4714 | vscript = "%s.vscript" % libname |
4715 | bld.ABI_VSCRIPT(version_libname, abi_directory, version, vscript, |
4716 | abi_match) |
4717 | - fullname = apply_pattern(bundled_name, bld.env.shlib_PATTERN) |
4718 | + fullname = apply_pattern(bundled_name, bld.env.cshlib_PATTERN) |
4719 | fullpath = bld.path.find_or_declare(fullname) |
4720 | vscriptpath = bld.path.find_or_declare(vscript) |
4721 | if not fullpath: |
4722 | - raise Utils.WafError("unable to find fullpath for %s" % fullname) |
4723 | + raise Errors.WafError("unable to find fullpath for %s" % fullname) |
4724 | if not vscriptpath: |
4725 | - raise Utils.WafError("unable to find vscript path for %s" % vscript) |
4726 | + raise Errors.WafError("unable to find vscript path for %s" % vscript) |
4727 | bld.add_manual_dependency(fullpath, vscriptpath) |
4728 | if bld.is_install: |
4729 | # also make the .inst file depend on the vscript |
4730 | - instname = apply_pattern(bundled_name + '.inst', bld.env.shlib_PATTERN) |
4731 | + instname = apply_pattern(bundled_name + '.inst', bld.env.cshlib_PATTERN) |
4732 | bld.add_manual_dependency(bld.path.find_or_declare(instname), bld.path.find_or_declare(vscript)) |
4733 | vscript = os.path.join(bld.path.abspath(bld.env), vscript) |
4734 | |
4735 | @@ -327,10 +318,12 @@ def SAMBA_LIBRARY(bld, libname, source, |
4736 | link_name = 'shared/%s' % realname |
4737 | |
4738 | if link_name: |
4739 | + if 'waflib.extras.compat15' in sys.modules: |
4740 | + link_name = 'default/' + link_name |
4741 | t.link_name = link_name |
4742 | |
4743 | if pc_files is not None and not private_library: |
4744 | - if pyembed and bld.env['IS_EXTRA_PYTHON']: |
4745 | + if pyembed: |
4746 | bld.PKG_CONFIG_FILES(pc_files, vnum=vnum, extra_name=bld.env['PYTHON_SO_ABI_FLAG']) |
4747 | else: |
4748 | bld.PKG_CONFIG_FILES(pc_files, vnum=vnum) |
4749 | @@ -674,7 +667,7 @@ def SAMBA_GENERATOR(bld, name, rule, source='', target='', |
4750 | target=target, |
4751 | shell=isinstance(rule, str), |
4752 | update_outputs=True, |
4753 | - before='cc', |
4754 | + before='c', |
4755 | ext_out='.c', |
4756 | samba_type='GENERATOR', |
4757 | dep_vars = dep_vars, |
4758 | @@ -728,22 +721,6 @@ Build.BuildContext.SET_BUILD_GROUP = SET_BUILD_GROUP |
4759 | |
4760 | |
4761 | |
4762 | -@conf |
4763 | -def ENABLE_TIMESTAMP_DEPENDENCIES(conf): |
4764 | - """use timestamps instead of file contents for deps |
4765 | - this currently doesn't work""" |
4766 | - def h_file(filename): |
4767 | - import stat |
4768 | - st = os.stat(filename) |
4769 | - if stat.S_ISDIR(st[stat.ST_MODE]): raise IOError('not a file') |
4770 | - m = Utils.md5() |
4771 | - m.update(str(st.st_mtime)) |
4772 | - m.update(str(st.st_size)) |
4773 | - m.update(filename) |
4774 | - return m.digest() |
4775 | - Utils.h_file = h_file |
4776 | - |
4777 | - |
4778 | def SAMBA_SCRIPT(bld, name, pattern, installdir, installname=None): |
4779 | '''used to copy scripts from the source tree into the build directory |
4780 | for use by selftest''' |
4781 | @@ -758,7 +735,7 @@ def SAMBA_SCRIPT(bld, name, pattern, installdir, installname=None): |
4782 | target = os.path.join(installdir, iname) |
4783 | tgtdir = os.path.dirname(os.path.join(bld.srcnode.abspath(bld.env), '..', target)) |
4784 | mkdir_p(tgtdir) |
4785 | - link_src = os.path.normpath(os.path.join(bld.curdir, s)) |
4786 | + link_src = os.path.normpath(os.path.join(bld.path.abspath(), s)) |
4787 | link_dst = os.path.join(tgtdir, os.path.basename(iname)) |
4788 | if os.path.islink(link_dst) and os.readlink(link_dst) == link_src: |
4789 | continue |
4790 | @@ -779,10 +756,10 @@ def copy_and_fix_python_path(task): |
4791 | replacement="""sys.path.insert(0, "%s") |
4792 | sys.path.insert(1, "%s")""" % (task.env["PYTHONARCHDIR"], task.env["PYTHONDIR"]) |
4793 | |
4794 | - if task.env["PYTHON"][0] == "/": |
4795 | - replacement_shebang = "#!%s\n" % task.env["PYTHON"] |
4796 | + if task.env["PYTHON"][0].startswith("/"): |
4797 | + replacement_shebang = "#!%s\n" % task.env["PYTHON"][0] |
4798 | else: |
4799 | - replacement_shebang = "#!/usr/bin/env %s\n" % task.env["PYTHON"] |
4800 | + replacement_shebang = "#!/usr/bin/env %s\n" % task.env["PYTHON"][0] |
4801 | |
4802 | installed_location=task.outputs[0].bldpath(task.env) |
4803 | source_file = open(task.inputs[0].srcpath(task.env)) |
4804 | @@ -790,7 +767,7 @@ sys.path.insert(1, "%s")""" % (task.env["PYTHONARCHDIR"], task.env["PYTHONDIR"]) |
4805 | lineno = 0 |
4806 | for line in source_file: |
4807 | newline = line |
4808 | - if (lineno == 0 and task.env["PYTHON_SPECIFIED"] is True and |
4809 | + if (lineno == 0 and |
4810 | line[:2] == "#!"): |
4811 | newline = replacement_shebang |
4812 | elif pattern in line: |
4813 | @@ -798,7 +775,7 @@ sys.path.insert(1, "%s")""" % (task.env["PYTHONARCHDIR"], task.env["PYTHONDIR"]) |
4814 | installed_file.write(newline) |
4815 | lineno = lineno + 1 |
4816 | installed_file.close() |
4817 | - os.chmod(installed_location, 0755) |
4818 | + os.chmod(installed_location, 0o755) |
4819 | return 0 |
4820 | |
4821 | def copy_and_fix_perl_path(task): |
4822 | @@ -826,7 +803,7 @@ def copy_and_fix_perl_path(task): |
4823 | installed_file.write(newline) |
4824 | lineno = lineno + 1 |
4825 | installed_file.close() |
4826 | - os.chmod(installed_location, 0755) |
4827 | + os.chmod(installed_location, 0o755) |
4828 | return 0 |
4829 | |
4830 | |
4831 | @@ -834,6 +811,8 @@ def install_file(bld, destdir, file, chmod=MODE_644, flat=False, |
4832 | python_fixup=False, perl_fixup=False, |
4833 | destname=None, base_name=None): |
4834 | '''install a file''' |
4835 | + if not isinstance(file, str): |
4836 | + file = file.abspath() |
4837 | destdir = bld.EXPAND_VARIABLES(destdir) |
4838 | if not destname: |
4839 | destname = file |
4840 | @@ -898,16 +877,19 @@ def INSTALL_DIR(bld, path, chmod=0o755, env=None): |
4841 | if not path: |
4842 | return [] |
4843 | |
4844 | - destpath = bld.get_install_path(path, env) |
4845 | + destpath = bld.EXPAND_VARIABLES(path) |
4846 | + if Options.options.destdir: |
4847 | + destpath = os.path.join(Options.options.destdir, destpath.lstrip(os.sep)) |
4848 | |
4849 | if bld.is_install > 0: |
4850 | if not os.path.isdir(destpath): |
4851 | try: |
4852 | + Logs.info('* create %s', destpath) |
4853 | os.makedirs(destpath) |
4854 | os.chmod(destpath, chmod) |
4855 | except OSError as e: |
4856 | if not os.path.isdir(destpath): |
4857 | - raise Utils.WafError("Cannot create the folder '%s' (error: %s)" % (path, e)) |
4858 | + raise Errors.WafError("Cannot create the folder '%s' (error: %s)" % (path, e)) |
4859 | Build.BuildContext.INSTALL_DIR = INSTALL_DIR |
4860 | |
4861 | def INSTALL_DIRS(bld, destdir, dirs, chmod=0o755, env=None): |
4862 | @@ -958,59 +940,6 @@ def SAMBAMANPAGES(bld, manpages, extra_source=None): |
4863 | bld.INSTALL_FILES('${MANDIR}/man%s' % m[-1], m, flat=True) |
4864 | Build.BuildContext.SAMBAMANPAGES = SAMBAMANPAGES |
4865 | |
4866 | -############################################################# |
4867 | -# give a nicer display when building different types of files |
4868 | -def progress_display(self, msg, fname): |
4869 | - col1 = Logs.colors(self.color) |
4870 | - col2 = Logs.colors.NORMAL |
4871 | - total = self.position[1] |
4872 | - n = len(str(total)) |
4873 | - fs = '[%%%dd/%%%dd] %s %%s%%s%%s\n' % (n, n, msg) |
4874 | - return fs % (self.position[0], self.position[1], col1, fname, col2) |
4875 | - |
4876 | -def link_display(self): |
4877 | - if Options.options.progress_bar != 0: |
4878 | - return Task.Task.old_display(self) |
4879 | - fname = self.outputs[0].bldpath(self.env) |
4880 | - return progress_display(self, 'Linking', fname) |
4881 | -Task.TaskBase.classes['cc_link'].display = link_display |
4882 | - |
4883 | -def samba_display(self): |
4884 | - if Options.options.progress_bar != 0: |
4885 | - return Task.Task.old_display(self) |
4886 | - |
4887 | - targets = LOCAL_CACHE(self, 'TARGET_TYPE') |
4888 | - if self.name in targets: |
4889 | - target_type = targets[self.name] |
4890 | - type_map = { 'GENERATOR' : 'Generating', |
4891 | - 'PROTOTYPE' : 'Generating' |
4892 | - } |
4893 | - if target_type in type_map: |
4894 | - return progress_display(self, type_map[target_type], self.name) |
4895 | - |
4896 | - if len(self.inputs) == 0: |
4897 | - return Task.Task.old_display(self) |
4898 | - |
4899 | - fname = self.inputs[0].bldpath(self.env) |
4900 | - if fname[0:3] == '../': |
4901 | - fname = fname[3:] |
4902 | - ext_loc = fname.rfind('.') |
4903 | - if ext_loc == -1: |
4904 | - return Task.Task.old_display(self) |
4905 | - ext = fname[ext_loc:] |
4906 | - |
4907 | - ext_map = { '.idl' : 'Compiling IDL', |
4908 | - '.et' : 'Compiling ERRTABLE', |
4909 | - '.asn1': 'Compiling ASN1', |
4910 | - '.c' : 'Compiling' } |
4911 | - if ext in ext_map: |
4912 | - return progress_display(self, ext_map[ext], fname) |
4913 | - return Task.Task.old_display(self) |
4914 | - |
4915 | -Task.TaskBase.classes['Task'].old_display = Task.TaskBase.classes['Task'].display |
4916 | -Task.TaskBase.classes['Task'].display = samba_display |
4917 | - |
4918 | - |
4919 | @after('apply_link') |
4920 | @feature('cshlib') |
4921 | def apply_bundle_remove_dynamiclib_patch(self): |
4922 | diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript |
4923 | index 0eef330..7b8fb01 100644 |
4924 | --- a/buildtools/wafsamba/wscript |
4925 | +++ b/buildtools/wafsamba/wscript |
4926 | @@ -3,7 +3,8 @@ |
4927 | # this is a base set of waf rules that everything else pulls in first |
4928 | |
4929 | import os, sys |
4930 | -import wafsamba, Configure, Logs, Options, Utils |
4931 | +from waflib import Configure, Logs, Options, Utils, Context, Errors |
4932 | +import wafsamba |
4933 | from samba_utils import os_path_relpath |
4934 | from optparse import SUPPRESS_HELP |
4935 | |
4936 | @@ -14,12 +15,17 @@ from optparse import SUPPRESS_HELP |
4937 | # are resolved related to WAFCACHE. It will need a lot of testing |
4938 | # before it is enabled by default. |
4939 | if '--enable-auto-reconfigure' in sys.argv: |
4940 | - Configure.autoconfig = True |
4941 | + Configure.autoconfig = 'clobber' |
4942 | |
4943 | -def set_options(opt): |
4944 | - opt.tool_options('compiler_cc') |
4945 | +def default_value(option, default=''): |
4946 | + if option in Options.options.__dict__: |
4947 | + return Options.options.__dict__[option] |
4948 | + return default |
4949 | |
4950 | - opt.tool_options('gnu_dirs') |
4951 | +def options(opt): |
4952 | + opt.load('compiler_cc') |
4953 | + |
4954 | + opt.load('gnu_dirs') |
4955 | |
4956 | gr = opt.option_group('library handling options') |
4957 | |
4958 | @@ -31,17 +37,17 @@ def set_options(opt): |
4959 | help=("comma separated list of normally public libraries to build instead as private libraries. May include !LIBNAME to disable making a library private. Can be 'NONE' or 'ALL' [auto]"), |
4960 | action="store", dest='PRIVATE_LIBS', default='') |
4961 | |
4962 | - extension_default = Options.options['PRIVATE_EXTENSION_DEFAULT'] |
4963 | + extension_default = default_value('PRIVATE_EXTENSION_DEFAULT') |
4964 | gr.add_option('--private-library-extension', |
4965 | help=("name extension for private libraries [%s]" % extension_default), |
4966 | action="store", dest='PRIVATE_EXTENSION', default=extension_default) |
4967 | |
4968 | - extension_exception = Options.options['PRIVATE_EXTENSION_EXCEPTION'] |
4969 | + extension_exception = default_value('PRIVATE_EXTENSION_EXCEPTION') |
4970 | gr.add_option('--private-extension-exception', |
4971 | help=("comma separated list of libraries to not apply extension to [%s]" % extension_exception), |
4972 | action="store", dest='PRIVATE_EXTENSION_EXCEPTION', default=extension_exception) |
4973 | |
4974 | - builtin_default = Options.options['BUILTIN_LIBRARIES_DEFAULT'] |
4975 | + builtin_default = default_value('BUILTIN_LIBRARIES_DEFAULT') |
4976 | gr.add_option('--builtin-libraries', |
4977 | help=("command separated list of libraries to build directly into binaries [%s]" % builtin_default), |
4978 | action="store", dest='BUILTIN_LIBRARIES', default=builtin_default) |
4979 | @@ -71,7 +77,7 @@ def set_options(opt): |
4980 | action="store", dest='MODULESDIR', default='${PREFIX}/modules') |
4981 | |
4982 | opt.add_option('--with-privatelibdir', |
4983 | - help=("private library directory [PREFIX/lib/%s]" % Utils.g_module.APPNAME), |
4984 | + help=("private library directory [PREFIX/lib/%s]" % Context.g_module.APPNAME), |
4985 | action="store", dest='PRIVATELIBDIR', default=None) |
4986 | |
4987 | opt.add_option('--with-libiconv', |
4988 | @@ -109,9 +115,6 @@ def set_options(opt): |
4989 | gr.add_option('--enable-gccdeps', |
4990 | help=("Enable use of gcc -MD dependency module"), |
4991 | action="store_true", dest='enable_gccdeps', default=True) |
4992 | - gr.add_option('--timestamp-dependencies', |
4993 | - help=("use file timestamps instead of content for build dependencies (BROKEN)"), |
4994 | - action="store_true", dest='timestamp_dependencies', default=False) |
4995 | gr.add_option('--pedantic', |
4996 | help=("Enable even more compiler warnings"), |
4997 | action='store_true', dest='pedantic', default=False) |
4998 | @@ -210,23 +213,19 @@ def set_options(opt): |
4999 | @Utils.run_once |
5000 | def configure(conf): |
The symbols changes you referred at the head of the file are just known versions, but no actual symbols just as you assumed. It is fine to do the update but also correct that it doesn't change.
The following add_child_ val@LDB_ 1.5.1 2:1.5.1
ldb_dn_
That is a new symbol and it is important to add it as makeshlibs reports it for tracking in the future.
The reason build does not break is because the only "bad" thing would be symbols that change or go away - therefore all is fine on those if you followed Debians try IMHO.
And I see you did in b0791cb7 and 0c796ee2 - so you are mostly good.
Only twist - I have no experience on symbols for cpython so I can't really ack that part of 0c796ee2
I have never seen them tracked, you might be right to add them but it might as well be wrong - sorry.