There is a new Samba version available. https://www.samba.org/samba/history/samba-4.24.1.html https://www.samba.org/samba/history/samba-4.24.0.html
Given that FreeBSD 15.1 and forward now come with MIT Kerberos 5 in based, it would be ideal if the options for GSSAPI_MIT would use the bundled Kerberos, not the port in Security. It would also be nice if there were either a pre-built flavor built with MIT Kerberos.
Created attachment 273130 [details] databases/tdb1415 creation
Created attachment 273131 [details] devel/talloc244 creation
Created attachment 273132 [details] net/samba424 creation
Attached patches to introduce the required dependencies (databases/tdb1415 and devel/talloc244) along with the new net/samba424 port. Ready for testing and review.
Tested on stable/15 with following config only: # make showconfig ===> The following configuration options are available for samba424-4.24.4: ADS=on: Active Directory client AD_DC=on: Active Directory Domain Controller(implies PYTHON3) CLUSTER=off: Clustering support CUPS=off: CUPS printing system support DOCS=on: Build and/or install documentation FAM=on: File Alteration Monitor GPGME=off: GpgME support LDAP=on: LDAP client MANPAGES=on: Build and/or install manual pages PROFILE=on: Profiling data PYTHON3=on: Python 3.x bindings or support QUOTAS=on: Disk quota support SYSLOG=on: Syslog logging support UTMP=on: UTMP accounting ====> Bundled dependencies BUNDLED_CMOCKA=off: Bundle cmocka instead of depending on a standalone port BUNDLED_TALLOC=off: Bundle talloc instead of depending on a standalone port BUNDLED_TDB=off: Bundle TDB instead of depending on a standalone port BUNDLED_TEVENT=off: Bundle Tevent instead of depending on a standalone port ====> Testing, debugging, and development DEVELOPER=off: With developer framework MEMORY_DEBUG=off: Debug memory allocator TEST=off: Build and/or run tests ====> VFS modules FRUIT=on: MacOSX and TimeMachine support GLUSTERFS=off: GlusterFS support ====> GSSAPI Security API support: you have to select exactly one of them GSSAPI_BUILTIN=on: GSSAPI support via bundled Heimdal GSSAPI_MIT=off: GSSAPI support via security/krb5 ====> Zero configuration networking: you have to select exactly one of them AVAHI=on: Zeroconf support via Avahi MDNSRESPONDER=off: Zeroconf support via mDNSResponder ZEROCONF_NONE=off: Zeroconf support is absent ===> Use 'make config' to modify these settings
Created attachment 273140 [details] net/samba424 creation Update: Updated patch to the latest revision. Cleaned up formatting and confirmed compliance with portclippy (no warnings/errors).
(In reply to Jordan Ostreff from comment #5) First problem: I tried building with MEMORY_DEBUG on, but it looks for jemalloc port and does not find it: not a big breaker; I'm now trying without it, but I guess it won't be committed as it is.
(In reply to ml from comment #8) Good point — jemalloc is part of the FreeBSD base system, so there's no devel/jemalloc port. This issue is actually inherited from net/samba423. I'll look into tweaking CONFIGURE_ARGS / CFLAGS for MEMORY_DEBUG to properly pick up base jemalloc.
(In reply to Jordan Ostreff from comment #9) Rebuild the samba 4.24.4 with needed by you options: # make -C /usr/ports/net/samba424 showconfig | grep -i memory MEMORY_DEBUG=on: Debug memory allocator and tested _v3 patch with MALLOC_CONF=stats_print:true /usr/local/sbin/smbd -F -S -d 3 > /tmp/jemalloc_test.log 2>&1 sleep 2 kill %1 2>/dev/null grep -i "jemalloc statistics" /tmp/jemalloc_test.log and the result is probably what is expected: ___ Begin jemalloc statistics ___ --- End jemalloc statistics ---
Created attachment 273194 [details] net/samba424 creation _v3 fixing jemalloc issue
Created attachment 273202 [details] net/samba424 creation _v4 fixing jemalloc and pkg-plist issues
Yet another problem that prevents me from compiling (i'm on 2026Q3, but that shouldn't make any difference): ===> samba424-4.24.4 depends on package: talloc244>=2.4.4 - not found ===> Installing existing package /packages/All/talloc244-2.4.4.pkg [151amd64-default-job-03] Installing talloc244-2.4.4... [151amd64-default-job-03] `-- Installing gettext-runtime-1.0_1... [151amd64-default-job-03] `-- Extracting gettext-runtime-1.0_1: .......... done [151amd64-default-job-03] Extracting talloc244-2.4.4: ......... done ===> samba424-4.24.4 depends on package: talloc244>=2.4.4 - found ===> Returning to build of samba424-4.24.4 ===> samba424-4.24.4 depends on package: tdb1415>=1.4.15 - not found ===> Installing existing package /packages/All/tdb1415-1.4.15,1.pkg [151amd64-default-job-03] Installing tdb1415-1.4.15,1... [151amd64-default-job-03] Extracting tdb1415-1.4.15,1: .......... done ===> samba424-4.24.4 depends on package: tdb1415>=1.4.15 - found ===> Returning to build of samba424-4.24.4 ===> samba424-4.24.4 depends on package: tevent017>=0.17.1 - not found ===> Installing existing package /packages/All/tevent017-0.17.1.pkg [151amd64-default-job-03] Installing tevent017-0.17.1... [151amd64-default-job-03] `-- Installing talloc243-2.4.3... pkg-static: talloc243-2.4.3 conflicts with talloc244-2.4.4 (installs files into the same place). Problematic file: /usr/local/include/pytalloc.h Failed to install the following 1 package(s): /packages/All/tevent017-0.17.1.pkg *** Error code 1 Possible solutions: a) make tevent017 depend on talloc244 (instead of talloc243): of course this would affect older Sambas too; b) make a new port a newer for tevent (0.9?): is that compatible with Samba 4.24? c) flavourize tevent017; d) use bundled libraries (something I'd like to avoid, really); e) ... Do you build with poudriere, BTW?
Created attachment 273372 [details] devel/tevent017 add possibility to use talloc 2.4.3 or 2.4.4 Keeped minimum talloc 2.4.3 as requirements. But accepts also talloc 2.4.4 needed by new samba.
(In reply to ml from comment #13) added fix proposal for tevent to accept newer version too.
Please note that if have talloc2.4.3 and upgrade it to talloc 2.4.4 you must recompile tevent017 again.
(In reply to Jordan Ostreff from comment #16) Maybe add menu with single selection to tevent017? to decide between talloc 2.4.3 or 2.4.4?
(In reply to Jordan Ostreff from comment #17) Or maybe to be implemented using flavors ?
(In reply to Jordan Ostreff from comment #18) Flavors should be better I think
http://pkg.oav.net/data/klara-default/2026-08-04_10h20m53s/logs/errors/samba424-4.24.4.log Definitively we need some flavors for tevent017. Will try to make an patch for that.
Meanwhile 4.24.5 is out and it's a security release.
https://www.samba.org/samba/history/samba-4.24.5.html
(In reply to Xavier Beaudouin from comment #19) Hi Xavier, Even though tevent can link against both talloc 2.4.3 and 2.4.4, using flavors for this is not the FreeBSD Ports way: ⚬ Single Dependency Versioning: FreeBSD ports tree relies on a single global version for libraries like talloc. Having different flavors of tevent compiled against different versions of talloc will break dependency tracking for any port that indirectly depends on both. ⚬ Packaging Conflicts: Both flavors would install identical header files and shared objects to /usr/local, which causes package collision in pkg and build failures in Poudriere. Recommended approach: 1. Update devel/talloc to 2.4.4 directly in the ports tree (since 2.4.4 is backward-compatible with 2.4.3). 2. Recompile devel/tevent017 against the updated talloc. 3. If samba424 requires talloc 2.4.4 immediately before the global port is updated, we should build samba424 using --bundled-libraries=talloc,tevent as a temporary measure.
Created attachment 273463 [details] net/samba424 creation _v5 fixing jemalloc and pkg-plist issues and upgraded to 4.24.5 Version 4.24.5
(In reply to antti from comment #22) updated
Created attachment 273465 [details] devel/tevent017 add possibility to use talloc 2.4.3 or 2.4.4 Since talloc 2.4.4 is a minor release with backward compatibility, it works seamlessly with existing consumers like the samba 4.23.x series, eliminating the need for complex conditional dependencies or flavors.
(In reply to ml from comment #13) Right order which worked for me: portmaster devel/talloc244 ; portmaster devel/tevent017 ( patched from above patch ) ; portmaster net/samba424
(In reply to Jordan Ostreff from comment #23) I agree when you use from ports's command line. When using poudriere it will not use talloc you used. But if we request the flavor of talloc then it will use the correct one. Issue will be... we cannot have talloc without default flavor and non defaut flavor on same machine.
(In reply to Xavier Beaudouin from comment #28) I guess you won't have different versions of Samba on the same machine either, so you won't need different versions of talloc. Anyway, if, as Jordan said, older Samba can work with talloc 2.4.4, that's the way to go. I'm going to test this when my Poudriere box stops wasting days building electron over and over again :(
(In reply to ml from comment #29) We need to be 100% sure those beast works with talloc 2.4.4 :) If it is the case we don't have any regressions we may remove talloc 2.4.3 and the issue is closed
(In reply to ml from comment #29) Thanks if you have time to made real regression testing. I didn't have such machine to compile multiple scenarios on different supported versions of FreeBSD.