Samba 4.25.0 is released, we need to create ports for it
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=1d31a63ad847f9a8c03490d50716482da51d49c9 commit 1d31a63ad847f9a8c03490d50716482da51d49c9 Author: Xavier Beaudouin <kiwi@FreeBSD.org> AuthorDate: 2026-10-09 08:48:03 +0000 Commit: Xavier Beaudouin <kiwi@FreeBSD.org> CommitDate: 2026-10-09 08:49:55 +0000 devel/talloc250: new port talloc 2.5.0 needed by net/samba425 New port needed by samba 4.25.0 PR: 299196 Sponsored by: Klara, Inc. devel/Makefile | 1 + devel/talloc250/Makefile (new) | 65 ++++++++++++++++++++++ devel/talloc250/distinfo (new) | 3 + ...tch-buildtools_wafsamba_samba__install.py (new) | 11 ++++ .../files/patch-buildtools_wafsamba_wscript (new) | 15 +++++ .../files/patch-lib_replace_wscript (new) | 11 ++++ devel/talloc250/files/patch-talloc.c (new) | 20 +++++++ devel/talloc250/files/patch-wscript (new) | 18 ++++++ devel/talloc250/pkg-descr (new) | 2 + devel/talloc250/pkg-plist (new) | 10 ++++ 10 files changed, 156 insertions(+)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=46651632e5c67c8e7d58e09667c14fb9347ef034 commit 46651632e5c67c8e7d58e09667c14fb9347ef034 Author: Xavier Beaudouin <kiwi@FreeBSD.org> AuthorDate: 2026-10-09 08:54:28 +0000 Commit: Xavier Beaudouin <kiwi@FreeBSD.org> CommitDate: 2026-10-09 08:57:05 +0000 devel/tevent0172: new port needed to Samba 4.25.0 PR: 299196 Sponsored by: Klara, Inc. devel/Makefile | 1 + devel/tevent0172/Makefile (new) | 69 ++++++++++++++++++++++ devel/tevent0172/distinfo (new) | 3 + ...tch-buildtools_wafsamba_samba__install.py (new) | 11 ++++ .../files/patch-buildtools_wafsamba_wscript (new) | 15 +++++ .../files/patch-lib_replace_wscript (new) | 11 ++++ devel/tevent0172/files/patch-wscript (new) | 11 ++++ devel/tevent0172/pkg-descr (new) | 6 ++ devel/tevent0172/pkg-plist (new) | 7 +++ 9 files changed, 134 insertions(+)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=fc4b59eab97e5cbf848fc632d82a7dabd8367378 commit fc4b59eab97e5cbf848fc632d82a7dabd8367378 Author: Xavier Beaudouin <kiwi@FreeBSD.org> AuthorDate: 2026-10-09 09:06:57 +0000 Commit: Xavier Beaudouin <kiwi@FreeBSD.org> CommitDate: 2026-10-09 09:08:56 +0000 net/samba425: new port New samba 4.25.0 Release notes: https://www.samba.org/samba/history/samba-4.25.0.html PR: 299196 Sponsored by: Klara, Inc. net/Makefile | 1 + net/samba425/Makefile (new) | 470 ++++++++++++++ net/samba425/distinfo (new) | 3 + net/samba425/files/README.FreeBSD.in (new) | 91 +++ .../patch-buildtools_scripts_abi__gen.sh (new) | 17 + ...ch-buildtools_wafsamba_samba__autoconf.py (new) | 9 + ...tch-buildtools_wafsamba_samba__install.py (new) | 11 + .../patch-buildtools_wafsamba_wafsamba.py (new) | 11 + .../files/patch-ctdb_common_run_event.c (new) | 15 + .../files/patch-ctdb_event_event_context.c (new) | 15 + .../files/patch-ctdb_event_event_tool.c (new) | 15 + net/samba425/files/patch-ctdb_wscript (new) | 62 ++ ...atch-docs-xml_manpages_vfs__freebsd.8.xml (new) | 172 +++++ .../files/patch-docs-xml_wscript__build (new) | 10 + net/samba425/files/patch-dynconfig_wscript (new) | 32 + .../files/patch-examples_pdb_wscript__build (new) | 11 + net/samba425/files/patch-lib_dbwrap_dbwrap.c (new) | 12 + .../patch-lib_dbwrap_dbwrap__local__open.c (new) | 12 + .../files/patch-lib_dbwrap_dbwrap__rbt.c (new) | 12 + .../files/patch-lib_dbwrap_dbwrap__tdb.c (new) | 12 + .../files/patch-lib_dbwrap_dbwrap__util.c (new) | 12 + ...-lib_ldb_ldb__key__value_ldb__kv__cache.c (new) | 13 + net/samba425/files/patch-lib_replace_wscript (new) | 11 + net/samba425/files/patch-lib_replace_xattr.c (new) | 14 + net/samba425/files/patch-lib_talloc_talloc.c (new) | 20 + net/samba425/files/patch-lib_talloc_wscript (new) | 10 + .../files/patch-lib_tevent_echo__server.c (new) | 11 + net/samba425/files/patch-lib_util_statsvfs.c (new) | 21 + net/samba425/files/patch-lib_util_time.h (new) | 11 + .../files/patch-lib_util_util__crypt.c (new) | 12 + net/samba425/files/patch-libcli_http_http.c (new) | 68 ++ .../files/patch-nsswitch_wscript__build (new) | 17 + .../files/patch-python_samba_join.py (new) | 11 + ...ch-python_samba_provision_____init____.py (new) | 71 +++ .../patch-python_samba_provision_sambadns.py (new) | 90 +++ ...on_samba_provision_sambadns_syntaxwarning (new) | 11 + .../files/patch-source3_client_dnsbrowse.c (new) | 66 ++ .../files/patch-source3_include_includes.h (new) | 13 + .../files/patch-source3_include_local.h (new) | 21 + .../patch-source3_lib_dbwrap_dbwrap__ctdb.c (new) | 12 + .../patch-source3_lib_dbwrap_dbwrap__open.c (new) | 12 + .../patch-source3_lib_dbwrap_dbwrap__watch.c (new) | 12 + .../files/patch-source3_lib_sysacls.c (new) | 19 + .../files/patch-source3_lib_sysquotas__4B.c (new) | 18 + .../files/patch-source3_lib_system.c (new) | 151 +++++ .../files/patch-source3_librpc_crypto_gse.c (new) | 16 + .../files/patch-source3_libsmb_unexpected.c (new) | 11 + .../patch-source3_modules_vfs__freebsd.c (new) | 705 +++++++++++++++++++++ .../files/patch-source3_modules_vfs__fruit.c (new) | 80 +++ ...tch-source3_modules_vfs__streams__xattr.c (new) | 16 + ...source3_modules_vfs__virusfilter__utils.c (new) | 36 ++ .../patch-source3_modules_vfs__zfsacl.c (new) | 182 ++++++ .../patch-source3_modules_wscript__build (new) | 16 + .../files/patch-source3_param_loadparm.c (new) | 32 + ...tch-source3_registry_tests_test__regfio.c (new) | 10 + .../files/patch-source3_smbd_pysmbd.c (new) | 230 +++++++ .../files/patch-source3_smbd_quotas.c (new) | 19 + net/samba425/files/patch-source3_smbd_utmp.c (new) | 264 ++++++++ .../patch-source3_torture_wscript__build (new) | 11 + .../files/patch-source3_utils_net__time.c (new) | 19 + .../files/patch-source3_utils_smbfilter.c (new) | 11 + .../files/patch-source3_winbindd_winbindd.c (new) | 20 + .../patch-source3_winbindd_wscript__build (new) | 11 + net/samba425/files/patch-source3_wscript (new) | 57 ++ .../patch-source4_dns__server_dlz__minimal.h (new) | 53 ++ .../patch-source4_dns__server_wscript__build (new) | 79 +++ .../patch-source4_kdc_kdc-service-mit.c (new) | 16 + .../files/patch-source4_kdc_wdc-samba4.c (new) | 25 + .../patch-source4_libcli_ldap_ldap__client.c (new) | 23 + .../files/patch-source4_setup_named.conf.dlz (new) | 32 + .../patch-source4_torture_dns_wscript__build (new) | 11 + .../files/patch-source4_torture_ndr_ndr.h (new) | 11 + ...atch-third__party_heimdal_kdc_kdc__locl.h (new) | 13 + net/samba425/files/pkg-message.in (new) | 31 + net/samba425/files/samba_server.in (new) | 253 ++++++++ net/samba425/pkg-descr (new) | 6 + net/samba425/pkg-plist (new) | 483 ++++++++++++++ net/samba425/pkg-plist.ad_dc (new) | 183 ++++++ net/samba425/pkg-plist.cluster (new) | 83 +++ net/samba425/pkg-plist.python (new) | 626 ++++++++++++++++++ 80 files changed, 5394 insertions(+)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c6161cbd99e61d56bde318d8fdc8ad1679679899 commit c6161cbd99e61d56bde318d8fdc8ad1679679899 Author: Xavier Beaudouin <kiwi@FreeBSD.org> AuthorDate: 2026-10-09 09:12:59 +0000 Commit: Xavier Beaudouin <kiwi@FreeBSD.org> CommitDate: 2026-10-09 09:14:23 +0000 Mk/Uses/samba.mk: add net/samba425 Add net/samba424 related informations PR: 299196 Approved by: samba (kiwi) Sponsored by: Klara, Inc Mk/Uses/samba.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Port has been commited. PR left open in case of some feedback about this port.
CLUSTER=on pkg-static: Unable to access file /tmp/work/usr/ports/net/samba425/work/stage/var/run/ctdb/:No such file or directory
(In reply to Vladimir Druzenko from comment #6) Interesting, this port has been updated from samba424 ones, does it have same issue ?
(In reply to Xavier Beaudouin from comment #7) samba424 build fine with same options.
(In reply to Vladimir Druzenko from comment #8) Thanks for the feedback.
I've been trying this version, but I get signal 8 crashes continuously: <6>1 2026-10-12T12:21:35.881257+02:00 tensor.andric.com kernel - - - pid 34685 (smbd), jid 0, uid 1000: exited on signal 8 (no core dump - coredumpsize limit is 0) <6>1 2026-10-12T12:21:36.101530+02:00 tensor.andric.com kernel - - - pid 34686 (smbd), jid 0, uid 1000: exited on signal 8 (no core dump - coredumpsize limit is 0) <6>1 2026-10-12T12:21:36.101581+02:00 tensor.andric.com kernel - - - pid 34687 (smbd), jid 0, uid 1000: exited on signal 8 (no core dump - coredumpsize limit is 0) <6>1 2026-10-12T12:21:36.321190+02:00 tensor.andric.com kernel - - - pid 34688 (smbd), jid 0, uid 1000: exited on signal 8 (no core dump - coredumpsize limit is 0) <6>1 2026-10-12T12:21:36.321237+02:00 tensor.andric.com kernel - - - pid 34689 (smbd), jid 0, uid 1000: exited on signal 8 (no core dump - coredumpsize limit is 0) <6>1 2026-10-12T12:21:36.541180+02:00 tensor.andric.com kernel - - - pid 34690 (smbd), jid 0, uid 1000: exited on signal 8 (no core dump - coredumpsize limit is 0) <6>1 2026-10-12T12:21:36.541244+02:00 tensor.andric.com kernel - - - pid 34691 (smbd), jid 0, uid 1000: exited on signal 8 (no core dump - coredumpsize limit is 0) I tried debugging smbd, but it firmly resists: foreground mode no longer really works, as it always forks off a child to handle the connection, and gdb cannot properly follow it... Does anybody have an idea how to get a proper core dump from smbd?
(In reply to Dimitry Andric from comment #10) Never mind, I found the bug: https://bugzilla.samba.org/show_bug.cgi?id=16278, and posted a fix: https://gitlab.com/samba-team/samba/-/merge_requests/4755 Meanwhile, I have also found out that the MDNSRESPONDER option does not work properly. It seems the two patches for this from net/samba423 were not ported to net/samba425: 0018-Add-configuration-option-that-allows-to-choose-alter.patch 0019-From-923bc7a1afeb0b920e60e14846987ae1d2d7dca4-Mon-Se.patch ?
(In reply to Dimitry Andric from comment #11) Are those patches missing in 4.24 as well?
(In reply to Michael Osipov from comment #12) Hello, If those patch are missing on 4.25 there is maybe the case on 4.24 as well.
(In reply to Xavier Beaudouin from comment #13) Darn, I went through all downstream patches from 4.19 to 4.24 with Claude and still didn't capture everything. We need to upstream them, this is getting out of hand.
(In reply to Michael Osipov from comment #14) Yes, this would be a very good idea, but it can be tricky to get changes accepted upstream. It looks like it is slowly getting easier to get changes into samba, which used to be a very painful process. Now you can at least put merge requests into GitLab. For example, https://gitlab.com/samba-team/samba/-/merge_requests/4180 which adds the mDNS option, has been sitting there for over a year.
Guys, I am currently working on the missing patches for 4.24 and 4.25.
(In reply to Dimitry Andric from comment #15) I think we should upstream the more patches to samba directly, otherwise maintaining this port is really a pain
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=1366f85da8f402ec083d7b95d7b761ea35698292 commit 1366f85da8f402ec083d7b95d7b761ea35698292 Author: Michael Osipov <michaelo@FreeBSD.org> AuthorDate: 2026-10-12 21:10:04 +0000 Commit: Michael Osipov <michaelo@FreeBSD.org> CommitDate: 2026-10-13 09:54:49 +0000 net/samba424: restore missing FreeBSD mDNS/dns_sd support (MDNSRESPONDER) Three FreeBSD-local patches providing dns_sd/mDNSResponder support (present identically in net/samba419, 420, 422, and 423) were silently dropped when net/samba424 was created, all gated behind the non-default MDNSRESPONDER port option (default is AVAHI): - source3/wscript/wscript_build: the --enable-dnssd waf option (dns_sd.h/DNSServiceRegister detection, WITH_DNSSD_SUPPORT define, dns_sd library linkage into smbd_base and smbclient) never existed in samba424 at all. - source3/smbd/dnsregister.c: the FreeNAS-authored mDNS advertise-per-interface fixes. Only the companion source3/client/dnsbrowse.c half of this combined patch survived into samba424; the dnsregister.c half was lost. - Makefile: MDNSRESPONDER_CONFIGURE_ENABLE=dnssd, so selecting the MDNSRESPONDER option actually passes --enable-dnssd to waf. Without all three, selecting MDNSRESPONDER builds without functional dns_sd/mDNS support. Verified by diffing the patch sets of samba419/420/422/423 against samba424, and confirmed the restored patches apply cleanly (offset-only, no fuzz) against the real samba-4.24.7 upstream source. PR: 299196 (comment 11 on net/samba425 reported the same gap) PR: 299346 Approved by: kiwi (samba team) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> net/samba424/Makefile | 3 +- .../files/patch-source3_smbd_dnsregister.c (new) | 452 +++++++++++++++++++++ net/samba424/files/patch-source3_wscript | 28 +- .../files/patch-source3_wscript__build (new) | 18 + 4 files changed, 499 insertions(+), 2 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a978f5b4614002b37eaa1d4adeeafd10679bb30f commit a978f5b4614002b37eaa1d4adeeafd10679bb30f Author: Michael Osipov <michaelo@FreeBSD.org> AuthorDate: 2026-10-13 04:58:14 +0000 Commit: Michael Osipov <michaelo@FreeBSD.org> CommitDate: 2026-10-13 09:58:19 +0000 net/samba425: restore missing FreeBSD mDNS/dns_sd support (MDNSRESPONDER) Same gap identified for net/samba424: three FreeBSD-local patches providing dns_sd/mDNSResponder support (present identically in net/samba419, 420, 422, and 423) were missing, gated behind the non-default MDNSRESPONDER port option (default is AVAHI). - source3/wscript/wscript_build: restore the --enable-dnssd waf option (dns_sd.h/DNSServiceRegister detection, WITH_DNSSD_SUPPORT define, dns_sd library linkage into smbd_base and smbclient). Regenerated against the real samba-4.25.0 upstream source (which has diverged from 4.24.7 in these two files, e.g. ceph rgw and rate-limiting daemon additions) rather than copied verbatim from samba424. - source3/smbd/dnsregister.c: restore the FreeNAS-authored mDNS advertise-per-interface fixes. This file is byte-identical between 4.24.7 and 4.25.0 upstream, so the samba424 patch applies verbatim. - Makefile: MDNSRESPONDER_CONFIGURE_ENABLE=dnssd. Verified by diffing the patch sets of samba419/420/422/423 against samba425, and confirmed all three restored patches apply cleanly (offset-only, no fuzz) against the real samba-4.25.0 upstream source. PR: 299196 (comment 11 reported this gap on net/samba425) PR: 299352 Approved by: kiwi (samba team) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> net/samba425/Makefile | 3 +- .../files/patch-source3_smbd_dnsregister.c (new) | 452 +++++++++++++++++++++ net/samba425/files/patch-source3_wscript | 28 +- .../files/patch-source3_wscript__build (new) | 18 + 4 files changed, 499 insertions(+), 2 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=17a68ff96ce8cf05220787a8fa27490401388fd0 commit 17a68ff96ce8cf05220787a8fa27490401388fd0 Author: Xavier Beaudouin <kiwi@FreeBSD.org> AuthorDate: 2026-10-16 08:40:51 +0000 Commit: Xavier Beaudouin <kiwi@FreeBSD.org> CommitDate: 2026-10-16 08:42:31 +0000 net/samba425: fix building with CLUSTER PR: 299196 Sponsored by: Klara, Inc. Reported by: Vladimir Druzenko <vvd@FreeBSD.org> net/samba425/Makefile | 2 +- net/samba425/pkg-plist.cluster | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b3c9e621b0ca87f0df21681883588c2702a00f06 commit b3c9e621b0ca87f0df21681883588c2702a00f06 Author: Michael Osipov <michaelo@FreeBSD.org> AuthorDate: 2026-10-16 12:27:38 +0000 Commit: Xavier Beaudouin <kiwi@FreeBSD.org> CommitDate: 2026-10-16 12:30:52 +0000 net/samba425: restore missing get_quota vfstest command (cmd_vfs.c) The combined patch adding a "get_quota" command to vfstest (present identically in net/samba419, 420, 422, 423, and 424) touches two files: source3/torture/cmd_vfs.c (the command implementation and its vfs_commands[] registration) and source3/torture/wscript_build (installs vfstest instead of building it selftest-only). Only the wscript_build half survived into samba425 — the cmd_vfs.c half was dropped. Restored patch-source3_torture_cmd__vfs.c, adapted (not just copied verbatim) to the real samba-4.25.0 upstream API: SMB_VFS_GET_QUOTA() dropped its explicit conn parameter and now takes an fsp directly, and the file resolution pattern changed from synthetic_smb_fname() to synthetic_pathref()+smb_fname->fsp (mirroring the sibling cmd_disk_free() function, which upstream already migrated the same way between 4.24 and 4.25). Verified against a real FreeBSD build: the first version of this patch (ported mechanically from samba424, pre-dating the SMB_VFS_GET_QUOTA signature change) failed to compile with "too many arguments provided to function-like macro invocation"; this version builds cleanly. PR: 299196 (follow-up audit after comment 11 on this PR) PR: 299353 Approved by: samba (kiwi) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> net/samba425/Makefile | 2 +- .../files/patch-source3_torture_cmd__vfs.c (new) | 98 ++++++++++++++++++++++ 2 files changed, 99 insertions(+), 1 deletion(-)
Please also apply the fix from bug 299446.
Are we good to close this?
(In reply to Michael Osipov from comment #23) From my point of view, the port looks fine now, and I am using it successfully. If there are other bugs, people can create new tickets. :)
A commit in branch 2026Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=e4ac8c6afa91ca67752afa7cb626c36a16a77701 commit e4ac8c6afa91ca67752afa7cb626c36a16a77701 Author: Michael Osipov <michaelo@FreeBSD.org> AuthorDate: 2026-10-12 21:10:04 +0000 Commit: Bryan Drewery <bdrewery@FreeBSD.org> CommitDate: 2026-10-29 17:50:32 +0000 net/samba424: restore missing FreeBSD mDNS/dns_sd support (MDNSRESPONDER) Three FreeBSD-local patches providing dns_sd/mDNSResponder support (present identically in net/samba419, 420, 422, and 423) were silently dropped when net/samba424 was created, all gated behind the non-default MDNSRESPONDER port option (default is AVAHI): - source3/wscript/wscript_build: the --enable-dnssd waf option (dns_sd.h/DNSServiceRegister detection, WITH_DNSSD_SUPPORT define, dns_sd library linkage into smbd_base and smbclient) never existed in samba424 at all. - source3/smbd/dnsregister.c: the FreeNAS-authored mDNS advertise-per-interface fixes. Only the companion source3/client/dnsbrowse.c half of this combined patch survived into samba424; the dnsregister.c half was lost. - Makefile: MDNSRESPONDER_CONFIGURE_ENABLE=dnssd, so selecting the MDNSRESPONDER option actually passes --enable-dnssd to waf. Without all three, selecting MDNSRESPONDER builds without functional dns_sd/mDNS support. Verified by diffing the patch sets of samba419/420/422/423 against samba424, and confirmed the restored patches apply cleanly (offset-only, no fuzz) against the real samba-4.24.7 upstream source. PR: 299196 (comment 11 on net/samba425 reported the same gap) PR: 299346 Approved by: kiwi (samba team) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> (cherry picked from commit 1366f85da8f402ec083d7b95d7b761ea35698292) Conflicts: net/samba424/Makefile (skipped LMBD option addition) net/samba424/Makefile | 3 +- .../files/patch-source3_smbd_dnsregister.c (new) | 452 +++++++++++++++++++++ net/samba424/files/patch-source3_wscript | 28 +- .../files/patch-source3_wscript__build (new) | 18 + 4 files changed, 499 insertions(+), 2 deletions(-)