From ee71b7003d979953599937b41e65b809e4f0c1fd Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 5 Feb 2026 07:06:15 +0200 Subject: services: git-http-nginx-location-configuration: Enable configuration of the root URI path /. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/services/version-control.scm (git-http-nginx-location-configuration): Handle the case where uri-path is "/" by not adding an extra slash prefix. * gnu/tests/version-control.scm (git-nginx-root-configuration): Generalize from %git-nginx-root-configuration to take uri-path as an argument from... (git-http-os): ...this new procedure generalized from %git-http-os to take uri-path as an argument from... (git-http-test): ...this new procedure generalized from run-git-http-test to return a system test instead of just its store value. Additionally take name, description, and uri-path arguments. (%test-git-http): Adjust accordingly. (%test-git-http-root-path): Duplicate %test-git-http with "/" instead of "/git/" as uri-path. Merges: https://codeberg.org/guix/guix/pulls/6140 Co-authored-by: Nguyễn Gia Phong Signed-off-by: Nguyễn Gia Phong --- gnu/services/version-control.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gnu/services') diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index dba38faa460..55af92c9f5a 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -275,7 +275,12 @@ access to exported repositories under @file{/srv/git}." (($ package git-root export-all? uri-path fcgiwrap-socket) (nginx-location-configuration - (uri (string-append "~ /" (string-trim-both uri-path #\/) "(/.*)")) + (uri (string-append + "~ " + (if (string=? uri-path "/") + "" + (string-append "/" (string-trim-both uri-path #\/))) + "(/.*)")) (body (list (list "fastcgi_pass " fcgiwrap-socket ";") -- cgit v1.2.3