[SCM] Samba Shared Repository - branch master updated

Simo Sorce idra at samba.org
Wed Oct 14 09:03:39 MDT 2009


The branch, master has been updated
       via  6618a06... talloc: Fix exports and increment talloc version
       via  8fb483b... talloc: Make abi checks in release script
       via  8e6df56... talloc: Move release script under /script too
       via  2d6d6bc... talloc: Change the way mksysms work
      from  0753035... s3-passdb: missed two prototypes while moving to enum netr_SchannelType.

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


- Log -----------------------------------------------------------------
commit 6618a062a19660a718074f6e6155339451b7a5b6
Author: Simo Sorce <idra at samba.org>
Date:   Wed Oct 14 10:50:19 2009 -0400

    talloc: Fix exports and increment talloc version

commit 8fb483b2964f1222c013df42ba8be544269da612
Author: Simo Sorce <idra at samba.org>
Date:   Wed Oct 14 10:57:17 2009 -0400

    talloc: Make abi checks in release script
    
    Make always sure the exports and signature files are up to date before
    shipping a release.

commit 8e6df560b74d7e9b94dd47625de56bc1dc0bc6d7
Author: Simo Sorce <idra at samba.org>
Date:   Wed Oct 14 10:55:11 2009 -0400

    talloc: Move release script under /script too

commit 2d6d6bcb5de87ce0dbce13ff6bc775b953438b75
Author: Simo Sorce <idra at samba.org>
Date:   Wed Oct 14 10:20:28 2009 -0400

    talloc: Change the way mksysms work
    
    Make sure we always have a sorted (per file) export file.
    This way we can directly compare the real export and the check file w/o having
    to further sort things.
    
    Also return error code from abi_checks.sh if warnings were reported

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

Summary of changes:
 lib/talloc/configure.ac                   |    2 +-
 lib/talloc/script/abi_checks.sh           |   27 ++++-----------
 lib/talloc/script/mksyms.awk              |   19 ++---------
 lib/talloc/script/mksyms.sh               |   19 ++++++++++-
 lib/talloc/{ => script}/release-script.sh |   10 ++++++
 lib/talloc/talloc.exports                 |   24 +++++++------
 lib/talloc/talloc.signatures              |   51 +++++++++++++++--------------
 7 files changed, 79 insertions(+), 73 deletions(-)
 rename lib/talloc/{ => script}/release-script.sh (84%)


Changeset truncated at 500 lines:

diff --git a/lib/talloc/configure.ac b/lib/talloc/configure.ac
index a169f79..c1b1d2e 100644
--- a/lib/talloc/configure.ac
+++ b/lib/talloc/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ(2.50)
-AC_INIT(talloc, 2.0.0)
+AC_INIT(talloc, 2.0.1)
 AC_CONFIG_SRCDIR([talloc.c])
 AC_SUBST(datarootdir)
 AC_CONFIG_HEADER(config.h)
diff --git a/lib/talloc/script/abi_checks.sh b/lib/talloc/script/abi_checks.sh
index ba60ed0..66c4e60 100755
--- a/lib/talloc/script/abi_checks.sh
+++ b/lib/talloc/script/abi_checks.sh
@@ -33,6 +33,7 @@ LANG=C; export LANG
 LC_ALL=C; export LC_ALL
 LC_COLLATE=C; export LC_COLLATE
 
+exit_status=0
 script=$0
 dir_name=$(dirname ${script})
 
@@ -58,34 +59,22 @@ signatures_file_check=${signatures_file}.check
 
 
 ${dir_name}/mksyms.sh awk ${exports_file_check} ${headers} 2>&1 > /dev/null
+cat ${headers} | ${dir_name}/mksigs.pl | sort| uniq > ${signatures_file_check} 2> /dev/null
 
