Bug 294595 - [new ports] net/samba424: Add Samba 4.24.5 and related ports
Summary: [new ports] net/samba424: Add Samba 4.24.5 and related ports
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: FreeBSD Samba Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-04-17 15:27 UTC by antti
Modified: 2026-08-05 13:14 UTC (History)
8 users (show)

See Also:


Attachments
databases/tdb1415 creation (6.74 KB, patch)
2026-07-23 20:57 UTC, Jordan Ostreff
jordan: maintainer-approval?
Details | Diff
devel/talloc244 creation (7.59 KB, patch)
2026-07-23 20:57 UTC, Jordan Ostreff
jordan: maintainer-approval?
Details | Diff
net/samba424 creation (212.90 KB, patch)
2026-07-23 20:58 UTC, Jordan Ostreff
no flags Details | Diff
net/samba424 creation (212.88 KB, patch)
2026-07-24 09:54 UTC, Jordan Ostreff
no flags Details | Diff
net/samba424 creation _v3 fixing jemalloc issue (212.97 KB, patch)
2026-07-26 13:51 UTC, Jordan Ostreff
no flags Details | Diff
net/samba424 creation _v4 fixing jemalloc and pkg-plist issues (214.78 KB, patch)
2026-07-26 21:47 UTC, Jordan Ostreff
no flags Details | Diff
devel/tevent017 add possibility to use talloc 2.4.3 or 2.4.4 (531 bytes, patch)
2026-07-31 21:25 UTC, Jordan Ostreff
no flags Details | Diff
net/samba424 creation _v5 fixing jemalloc and pkg-plist issues and upgraded to 4.24.5 (214.78 KB, patch)
2026-08-04 19:03 UTC, Jordan Ostreff
jordan: maintainer-approval?
Details | Diff
devel/tevent017 add possibility to use talloc 2.4.3 or 2.4.4 (531 bytes, patch)
2026-08-04 20:08 UTC, Jordan Ostreff
jordan: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Carmi Weinzweig 2026-07-05 17:32:00 UTC
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.
Comment 2 Jordan Ostreff 2026-07-23 20:57:04 UTC
Created attachment 273130 [details]
databases/tdb1415 creation
Comment 3 Jordan Ostreff 2026-07-23 20:57:48 UTC
Created attachment 273131 [details]
devel/talloc244 creation
Comment 4 Jordan Ostreff 2026-07-23 20:58:20 UTC
Created attachment 273132 [details]
net/samba424 creation
Comment 5 Jordan Ostreff 2026-07-23 21:02:48 UTC
Attached patches to introduce the required dependencies (databases/tdb1415 and devel/talloc244) along with the new net/samba424 port. Ready for testing and review.
Comment 6 Jordan Ostreff 2026-07-23 21:08:06 UTC
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
Comment 7 Jordan Ostreff 2026-07-24 09:54:08 UTC
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).
Comment 8 ml 2026-07-26 10:26:57 UTC
(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.
Comment 9 Jordan Ostreff 2026-07-26 12:32:07 UTC
(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.
Comment 10 Jordan Ostreff 2026-07-26 13:47:09 UTC
(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 ---
Comment 11 Jordan Ostreff 2026-07-26 13:51:48 UTC
Created attachment 273194 [details]
net/samba424 creation _v3 fixing jemalloc issue
Comment 12 Jordan Ostreff 2026-07-26 21:47:16 UTC
Created attachment 273202 [details]
net/samba424 creation _v4 fixing jemalloc and pkg-plist issues
Comment 13 ml 2026-07-27 13:13:29 UTC
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?
Comment 14 Jordan Ostreff 2026-07-31 21:25:32 UTC
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.
Comment 15 Jordan Ostreff 2026-07-31 21:26:53 UTC
(In reply to ml from comment #13)
added fix proposal for tevent to accept newer version too.
Comment 16 Jordan Ostreff 2026-07-31 21:40:20 UTC
Please note that if have talloc2.4.3 and upgrade it to talloc 2.4.4 you must recompile tevent017 again.
Comment 17 Jordan Ostreff 2026-07-31 21:41:56 UTC
(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?
Comment 18 Jordan Ostreff 2026-07-31 21:47:07 UTC
(In reply to Jordan Ostreff from comment #17)
Or maybe to be implemented using flavors ?
Comment 19 Xavier Beaudouin freebsd_committer freebsd_triage 2026-08-04 05:26:54 UTC
(In reply to Jordan Ostreff from comment #18)
Flavors should be better I think
Comment 20 Xavier Beaudouin freebsd_committer freebsd_triage 2026-08-04 10:29:00 UTC
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.
Comment 21 ml 2026-08-04 14:30:36 UTC
Meanwhile 4.24.5 is out and it's a security release.
Comment 23 Jordan Ostreff 2026-08-04 19:00:32 UTC
(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.
Comment 24 Jordan Ostreff 2026-08-04 19:03:29 UTC
Created attachment 273463 [details]
net/samba424 creation _v5 fixing jemalloc and pkg-plist issues and upgraded to 4.24.5

Version 4.24.5
Comment 25 Jordan Ostreff 2026-08-04 19:03:54 UTC
(In reply to antti from comment #22)
updated
Comment 26 Jordan Ostreff 2026-08-04 20:08:02 UTC
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.
Comment 27 Jordan Ostreff 2026-08-04 20:25:08 UTC
(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
Comment 28 Xavier Beaudouin freebsd_committer freebsd_triage 2026-08-05 01:39:09 UTC
(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.
Comment 29 ml 2026-08-05 06:19:50 UTC
(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 :(
Comment 30 Xavier Beaudouin freebsd_committer freebsd_triage 2026-08-05 08:00:25 UTC
(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
Comment 31 Jordan Ostreff 2026-08-05 13:14:29 UTC
(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.