From 0e7d98e4aa699e5e92de0864b0eb57a2d787c8c7 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 19 Mar 2022 22:58:26 +0530 Subject: forge: Change ownership of parent directory of website directory. * guix/forge/forge.scm (forge-activation): Change ownership of parent directory of website directory, instead of changing the ownership of the website directory itself. * doc/forge.skb (Reference)[]: Document it. --- doc/forge.skb | 8 +++++--- guix/forge/forge.scm | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/forge.skb b/doc/forge.skb index dae6aaa..d56a6f7 100644 --- a/doc/forge.skb +++ b/doc/forge.skb @@ -168,9 +168,11 @@ disregarded if the repository is remote.]) the ,(file "description") file in the repository and will appear in the cgit web interface.]) (record-field "website-directory" - [Path to the document root of the project website. Its -ownership is granted to the ,(code "laminar") user so that continuous -integration jobs can write to it.]) + [Path to the document root of the project website. The +ownership of its parent directory is granted to the ,(code "laminar") +user. The idea is that the website is built by a Guix derivation as a +store item and a symbolic link to that store item is created in the +parent directory.]) (record-field "ci-jobs" [List of ,(ref :mark "") objects describing ,(abbr :short "CI" :long "continuous integration") jobs to diff --git a/guix/forge/forge.scm b/guix/forge/forge.scm index f8acc80..29825c7 100644 --- a/guix/forge/forge.scm +++ b/guix/forge/forge.scm @@ -146,7 +146,8 @@ ;; Set ownership of website directory. (when website-directory (let ((user (getpw "laminar"))) - (chown website-directory (passwd:uid user) (passwd:gid user)))))) + (chown (dirname website-directory) + (passwd:uid user) (passwd:gid user)))))) '#$projects)))) (define (import-module? name) -- cgit v1.2.3