1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

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
This commit is contained in:
Mathieu Othacehe
2025-10-21 13:56:02 +02:00
parent 5dca11e5e5
commit c7b40a2181

View File

@@ -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 "")))))))