[SCM] Samba Shared Repository - branch master updated

Jelmer Vernooij jelmer at samba.org
Mon Nov 29 16:33:02 MST 2010


The branch, master has been updated
       via  7ab6aa1 samba_dist: Fix dist for subprojects.
       via  05cb5ad samdb: Build as public library.
      from  54a5c39 s4:torture - prefer the termination "return"s at the end of two unittests

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


- Log -----------------------------------------------------------------
commit 7ab6aa157534921aabb8af2bf2c672d85f217b8e
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Nov 29 23:47:00 2010 +0100

    samba_dist: Fix dist for subprojects.
    
    Autobuild-User: Jelmer Vernooij <jelmer at samba.org>
    Autobuild-Date: Tue Nov 30 00:32:41 CET 2010 on sn-devel-104

commit 05cb5ad87c355126b1440c2c603f7de43e41a0a4
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Nov 29 03:05:36 2010 +0100

    samdb: Build as public library.

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

Summary of changes:
 buildtools/wafsamba/samba_dist.py                 |   40 +++++++++++++++-----
 source4/{librpc/dcerpc.pc.in => dsdb/samdb.pc.in} |    7 ++--
 source4/dsdb/wscript_build                        |    3 +-
 3 files changed, 35 insertions(+), 15 deletions(-)
 copy source4/{librpc/dcerpc.pc.in => dsdb/samdb.pc.in} (64%)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_dist.py b/buildtools/wafsamba/samba_dist.py
index b62f256..320a858 100644
--- a/buildtools/wafsamba/samba_dist.py
+++ b/buildtools/wafsamba/samba_dist.py
@@ -71,6 +71,32 @@ def add_tarfile(tar, fname, abspath, basedir):
     fh.close()
 
 
+def vcs_dir_contents(path):
+    """Return the versioned files under a path.
+
+    :return: List of paths relative to path
+    """
+    repo = path
+    while repo != "/":
+        if os.path.isdir(os.path.join(repo, ".git")):
+            ls_files_cmd = [ 'git', 'ls-files', '--full-name',
+                             os.path.relpath(path, repo) ]
+            cwd = None
+            env = dict(os.environ)
+            env["GIT_DIR"] = os.path.join(repo, ".git")
+            break
+        elif os.path.isdir(os.path.join(repo, ".bzr")):
+            ls_files_cmd = [ 'bzr', 'ls', '--recursive',
+                             os.path.relpath(path, repo)]
+            cwd = repo
+            env = None
+            break
+        repo = os.path.dirname(repo)
+    if repo == "/":
+        raise Exception("unsupported or no vcs for %s" % path)
+    return Utils.cmd_output(ls_files_cmd, cwd=cwd, env=env).split()
+
+
 def dist(appname='',version=''):
     if not isinstance(appname, str) or not appname:
         # this copes with a mismatch in the calling arguments for dist()
@@ -103,20 +129,14 @@ def dist(appname='',version=''):
         else:
             destdir = '.'
         absdir = os.path.join(srcdir, dir)
-        if os.path.isdir(os.path.join(absdir, ".git")):
-            ls_files_cmd = [ 'git', 'ls-files', '--full-name', absdir ]
-        elif os.path.isdir(os.path.join(absdir, ".bzr")):
-            ls_files_cmd = [ 'bzr', 'ls', '--from-root', '--recursive', '-d', absdir ]
-        else:
-            Logs.error('unknown or no vcs for %s' % absdir)
-            sys.exit(1)
         try:
-            files = Utils.cmd_output(ls_files_cmd).split()
-        except:
-            Logs.error('command failed: %s' % ' '.join(ls_files_cmd))
+            files = vcs_dir_contents(absdir)
+        except Exception, e:
+            Logs.error('unable to get contents of %s: %s' % (absdir, e))
             sys.exit(1)
         for f in files:
             abspath = os.path.join(srcdir, f)
+
             if dir != '.':
                 f = f[len(dir)+1:]
 
diff --git a/source4/librpc/dcerpc.pc.in b/source4/dsdb/samdb.pc.in
similarity index 64%
copy from source4/librpc/dcerpc.pc.in
copy to source4/dsdb/samdb.pc.in
index 798b8df..1a0b6d9 100644
--- a/source4/librpc/dcerpc.pc.in
+++ b/source4/dsdb/samdb.pc.in
@@ -3,9 +3,8 @@ exec_prefix=@exec_prefix@
 libdir=@libdir@
 includedir=@includedir@
 
-Name: dcerpc
-Description: DCE/RPC client library
-Requires: ndr
+Name: samdb
+Description: Sam Database
 Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -ldcerpc 
+Libs: -L${libdir} -lsamdb
 Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1
diff --git a/source4/dsdb/wscript_build b/source4/dsdb/wscript_build
index 3a09fc4..59ef1b9 100644
--- a/source4/dsdb/wscript_build
+++ b/source4/dsdb/wscript_build
@@ -4,9 +4,10 @@ bld.RECURSE('samdb/ldb_modules')
 
 bld.SAMBA_LIBRARY('samdb',
 	source='samdb/samdb.c samdb/samdb_privilege.c samdb/cracknames.c repl/replicated_objects.c',
+	pc_files='samdb.pc',
 	autoproto='samdb/samdb_proto.h',
-	private_library=True,
 	public_deps='krb5',
+	vnum='0.0.1',
 	deps='ndr NDR_DRSUAPI NDR_DRSBLOBS auth_system_session LIBCLI_AUTH ndr SAMDB_SCHEMA ldbsamba samdb-common LIBCLI_DRSUAPI LIBCLI_LDAP_NDR samba-util com_err authkrb5 credentials ldbwrap',
 	)
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list