ldb_mdb: Remove implicit read lock and remove transaction counter
[samba.git] / lib / ldb / wscript
1 #!/usr/bin/env python
2
3 APPNAME = 'ldb'
4 VERSION = '1.3.2'
5
6 blddir = 'bin'
7
8 import sys, os
9 import Logs
10
11 # find the buildtools directory
12 srcdir = '.'
13 while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
14     srcdir = srcdir + '/..'
15 sys.path.insert(0, srcdir + '/buildtools/wafsamba')
16
17 import wafsamba, samba_dist, Utils, Options
18
19 samba_dist.DIST_DIRS('''lib/ldb:. lib/replace:lib/replace lib/talloc:lib/talloc
20                         lib/tdb:lib/tdb lib/tdb:lib/tdb lib/tevent:lib/tevent
21                         third_party/popt:third_party/popt
22                         third_party/cmocka:third_party/cmocka
23                         buildtools:buildtools third_party/waf:third_party/waf''')
24
25 samba_dist.DIST_FILES('''lib/util/binsearch.h:lib/util/binsearch.h''')
26
27 def set_options(opt):
28     opt.BUILTIN_DEFAULT('replace')
29     opt.PRIVATE_EXTENSION_DEFAULT('ldb', noextension='ldb')
30     opt.RECURSE('lib/tdb')
31     opt.RECURSE('lib/tevent')
32     opt.RECURSE('lib/replace')
33     opt.tool_options('python') # options for disabling pyc or pyo compilation
34
35     opt.add_option('--without-ldb-lmdb',
36                    help='disable new LMDB backend for LDB',
37                    action='store_true', dest='without_ldb_lmdb', default=False)
38
39
40 def configure(conf):
41     conf.RECURSE('lib/tdb')
42     conf.RECURSE('lib/tevent')
43
44     if conf.CHECK_FOR_THIRD_PARTY():
45         conf.RECURSE('third_party/popt')
46         conf.RECURSE('third_party/cmocka')
47     else:
48         if not conf.CHECK_POPT():
49             raise Utils.WafError('popt development packages have not been found.\nIf third_party is installed, check that it is in the proper place.')
50         else:
51             conf.define('USING_SYSTEM_POPT', 1)
52
53         if not conf.CHECK_CMOCKA():
54             raise Utils.WafError('cmocka development package have not been found.\nIf third_party is installed, check that it is in the proper place.')
55         else:
56             conf.define('USING_SYSTEM_CMOCKA', 1)
57
58     conf.RECURSE('lib/replace')
59     conf.find_program('python', var='PYTHON')
60     conf.find_program('xsltproc', var='XSLTPROC')
61     conf.check_tool('python')
62     conf.check_python_version((2,4,2))
63     conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=not conf.env.disable_python)
64
65     # where does the default LIBDIR end up? in conf.env somewhere?
66     #
67     conf.CONFIG_PATH('LDB_MODULESDIR', conf.SUBST_ENV_VAR('MODULESDIR') + '/ldb')
68
69     conf.env.standalone_ldb = conf.IN_LAUNCH_DIR()
70
71     if not conf.env.standalone_ldb:
72         if conf.env.disable_python:
73             if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb', minversion=VERSION,
74                                          onlyif='talloc tdb tevent',
75                                          implied_deps='replace talloc tdb tevent'):
76                 conf.define('USING_SYSTEM_LDB', 1)
77         else:
78             using_system_pyldb_util = True
79             if not conf.CHECK_BUNDLED_SYSTEM_PKG('pyldb-util', minversion=VERSION,
80                                              onlyif='talloc tdb tevent',
81                                              implied_deps='replace talloc tdb tevent ldb'):
82                 using_system_pyldb_util = False
83
84             # We need to get a pyldb-util for all the python versions
85             # we are building for
86             if conf.env['EXTRA_PYTHON']:
87                 name = 'pyldb-util' + conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG']
88                 if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION,
89                                                      onlyif='talloc tdb tevent',
90                                                      implied_deps='replace talloc tdb tevent ldb'):
91                     using_system_pyldb_util = False
92
93             if using_system_pyldb_util:
94                 conf.define('USING_SYSTEM_PYLDB_UTIL', 1)
95
96             if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb', minversion=VERSION,
97                                          onlyif='talloc tdb tevent pyldb-util',
98                                          implied_deps='replace talloc tdb tevent'):
99                 conf.define('USING_SYSTEM_LDB', 1)
100
101     if not conf.CHECK_CODE('return !(sizeof(size_t) >= 8)',
102                            "HAVE_64_BIT_SIZE_T_FOR_LMDB",
103                            execute=True,
104                            msg='Checking for a 64-bit host to '
105                            'support lmdb'):
106         Logs.warn("--without-ldb-lmdb implied as this "
107                   "host is not 64-bit")
108
109         if not conf.env.standalone_ldb and \
110            not Options.options.without_ad_dc and \
111            conf.CONFIG_GET('ENABLE_SELFTEST'):
112             Logs.warn("NOTE: Some AD DC parts of selftest will fail")
113
114         conf.env.REQUIRE_LMDB = False
115     else:
116         if conf.env.standalone_ldb:
117             if Options.options.without_ldb_lmdb:
118                 conf.env.REQUIRE_LMDB = False
119             else:
120                 conf.env.REQUIRE_LMDB = True
121         elif Options.options.without_ad_dc:
122             conf.env.REQUIRE_LMDB = False
123         else:
124             if Options.options.without_ldb_lmdb:
125                 if not Options.options.without_ad_dc and \
126                    conf.CONFIG_GET('ENABLE_SELFTEST'):
127                     raise Utils.WafError('--without-ldb-lmdb conflicts '
128                                          'with --enable-selftest while '
129                                          'building the AD DC')
130
131                 conf.env.REQUIRE_LMDB = False
132             else:
133                 conf.env.REQUIRE_LMDB = True
134
135
136     if conf.CONFIG_SET('USING_SYSTEM_LDB'):
137         v = VERSION.split('.')
138         conf.DEFINE('EXPECTED_SYSTEM_LDB_VERSION_MAJOR', int(v[0]))
139         conf.DEFINE('EXPECTED_SYSTEM_LDB_VERSION_MINOR', int(v[1]))
140         conf.DEFINE('EXPECTED_SYSTEM_LDB_VERSION_RELEASE', int(v[2]))
141
142     if conf.env.standalone_ldb:
143         conf.CHECK_XSLTPROC_MANPAGES()
144
145         # we need this for the ldap backend
146         if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
147             conf.env.ENABLE_LDAP_BACKEND = True
148
149         # we don't want any libraries or modules to rely on runtime
150         # resolution of symbols
151         if not sys.platform.startswith("openbsd"):
152             conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
153
154     # if lmdb support is enabled then we require lmdb
155     # is present, build the mdb back end and enable lmdb support in
156     # the tools.
157     if conf.env.REQUIRE_LMDB and \
158        not conf.CONFIG_SET('USING_SYSTEM_LDB'):
159         if not conf.CHECK_CFG(package='lmdb',
160                               args='"lmdb >= 0.9.16" --cflags --libs',
161                               msg='Checking for lmdb >= 0.9.16',
162                               mandatory=False):
163             if not conf.CHECK_CODE('''
164                     #if MDB_VERSION_MAJOR == 0 \
165                       && MDB_VERSION_MINOR <= 9 \
166                       && MDB_VERSION_PATCH < 16
167                     #error LMDB too old
168                     #endif
169                     ''',
170                     'HAVE_GOOD_LMDB_VERSION',
171                     headers='lmdb.h',
172                     msg='Checking for lmdb >= 0.9.16 via header check'):
173
174                 if conf.env.standalone_ldb:
175                     raise Utils.WafError('ldb build (unless --without-ldb-lmdb) '
176                                          'requires '
177                                          'lmdb 0.9.16 or later')
178                 elif not Options.options.without_ad_dc:
179                     raise Utils.WafError('Samba AD DC and --enable-selftest '
180                                          'requires '
181                                          'lmdb 0.9.16 or later')
182
183         if conf.CHECK_FUNCS_IN('mdb_env_create', 'lmdb', headers='lmdb.h'):
184             conf.DEFINE('HAVE_LMDB', '1')
185
186
187     conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
188
189     conf.SAMBA_CONFIG_H()
190
191     conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS()
192
193 def build(bld):
194     bld.RECURSE('lib/tevent')
195
196     if bld.CHECK_FOR_THIRD_PARTY():
197         bld.RECURSE('third_party/popt')
198         bld.RECURSE('third_party/cmocka')
199
200     bld.RECURSE('lib/replace')
201     bld.RECURSE('lib/tdb')
202
203     if bld.env.standalone_ldb:
204         private_library = False
205     else:
206         private_library = True
207
208     LDB_MAP_SRC = bld.SUBDIR('ldb_map',
209                              'ldb_map.c ldb_map_inbound.c ldb_map_outbound.c')
210
211     COMMON_SRC = bld.SUBDIR('common',
212                             '''ldb_modules.c ldb_ldif.c ldb_parse.c ldb_msg.c ldb_utf8.c
213                             ldb_debug.c ldb_dn.c ldb_match.c ldb_options.c ldb_pack.c
214                             ldb_attributes.c attrib_handlers.c ldb_controls.c qsort.c''')
215
216     bld.SAMBA_MODULE('ldb_ldap', 'ldb_ldap/ldb_ldap.c',
217                      init_function='ldb_ldap_init',
218                      module_init_name='ldb_init_module',
219                      deps='talloc lber ldap ldb',
220                      enabled=bld.env.ENABLE_LDAP_BACKEND,
221                      internal_module=False,
222                      subsystem='ldb')
223
224     if bld.PYTHON_BUILD_IS_ENABLED():
225         if not bld.CONFIG_SET('USING_SYSTEM_PYLDB_UTIL'):
226             for env in bld.gen_python_environments(['PKGCONFIGDIR']):
227                 # we're not currently linking against the ldap libs, but ldb.pc.in
228                 # has @LDAP_LIBS@
229                 bld.env.LDAP_LIBS = ''
230
231                 if not 'PACKAGE_VERSION' in bld.env:
232                     bld.env.PACKAGE_VERSION = VERSION
233                     bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
234
235                 name = bld.pyembed_libname('pyldb-util')
236                 bld.SAMBA_LIBRARY(name,
237                                   deps='ldb',
238                                   source='pyldb_util.c',
239                                   public_headers=('' if private_library else 'pyldb.h'),
240                                   public_headers_install=not private_library,
241                                   vnum=VERSION,
242                                   private_library=private_library,
243                                   pc_files='pyldb-util.pc',
244                                   pyembed=True,
245                                   enabled=bld.PYTHON_BUILD_IS_ENABLED(),
246                                   abi_directory='ABI',
247                                   abi_match='pyldb_*')
248
249                 if not bld.CONFIG_SET('USING_SYSTEM_LDB'):
250                     bld.SAMBA_PYTHON('pyldb', 'pyldb.c',
251                                      deps='ldb ' + name,
252                                      realname='ldb.so',
253                                      cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION)
254
255         # Do only install this file as part of the Samba build if we do not
256         # use the system libldb!
257         if not bld.CONFIG_SET('USING_SYSTEM_PYLDB_UTIL'):
258             for env in bld.gen_python_environments(['PKGCONFIGDIR']):
259                     bld.SAMBA_SCRIPT('_ldb_text.py',
260                                      pattern='_ldb_text.py',
261                                      installdir='python')
262
263                     bld.INSTALL_FILES('${PYTHONARCHDIR}', '_ldb_text.py')
264
265     if not bld.CONFIG_SET('USING_SYSTEM_LDB'):
266         if bld.is_install:
267             modules_dir = bld.EXPAND_VARIABLES('${LDB_MODULESDIR}')
268         else:
269             # when we run from the source directory, we want to use
270             # the current modules, not the installed ones
271             modules_dir = os.path.join(os.getcwd(), 'bin/modules/ldb')
272
273         abi_match = '!ldb_*module_ops !ldb_*backend_ops ldb_*'
274
275         ldb_headers = ('include/ldb.h include/ldb_errors.h '
276                        'include/ldb_module.h include/ldb_handlers.h')
277
278         bld.SAMBA_LIBRARY('ldb',
279                           COMMON_SRC + ' ' + LDB_MAP_SRC,
280                           deps='tevent LIBLDB_MAIN replace',
281                           includes='include',
282                           public_headers=('' if private_library else ldb_headers),
283                           public_headers_install=not private_library,
284                           pc_files='ldb.pc',
285                           vnum=VERSION,
286                           private_library=private_library,
287                           manpages='man/ldb.3',
288                           abi_directory='ABI',
289                           abi_match = abi_match)
290
291         # generate a include/ldb_version.h
292         def generate_ldb_version_h(t):
293             '''generate a vscript file for our public libraries'''
294
295             tgt = t.outputs[0].bldpath(t.env)
296
297             v = t.env.LDB_VERSION.split('.')
298
299             f = open(tgt, mode='w')
300             try:
301                 f.write('#define LDB_VERSION "%s"\n' % t.env.LDB_VERSION)
302                 f.write('#define LDB_VERSION_MAJOR %d\n' % int(v[0]))
303                 f.write('#define LDB_VERSION_MINOR %d\n' % int(v[1]))
304                 f.write('#define LDB_VERSION_RELEASE %d\n' % int(v[2]))
305             finally:
306                 f.close()
307             return
308         t = bld.SAMBA_GENERATOR('ldb_version.h',
309                                 rule=generate_ldb_version_h,
310                                 dep_vars=['LDB_VERSION'],
311                                 target='include/ldb_version.h',
312                                 public_headers='include/ldb_version.h',
313                                 public_headers_install=not private_library)
314         t.env.LDB_VERSION = VERSION
315
316
317         bld.SAMBA_MODULE('ldb_paged_results',
318                          'modules/paged_results.c',
319                          init_function='ldb_paged_results_init',
320                          module_init_name='ldb_init_module',
321                          internal_module=False,
322                          deps='ldb',
323                          subsystem='ldb')
324
325         bld.SAMBA_MODULE('ldb_asq',
326                          'modules/asq.c',
327                          init_function='ldb_asq_init',
328                          module_init_name='ldb_init_module',
329                          internal_module=False,
330                          deps='ldb',
331                          subsystem='ldb')
332
333         bld.SAMBA_MODULE('ldb_server_sort',
334                          'modules/sort.c',
335                          init_function='ldb_server_sort_init',
336                          internal_module=False,
337                          module_init_name='ldb_init_module',
338                          deps='ldb',
339                          subsystem='ldb')
340
341         bld.SAMBA_MODULE('ldb_paged_searches',
342                          'modules/paged_searches.c',
343                          init_function='ldb_paged_searches_init',
344                          internal_module=False,
345                          module_init_name='ldb_init_module',
346                          deps='ldb',
347                          subsystem='ldb')
348
349         bld.SAMBA_MODULE('ldb_rdn_name',
350                          'modules/rdn_name.c',
351                          init_function='ldb_rdn_name_init',
352                          internal_module=False,
353                          module_init_name='ldb_init_module',
354                          deps='ldb',
355                          subsystem='ldb')
356
357         bld.SAMBA_MODULE('ldb_sample',
358                          'tests/sample_module.c',
359                          init_function='ldb_sample_init',
360                          internal_module=False,
361                          module_init_name='ldb_init_module',
362                          deps='ldb',
363                          subsystem='ldb')
364
365         bld.SAMBA_MODULE('ldb_skel',
366                          'modules/skel.c',
367                          init_function='ldb_skel_init',
368                          internal_module=False,
369                          module_init_name='ldb_init_module',
370                          deps='ldb',
371                          subsystem='ldb')
372
373         bld.SAMBA_MODULE('ldb_sqlite3',
374                          'sqlite3/ldb_sqlite3.c',
375                          init_function='ldb_sqlite3_init',
376                          internal_module=False,
377                          module_init_name='ldb_init_module',
378                          enabled=False,
379                          deps='ldb',
380                          subsystem='ldb')
381
382         bld.SAMBA_MODULE('ldb_tdb',
383                          bld.SUBDIR('ldb_tdb',
384                                     '''ldb_tdb_init.c'''),
385                          init_function='ldb_tdb_init',
386                          module_init_name='ldb_init_module',
387                          internal_module=False,
388                          deps='tdb ldb ldb_key_value',
389                          subsystem='ldb')
390
391         bld.SAMBA_LIBRARY('ldb_key_value',
392                           bld.SUBDIR('ldb_tdb',
393                                     '''ldb_tdb.c ldb_search.c ldb_index.c
394                                     ldb_cache.c ldb_tdb_wrap.c'''),
395                           private_library=True,
396                           deps='tdb ldb')
397
398         if bld.CONFIG_SET('HAVE_LMDB'):
399             bld.SAMBA_MODULE('ldb_mdb',
400                              bld.SUBDIR('ldb_mdb',
401                                         '''ldb_mdb_init.c'''),
402                              init_function='ldb_mdb_init',
403                              module_init_name='ldb_init_module',
404                              internal_module=False,
405                              deps='ldb ldb_key_value ldb_mdb_int',
406                              subsystem='ldb')
407
408             bld.SAMBA_LIBRARY('ldb_mdb_int',
409                               bld.SUBDIR('ldb_mdb',
410                                          '''ldb_mdb.c '''),
411                               private_library=True,
412                               deps='ldb lmdb ldb_key_value')
413             lmdb_deps = ' ldb_mdb_int'
414         else:
415             lmdb_deps = ''
416
417
418         bld.SAMBA_MODULE('ldb_ldb',
419                          bld.SUBDIR('ldb_ldb',
420                                     '''ldb_ldb.c'''),
421                          init_function='ldb_ldb_init',
422                          module_init_name='ldb_init_module',
423                          internal_module=False,
424                          deps='ldb ldb_key_value' + lmdb_deps,
425                          subsystem='ldb')
426
427         # have a separate subsystem for common/ldb.c, so it can rebuild
428         # for install with a different -DLDB_MODULESDIR=
429         bld.SAMBA_SUBSYSTEM('LIBLDB_MAIN',
430                             'common/ldb.c',
431                             deps='tevent tdb',
432                             includes='include',
433                             cflags=['-DLDB_MODULESDIR=\"%s\"' % modules_dir])
434
435         LDB_TOOLS='ldbadd ldbsearch ldbdel ldbmodify ldbedit ldbrename'
436         for t in LDB_TOOLS.split():
437             bld.SAMBA_BINARY(t, 'tools/%s.c' % t, deps='ldb-cmdline ldb',
438                              manpages='man/%s.1' % t)
439
440         # ldbtest doesn't get installed
441         bld.SAMBA_BINARY('ldbtest', 'tools/ldbtest.c', deps='ldb-cmdline ldb',
442                          install=False)
443
444         if bld.CONFIG_SET('HAVE_LMDB'):
445             lmdb_deps = ' lmdb'
446         else:
447             lmdb_deps = ''
448         # ldbdump doesn't get installed
449         bld.SAMBA_BINARY('ldbdump',
450                          'tools/ldbdump.c',
451                          deps='ldb-cmdline ldb' + lmdb_deps,
452                          install=False)
453
454         bld.SAMBA_LIBRARY('ldb-cmdline',
455                           source='tools/ldbutil.c tools/cmdline.c',
456                           deps='ldb dl popt',
457                           private_library=True)
458
459         bld.SAMBA_BINARY('ldb_tdb_mod_op_test',
460                          source='tests/ldb_mod_op_test.c',
461                          cflags='-DTEST_BE=\"tdb\"',
462                          deps='cmocka ldb',
463                          install=False)
464
465         bld.SAMBA_BINARY('ldb_tdb_guid_mod_op_test',
466                          source='tests/ldb_mod_op_test.c',
467                          cflags='-DTEST_BE=\"tdb\" -DGUID_IDX=1',
468                          deps='cmocka ldb',
469                          install=False)
470
471         bld.SAMBA_BINARY('ldb_tdb_kv_ops_test',
472                          source='tests/ldb_kv_ops_test.c',
473                          cflags='-DTEST_BE=\"tdb\"',
474                          deps='cmocka ldb',
475                          install=False)
476
477         bld.SAMBA_BINARY('ldb_tdb_test',
478                          source='tests/ldb_tdb_test.c',
479                          deps='cmocka ldb',
480                          install=False)
481
482         bld.SAMBA_BINARY('ldb_msg_test',
483                          source='tests/ldb_msg.c',
484                          deps='cmocka ldb',
485                          install=False)
486
487         bld.SAMBA_BINARY('test_ldb_qsort',
488                          source='tests/test_ldb_qsort.c',
489                          deps='cmocka ldb',
490                          install=False)
491
492         if bld.CONFIG_SET('HAVE_LMDB'):
493             bld.SAMBA_BINARY('ldb_mdb_mod_op_test',
494                              source='tests/ldb_mod_op_test.c',
495                              cflags='-DTEST_BE=\"mdb\" -DGUID_IDX=1 '
496                                   + '-DTEST_LMDB=1',
497                              deps='cmocka ldb lmdb',
498                              install=False)
499
500             bld.SAMBA_BINARY('ldb_lmdb_test',
501                              source='tests/ldb_lmdb_test.c',
502                              deps='cmocka ldb',
503                              install=False)
504
505             bld.SAMBA_BINARY('ldb_lmdb_size_test',
506                              source='tests/ldb_lmdb_size_test.c',
507                              deps='cmocka ldb',
508                              install=False)
509
510             bld.SAMBA_BINARY('ldb_mdb_kv_ops_test',
511                              source='tests/ldb_kv_ops_test.c',
512                              cflags='-DTEST_BE=\"mdb\"',
513                              deps='cmocka ldb',
514                              install=False)
515
516 def test(ctx):
517     '''run ldb testsuite'''
518     import Utils, samba_utils, shutil
519     env = samba_utils.LOAD_ENVIRONMENT()
520     ctx.env = env
521
522     if not env.HAVE_LMDB:
523         raise Utils.WafError('make test called, but ldb was built '
524                              '--without-ldb-lmdb')
525
526     test_prefix = "%s/st" % (Utils.g_module.blddir)
527     shutil.rmtree(test_prefix, ignore_errors=True)
528     os.makedirs(test_prefix)
529     os.environ['TEST_DATA_PREFIX'] = test_prefix
530     os.environ['LDB_MODULES_PATH'] = Utils.g_module.blddir + "/modules/ldb"
531     samba_utils.ADD_LD_LIBRARY_PATH('bin/shared')
532     samba_utils.ADD_LD_LIBRARY_PATH('bin/shared/private')
533
534     cmd = 'tests/test-tdb.sh %s' % Utils.g_module.blddir
535     ret = samba_utils.RUN_COMMAND(cmd)
536     print("testsuite returned %d" % ret)
537
538     tmp_dir = os.path.join(test_prefix, 'tmp')
539     if not os.path.exists(tmp_dir):
540         os.mkdir(tmp_dir)
541     pyret = samba_utils.RUN_PYTHON_TESTS(
542         ['tests/python/api.py', 'tests/python/index.py'],
543         extra_env={'SELFTEST_PREFIX': test_prefix})
544     print("Python testsuite returned %d" % pyret)
545
546     cmocka_ret = 0
547     test_exes = ['test_ldb_qsort',
548                  'ldb_msg_test',
549                  'ldb_tdb_mod_op_test',
550                  'ldb_tdb_guid_mod_op_test',
551                  'ldb_msg_test',
552                  'ldb_tdb_kv_ops_test',
553                  'ldb_tdb_test',
554                  'ldb_mdb_mod_op_test',
555                  'ldb_lmdb_test',
556                  # we don't want to run ldb_lmdb_size_test (which proves we can
557                  # fit > 4G of data into the DB), it would fill up the disk on
558                  # many of our test instances
559                  'ldb_mdb_kv_ops_test']
560
561     for test_exe in test_exes:
562             cmd = os.path.join(Utils.g_module.blddir, test_exe)
563             cmocka_ret = cmocka_ret or samba_utils.RUN_COMMAND(cmd)
564
565     sys.exit(ret or pyret or cmocka_ret)
566
567 def dist():
568     '''makes a tarball for distribution'''
569     samba_dist.dist()
570
571 def reconfigure(ctx):
572     '''reconfigure if config scripts have changed'''
573     import samba_utils
574     samba_utils.reconfigure(ctx)