[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pre-release [PATCH] git-service [v2]

From: ng0
Subject: Re: pre-release [PATCH] git-service [v2]
Date: Sun, 28 Aug 2016 00:04:23 +0000

ng0 <address@hidden> writes:

> Alex Kost <address@hidden> writes:
>> ng0 (2016-08-27 18:39 +0300) wrote:
>> [...]
>>> (eval-when (expand load eval) (set! %load-path (cons 
>>> "/gnu/store/8s6z5k9nfp3fyfj39vq6js8sfhxkn0y6-module-import" %load-path))
>>> (set! %load-compiled-path (cons 
>>> "/gnu/store/lc0bj2nlmdgyqkkpd008hcnrpl068yr8-module-import-compiled"
>>> %load-compiled-path)))(begin (use-modules (shepherd service) (oop goops)
>>> (guix build utils) (guix build syscalls)) (make <service> #:docstring
>>> (quote "Git daemon server for git repositories") #:provides (quote
>>> (git)) #:requires (quote (networking syslogd)) #:respawn? (quote #t)
>>> #:start (make-forkexec-constructor (list (string-append 
>>> "/gnu/store/f6b2a4ic4lzjv48s1w0kn6m5mxkj0qs4-git-2.9.3" "/bin/git")
>>> "daemon" "--syslog" "--informative-errors" "--port=" "9418" "--base-path=" 
>>> "/var/git/repositories")) #:stop (make-kill-destructor)))
>>>                                                 ^______^       
>>> ^_____________^
>>>                                                  those two should be
>>>                                                  combined, same for the
>>>                                                  two afterwards?
>> Indeed!  See how useful it is to look at the result .scm file :-)
>> You can be assured that the above thing doesn't work by running
>> something like this in a guile REPL:
>>   (system* "git" "daemon" "--port=" "9418" "--base-path=/tmp/git-daemon-dir")
>> while this works (assuming that "/tmp/git-daemon-dir" exists):
>>   (system* "git" "daemon" "--port=9418" "--base-path=/tmp/git-daemon-dir")
>> So you need to 'string-append' the port and base-path as you did for the
>> git command.
>> (I didn't try the service, so I don't know if there are other problems,
>> but you are getting closer, keep going!)
>> -- 
>> Alex
> Wooo :) Thanks, this works. Now I just need to configure the testvm.scm
> in a way that I create a simple repository and clone it from the host
> and send changes to it.

Okay, it works, but for the full functionality test I want to do a git
pull+push from / to the VM. This is something I can not achieve at the
moment, even with changes applied in the gnu/services/vm.scm:
  -redir tcp:2222::22 \     didn't work, and
  the newer method, adding something after "-net user," didn't work
Where in this case "did not work" means I am unable to
ssh or ssh localhost:2222 or whatever.. I use the same to
connect from NixOS to Gentoo, so I don't understand why Guix would
fail. isolation is good, but I need to test the git service.

In my opinion this should be a switch option,

--with-forward-ports 2222:22

or similar.
For non-prism friendly talk find me on

reply via email to

[Prev in Thread] Current Thread [Next in Thread]