diff options
| author | Frederick Muriuki Muriithi | 2026-03-04 09:27:00 -0600 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-03-05 08:49:17 -0600 |
| commit | 697b89f5bc0a20fd7f6d37a00bd8d722a3dcf4f6 (patch) | |
| tree | c00771062028cb8da3be14d66b3f247b6883fe83 /genenetwork/services | |
| parent | 931f1dca12e2f75712904ffad9119e19e173437f (diff) | |
| download | gn-machines-697b89f5bc0a20fd7f6d37a00bd8d722a3dcf4f6.tar.gz | |
Refactor gn-guile-shepherd-service
* Remove the `ssh-command` and `guile-settings` variables
Diffstat (limited to 'genenetwork/services')
| -rw-r--r-- | genenetwork/services/genenetwork.scm | 76 |
1 files changed, 25 insertions, 51 deletions
diff --git a/genenetwork/services/genenetwork.scm b/genenetwork/services/genenetwork.scm index 2177033..7f232dc 100644 --- a/genenetwork/services/genenetwork.scm +++ b/genenetwork/services/genenetwork.scm @@ -707,7 +707,7 @@ a @code{<genenetwork-configuration>} record." (define (gn-guile-shepherd-service config program-gexp) (match-record config <genenetwork-configuration> - (gn-guile gn-doc-git-checkout gn-guile-port gn-guile-ssh-identity-file gn-guile-known-hosts-file gn-docs-working-branch gn-guile-working-dir) + (gn-guile gn-guile-port gn-guile-ssh-identity-file gn-guile-known-hosts-file gn-guile-working-dir) (shepherd-service (documentation "Run gn-guile server.") (provision '(gn-guile)) @@ -715,56 +715,30 @@ a @code{<genenetwork-configuration>} record." (modules '((ice-9 match) (srfi srfi-1))) (start - (let* ((ssh-command - (program-file - "gn-guile-git-ssh-command" - (with-imported-modules '((guix build utils)) - #~(begin - (use-modules (guix build utils)) - - (invoke #$(file-append openssh-sans-x "/bin/ssh") - "-F" - #$(mixed-text-file "gn-guile-ssh-config" - "Host git.genenetwork.org\n" - "\tUser git\n" - "\tIdentitiesOnly yes\n" - "\tIdentityFile " gn-guile-ssh-identity-file "\n" - "\tUserKnownHostsFile " gn-guile-known-hosts-file)))))) - (gn-guile-settings - `(("CGIT_REPO_PATH" ,gn-doc-git-checkout) - ("LC_ALL" "en_US.UTF-8") - ("GIT_COMMITTER_NAME" "genenetwork") - ("GIT_COMMITTER_EMAIL" "no-reply@git.genenetwork.org") - ("GIT_SSH_COMMAND" "some-ssh-command")))) - #~(make-forkexec-constructor - (list #$(least-authority-wrapper - (program-file "gn-guile" program-gexp) - #:name "gn-guile-pola-wrapper" - #:directory gn-guile-working-dir - #:preserved-environment-variables - (map first gn-guile-settings) - #:mappings (list (file-system-mapping - (source gn-guile-working-dir) - (target source) - (writable? #t)) - (file-system-mapping - (source gn-guile-ssh-identity-file) - (target source) - (writable? #f)) - (file-system-mapping - (source gn-guile-known-hosts-file) - (target source) - (writable? #f))) - #:namespaces (delq 'net %namespaces)) - "127.0.0.1" #$(number->string gn-guile-port)) - #:user "genenetwork" - #:group "genenetwork" - #:environment-variables - (map (match-lambda - ((spec value) - (string-append spec "=" value))) - '#$gn-guile-settings) - #:log-file "/var/log/gn-guile.log"))) + #~(make-forkexec-constructor + (list #$(least-authority-wrapper + (program-file "gn-guile" program-gexp) + #:name "gn-guile-pola-wrapper" + #:directory gn-guile-working-dir + #:mappings (list (file-system-mapping + (source gn-guile-working-dir) + (target source) + (writable? #t)) + (file-system-mapping + (source gn-guile-ssh-identity-file) + (target source) + (writable? #f)) + (file-system-mapping + (source gn-guile-known-hosts-file) + (target source) + (writable? #f))) + #:namespaces (delq 'user (delq 'net %namespaces)) + #:user "genenetwork" + #:group "genenetwork") + "127.0.0.1" #$(number->string gn-guile-port)) + #:user "root" + #:group "root" + #:log-file "/var/log/gn-guile.log")) (stop #~(make-kill-destructor))))) (define genenetwork-service-type |
