[SCM] Samba Shared Repository - branch master updated

Andrew Tridgell tridge at samba.org
Tue Feb 22 17:30:02 MST 2011


The branch, master has been updated
       via  5f6790b build: duplicate symbols between system libraries aren't interesting
       via  3b68482 s3-waf: added SYMBOLCHECK support to source3 waf build
       via  3c12c4c build: move idtree.c into samba-util-common
       via  9174d73 build: moved more files into samba-util-common
       via  457025e build: created samba-util-common library
      from  9652cce Make lpcfg_server_role public.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 5f6790bc74beab4ea9cd1de014ada21840cb8c3b
Author: Andrew Tridgell <tridge at samba.org>
Date:   Wed Feb 23 10:20:15 2011 +1100

    build: duplicate symbols between system libraries aren't interesting
    
    we expect dups in libpthread, libc and libattr
    
    Autobuild-User: Andrew Tridgell <tridge at samba.org>
    Autobuild-Date: Wed Feb 23 01:29:38 CET 2011 on sn-devel-104

commit 3b684824c1b7130b8723226e65fabaf5df47ca09
Author: Andrew Tridgell <tridge at samba.org>
Date:   Wed Feb 23 10:08:12 2011 +1100

    s3-waf: added SYMBOLCHECK support to source3 waf build

commit 3c12c4c1a413e74d0a0b21b7d400b22ba1d454b8
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Feb 22 15:48:50 2011 +1100

    build: move idtree.c into samba-util-common

commit 9174d731738927c9b999399c72172ede821015a3
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Feb 22 14:33:06 2011 +1100

    build: moved more files into samba-util-common
    
    this removes UTIL_SRC from the s3 waf build, as it is now all in
    common with samba-util-common

commit 457025eee75591e6e468c2ade1b63feb92deb85a
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Feb 22 14:10:38 2011 +1100

    build: created samba-util-common library
    
    this library will contain files that can be built in common between s3
    and s4. Both samba-util and samba-util3 depend on it.
    
    Currently this library needs to be marked as allow_undefined_symbols,
    in order to allow s4 to build it. We can remove that flag once we have
    all the needed symbols in common
    
    Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 buildtools/wafsamba/symbols.py |   10 ++++++++
 lib/util/wscript_build         |   48 +++++++++++++++------------------------
 source3/wscript_build          |   30 +++---------------------
 3 files changed, 33 insertions(+), 55 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/symbols.py b/buildtools/wafsamba/symbols.py
index 4f4b303..0408d61 100644
--- a/buildtools/wafsamba/symbols.py
+++ b/buildtools/wafsamba/symbols.py
@@ -449,11 +449,21 @@ def symbols_dupcheck(task):
     bld = task.env.bld
     tgt_list = get_tgt_list(bld)
 
+    targets = LOCAL_CACHE(bld, 'TARGET_TYPE')
+
     Logs.info("Checking for duplicate symbols")
     for sym in bld.env.symbol_map:
         subsystems = bld.env.symbol_map[sym]
         if len(subsystems) == 1:
             continue
+        # if all of them are in system libraries, we can ignore them. This copes
+        # with the duplication between libc, libpthread and libattr
+        all_syslib = True
+        for s in subsystems:
+            if s != 'c' and (not s in targets or targets[s] != 'SYSLIB'):
+                all_syslib = False
+        if all_syslib:
+            continue
         Logs.info("symbol %s appears in %s" % (sym, subsystems))
 
 
diff --git a/lib/util/wscript_build b/lib/util/wscript_build
index dfb5623..e472ff7 100644
--- a/lib/util/wscript_build
+++ b/lib/util/wscript_build
@@ -1,37 +1,27 @@
 #!/usr/bin/env python
 
