Bug 11789 - Required changes for talloc-2.1.6
Required changes for talloc-2.1.6
Status: RESOLVED FIXED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB
4.4.0rc4
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
https://lists.samba.org/archive/samba...
:
Depends on:
Blocks: 11778
  Show dependency treegraph
 
Reported: 2016-03-14 03:43 UTC by Garming Sam
Modified: 2016-04-26 09:20 UTC (History)
5 users (show)

See Also:
metze: review+


Attachments
backport of minimum changes for 4.3 (16.63 KB, patch)
2016-04-03 12:36 UTC, Andrew Bartlett
garming: review+
Details
Backport of minimum changes to 4.2 (16.50 KB, patch)
2016-04-21 01:06 UTC, Andrew Bartlett
metze: review+
garming: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Garming Sam 2016-03-14 03:43:17 UTC
Without these changes, Samba will fail to provision with the new talloc.
Comment 1 Garming Sam 2016-03-14 03:48:10 UTC
4.4 backport (patch too large to attach to bug):

git://git.samba.org/garming/samba.git

http://git.catalyst.net.nz/gitweb?p=samba.git;a=shortlog;h=refs/heads/talloc-backport-v4-4
Comment 2 Stefan Metzmacher 2016-03-14 09:38:35 UTC
(In reply to Garming Sam from comment #1)

This doesn't seem to include all required changes, I'm getting

[1504(9781)/1893 at 1h42m7s] samba.tests.libsmb_samba_internal(nt4_dc)
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/memdisk/metze/a44/b2395838/samba/bin/python/samba/subunit/run.py", line 703, in <module>
    TestProgram(module=None, argv=sys.argv, stdout=sys.stdout)
  File "/memdisk/metze/a44/b2395838/samba/bin/python/samba/subunit/run.py", line 541, in __init__
    self.parseArgs(argv)
  File "/memdisk/metze/a44/b2395838/samba/bin/python/samba/subunit/run.py", line 600, in parseArgs
    self.createTests()
  File "/memdisk/metze/a44/b2395838/samba/bin/python/samba/subunit/run.py", line 609, in createTests
    self.module)
  File "/usr/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'libsmb_samba_internal'
command: python -m samba.subunit.run  $LOADLIST samba.tests.libsmb_samba_internal 2>&1  | /memdisk/metze/a44/b2395838/samba/selftest/filter-subunit --fail-on-empty --prefix="samba.tests.libsmb_samba_internal." --suffix="(nt4_dc)"
expanded command: python -m samba.subunit.run  $LOADLIST samba.tests.libsmb_samba_internal 2>&1  | /memdisk/metze/a44/b2395838/samba/selftest/filter-subunit --fail-on-empty --prefix="samba.tests.libsmb_samba_internal." --suffix="(nt4_dc)"
ERROR: Testsuite[samba.tests.libsmb_samba_internal(nt4_dc)]
REASON: Exit code was 1



