[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Sun Nov 1 00:10:04 UTC 2015


The branch, master has been updated
       via  9ef47d2 buildtools: Ignore exact Python version for ABI checking
       via  2f61906 s4:heimdal_build: also use check_system_heimdal_lib() for "com_err"
       via  3cb1d6e s4:heimdal_build: handle CHECK_BUNDLED_SYSTEM returning False in check_system_heimdal_lib()
       via  db04752 script/autobuild.py: exclude !pytalloc-util and !pyldb-util from bundling in samba-libs
       via  a19bb29 s3: Remove unnecessary __P() macro
       via  89d254d lib/replace: Make sure that replacement strto[u]ll does not reset errno unexpectedly
       via  8343c70 lib/replace: Replace BSD strtoull by wrapping strtoull instead of strtouq
      from  f30a8a2 s4.torture.smb2/session: Add torture assert for close

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


- Log -----------------------------------------------------------------
commit 9ef47d25317947248b0796059e6f0a851ba3cb07
Author: Petr Viktorin <pviktori at redhat.com>
Date:   Fri Aug 14 12:17:48 2015 +0200

    buildtools: Ignore exact Python version for ABI checking
    
    Utilities for Python libraries are built for a specific Python
    version. Starting with Python 3, the Python version is recorded
    in the shared library filename as an ABI tag, e.g. "pytalloc.cpython-34m.so.
    The exact version doesn't matter for Samba's ABI check.
    Replace the ABI tag with a simpler one that just records the major
    version of Python.
    
    Signed-off-by: Petr Viktorin <pviktori at redhat.com>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Sun Nov  1 01:09:06 CET 2015 on sn-devel-104

commit 2f619066fbf2e8310e0a21b6680212c3e676b6ea
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Aug 27 11:44:23 2015 +0200

    s4:heimdal_build: also use check_system_heimdal_lib() for "com_err"
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>

commit 3cb1d6e7c5e0735ee75ec54b987dbccf1da0db7a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Aug 27 11:40:09 2015 +0200

    s4:heimdal_build: handle CHECK_BUNDLED_SYSTEM returning False in check_system_heimdal_lib()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>

commit db04752f3ecefc19fbf199930931fa31dde1632c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Aug 27 11:05:08 2015 +0200

    script/autobuild.py: exclude !pytalloc-util and !pyldb-util from bundling in samba-libs
    
    We need to make sure we're really not bundling any of these.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11458
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>

commit a19bb29a0814bc31c3f377a983c1503f63a6bc42
Author: Felix Janda <felix.janda at posteo.de>
Date:   Thu Oct 22 12:42:07 2015 +0200

    s3: Remove unnecessary __P() macro
    
    __P() is used for compatibility with old K&R C compilers. With
    ANSI C this macro has no effect. Since we are assuming ANSI C in
    the rest of the code, the macro is not necessary.
    
    This fixes a compilation error with musl libc because of undeclared
    __P().
    
    Signed-off-by: Felix Janda <felix.janda at posteo.de>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 89d254ddca20a36001c9dfdcfa6d8b9767f0f897
Author: Felix Janda <felix.janda at posteo.de>
Date:   Thu Oct 22 12:37:55 2015 +0200

    lib/replace: Make sure that replacement strto[u]ll does not reset errno unexpectedly
    
    Fix the replacement functions for strtoll and strtoull to not set errno
    to 0 if errno is EINVAL before calling, strto[u]ll does not modify errno
    and the base is ok.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=11455
    
    Signed-off-by: Felix Janda <felix.janda at posteo.de>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 8343c707533e9acd53898778f386a1d93d57763f
Author: Felix Janda <felix.janda at posteo.de>
Date:   Thu Oct 22 12:32:48 2015 +0200

    lib/replace: Replace BSD strtoull by wrapping strtoull instead of strtouq
    
    Same as commit e50bf6d537ef09e936d19d6e0bf63f9bbc5d4818 but for strtoull
    instead of strtoll.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=11455
    
    Signed-off-by: Felix Janda <felix.janda at posteo.de>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

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

Summary of changes:
 buildtools/wafsamba/samba_abi.py        |  3 ++-
 buildtools/wafsamba/wafsamba.py         | 12 +++++++++++-
 lib/replace/replace.c                   | 15 +++++++--------
 script/autobuild.py                     |  2 +-
 source3/include/samba_linux_quota.h     |  2 +-
 source4/heimdal_build/wscript_configure | 10 +++++-----
 6 files changed, 27 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py
index 3ff6d77..8220594 100644
--- a/buildtools/wafsamba/samba_abi.py
+++ b/buildtools/wafsamba/samba_abi.py
@@ -137,7 +137,8 @@ def abi_check(self):
     topsrc = self.bld.srcnode.abspath()
     abi_gen = os.path.join(topsrc, 'buildtools/scripts/abi_gen.sh')
 
-    abi_file = "%s/%s-%s.sigs" % (self.abi_directory, self.name, self.vnum)
+    abi_file = "%s/%s-%s.sigs" % (self.abi_directory, self.version_libname,
+                                  self.vnum)
 
     tsk = self.create_task('abi_check', self.link_task.outputs[0])
     tsk.ABI_FILE = abi_file
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index fdd0371..318dabf 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -253,6 +253,15 @@ def SAMBA_LIBRARY(bld, libname, source,
     if abi_directory:
         features += ' abi_check'
 
+    if pyembed and bld.env['PYTHON_SO_ABI_FLAG']:
+        # For ABI checking, we don't care about the exact Python version.
+        # Replace the Python ABI tag (e.g. ".cpython-35m") by a generic ".py3"
+        abi_flag = bld.env['PYTHON_SO_ABI_FLAG']
+        replacement = '.py%s' % bld.env['PYTHON_VERSION'].split('.')[0]
+        version_libname = libname.replace(abi_flag, replacement)
+    else:
+        version_libname = libname
+
     vscript = None
     if bld.env.HAVE_LD_VERSION_SCRIPT:
         if private_library:
@@ -263,7 +272,7 @@ def SAMBA_LIBRARY(bld, libname, source,
             version = None
         if version:
             vscript = "%s.vscript" % libname
-            bld.ABI_VSCRIPT(libname, abi_directory, version, vscript,
+            bld.ABI_VSCRIPT(version_libname, abi_directory, version, vscript,
                             abi_match)
             fullname = apply_pattern(bundled_name, bld.env.shlib_PATTERN)
             fullpath = bld.path.find_or_declare(fullname)
@@ -289,6 +298,7 @@ def SAMBA_LIBRARY(bld, libname, source,
         samba_deps      = deps,
         samba_includes  = includes,
         version_script  = vscript,
+        version_libname = version_libname,
         local_include   = local_include,
         global_include  = global_include,
         vnum            = vnum,
diff --git a/lib/replace/replace.c b/lib/replace/replace.c
index c9c12a4..b5d7f11 100644
--- a/lib/replace/replace.c
+++ b/lib/replace/replace.c
@@ -541,6 +541,7 @@ long long int rep_strtoll(const char *str, char **endptr, int base)
 #undef strtoll
 long long int rep_strtoll(const char *str, char **endptr, int base)
 {
+	int saved_errno = errno;
 	long long int nb = strtoll(str, endptr, base);
 	/* With glibc EINVAL is only returned if base is not ok */
 	if (errno == EINVAL) {
@@ -549,7 +550,7 @@ long long int rep_strtoll(const char *str, char **endptr, int base)
 			 * able to make the convertion.
 			 * Let's reset errno.
 			 */
-			errno = 0;
+			errno = saved_errno;
 		}
 	}
 	return nb;
@@ -573,25 +574,23 @@ unsigned long long int rep_strtoull(const char *str, char **endptr, int base)
 }
 #else
 #ifdef HAVE_BSD_STRTOLL
-#ifdef HAVE_STRTOUQ
+#undef strtoull
 unsigned long long int rep_strtoull(const char *str, char **endptr, int base)
 {
-	unsigned long long int nb = strtouq(str, endptr, base);
-	/* In linux EINVAL is only returned if base is not ok */
+	int saved_errno = errno;
+	unsigned long long int nb = strtoull(str, endptr, base);
+	/* With glibc EINVAL is only returned if base is not ok */
 	if (errno == EINVAL) {
 		if (base == 0 || (base >1 && base <37)) {
 			/* Base was ok so it's because we were not
 			 * able to make the convertion.
 			 * Let's reset errno.
 			 */
-			errno = 0;
+			errno = saved_errno;
 		}
 	}
 	return nb;
 }
-#else
-#error "You need the strtouq function"
-#endif /* HAVE_STRTOUQ */
 #endif /* HAVE_BSD_STRTOLL */
 #endif /* HAVE_STRTOULL */
 
diff --git a/script/autobuild.py b/script/autobuild.py
index 7e6609f..2d3af2a 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -46,7 +46,7 @@ samba_libs_envvars += " PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgco
 samba_libs_envvars += " ADDITIONAL_CFLAGS='-Wmissing-prototypes'"
 samba_libs_configure_base = samba_libs_envvars + " ./configure --abi-check --enable-debug --picky-developer -C ${PREFIX}"
 samba_libs_configure_libs = samba_libs_configure_base + " --bundled-libraries=NONE"
-samba_libs_configure_samba = samba_libs_configure_base + " --bundled-libraries=!talloc,!tdb,!pytdb,!ldb,!pyldb,!tevent,!pytevent"
+samba_libs_configure_samba = samba_libs_configure_base + " --bundled-libraries=!talloc,!pytalloc-util,!tdb,!pytdb,!ldb,!pyldb,!pyldb-util,!tevent,!pytevent"
 
 tasks = {
     "ctdb" : [ ("random-sleep", "../script/random-sleep.sh 60 600", "text/plain"),
diff --git a/source3/include/samba_linux_quota.h b/source3/include/samba_linux_quota.h
index 8dbbec2..51acc20 100644
--- a/source3/include/samba_linux_quota.h
+++ b/source3/include/samba_linux_quota.h
@@ -227,7 +227,7 @@ struct if_dqinfo {
 	#endif
 #endif
 
-long quotactl __P((int, const char *, qid_t, caddr_t));
+long quotactl(int, const char *, qid_t, caddr_t);
 
 #endif /* _QUOTA_LINUX */
 
diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure
index 2635b8a..79b461c 100755
--- a/source4/heimdal_build/wscript_configure
+++ b/source4/heimdal_build/wscript_configure
@@ -187,9 +187,6 @@ if krb5_config:
     finally:
         f.close()
 
-if conf.CHECK_BUNDLED_SYSTEM('com_err', checkfunctions='com_right_r com_err', headers='com_err.h'):
-    conf.define('USING_SYSTEM_COM_ERR', 1)
-
 def check_system_heimdal_lib(name, functions='', headers='', onlyif=None):
     # Only use system library if the user requested the bundled one not be
     # used.
@@ -197,8 +194,9 @@ def check_system_heimdal_lib(name, functions='', headers='', onlyif=None):
         return False
     setattr(conf.env, "CPPPATH_%s" % name.upper(), heimdal_includedirs)
     setattr(conf.env, "LIBPATH_%s" % name.upper(), heimdal_libdirs)
-    conf.CHECK_BUNDLED_SYSTEM(name, checkfunctions=functions, headers=headers,
-        onlyif=onlyif)
+    if not conf.CHECK_BUNDLED_SYSTEM(name, checkfunctions=functions, headers=headers,
+                                     onlyif=onlyif):
+        return False
     conf.define('USING_SYSTEM_%s' % name.upper(), 1)
     return True
 
@@ -210,6 +208,8 @@ def check_system_heimdal_binary(name):
     conf.define('USING_SYSTEM_%s' % name.upper(), 1)
     return True
 
+check_system_heimdal_lib("com_err", "com_right_r com_err", "com_err.h")
+
 if check_system_heimdal_lib("roken", "rk_socket_set_reuseaddr", "roken.h"):
     conf.env.CPPPATH_ROKEN_HOSTCC = conf.env.CPPPATH_ROKEN
     conf.env.LIBPATH_ROKEN_HOSTCC = conf.env.LIBPATH_ROKEN


-- 
Samba Shared Repository



More information about the samba-cvs mailing list