-cat ${headers} | ${dir_name}/mksigs.pl > ${signatures_file_check} 2> /dev/null
-
-normalize_exports_file() {
-	filename=$1
-	cat ${filename} \
-	| sed -e 's/^[ \t]*//g' \
-	| sed -e 's/^$//g' \
-	| sed -e 's/^#.*$//g' \
-	| sort | uniq > ${filename}.sort
-}
-
-normalize_exports_file ${exports_file}
-normalize_exports_file ${exports_file_check}
-
-normalize_exports_file ${signatures_file}
-normalize_exports_file ${signatures_file_check}
-
-diff -u ${exports_file}.sort ${exports_file_check}.sort
+diff -u ${exports_file} ${exports_file_check}
 if test "x$?" != "x0" ; then
 	echo "WARNING: possible ABI change detected in exports!"
+	let exit_status++
 else
 	echo "exports check: OK"
 fi
 
-diff -u ${signatures_file}.sort ${signatures_file_check}.sort
+diff -u ${signatures_file} ${signatures_file_check}
 if test "x$?" != "x0" ; then
 	echo "WARNING: possible ABI change detected in signatures!"
+	let exit_status++
 else
 	echo "signatures check: OK"
 fi
+
+exit $exit_status
diff --git a/lib/talloc/script/mksyms.awk b/lib/talloc/script/mksyms.awk
index ca14da0..8775faf 100644
--- a/lib/talloc/script/mksyms.awk
+++ b/lib/talloc/script/mksyms.awk
@@ -8,25 +8,12 @@
 #
 BEGIN {
 	inheader=0;
-	current_file="";
-	print "#"
-	print "# This file is automatically generated with \"make symbols\". DO NOT EDIT "
-	print "#"
-	print "{"
-	print "\tglobal:"
 }
 
 END {
-	print""
-	print "\tlocal: *;"
-	print "};"
 }
 
 {
-	if (FILENAME!=current_file) {
-		print "\t\t# The following definitions come from",FILENAME
-		current_file=FILENAME
-	}
 	if (inheader) {
 		if (match($0,"[)][^()]*[;][ \t]*$")) {
 			inheader = 0;
@@ -42,7 +29,7 @@ END {
 /^extern[ \t]+[^()]+[;][ \t]*$/ {
 	gsub(/[^ \t]+[ \t]+/, "");
 	sub(/[;][ \t]*$/, "");
-	printf "\t\t%s;\n", $0;
+	printf "           %s;\n", $0;
 	next;
 }
 
@@ -61,7 +48,7 @@ END {
 	sub(/[(].*$/, "");
 	gsub(/[^ \t]+[ \t]+/, "");
 	gsub(/^[*]+/, "");
-	printf "\t\t%s;\n",$0;
+	printf "           %s;\n",$0;
 	next;
 }
 
@@ -70,7 +57,7 @@ END {
 	sub(/[(].*$/, "");
 	gsub(/[^ \t]+[ \t]+/, "");
 	gsub(/^[*]/, "");
-	printf "\t\t%s;\n",$0;
+	printf "           %s;\n",$0;
 	next;
 }
 
diff --git a/lib/talloc/script/mksyms.sh b/lib/talloc/script/mksyms.sh
index 714d55a..089344f 100755
--- a/lib/talloc/script/mksyms.sh
+++ b/lib/talloc/script/mksyms.sh
@@ -34,7 +34,24 @@ echo creating $symsfile
 
 mkdir -p `dirname $symsfile`
 
-${awk} -f `dirname $0`/mksyms.awk $proto_src > $symsfile_tmp
+#Write header
+cat > $symsfile_tmp << EOF
+# This file is autogenerated, please DO NOT EDIT
+{
+    global:
+EOF
+
+#loop on each header
+for i in $proto_src; do
+${awk} -f `dirname $0`/mksyms.awk $i | sort >> $symsfile_tmp
+done;
+
+#Write tail
+cat >> $symsfile_tmp << EOF
+
+    local: *;
+};
+EOF
 
 if cmp -s $symsfile $symsfile_tmp 2>/dev/null
 then
diff --git a/lib/talloc/release-script.sh b/lib/talloc/script/release-script.sh
similarity index 84%
rename from lib/talloc/release-script.sh
rename to lib/talloc/script/release-script.sh
index 6b6c0e7..4804f6f 100755
--- a/lib/talloc/release-script.sh
+++ b/lib/talloc/script/release-script.sh
@@ -10,6 +10,16 @@ if [ ! -d "lib/talloc" ]; then
     exit 1
 fi
 
+# Check exports and signatures are up to date
+pushd lib/talloc
+./script/abi_checks.sh talloc talloc.h
+abicheck=$?
+popd
+if [ ! "$abicheck" = "0" ]; then
+    echo "ERROR: ABI Checks produced warnings!"
+    exit 1
+fi
+
 git clean -f -x -d lib/talloc
 git clean -f -x -d lib/replace
 
diff --git a/lib/talloc/talloc.exports b/lib/talloc/talloc.exports
index 75134c0..1b8062f 100644
--- a/lib/talloc/talloc.exports
+++ b/lib/talloc/talloc.exports
@@ -1,7 +1,19 @@
+# This file is autogenerated, please DO NOT EDIT
 {
     global:
            _talloc;
            _talloc_array;
+           _talloc_free;
+           _talloc_get_type_abort;
+           _talloc_memdup;
+           _talloc_move;
+           _talloc_realloc;
+           _talloc_realloc_array;
+           _talloc_reference_loc;
+           _talloc_set_destructor;
+           _talloc_steal_loc;
+           _talloc_zero;
+           _talloc_zero_array;
            talloc_asprintf;
            talloc_asprintf_append;
            talloc_asprintf_append_buffer;
@@ -11,40 +23,32 @@
            talloc_enable_leak_report;
            talloc_enable_leak_report_full;
            talloc_enable_null_tracking;
+           talloc_enable_null_tracking_no_autofree;
            talloc_find_parent_byname;
-           _talloc_free;
            talloc_free_children;
            talloc_get_name;
            talloc_get_size;
-           _talloc_get_type_abort;
            talloc_increase_ref_count;
            talloc_init;
            talloc_is_parent;
-           _talloc_memdup;
-           _talloc_move;
            talloc_named;
            talloc_named_const;
            talloc_parent;
            talloc_parent_name;
            talloc_pool;
-           _talloc_realloc;
-           _talloc_realloc_array;
            talloc_realloc_fn;
            talloc_reference_count;
-           _talloc_reference_loc;
            talloc_reparent;
            talloc_report;
            talloc_report_depth_cb;
            talloc_report_depth_file;
            talloc_report_full;
            talloc_set_abort_fn;
-           _talloc_set_destructor;
            talloc_set_log_fn;
            talloc_set_log_stderr;
            talloc_set_name;
            talloc_set_name_const;
            talloc_show_parents;
-           _talloc_steal_loc;
            talloc_strdup;
            talloc_strdup_append;
            talloc_strdup_append_buffer;
@@ -59,8 +63,6 @@
            talloc_vasprintf_append_buffer;
            talloc_version_major;
            talloc_version_minor;
-           _talloc_zero;
-           _talloc_zero_array;
 
     local: *;
 };
diff --git a/lib/talloc/talloc.signatures b/lib/talloc/talloc.signatures
index 00fb4a3..f2868e8 100644
--- a/lib/talloc/talloc.signatures
+++ b/lib/talloc/talloc.signatures
@@ -1,15 +1,15 @@
-char *talloc_asprintf_append_buffer (char *, const char *, ...);
-char *talloc_asprintf_append (char *, const char *, ...);
 char *talloc_asprintf (const void *, const char *, ...);
-char *talloc_strdup_append_buffer (char *, const char *);
-char *talloc_strdup_append (char *, const char *);
+char *talloc_asprintf_append (char *, const char *, ...);
+char *talloc_asprintf_append_buffer (char *, const char *, ...);
 char *talloc_strdup (const void *, const char *);
-char *talloc_strndup_append_buffer (char *, const char *, size_t);
-char *talloc_strndup_append (char *, const char *, size_t);
+char *talloc_strdup_append (char *, const char *);
+char *talloc_strdup_append_buffer (char *, const char *);
 char *talloc_strndup (const void *, const char *, size_t);
-char *talloc_vasprintf_append_buffer (char *, const char *, va_list);
-char *talloc_vasprintf_append (char *, const char *, va_list);
+char *talloc_strndup_append (char *, const char *, size_t);
+char *talloc_strndup_append_buffer (char *, const char *, size_t);
 char *talloc_vasprintf (const void *, const char *, va_list);
+char *talloc_vasprintf_append (char *, const char *, va_list);
+char *talloc_vasprintf_append_buffer (char *, const char *, va_list);
 const char *talloc_get_name (const void *);
 const char *talloc_parent_name (const void *);
 const char *talloc_set_name (const void *, const char *, ...);
@@ -23,39 +23,40 @@ size_t talloc_get_size (const void *);
 size_t talloc_reference_count (const void *);
 size_t talloc_total_blocks (const void *);
 size_t talloc_total_size (const void *);
+void *_talloc (const void *, size_t);
 void *_talloc_array (const void *, size_t, unsigned int, const char *);
+void *_talloc_get_type_abort (const void *, const char *, const char *);
+void *_talloc_memdup (const void *, const void *, size_t, const char *);
+void *_talloc_move (const void *, const void *);
+void *_talloc_realloc (const void *, void *, size_t, const char *);
+void *_talloc_realloc_array (const void *, void *, size_t, unsigned int, const char *);
+void *_talloc_reference_loc (const void *, const void *, const char *);
+void *_talloc_steal_loc (const void *, const void *, const char *);
+void *_talloc_zero (const void *, size_t, const char *);
+void *_talloc_zero_array (const void *, size_t, unsigned int, const char *);
 void *talloc_autofree_context (void);
 void *talloc_check_name (const void *, const char *);
-void *_talloc (const void *, size_t);
-void talloc_disable_null_tracking (void);
-void talloc_enable_leak_report_full (void);
-void talloc_enable_leak_report (void);
-void talloc_enable_null_tracking (void);
 void *talloc_find_parent_byname (const void *, const char *);
-void talloc_free_children (void *);
-void *_talloc_get_type_abort (const void *, const char *, const char *);
 void *talloc_init (const char *, ...);
-void *_talloc_memdup (const void *, const void *, size_t, const char *);
-void *_talloc_move (const void *, const void *);
-void *talloc_named_const (const void *, size_t, const char *);
 void *talloc_named (const void *, size_t, const char *, ...);
+void *talloc_named_const (const void *, size_t, const char *);
 void *talloc_parent (const void *);
 void *talloc_pool (const void *, size_t);
-void *_talloc_realloc_array (const void *, void *, size_t, unsigned int, const char *);
-void *_talloc_realloc (const void *, void *, size_t, const char *);
 void *talloc_realloc_fn (const void *, void *, size_t);
-void *_talloc_reference_loc (const void *, const void *, const char *);
 void *talloc_reparent (const void *, const void *, const void *);
+void _talloc_set_destructor (const void *, int (*) (void *));
+void talloc_disable_null_tracking (void);
+void talloc_enable_leak_report (void);
+void talloc_enable_leak_report_full (void);
+void talloc_enable_null_tracking (void);
+void talloc_enable_null_tracking_no_autofree (void);
+void talloc_free_children (void *);
 void talloc_report (const void *, FILE *);
 void talloc_report_depth_cb (const void *, int, int, void (*) (const void *, int, int, int, void *), void *);
 void talloc_report_depth_file (const void *, int, int, FILE *);
 void talloc_report_full (const void *, FILE *);
 void talloc_set_abort_fn (void (*) (const char *));
-void _talloc_set_destructor (const void *, int (*) (void *));
 void talloc_set_log_fn (void (*) (const char *));
 void talloc_set_log_stderr (void);
 void talloc_set_name_const (const void *, const char *);
 void talloc_show_parents (const void *, FILE *);
-void *_talloc_steal_loc (const void *, const void *, const char *);
-void *_talloc_zero_array (const void *, size_t, unsigned int, const char *);
-void *_talloc_zero (const void *, size_t, const char *);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list