Page MenuHomeFreeBSD

net/samba422: Update to 4.22.3
ClosedPublic

Authored by 0mp on Aug 26 2025, 4:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 25, 9:48 AM
Unknown Object (File)
Thu, Nov 6, 9:07 AM
Unknown Object (File)
Wed, Nov 5, 9:13 PM
Unknown Object (File)
Mon, Nov 3, 5:31 AM
Unknown Object (File)
Oct 27 2025, 4:58 AM
Unknown Object (File)
Oct 27 2025, 4:21 AM
Unknown Object (File)
Oct 26 2025, 11:03 PM
Unknown Object (File)
Oct 26 2025, 9:56 PM

Details

Summary

net/samba422: Update to 4.22.3

  • There's an unconditional dependency on devel/icu now, since Samba pulls it in if it's in the build environment and complains afterwards if icu is bumped without a Samba rebuild.
  • Change the LDAP_CONFIGURE option to --with-ldap/--without-ldap, the --with-openldap was patched in by the removed patch 0013.
  • Fix building with AD_DC disabled (by yasu@FreeBSD.org).

The following paragraphs explain why certain files were added, modified, or
deleted.

0013-Pass-additional-msg-parameter-to-CHECK_LIB-so-it-can.patch was removed.
This patch did 3 things:

  • Introduce --with-openldap that we don't use anymore.
  • Increase verbosity of messages during buildtime, which we can drop.
  • Change the default of --with-libiconv, which we workaround now by passing ICONV_PREFIX explicitly.

0024-Cherry-pick-ZFS-provisioning-code-by-iXsystems-Inc.patch was split into:

  • patch-source3_smbd_pysmbd.c
  • patch-python_samba_join.py
  • patch-python_samba_provision_____init____.py

0027-Add-VFS-module-vfs_freebsd-that-implements-FreeBSD-s.patch was split into:

  • patch-source3_modules_vfs__freebsd.c
  • patch-docs-xml_manpages_vfs__freebsd.8.xml
  • patch-docs-xml_wscript__build
  • patch-source3_lib_sysacls.c
  • patch-source3_modules_wscript__build
  • patch-source3_param_loadparm.c

0028-Fix-rl_completion_func_t.patch was removed. Those changes seem to already
be present in this release of Samba.

0099-s3-modules-zfsacl-fix-get-set-ACL-on-FreeBSD-13.patch was removed as it is
no longer necessary thanks to patch-source3_modules_vfs__zfsacl.c.

0100-Fix-pathref-handling-for-FreeBSD-13plus_samba42x.patch was removed as it
has been superseded by 0028-s3-lib-system-add-FreeBSD-proc_fd_pattern.patch.
This change integrates the fdescfs patch from bug #284623, comment #20.

0102-FreeBSD-vfs_freebsd-fix-sys_proc_fd_path-args.patch was moved to
patch-source3_modules_vfs__freebsd.c.

patch-docs-xml_manpages_vfs__freebsd.8.xml contains parts of
0027-Add-VFS-module-vfs_freebsd-that-implements-FreeBSD-s.patch.

patch-docs-xml_wscript__build contains parts of
0027-Add-VFS-module-vfs_freebsd-that-implements-FreeBSD-s.patch.

patch-lib_ldb_wscript was removed as ldb is now bundled and private
per default, as upstream recommends. Samba now conflicts with databases/ldb*.
Subsequent commits to net/samba422 will make the bundled ldb public, so that
other ports in the FreeBSD Ports Collection can satisfy their ldb dependency
requirements with Samba 4.22.

patch-lib_util_util_crypt_c was added to help Samba find the right headers.
Obtained from:
https://github.com/openbsd/ports/blob/master/net/samba/patches/patch-lib_util_util_crypt_c.

patch-lib_util_wscript__build was removed as it no longer applied cleanly.

patch-python_samba_join.py contains parts of
0024-Cherry-pick-ZFS-provisioning-code-by-iXsystems-Inc.patch.

patch-python_samba_provision_____init____.py contains parts of
0024-Cherry-pick-ZFS-provisioning-code-by-iXsystems-Inc.patch.

patch-python_samba_tdb__util.py was removed as those changes were upstreamed
and are shipped in this version of Samba. Refer to
https://bugzilla.samba.org/show_bug.cgi?id=15804 for more details.

patch-source3_lib_sysacls.c contains parts of
0027-Add-VFS-module-vfs_freebsd-that-implements-FreeBSD-s.patch.

patch-source3_modules_vfs__freebsd.c contains parts of
0027-Add-VFS-module-vfs_freebsd-that-implements-FreeBSD-s.patch and
0102-FreeBSD-vfs_freebsd-fix-sys_proc_fd_path-args.patch.

