[SCM] Samba Shared Repository - branch v4-12-test updated

Karolin Seeger kseeger at samba.org
Wed Mar 3 11:12:01 UTC 2021


The branch, v4-12-test has been updated
       via  1c37606163e s3: VFS: nfs4_acls. Add missing TALLOC_FREE(frame) in error path.
       via  bebe69c3525 script/autobuild.py: let cleanup() ignore errors from rmdir_force() by default
       via  00df0473da5 script/autobuild.py: split out a rmdir_force() helper function
       via  f31f1e75d7f script/autobuild.py: allow write_system_info commands to fail
       via  a4ab7d474f2 script/autobuild.py: use more portable 'cp -R -a -l'
       via  833739c1e8f script/autobuild.py: add support git worktree
      from  237a51d926e classicupgrade: treat old never expires value right

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-12-test


- Log -----------------------------------------------------------------
commit 1c37606163ee964584e946e36a1d1c8efb1606e3
Author: Peter Eriksson <pen at lysator.liu.se>
Date:   Tue Feb 23 12:13:37 2021 -0800

    s3: VFS: nfs4_acls. Add missing TALLOC_FREE(frame) in error path.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14648
    
    Signed-off-by: Peter Eriksson <pen at lysator.liu.se>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: David Mulder <dmulder at samba.org>
    
    Autobuild-User(master): David Mulder <dmulder at samba.org>
    Autobuild-Date(master): Thu Feb 25 20:46:02 UTC 2021 on sn-devel-184
    
    (cherry picked from commit 3d91fe071a29e2e0c54a10ba081a46cb5c324585)
    
    Autobuild-User(v4-12-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-12-test): Wed Mar  3 11:11:28 UTC 2021 on sn-devel-184

commit bebe69c35256bbd2a2e7e038d137c21930e88acf
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Nov 20 09:20:14 2020 +0000

    script/autobuild.py: let cleanup() ignore errors from rmdir_force() by default
    
    It's not useful to generate a python backtrace from within the cleanup code.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14628
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    (cherry picked from commit 9883ac45939f253a63f3ff312fc3912c5f02cdac)
    
    Autobuild-User(v4-14-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-14-test): Tue Feb  2 10:29:44 UTC 2021 on sn-devel-184
    
    (cherry picked from commit cc1568be4d4250390a9ad03c84f5e260fc7acffd)

commit 00df0473da5d5e80ce97baa7efd0db3316d4eb90
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Nov 20 09:20:14 2020 +0000

    script/autobuild.py: split out a rmdir_force() helper function
    
    That also tries to re-add write permissions before removing.
    In future we'll have jobs changing there directory to read-only.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14628
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    (cherry picked from commit 7a5df2deaaf62a7edd7c64251f75ab15abe94c07)
    (cherry picked from commit c933135969be29072971f96481b05f499fd48b57)

commit f31f1e75d7f24cbad3b2bc2c0307a09b3a1f6717
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Feb 28 00:00:08 2020 +0100

    script/autobuild.py: allow write_system_info commands to fail
    
    These commands are just there as hints to debug possible problems.
    In order to support autobuild.py on non-linux platforms we should
    just ignore errors here.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Thu Apr  2 07:36:07 UTC 2020 on sn-devel-184
    
    (cherry picked from commit 9b1e96197e0983a16e73ce351eac7775801736d8)

commit a4ab7d474f2a5b80cf6643d099e972f7ab190215
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Feb 27 23:59:00 2020 +0100

    script/autobuild.py: use more portable 'cp -R -a -l'
    
    On platforms like FreeBSD 12 cp doesn't accept the long options,
    using the one letter options works there and keeps working on Linux
    as well.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 0312a10e09d8dc1295a4a80493761e91031e88e7)

commit 833739c1e8fac68582009450ac34a27695a439f0
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Feb 27 23:58:42 2020 +0100

    script/autobuild.py: add support git worktree
    
    .git is not always a directory, with 'git worktree' it's a file.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit f9374d0a4ecc11acc46884feec28d138accc6dab)

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

Summary of changes:
 script/autobuild.py         | 45 ++++++++++++++++++++++++++++++++++-----------
 source3/modules/nfs4_acls.c |  1 +
 2 files changed, 35 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/script/autobuild.py b/script/autobuild.py
index f5cf2a85ca0..b1a1b4800d1 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -4,7 +4,7 @@
 # released under GNU GPL v3 or later
 
 from __future__ import print_function
-from subprocess import call, check_call, check_output, Popen, PIPE
+from subprocess import call, check_call, check_output, Popen, PIPE, CalledProcessError
 import os
 import tarfile
 import sys
