mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 13:10:33 +02:00
daemon: Dereference symlinks for /etc/services & co.
Fixes a regression on Guix System introduced inc4298638ca(from guix/guix#4178) where files in /etc, such as /etc/services, would be symlinks. Consequently, the chroot of fixed-output derivations would contain a dangling symlink for /etc/services, leading to name resolution failures in the chroot. This also relates to82f84f5e7f. * nix/libstore/build.cc (DerivationGoal::startBuilder): Add call to ‘canonPath’. Change-Id: If34c8e74447ffc03d9fa81a1ea6bc0aef7c4d0b3 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
@@ -2805,7 +2805,10 @@ void DerivationGoal::startBuilder()
|
|||||||
}
|
}
|
||||||
for (auto & file : files) {
|
for (auto & file : files) {
|
||||||
if (pathExists(file)) {
|
if (pathExists(file)) {
|
||||||
ctx.filesInChroot[file] = file;
|
/* On Guix System, /etc/services is a symlink; likewise,
|
||||||
|
on systemd-based system, /etc/resolv.conf is a symlink.
|
||||||
|
Dereference them. */
|
||||||
|
ctx.filesInChroot[file] = canonPath(file, true);
|
||||||
ctx.readOnlyFilesInChroot.insert(file);
|
ctx.readOnlyFilesInChroot.insert(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user