[SCM] Samba Shared Repository - branch master updated
Noel Power
npower at samba.org
Mon Dec 10 13:33:02 UTC 2018
The branch, master has been updated
via f7516971b56 CI: Adjust CI tasks for new python3 autobuild.py default
via bc92277a79b autobuild: We should run autobuild with python3 by default
via 9ac432d4bc5 selftest/flapping.d: Add python2 versions for flapping tests
via 35aef220ceb selftest/knownfail: Add python2 version of known fails
via 5a804050717 CI: Add new py2 CI jobs to replace old py3 ones
via b0b9c62e1cf autobuild: Convert old py3 tasks to py2
via e3c37bbad4f selftest: don't hardcode '.python3' for extra-python tests
via 2fb74e6ad32 buildtools/wafsamba: Support --extra-python with python2
via dfe5787c255 autobuild: Adjust autobuild for PY2/PY3 get_python_lib behaviour
via 23db658ebcc CI: convert the purepy3 job to a py2 one
via ae5dd18162a autobuild: Modify old samba_buildpy3_only job to python2
via 0e35d741934 script: Fix failing build_xc job
via 0186f2733aa CI: Run autobuild jobs with python3
via a660b7fb8e5 PY3: switch current build to use python3
via 3e017aa7e51 buildtools/wafsamba Provide proper pc file
via 19ac50ba2d7 buildtools/wafsamba: Ensure we detect the correct python.
via f4c0343dc42 selftest: Always set PYTHON to something sensible (if it isn't set)
via 3eb7281ff36 buildtools/wafsamba: Decode result of Popen as unicode/string
via 447276e2974 adjust ldb config for py3 build
via a7cb10e4b47 PY3 pure build fix some str/bytes wobblies
via c316738f265 CI: Remove the remainder py3 jobs
via 9bdeb95f2c6 autobuild: Remove temporary purepy3 tasks
via cc11f71820c auth/credentials/tests: Python 3.6 avoid deepcopy error
via b209def154c s4/selftest: Reenable samba.tests.gpo to run with --extra-python
via d01d85ccb25 CI: Remove purepy3 temporary jobs
via a522d7e03d3 CI: Add new CI jobs for samba-purepy3 & samba-purepy3-nt4
via 61adb75b9ff CI: Add new (TEMP) pure python3 autobuild jobs for samba-build & samba-nt4
via 34ca15fb042 s4/dsdb/tests/python: PY3 allow test samba4.ldap.sort pass
via c319684d516 s4/dsdb/tests/python: partial PY3 port for samba4.ldap.sort
via d7dba6f701f python/samba: PY3 port samba.tests.samba_tool.visualize_drs
via 06ef2d51a1b python/samba/netcmd: PY3 port for samba4.drs.samba_tool_drs_showrepl
via f8c05eb75a5 s4/dsdb/tests/python: PY3 port samba4.deletetest
via e8413056d33 s4/dsdb/tests/python: PY3 Port samba4.ldap.password_lockout
via 2b09cfe0839 s4/dsdb/tests/python: PY3 port for samba4.ldap.rodc_rwdc.python
via cc8a4eeb530 s4/dsdb/tests/python: PY3 port for samba4.ldap.linked_attributes
via c83e1a6aea9 s4/dsdb/tests: PY3 port samba4.ldap.vlv
via 74aabacc349 s4/dsdb/tests/python: PY3 port samba4.ldap.sites
via 397ab3afbd1 s4/dsdb/tests: PY3 fix failing samba4.ldap.notification
via 42cb270b48f lib/ldb-samba/tests: PY3 port samba4.ldap.match_rules
via 60a9998ea3d s4/dsdb/tests: PY3 port samba4.user_account_control test
via 32c8c820a23 s4/dsdb/tests/python: PY3 port samba4.tokengroups.krb5
via 4186335cd88 s4/dsdb/tests: Port PY3 ldap tests
via 9db3ad9ea1c python/samba/blackbox: PY3 port for samba.tests.blackbox.traffic_learner
via b920d80ecae script: PY3 port traffic_learner
via dd62f4b6676 python/samba/tests: PY3 make sure traffic_learner is called with correct python
via fdf75084e42 python/samba/test: Make sure traffic_replay is called with correct python
via 89c63386365 CI: Remove build_samba_ad_dc_py3 CI job
via c36af9c129d CI: Add new CI job for new build_samba_purepy3-ad-dc job
via fd87c89c643 script: Add new (temporary) pure python3 ad-dc test
via 81043cdf0e9 python/samba/tests: Fix auth_log messaging problems in py3
via de9dcb12954 python/samba/tests: PY3 port failing samba.tests.auth_log_samlogon.py
via 991f8bfe5fb python/samba/tests: PY3 port failing samba.tests.auth_log_netlogon
via 0cafa9bf943 python/samba: PY3 fix failing py3 samba.tests.group_audit test
via 750540fd5c2 python/samba/kcc: PY3 fix some str versus ldb.bytes comparisons
via 744acb276c7 python/samba: PY3 don't call str for bytes (or str)
via c99450db4ee python/samba: PY3 port gpo.apply smbtorture test
via 1d6350897d2 s4/torture/gpo: Use existing code to 'run' external commands
via 0cd885c1ec7 python/samba: fix default params for PY3 ConfigParser
via 55a38171667 s4/dsdb/tests: PY3 port samba4.ldap.passwordsettings test
via ac7baa6e92d s4/dsdb/tests/python: PY3 port samba4.sam.python test
via 72921682558 python/samba/netcmd: PY3 fix samba4.blackbox.trust_utils test
via 679b640ac5e python/samba/tests: Py3 port for samba.tests.auth_log_netlogon_bad_creds.samba
via 00133791d54 PY3: wrap filter calls with list where list is expected
via a25bd836ee6 python/samba/tests: PY3 port samba.tests.dns
via 0d73a2b0a29 PY3: net.change_password & net.set_password take string not bytes
via d253e84a41b python/samba: PY3 Credential.set_password takes string
via 9b18748c703 auth/credentials: PY3 set_password should decode from unicode 'utf8'
via 8b10c713716 python/samba: Py3 Use new compat.sockerserver symbol
via fdf2deb3ba1 python/samba: PY3 compat py2/p3 symbol for SocketServer/socketserver
via 1fb9887ea87 python/samba: PY3 ord needs 'str' type not int
via 351ca11b064 s4/setup/tests: make sure samba-tool is called with correct py version
via 3519fcb9b79 s4/utils/test: PY3 make sure we call correct python version for samba-tool
via 277dbd9cffb nsswitch/tests: PY3 samba_tool call correct python
via af8077e807d testprogs/blackbox: make sure samba-tool is called with correct python
via 6e46d9770ed python/samba.tests: Ensure samba-tool is called with correct python ver.
from 7d271450f71 ctdb: Remove <file> parameter from pfetch usage info
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f7516971b566f6099abcaf4e6ad42102cc6c9b07
Author: Noel Power <noel.power at suse.com>
Date: Mon Dec 10 07:36:15 2018 +0000
CI: Adjust CI tasks for new python3 autobuild.py default
Now that autobuild has defaulted to python3 (via shebang) we no longer
need to explicity call autobuild.py with 'python3'
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Autobuild-User(master): Noel Power <npower at samba.org>
Autobuild-Date(master): Mon Dec 10 14:32:24 CET 2018 on sn-devel-144
commit bc92277a79bd393b9e1389e0069e4a4725675eff
Author: Noel Power <noel.power at suse.com>
Date: Mon Dec 10 07:28:31 2018 +0000
autobuild: We should run autobuild with python3 by default
sn-devel autobuild runing autobuild.py (via git hooks I suppose) but
if run directly (e.g. depending on script shebang) then 'python' aka
python2 will run. This will cause an error when building some targets
because the autobuild script itself sometimes builds paths based
on the version of python executing the script e.g ${PYTHON_PREFIX}.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 9ac432d4bc5b57660204aace375a32d58ac076df
Author: Noel Power <noel.power at suse.com>
Date: Mon Dec 3 17:08:51 2018 +0000
selftest/flapping.d: Add python2 versions for flapping tests
Post build & test running under python3 we now run with
'--extra-python=/usr/bin/python2', these tests will get
python2 appended to the test name so we need also to create
new flapping*/* entries for these. We will keep the python3
versions in case we create some CI job(s)
with
PYTHON=python configure.developer --extra-python=/usr/bin/python3
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 35aef220ceb16eea7c495c3c105c0ff02146ea3e
Author: Noel Power <noel.power at suse.com>
Date: Fri Nov 30 14:36:14 2018 +0000
selftest/knownfail: Add python2 version of known fails
Post build & test running under python3 we now run with
'--extra-python=/usr/bin/python2', these tests will get
python2 appended to the test name so we need also to create
new knownfails for these. We will keep the python3 versions
in case we create (and we probably should) some CI job(s)
with
PYTHON=python configure.developer --extra-python=/usr/bin/python3
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 5a804050717e9e885c6354ffacac7827236c81e4
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 29 21:28:11 2018 +0000
CI: Add new py2 CI jobs to replace old py3 ones
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit b0b9c62e1cfcadb1189559e3b4834f2b4a053f8a
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 29 21:21:58 2018 +0000
autobuild: Convert old py3 tasks to py2
Now that we are building with python3 by default we need to
convert the old python3 test tasks to python2 (e.g. reverse how
we used do it)
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit e3c37bbad4f45124a4ae7316a67e4c223e16faf1
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 29 21:18:07 2018 +0000
selftest: don't hardcode '.python3' for extra-python tests
Instead of hardcoding '.python3' we now hardcode the extra python
exe (which will be python2 for a default python3 build)
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 2fb74e6ad32db46d907bb75ea35107c0e348ed78
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 29 16:51:50 2018 +0000
buildtools/wafsamba: Support --extra-python with python2
Relax restriction on extra_python version
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit dfe5787c255eaab3d8022c972a1afa1dd83e62ef
Author: Noel Power <noel.power at suse.com>
Date: Sat Nov 24 11:13:47 2018 +0000
autobuild: Adjust autobuild for PY2/PY3 get_python_lib behaviour
The resuls of get_python_lib are different between python2 & python3
and this results in autobuild generating the wrong PYTHONPATH with
python3.
python2
=======
print ("%s" % get_python_lib(standard_lib=1, prefix='/my/prefix'))
/my/prefix/lib64/python2.7
python3
print ("%s" % get_python_lib(standard_lib=1, prefix='/my/prefix'))
/my/prefix/lib/python3.6
But with addition of plat_specific param the results are the same
python2
=======
print ("%s" % get_python_lib(plat_specific=1, standard_lib=0, prefix='/my/prefix'))
/my/prefix/lib64/python2.7/site-packages
python3
=======
print ("%s" % get_python_lib(plat_specific=1, standard_lib=0, prefix='/my/prefix'))
/my/prefix/lib64/python3.6/site-packages
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 23db658ebccebd2349b7da53c4d52c379ccb8ccc
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 29 15:10:40 2018 +0000
CI: convert the purepy3 job to a py2 one
With patches to have python3 as default we need a
pure python2 build
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit ae5dd18162acaf4a0d2123d571f690c644791218
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 29 14:21:27 2018 +0000
autobuild: Modify old samba_buildpy3_only job to python2
Since autobuild now builds python3 by default we need to change
the previously buildpy3 only job to python2
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 0e35d741934eb1626f9a7aeacd9eb1a96e27546f
Author: Noel Power <noel.power at suse.com>
Date: Wed Dec 5 16:37:17 2018 +0000
script: Fix failing build_xc job
build_xc job uses compare_cc_results.py to compare cache
files, the cache files are stringified hash maps, the results
in python 3.4 don't compare well due to inconsistent order of
dict key/value pairs when the cache files are created. While
comparing the file contents works fine in python3.6 it fails
with python3.4. This patch detects problematic dict lines and
rewrites the value for comparison
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 0186f2733aa59f70278747a6fd4ae9e66b8fd4e4
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 29 14:18:05 2018 +0000
CI: Run autobuild jobs with python3
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit a660b7fb8e519bd3be558fd0425bff8f287fca1f
Author: Noel Power <noel.power at suse.com>
Date: Sat Nov 24 15:27:45 2018 +0000
PY3: switch current build to use python3
Make sure default make and configure for all now defaults
to building with python3.
To build a samba (or sub component e.g. talloc etc.) with python3
./configure && make
To build a samba (or sub component e.g. talloc etc.) with python2
PYTHON=python ./configure && PYTHON=python make
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 3e017aa7e51df02d257fbac352ae79fc29aadc68
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 29 15:40:48 2018 +0000
buildtools/wafsamba Provide proper pc file
To support building by default python3 we need to fix assumption
that only extra-python with py3 has valid PYTHON_SO_ABI_FLAG used to
create alt name for pc file.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 19ac50ba2d7d193816c79d44e472e8cf4acb8aeb
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 29 15:12:10 2018 +0000
buildtools/wafsamba: Ensure we detect the correct python.
In order to support a default python3 build we need to ensure
we detect python3 if no PYTHON env variable is set up.
Currently we detect python with
conf.find_program('python', var='PYTHON', mandatory=mandatory)
which uses PYTHON as as hint and falls back to the program name
'python' otherwise
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit f4c0343dc4288e9cd00d7325633949020c3d300b
Author: Noel Power <noel.power at suse.com>
Date: Mon Nov 26 14:55:02 2018 +0000
selftest: Always set PYTHON to something sensible (if it isn't set)
Lots of test scripts need to run with the correct version
of python. With the correct shebang the script should run with the
correct version, the problem is that not all scripts are part
of the installation, some scripts are part of the source code,
and the shebang is not dynamically generated as yet.
It is safer if we are somewhat version neutral at the moment and
ignore the shebang and always run scripts from the test environment
with the python version (determined by PYTHON env variable) If this
env variable isn't set then set it according to the python version
that is running the tests
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 3eb7281ff369e36abf466066d403c48082fdb80d
Author: Noel Power <noel.power at suse.com>
Date: Sun Nov 25 00:59:04 2018 +0000
buildtools/wafsamba: Decode result of Popen as unicode/string
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 447276e2974ae5288eaf5dbe448bf52b27ec0839
Author: Noel Power <noel.power at suse.com>
Date: Sat Nov 24 16:41:53 2018 +0000
adjust ldb config for py3 build
waf code is making assumptions that main build is py2 and extra build
is py3, this results in wrong library names being used.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit a7cb10e4b475e0a41517f3e7be502be5e2ebb54e
Author: Noel Power <noel.power at suse.com>
Date: Sat Nov 24 15:27:21 2018 +0000
PY3 pure build fix some str/bytes wobblies
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit c316738f2652af8375e40b760d011a0e932a18ab
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 29 13:52:04 2018 +0000
CI: Remove the remainder py3 jobs
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 9bdeb95f2c615643c03073921e3cb13dab54f49a
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 29 13:46:55 2018 +0000
autobuild: Remove temporary purepy3 tasks
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit cc11f71820c9669488bed9f1b02c815776d6d0c3
Author: Noel Power <noel.power at suse.com>
Date: Thu Dec 6 14:18:08 2018 +0000
auth/credentials/tests: Python 3.6 avoid deepcopy error
In PY3 both deepcopy & (shallow)copy fail with
Traceback (most recent call last):
File "auth/credentials/tests/bind.py", line 42, in <module>
creds_machine = copy.copy(creds)
File "/usr/lib64/python3.6/copy.py", line 96, in copy
rv = reductor(4)
TypeError: can't pickle credentials.Credentials objects
This patch avoids the nasty copies but creating and populating the
Credential objects instead of copying
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit b209def154c5427a62362ae903d432959e7260d2
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 29 17:02:53 2018 +0000
s4/selftest: Reenable samba.tests.gpo to run with --extra-python
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit d01d85ccb255cbdfd3d379dfe0cd7ac58af7f284
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 29 12:31:26 2018 +0000
CI: Remove purepy3 temporary jobs
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit a522d7e03d369a0e97c7683078112b3cb6a714c5
Author: Noel Power <noel.power at suse.com>
Date: Wed Nov 28 17:57:43 2018 +0000
CI: Add new CI jobs for samba-purepy3 & samba-purepy3-nt4
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 61adb75b9ffacf25637e2b4519316093e61a4a82
Author: Noel Power <noel.power at suse.com>
Date: Wed Nov 28 17:52:30 2018 +0000
CI: Add new (TEMP) pure python3 autobuild jobs for samba-build & samba-nt4
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 34ca15fb042e42773854c093ad9f1e67696c90ac
Author: Noel Power <noel.power at suse.com>
Date: Wed Nov 21 12:39:56 2018 +0000
s4/dsdb/tests/python: PY3 allow test samba4.ldap.sort pass
Adjust test data to remove use of embedded NULLs.
We are getting the following exception when running the test
under python3
Exception: Exception: Traceback (most recent call last):
File "source4/dsdb/tests/python/sort.py", line 181, in setUp
key=cmp_to_key_fn(locale.strcoll))
ValueError: embedded null character
Looking at the source code for locale.strcoll the lhs & rhs
params are processed using 'PyUnicode_AsWideCharString(s, NULL)'
Documentation for PyUnicode_AsWideCharString states:
"Convert the Unicode object to a wide character string.
The output string always ends with a null character. If size is
not NULL, write the number of wide characters (excluding the
trailing null termination character) into *size. Note that the
resulting wchar_t string might contain null characters, which
would cause the string to be truncated when used with most C
functions. If size is NULL and the wchar_t* string contains null
characters a ValueError is raised."
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit c319684d5166db944b5b9e88a876d22f4f856993
Author: Noel Power <noel.power at suse.com>
Date: Wed Nov 21 12:34:55 2018 +0000
s4/dsdb/tests/python: partial PY3 port for samba4.ldap.sort
Test still fails after applying the following fixes
a) only decode byte or (py2) str objects
b) fix sorted function no longer use cmp func, use compat
cmp_to_key_fn instead
c) convert ldb.bytes returned from ldb search results
d) convert sort_functions.keys() to list so array slicing works
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit d7dba6f701fa128803d7f7ead5bb6ddd3372393b
Author: Noel Power <noel.power at suse.com>
Date: Tue Nov 20 17:02:25 2018 +0000
python/samba: PY3 port samba.tests.samba_tool.visualize_drs
* Fix calling samba-tool with correct PYTHON version
* Fix integer division needs '//' operator (this was causing
'uncaught exception - list indices must be integers or slices,
not float'
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 06ef2d51a1b48952e7c443504cf03cbea2716ad1
Author: Noel Power <noel.power at suse.com>
Date: Tue Nov 20 16:20:49 2018 +0000
python/samba/netcmd: PY3 port for samba4.drs.samba_tool_drs_showrepl
Fix various ldb.bytes that need to be stringified in order to get
tests to pass
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit f8c05eb75a57649b3865d3d95bdaabfd14640c97
Author: Noel Power <noel.power at suse.com>
Date: Tue Nov 20 15:30:07 2018 +0000
s4/dsdb/tests/python: PY3 port samba4.deletetest
Fix misc ldb.bytes needing to be stringified for tests to succeeed
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit e8413056d339100f1c0c0ce917661681c6108c1b
Author: Noel Power <noel.power at suse.com>
Date: Tue Nov 20 15:10:35 2018 +0000
s4/dsdb/tests/python: PY3 Port samba4.ldap.password_lockout
use Exception.args member as exception is no longer supports
indexing.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 2b09cfe083940cdcd5fbd6a93693289a8d32bb29
Author: Noel Power <noel.power at suse.com>
Date: Tue Nov 20 14:41:20 2018 +0000
s4/dsdb/tests/python: PY3 port for samba4.ldap.rodc_rwdc.python
* Make sure samba-tool is called with correct PYTHON version
* Convert ldb.bytes results to string for comparison with expected
results
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit cc8a4eeb530ba9893acdaf272e1bd4cd018bdb64
Author: Noel Power <noel.power at suse.com>
Date: Tue Nov 20 14:05:58 2018 +0000
s4/dsdb/tests/python: PY3 port for samba4.ldap.linked_attributes
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit c83e1a6aea91f1886b87e657d5ec03221ef343c7
Author: Noel Power <noel.power at suse.com>
Date: Tue Nov 20 13:10:25 2018 +0000
s4/dsdb/tests: PY3 port samba4.ldap.vlv
Misc changes mostly around use of ldb.bytes, bytes and string to get
the test to work. Additionally results of a range cannot be combined
with a list using the '+' operator (need to enclose the range with
list).
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 74aabacc34916452eadec1ca5e911e5afdb82d50
Author: Noel Power <noel.power at suse.com>
Date: Mon Nov 19 18:38:46 2018 +0000
s4/dsdb/tests/python: PY3 port samba4.ldap.sites
Fix comparison of ldb.bytes with string
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 397ab3afbd107e3e5a33b87d2b1221221d21b7d5
Author: Noel Power <noel.power at suse.com>
Date: Mon Nov 19 18:29:23 2018 +0000
s4/dsdb/tests: PY3 fix failing samba4.ldap.notification
Convert ldb.bytes object to string for further processing
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 42cb270b48f11c8ac8104125acd2719f307c4a39
Author: Noel Power <noel.power at suse.com>
Date: Mon Nov 19 18:07:16 2018 +0000
lib/ldb-samba/tests: PY3 port samba4.ldap.match_rules
Various fixes
a) schema_format_value can return bytes (esp. for objectSid,
objectGUID
b) embedded NULL now cause ValueError in py3 (was TypeError in py2)
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 60a9998ea3de19f88e281a35aff19b17be55a872
Author: Noel Power <noel.power at suse.com>
Date: Mon Nov 19 15:04:21 2018 +0000
s4/dsdb/tests: PY3 port samba4.user_account_control test
Fix dict_items are not combinable with '+' operator error, need
to convert to list first.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 32c8c820a23966ae4137b3d6adde8e88a8751ed7
Author: Noel Power <noel.power at suse.com>
Date: Mon Nov 19 14:04:39 2018 +0000
s4/dsdb/tests/python: PY3 port samba4.tokengroups.krb5
gensec.Security.update takes bytes as param not string with py3
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 4186335cd88e36b9e4981905e80ce2ae9f2639f7
Author: Noel Power <noel.power at suse.com>
Date: Mon Nov 19 11:20:29 2018 +0000
s4/dsdb/tests: Port PY3 ldap tests
Fix various assertTrue/assertEquals so ldb.bytes (PY3)
comparaisons work both in PY3 & PY2
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 9db3ad9ea1c45d9e47ca819672c9dd1a291a3cda
Author: Noel Power <noel.power at suse.com>
Date: Mon Nov 19 10:50:29 2018 +0000
python/samba/blackbox: PY3 port for samba.tests.blackbox.traffic_learner
The order of the values in the TrafficModel is different,
but... also unfortunately output of json.dump is also
different (even when using sorted versions of the associated
dictionaries before dumping), these changes reimport the output
files into TrafficModel objects rather than comparing the actual
raw files.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit b920d80ecaeee98c5e562a2c0b384fe8ace635d4
Author: Noel Power <noel.power at suse.com>
Date: Mon Nov 19 10:49:40 2018 +0000
script: PY3 port traffic_learner
Use python3 compatable print
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit dd62f4b66760e574be568516c087e04577121a94
Author: Noel Power <noel.power at suse.com>
Date: Mon Nov 19 09:39:06 2018 +0000
python/samba/tests: PY3 make sure traffic_learner is called with correct python
Also path to traffic_learner is not in the normal 'bin' path so
also adjusted the insertion of PYTHON version to cover this
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit fdf75084e42ee1f9162abe80cd712b3b5392e819
Author: Noel Power <noel.power at suse.com>
Date: Fri Nov 16 19:58:50 2018 +0000
python/samba/test: Make sure traffic_replay is called with correct python
PY3 fix samba4.blackbox.rfc2307_mapping
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 89c63386365c4cc38e9615b63839128f73699f05
Author: Noel Power <noel.power at suse.com>
Date: Fri Nov 16 15:06:52 2018 +0000
CI: Remove build_samba_ad_dc_py3 CI job
We now run a purepython3 ad-dc test job, later when the whole
build is running under python3 we will resurrect build_samba_ad_dc_py3
but as (build_samba_ad_dc_py2) for python2
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit c36af9c129d525be8f1840a5fab927f168fc5861
Author: Noel Power <noel.power at suse.com>
Date: Fri Nov 16 15:05:56 2018 +0000
CI: Add new CI job for new build_samba_purepy3-ad-dc job
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit fd87c89c643f51dc37540b26e40c47f16152d96f
Author: Noel Power <noel.power at suse.com>
Date: Fri Nov 16 14:59:01 2018 +0000
script: Add new (temporary) pure python3 ad-dc test
Ideally we want all the tests to run under python3 by default (no
special task for this) and then convert the existing '-py3' tasks
to run the python tests with python3.
However at the moment the convertion process is not ready to do this,
for a while we need to run separate autobuild tasks for this.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 81043cdf0e90b77a104edddb388fb4f94eb81d28
Author: Noel Power <noel.power at suse.com>
Date: Fri Nov 16 12:46:16 2018 +0000
python/samba/tests: Fix auth_log messaging problems in py3
Some tests (especially samba.tests.auth_log_netlogon_bad_creds) are
failing due to not receiving expected messages. There seems to be
some timing issue or race around the messaging bus being set up and
getting the expected events resulting from the failed netlogon.
Specifically the the order of destruction of the messaging.Messaging()
c-py objects is different under python2. Under python2 all of the
messaging.Messaging() objects are destructed *after* all the tests
are run. Note: each instance of the TestCase has it's own Messaging()
instance which is created by TestCaseXYZ.setUp, so it appears the unittest
destroys the test instances when all the tests have run whereas in
python3 we see each messaging.Messaging() instance destroyed after
each test runs.
Ok, what difference does that make ? well it seems in python3 because
each Messaging() instance is destructed after a test runs that the
associated messaging_dgm_destroy() also runs, this destroys the
global_dgm_context context which means when the next test runs the whole
messaging infrastructure needs to be built again when the next Messaging()
object is created. On the server-side this seems to result in attempts
to send messages to the listener failing first with
get_event_server: Failed to find 'auth_event' registered on the message bus to send JSON audit events to: NT_STATUS_CONNECTION_REFUSED
and subsequently with
get_event_server: Failed to find 'auth_event' registered on the message bus to send JSON audit events to: NT_STATUS_UNSUCCESSFUL
client doesn't get any more messages, test fails :-(
So, what's the difference in python2, well because the destructors for the
(4 in the case of netlogon_bad_creds) instances of Messagaging() don't run
till the end of the tests this doesn't happen and the global_dgm_context
never gets destroyed untill all the tests complete. There is some race
condition at play here, a simple sleep at the start of a failing test
fixes the problem. But... ok that isn't a possible solution here, instead
I have adjusted the base auth tests to store the Messaging() objects in a
global list forcing them to remain in scope until the tests are complete.
This ensure the behaviour is consistent across python2 & python3.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit de9dcb12954f4f37c287991bf0f425b0a63f1ba6
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 15 16:11:09 2018 +0000
python/samba/tests: PY3 port failing samba.tests.auth_log_samlogon.py
Make sure correctly encode password to utf16 and not use
unicode (which doesn't exist in PY3)
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 991f8bfe5fba3838ace9138fa0fb59c07ffc9e45
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 15 16:06:15 2018 +0000
python/samba/tests: PY3 port failing samba.tests.auth_log_netlogon
Fix password encoding
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 0cafa9bf943c3980ffe10b1fa0bb325bb36a6fad
Author: Noel Power <noel.power at suse.com>
Date: Wed Nov 14 16:29:07 2018 +0000
python/samba: PY3 fix failing py3 samba.tests.group_audit test
Fix bytes being compared against ldb.bytes
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 750540fd5c2ca0a033373d637531a283a2be6ae6
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 8 18:47:59 2018 +0000
python/samba/kcc: PY3 fix some str versus ldb.bytes comparisons
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 744acb276c7cfc2e8f859ea960282c6395362602
Author: Noel Power <noel.power at suse.com>
Date: Tue Nov 6 19:58:48 2018 +0000
python/samba: PY3 don't call str for bytes (or str)
Note: Fix needed also for gpo.apply
minPwdAge, maxPwdAge, minPwdLength & set_pwdProperties all
have a line like
value = str(value).encode('utf8')
this is a generic type statement I guess to convert int, float etc
to utf8 encoded bytes representing the string value for those.
This worked fine in PY2 but in py3 some routine already are passing
bytes into these methods, in these cases e.g. b'200' will get converted
to "b'200'", this change only performs the conversion above for non
bytes (or str) types by replacing the above with
if not isinstance(value, binary_type):
value = str(value).encode('utf8')
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit c99450db4eed3abc3a69833a82b1c906e066e27a
Author: Noel Power <noel.power at suse.com>
Date: Tue Nov 6 19:55:22 2018 +0000
python/samba: PY3 port gpo.apply smbtorture test
1) configparser.set requires string values
2) self.gp_db.store() etc. neex to pass str object for
xml.etree.ElementTree.Element text attribute which needs
to be text
3) tdb delete method needs bytes key
4) configparser.write needs a file opened in text mode
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 1d6350897d2a2ac6f2f4024f92ce9266bc4edeff
Author: Noel Power <noel.power at suse.com>
Date: Tue Nov 6 19:50:00 2018 +0000
s4/torture/gpo: Use existing code to 'run' external commands
Noticed when the smb.conf defined 'gpo update command' contained
the $PYTHON version then the exec_wait function failed to run the
command. Seems there is some issue with the arg handling. Also
there is already existing code (samba_runcmd_send) that works fine
in similar situation (e.g. when running dnsupdate etc.) so replaced
the homebrewed exec_wait functionality with the samba_runcmd util
function.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 0cd885c1ec71c4f9cbed96328cd82de27cdc091f
Author: Noel Power <noel.power at suse.com>
Date: Tue Nov 6 19:47:14 2018 +0000
python/samba: fix default params for PY3 ConfigParser
The default params for the python3 version of the compat ConfigParser
are not correct. Code like
foo = ConfigParser()
fails because of this.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 55a381716677adbd4f526769b77d9840b87a4e99
Author: Noel Power <noel.power at suse.com>
Date: Mon Nov 5 21:03:39 2018 +0000
s4/dsdb/tests: PY3 port samba4.ldap.passwordsettings test
* Fix various assertEquals comparing ldb.bytes with string
when running with PY3
* Fix a couple of tuple assignments to exception (not supported
in PY3)
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit ac7baa6e92d46bf2b8734d25db49dc28e1bfd2c9
Author: Noel Power <noel.power at suse.com>
Date: Mon Nov 5 20:43:42 2018 +0000
s4/dsdb/tests/python: PY3 port samba4.sam.python test
Misc changes to ensure samba4.sam.python test will run under
python2/python3
* various objectSID values when formatted need to be treated
as strings for tests.
* DOMAIN_RID_USERS, DOMAIN_RID_DOMAIN_MEMBERS, DOMAIN_RID_DCS,
DOMAIN_RID_READONLY_DCS are all integers (but attibutes are
ldb.bytes in PY3, need to adust various assertEquals.
* Make sure password is encoded correctly
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 72921682558b0eafc1e8cd7b9ae74e81c5c2b9dc
Author: Noel Power <noel.power at suse.com>
Date: Mon Nov 5 13:56:48 2018 +0000
python/samba/netcmd: PY3 fix samba4.blackbox.trust_utils test
In python3 we are using ldb.bytes where we need strings
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 679b640ac5e4da883d30be50cbf5c2efc7515774
Author: Noel Power <noel.power at suse.com>
Date: Mon Nov 5 09:38:23 2018 +0000
python/samba/tests: Py3 port for samba.tests.auth_log_netlogon_bad_creds.samba
fix unicode doesn't exist error in PY3
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 00133791d542f3c89aa4b7c2272d2150a252c3ab
Author: Noel Power <noel.power at suse.com>
Date: Wed Nov 28 14:15:23 2018 +0000
PY3: wrap filter calls with list where list is expected
filter in PY2 returns list in PY3 it returns an iterator
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit a25bd836ee601ca704d2899f17259b9b5cd440cf
Author: Noel Power <noel.power at suse.com>
Date: Sun Nov 4 17:32:19 2018 +0000
python/samba/tests: PY3 port samba.tests.dns
Misc hanges needed to get make test TEST=samba.tests.dns &
samb.tests.dns_fowarder to run and pass under PY3
* socket.send needs bytes not string
* rec.dwTimeStamp expects int not float (in PY3 / operator
will give float results, for int use '//' instead)
* re.match using bytes needs a bytes search term
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 0d73a2b0a29c108c3a0efbbe0473142046302b71
Author: Noel Power <noel.power at suse.com>
Date: Wed Nov 28 14:06:54 2018 +0000
PY3: net.change_password & net.set_password take string not bytes
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit d253e84a41b9f18243d57c41656d28fcd07e476a
Author: Noel Power <noel.power at suse.com>
Date: Wed Nov 28 13:58:49 2018 +0000
python/samba: PY3 Credential.set_password takes string
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 9b18748c703593a3c257c47b626966b0bd6caa3f
Author: Noel Power <noel.power at suse.com>
Date: Thu Nov 8 15:03:52 2018 +0000
auth/credentials: PY3 set_password should decode from unicode 'utf8'
set_password processes input using ParseTuple with "s" format, this
accepts string or unicode but...
Some py2 code is incorrectly using code like
credentials.set_password(pass.encode('utf8'))
however that won't work in PY3. We should just make sure the string
retrieved from unicode passed in is encoded with 'utf8'
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 8b10c7137165c3da10f908c250c0a59d4cca821b
Author: Noel Power <noel.power at suse.com>
Date: Wed Nov 28 15:35:33 2018 +0000
python/samba: Py3 Use new compat.sockerserver symbol
SocketServer symbol changed in PY3 to socketserver so
we need to use a compat symbol for PY2/PY3 code.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit fdf2deb3ba18932d255e19acb08b67cb3f24f6f4
Author: Noel Power <noel.power at suse.com>
Date: Wed Nov 28 15:33:28 2018 +0000
python/samba: PY3 compat py2/p3 symbol for SocketServer/socketserver
SocketServer was renamed to socketserver in Py3, this patch
create a samba.compat.SocketServer which can be used in py2 or
py3
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 1fb9887ea87de11515029d65c7f78873c8396e95
Author: Noel Power <noel.power at suse.com>
Date: Fri Nov 2 16:16:39 2018 +0000
python/samba: PY3 ord needs 'str' type not int
string_to_byte_array returns not a bytearray (as the name suggests)
but a list of byte values (int). Some code expects the list so even
using a 'real' bytearray wont work.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 351ca11b0645ed167b4df0433387d24a59bbe595
Author: Noel Power <noel.power at suse.com>
Date: Tue Nov 20 15:33:32 2018 +0000
s4/setup/tests: make sure samba-tool is called with correct py version
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 3519fcb9b79c2af38a1225bdcda742f6812ec545
Author: Noel Power <noel.power at suse.com>
Date: Fri Nov 16 19:32:31 2018 +0000
s4/utils/test: PY3 make sure we call correct python version for samba-tool
fixes samba4.blackbox.samba_tool blackbox test
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 277dbd9cffbcb5f7be3818ac34f95ac03a9f7a09
Author: Noel Power <noel.power at suse.com>
Date: Fri Nov 16 19:44:08 2018 +0000
nsswitch/tests: PY3 samba_tool call correct python
fix samba4.blackbox.rfc2307_mapping
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit af8077e807d41042229bb3b318b93d1a0d3579b1
Author: Noel Power <noel.power at suse.com>
Date: Mon Nov 5 14:12:24 2018 +0000
testprogs/blackbox: make sure samba-tool is called with correct python
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 6e46d9770edec2fd821df31bfe92937097ba03c6
Author: Noel Power <noel.power at suse.com>
Date: Fri Nov 2 15:42:11 2018 +0000
python/samba.tests: Ensure samba-tool is called with correct python ver.
* remove unnecessary 'bin/' part of path as base BlackBox class
will do this anyway and also ensure correct detection that
command needs to have 'PYTHON=blah' addeded
* modify shell script so PYTHON variable if set is prepended
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
-----------------------------------------------------------------------
Summary of changes:
.gitlab-ci-private.yml | 27 ++--
.gitlab-ci.yml | 63 ++++----
Makefile | 2 +-
auth/credentials/pycredentials.c | 10 +-
auth/credentials/tests/bind.py | 17 ++-
buildtools/wafsamba/samba_cross.py | 2 +-
buildtools/wafsamba/samba_dist.py | 4 +-
buildtools/wafsamba/samba_python.py | 11 +-
buildtools/wafsamba/wafsamba.py | 2 +-
configure | 2 +-
ctdb/Makefile | 4 +-
ctdb/configure | 2 +-
lib/ldb-samba/tests/match_rules.py | 22 +--
lib/ldb/Makefile | 4 +-
lib/ldb/configure | 2 +-
lib/ldb/wscript | 5 +-
lib/replace/Makefile | 4 +-
lib/replace/configure | 2 +-
lib/talloc/Makefile | 4 +-
lib/talloc/configure | 2 +-
lib/tdb/Makefile | 4 +-
lib/tdb/configure | 2 +-
lib/tevent/Makefile | 5 +-
lib/tevent/configure | 2 +-
nsswitch/tests/test_rfc2307_mapping.sh | 8 +-
python/samba/__init__.py | 2 +-
python/samba/compat.py | 4 +-
python/samba/gp_sec_ext.py | 5 +-
python/samba/gpclass.py | 17 +--
python/samba/join.py | 4 +-
python/samba/kcc/kcc_utils.py | 6 +-
python/samba/netcmd/domain.py | 8 +-
python/samba/netcmd/drs.py | 20 +--
python/samba/samdb.py | 19 ++-
python/samba/tests/__init__.py | 11 +-
python/samba/tests/audit_log_dsdb.py | 4 +-
python/samba/tests/audit_log_pass_change.py | 6 +-
python/samba/tests/auth_log.py | 2 +-
python/samba/tests/auth_log_base.py | 5 +-
python/samba/tests/auth_log_netlogon.py | 5 +-
python/samba/tests/auth_log_netlogon_bad_creds.py | 5 +-
python/samba/tests/auth_log_pass_change.py | 8 +-
python/samba/tests/auth_log_samlogon.py | 9 +-
python/samba/tests/blackbox/bug13653.py | 2 +-
python/samba/tests/blackbox/traffic_learner.py | 25 +++-
python/samba/tests/dns.py | 6 +-
python/samba/tests/dns_forwarder.py | 14 +-
python/samba/tests/dns_forwarder_helpers/server.py | 4 +-
python/samba/tests/gpo.py | 3 +-
python/samba/tests/samba_tool/visualize_drs.py | 12 +-
python/samba/tests/test_pam_winbind_chauthtok.sh | 8 +-
python/samba/uptodateness.py | 4 +-
script/autobuild.py | 66 +++------
script/compare_cc_results.py | 14 ++
script/traffic_learner | 10 +-
selftest/flapping.d/kcc_verify_py3 | 1 +
selftest/flapping.d/samba_tool_visualize | 1 +
selftest/knownfail | 7 +
selftest/knownfail.d/encrypted_secrets | 3 +
selftest/knownfail.d/getncchanges | 4 +
selftest/knownfail.d/ntlmv1-restrictions | 3 +
selftest/knownfail.d/password_settings | 1 +
selftest/knownfail.d/replica_sync | 6 +
selftest/selftesthelpers.py | 3 +-
selftest/tests.py | 2 +-
selftest/wscript | 15 ++
source4/dsdb/tests/python/deletetest.py | 13 +-
source4/dsdb/tests/python/ldap.py | 107 +++++++-------
source4/dsdb/tests/python/linked_attributes.py | 2 +-
source4/dsdb/tests/python/notification.py | 2 +-
source4/dsdb/tests/python/password_lockout.py | 12 +-
source4/dsdb/tests/python/passwords.py | 16 +--
source4/dsdb/tests/python/rodc_rwdc.py | 25 ++--
source4/dsdb/tests/python/sam.py | 160 +++++++++++----------
source4/dsdb/tests/python/sites.py | 2 +-
source4/dsdb/tests/python/sort.py | 43 +++---
source4/dsdb/tests/python/token_group.py | 4 +-
source4/dsdb/tests/python/user_account_control.py | 2 +-
source4/dsdb/tests/python/vlv.py | 28 ++--
source4/scripting/bin/samba_dnsupdate | 3 +-
source4/selftest/tests.py | 11 +-
source4/setup/tests/blackbox_spn.sh | 22 +--
source4/torture/gpo/apply.c | 55 +++----
source4/utils/tests/test_samba_tool.sh | 8 +-
testprogs/blackbox/test_samba-tool_ntacl.sh | 4 +-
85 files changed, 600 insertions(+), 485 deletions(-)
Changeset truncated at 500 lines:
diff --git a/.gitlab-ci-private.yml b/.gitlab-ci-private.yml
index bbbeae2cc83..c3860685a80 100644
--- a/.gitlab-ci-private.yml
+++ b/.gitlab-ci-private.yml
@@ -12,41 +12,30 @@ build_samba:
<<: *private_template
script:
# this one takes about 4 hours to finish
- - python script/autobuild.py samba --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py samba --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
-build_samba_py3:
+build_samba_py2:
<<: *private_template
script:
# this one takes about 4 hours to finish
- - python script/autobuild.py samba-py3 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
-
-build_samba_nt4:
- <<: *private_template
- script:
- # this one takes about 1 hours to finish
- - python script/autobuild.py samba-nt4 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
-
-build_samba_nt4_py3:
- <<: *private_template
- script:
- # this one takes about 1 hours to finish
- - python script/autobuild.py samba-nt4-py3 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py samba-py2 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
build_samba_fileserver:
<<: *private_template
script:
# this one takes about 1 hours to finish
- - python script/autobuild.py samba-fileserver --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py samba-fileserver --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
build_samba_ad_dc:
<<: *private_template
script:
# this one takes about 1 hours to finish
- - python script/autobuild.py samba-ad-dc --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py samba-ad-dc --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+
-build_samba_ad_dc_py3:
+build_samba_ad_dc_py2:
<<: *private_template
script:
# this one takes about 1 hours to finish
- - python script/autobuild.py samba-ad-dc-py3 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py samba-ad-dc-py2 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index aba3ca7180d..04d57cb0491 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -27,80 +27,83 @@ build_samba_none_env:
<<: *shared_template
script:
# this one takes about 1 hours to finish
- - python script/autobuild.py samba-none-env --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py samba-none-env --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+
+build_samba_none_env_py2:
+ <<: *shared_template
+ script:
+ # this one takes about 1 hours to finish
+ - script/autobuild.py samba-none-env-py2 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
build_samba_nopython:
<<: *shared_template
script:
- - python script/autobuild.py samba-nopython --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py samba-nopython --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
build_samba_systemkrb5:
<<: *shared_template
script:
- - python script/autobuild.py samba-systemkrb5 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py samba-systemkrb5 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
build_samba_xc:
<<: *shared_template
script:
- - python script/autobuild.py samba-xc --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py samba-xc --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
build_samba_o3:
<<: *shared_template
script:
- - python script/autobuild.py samba-o3 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py samba-o3 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
build_samba_ad_dc_2:
<<: *shared_template
script:
# this one takes about 1 hours to finish
- - python script/autobuild.py samba-ad-dc-2 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py samba-ad-dc-2 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+
+build_samba_ad_dc_2_py2:
+ <<: *shared_template
+ script:
+ # this one takes about 1 hours to finish
+ - script/autobuild.py samba-ad-dc-2-py2 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
build_samba_libs:
<<: *shared_template
script:
- - python script/autobuild.py samba-libs --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py samba-libs --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
-build_samba_libs_py3:
+build_samba_libs_py2:
<<: *shared_template
script:
- - python script/autobuild.py samba-libs-py3 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py samba-libs-py2 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
build_samba_static:
<<: *shared_template
script:
- - python script/autobuild.py samba-static --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py samba-static --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
build_ctdb:
<<: *shared_template
script:
- - python script/autobuild.py ctdb --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py ctdb --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
build_samba_ctdb:
<<: *shared_template
script:
- - python script/autobuild.py samba-ctdb --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py samba-ctdb --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
build_others:
<<: *shared_template
script:
- - python script/autobuild.py ldb --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
- - python script/autobuild.py pidl --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
- - python script/autobuild.py replace --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
- - python script/autobuild.py talloc --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
- - python script/autobuild.py tdb --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
- - python script/autobuild.py tevent --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
-
-build_samba_buildpy3_only:
- <<: *shared_template
- script:
- - python3 script/autobuild.py samba-buildpy3-only --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
-
-build_samba_purepy3-none_env:
+ - script/autobuild.py ldb --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py pidl --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py replace --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py talloc --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py tdb --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - script/autobuild.py tevent --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+
+build_samba_buildpy2_only:
<<: *shared_template
script:
- - python3 script/autobuild.py samba-purepy3-none-env --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
+ - python script/autobuild.py samba-buildpy2-only --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
-build_samba_purepy3-ad-dc-2:
- <<: *shared_template
- script:
- - python3 script/autobuild.py samba-purepy3-ad-dc-2 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
diff --git a/Makefile b/Makefile
index 5cc90771000..4290986a939 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
# simple makefile wrapper to run waf
-PYTHON?=python
+PYTHON?=python3
WAF_BINARY=$(PYTHON) ./buildtools/bin/waf
WAF=WAF_MAKE=1 $(WAF_BINARY)
diff --git a/auth/credentials/pycredentials.c b/auth/credentials/pycredentials.c
index 56174fefbb4..fa8ac2bcb9f 100644
--- a/auth/credentials/pycredentials.c
+++ b/auth/credentials/pycredentials.c
@@ -171,16 +171,18 @@ static PyObject *py_creds_get_password(PyObject *self, PyObject *unused)
static PyObject *py_creds_set_password(PyObject *self, PyObject *args)
{
- char *newval;
+ const char *newval = NULL;
enum credentials_obtained obt = CRED_SPECIFIED;
int _obt = obt;
-
- if (!PyArg_ParseTuple(args, "s|i", &newval, &_obt)) {
+ PyObject *result = NULL;
+ if (!PyArg_ParseTuple(args, "es|i", "utf8", &newval, &_obt)) {
return NULL;
}
obt = _obt;
- return PyBool_FromLong(cli_credentials_set_password(PyCredentials_AsCliCredentials(self), newval, obt));
+ result = PyBool_FromLong(cli_credentials_set_password(PyCredentials_AsCliCredentials(self), newval, obt));
+ PyMem_Free(discard_const_p(void*, newval));
+ return result;
}
static PyObject *py_creds_set_utf16_password(PyObject *self, PyObject *args)
diff --git a/auth/credentials/tests/bind.py b/auth/credentials/tests/bind.py
index 97003f5a333..31627af5769 100755
--- a/auth/credentials/tests/bind.py
+++ b/auth/credentials/tests/bind.py
@@ -19,6 +19,13 @@ from ldb import SCOPE_BASE, SCOPE_SUBTREE
from samba import gensec
import samba.tests
from samba.tests import delete_force
+from samba.credentials import Credentials
+
+def create_credential(lp, other):
+ c = Credentials()
+ c.guess(lp)
+ c.set_gensec_features(other.get_gensec_features())
+ return c
parser = optparse.OptionParser("ldap [options] <host>")
sambaopts = options.SambaOptions(parser)
@@ -39,12 +46,12 @@ host = args[0]
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp)
creds.set_gensec_features(creds.get_gensec_features() | gensec.FEATURE_SEAL)
-creds_machine = copy.deepcopy(creds)
-creds_user1 = copy.deepcopy(creds)
-creds_user2 = copy.deepcopy(creds)
-creds_user3 = copy.deepcopy(creds)
-creds_user4 = copy.deepcopy(creds)
+creds_machine = create_credential(lp, creds)
+creds_user1 = create_credential(lp, creds)
+creds_user2 = create_credential(lp, creds)
+creds_user3 = create_credential(lp, creds)
+creds_user4 = create_credential(lp, creds)
class BindTests(samba.tests.TestCase):
diff --git a/buildtools/wafsamba/samba_cross.py b/buildtools/wafsamba/samba_cross.py
index eee31179fed..f9c4b10e82b 100644
--- a/buildtools/wafsamba/samba_cross.py
+++ b/buildtools/wafsamba/samba_cross.py
@@ -121,7 +121,7 @@ class cross_Popen(Utils.subprocess.Popen):
stdout=Utils.subprocess.PIPE,
stderr=Utils.subprocess.PIPE)
ce_out, ce_err = p.communicate()
- ans = (p.returncode, ce_out)
+ ans = (p.returncode, ce_out.decode('utf8'))
add_answer(ca_file, msg, ans)
else:
args = newargs
diff --git a/buildtools/wafsamba/samba_dist.py b/buildtools/wafsamba/samba_dist.py
index 0568403aa44..c3144e9adf7 100644
--- a/buildtools/wafsamba/samba_dist.py
+++ b/buildtools/wafsamba/samba_dist.py
@@ -97,7 +97,7 @@ def add_tarfile(tar, fname, abspath, basedir):
tinfo.gid = 0
tinfo.uname = 'root'
tinfo.gname = 'root'
- fh = open(abspath)
+ fh = open(abspath, "rb")
tar.addfile(tinfo, fileobj=fh)
fh.close()
@@ -119,7 +119,7 @@ def vcs_dir_contents(path):
repo = os.path.dirname(repo)
if repo == "/":
raise Exception("unsupported or no vcs for %s" % path)
- return Utils.cmd_output(ls_files_cmd, cwd=cwd, env=env).split('\n')
+ return Utils.cmd_output(ls_files_cmd, cwd=cwd, env=env).decode('utf8').split('\n')
def dist(appname='', version=''):
diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py
index bca863bea87..419c559848f 100644
--- a/buildtools/wafsamba/samba_python.py
+++ b/buildtools/wafsamba/samba_python.py
@@ -1,11 +1,11 @@
# waf build tool for building IDL files with pidl
-import os
+import os, sys
from waflib import Build, Logs, Utils, Configure, Errors
from waflib.Configure import conf
@conf
-def SAMBA_CHECK_PYTHON(conf, mandatory=True, version=(2,4,2)):
+def SAMBA_CHECK_PYTHON(conf, mandatory=True, version=(2,6,0)):
# enable tool to build python extensions
if conf.env.HAVE_PYTHON_H:
conf.check_python_version(version)
@@ -21,13 +21,16 @@ def SAMBA_CHECK_PYTHON(conf, mandatory=True, version=(2,4,2)):
conf.find_program('python', var='PYTHON', mandatory=True)
conf.load('python')
try:
- conf.check_python_version((3, 3, 0))
+ conf.check_python_version(version)
except Exception:
- Logs.warn('extra-python needs to be Python 3.3 or later')
+ Logs.warn('extra-python needs to be Python %s.%s.%s or later' %
+ (version[0], version[1], version[2]))
raise
interpreters.append(conf.env['PYTHON'])
conf.setenv('default')
+ if not os.getenv('PYTHON', None):
+ conf.env['PYTHON'] = sys.executable
conf.find_program('python', var='PYTHON', mandatory=mandatory)
conf.load('python')
path_python = conf.find_program('python')
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 906ae9e75b6..f31432a0148 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -323,7 +323,7 @@ def SAMBA_LIBRARY(bld, libname, source,
t.link_name = link_name
if pc_files is not None and not private_library:
- if pyembed and bld.env['IS_EXTRA_PYTHON']:
+ if pyembed:
bld.PKG_CONFIG_FILES(pc_files, vnum=vnum, extra_name=bld.env['PYTHON_SO_ABI_FLAG'])
else:
bld.PKG_CONFIG_FILES(pc_files, vnum=vnum)
diff --git a/configure b/configure
index a94c835a428..6a89b17e733 100755
--- a/configure
+++ b/configure
@@ -13,5 +13,5 @@ export JOBS
unset LD_PRELOAD
cd . || exit 1
-${PYTHON:=python} $WAF configure "$@" || exit 1
+${PYTHON:=python3} $WAF configure "$@" || exit 1
cd $PREVPATH
diff --git a/ctdb/Makefile b/ctdb/Makefile
index 10ac9ab73cf..142998a9652 100644
--- a/ctdb/Makefile
+++ b/ctdb/Makefile
@@ -1,6 +1,8 @@
# simple makefile wrapper to run waf
-WAF=WAF_MAKE=1 PATH=buildtools/bin:../buildtools/bin:$$PATH waf
+PYTHON?=python3
+WAF_BINARY=$(PYTHON) ../buildtools/bin/waf
+WAF=WAF_MAKE=1 $(WAF_BINARY)
all:
$(WAF) build
diff --git a/ctdb/configure b/ctdb/configure
index e8d01577cf7..370ddccb6a5 100755
--- a/ctdb/configure
+++ b/ctdb/configure
@@ -11,5 +11,5 @@ JOBS=1
export JOBS
cd . || exit 1
-${PYTHON:=python} $WAF configure "$@" || exit 1
+${PYTHON:=python3} $WAF configure "$@" || exit 1
cd $PREVPATH
diff --git a/lib/ldb-samba/tests/match_rules.py b/lib/ldb-samba/tests/match_rules.py
index ad8ed3168e4..13561b174e9 100755
--- a/lib/ldb-samba/tests/match_rules.py
+++ b/lib/ldb-samba/tests/match_rules.py
@@ -430,8 +430,8 @@ class MatchRulesTests(samba.tests.TestCase):
self.assertEqual(len(res1), 1)
self.assertEqual(str(res1[0].dn).lower(), ("cn=u1,%s" % self.ou_users).lower())
- sid = self.ldb.schema_format_value("objectSid", res1[0]["objectSid"][0])
- guid = self.ldb.schema_format_value("objectGUID", res1[0]['objectGUID'][0])
+ sid = self.ldb.schema_format_value("objectSid", res1[0]["objectSid"][0]).decode('utf8')
+ guid = self.ldb.schema_format_value("objectGUID", res1[0]['objectGUID'][0]).decode('utf8')
res1 = self.ldb.search(self.ou_groups,
scope=SCOPE_SUBTREE,
@@ -493,8 +493,8 @@ class MatchRulesTests(samba.tests.TestCase):
self.assertEqual(len(res1), 1)
self.assertEqual(str(res1[0].dn).lower(), ("cn=u2,%s" % self.ou_users).lower())
- sid = self.ldb.schema_format_value("objectSid", res1[0]["objectSid"][0])
- guid = self.ldb.schema_format_value("objectGUID", res1[0]['objectGUID'][0])
+ sid = self.ldb.schema_format_value("objectSid", res1[0]["objectSid"][0]).decode('utf8')
+ guid = self.ldb.schema_format_value("objectGUID", res1[0]['objectGUID'][0]).decode('utf8')
res1 = self.ldb.search(self.ou_groups,
scope=SCOPE_SUBTREE,
@@ -552,8 +552,8 @@ class MatchRulesTests(samba.tests.TestCase):
self.assertEqual(len(res1), 1)
self.assertEqual(str(res1[0].dn).lower(), ("cn=u3,%s" % self.ou_users).lower())
- sid = self.ldb.schema_format_value("objectSid", res1[0]["objectSid"][0])
- guid = self.ldb.schema_format_value("objectGUID", res1[0]['objectGUID'][0])
+ sid = self.ldb.schema_format_value("objectSid", res1[0]["objectSid"][0]).decode('utf8')
+ guid = self.ldb.schema_format_value("objectGUID", res1[0]['objectGUID'][0]).decode('utf8')
res1 = self.ldb.search(self.ou_groups,
scope=SCOPE_SUBTREE,
@@ -607,8 +607,8 @@ class MatchRulesTests(samba.tests.TestCase):
self.assertEqual(len(res1), 1)
self.assertEqual(str(res1[0].dn).lower(), ("cn=u4,%s" % self.ou_users).lower())
- sid = self.ldb.schema_format_value("objectSid", res1[0]["objectSid"][0])
- guid = self.ldb.schema_format_value("objectGUID", res1[0]['objectGUID'][0])
+ sid = self.ldb.schema_format_value("objectSid", res1[0]["objectSid"][0]).decode('utf8')
+ guid = self.ldb.schema_format_value("objectGUID", res1[0]['objectGUID'][0]).decode('utf8')
res1 = self.ldb.search(self.ou_groups,
scope=SCOPE_SUBTREE,
@@ -767,15 +767,15 @@ class MatchRulesTests(samba.tests.TestCase):
self.assertEqual(len(res1), 0)
def test_nul_text(self):
- self.assertRaises(TypeError,
+ self.assertRaises((ValueError,TypeError),
lambda: self.ldb.search("cn=g4,%s" % self.ou_groups,
scope=SCOPE_BASE,
expression="\00member:1.2.840.113556.1.4.1941:=cn=u1,%s" % self.ou_users))
- self.assertRaises(TypeError,
+ self.assertRaises((ValueError,TypeError),
lambda: self.ldb.search("cn=g4,%s" % self.ou_groups,
scope=SCOPE_BASE,
expression="member:1.2.840\00.113556.1.4.1941:=cn=u1,%s" % self.ou_users))
- self.assertRaises(TypeError,
+ self.assertRaises((ValueError,TypeError),
lambda: self.ldb.search("cn=g4,%s" % self.ou_groups,
scope=SCOPE_BASE,
expression="member:1.2.840.113556.1.4.1941:=cn=u1\00,%s" % self.ou_users))
diff --git a/lib/ldb/Makefile b/lib/ldb/Makefile
index 5acfcbce58e..75517a774d3 100644
--- a/lib/ldb/Makefile
+++ b/lib/ldb/Makefile
@@ -1,6 +1,8 @@
# simple makefile wrapper to run waf
-WAF=WAF_MAKE=1 PATH=buildtools/bin:../../buildtools/bin:$$PATH waf
+PYTHON?=python3
+WAF_BINARY=$(PYTHON) ../../buildtools/bin/waf
+WAF=WAF_MAKE=1 $(WAF_BINARY)
all:
$(WAF) build
diff --git a/lib/ldb/configure b/lib/ldb/configure
index 82146fe109a..8625206d611 100755
--- a/lib/ldb/configure
+++ b/lib/ldb/configure
@@ -17,5 +17,5 @@ JOBS=1
export JOBS
cd . || exit 1
-$WAF configure "$@" || exit 1
+${PYTHON:=python3} $WAF configure "$@" || exit 1
cd $PREVPATH
diff --git a/lib/ldb/wscript b/lib/ldb/wscript
index 61acbd2edf9..49517d2770d 100644
--- a/lib/ldb/wscript
+++ b/lib/ldb/wscript
@@ -84,7 +84,8 @@ def configure(conf):
conf.define('USING_SYSTEM_LDB', 1)
else:
using_system_pyldb_util = True
- if not conf.CHECK_BUNDLED_SYSTEM_PKG('pyldb-util',
+ dflt_name = 'pyldb-util' + conf.all_envs['default']['PYTHON_SO_ABI_FLAG']
+ if not conf.CHECK_BUNDLED_SYSTEM_PKG(dflt_name,
minversion=VERSION,
maxversion=max_ldb_version_dots,
onlyif='talloc tdb tevent',
@@ -108,7 +109,7 @@ def configure(conf):
if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb',
minversion=VERSION,
maxversion=max_ldb_version_dots,
- onlyif='talloc tdb tevent pyldb-util',
+ onlyif='talloc tdb tevent %s' % dflt_name,
implied_deps='replace talloc tdb tevent'):
conf.define('USING_SYSTEM_LDB', 1)
diff --git a/lib/replace/Makefile b/lib/replace/Makefile
index 364990153e5..923605f9a13 100644
--- a/lib/replace/Makefile
+++ b/lib/replace/Makefile
@@ -1,6 +1,8 @@
# simple makefile wrapper to run waf
-WAF=WAF_MAKE=1 PATH=buildtools/bin:../../buildtools/bin:$$PATH waf
+PYTHON?=python3
+WAF_BINARY=$(PYTHON) ../../buildtools/bin/waf
+WAF=WAF_MAKE=1 $(WAF_BINARY)
all:
$(WAF) build
diff --git a/lib/replace/configure b/lib/replace/configure
index 6a9f8755112..69bbc4a1bae 100755
--- a/lib/replace/configure
--
Samba Shared Repository
More information about the samba-cvs
mailing list