FAILED (0 failures, 0 errors and 0 unexpected successes in 1 testsuites)
Comment 3 Garming Sam 2016-03-15 03:23:14 UTC
(In reply to Stefan Metzmacher from comment #2)
After being confused for a good while, we established that the failure is due to a build/linker issue. What was required was to add a dependency on pytalloc-util where it did not previously have one (some way or another, this wasn't hit on master). 

I've updated my branch for the 4.4 backport on the Catalyst git. The dependency patch is also still currently in an autobuild for master (currently 2nd attempt due to an intermittent failure).
Comment 4 Stefan Metzmacher 2016-03-15 11:41:39 UTC
Review+ for 41 patches up to commit d3abebbee1e15ad726acaff75267614ccc13edd1 from
http://git.catalyst.net.nz/gw?p=samba.git;a=commitdiff;h=d3abebbee1e15ad726acaff75
Comment 5 Stefan Metzmacher 2016-03-15 16:20:50 UTC
(In reply to Stefan Metzmacher from comment #4)

The following patch was missing

commit 943e69ca8fd4491004eafbf29ed2ca748b0b7480
Author:     Günther Deschner <gd@samba.org>
AuthorDate: Mon Feb 1 23:11:13 2016 +0100
Commit:     Günther Deschner <gd@samba.org>
CommitDate: Tue Feb 2 15:49:14 2016 +0100

    libsmb/pysmb: add pytalloc-util dependency to fix the build.
    
    Guenther
    
    Signed-off-by: Guenther Deschner <gd@samba.org>
    Reviewed-by: Michael Adam <obnox@samba.org>
    
    Autobuild-User(master): Günther Deschner <gd@samba.org>
    Autobuild-Date(master): Tue Feb  2 15:49:14 CET 2016 on sn-devel-144

We need 42 patches up to commit 0d8839ec1415167ad74284b1820555283e61f5b5 from
https://git.samba.org/?p=metze/samba/wip.git;a=commit;h=0d8839ec1415167ad74284b182
Comment 6 Michael Adam 2016-03-15 16:23:09 UTC
(In reply to Stefan Metzmacher from comment #5)
> (In reply to Stefan Metzmacher from comment #4)
> 
> The following patch was missing
> 
> commit 943e69ca8fd4491004eafbf29ed2ca748b0b7480
> Author:     Günther Deschner <gd@samba.org>
> AuthorDate: Mon Feb 1 23:11:13 2016 +0100
> Commit:     Günther Deschner <gd@samba.org>
> CommitDate: Tue Feb 2 15:49:14 2016 +0100
> 
>     libsmb/pysmb: add pytalloc-util dependency to fix the build.
>     
>     Guenther
>     
>     Signed-off-by: Guenther Deschner <gd@samba.org>
>     Reviewed-by: Michael Adam <obnox@samba.org>
>     
>     Autobuild-User(master): Günther Deschner <gd@samba.org>
>     Autobuild-Date(master): Tue Feb  2 15:49:14 CET 2016 on sn-devel-144
> 
> We need 42 patches up to commit 0d8839ec1415167ad74284b1820555283e61f5b5 from
> https://git.samba.org/?p=metze/samba/wip.git;a=commit;
> h=0d8839ec1415167ad74284b182

review + for this additional patch
Comment 7 Andrew Bartlett 2016-04-03 12:36:04 UTC
Created attachment 11962 [details]
backport of minimum changes for 4.3

This patch brings back the changes to make us work with talloc 2.1.6, but not the PIDL fixes.

This is needed to build Samba on systems with talloc-dev once we package 2.1.6 in Debian.

The dsdb change is strictly required, and the dep changes are needed to avoid spending another day debugging that side of things when the build state is perturbed again.
Comment 8 Andrew Bartlett 2016-04-04 02:54:32 UTC
Assigning to Karolin for 4.3
Comment 9 Andrew Bartlett 2016-04-04 19:29:53 UTC
To be clear, this bug will show this text during provision or dbcheck:

ERROR(runtime): uncaught exception - pytalloc_reference_ex() called for 
object type not based on talloc
Comment 10 Karolin Seeger 2016-04-20 07:26:11 UTC
(In reply to Andrew Bartlett from comment #7)
Pushed to autobuild-v4-3-test.
Comment 11 Stefan Metzmacher 2016-04-20 07:59:12 UTC
(In reply to Andrew Bartlett from comment #7)

Would this also apply to 4.2?

We're going to make one more 4.2 bugfix release, as it was deferred
because of the security releases. It would be nice to be compatible
with talloc-2.1.6 before the security fixes only mode for 4.2.
Comment 12 Karolin Seeger 2016-04-20 08:10:37 UTC
(In reply to Stefan Metzmacher from comment #11)
No, patchset would need to be adapted:
user@carrie:/data/git/samba/v4-2-test$ git am 4.3-pytalloc.patch
Applying: pydsdb: Also accept ldb.MessageElement values to dsdb routines
Applying: pydsdb: Fix returning of ldb.MessageElement.
Applying: build: mark explicit dependencies on pytalloc-util
error: patch failed: source3/passdb/wscript_build:43
error: source3/passdb/wscript_build: patch does not apply
Patch failed at 0003 build: mark explicit dependencies on pytalloc-util
Comment 13 Andrew Bartlett 2016-04-21 01:06:02 UTC
Created attachment 12012 [details]
Backport of minimum changes to 4.2
Comment 14 Karolin Seeger 2016-04-21 07:08:54 UTC
(In reply to Andrew Bartlett from comment #13)
Thanks a lot!
Pushed to autobuild-v4-2-test.
Comment 15 Karolin Seeger 2016-04-26 09:20:04 UTC
(In reply to Karolin Seeger from comment #14)
Pushed to v4-2-test.
Closing out bug report.

Thanks!