The branch, master has been updated via efccef09aec93180a06955b5e03f1ceb99dc39e8 (commit) via e83f4b868b208724a732b45a0aa4f6ee8a08b115 (commit) via 7aee9f92e7c3e3eb48c0456d821125b60f8d8259 (commit) via f518e37c0912a54d5434f7639ba44f53d3455582 (commit) via 57ba31ca968552f28b2221b740f9b0c5bcd9911a (commit) from 3014753ebebd332710e7d5ad75c868f34f00dff6 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit efccef09aec93180a06955b5e03f1ceb99dc39e8 Author: Simo Sorce <sso...@redhat.com> Date: Sun Jun 7 14:10:15 2009 -0400 Add exports file and abi checker for tevent This is a first attempt at exporting symbols only for public functions We also provide a rudimentary ABI checker that tries to check that function signatures are not changed by mistake. Given our use of macros this is not an API checker. It's all based on tevent.h contents and the gcc -aux-info option commit e83f4b868b208724a732b45a0aa4f6ee8a08b115 Author: Simo Sorce <sso...@redhat.com> Date: Sun Jun 7 14:20:36 2009 -0400 Add exports file and abi checker for talloc This is a first attempt at exporting symbols only for public functions We also provide a rudimentary ABI checker that tries to check that function signatures are not changed by mistake. Given our use of macros this is not an API checker. It's all based on talloc.h contents and the gcc -aux-info option commit 7aee9f92e7c3e3eb48c0456d821125b60f8d8259 Author: Simo Sorce <i...@samba.org> Date: Mon Jun 15 16:19:19 2009 -0400 Add exports file and abi checker for tdb This is a first attempt at exporting symbols only for public functions We also provide a rudimentary ABI checker that tries to check that function signatures are not changed by mistake. Given our use of macros this is not an API checker. It's all based on tdb.h contents and the gcc -aux-info option commit f518e37c0912a54d5434f7639ba44f53d3455582 Author: Simo Sorce <i...@samba.org> Date: Mon Jun 15 16:20:06 2009 -0400 Add new replace check for --version-script Allows us to pass an export files on Linux and Solaris so that we can expose only symbols that are actually supposed to be global, and keep as local anything else. commit 57ba31ca968552f28b2221b740f9b0c5bcd9911a Author: Simo Sorce <i...@samba.org> Date: Mon Jun 15 15:08:25 2009 -0400 Add option to --disable-python on build ----------------------------------------------------------------------- Summary of changes: lib/replace/libreplace_ld.m4 | 16 ++++++++++ lib/talloc/Makefile.in | 6 +++- lib/talloc/abi_checks.sh | 32 +++++++++++++++++++++ lib/talloc/configure.ac | 15 +++++---- lib/talloc/libtalloc.m4 | 5 +++ lib/talloc/rules.mk | 2 +- lib/talloc/talloc.exports | 61 ++++++++++++++++++++++++++++++++++++++++ lib/talloc/talloc.mk | 1 + lib/talloc/talloc.signatures | 56 ++++++++++++++++++++++++++++++++++++ lib/tdb/Makefile.in | 7 ++++- lib/tdb/abi_checks.sh | 35 +++++++++++++++++++++++ lib/tdb/configure.ac | 12 +++++++- lib/tdb/libtdb.m4 | 5 +++ lib/tdb/rules.mk | 2 +- lib/tdb/tdb.exports | 64 ++++++++++++++++++++++++++++++++++++++++++ lib/tdb/tdb.signatures | 59 ++++++++++++++++++++++++++++++++++++++ lib/tevent/Makefile.in | 7 ++++- lib/tevent/abi_checks.sh | 31 ++++++++++++++++++++ lib/tevent/configure.ac | 1 + lib/tevent/libtevent.m4 | 5 +++ lib/tevent/rules.mk | 2 +- lib/tevent/tevent.exports | 59 ++++++++++++++++++++++++++++++++++++++ lib/tevent/tevent.signatures | 54 +++++++++++++++++++++++++++++++++++ 23 files changed, 523 insertions(+), 14 deletions(-) create mode 100755 lib/talloc/abi_checks.sh create mode 100644 lib/talloc/talloc.exports create mode 100644 lib/talloc/talloc.signatures create mode 100755 lib/tdb/abi_checks.sh create mode 100644 lib/tdb/tdb.exports create mode 100644 lib/tdb/tdb.signatures create mode 100755 lib/tevent/abi_checks.sh create mode 100644 lib/tevent/tevent.exports create mode 100644 lib/tevent/tevent.signatures Changeset truncated at 500 lines: diff --git a/lib/replace/libreplace_ld.m4 b/lib/replace/libreplace_ld.m4 index 8ab5e78..90c5be6 100644 --- a/lib/replace/libreplace_ld.m4 +++ b/lib/replace/libreplace_ld.m4 @@ -248,6 +248,22 @@ AC_DEFUN([AC_LD_SONAMEFLAG], esac ]) +AC_DEFUN([AC_LD_VERSIONSCRIPT], +[ + AC_SUBST(VERSIONSCRIPT) + VERSIONSCRIPT="" + case "$host_os" in + *linux*|*gnu*) + VERSIONSCRIPT="-Wl,--version-script" + ;; + *solaris*) + if test "${GCC}" = "yes"; then + VERSIONSCRIPT="-Wl,--version-script" + fi + ;; + esac +]) + AC_DEFUN([AC_LIBREPLACE_MDLD], [ AC_REQUIRE([AC_LIBREPLACE_LD_SHLIB_LINKER]) diff --git a/lib/talloc/Makefile.in b/lib/talloc/Makefile.in index c28693e..a45f72b 100644 --- a/lib/talloc/Makefile.in +++ b/lib/talloc/Makefile.in @@ -24,13 +24,17 @@ tallocdir = @tallocdir@ LIBOBJ = $(TALLOC_OBJ) @LIBREPLACEOBJ@ +SONAMEFLAG = @SONAMEFLAG@ +VERSIONSCRIPT = @VERSIONSCRIPT@ +EXPORTSFILE = @EXPORTSFILE@ + all:: showflags $(EXTRA_TARGETS) include $(tallocdir)/rules.mk include $(tallocdir)/talloc.mk $(TALLOC_SOLIB): $(LIBOBJ) - $(SHLD) $(SHLD_FLAGS) -o $@ $(LIBOBJ) @sonamef...@$(TALLOC_SONAME) + $(SHLD) $(SHLD_FLAGS) -o $@ $(LIBOBJ) $(VERSIONSCRIPT) $(EXPORTSFILE) $(SONAMEFLAG)$(TALLOC_SONAME) shared-build: all ${INSTALLCMD} -d $(sharedbuilddir)/lib diff --git a/lib/talloc/abi_checks.sh b/lib/talloc/abi_checks.sh new file mode 100755 index 0000000..432cc87 --- /dev/null +++ b/lib/talloc/abi_checks.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +make clean + +mkdir abi +ABI_CHECKS="-aux-info abi/\...@.x" +make ABI_CHECK="$ABI_CHECKS" + +for i in abi/*.X; do cat $i | grep 'talloc\.h'; done | sort | uniq | awk -F "extern " '{ print $2 }' > abi/signatures + +cat > abi/exports << EOF +{ + global: +EOF +cat abi/signatures | awk -F '(' '{ print $1 }' | awk -F ' ' '{ print " "$NF";" }' | tr -d '*' | sort >> abi/exports +cat >> abi/exports << EOF + + local: *; +}; +EOF + +rm -fr abi/*.X + +diff -u talloc.signatures abi/signatures +if [ "$?" != "0" ]; then + echo "WARNING: Possible ABI Change!!" +fi + +diff -u talloc.exports abi/exports +if [ "$?" != "0" ]; then + echo "WARNING: Export file may be outdated!!" +fi diff --git a/lib/talloc/configure.ac b/lib/talloc/configure.ac index 00e8242..a644f6d 100644 --- a/lib/talloc/configure.ac +++ b/lib/talloc/configure.ac @@ -1,11 +1,18 @@ AC_PREREQ(2.50) -AC_INIT(talloc, 1.3.0) +AC_INIT(talloc, 1.3.1) AC_CONFIG_SRCDIR([talloc.c]) AC_SUBST(datarootdir) AC_CONFIG_HEADER(config.h) AC_LIBREPLACE_ALL_CHECKS +AC_LD_PICFLAG +AC_LD_SHLIBEXT +AC_LD_SONAMEFLAG +AC_LD_VERSIONSCRIPT +AC_LIBREPLACE_SHLD +AC_LIBREPLACE_SHLD_FLAGS + m4_include(libtalloc.m4) AC_PATH_PROG(XSLTPROC,xsltproc) @@ -15,12 +22,6 @@ if test -n "$XSLTPROC"; then fi AC_SUBST(DOC_TARGET) -AC_LD_PICFLAG -AC_LD_SHLIBEXT -AC_LD_SONAMEFLAG -AC_LIBREPLACE_SHLD -AC_LIBREPLACE_SHLD_FLAGS - m4_include(build_macros.m4) BUILD_WITH_SHARED_BUILD_DIR diff --git a/lib/talloc/libtalloc.m4 b/lib/talloc/libtalloc.m4 index e6830fb..4b22c8e 100644 --- a/lib/talloc/libtalloc.m4 +++ b/lib/talloc/libtalloc.m4 @@ -31,3 +31,8 @@ if test $ac_cv_sizeof_size_t -lt $ac_cv_sizeof_void_p; then AC_WARN([sizeof(void *) = $ac_cv_sizeof_void_p]) AC_ERROR([sizeof(size_t) < sizeof(void *)]) fi + +if test x"$VERSIONSCRIPT" != "x"; then + EXPORTSFILE=talloc.exports + AC_SUBST(EXPORTSFILE) +fi diff --git a/lib/talloc/rules.mk b/lib/talloc/rules.mk index 1c83e7b..00c909e 100644 --- a/lib/talloc/rules.mk +++ b/lib/talloc/rules.mk @@ -6,7 +6,7 @@ showflags:: @echo ' LIBS = $(LIBS)' .c.o: - $(CC) $(PICFLAG) -o $@ -c $< $(CFLAGS) + $(CC) $(PICFLAG) $(ABI_CHECK) -o $@ -c $< $(CFLAGS) .3.xml.3: -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< diff --git a/lib/talloc/talloc.exports b/lib/talloc/talloc.exports new file mode 100644 index 0000000..b787845 --- /dev/null +++ b/lib/talloc/talloc.exports @@ -0,0 +1,61 @@ +{ + global: + _talloc; + _talloc_array; + talloc_asprintf; + talloc_asprintf_append; + talloc_asprintf_append_buffer; + talloc_autofree_context; + talloc_check_name; + talloc_disable_null_tracking; + talloc_enable_leak_report; + talloc_enable_leak_report_full; + talloc_enable_null_tracking; + 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; + talloc_reference_count; + talloc_report; + talloc_report_depth_cb; + talloc_report_depth_file; + talloc_report_full; + talloc_set_abort_fn; + _talloc_set_destructor; + talloc_set_name; + talloc_set_name_const; + talloc_show_parents; + _talloc_steal; + talloc_strdup; + talloc_strdup_append; + talloc_strdup_append_buffer; + talloc_strndup; + talloc_strndup_append; + talloc_strndup_append_buffer; + talloc_total_blocks; + talloc_total_size; + talloc_unlink; + talloc_vasprintf; + talloc_vasprintf_append; + talloc_vasprintf_append_buffer; + _talloc_zero; + _talloc_zero_array; + + local: *; +}; diff --git a/lib/talloc/talloc.mk b/lib/talloc/talloc.mk index ce7784c..fb57e44 100644 --- a/lib/talloc/talloc.mk +++ b/lib/talloc/talloc.mk @@ -30,6 +30,7 @@ doc:: talloc.3 talloc.3.html clean:: rm -f *~ $(LIBOBJ) $(TALLOC_SOLIB) $(TALLOC_STLIB) testsuite testsuite.o testsuite_main.o *.gc?? talloc.3 talloc.3.html + rm -fr abi test:: testsuite ./testsuite diff --git a/lib/talloc/talloc.signatures b/lib/talloc/talloc.signatures new file mode 100644 index 0000000..e2fc8ae --- /dev/null +++ b/lib/talloc/talloc.signatures @@ -0,0 +1,56 @@ +void *_talloc (const void *, size_t); +void *talloc_pool (const void *, size_t); +void _talloc_set_destructor (const void *, int (*) (void *)); +int talloc_increase_ref_count (const void *); +size_t talloc_reference_count (const void *); +void *_talloc_reference (const void *, const void *); +int talloc_unlink (const void *, void *); +const char *talloc_set_name (const void *, const char *, ...); +void talloc_set_name_const (const void *, const char *); +void *talloc_named (const void *, size_t, const char *, ...); +void *talloc_named_const (const void *, size_t, const char *); +const char *talloc_get_name (const void *); +void *talloc_check_name (const void *, const char *); +void *_talloc_get_type_abort (const void *, const char *, const char *); +void *talloc_parent (const void *); +const char *talloc_parent_name (const void *); +void *talloc_init (const char *, ...); +int talloc_free (void *); +void talloc_free_children (void *); +void *_talloc_realloc (const void *, void *, size_t, const char *); +void *_talloc_steal (const void *, const void *); +void *_talloc_move (const void *, const void *); +size_t talloc_total_size (const void *); +size_t talloc_total_blocks (const void *); +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_report (const void *, FILE *); +void talloc_enable_null_tracking (void); +void talloc_disable_null_tracking (void); +void talloc_enable_leak_report (void); +void talloc_enable_leak_report_full (void); +void *_talloc_zero (const void *, size_t, const char *); +void *_talloc_memdup (const void *, const void *, size_t, const char *); +void *_talloc_array (const void *, size_t, unsigned int, const char *); +void *_talloc_zero_array (const void *, size_t, unsigned int, const char *); +void *_talloc_realloc_array (const void *, void *, size_t, unsigned int, const char *); +void *talloc_realloc_fn (const void *, void *, size_t); +void *talloc_autofree_context (void); +size_t talloc_get_size (const void *); +void *talloc_find_parent_byname (const void *, const char *); +void talloc_show_parents (const void *, FILE *); +int talloc_is_parent (const void *, const void *); +char *talloc_strdup (const void *, const char *); +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_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_tag *); +char *talloc_vasprintf_append (char *, const char *, __va_list_tag *); +char *talloc_vasprintf_append_buffer (char *, const char *, __va_list_tag *); +char *talloc_asprintf (const void *, const char *, ...); +char *talloc_asprintf_append (char *, const char *, ...); +char *talloc_asprintf_append_buffer (char *, const char *, ...); +void talloc_set_abort_fn (void (*) (const char *)); diff --git a/lib/tdb/Makefile.in b/lib/tdb/Makefile.in index df1b02b..93bfe37 100644 --- a/lib/tdb/Makefile.in +++ b/lib/tdb/Makefile.in @@ -33,6 +33,10 @@ tdbdir = @tdbdir@ TDB_OBJ = @TDB_OBJ@ @LIBREPLACEOBJ@ +SONAMEFLAG = @SONAMEFLAG@ +VERSIONSCRIPT = @VERSIONSCRIPT@ +EXPORTSFILE = @EXPORTSFILE@ + default: all include $(tdbdir)/tdb.mk @@ -42,7 +46,7 @@ all:: showflags dirs $(PROGS) $(TDB_SOLIB) libtdb.a $(PYTHON_BUILD_TARGET) install:: all $(TDB_SOLIB): $(TDB_OBJ) - $(SHLD) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) @sonamef...@$(TDB_SONAME) + $(SHLD) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) $(VERSIONSCRIPT) $(EXPORTSFILE) $(SONAMEFLAG)$(TDB_SONAME) shared-build: all ${INSTALLCMD} -d $(sharedbuilddir)/lib @@ -60,6 +64,7 @@ installcheck:: test install clean:: rm -f *.o *.a */*.o + rm -fr abi distclean:: clean rm -f config.log config.status include/config.h config.cache diff --git a/lib/tdb/abi_checks.sh b/lib/tdb/abi_checks.sh new file mode 100755 index 0000000..042b0f3 --- /dev/null +++ b/lib/tdb/abi_checks.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +make clean + +mkdir -p abi/common +mkdir -p abi/tools +ABI_CHECKS="-aux-info abi/\...@.x" +make ABI_CHECK="$ABI_CHECKS" CC="/usr/bin/gcc" + +for i in abi/*/*.X; do cat $i | grep 'tdb\.h'; done | sort | uniq | awk -F "extern " '{ print $2 }' > abi/signatures +grep '^extern' include/tdb.h | grep -v '"C"' | sort | uniq | awk -F "extern " '{ print $2 }' >> abi/signatures + +cat > abi/exports << EOF +{ + global: +EOF +#Functions +cat abi/signatures | grep "(" | awk -F '(' '{ print $1 }' | awk -F ' ' '{ print " "$NF";" }' | tr -d '*' | sort >> abi/exports +#global vars +cat abi/signatures | grep -v "(" | awk -F ';' '{print $1 }' | awk -F ' ' '{ print " "$NF";" }' | tr -d '*' | sort >> abi/exports +cat >> abi/exports << EOF + + local: *; +}; +EOF + +diff -u tdb.signatures abi/signatures +if [ "$?" != "0" ]; then + echo "WARNING: Possible ABI Change!!" +fi + +diff -u tdb.exports abi/exports +if [ "$?" != "0" ]; then + echo "WARNING: Export file may be outdated!!" +fi diff --git a/lib/tdb/configure.ac b/lib/tdb/configure.ac index c42a970..e5bd9f6 100644 --- a/lib/tdb/configure.ac +++ b/lib/tdb/configure.ac @@ -2,11 +2,12 @@ AC_PREREQ(2.50) AC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ""]) AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ""]) AC_DEFUN([SMB_ENABLE], [echo -n ""]) -AC_INIT(tdb, 1.1.4) +AC_INIT(tdb, 1.1.5) AC_CONFIG_SRCDIR([common/tdb.c]) AC_CONFIG_HEADER(include/config.h) AC_LIBREPLACE_ALL_CHECKS AC_LD_SONAMEFLAG +AC_LD_VERSIONSCRIPT AC_LD_PICFLAG AC_LD_SHLIBEXT AC_LIBREPLACE_SHLD @@ -28,6 +29,15 @@ if test -z "$PYTHON_CONFIG"; then PYTHON_CHECK_TARGET="" fi +AC_ARG_ENABLE(python, + [--enable-python Ebables python bindings], + [ if test "x$enableval" = "xno" ; then + PYTHON_BUILD_TARGET="" + PYTHON_INSTALL_TARGET="" + PYTHON_CHECK_TARGET="" + fi + ]) + m4_include(build_macros.m4) BUILD_WITH_SHARED_BUILD_DIR diff --git a/lib/tdb/libtdb.m4 b/lib/tdb/libtdb.m4 index 252e0b0..f5ed012 100644 --- a/lib/tdb/libtdb.m4 +++ b/lib/tdb/libtdb.m4 @@ -28,3 +28,8 @@ AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h) AC_HAVE_DECL(pread, [#include <unistd.h>]) AC_HAVE_DECL(pwrite, [#include <unistd.h>]) + +if test x"$VERSIONSCRIPT" != "x"; then + EXPORTSFILE=tdb.exports + AC_SUBST(EXPORTSFILE) +fi diff --git a/lib/tdb/rules.mk b/lib/tdb/rules.mk index 7b76562..73ab771 100644 --- a/lib/tdb/rules.mk +++ b/lib/tdb/rules.mk @@ -15,7 +15,7 @@ showflags:: .c.o: @echo Compiling $*.c @mkdir -p `dirname $...@` - @$(CC) $(PICFLAG) $(CFLAGS) -c $< -o $@ + @$(CC) $(PICFLAG) $(CFLAGS) $(ABI_CHECK) -c $< -o $@ distclean:: rm -f *~ */*~ diff --git a/lib/tdb/tdb.exports b/lib/tdb/tdb.exports new file mode 100644 index 0000000..f3dcd15 --- /dev/null +++ b/lib/tdb/tdb.exports @@ -0,0 +1,64 @@ +{ + global: + tdb_add_flags; + tdb_append; + tdb_chainlock; + tdb_chainlock_mark; + tdb_chainlock_nonblock; + tdb_chainlock_read; + tdb_chainlock_unmark; + tdb_chainunlock; + tdb_chainunlock_read; + tdb_close; + tdb_delete; + tdb_dump_all; + tdb_enable_seqnum; + tdb_error; + tdb_errorstr; + tdb_exists; + tdb_fd; + tdb_fetch; + tdb_firstkey; + tdb_freelist_size; + tdb_get_flags; + tdb_get_logging_private; + tdb_get_seqnum; + tdb_hash_size; + tdb_increment_seqnum_nonblock; + tdb_lockall; + tdb_lockall_mark; + tdb_lockall_nonblock; + tdb_lockall_read; + tdb_lockall_read_nonblock; + tdb_lockall_unmark; + tdb_log_fn; + tdb_map_size; + tdb_name; + tdb_nextkey; + tdb_open; + tdb_open_ex; + tdb_parse_record; + tdb_printfreelist; + tdb_remove_flags; + tdb_reopen; + tdb_reopen_all; + tdb_repack; + tdb_setalarm_sigptr; + tdb_set_logging_function; + tdb_set_max_dead; + tdb_store; + tdb_transaction_cancel; + tdb_transaction_commit; + tdb_transaction_prepare_commit; + tdb_transaction_recover; + tdb_transaction_start; + tdb_traverse; + tdb_traverse_read; + tdb_unlockall; + tdb_unlockall_read; + tdb_validate_freelist; + tdb_wipe_all; + tdb_null; + + local: *; +}; diff --git a/lib/tdb/tdb.signatures b/lib/tdb/tdb.signatures new file mode 100644 index 0000000..12e0b24 --- /dev/null +++ b/lib/tdb/tdb.signatures -- Samba Shared Repository