@@ -37,7 +37,7 @@ def find_git_root():
     '''get to the top of the git repo'''
     p = os.getcwd()
     while p != '/':
-        if os.path.isdir(os.path.join(p, ".git")):
+        if os.path.exists(os.path.join(p, ".git")):
             return p
         p = os.path.abspath(os.path.join(p, '..'))
     return None
@@ -823,6 +823,17 @@ def run_cmd(cmd, dir=".", show=None, output=False, checkfail=True):
     else:
         return call(cmd, shell=True, cwd=dir)
 
+def rmdir_force(dirname, re_raise=True):
+    try:
+        run_cmd("test -d %s && chmod -R +w %s; rm -rf %s" % (
+                dirname, dirname, dirname), output=True, show=True)
+    except CalledProcessError as e:
+        do_print("Failed: '%s'" % (str(e)))
+        run_cmd("tree %s" % dirname, output=True, show=True)
+        if re_raise:
+            raise
+        return False
+    return True
 
 class builder(object):
     '''handle build of one directory'''
@@ -845,10 +856,10 @@ class builder(object):
         self.test_source_dir = "%s/%s" % (testbase, self.tag)
         self.cwd = "%s/%s" % (self.test_source_dir, self.dir)
         self.prefix = "%s/%s" % (test_prefix, self.tag)
-        run_cmd("rm -rf %s" % self.test_source_dir)
-        run_cmd("rm -rf %s" % self.prefix)
+        rmdir_force(self.test_source_dir)
+        rmdir_force(self.prefix)
         if cp:
-            run_cmd("cp --recursive --link --archive %s %s" % (test_master, self.test_source_dir), dir=test_master, show=True)
+            run_cmd("cp -R -a -l %s %s" % (test_master, self.test_source_dir), dir=test_master, show=True)
         else:
             run_cmd("git clone --recursive --shared %s %s" % (test_master, self.test_source_dir), dir=test_master, show=True)
         self.start_next()
@@ -856,8 +867,8 @@ class builder(object):
     def start_next(self):
         if self.next == len(self.sequence):
             if not options.nocleanup:
-                run_cmd("rm -rf %s" % self.test_source_dir)
-                run_cmd("rm -rf %s" % self.prefix)
+                rmdir_force(self.test_source_dir)
+                rmdir_force(self.prefix)
             do_print('%s: Completed OK' % self.name)
             self.done = True
             return
@@ -979,7 +990,10 @@ class buildlist(object):
                         'cc --version',
                         'df -m .',
                         'df -m %s' % testbase]:
-                out = run_cmd(cmd, output=True, checkfail=False)
+                try:
+                    out = run_cmd(cmd, output=True, checkfail=False)
+                except CalledProcessError as e:
+                    out = "<failed: %s>" % str(e)
                 print('### %s' % cmd, file=f)
                 print(out, file=f)
                 print(file=f)
@@ -1008,14 +1022,23 @@ class buildlist(object):
         self.tail_proc = Popen(cmd, close_fds=True)
 
 
-def cleanup():
+def cleanup(do_raise=False):
     if options.nocleanup:
         return
     run_cmd("stat %s || true" % test_tmpdir, show=True)
     run_cmd("stat %s" % testbase, show=True)
     do_print("Cleaning up %r" % cleanup_list)
     for d in cleanup_list:
-        run_cmd("rm -rf %s" % d)
+        ok = rmdir_force(d, re_raise=False)
+        if ok:
+            continue
+        if os.path.isdir(d):
+            do_print("Killing, waiting and retry")
+            run_cmd("killbysubdir %s > /dev/null 2>&1" % d, checkfail=False)
+        else:
+            do_print("Waiting and retry")
+        time.sleep(1)
+        rmdir_force(d, re_raise=do_raise)
 
 
 def daemonize(logfile):
@@ -1281,7 +1304,7 @@ while True:
         (status, failed_task, failed_stage, failed_tag, errstr) = blist.run()
         if status != 0 or errstr != "retry":
             break
-        cleanup()
+        cleanup(do_raise=True)
     except Exception:
         cleanup()
         raise
diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c
index 7f32e681694..c7808037a09 100644
--- a/source3/modules/nfs4_acls.c
+++ b/source3/modules/nfs4_acls.c
@@ -997,6 +997,7 @@ NTSTATUS smb_set_nt_acl_nfs4(vfs_handle_struct *handle, files_struct *fsp,
 	}
 
 	if (security_descriptor_with_ms_nfs(psd)) {
+		TALLOC_FREE(frame);
 		return NT_STATUS_OK;
 	}
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list