Respect Samba installation path build options for CTDB installation
CTDB's location for locks, PID files and sockets is currently hardcoded to be CTDB_RUNDIR, which is under LOCALSTATEDIR (usually /var). /run is currently a more fashionable location for these things, so change CTDB's installation path handling to follow (via ctdb/ subdirectories) the Samba configure options --with-lockdir, --with-piddir and --with-sockets-dir.
As per one of the commit messages, the current fashion sometimes causes issues, even though current uses of /var/run/ctdb usually end up in /run/ctdb due to the relatively standard /var/run -> ../run symlink.
Note that this has been through testing in autocluster, to show know that the combined build works (which is not tested by the unit test):
$ autocluster-test-ctdb rocky8 martins/ctdb-rundir
BUILD 2026-07-08 15:42:33
=========================
martins/ctdb-rundir:
BUILD OK after 00:10:36, /home/virtual/clusters/tests/martins-ctdb-rundir/build/rocky8/binary-samba-4.25.0pre1-GIT-d53bdf46393.tar.gz
TEST 2026-07-08 15:53:09
========================
PASSED martins/ctdb-rundir samba-4.25.0pre1-GIT-d53bdf46393 [02:06:05]
DONE 2026-07-08 17:59:16
========================This is actually from an earlier version, before the ctdb-path changes. Of course, both I have and GitLab CI will check that the unit test passes.
Checklist
- Commits have
Signed-off-by:with name/author being identical to the commit author - (optional) This MR is just one part towards a larger feature.
- (optional, if backport required) Bugzilla bug filed and
BUG:tag added - Test suite updated with functionality tests
- Test suite updated with negative tests
- Documentation updated
- CI timeout is 3h or higher (see Settings/CICD/General pipelines/ Timeout)
Reviewer's checklist:
- There is a test suite reasonably covering new functionality or modifications
- Function naming, parameters, return values, types, etc., are consistent
and according to
README.Coding.md - This feature/change has adequate documentation added
- No obvious mistakes in the code