<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/lib/tdb_compat/wscript, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/'/>
<entry>
<title>ccan: we're subsystems, not a library.</title>
<updated>2012-06-29T04:22:44+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2012-06-29T02:39:06+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=f3862b917168ade88a048cdee688986b0479fe37'/>
<id>f3862b917168ade88a048cdee688986b0479fe37</id>
<content type='text'>
Don't expose a libccan.so; it would produce clashes if someone else
does the same thing.  Unfortunately, if we just change it from a
SAMBA_LIBRARY to a SAMBA_SUBSYSTEM, it doesn't create a static library
as we'd like, but links all the object files in.  This means we get
many duplicates (eg. everyone gets a copy of tally, even though only
ntdb wants it).

So, the solution is twofold:
1) Make the ccan modules separate.
2) Make the ccan modules SAMBA_SUBSYSTEMs not SAMBA_LIBRARYs so we don't
   build shared libraries which we can't share.
3) Make the places which uses ccan explicit.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;

Autobuild-User(master): Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Autobuild-Date(master): Fri Jun 29 06:22:44 CEST 2012 on sn-devel-104
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't expose a libccan.so; it would produce clashes if someone else
does the same thing.  Unfortunately, if we just change it from a
SAMBA_LIBRARY to a SAMBA_SUBSYSTEM, it doesn't create a static library
as we'd like, but links all the object files in.  This means we get
many duplicates (eg. everyone gets a copy of tally, even though only
ntdb wants it).

So, the solution is twofold:
1) Make the ccan modules separate.
2) Make the ccan modules SAMBA_SUBSYSTEMs not SAMBA_LIBRARYs so we don't
   build shared libraries which we can't share.
3) Make the places which uses ccan explicit.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;

Autobuild-User(master): Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Autobuild-Date(master): Fri Jun 29 06:22:44 CEST 2012 on sn-devel-104
</pre>
</div>
</content>
</entry>
<entry>
<title>TDB2: make SAMBA use tdb1 again for the moment.</title>
<updated>2012-06-19T03:38:05+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2012-06-18T13:00:04+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=6244f668a34279e6da62213333dfb32c3ccdb17d'/>
<id>6244f668a34279e6da62213333dfb32c3ccdb17d</id>
<content type='text'>
Otherwise the following surgery will break the SAMBA build and testsuite.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise the following surgery will break the SAMBA build and testsuite.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>lib/tdb_compat: Do not define BUILD_TDB2 if we are not building tdb2</title>
<updated>2012-04-11T14:00:38+00:00</updated>
<author>
<name>Andrew Bartlett</name>
<email>abartlet@samba.org</email>
</author>
<published>2012-04-11T12:18:34+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=d271bf8dc2d37453e84ceea86a5cc70bef22d6d7'/>
<id>d271bf8dc2d37453e84ceea86a5cc70bef22d6d7</id>
<content type='text'>
The simple fact that this was defined at all, even to false, caused some
of the tdb2 build code to run.

Andrew Bartlett
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The simple fact that this was defined at all, even to false, caused some
of the tdb2 build code to run.

Andrew Bartlett
</pre>
</div>
</content>
</entry>
<entry>
<title>tdb2: tie it into build process if --enable-tdb2-breaks-compat</title>
<updated>2011-06-20T09:18:36+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2011-06-20T09:10:34+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=985e83ef520da68a60899f0ad977cb28a77b8cbe'/>
<id>985e83ef520da68a60899f0ad977cb28a77b8cbe</id>
<content type='text'>
This is simplistic.  We need to support making TDB2 a standalone library,
but for now, we simply built it in-tree.

Once we have tdb1 compatibility in tdb2, we can rename this option to
--enable-tdb2.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is simplistic.  We need to support making TDB2 a standalone library,
but for now, we simply built it in-tree.

Once we have tdb1 compatibility in tdb2, we can rename this option to
--enable-tdb2.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>tdb_compat.h: divert every tdb build and includes to tdb_compat</title>
<updated>2011-06-20T09:18:34+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2011-06-20T09:10:25+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=0e4c358e2710580d5aeb439d767c87aaf4c0f2f3'/>
<id>0e4c358e2710580d5aeb439d767c87aaf4c0f2f3</id>
<content type='text'>
We change all the headers and wscript files to use tdb_compat; this
means we have one place to decide whether to use TDB1 or TDB2.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We change all the headers and wscript files to use tdb_compat; this
means we have one place to decide whether to use TDB1 or TDB2.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>lib/tdb_compat: header for tdb1 vs tdb2.</title>
<updated>2011-06-20T09:18:34+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2011-06-20T07:28:15+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=61bf43f5d17c9ac3fc9a36cab74a81f26ac97ccb'/>
<id>61bf43f5d17c9ac3fc9a36cab74a81f26ac97ccb</id>
<content type='text'>
TDB2's API is slightly different from TDB1.  In particular, all functions
return 0 (TDB_SUCCESS) or a negative error number, rather than -1 or tdb_null
and storing the error in tdb_error() (though TDB2 does that as well).

The simplest fix is to replace all the different functions with a wrapper,
and that is done here.

Compatibility functions:

tdb_null: not used as an error return, so not defined by tdb2.
tdb_fetch_compat: TDB1-style data-returning tdb_fetch.
tdb_firstkey_compat: TDB1-style data-returning tdb_firstkey
tdb_nextkey_compat: TDB1-style data-returning tdb_nextkey, with
	TDB2-style free of old key.
tdb_errorstr_compat: TDB1-style tdb_errorstr() which takes TDB instead of ecode.
TDB_CONTEXT: TDB1-style typedef for struct tdb_context.
tdb_open_compat: Simplified open routine which takes log function, sets
	TDB_ALLOW_NESTING as Samba expects, and adds TDB_CLEAR_IF_FIRST support.

Things defined away in TDB2 wrappers:

tdb_traverse_read: TDB2's tdb_traverse only uses read-locks anyway.
tdb_reopen/tdb_reopen_all: TDB2 detects this error itself.
TDB_INCOMPATIBLE_HASH: TDB2 uses the Jenkins hash already.
TDB_VOLATILE: TDB2 shouldn't have freelist scaling issues.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
TDB2's API is slightly different from TDB1.  In particular, all functions
return 0 (TDB_SUCCESS) or a negative error number, rather than -1 or tdb_null
and storing the error in tdb_error() (though TDB2 does that as well).

The simplest fix is to replace all the different functions with a wrapper,
and that is done here.

Compatibility functions:

tdb_null: not used as an error return, so not defined by tdb2.
tdb_fetch_compat: TDB1-style data-returning tdb_fetch.
tdb_firstkey_compat: TDB1-style data-returning tdb_firstkey
tdb_nextkey_compat: TDB1-style data-returning tdb_nextkey, with
	TDB2-style free of old key.
tdb_errorstr_compat: TDB1-style tdb_errorstr() which takes TDB instead of ecode.
TDB_CONTEXT: TDB1-style typedef for struct tdb_context.
tdb_open_compat: Simplified open routine which takes log function, sets
	TDB_ALLOW_NESTING as Samba expects, and adds TDB_CLEAR_IF_FIRST support.

Things defined away in TDB2 wrappers:

tdb_traverse_read: TDB2's tdb_traverse only uses read-locks anyway.
tdb_reopen/tdb_reopen_all: TDB2 detects this error itself.
TDB_INCOMPATIBLE_HASH: TDB2 uses the Jenkins hash already.
TDB_VOLATILE: TDB2 shouldn't have freelist scaling issues.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;

</pre>
</div>
</content>
</entry>
</feed>
