[Bug 270383] net/samba417: Add new port
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 270383] net/samba417: Add new port"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 15 Oct 2023 21:38:44 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270383 --- Comment #4 from Joshua Kinard <freebsd@kumba.dev> --- I've taken a stab at updating the samba416 port into a samba419 port, and can report success, so an extent. I iterated through both samba417 and samba418 ports in the process. The samba417 port work is based on that which is already posted to this bug. I am uploading all patches involved, just in case anyone wants to try the different versions. There is also a direct patch that goes from net/samba416 to net/samba419 as well. Of note, three of the ports that are dependencies for Samba also require updating. I will attach patches for those here as well, but I can also create new bugs for each of them and link them as blockers, if that would be better from a bug management standpoint. It also looks like FreeBSD relies on the bundled 'ldb' library within Samba, rather than using one of the versioned instances in ports. I assume this is because ldb and Samba tend to be locked to specific versions, and this can create dependency nightmares (which I have had encounters with on the Linux-side of things before, so I am no stranger there). The three dependencies that need to be bumped are: databases/tdb 1.4.7 --> 1.4.9 devel/talloc 2.3.4 --> 2.4.1 devel/tevent 0.13.0 --> 0.15.0 All of my testing/experimentation has been only on the file server elements of Samba. I have no tested anything more advanced, like domain controller functionality, kerberos bits, etc. I don't run those services on my network, so don't have a need to mess with them. Additional eyes and scrutiny is going to be needed on those areas to make sure nothing breaking is missed before adding this all to Ports. The change from 4.16.x to 4.17.x is fairly uneventful and are already documented in this bug. Things got more interesting when going from 4.17.x to 4.18.x... Back in net/samba416, when that was added, it included a patch, files/0099-s3-modules-zfsacl-fix-get-set-ACL-on-FreeBSD-13.patch, which added some O_PATH logic to the `fget_zfsacl` function, which included calling the `get_zfsacl` function. In mid-summer 2022, the `get_zfsacl` function was removed in commit 09a844c69ebf, and while this won't immediately cause a build error, when you go to connect to a Samba instance built this way, the connection will fail because the dynamic loader is unable to locate the symbol for `get_zfsacl`. A quick and dirty fix for this is to add that function back in by reversing the commit that removed it. I suspect this is not a viable long-term fix and that the O_PATH logic needs to be fixed to deal with this function's removal, but I wasn't able to locate any information about that O_PATH patch, so I leave that to those who better understand the code. For now, the patch to go from 4.17.x to 4.18.x reverses the upstream commit and adds `get_zfsacl` back in, and thus, we get a working net/samba418 port. Additionally, the patch files/0028-s3-lib-system-add-FreeBSD-proc_fd_pattern.patch, is removed due to being in upstream now. Going from 4.18.x to 4.19.x is less complicated. The patch, files/0100-From-872ea49ac6dced44f114f80b7065017a381f46d7.patch, added by the net/samba417 update, is dropped, as it's merged into the upstream source now, and a few additional pkg-plist entries were added for a new log-parser binary and removing an old man page. The end result is a net/samba419 port updated to samba-4.19.1, the latest release (as of writing), and it's been running on my home NAS system for several days now with no noticeable impacts, and no glaring issues in the logging. One configuration directive is dropped, "directory name cache size", but this doesn't impact the running of the server process. So I think the primary fix here is handling the removal of `get_zfsacl` from the upstream code in the added O_PATH logic. If better minds have ideas for that, I am willing to test. PS, can this bug be assigned to the samba port maintainer? -- You are receiving this mail because: You are the assignee for the bug.