From eedc3027d636fc57e3c3ba2dc2bd58c50e3002be Mon Sep 17 00:00:00 2001 From: Aliaksandr Date: Tue, 23 Jun 2026 22:19:06 +0300 Subject: [PATCH] nixos/glusterfs: fix dangling glusterfind hook symlink The hooks tree copied into /var/lib/glusterd contains one symlink, S57glusterfind-delete-post, whose relative target resolves inside the package's $out but dangles once copied verbatim into / (the referent lives in the Nix store, not under /libexec). Pass --copy-unsafe-links so rsync dereferences symlinks pointing outside the tree into real files. Fixes #257863. Assisted-by: claude-code with claude-opus-4-8[1m]-high --- nixos/modules/services/network-filesystems/glusterfs.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/network-filesystems/glusterfs.nix b/nixos/modules/services/network-filesystems/glusterfs.nix index db00cdc11abb..ad909321d293 100644 --- a/nixos/modules/services/network-filesystems/glusterfs.nix +++ b/nixos/modules/services/network-filesystems/glusterfs.nix @@ -180,7 +180,9 @@ in # Excludes one hook due to missing SELinux binaries. + '' mkdir -p /var/lib/glusterd/hooks/ - ${rsync}/bin/rsync -a --exclude="S10selinux-label-brick.sh" ${glusterfs}/var/lib/glusterd/hooks/ /var/lib/glusterd/hooks/ + # --copy-unsafe-links: the glusterfind hook is a symlink into the package's + # libexec that would dangle once copied verbatim into / (#257863). + ${rsync}/bin/rsync -a --copy-unsafe-links --exclude="S10selinux-label-brick.sh" ${glusterfs}/var/lib/glusterd/hooks/ /var/lib/glusterd/hooks/ ${tlsCmd} ''