This is an automated email from the git hooks/post-receive script.

guix_mirror_bot pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new af93999c8bf services: cgit: Narrow the document root.
af93999c8bf is described below

commit af93999c8bf3c2825178447ec657823f91aed5cd
Author: William Riley-Land <[email protected]>
AuthorDate: Fri Nov 6 08:35:19 2026 -0600

    services: cgit: Narrow the document root.
    
    * gnu/services/cgit.scm (%cgit-configuration-nginx):
      Narrow document root to /share/cgit.
      (cgit-configuration)[css, logo]: Drop /share/cgit
      from the default resource URLs.
    * doc/guix.texi (Version Control Services)[Cgit Service]:
      Update accordingly.
    
    Merges: https://codeberg.org/guix/guix/pulls/12322
    Signed-off-by: Nguyễn Gia Phong <[email protected]>
---
 doc/guix.texi         |  4 ++--
 gnu/services/cgit.scm | 18 ++++++++++--------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 3d050f276b4..ffc529b6b76 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -44993,7 +44993,7 @@ Defaults to @samp{"git log"}.
 @deftypevr {@code{cgit-configuration} parameter} file-object css
 URL which specifies the css document to include in all cgit pages.
 
-Defaults to @samp{"/share/cgit/cgit.css"}.
+Defaults to @samp{"/cgit.css"}.
 
 @end deftypevr
 
@@ -45189,7 +45189,7 @@ Defaults to @samp{#f}.
 URL which specifies the source of an image which will be used as a logo
 on all cgit pages.
 
-Defaults to @samp{"/share/cgit/cgit.png"}.
+Defaults to @samp{"/cgit.png"}.
 
 @end deftypevr
 
diff --git a/gnu/services/cgit.scm b/gnu/services/cgit.scm
index f2d1be04f05..d3ddc166637 100644
--- a/gnu/services/cgit.scm
+++ b/gnu/services/cgit.scm
@@ -54,16 +54,18 @@
 
 (define %cgit-configuration-nginx
   (nginx-server-configuration
-   (root cgit)
+   (root (file-append cgit "/share/cgit"))
    (locations
     (list
      (nginx-location-configuration
       (uri "@cgit")
-      (body '("fastcgi_param SCRIPT_FILENAME $document_root/lib/cgit/cgit.cgi;"
-              "fastcgi_param PATH_INFO $uri;"
-              "fastcgi_param QUERY_STRING $args;"
-              "fastcgi_param HTTP_HOST $server_name;"
-              "fastcgi_pass 127.0.0.1:9000;")))))
+      (body (list #~(string-append "fastcgi_param SCRIPT_FILENAME "
+                                   #$(file-append cgit "/lib/cgit/cgit.cgi")
+                                   ";")
+                  "fastcgi_param PATH_INFO $uri;"
+                  "fastcgi_param QUERY_STRING $args;"
+                  "fastcgi_param HTTP_HOST $server_name;"
+                  "fastcgi_pass 127.0.0.1:9000;")))))
    (try-files (list "$uri" "@cgit"))
    (listen '("80"))
    (ssl-certificate #f)
@@ -394,7 +396,7 @@ generates valid clone URLs for the repository.")
 commit log, and when set to @samp{topo} enables strict topological
 ordering.")
   (css
-   (file-object "/share/cgit/cgit.css")
+   (file-object "/cgit.css")
    "URL which specifies the css document to include in all cgit pages.")
   (email-filter
    (file-object "")
@@ -493,7 +495,7 @@ verbatim below the heading on the repository index page.")
    "Flag which, if set to @samp{#t}, makes cgit print commit and tag times
 in the servers timezone.")
   (logo
-   (file-object "/share/cgit/cgit.png")
+   (file-object "/cgit.png")
    "URL which specifies the source of an image which will be used as a logo
 on all cgit pages.")
   (logo-link

Reply via email to