git: cbfef6eec11b - 2025Q1 - net/samba419: "samba-tool domain backup offline" hangs

From: Michael Osipov <michaelo_at_FreeBSD.org>
Date: Tue, 18 Feb 2025 16:53:59 UTC
The branch 2025Q1 has been updated by michaelo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cbfef6eec11b4465f3805ca26988be7e49773675

commit cbfef6eec11b4465f3805ca26988be7e49773675
Author:     Andrea Venturoli <ml@netfence.it>
AuthorDate: 2025-02-18 08:10:46 +0000
Commit:     Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2025-02-18 16:53:22 +0000

    net/samba419: "samba-tool domain backup offline" hangs
    
    PR:             250906
    Tested by:      ml@netfence.it
    Approved by:    otis (mentor), kiwi, vvd, allanjude
    MFH:            2025Q1
    Differential Revision:  https://reviews.freebsd.org/D49044
    
    (cherry picked from commit 1db23ed5ef53c509dd421db6ded1c2f528916361)
---
 net/samba419/Makefile                              |  2 +-
 net/samba419/files/patch-python_samba_tdb__util.py | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/net/samba419/Makefile b/net/samba419/Makefile
index 7849996e83c0..92cc5bb78f0c 100644
--- a/net/samba419/Makefile
+++ b/net/samba419/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=			${SAMBA4_BASENAME}419
 PORTVERSION=			${SAMBA4_VERSION}
-PORTREVISION=			4
+PORTREVISION=			5
 CATEGORIES?=			net
 MASTER_SITES=			SAMBA/samba/stable SAMBA/samba/rc
 DISTNAME=			${SAMBA4_DISTNAME}
diff --git a/net/samba419/files/patch-python_samba_tdb__util.py b/net/samba419/files/patch-python_samba_tdb__util.py
new file mode 100644
index 000000000000..ffbe35f0016b
--- /dev/null
+++ b/net/samba419/files/patch-python_samba_tdb__util.py
@@ -0,0 +1,15 @@
+--- python/samba/tdb_util.py.orig	2025-02-17 11:38:24.136379000 +0100
++++ python/samba/tdb_util.py	2025-02-17 11:38:44.171612000 +0100
+@@ -37,9 +37,10 @@
+         raise FileNotFoundError(2, "could not find tdbbackup tool: "
+                                 "is tdb-tools installed?")
+
+-    tdbbackup_cmd = [toolpath, "-s", ".copy.tdb", file1]
+     if readonly:
+-        tdbbackup_cmd.append("-r")
++        tdbbackup_cmd = [toolpath, "-r", "-s", ".copy.tdb", file1]
++    else:
++        tdbbackup_cmd = [toolpath, "-s", ".copy.tdb", file1]
+
+     status = subprocess.check_call(tdbbackup_cmd, close_fds=True, shell=False)
+