Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package talloc for openSUSE:Factory checked in at 2021-09-26 21:48:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/talloc (Old) and /work/SRC/openSUSE:Factory/.talloc.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "talloc" Sun Sep 26 21:48:28 2021 rev:40 rq:921251 version:2.3.3 Changes: -------- --- /work/SRC/openSUSE:Factory/talloc/talloc-man.changes 2021-04-12 12:33:38.689042916 +0200 +++ /work/SRC/openSUSE:Factory/.talloc.new.1899/talloc-man.changes 2021-09-26 21:49:16.830819744 +0200 @@ -1,0 +2,7 @@ +Fri Sep 17 07:54:14 UTC 2021 - Samuel Cabrero <scabr...@suse.de> + +- Update to 2.3.3 + + python: Ensure reference counts are properly incremented + + Change pytalloc source to LGPL;(bso#9931); + +------------------------------------------------------------------- talloc.changes: same change Old: ---- talloc-2.3.2.tar.asc talloc-2.3.2.tar.gz New: ---- talloc-2.3.3.tar.asc talloc-2.3.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ talloc-man.spec ++++++ --- /var/tmp/diff_new_pack.EutKJ9/_old 2021-09-26 21:49:17.310820337 +0200 +++ /var/tmp/diff_new_pack.EutKJ9/_new 2021-09-26 21:49:17.310820337 +0200 @@ -35,7 +35,7 @@ #!BuildIgnore: python %endif # build_man URL: http://talloc.samba.org/ -Version: 2.3.2 +Version: 2.3.3 Release: 0 Summary: Samba talloc Library License: LGPL-3.0-or-later ++++++ talloc.spec ++++++ --- /var/tmp/diff_new_pack.EutKJ9/_old 2021-09-26 21:49:17.330820362 +0200 +++ /var/tmp/diff_new_pack.EutKJ9/_new 2021-09-26 21:49:17.330820362 +0200 @@ -35,7 +35,7 @@ #!BuildIgnore: python %endif # build_man URL: http://talloc.samba.org/ -Version: 2.3.2 +Version: 2.3.3 Release: 0 Summary: Samba talloc Library License: LGPL-3.0-or-later ++++++ talloc-2.3.2.tar.gz -> talloc-2.3.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/ABI/pytalloc-util-2.3.3.sigs new/talloc-2.3.3/ABI/pytalloc-util-2.3.3.sigs --- old/talloc-2.3.2/ABI/pytalloc-util-2.3.3.sigs 1970-01-01 01:00:00.000000000 +0100 +++ new/talloc-2.3.3/ABI/pytalloc-util-2.3.3.sigs 2021-07-15 09:04:32.000000000 +0200 @@ -0,0 +1,16 @@ +_pytalloc_check_type: int (PyObject *, const char *) +_pytalloc_get_mem_ctx: TALLOC_CTX *(PyObject *) +_pytalloc_get_name: const char *(PyObject *) +_pytalloc_get_ptr: void *(PyObject *) +_pytalloc_get_type: void *(PyObject *, const char *) +pytalloc_BaseObject_PyType_Ready: int (PyTypeObject *) +pytalloc_BaseObject_check: int (PyObject *) +pytalloc_BaseObject_size: size_t (void) +pytalloc_Check: int (PyObject *) +pytalloc_GenericObject_reference_ex: PyObject *(TALLOC_CTX *, void *) +pytalloc_GenericObject_steal_ex: PyObject *(TALLOC_CTX *, void *) +pytalloc_GetBaseObjectType: PyTypeObject *(void) +pytalloc_GetObjectType: PyTypeObject *(void) +pytalloc_reference_ex: PyObject *(PyTypeObject *, TALLOC_CTX *, void *) +pytalloc_steal: PyObject *(PyTypeObject *, void *) +pytalloc_steal_ex: PyObject *(PyTypeObject *, TALLOC_CTX *, void *) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/ABI/talloc-2.3.3.sigs new/talloc-2.3.3/ABI/talloc-2.3.3.sigs --- old/talloc-2.3.2/ABI/talloc-2.3.3.sigs 1970-01-01 01:00:00.000000000 +0100 +++ new/talloc-2.3.3/ABI/talloc-2.3.3.sigs 2021-07-15 09:04:32.000000000 +0200 @@ -0,0 +1,65 @@ +_talloc: void *(const void *, size_t) +_talloc_array: void *(const void *, size_t, unsigned int, const char *) +_talloc_free: int (void *, const char *) +_talloc_get_type_abort: void *(const void *, const char *, const char *) +_talloc_memdup: void *(const void *, const void *, size_t, const char *) +_talloc_move: void *(const void *, const void *) +_talloc_pooled_object: void *(const void *, size_t, const char *, unsigned int, size_t) +_talloc_realloc: void *(const void *, void *, size_t, const char *) +_talloc_realloc_array: void *(const void *, void *, size_t, unsigned int, const char *) +_talloc_reference_loc: void *(const void *, const void *, const char *) +_talloc_set_destructor: void (const void *, int (*)(void *)) +_talloc_steal_loc: void *(const void *, const void *, const char *) +_talloc_zero: void *(const void *, size_t, const char *) +_talloc_zero_array: void *(const void *, size_t, unsigned int, const char *) +talloc_asprintf: char *(const void *, const char *, ...) +talloc_asprintf_append: char *(char *, const char *, ...) +talloc_asprintf_append_buffer: char *(char *, const char *, ...) +talloc_autofree_context: void *(void) +talloc_check_name: void *(const void *, const char *) +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_find_parent_byname: void *(const void *, const char *) +talloc_free_children: void (void *) +talloc_get_name: const char *(const void *) +talloc_get_size: size_t (const void *) +talloc_increase_ref_count: int (const void *) +talloc_init: void *(const char *, ...) +talloc_is_parent: int (const void *, const void *) +talloc_named: void *(const void *, size_t, const char *, ...) +talloc_named_const: void *(const void *, size_t, const char *) +talloc_parent: void *(const void *) +talloc_parent_name: const char *(const void *) +talloc_pool: void *(const void *, size_t) +talloc_realloc_fn: void *(const void *, void *, size_t) +talloc_reference_count: size_t (const void *) +talloc_reparent: void *(const void *, const void *, const void *) +talloc_report: void (const void *, FILE *) +talloc_report_depth_cb: void (const void *, int, int, void (*)(const void *, int, int, int, void *), void *) +talloc_report_depth_file: void (const void *, int, int, FILE *) +talloc_report_full: void (const void *, FILE *) +talloc_set_abort_fn: void (void (*)(const char *)) +talloc_set_log_fn: void (void (*)(const char *)) +talloc_set_log_stderr: void (void) +talloc_set_memlimit: int (const void *, size_t) +talloc_set_name: const char *(const void *, const char *, ...) +talloc_set_name_const: void (const void *, const char *) +talloc_show_parents: void (const void *, FILE *) +talloc_strdup: char *(const void *, const char *) +talloc_strdup_append: char *(char *, const char *) +talloc_strdup_append_buffer: char *(char *, const char *) +talloc_strndup: char *(const void *, const char *, size_t) +talloc_strndup_append: char *(char *, const char *, size_t) +talloc_strndup_append_buffer: char *(char *, const char *, size_t) +talloc_test_get_magic: int (void) +talloc_total_blocks: size_t (const void *) +talloc_total_size: size_t (const void *) +talloc_unlink: int (const void *, void *) +talloc_vasprintf: char *(const void *, const char *, va_list) +talloc_vasprintf_append: char *(char *, const char *, va_list) +talloc_vasprintf_append_buffer: char *(char *, const char *, va_list) +talloc_version_major: int (void) +talloc_version_minor: int (void) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/buildtools/bin/waf new/talloc-2.3.3/buildtools/bin/waf --- old/talloc-2.3.2/buildtools/bin/waf 2021-01-25 09:35:07.413710600 +0100 +++ new/talloc-2.3.3/buildtools/bin/waf 2020-12-18 11:02:37.000000000 +0100 @@ -32,7 +32,7 @@ import os, sys, inspect -VERSION="2.0.20" +VERSION="2.0.21" REVISION="x" GIT="x" INSTALL="x" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/buildtools/wafsamba/samba_autoconf.py new/talloc-2.3.3/buildtools/wafsamba/samba_autoconf.py --- old/talloc-2.3.2/buildtools/wafsamba/samba_autoconf.py 2020-07-09 14:04:50.398104400 +0200 +++ new/talloc-2.3.3/buildtools/wafsamba/samba_autoconf.py 2021-04-28 08:53:27.000000000 +0200 @@ -905,9 +905,15 @@ -def CURRENT_CFLAGS(bld, target, cflags, allow_warnings=False, hide_symbols=False): +def CURRENT_CFLAGS(bld, target, cflags, + allow_warnings=False, + use_hostcc=False, + hide_symbols=False): '''work out the current flags. local flags are added first''' - ret = TO_LIST(cflags) + ret = [] + if use_hostcc: + ret += ['-D_SAMBA_HOSTCC_'] + ret += TO_LIST(cflags) if not 'EXTRA_CFLAGS' in bld.env: list = [] else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/buildtools/wafsamba/samba_third_party.py new/talloc-2.3.3/buildtools/wafsamba/samba_third_party.py --- old/talloc-2.3.2/buildtools/wafsamba/samba_third_party.py 2021-01-25 09:35:07.413710600 +0100 +++ new/talloc-2.3.3/buildtools/wafsamba/samba_third_party.py 2021-03-24 12:48:55.000000000 +0100 @@ -24,7 +24,7 @@ @conf def CHECK_SOCKET_WRAPPER(conf): - return conf.CHECK_BUNDLED_SYSTEM_PKG('socket_wrapper', minversion='1.2.5') + return conf.CHECK_BUNDLED_SYSTEM_PKG('socket_wrapper', minversion='1.3.3') Build.BuildContext.CHECK_SOCKET_WRAPPER = CHECK_SOCKET_WRAPPER @conf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/buildtools/wafsamba/samba_utils.py new/talloc-2.3.3/buildtools/wafsamba/samba_utils.py --- old/talloc-2.3.2/buildtools/wafsamba/samba_utils.py 2021-01-25 09:35:07.413710600 +0100 +++ new/talloc-2.3.3/buildtools/wafsamba/samba_utils.py 2020-12-18 11:02:37.000000000 +0100 @@ -459,7 +459,14 @@ return visited_dirs.add(key) relpath = os.path.relpath(abspath, ctx.path.abspath()) - if ctxclass in ['tmp', 'OptionsContext', 'ConfigurationContext', 'BuildContext', 'ClangDbContext']: + if ctxclass in ['OptionsContext', + 'ConfigurationContext', + 'BuildContext', + 'CleanContext', + 'InstallContext', + 'UninstallContext', + 'ListContext', + 'ClangDbContext']: return ctx.recurse(relpath) if 'waflib.extras.compat15' in sys.modules: return ctx.recurse(relpath) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/buildtools/wafsamba/samba_waf18.py new/talloc-2.3.3/buildtools/wafsamba/samba_waf18.py --- old/talloc-2.3.2/buildtools/wafsamba/samba_waf18.py 2021-01-25 09:35:07.413710600 +0100 +++ new/talloc-2.3.3/buildtools/wafsamba/samba_waf18.py 2020-12-18 11:02:37.000000000 +0100 @@ -5,7 +5,6 @@ from waflib import ConfigSet from waflib.TaskGen import feature, after from waflib.Configure import conf, ConfigurationContext -from waflib.extras import clang_compilation_database from waflib.Tools.flex import decide_ext @@ -37,10 +36,11 @@ decider = decide_ext, ) - -for y in (Build.BuildContext, Build.CleanContext, Build.InstallContext, Build.UninstallContext, Build.ListContext, clang_compilation_database.ClangDbContext): - class tmp(y): - variant = 'default' +Build.BuildContext.variant = 'default' +Build.CleanContext.variant = 'default' +Build.InstallContext.variant = 'default' +Build.UninstallContext.variant = 'default' +Build.ListContext.variant = 'default' def abspath(self, env=None): if env and hasattr(self, 'children'): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/buildtools/wafsamba/samba_wildcard.py new/talloc-2.3.3/buildtools/wafsamba/samba_wildcard.py --- old/talloc-2.3.2/buildtools/wafsamba/samba_wildcard.py 2020-07-09 14:04:50.398104400 +0200 +++ new/talloc-2.3.3/buildtools/wafsamba/samba_wildcard.py 2021-03-24 12:48:55.000000000 +0100 @@ -136,7 +136,7 @@ try: proj = ConfigSet.ConfigSet(Options.lockfile) except IOError: - raise Errors.WafError("Project not configured (run 'waf configure' first)") + raise Errors.WafError("Project not configured (run './configure' first)") bld.load_envs() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/buildtools/wafsamba/wafsamba.py new/talloc-2.3.3/buildtools/wafsamba/wafsamba.py --- old/talloc-2.3.2/buildtools/wafsamba/wafsamba.py 2021-01-25 09:35:07.413710600 +0100 +++ new/talloc-2.3.3/buildtools/wafsamba/wafsamba.py 2021-06-22 11:01:51.000000000 +0200 @@ -38,7 +38,7 @@ os.environ['PYTHONUNBUFFERED'] = '1' -if Context.HEXVERSION not in (0x2001400,): +if Context.HEXVERSION not in (0x2001500,): Logs.error(''' Please use the version of waf that comes with Samba, not a system installed version. See http://wiki.samba.org/index.php/Waf @@ -408,10 +408,10 @@ subsystem_group = group # only specify PIE flags for binaries - pie_cflags = cflags + pie_cflags = TO_LIST(cflags) pie_ldflags = TO_LIST(ldflags) if bld.env['ENABLE_PIE'] is True: - pie_cflags += ' -fPIE' + pie_cflags.extend(TO_LIST('-fPIE')) pie_ldflags.extend(TO_LIST('-pie')) if bld.env['ENABLE_RELRO'] is True: pie_ldflags.extend(TO_LIST('-Wl,-z,relro,-z,now')) @@ -635,6 +635,7 @@ target = modname, samba_cflags = CURRENT_CFLAGS(bld, modname, cflags, allow_warnings=allow_warnings, + use_hostcc=use_hostcc, hide_symbols=hide_symbols), depends_on = depends_on, samba_deps = TO_LIST(deps), @@ -716,13 +717,13 @@ bld.p_ln = bld.srcnode # we do want to see all targets! bld.env['USING_BUILD_GROUPS'] = True bld.add_group('setup') - bld.add_group('build_compiler_source') + bld.add_group('generators') + bld.add_group('hostcc_base_build_source') + bld.add_group('hostcc_base_build_main') + bld.add_group('hostcc_build_source') + bld.add_group('hostcc_build_main') bld.add_group('vscripts') bld.add_group('base_libraries') - bld.add_group('generators') - bld.add_group('compiler_prototypes') - bld.add_group('compiler_libraries') - bld.add_group('build_compilers') bld.add_group('build_source') bld.add_group('prototypes') bld.add_group('headers') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/buildtools/wafsamba/wscript new/talloc-2.3.3/buildtools/wafsamba/wscript --- old/talloc-2.3.2/buildtools/wafsamba/wscript 2021-01-25 09:35:07.413710600 +0100 +++ new/talloc-2.3.3/buildtools/wafsamba/wscript 2020-12-18 11:02:37.000000000 +0100 @@ -132,6 +132,9 @@ action="store_true", dest='undefined_sanitizer', default=False) + gr.add_option('--enable-clangdb', + help=("Enable use of clang_compilation_database"), + action="store_true", dest='enable_clangdb', default=False) gr.add_option('--enable-libfuzzer', help=("Build fuzzing binaries (use ADDITIONAL_CFLAGS to specify compiler options for libFuzzer or use CC=honggfuzz/hfuzz-cc)"), action="store_true", dest='enable_libfuzzer', default=False) @@ -657,12 +660,13 @@ conf.DEFINE('FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION', 1) conf.env.FUZZ_TARGET_LDFLAGS = Options.options.FUZZ_TARGET_LDFLAGS - conf.load('clang_compilation_database') - - # Create a symlink of the compile db for clangd - symlink(os.path.join(conf.bldnode.abspath(), 'default/compile_commands.json'), - os.path.join(conf.srcnode.abspath(), 'compile_commands.json'), - force=True) + conf.env.enable_clangdb = Options.options.enable_clangdb + if conf.env.enable_clangdb: + conf.load('clang_compilation_database') + # Create a symlink of the compile db for clangd + symlink(os.path.join(conf.bldnode.abspath(), 'default/compile_commands.json'), + os.path.join(conf.srcnode.abspath(), 'compile_commands.json'), + force=True) conf.SAMBA_BUILD_ENV() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/lib/replace/replace.c new/talloc-2.3.3/lib/replace/replace.c --- old/talloc-2.3.2/lib/replace/replace.c 2020-07-09 14:04:50.454105000 +0200 +++ new/talloc-2.3.3/lib/replace/replace.c 2021-07-12 12:24:49.000000000 +0200 @@ -1056,3 +1056,28 @@ #endif /* HAVE_PROGRAM_INVOCATION_SHORT_NAME */ } #endif /* HAVE_GETPROGNAME */ + +#ifndef HAVE_COPY_FILE_RANGE +# ifdef HAVE_SYSCALL_COPY_FILE_RANGE +# include <sys/syscall.h> +# endif +ssize_t rep_copy_file_range(int fd_in, + loff_t *off_in, + int fd_out, + loff_t *off_out, + size_t len, + unsigned int flags) +{ +# ifdef HAVE_SYSCALL_COPY_FILE_RANGE + return syscall(__NR_copy_file_range, + fd_in, + off_in, + fd_out, + off_out, + len, + flags); +# endif /* HAVE_SYSCALL_COPY_FILE_RANGE */ + errno = ENOSYS; + return -1; +} +#endif /* HAVE_COPY_FILE_RANGE */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/lib/replace/replace.h new/talloc-2.3.3/lib/replace/replace.h --- old/talloc-2.3.2/lib/replace/replace.h 2021-01-25 09:35:07.429711600 +0100 +++ new/talloc-2.3.3/lib/replace/replace.h 2021-07-12 12:24:49.000000000 +0200 @@ -964,6 +964,16 @@ const char *rep_getprogname(void); #endif +#ifndef HAVE_COPY_FILE_RANGE +#define copy_file_range rep_copy_file_range +ssize_t rep_copy_file_range(int fd_in, + loff_t *off_in, + int fd_out, + loff_t *off_out, + size_t len, + unsigned int flags); +#endif /* HAVE_COPY_FILE_RANGE */ + #ifndef FALL_THROUGH # ifdef HAVE_FALLTHROUGH_ATTRIBUTE # define FALL_THROUGH __attribute__ ((fallthrough)) @@ -977,6 +987,22 @@ bool socket_wrapper_enabled(void); bool uid_wrapper_enabled(void); +static inline bool _hexcharval(char c, uint8_t *val) +{ + if ((c >= '0') && (c <= '9')) { *val = c - '0'; return true; } + if ((c >= 'a') && (c <= 'f')) { *val = c - 'a' + 10; return true; } + if ((c >= 'A') && (c <= 'F')) { *val = c - 'A' + 10; return true; } + return false; +} + +static inline bool hex_byte(const char *in, uint8_t *out) +{ + uint8_t hi=0, lo=0; + bool ok = _hexcharval(in[0], &hi) && _hexcharval(in[1], &lo); + *out = (hi<<4)+lo; + return ok; +} + /* Needed for Solaris atomic_add_XX functions. */ #if defined(HAVE_SYS_ATOMIC_H) #include <sys/atomic.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/lib/replace/system/filesys.h new/talloc-2.3.3/lib/replace/system/filesys.h --- old/talloc-2.3.2/lib/replace/system/filesys.h 2020-07-09 14:04:50.454105000 +0200 +++ new/talloc-2.3.3/lib/replace/system/filesys.h 2020-12-18 11:02:37.000000000 +0100 @@ -199,6 +199,10 @@ #define mkdir(d,m) _mkdir(d) #endif +#ifdef DISABLE_OPATH +#undef O_PATH +#endif + /* this allows us to use a uniform error handling for our xattr wrappers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/lib/replace/system/nis.h new/talloc-2.3.3/lib/replace/system/nis.h --- old/talloc-2.3.2/lib/replace/system/nis.h 2020-01-21 15:09:48.005205600 +0100 +++ new/talloc-2.3.3/lib/replace/system/nis.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,55 +0,0 @@ -/* - Unix SMB/CIFS implementation. - - nis system include wrappers - - Copyright (C) Andrew Tridgell 2004 - - ** NOTE! The following LGPL license applies to the replace - ** library. This does NOT imply that all of Samba is released - ** under the LGPL - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef _nis_passwd_h -#define _nis_passwd_h - -#if defined(HAVE_RPC_RPC_H) -/* - * Check for AUTH_ERROR define conflict with rpc/rpc.h in prot.h. - */ -#if defined(HAVE_SYS_SECURITY_H) && defined(HAVE_RPC_AUTH_ERROR_CONFLICT) -#undef AUTH_ERROR -#endif /* HAVE_SYS_SECURITY_H && HAVE_RPC_AUTH_ERROR_CONFLICT */ - -#include <rpc/rpc.h> -#endif /* HAVE_RPC_RPC_H */ - - -#if defined (HAVE_NETGROUP) - -#if defined(HAVE_RPCSVC_YP_PROT_H) - -#include <rpcsvc/yp_prot.h> - -#endif /* HAVE_RPCSVC_YP_PROT_H */ - -#if defined(HAVE_RPCSVC_YPCLNT_H) -#include <rpcsvc/ypclnt.h> -#endif /* HAVE_RPCSVC_YPCLNT_H */ - -#endif /* HAVE_NETGROUP */ - -#endif /* _nis_passwd_h */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/lib/replace/tests/os2_delete.c new/talloc-2.3.3/lib/replace/tests/os2_delete.c --- old/talloc-2.3.2/lib/replace/tests/os2_delete.c 2020-01-21 15:09:48.005205600 +0100 +++ new/talloc-2.3.3/lib/replace/tests/os2_delete.c 2021-04-28 08:53:27.000000000 +0200 @@ -106,6 +106,7 @@ d = opendir(TESTDIR "/test0.txt"); if (d != NULL) FAILED("opendir() on file succeed"); if (errno != ENOTDIR) FAILED("opendir() on file didn't give ENOTDIR"); + closedir(d); d = opendir(TESTDIR); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/lib/replace/tests/testsuite.c new/talloc-2.3.3/lib/replace/tests/testsuite.c --- old/talloc-2.3.2/lib/replace/tests/testsuite.c 2020-07-09 14:04:50.454105000 +0200 +++ new/talloc-2.3.3/lib/replace/tests/testsuite.c 2021-06-22 11:01:51.000000000 +0200 @@ -164,11 +164,16 @@ static int test_strdup(void) { char *x; + int cmp; + printf("test: strdup\n"); x = strdup("bla"); - if (strcmp("bla", x) != 0) { + + cmp = strcmp("bla", x); + if (cmp != 0) { printf("failure: strdup [\nfailed: expected \"bla\", got \"%s\"\n]\n", x); + free(x); return false; } free(x); @@ -259,26 +264,44 @@ static int test_strndup(void) { char *x; + int cmp; + printf("test: strndup\n"); x = strndup("bla", 0); - if (strcmp(x, "") != 0) { + cmp = strcmp(x, ""); + free(x); + if (cmp != 0) { printf("failure: strndup [\ninvalid\n]\n"); return false; } - free(x); + x = strndup("bla", 2); - if (strcmp(x, "bl") != 0) { + cmp = strcmp(x, "bl"); + free(x); + if (cmp != 0) { printf("failure: strndup [\ninvalid\n]\n"); return false; } - free(x); + +#ifdef __GNUC__ +# if __GNUC__ < 11 + /* + * This code will not compile with gcc11 -O3 anymore. + * + * error: ???strndup??? specified bound 10 exceeds source size 4 [-Werror=stringop-overread] + * x = strndup("bla", 10); + * ^~~~~~~~~~~~~~~~~~ + */ x = strndup("bla", 10); - if (strcmp(x, "bla") != 0) { + cmp = strcmp(x, "bla"); + free(x); + if (cmp != 0) { printf("failure: strndup [\ninvalid\n]\n"); - free(x); return false; } - free(x); +# endif +#endif /* __GNUC__ */ + printf("success: strndup\n"); return true; } @@ -325,24 +348,30 @@ static int test_asprintf(void) { - char *x; + char *x = NULL; + printf("test: asprintf\n"); if (asprintf(&x, "%d", 9) != 1) { printf("failure: asprintf [\ngenerate asprintf\n]\n"); + free(x); return false; } if (strcmp(x, "9") != 0) { printf("failure: asprintf [\ngenerate asprintf\n]\n"); + free(x); return false; } if (asprintf(&x, "dat%s", "a") != 4) { printf("failure: asprintf [\ngenerate asprintf\n]\n"); + free(x); return false; } if (strcmp(x, "data") != 0) { printf("failure: asprintf [\ngenerate asprintf\n]\n"); + free(x); return false; } + free(x); printf("success: asprintf\n"); return true; } @@ -1070,6 +1099,7 @@ fd = dup(0); if (fd == -1) { perror("dup failed"); + closefrom(3); return false; } @@ -1077,6 +1107,7 @@ if (fd >= 1000) { printf("fd=%d\n", fd); + closefrom(3); return false; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/lib/replace/wscript new/talloc-2.3.3/lib/replace/wscript --- old/talloc-2.3.2/lib/replace/wscript 2021-01-25 09:35:07.429711600 +0100 +++ new/talloc-2.3.3/lib/replace/wscript 2021-07-12 12:24:49.000000000 +0200 @@ -95,17 +95,6 @@ if not conf.CONFIG_SET('HAVE_RPC_RPC_H'): Logs.warn('No rpc/rpc.h header found, tirpc or libntirpc missing?') - if not conf.CHECK_LIB('nsl'): - conf.SET_TARGET_TYPE('nsl', 'EMPTY') - conf.CHECK_HEADERS('rpc/rpc.h rpcsvc/yp_prot.h', lib='tirpc') - if not conf.CONFIG_SET('HAVE_RPCSVC_YP_PROT_H'): - if conf.CHECK_CFG(package='libnsl', args='--cflags --libs', - msg='Checking for libnsl', - uselib_store='NSL'): - conf.SET_TARGET_TYPE('nsl', 'SYSLIB') - conf.CHECK_HEADERS('rpc/rpc.h rpcsvc/yp_prot.h', lib='tirpc nsl') - conf.CHECK_HEADERS('rpcsvc/nis.h rpcsvc/ypclnt.h', lib='tirpc nsl') - # This file is decprecated with glibc >= 2.30 so we need to check if it # includes a deprecation warning: # #warning "The <sys/sysctl.h> header is deprecated and will be removed." @@ -465,6 +454,16 @@ conf.CHECK_FUNCS('getpwent_r getpwnam_r getpwuid_r epoll_create') conf.CHECK_FUNCS('port_create') conf.CHECK_FUNCS('getprogname') + if not conf.CHECK_FUNCS('copy_file_range'): + conf.CHECK_CODE(''' +#include <sys/syscall.h> +#include <unistd.h> +syscall(SYS_copy_file_range,0,NULL,0,NULL,0,0); + ''', + 'HAVE_SYSCALL_COPY_FILE_RANGE', + msg='Checking whether we have copy_file_range system call') + if conf.CONFIG_SET('HAVE_COPY_FILE_RANGE') or conf.CONFIG_SET('HAVE_SYSCALL_COPY_FILE_RANGE'): + conf.DEFINE('USE_COPY_FILE_RANGE', 1) conf.SET_TARGET_TYPE('attr', 'EMPTY') @@ -846,7 +845,7 @@ 'strsep', 'strtok_r', 'strtoll', 'strtoull', 'setenv', 'unsetenv', 'utime', 'utimes', 'dup2', 'chown', 'link', 'readlink', 'symlink', 'lchown', 'realpath', 'memmem', 'vdprintf', - 'dprintf', 'get_current_dir_name', + 'dprintf', 'get_current_dir_name', 'copy_file_range', 'strerror_r', 'clock_gettime', 'memset_s'], 'timegm.c': ['timegm'], # Note: C99_VSNPRINTF is not a function, but a special condition @@ -881,8 +880,7 @@ REPLACE_HOSTCC_SOURCE, use_hostcc=True, use_global_deps=False, - cflags='-D_SAMBA_HOSTCC_', - group='compiler_libraries', + group='hostcc_base_build_main', deps = extra_libs ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/pytalloc.c new/talloc-2.3.3/pytalloc.c --- old/talloc-2.3.2/pytalloc.c 2020-07-09 14:04:50.454105000 +0200 +++ new/talloc-2.3.3/pytalloc.c 2021-06-22 11:01:51.000000000 +0200 @@ -3,18 +3,22 @@ Python Talloc Module Copyright (C) Jelmer Vernooij <jel...@samba.org> 2010-2011 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + ** NOTE! The following LGPL license applies to the talloc + ** library. This does NOT imply that all of Samba is released + ** under the LGPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #include <Python.h> @@ -37,7 +41,7 @@ } else { talloc_report_full(pytalloc_get_mem_ctx(py_obj), stdout); } - return Py_None; + Py_RETURN_NONE; } /* enable null tracking */ @@ -45,7 +49,7 @@ PyObject *Py_UNUSED(ignored)) { talloc_enable_null_tracking(); - return Py_None; + Py_RETURN_NONE; } /* return the number of talloc blocks */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/pytalloc.h new/talloc-2.3.3/pytalloc.h --- old/talloc-2.3.2/pytalloc.h 2021-01-25 09:35:07.429711600 +0100 +++ new/talloc-2.3.3/pytalloc.h 2021-03-24 12:48:55.000000000 +0100 @@ -3,18 +3,22 @@ Samba utility functions Copyright (C) Jelmer Vernooij <jel...@samba.org> 2008 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, + ** NOTE! The following LGPL license applies to the talloc + ** library. This does NOT imply that all of Samba is released + ** under the LGPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #ifndef _PYTALLOC_H_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/pytalloc_util.c new/talloc-2.3.3/pytalloc_util.c --- old/talloc-2.3.2/pytalloc_util.c 2020-07-09 14:04:50.454105000 +0200 +++ new/talloc-2.3.3/pytalloc_util.c 2021-03-24 12:48:55.000000000 +0100 @@ -3,18 +3,22 @@ Python/Talloc glue Copyright (C) Jelmer Vernooij <jel...@samba.org> 2008 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, + ** NOTE! The following LGPL license applies to the talloc + ** library. This does NOT imply that all of Samba is released + ** under the LGPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #include <Python.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/Build.py new/talloc-2.3.3/third_party/waf/waflib/Build.py --- old/talloc-2.3.2/third_party/waf/waflib/Build.py 2020-01-21 15:09:49.017209300 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/Build.py 2020-12-18 11:02:37.000000000 +0100 @@ -753,10 +753,12 @@ else: ln = self.launch_node() if ln.is_child_of(self.bldnode): - Logs.warn('Building from the build directory, forcing --targets=*') + if Logs.verbose > 1: + Logs.warn('Building from the build directory, forcing --targets=*') ln = self.srcnode elif not ln.is_child_of(self.srcnode): - Logs.warn('CWD %s is not under %s, forcing --targets=* (run distclean?)', ln.abspath(), self.srcnode.abspath()) + if Logs.verbose > 1: + Logs.warn('CWD %s is not under %s, forcing --targets=* (run distclean?)', ln.abspath(), self.srcnode.abspath()) ln = self.srcnode def is_post(tg, ln): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/Context.py new/talloc-2.3.3/third_party/waf/waflib/Context.py --- old/talloc-2.3.2/third_party/waf/waflib/Context.py 2021-01-25 09:35:07.541717500 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/Context.py 2020-12-18 11:02:37.000000000 +0100 @@ -18,13 +18,13 @@ import imp # the following 3 constants are updated on each new release (do not touch) -HEXVERSION=0x2001400 +HEXVERSION=0x2001500 """Constant updated on new releases""" -WAFVERSION="2.0.20" +WAFVERSION="2.0.21" """Constant updated on new releases""" -WAFREVISION="668769470956da8c5b60817cb8884cd7d0f87cd4" +WAFREVISION="edde20a6425a5c3eb6b47d5f3f5c4fbc93fed5f4" """Git revision when the waf version is updated""" WAFNAME="waf" @@ -530,7 +530,7 @@ """ Prints a configuration message of the form ``msg: result``. The second part of the message will be in colors. The output - can be disabled easly by setting ``in_msg`` to a positive value:: + can be disabled easily by setting ``in_msg`` to a positive value:: def configure(conf): self.in_msg = 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/Tools/asm.py new/talloc-2.3.3/third_party/waf/waflib/Tools/asm.py --- old/talloc-2.3.2/third_party/waf/waflib/Tools/asm.py 2020-01-21 15:10:42.257415800 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/Tools/asm.py 2020-12-18 11:02:37.000000000 +0100 @@ -56,13 +56,11 @@ Compiles asm files by gas/nasm/yasm/... """ color = 'BLUE' - run_str = '${AS} ${ASFLAGS} ${ASMPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${AS_SRC_F}${SRC} ${AS_TGT_F}${TGT}' + run_str = '${AS} ${ASFLAGS} ${ASMPATH_ST:INCPATHS} ${ASMDEFINES_ST:DEFINES} ${AS_SRC_F}${SRC} ${AS_TGT_F}${TGT}' def scan(self): if self.env.ASM_NAME == 'gas': return c_preproc.scan(self) - Logs.warn('There is no dependency scanner for Nasm!') - return [[], []] elif self.env.ASM_NAME == 'nasm': Logs.warn('The Nasm dependency scanner is incomplete!') @@ -106,3 +104,4 @@ def configure(conf): conf.env.ASMPATH_ST = '-I%s' + conf.env.ASMDEFINES_ST = '-D%s' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/Tools/c_config.py new/talloc-2.3.3/third_party/waf/waflib/Tools/c_config.py --- old/talloc-2.3.2/third_party/waf/waflib/Tools/c_config.py 2021-01-25 09:35:07.541717500 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/Tools/c_config.py 2020-12-18 11:02:37.000000000 +0100 @@ -68,6 +68,7 @@ '__s390__' : 's390', '__sh__' : 'sh', '__xtensa__' : 'xtensa', +'__e2k__' : 'e2k', } @conf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/Tools/msvc.py new/talloc-2.3.3/third_party/waf/waflib/Tools/msvc.py --- old/talloc-2.3.2/third_party/waf/waflib/Tools/msvc.py 2020-01-21 15:09:49.021209200 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/Tools/msvc.py 2020-12-18 11:02:37.000000000 +0100 @@ -99,7 +99,13 @@ """List of icl platforms""" def options(opt): - opt.add_option('--msvc_version', type='string', help = 'msvc version, eg: "msvc 10.0,msvc 9.0"', default='') + default_ver = '' + vsver = os.getenv('VSCMD_VER') + if vsver: + m = re.match(r'(^\d+\.\d+).*', vsver) + if m: + default_ver = 'msvc %s' % m.group(1) + opt.add_option('--msvc_version', type='string', help = 'msvc version, eg: "msvc 10.0,msvc 9.0"', default=default_ver) opt.add_option('--msvc_targets', type='string', help = 'msvc targets, eg: "x64,arm"', default='') opt.add_option('--no-msvc-lazy', action='store_false', help = 'lazily check msvc target environments', default=True, dest='msvc_lazy') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/Tools/qt5.py new/talloc-2.3.3/third_party/waf/waflib/Tools/qt5.py --- old/talloc-2.3.2/third_party/waf/waflib/Tools/qt5.py 2021-01-25 09:35:07.541717500 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/Tools/qt5.py 2020-12-18 11:02:37.000000000 +0100 @@ -57,7 +57,23 @@ (QT5_{ROOT,DIR,MOC,UIC,XCOMPILE}) allow finer tuning of the tool, tool path selection, etc; please read the source for more info. -The detection uses pkg-config on Linux by default. To force static library detection use: +The detection uses pkg-config on Linux by default. The list of +libraries to be requested to pkg-config is formulated by scanning +in the QTLIBS directory (that can be passed via --qtlibs or by +setting the environment variable QT5_LIBDIR otherwise is derived +by querying qmake for QT_INSTALL_LIBS directory) for shared/static +libraries present. +Alternatively the list of libraries to be requested via pkg-config +can be set using the qt5_vars attribute, ie: + + conf.qt5_vars = ['Qt5Core', 'Qt5Gui', 'Qt5Widgets', 'Qt5Test']; + +This can speed up configuration phase if needed libraries are +known beforehand, can improve detection on systems with a +sparse QT5 libraries installation (ie. NIX) and can improve +detection of some header-only Qt modules (ie. Qt5UiPlugin). + +To force static library detection use: QT5_XCOMPILE=1 QT5_FORCE_STATIC=1 waf configure """ @@ -466,6 +482,9 @@ The detection uses the program ``pkg-config`` through :py:func:`waflib.Tools.config_c.check_cfg` """ + if 'COMPILER_CXX' not in self.env: + self.fatal('No CXX compiler defined: did you forget to configure compiler_cxx first?') + self.find_qt5_binaries() self.set_qt5_libs_dir() self.set_qt5_libs_to_check() @@ -478,9 +497,6 @@ if not has_xml: Logs.error('No xml.sax support was found, rcc dependencies will be incomplete!') - if 'COMPILER_CXX' not in self.env: - self.fatal('No CXX compiler defined: did you forget to configure compiler_cxx first?') - # Qt5 may be compiled with '-reduce-relocations' which requires dependent programs to have -fPIE or -fPIC? frag = '#include <QMap>\nint main(int argc, char **argv) {QMap<int,int> m;return m.keys().size();}\n' uses = 'QT5CORE' @@ -637,7 +653,7 @@ except Errors.WafError: qtdir = self.cmd_and_log(env.QMAKE + ['-query', 'QT_INSTALL_PREFIX']).strip() qtlibs = os.path.join(qtdir, 'lib') - self.msg('Found the Qt5 libraries in', qtlibs) + self.msg('Found the Qt5 library path', qtlibs) env.QTLIBS = qtlibs @conf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/Tools/waf_unit_test.py new/talloc-2.3.3/third_party/waf/waflib/Tools/waf_unit_test.py --- old/talloc-2.3.2/third_party/waf/waflib/Tools/waf_unit_test.py 2020-01-21 15:09:49.021209200 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/Tools/waf_unit_test.py 2020-12-18 11:02:37.000000000 +0100 @@ -97,6 +97,7 @@ if isinstance(v, str): v = v.split(os.pathsep) self.ut_env[k] = os.pathsep.join(p + v) + self.env.append_value('UT_DEPS', ['%r%r' % (key, self.ut_env[key]) for key in self.ut_env]) @feature('test') @after_method('apply_link', 'process_use') @@ -108,7 +109,8 @@ tsk = self.create_task('utest', self.link_task.outputs) if getattr(self, 'ut_str', None): self.ut_run, lst = Task.compile_fun(self.ut_str, shell=getattr(self, 'ut_shell', False)) - tsk.vars = lst + tsk.vars + tsk.vars = tsk.vars + lst + self.env.append_value('UT_DEPS', self.ut_str) self.handle_ut_cwd('ut_cwd') @@ -139,6 +141,10 @@ if not hasattr(self, 'ut_cmd'): self.ut_cmd = getattr(Options.options, 'testcmd', False) + self.env.append_value('UT_DEPS', str(self.ut_cmd)) + self.env.append_value('UT_DEPS', self.ut_paths) + self.env.append_value('UT_DEPS', ['%r%r' % (key, self.ut_env[key]) for key in self.ut_env]) + @taskgen_method def add_test_results(self, tup): """Override and return tup[1] to interrupt the build immediately if a test does not run""" @@ -159,7 +165,7 @@ """ color = 'PINK' after = ['vnum', 'inst'] - vars = [] + vars = ['UT_DEPS'] def runnable_status(self): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/extras/boost.py new/talloc-2.3.3/third_party/waf/waflib/extras/boost.py --- old/talloc-2.3.2/third_party/waf/waflib/extras/boost.py 2020-01-21 15:09:49.021209200 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/extras/boost.py 2020-12-18 11:02:37.000000000 +0100 @@ -270,10 +270,12 @@ return file return None + # extensions from Tools.ccroot.lib_patterns + wo_ext = re.compile(r"\.(a|so|lib|dll|dylib)(\.[0-9\.]+)?$") def format_lib_name(name): if name.startswith('lib') and self.env.CC_NAME != 'msvc': name = name[3:] - return name[:name.rfind('.')] + return wo_ext.sub("", name) def match_libs(lib_names, is_static): libs = [] @@ -522,4 +524,3 @@ except: continue install_boost.done = False - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/extras/c_dumbpreproc.py new/talloc-2.3.3/third_party/waf/waflib/extras/c_dumbpreproc.py --- old/talloc-2.3.2/third_party/waf/waflib/extras/c_dumbpreproc.py 2020-01-21 15:09:49.025209400 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/extras/c_dumbpreproc.py 2020-12-18 11:02:37.000000000 +0100 @@ -66,7 +66,7 @@ if x == c_preproc.POPFILE: self.currentnode_stack.pop() continue - self.tryfind(y) + self.tryfind(y, env=env) c_preproc.c_parser = dumb_parser diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/extras/doxygen.py new/talloc-2.3.3/third_party/waf/waflib/extras/doxygen.py --- old/talloc-2.3.2/third_party/waf/waflib/extras/doxygen.py 2021-01-25 09:35:07.541717500 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/extras/doxygen.py 2020-12-18 11:02:37.000000000 +0100 @@ -208,10 +208,10 @@ self.bld.fatal('doxygen file %s not found' % self.doxyfile) # the task instance - dsk = self.create_task('doxygen', node) + dsk = self.create_task('doxygen', node, always_run=getattr(self, 'always', False)) if getattr(self, 'doxy_tar', None): - tsk = self.create_task('tar') + tsk = self.create_task('tar', always_run=getattr(self, 'always', False)) tsk.input_tasks = [dsk] tsk.set_outputs(self.path.find_or_declare(self.doxy_tar)) if self.doxy_tar.endswith('bz2'): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/extras/file_to_object.py new/talloc-2.3.3/third_party/waf/waflib/extras/file_to_object.py --- old/talloc-2.3.2/third_party/waf/waflib/extras/file_to_object.py 2020-01-21 15:09:49.025209400 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/extras/file_to_object.py 2020-12-18 11:02:37.000000000 +0100 @@ -31,7 +31,7 @@ """ -import os +import os, sys from waflib import Task, TaskGen, Errors def filename_c_escape(x): @@ -95,12 +95,17 @@ name = "_binary_" + "".join(name) + def char_to_num(ch): + if sys.version_info[0] < 3: + return ord(ch) + return ch + data = self.inputs[0].read('rb') lines, line = [], [] for idx_byte, byte in enumerate(data): line.append(byte) if len(line) > 15 or idx_byte == size-1: - lines.append(", ".join(("0x%02x" % ord(x)) for x in line)) + lines.append(", ".join(("0x%02x" % char_to_num(x)) for x in line)) line = [] data = ",\n ".join(lines) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/extras/gccdeps.py new/talloc-2.3.3/third_party/waf/waflib/extras/gccdeps.py --- old/talloc-2.3.2/third_party/waf/waflib/extras/gccdeps.py 2021-01-25 09:35:07.541717500 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/extras/gccdeps.py 2020-12-18 11:02:37.000000000 +0100 @@ -163,10 +163,25 @@ def sig_implicit_deps(self): if not self.__class__.__name__ in self.env.ENABLE_GCCDEPS: return super(self.derived_gccdeps, self).sig_implicit_deps() + bld = self.generator.bld + try: - return Task.Task.sig_implicit_deps(self) - except Errors.WafError: - return Utils.SIG_NIL + return self.compute_sig_implicit_deps() + except Errors.TaskNotReady: + raise ValueError("Please specify the build order precisely with gccdeps (asm/c/c++ tasks)") + except EnvironmentError: + # If a file is renamed, assume the dependencies are stale and must be recalculated + for x in bld.node_deps.get(self.uid(), []): + if not x.is_bld() and not x.exists(): + try: + del x.parent.children[x.name] + except KeyError: + pass + + key = self.uid() + bld.node_deps[key] = [] + bld.raw_deps[key] = [] + return Utils.SIG_NIL def wrap_compiled_task(classname): derived_class = type(classname, (Task.classes[classname],), {}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/extras/msvcdeps.py new/talloc-2.3.3/third_party/waf/waflib/extras/msvcdeps.py --- old/talloc-2.3.2/third_party/waf/waflib/extras/msvcdeps.py 2020-01-21 15:09:49.025209400 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/extras/msvcdeps.py 2020-12-18 11:02:37.000000000 +0100 @@ -150,11 +150,25 @@ def sig_implicit_deps(self): if self.env.CC_NAME not in supported_compilers: return super(self.derived_msvcdeps, self).sig_implicit_deps() + bld = self.generator.bld try: - return Task.Task.sig_implicit_deps(self) - except Errors.WafError: - return Utils.SIG_NIL + return self.compute_sig_implicit_deps() + except Errors.TaskNotReady: + raise ValueError("Please specify the build order precisely with msvcdeps (c/c++ tasks)") + except EnvironmentError: + # If a file is renamed, assume the dependencies are stale and must be recalculated + for x in bld.node_deps.get(self.uid(), []): + if not x.is_bld() and not x.exists(): + try: + del x.parent.children[x.name] + except KeyError: + pass + + key = self.uid() + bld.node_deps[key] = [] + bld.raw_deps[key] = [] + return Utils.SIG_NIL def exec_command(self, cmd, **kw): if self.env.CC_NAME not in supported_compilers: @@ -211,11 +225,14 @@ # get one from the exception object ret = getattr(e, 'returncode', 1) + Logs.debug('msvcdeps: Running for: %s' % self.inputs[0]) for line in raw_out.splitlines(): if line.startswith(INCLUDE_PATTERN): - inc_path = line[len(INCLUDE_PATTERN):].strip() + # Only strip whitespace after log to preserve + # dependency structure in debug output + inc_path = line[len(INCLUDE_PATTERN):] Logs.debug('msvcdeps: Regex matched %s', inc_path) - self.msvcdeps_paths.append(inc_path) + self.msvcdeps_paths.append(inc_path.strip()) else: out.append(line) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/extras/pch.py new/talloc-2.3.3/third_party/waf/waflib/extras/pch.py --- old/talloc-2.3.2/third_party/waf/waflib/extras/pch.py 2020-01-21 15:09:49.025209400 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/extras/pch.py 2020-12-18 11:02:37.000000000 +0100 @@ -90,7 +90,7 @@ if getattr(self, 'name', None): try: - task = self.bld.pch_tasks["%s.%s" % (self.name, self.idx)] + task = self.bld.pch_tasks[self.name] self.bld.fatal("Duplicated 'pch' task with name %r" % "%s.%s" % (self.name, self.idx)) except KeyError: pass @@ -104,7 +104,7 @@ self.pch_task = task if getattr(self, 'name', None): - self.bld.pch_tasks["%s.%s" % (self.name, self.idx)] = task + self.bld.pch_tasks[self.name] = task @TaskGen.feature('cxx') @TaskGen.after_method('process_source', 'propagate_uselib_vars') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/extras/sphinx.py new/talloc-2.3.3/third_party/waf/waflib/extras/sphinx.py --- old/talloc-2.3.2/third_party/waf/waflib/extras/sphinx.py 2020-01-21 15:09:49.029209400 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/extras/sphinx.py 2020-12-18 11:02:37.000000000 +0100 @@ -20,7 +20,7 @@ from waflib.Node import Node from waflib import Utils -from waflib.Task import Task +from waflib import Task from waflib.TaskGen import feature, after_method @@ -55,13 +55,9 @@ sphinx_build_task.set_outputs(self.path.get_bld()) # the sphinx-build results are in <build + output_format> directory - sphinx_output_directory = self.path.get_bld().make_node(self.env.SPHINX_OUTPUT_FORMAT) - sphinx_output_directory.mkdir() + self.sphinx_output_directory = self.path.get_bld().make_node(self.env.SPHINX_OUTPUT_FORMAT) + self.sphinx_output_directory.mkdir() Utils.def_attrs(self, install_path=get_install_path(self)) - self.add_install_files(install_to=self.install_path, - install_from=sphinx_output_directory.ant_glob('**/*'), - cwd=sphinx_output_directory, - relative_trick=True) def get_install_path(tg): @@ -73,9 +69,37 @@ return tg.env.DOCDIR -class SphinxBuildingTask(Task): +class SphinxBuildingTask(Task.Task): color = 'BOLD' run_str = '${SPHINX_BUILD} -M ${SPHINX_OUTPUT_FORMAT} ${SRC} ${TGT} ${SPHINX_OPTIONS}' def keyword(self): return 'Compiling (%s)' % self.env.SPHINX_OUTPUT_FORMAT + + def runnable_status(self): + + for x in self.run_after: + if not x.hasrun: + return Task.ASK_LATER + + self.signature() + ret = Task.Task.runnable_status(self) + if ret == Task.SKIP_ME: + # in case the files were removed + self.add_install() + return ret + + + def post_run(self): + self.add_install() + return Task.Task.post_run(self) + + + def add_install(self): + nodes = self.generator.sphinx_output_directory.ant_glob('**/*', quiet=True) + self.outputs += nodes + self.generator.add_install_files(install_to=self.generator.install_path, + install_from=nodes, + postpone=False, + cwd=self.generator.sphinx_output_directory, + relative_trick=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/extras/wafcache.py new/talloc-2.3.3/third_party/waf/waflib/extras/wafcache.py --- old/talloc-2.3.2/third_party/waf/waflib/extras/wafcache.py 2021-01-25 09:35:07.545717700 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/extras/wafcache.py 2020-12-18 11:02:37.000000000 +0100 @@ -16,10 +16,19 @@ - URL to a cache server, for example: export WAFCACHE=http://localhost:8080/files/ in that case, GET/POST requests are made to urls of the form - http://localhost:8080/files/000000000/0 (cache management is then up to the server) - - GCS or S3 bucket - gs://my-bucket/ - s3://my-bucket/ + http://localhost:8080/files/000000000/0 (cache management is delegated to the server) + - GCS, S3 or MINIO bucket + gs://my-bucket/ (uses gsutil command line tool or WAFCACHE_CMD) + s3://my-bucket/ (uses aws command line tool or WAFCACHE_CMD) + minio://my-bucket/ (uses mc command line tool or WAFCACHE_CMD) +* WAFCACHE_CMD: bucket upload/download command, for example: + WAFCACHE_CMD="gsutil cp %{SRC} %{TGT}" + Note that the WAFCACHE bucket value is used for the source or destination + depending on the operation (upload or download). For example, with: + WAFCACHE="gs://mybucket/" + the following commands may be run: + gsutil cp build/myprogram gs://mybucket/aa/aaaaa/1 + gsutil cp gs://mybucket/bb/bbbbb/2 build/somefile * WAFCACHE_NO_PUSH: if set, disables pushing to the cache * WAFCACHE_VERBOSITY: if set, displays more detailed cache operations @@ -30,6 +39,7 @@ * WAFCACHE_EVICT_MAX_BYTES: maximum amount of cache size in bytes (10GB) * WAFCACHE_EVICT_INTERVAL_MINUTES: minimum time interval to try and trim the cache (3 minutess) + Usage:: def build(bld): @@ -41,7 +51,7 @@ waf clean build --zones=wafcache """ -import atexit, base64, errno, fcntl, getpass, os, shutil, sys, time, traceback, urllib3 +import atexit, base64, errno, fcntl, getpass, os, re, shutil, sys, time, traceback, urllib3, shlex try: import subprocess32 as subprocess except ImportError: @@ -53,6 +63,7 @@ default_wafcache_dir = os.path.join(base_cache, 'wafcache_' + getpass.getuser()) CACHE_DIR = os.environ.get('WAFCACHE', default_wafcache_dir) +WAFCACHE_CMD = os.environ.get('WAFCACHE_CMD') TRIM_MAX_FOLDERS = int(os.environ.get('WAFCACHE_TRIM_MAX_FOLDER', 1000000)) EVICT_INTERVAL_MINUTES = int(os.environ.get('WAFCACHE_EVICT_INTERVAL_MINUTES', 3)) EVICT_MAX_BYTES = int(os.environ.get('WAFCACHE_EVICT_MAX_BYTES', 10**10)) @@ -60,6 +71,8 @@ WAFCACHE_VERBOSITY = 1 if os.environ.get('WAFCACHE_VERBOSITY') else 0 OK = "ok" +re_waf_cmd = re.compile('(?P<src>%{SRC})|(?P<tgt>%{TGT})') + try: import cPickle except ImportError: @@ -233,8 +246,9 @@ # already called once return - for x in range(bld.jobs): - process_pool.append(get_process()) + # pre-allocation + processes = [get_process() for x in range(bld.jobs)] + process_pool.extend(processes) Task.Task.can_retrieve_cache = can_retrieve_cache Task.Task.put_files_cache = put_files_cache @@ -449,10 +463,20 @@ class bucket_cache(object): def bucket_copy(self, source, target): - if CACHE_DIR.startswith('s3://'): + if WAFCACHE_CMD: + def replacer(match): + if match.group('src'): + return source + elif match.group('tgt'): + return target + cmd = [re_waf_cmd.sub(replacer, x) for x in shlex.split(WAFCACHE_CMD)] + elif CACHE_DIR.startswith('s3://'): cmd = ['aws', 's3', 'cp', source, target] - else: + elif CACHE_DIR.startswith('gs://'): cmd = ['gsutil', 'cp', source, target] + else: + cmd = ['mc', 'cp', source, target] + proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = proc.communicate() if proc.returncode: @@ -510,7 +534,9 @@ sys.stdout.flush() if __name__ == '__main__': - if CACHE_DIR.startswith('s3://') or CACHE_DIR.startswith('gs://'): + if CACHE_DIR.startswith('s3://') or CACHE_DIR.startswith('gs://') or CACHE_DIR.startswith('minio://'): + if CACHE_DIR.startswith('minio://'): + CACHE_DIR = CACHE_DIR[8:] # minio doesn't need the protocol part, uses config aliases service = bucket_cache() elif CACHE_DIR.startswith('http'): service = netcache() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/third_party/waf/waflib/extras/xcode6.py new/talloc-2.3.3/third_party/waf/waflib/extras/xcode6.py --- old/talloc-2.3.2/third_party/waf/waflib/extras/xcode6.py 2020-01-21 15:09:49.029209400 +0100 +++ new/talloc-2.3.3/third_party/waf/waflib/extras/xcode6.py 2020-12-18 11:02:37.000000000 +0100 @@ -99,7 +99,7 @@ ... } 'Release': { - 'ARCHS' x86_64' + 'ARCHS': x86_64' ... } } @@ -163,12 +163,12 @@ result = result + "\t\t}" return result elif isinstance(value, str): - return "\"%s\"" % value + return '"%s"' % value.replace('"', '\\\\\\"') elif isinstance(value, list): result = "(\n" for i in value: - result = result + "\t\t\t%s,\n" % self.tostring(i) - result = result + "\t\t)" + result = result + "\t\t\t\t%s,\n" % self.tostring(i) + result = result + "\t\t\t)" return result elif isinstance(value, XCodeNode): return value._id @@ -565,13 +565,13 @@ # Override target specific build settings bldsettings = { 'HEADER_SEARCH_PATHS': ['$(inherited)'] + self.env['INCPATHS'], - 'LIBRARY_SEARCH_PATHS': ['$(inherited)'] + Utils.to_list(self.env.LIBPATH) + Utils.to_list(self.env.STLIBPATH) + Utils.to_list(self.env.LIBDIR) , + 'LIBRARY_SEARCH_PATHS': ['$(inherited)'] + Utils.to_list(self.env.LIBPATH) + Utils.to_list(self.env.STLIBPATH) + Utils.to_list(self.env.LIBDIR), 'FRAMEWORK_SEARCH_PATHS': ['$(inherited)'] + Utils.to_list(self.env.FRAMEWORKPATH), - 'OTHER_LDFLAGS': libs + ' ' + frameworks, - 'OTHER_LIBTOOLFLAGS': bld.env['LINKFLAGS'], + 'OTHER_LDFLAGS': libs + ' ' + frameworks + ' ' + ' '.join(bld.env['LINKFLAGS']), 'OTHER_CPLUSPLUSFLAGS': Utils.to_list(self.env['CXXFLAGS']), 'OTHER_CFLAGS': Utils.to_list(self.env['CFLAGS']), - 'INSTALL_PATH': [] + 'INSTALL_PATH': [], + 'GCC_PREPROCESSOR_DEFINITIONS': self.env['DEFINES'] } # Install path @@ -591,7 +591,7 @@ # The keys represents different build configuration, e.g. Debug, Release and so on.. # Insert our generated build settings to all configuration names - keys = set(settings.keys() + bld.env.PROJ_CONFIGURATION.keys()) + keys = set(settings.keys()) | set(bld.env.PROJ_CONFIGURATION.keys()) for k in keys: if k in settings: settings[k].update(bldsettings) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/talloc-2.3.2/wscript new/talloc-2.3.3/wscript --- old/talloc-2.3.2/wscript 2021-01-25 09:35:07.429711600 +0100 +++ new/talloc-2.3.3/wscript 2021-07-15 09:04:32.000000000 +0200 @@ -1,7 +1,7 @@ #!/usr/bin/env python APPNAME = 'talloc' -VERSION = '2.3.2' +VERSION = '2.3.3' import os import sys