From c7b40a2181ce5e25682515f01af25df3acbb0184 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Tue, 21 Oct 2025 13:56:02 +0200 Subject: [PATCH] gnu: tests: Fix the gitile test. The test fails because the gitile daemon that runs as "gitile" user cannot access the /srv/git directory that is root-owned. * gnu/tests/version-control.scm (%make-git-repository): Change the ownership of /srv/git so that gitile can access it. Change-Id: I01fa98e3311ac0dba88a4af21cee3ae0da986582 --- gnu/tests/version-control.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnu/tests/version-control.scm b/gnu/tests/version-control.scm index 08863ebc3e..8b02d3d9ba 100644 --- a/gnu/tests/version-control.scm +++ b/gnu/tests/version-control.scm @@ -65,6 +65,12 @@ (mkdir-p "/srv/git") (rename-file "/tmp/test-repo/.git" "/srv/git/test") + ;; Make sure that the gitile user can access the /srv/git directory + ;; and its child. + (let ((user (getpw "gitile"))) + (for-each (lambda (dir) + (chown dir (passwd:uid user) (passwd:gid user))) + '("/srv/git" "/srv/git/test"))) (with-output-to-file "/srv/git/test/git-daemon-export-ok" (lambda _ (display "")))))))