From a0e1d1fd6c57eb2282b2d96b007d3536c0c5316a Mon Sep 17 00:00:00 2001 From: ghpzin Date: Sun, 8 Sep 2024 16:09:41 +0300 Subject: [PATCH] nixos/tests/gitdaemon: fix user and group - change tmpfiles rule user/group to default daemon user/group set by gitDaemon module - git:git - add chown of created repo to user/group of daemon after local subtest on server (that run from root user) pass. Without it next subtest doing clone from remote fails with "detected dubious ownership in repository" on server side. --- nixos/tests/gitdaemon.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/tests/gitdaemon.nix b/nixos/tests/gitdaemon.nix index 052fa902b450..2211960b457f 100644 --- a/nixos/tests/gitdaemon.nix +++ b/nixos/tests/gitdaemon.nix @@ -20,7 +20,7 @@ in { systemd.tmpfiles.rules = [ # type path mode user group age arg - " d /git 0755 root root - -" + " d /git 0755 git git - -" ]; services.gitDaemon = { @@ -56,6 +56,10 @@ in { "rm -r /project", ) + # Change user/group to default daemon user/group from module + # to avoid "fatal: detected dubious ownership in repository at '/git/project.git'" + server.succeed("chown git:git -R /git/project.git") + with subtest("git daemon starts"): server.wait_for_unit("git-daemon.service")