+# as we move files into common between samba-util and samba-util3, move them here.
+# Both samba-util and samba-util3 depend on this private library
+bld.SAMBA_LIBRARY('samba-util-common',
+                  source='''talloc_stack.c smb_threads.c xfile.c
+                  util_file.c time.c rbtree.c rfc1738.c select.c
+                  genrand.c fsusage.c blocking.c become_daemon.c
+                  data_blob.c signal.c system.c params.c util.c util_id.c util_net.c
+                  util_strlist.c idtree.c''',
+                  public_deps='talloc pthread',
+                  # until we get all the dependencies in this library in common
+                  # we need to allow this library to be built with unresolved symbols
+                  allow_undefined_symbols=True,
+                  local_include=False,
+                  private_library=True
+                  )
+
 if bld.env._SAMBA_BUILD_ == 4:
     bld.SAMBA_LIBRARY('samba-util',
-                      source='''
-                      become_daemon.c
-                      blocking.c
-                      data_blob.c
-                      debug.c
-                      dprintf.c
-                      fault.c
-                      fsusage.c
-                      genrand.c
-                      idtree.c
-                      ms_fnmatch.c
-                      params.c
-                      parmlist.c
-                      rbtree.c
-                      rfc1738.c
-                      select.c
-                      signal.c
-                      smb_threads.c
-                      substitute.c
-                      system.c
-                      talloc_stack.c
-                      time.c
-                      util.c
-                      util_file.c
-                      util_id.c
-                      util_net.c
-                      util_str.c
-                      util_strlist.c
-                      xfile.c
+                      source='''debug.c dprintf.c fault.c
+                      ms_fnmatch.c parmlist.c substitute.c util_str.c
                       ''',
+                      deps='samba-util-common',
                       public_deps='talloc LIBCRYPTO CHARSET execinfo uid_wrapper',
                       public_headers='attr.h byteorder.h data_blob.h debug.h memory.h safe_string.h time.h talloc_stack.h xfile.h dlinklist.h util.h',
                       header_path= [ ('dlinklist.h util.h', '.'), ('*', 'util') ],
diff --git a/source3/wscript_build b/source3/wscript_build
index 0d82cb4..06c55c7 100644
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -51,29 +51,6 @@ LIBREPLACE_SRC = '''${LIBREPLACE_SRCS}'''
 
 LIBSAMBAUTIL_SRC = '''${LIBREPLACE_SRC}'''
 
-UTIL_SRC = '''
-	../lib/util/become_daemon.c
-	../lib/util/blocking.c
-	../lib/util/data_blob.c
-	../lib/util/fsusage.c
-	../lib/util/genrand.c
-	../lib/util/params.c
-	../lib/util/rbtree.c
-	../lib/util/rfc1738.c
-	../lib/util/select.c
-	../lib/util/signal.c
-	../lib/util/smb_threads.c
-	../lib/util/system.c
-	../lib/util/talloc_stack.c
-	../lib/util/time.c
-	../lib/util/util.c
-	../lib/util/util_file.c
-	../lib/util/util_id.c
-	../lib/util/util_net.c
-	../lib/util/util_strlist.c
-	../lib/util/xfile.c
-	'''
-
 LIBTEVENT_SRC0 = ''
 
 PTHREADPOOL_SRC = ''
@@ -1007,9 +984,8 @@ bld.SAMBA3_SUBSYSTEM('CHARSET3',
                     deps='DYNCONFIG')
 
 bld.SAMBA3_SUBSYSTEM('samba-util3',
-                    source=UTIL_SRC,
-                    deps='talloc CHARSET3 LIBCRYPTO',
-                    vars=locals())
+                    source='',
+                    deps='talloc CHARSET3 LIBCRYPTO samba-util-common')
 
 bld.SAMBA3_SUBSYSTEM('ldb3',
                     source='lib/ldb_compat.c')
@@ -1424,3 +1400,5 @@ bld.RECURSE('winbindd')
 
 bld.ENFORCE_GROUP_ORDERING()
 bld.CHECK_PROJECT_RULES()
+
+bld.SYMBOL_CHECK()


-- 
Samba Shared Repository


More information about the samba-cvs mailing list