Subject: [bug#28283] Status: [PATCH 1/1] gnu: services: version-control: Add cgit.

From: Oleg Pykhalov <[email-masked]>
Date: Tue, 03 Oct 2017 09:22:08 +0300

Hello Ludovic,

[email-masked] (Ludovic Courtès) writes:

[...]

> I changed this part like this so that things work as expected if we pass
> items that live in the store (along with other changes):

[...]

Thanks.  But we need to add newline character.  Otherwise cgitrc config
will be in one line.

diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm
index 208351447..8666648c0 100644
--- a/gnu/services/version-control.scm
+++ b/gnu/services/version-control.scm
@@ -194,7 +194,7 @@ access to exported repositories under @file{/srv/git}."
             (letrec-syntax ((option (syntax-rules ()
                                       ((_ key value)
                                        (if value
-                                           `(,key "=" ,value)
+                                           `(,key "=" ,value "\n")
                                            '()))))
                             (key/value (syntax-rules ()
                                          ((_ (key value) rest ...)

> $ guix gc -R  /gnu/store/i71plcn5y8b29nc59s5d7m2cx810ki6n-cgit-test.drv |grep run-vm
> /gnu/store/v9s4ai0dvgvmga6lyj4z2733lavr3acl-run-vm.sh-builder
> /gnu/store/6a2l7mcshdzc38zj8nkinjlzqmgjnx3b-run-vm.sh.drv
> $ guix build /gnu/store/6a2l7mcshdzc38zj8nkinjlzqmgjnx3b-run-vm.sh.drv
> /gnu/store/igjg0i4d3sj77jpgppn09r66jql6nliw-run-vm.sh
> $ /gnu/store/igjg0i4d3sj77jpgppn09r66jql6nliw-run-vm.sh -serial stdio

Awesome, this is what I'm searching for.

> Then I experimented with w3m inside the VM.
>
> Apparently some URLs are being rewritten, with
> /cgit.cgi/cgit.cgi/cgit.cgi/… and so on, which looks weird.
>
> Could you investigate more in a VM (you can simply use ‘guix system vm’
> with a config similar to that of the test) to see what’s going on?
> Looks like we’re almost there, but I’d feel more confident if we could
> get a test running.  :-)

I think this was because of one line cgitrc config.  I have some issues
with testing in VM again.

$ /gnu/store/igjg0i4d3sj77jpgppn09r66jql6nliw-run-vm.sh -net user,hostfwd=tcp::10080-:19418 -serial stdio

will freeze most of time without `sudo'.  If I use `sudo' then I could
open site in Icecat, but after several seconds only “The connection was
reset”.

$ curl http://localhost:10080
curl: (52) Empty reply from server

Also `marionette' service is too much respawning and then dies according
to `herd status'