The branch, master has been updated via 5674c21c115 Added redirect from GitHub to GitLab via f87d6cbfff3 ctdb/wscript: make use of MODE_{644,744,755,777} via 19d71597b07 wafsamba: add MODE_{744,_777} via 8ba0a9a1abb ctdb/wscript: use python 3.6 compatible functions via a83e4a24abd buildtools: remove unused buildtools/bin/waf-1.9 from 8b8d9fdad4a winbindd: Route predefined domains through the BUILTIN domain child
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 5674c21c1156bab0c0ec461e4db147f431ec50d6 Author: Daniel Southward-Ellis <danielsouthwardel...@catalyst.net.nz> Date: Tue Dec 4 14:35:47 2018 +1300 Added redirect from GitHub to GitLab Signed-off-by: Daniel Southward-Ellis <danielsouthwardel...@catalyst.net.nz> Reviewed-by: Gary Lockyer <g...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Autobuild-User(master): Stefan Metzmacher <me...@samba.org> Autobuild-Date(master): Wed Dec 5 16:35:33 CET 2018 on sn-devel-144 commit f87d6cbfff3ebb74fe09b9547676f16ecd8547a8 Author: Stefan Metzmacher <me...@samba.org> Date: Wed Dec 5 00:05:36 2018 +0100 ctdb/wscript: make use of MODE_{644,744,755,777} Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 19d71597b078544e0527a5d07b65c454e4534931 Author: Stefan Metzmacher <me...@samba.org> Date: Sat Nov 17 13:11:52 2018 +0100 wafsamba: add MODE_{744,_777} Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 8ba0a9a1abb8bbe1df5ff808645adf305bc4e0b3 Author: Stefan Metzmacher <me...@samba.org> Date: Mon Nov 19 12:05:29 2018 +0100 ctdb/wscript: use python 3.6 compatible functions Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit a83e4a24abd4116c78b7fa775b7f05511d843481 Author: Stefan Metzmacher <me...@samba.org> Date: Mon Nov 19 12:04:56 2018 +0100 buildtools: remove unused buildtools/bin/waf-1.9 Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> ----------------------------------------------------------------------- Summary of changes: .github/contributing.md | 4 + .github/pull_request_template.md | 4 + buildtools/bin/waf-1.9 | 164 ------------------------------------- buildtools/wafsamba/samba_utils.py | 2 + ctdb/wscript | 30 +++---- 5 files changed, 26 insertions(+), 178 deletions(-) create mode 100644 .github/contributing.md create mode 100644 .github/pull_request_template.md delete mode 100755 buildtools/bin/waf-1.9 Changeset truncated at 500 lines: diff --git a/.github/contributing.md b/.github/contributing.md new file mode 100644 index 00000000000..ad5136b3bc3 --- /dev/null +++ b/.github/contributing.md @@ -0,0 +1,4 @@ +## Samba is moving to GitLab +The samba project is moving to GitLab, please consider contributing there instead. +Instructions for setting up can be found at: https://wiki.samba.org/index.php/Samba_CI_on_gitlab +The GitLab repository can be found here: https://gitlab.com/samba-team/samba diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000000..c12ae3bb602 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,4 @@ +## Samba is moving to GitLab +The samba project is moving to GitLab, please consider opening a merge request there instead. +Instructions for setting up can be found at: https://wiki.samba.org/index.php/Samba_CI_on_gitlab +The GitLab repository can be found here: https://gitlab.com/samba-team/samba diff --git a/buildtools/bin/waf-1.9 b/buildtools/bin/waf-1.9 deleted file mode 100755 index a83a2430ed3..00000000000 --- a/buildtools/bin/waf-1.9 +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env python -# encoding: ISO8859-1 -# Thomas Nagy, 2005-2015 - -""" -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. -""" - -import os, sys, inspect - -VERSION="1.9.10" -REVISION="x" -GIT="x" -INSTALL='' -C1='#>' -C2='#6' -C3='#4' -cwd = os.getcwd() -join = os.path.join - - -WAF='waf' -def b(x): - return x -if sys.hexversion>0x300000f: - WAF='waf3' - def b(x): - return x.encode() - -def err(m): - print(('\033[91mError: %s\033[0m' % m)) - sys.exit(1) - -def unpack_wafdir(dir, src): - f = open(src,'rb') - c = 'corrupt archive (%d)' - while 1: - line = f.readline() - if not line: err('run waf-light from a folder containing waflib') - if line == b('#==>\n'): - txt = f.readline() - if not txt: err(c % 1) - if f.readline() != b('#<==\n'): err(c % 2) - break - if not txt: err(c % 3) - txt = txt[1:-1].replace(b(C1), b('\n')).replace(b(C2), b('\r')).replace(b(C3), b('\x00')) - - import shutil, tarfile - try: shutil.rmtree(dir) - except OSError: pass - try: - for x in ('Tools', 'extras'): - os.makedirs(join(dir, 'waflib', x)) - except OSError: - err("Cannot unpack waf lib into %s\nMove waf in a writable directory" % dir) - - os.chdir(dir) - tmp = 't.bz2' - t = open(tmp,'wb') - try: t.write(txt) - finally: t.close() - - try: - t = tarfile.open(tmp) - except: - try: - os.system('bunzip2 t.bz2') - t = tarfile.open('t') - tmp = 't' - except: - os.chdir(cwd) - try: shutil.rmtree(dir) - except OSError: pass - err("Waf cannot be unpacked, check that bzip2 support is present") - - try: - for x in t: t.extract(x) - finally: - t.close() - - for x in ('Tools', 'extras'): - os.chmod(join('waflib',x), 493) - - if sys.hexversion<0x300000f: - sys.path = [join(dir, 'waflib')] + sys.path - import fixpy2 - fixpy2.fixdir(dir) - - os.remove(tmp) - os.chdir(cwd) - - try: dir = unicode(dir, 'mbcs') - except: pass - try: - from ctypes import windll - windll.kernel32.SetFileAttributesW(dir, 2) - except: - pass - -def test(dir): - try: - os.stat(join(dir, 'waflib')) - return os.path.abspath(dir) - except OSError: - pass - -def find_lib(): - return os.path.abspath(os.path.join(os.path.dirname(__file__), '../../third_party/waf')) - -wafdir = find_lib() -sys.path.insert(0, wafdir) - -if __name__ == '__main__': - - # TODO: remove these when possible - from waflib.extras import compat15 - import sys - - from waflib.Tools import ccroot, c, ar, compiler_c, gcc - sys.modules['cc'] = c - sys.modules['ccroot'] = ccroot - sys.modules['ar'] = ar - sys.modules['compiler_cc'] = compiler_c - sys.modules['gcc'] = gcc - - from waflib import Options - Options.lockfile = os.environ.get('WAFLOCK', '.lock-wscript') - if os.path.isfile(Options.lockfile) and os.stat(Options.lockfile).st_size == 0: - os.environ['NOCLIMB'] = "1" - # there is a single top-level, but libraries must build independently - os.environ['NO_LOCK_IN_TOP'] = "1" - - from waflib import Task - class o(object): - display = None - Task.classes['cc_link'] = o - - from waflib import Scripting - Scripting.waf_entry_point(cwd, VERSION, wafdir) - diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py index 8e312773462..2a7f62f03bd 100644 --- a/buildtools/wafsamba/samba_utils.py +++ b/buildtools/wafsamba/samba_utils.py @@ -17,7 +17,9 @@ LIB_PATH="shared" # sigh, python octal constants are a mess MODE_644 = int('644', 8) +MODE_744 = int('744', 8) MODE_755 = int('755', 8) +MODE_777 = int('777', 8) def conf(f): # override in order to propagate the argument "mandatory" diff --git a/ctdb/wscript b/ctdb/wscript index baf660fadf6..44a9d08acf9 100644 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -15,6 +15,7 @@ out = 'bin' from waflib import Options, Logs, Errors, Context import wafsamba from wafsamba import samba_dist, samba_utils +from samba_utils import MODE_644, MODE_744, MODE_755, MODE_777 if os.path.isfile('./VERSION'): vdir = '.' @@ -340,7 +341,7 @@ def configure(conf): Logs.info(" %s: no" % (m)) def gen_ctdb_version(task): - fp = file(task.outputs[0].bldpath(task.env), 'w') + fp = open(task.outputs[0].bldpath(task.env), 'w') fp.write('/* This file is auto-generated from waf */\n') fp.write('#include "version.h"\n') fp.write('\n') @@ -736,14 +737,14 @@ def build(bld): target='onnode', rule='sed %s ${SRC} > ${TGT}' % (sed_cmdline)) bld.INSTALL_FILES('${BINDIR}', 'onnode', - destname='onnode', chmod=0o755) + destname='onnode', chmod=MODE_755) bld.SAMBA_GENERATOR('ctdb-diagnostics', source='tools/ctdb_diagnostics', target='ctdb_diagnostics', rule='sed %s ${SRC} > ${TGT}' % (sed_cmdline)) bld.INSTALL_FILES('${BINDIR}', 'ctdb_diagnostics', - destname='ctdb_diagnostics', chmod=0o755) + destname='ctdb_diagnostics', chmod=MODE_755) if bld.env.etcd_reclock: bld.SAMBA_GENERATOR('ctdb-etcd-lock', @@ -751,42 +752,43 @@ def build(bld): target='ctdb_etcd_lock', rule='sed %s ${SRC} > ${TGT}' % (sed_cmdline)) bld.INSTALL_FILES('${CTDB_HELPER_BINDIR}', 'ctdb_etcd_lock', - destname='ctdb_etcd_lock', chmod=0o744) + destname='ctdb_etcd_lock', chmod=MODE_744) bld.SAMBA_GENERATOR('ctdb-natgw', source='tools/ctdb_natgw', target='ctdb_natgw', rule='sed %s ${SRC} > ${TGT}' % (sed_cmdline)) bld.INSTALL_FILES('${CTDB_HELPER_BINDIR}', 'ctdb_natgw', - destname='ctdb_natgw', chmod=0o755) + destname='ctdb_natgw', chmod=MODE_755) bld.SAMBA_GENERATOR('ctdb-lvs', source='tools/ctdb_lvs', target='ctdb_lvs', rule='sed %s ${SRC} > ${TGT}' % (sed_cmdline)) bld.INSTALL_FILES('${CTDB_HELPER_BINDIR}', 'ctdb_lvs', - destname='ctdb_lvs', chmod=0o755) + destname='ctdb_lvs', chmod=MODE_755) bld.SAMBA_GENERATOR('ctdbd-wrapper', source='config/ctdbd_wrapper', target='ctdbd_wrapper', rule='sed %s ${SRC} > ${TGT}' % (sed_cmdline)) bld.INSTALL_FILES('${SBINDIR}', 'ctdbd_wrapper', - destname='ctdbd_wrapper', chmod=0o755) + destname='ctdbd_wrapper', chmod=MODE_755) def SUBDIR_MODE_callback(arg, dirname, fnames): for f in fnames: fl = os.path.join(dirname, f) if os.path.isdir(fl) or os.path.islink(fl): continue - mode = os.lstat(fl).st_mode & 0o777 + mode = os.lstat(fl).st_mode & MODE_777 if arg['trim_path']: fl = samba_utils.os_path_relpath(fl, arg['trim_path']) arg['file_list'].append([fl, mode]) def SUBDIR_MODE(path, trim_path=None): pd = {'trim_path': trim_path, 'file_list': []} - os.path.walk(path, SUBDIR_MODE_callback, pd) + for dirname, _subdirs, fnames in os.walk(path): + SUBDIR_MODE_callback(pd, dirname, fnames) return pd['file_list'] event_script_subdirs = [ @@ -851,7 +853,7 @@ def build(bld): for t in etc_scripts: bld.INSTALL_FILES(bld.env.CTDB_ETCDIR, 'config/%s' % t, - destname=t, chmod=0o755) + destname=t, chmod=MODE_755) bld.SAMBA_GENERATOR('ctdb-sudoers', source='config/ctdb.sudoers', @@ -1092,7 +1094,7 @@ def build(bld): target='test_wrap', rule='sed -e "%s" ${SRC} > ${TGT}' % sed_expr) bld.INSTALL_FILES(bld.env.CTDB_TEST_DATADIR+"/scripts", 'test_wrap', - destname='test_wrap', chmod=0o755) + destname='test_wrap', chmod=MODE_755) bld.SAMBA_GENERATOR('ctdb-test-script-install-paths', source='tests/scripts/script_install_paths.sh', @@ -1100,7 +1102,7 @@ def build(bld): rule='sed %s ${SRC} > ${TGT}' % (sed_cmdline)) bld.INSTALL_FILES(bld.env.CTDB_TEST_DATADIR+"/scripts", 'script_install_paths.sh', - destname='script_install_paths.sh', chmod=0o644) + destname='script_install_paths.sh', chmod=MODE_644) sed_expr1 = 's@^\(export %s\)=.*@\\1=%s@' % ( 'CTDB_TEST_DIR', bld.env.CTDB_TEST_DATADIR) @@ -1111,7 +1113,7 @@ def build(bld): rule='sed -e "%s" -e "%s" ${SRC} > ${TGT}' % ( sed_expr1, sed_expr2)) bld.INSTALL_FILES('${BINDIR}', 'ctdb_run_tests.sh', - destname='ctdb_run_tests', chmod=0o755) + destname='ctdb_run_tests', chmod=MODE_755) bld.symlink_as(os.path.join(bld.env.BINDIR, 'ctdb_run_cluster_tests'), 'ctdb_run_tests') @@ -1121,7 +1123,7 @@ def build(bld): rule='sed -e "%s" -e "%s" ${SRC} > ${TGT}' % ( sed_expr1, sed_expr2)) bld.INSTALL_FILES('${BINDIR}', 'ctdb_local_daemons.sh', - destname='ctdb_local_daemons', chmod=0o755) + destname='ctdb_local_daemons', chmod=MODE_755) def testonly(ctx): -- Samba Shared Repository