patch-source3_modules_vfs__zfsacl.c was added. It is a patch by Peter Eriksson
from https://bugzilla.samba.org/show_bug.cgi?id=15376. This change fixes
setting ACLs from Windows for us, which was broken since Samba 4.19.

patch-source3_modules_wscript__build contains parts of
0027-Add-VFS-module-vfs_freebsd-that-implements-FreeBSD-s.patch.

patch-source3_param_loadparm.c contains parts of
0027-Add-VFS-module-vfs_freebsd-that-implements-FreeBSD-s.patch.

patch-source3_smbd_pysmbd.c contains parts of
0024-Cherry-pick-ZFS-provisioning-code-by-iXsystems-Inc.patch.

patch-source3_wscript__build was removed as it no longer applied cleanly.

Test Plan
  1. poudriere testport -j 143a -o net/samba422 passes.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67118
Build 64001: arc lint + arc unit

Event Timeline

The current version of the patch is exactly what Andrej Ebert submitted to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=287985. I've not modified it apart from adding samba422 to net/Makefile.

Andrej listed what he did to the port to make it build and run. Some patches were removed which might not be the right thing to do.

net/samba422/Makefile
195

I've heard that standalone ldb is no longer supported. If that's true, we need to:

  1. remove SAMBA4_BUNDLED_LDB
  2. add CONFLICTS_INSTALL to existing ldb ports
net/samba422/files/README.FreeBSD.in
61

This change is wrong and should be reverted.

0mp set the repository for this revision to R11 FreeBSD ports repository.
net/samba422/Makefile
463–464

This seems incorrect.

net/samba422/Makefile
256

This needs to be removed if standalone ldb is not supported.

0mp marked 2 inline comments as not done.Sep 4 2025, 9:51 AM
0mp added inline comments.
net/samba422/Makefile
378–379

I wonder if LDAP_CONFIGURE_ON is needed when LDAP_CONFIGURE_WITH is set.

After applying D52167 to latest ports tree, I tried to apply this one
but it failed as below.

% LANG=C.UTF-8 git apply -p0 ~/tmp/D52168.diff
/home/yasu/tmp/D52168.diff:1737: trailing whitespace.
 
/home/yasu/tmp/D52168.diff:1738: trailing whitespace.
 
/home/yasu/tmp/D52168.diff:1764: trailing whitespace.
 
/home/yasu/tmp/D52168.diff:1781: trailing whitespace.
 
/home/yasu/tmp/D52168.diff:1803: trailing whitespace.
 
error: net/samba422/files/patch-source3_modules_vfs__freebsd.c: No such file or directory
%

After applying D52167 to latest ports tree, I tried to apply this one
but it failed as below.

% LANG=C.UTF-8 git apply -p0 ~/tmp/D52168.diff
/home/yasu/tmp/D52168.diff:1737: trailing whitespace.
 
/home/yasu/tmp/D52168.diff:1738: trailing whitespace.
 
/home/yasu/tmp/D52168.diff:1764: trailing whitespace.
 
/home/yasu/tmp/D52168.diff:1781: trailing whitespace.
 
/home/yasu/tmp/D52168.diff:1803: trailing whitespace.
 
error: net/samba422/files/patch-source3_modules_vfs__freebsd.c: No such file or directory
%

You might have an easier time testing those patches if you pull from the branch I pointed to in the Bugzilla PR: https://github.com/0mp/freebsd-ports/tree/0mp/samba422

This revision is now accepted and ready to land.Oct 20 2025, 12:55 PM
  • Address my review notes
  • Update commit message
This revision now requires review to proceed.Oct 20 2025, 6:24 PM
net/samba422/files/0013-Pass-additional-msg-parameter-to-CHECK_LIB-so-it-can.patch
1

This is OK to remove.

32

That's a nice feature but not a blocker for this release.

60

This is unnecessary. There is no need ot patch that in the source code.

net/samba422/files/0024-Cherry-pick-ZFS-provisioning-code-by-iXsystems-Inc.patch
1

OK. Those changes are already present in new Samba.

net/samba422/files/0028-Fix-rl_completion_func_t.patch
1

OK to remove.

net/samba422/files/0099-s3-modules-zfsacl-fix-get-set-ACL-on-FreeBSD-13.patch
1

OK.

net/samba422/files/patch-source3_modules_vfs__freebsd.c
1

Seems like it got split into individual files.

This revision was not accepted when it landed; it landed in state Needs Review.Oct 22 2025, 2:31 PM
This revision was automatically updated to reflect the committed changes.