Hi all,
I was recently trying to setup HA Samba for my homelab. Checking out the services.samba option, available packages, and the wiki, I made the decision that I would start with samba4Full and try to go for something slimmer when I had everything in a working state. Unfortunately, samba4Full is not as Full as the name suggests. Cluster support features are missing:
[admin@fileshare1:~]$ smbd -b
[...]
Cluster support features:
NONE
[...]
Looking at the nixpkgs source, it seems to be built without the necessary flag: --with-cluster-support.
The patch next to the derivation[1] does mention the CTDB directories.
I tried compiling Samba locally with the following attribute override:
services.samba = {
[...]
package = pkgs.samba4Full.overrideAttrs (oldAttrs: {
wafConfigureFlags = (oldAttrs.wafConfigureFlags or []) ++ [
"--with-cluster-support"
];
});
[...]
};
The compile failed with a permission denied error on /etc/ctdb for creating /etc/ctdb/events/legacy, leading me to believe that the patch from nixpkgs was not applied.
[...]
Note: Writing ctdb-tunables.7
Waf: Leaving directory `/build/samba-4.23.8/bin/default'
Build commands will be stored in bin/default/compile_commands.json
'build' finished successfully (9m24.153s)
buildPhase completed in 9 minutes 26 seconds
Running phase: glibPreInstallPhase
Running phase: installPhase
waf install flags: -j 4 install
Waf: Entering directory `/build/samba-4.23.8/bin/default'
Selected embedded Heimdal build
* create /etc/ctdb/events/legacy
Cannot create the folder '/etc/ctdb/events/legacy' (error: [Errno 13] Permission denied: '/etc/ctdb')
error: Cannot build '/nix/store/xsmf9vbg8nfjw98m1z08fw69hwlani96-samba-4.23.8.drv'.
Reason: builder failed with exit code 1.
Output paths:
/nix/store/1b8f82yb22gbpq2hpwzv70wdkkmpq7x2-samba-4.23.8-man
/nix/store/ki5b3rpj7y1rcy7wq80pam72sa34r0zp-samba-4.23.8-dev
/nix/store/zcwlzba8nifamarmrhbgm09g27h2mppj-samba-4.23.8
error: Cannot build '/nix/store/xsmf9vbg8nfjw98m1z08fw69hwlani96-samba-4.23.8.drv'.
Reason: builder failed with exit code 1.
Output paths:
/nix/store/1b8f82yb22gbpq2hpwzv70wdkkmpq7x2-samba-4.23.8-man
/nix/store/ki5b3rpj7y1rcy7wq80pam72sa34r0zp-samba-4.23.8-dev
/nix/store/zcwlzba8nifamarmrhbgm09g27h2mppj-samba-4.23.8
error: Cannot build '/nix/store/v948z97671cn8y51caykylcnzs4bws0z-system-path.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/k5m710qjb88yv78w94jx8mlc88imwh7q-system-path
error: Cannot build '/nix/store/zsrz23wb7ca2ap4v4xir4zza3svnzlq9-unit-samba-nmbd.service.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/36qn45n2vd5xg3i1aabgm3frdvyf4dp9-unit-samba-nmbd.service
error: Cannot build '/nix/store/l7z3dw0s07b2vms5a6gs9nri4ggwkrrx-unit-samba-smbd.service.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/cmfmwvjff4d493q31i2jnvg4s76wi00m-unit-samba-smbd.service
error: Cannot build '/nix/store/54x0rdl1a79n7k82gwp5m13m0d9ifsb6-unit-samba-winbindd.service.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/84ws1k43aq1a9w8abiyb3wdnl00vvbac-unit-samba-winbindd.service
error: Build failed due to failed dependency
error: Build failed due to failed dependency
error: Cannot build '/nix/store/b5i9hkxj2sbzd35mplxy90y8hx46hyrn-X-Restart-Triggers-polkit.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/js7hc1m7y4xk8l4lxsqagfk2ra79yn67-X-Restart-Triggers-polkit
error: Cannot build '/nix/store/vi98hqaiwyn6i9vf6sr7mqn5m656a5hf-dbus-1.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/xsi5khj61jb9zq93hpm9py6qf6qffrhm-dbus-1
error: Cannot build '/nix/store/qrr1g1250li4qdk03l488gvm1ajqh99y-etc.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/nfmx6y6cq5mpbsrnr1685j82b8hg9zn4-etc
error: Cannot build '/nix/store/0szi7m8ih4jwfgsvvhggpymsjvjzwwa3-nixos-system-fileshare1-26.05.1550.bd0ff2d3eac2.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/5y3jld8qlzjgfa43yx0jqnir1nn9vmgq-nixos-system-fileshare1-26.05.1550.bd0ff2d3eac2
error: Cannot build '/nix/store/j9j3y57xcz9cjc5j4z6jn0rss3dhk2bf-system-units.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/7g7j13lfdrivia1x5jff7f1jnj103mwc-system-units
error: Build failed due to failed dependency
Command 'nix-build '<nixpkgs/nixos>' --attr config.system.build.toplevel --no-out-link' returned non-zero exit status 100.
That leaves me with the following questions:
- What do I have to do to get it to work?
- Should
samba4Fullfrom nixpkgs include clustering support? - If not, should there be a
samba4FullWithClusteringpackage? - How do I report this to the maintainer of the package? There doesn’t seem to be a fitting issue template on nixpkgs.
Thanks in advance for any help given.
Best,
I’m unsure if that’s the correct term in the Nix world. ↩︎