Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu May 28 16:50:39 CEST 2015 on sn-devel-104
Ralph Boehme [Thu, 28 May 2015 07:02:17 +0000 (09:02 +0200)]
s3:smb2: add padding to last command in compound requests
Following Windows behaviour, the last command in a compound request
should be padded to an 8 byte boundary and OS X clients crash badly if
we don't pad.
[MS-SMB2] 3.3.4.1.3, "Sending Compounded Responses", doesn't make it
clear whether the padding requirement governs the last command in a
compound response, a future MS-SMB2 update will document Windwows
product behaviour in a footnote.
Volker Lendecke [Tue, 19 May 2015 14:55:32 +0000 (16:55 +0200)]
ctdbd_conn: Move message handling out of ctdbd_conn.c
This also removes the deferred message handling. It's no longer required,
because the messaging_send_iov_from always goes through the kernel which
takes at least one round through tevent.
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Mon, 18 May 2015 11:15:35 +0000 (13:15 +0200)]
messaging: Register a tevent context for secondary dgm refs
When a secondary messaging context is initialized, we need to register
its tevent context with the lower level dgm context. Seen when using
smbstatus with clustering.
The TALLOC_FREE(r->tevent_handle) in the destructor might not be
necessary, but I want to free the tevent reference before
the context goes away.
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Douglas Bagnall [Fri, 6 Mar 2015 04:59:14 +0000 (17:59 +1300)]
KCC: more pythonic expression in select_istg
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu May 28 10:14:12 CEST 2015 on sn-devel-104
Douglas Bagnall [Wed, 22 Apr 2015 23:46:09 +0000 (11:46 +1200)]
KCC: Write out more DOT files and debug
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Wed, 22 Apr 2015 23:45:33 +0000 (11:45 +1200)]
KCC: Comment noting verbose nature of construct_intrasite_graph()
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Thu, 23 Apr 2015 00:16:36 +0000 (12:16 +1200)]
KCC: Add comments regarding time handling
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andrew Bartlett [Wed, 22 Apr 2015 23:44:12 +0000 (11:44 +1200)]
KCC: add --forced-local-dsa option for changing local dsa
For testing it is useful to pretend a DSA is local against the preferences
of the database.
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Douglas Bagnall [Fri, 6 Mar 2015 02:32:27 +0000 (15:32 +1300)]
KCC: add comments, idiomatic changes to intrasite_graph code
Using `x in foo_dict.keys()` is the same as `x in foo_dict`, except it
is O(n) instead of O(1) and is not the way things are done in Python.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Fri, 6 Mar 2015 02:28:29 +0000 (15:28 +1300)]
KCC: improve log legibility with colour; make more dot graphs
To see the colours in less, use -R.
bin/samba_kcc --debug -H whatever/sam.ldb | less -R
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Fri, 6 Mar 2015 02:17:24 +0000 (15:17 +1300)]
KCC: helper function to find config NC replica for a DSA
This logic is going to be used elsewhere (for dot debugging).
Also add a dedicated KCC Exception class.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Thu, 5 Mar 2015 04:30:34 +0000 (17:30 +1300)]
samba_kcc: try to implement rep deletion in translate_ntdsconn()
The trouble is it does nothing in our test case as there are no reps
that need deleting.
Also adding some tidy-ups and pointers to the reference.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Thu, 5 Mar 2015 04:26:53 +0000 (17:26 +1300)]
KCC: use more pythonic construct for get_current_replica
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Thu, 5 Mar 2015 01:53:55 +0000 (14:53 +1300)]
kcc: Reduce code verbosity in dumpstr_* functions
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Wed, 4 Mar 2015 22:50:24 +0000 (11:50 +1300)]
kcc: add labels to dot files
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Wed, 4 Mar 2015 22:46:39 +0000 (11:46 +1300)]
KCC: highlight our deviation from the spec in color_vertices
The documentation didn't make much sense.
Worked out by Garming.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Wed, 4 Mar 2015 22:40:55 +0000 (11:40 +1300)]
samba_kcc: add an option to set assumed current time
The KCC algorithm contains a timeouts in a couple of places, and we
need to be able to set the time for testing these.
This also means samba_kcc uses the same time in all places.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This tries to record some information about what the graph is (e.g
which partition), though it is not very readable.
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Wed, 4 Mar 2015 00:05:37 +0000 (13:05 +1300)]
KCC: correct the comparison for lost link timeout
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Fri, 13 Mar 2015 03:22:18 +0000 (16:22 +1300)]
kcc: Add a TODO for is_bridgehead_failed
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Fri, 13 Mar 2015 03:21:44 +0000 (16:21 +1300)]
kcc: add some more debug messages
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Fri, 13 Mar 2015 03:21:02 +0000 (16:21 +1300)]
kcc: correctly calculate the number of components
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Fri, 13 Mar 2015 03:20:37 +0000 (16:20 +1300)]
kcc: Export extended_dn to be used by import
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Fri, 13 Mar 2015 03:17:42 +0000 (16:17 +1300)]
kcc: Make debugging slightly clearer
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Fri, 13 Mar 2015 03:14:20 +0000 (16:14 +1300)]
kcc: Use remote vertex instead of local vertex in getting bridgehead
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Fri, 27 Feb 2015 05:20:38 +0000 (18:20 +1300)]
kcc: Use correct parent in kruskal algorithm
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Tue, 24 Feb 2015 01:14:33 +0000 (14:14 +1300)]
kcc: Remove unused is_sitelink call
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Tue, 24 Feb 2015 01:13:52 +0000 (14:13 +1300)]
kcc: Remove DN translation for Site GUID
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Mon, 23 Feb 2015 22:44:11 +0000 (11:44 +1300)]
kcc: Factor out MAX_DWORD
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Mon, 23 Feb 2015 22:04:58 +0000 (11:04 +1300)]
kcc: convert identification of sites from DN to GUID
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Mon, 23 Feb 2015 21:48:34 +0000 (10:48 +1300)]
kcc: remove unnecessary find site link code
This code was originally used to form n-to-n replication.
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Mon, 23 Feb 2015 02:06:41 +0000 (15:06 +1300)]
kcc: Convert transport identification from DN to GUID
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Mon, 23 Feb 2015 01:28:34 +0000 (14:28 +1300)]
kcc: Start using proper GUIDs for comparison
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Sun, 22 Feb 2015 23:10:29 +0000 (12:10 +1300)]
kcc: Implement update_rodc_connection to maintain the FRS
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Fri, 13 Mar 2015 01:36:05 +0000 (14:36 +1300)]
samba_kcc: Add basic skeleton for KCC intersite algorithm
This enables the use of the intersite calculated list of edges
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Wed, 18 Feb 2015 05:21:19 +0000 (18:21 +1300)]
kcc_utils: Create the new classes for the intersite algorithm
Also sorts vertex color by preference in sorting algorithms.
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andrew Bartlett [Thu, 19 Feb 2015 22:53:11 +0000 (11:53 +1300)]
samba_kcc: Ensure we bail out if s_dsa is None
Previously we could continue and fail due to attempting to de-reference this
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Andrew Bartlett [Thu, 19 Feb 2015 01:57:08 +0000 (14:57 +1300)]
samba_kcc: Fix use-before assignment
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Andrew Bartlett [Wed, 18 Feb 2015 21:20:48 +0000 (10:20 +1300)]
samba_kcc: Do not attempt to modify connections on a RODC, replicated attributes are read only
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
The previous code did not operate as c_rep.source_dsa_invocation_id was not valid, and in any case
this was not the correct check. We need to look for the old interSiteTopologyGenerator in our
list of replication partners, and confirm it is current.
Andrew Bartlett
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Garming Sam [Fri, 10 Apr 2015 04:17:50 +0000 (16:17 +1200)]
kcc: typo fix in AttributeError Exception
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Fri, 27 Feb 2015 05:19:06 +0000 (18:19 +1300)]
kcc: Fix typos in original samba_kcc
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Garming Sam [Thu, 22 Jan 2015 20:43:55 +0000 (09:43 +1300)]
samba_kcc: Fix existing syntax errors preventing samba_kcc from running
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andrew Bartlett [Wed, 18 Feb 2015 21:19:37 +0000 (10:19 +1300)]
dsdb: Relax the check for the RID set DN
This was preventing the correct generation of error messages and referrals on an RODC.
An RODC does not have a RID set.
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Thu, 28 May 2015 04:40:31 +0000 (16:40 +1200)]
s4-rpc_server/drsuapi: Fix timeouts on forwarded DsExecuteKCC IRPC call
This matches other forwarded calls
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Marc Muehlfeld [Tue, 19 May 2015 15:15:41 +0000 (17:15 +0200)]
Update 4.2 Roadmap file
The Roadmap file wasn't refreshed before releasing 4.2. It
still contained the content it had in 4.1. Updated the
file accordingly.
Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri May 22 01:44:19 CEST 2015 on sn-devel-104
s3-spoolss: use talloc_zero in spoolss notify code
Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu May 21 22:53:16 CEST 2015 on sn-devel-104
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 21 15:34:59 CEST 2015 on sn-devel-104
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed May 20 22:16:54 CEST 2015 on sn-devel-104
s4: libcli/finddcs_cldap: continue processing CLDAP until all addresses are used
This is a subtle bug that causes CLDAP pings to fail if SRV records
discovered cannot be resolved or connection to them cannot be
established. The code that fires up CLDAP ping will silently cancel
the whole tevent request without going to the next server in the queue.
This may happen, for example, when connection to IPv6 addresses couldn't
be established, or when IPv4 address is not online or blocked by
firewall.
heimdal:lib/krb5: verify_logonname() to handle multi component principal
FreeIPA can generate tickets with a client principal of
'host/hostname.example.com'.
verify_logonname() should just verify the principal name
in the PAC_LOGON_NAME is the same as the principal of
the client principal (without realm) of the ticket.
Samba commit b7cc8c1187ff967e44587cd0d09185330378f366
break this. We try to compare ['host']['hostname.example.com']
with ['host/hostname.example.com]' (as we interpret it as enterprise principal)
this fail if we don't compare them as strings.
Uri Simchoni [Mon, 4 May 2015 07:21:53 +0000 (10:21 +0300)]
autobuild: Add test for cross-compilation infrastructure
With added option to generate cross-answers by cross-execute script,
a test is added to verify that at least for tested build environments,
the infrastructure is self-consistent.
The test runs samba configuration in three modes:
1. Native
2. Cross compile with cross-execute, using the build machine as its own
target
3. Cross compile with cross-answers, using the answers generated in
step 2
The build environments created by the three processes are then tested to
be equal.
Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed May 20 14:10:05 CEST 2015 on sn-devel-104
Uri Simchoni [Tue, 19 May 2015 08:50:41 +0000 (11:50 +0300)]
waf: add a script that compares configurations
This script is intended for use with the cross-build infrastructure
self-test during autobuild.
The script takes two or more "default.cache.py" files which are the
result of the waf configure process, and performs an intelligent
comparison - allowing for a limited set of variables to be different.
If the configurations are identical (apart from allowed differences) then
the script exit with 0 code.
If there are differences, the script outputs them to standard output
in unified diff format.
Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
Uri Simchoni [Tue, 19 May 2015 08:44:03 +0000 (11:44 +0300)]
waf: add a cross-execute program that runs natively
This added script is for supporting self-testing of the cross-build
infrastructure using autobuild.
The script can be used as the --cross-execute parameter
to samba's configure process, but it actually runs the program
natively on the build machine. This can be done if the build is
actually a native build disguised as a cross-build, i.e. native
toolchain is being used.
Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
Uri Simchoni [Mon, 4 May 2015 19:03:54 +0000 (22:03 +0300)]
waf: add a sample run-on-target script
This is a sample script that can be used with the --cross-execute
configure switch to run configure tests on a remote target for which
samba is being cross-compiled.
Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
Uri Simchoni [Tue, 19 May 2015 08:09:55 +0000 (11:09 +0300)]
waf: allow cross-execute program to have arguments with spaces
When cross-compiling samba using the cross-execute method,
allow the cross-excute command to have arguments that contain
spaces by quoting them.
For example:
./configure --cross-compile '--cross-execute=ce-program "par am"'
In this case, for each cross test whose binary is /path/testprog,
waf shall run the equivalent of running from a shell:
ce-program "par am" /path/testprog
This is useful for passing an arbitrary argument list to a subprocess
of the cross-execute program, such as in buildtools/examples/run_on_target.py
Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
Uri Simchoni [Sun, 3 May 2015 19:56:15 +0000 (22:56 +0300)]
waf: improve readability of cross-answers generated by cross-execute
When generating a result for cross-answers from the (retcode, retstring) tuple:
- (0, "output") indicated as "output"
- 1 is interpreted as generic fail code, instead of 255, because most
if not all tests fail with 1 as exit code rather than 255
- For failing test, use NO instead of FAIL, because that's not
necessarily a failure (it could mean that something is NOT
broken)
Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
Uri Simchoni [Mon, 18 May 2015 18:15:19 +0000 (21:15 +0300)]
Adds a new mode to samba cross-compiling.
When both --cross-answers and --cross-execute are set, this means:
- Use cross-answers
- If answer is unknown, then instead of adding UNKNOWN to the cross-answers
file and failing configure, the new mode runs cross-execute to determine the
answer and adds that to the cross-answers file.
Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
Uri Simchoni [Mon, 18 May 2015 18:12:06 +0000 (21:12 +0300)]
waf: sanitize and fix added cross answer
When configuring samba for cross-compilation using the cross-answers
method, the function add_answer receives the standard output and exit code
of a configuration test and updates the cross-answers file accordingly.
This patch sanitizes the standard output to conform to the cross-answers
file format - one line of output. It also adds a missing newline.
(Note - at this point add_answer is only ever called with empty output
but this change is significant for the reminder of this patchset)
Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
Jelmer Vernooij [Mon, 18 May 2015 20:19:23 +0000 (20:19 +0000)]
Factor out submodule presence checking.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue May 19 22:17:48 CEST 2015 on sn-devel-104
Jelmer Vernooij [Mon, 18 May 2015 20:00:30 +0000 (20:00 +0000)]
Make waf fail if submodules are out of date.
Instead, suggest the user run 'git submodule update'.
This should prevent users from accidentally building Samba against
outdated or too new versions of the bundled third party libraries
after switching branches.
I've opted to make this an error rather than actually
running 'git submodule update' directly, as the latter could
cause unpredictable behaviour. If we find that manually updating
submodules is too cumbersome, we can always change this. The normal mode
of operation for developers should not involve any submodules at all,
but system versions of these libraries.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Petr Viktorin [Wed, 6 May 2015 10:45:42 +0000 (12:45 +0200)]
buildtools: Expose the Python 3 ABI tag
Expose the tag in the env to allow using it in pkg-config files
Add a "pyembed_libname" function to correctly form library names.
(This can't be done automatically in SAMBA_LIBRARY because the name
could be used as a dependency for another library)
Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Petr Viktorin [Thu, 15 Jan 2015 13:07:09 +0000 (14:07 +0100)]
pytalloc: Port to Python 3
- Use native string for repr
- Use rich comparison
Removes the deprecated tp_compare in favor of tp_richcompare.
Disparate types cannot be compared (except for == and !=),
and True or False objects are returned explicitly.
- Use Py_TYPE instead of ob_type
This changed to conform to C aliasing rules,
see http://legacy.python.org/dev/peps/pep-3123/
- Don't provide CObject creation function
A PyCapsule based replacement would be possible,
but might not be necessary considering the function is
not used much.
- Use new-style module initialization
Build changes:
- Use ABI flag in the lib name and pkg-config template
- Use the SAMBA_CHECK_PYTHON macro for finding Python
Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
s3:tevent_wait: simplify the code by using tevent_req_defer_callback()
This way a user of this could also use tevent_req_error() or wrappers.
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue May 19 16:37:52 CEST 2015 on sn-devel-104