From unknown Sat Jun 21 10:45:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37412] [PATCH 0/2] Add package and service for the Guix Data Service. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 15 Sep 2019 18:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37412 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37412@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15685714951592 (code B ref -1); Sun, 15 Sep 2019 18:19:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Sep 2019 18:18:15 +0000 Received: from localhost ([127.0.0.1]:48703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9Z6D-0000Pb-0h for submit@debbugs.gnu.org; Sun, 15 Sep 2019 14:18:13 -0400 Received: from lists.gnu.org ([209.51.188.17]:46719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9Z6B-0000PR-Ch for submit@debbugs.gnu.org; Sun, 15 Sep 2019 14:18:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34071) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9Z6A-0008Md-Em for guix-patches@gnu.org; Sun, 15 Sep 2019 14:18:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9Z69-0007sL-8P for guix-patches@gnu.org; Sun, 15 Sep 2019 14:18:10 -0400 Received: from mira.cbaines.net ([2a01:7e00::f03c:91ff:fe69:8da9]:46960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i9Z69-0007rl-31 for guix-patches@gnu.org; Sun, 15 Sep 2019 14:18:09 -0400 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 87676173C4 for ; Sun, 15 Sep 2019 19:18:07 +0100 (BST) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 2f7986e2 for ; Sun, 15 Sep 2019 18:18:07 +0000 (UTC) User-agent: mu4e 1.2.0; emacs 26.3 From: Christopher Baines Date: Sun, 15 Sep 2019 19:18:06 +0100 Message-ID: <87v9tt1l0h.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:7e00::f03c:91ff:fe69:8da9 X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain These patches add a package definition, and service type for the Guix Data Service, as well as a system test. Christopher Baines (2): gnu: Add guix-data-service. services: Add the Guix Data Service. gnu/local.mk | 2 + gnu/packages/web.scm | 83 +++++++++++++++++ gnu/services/guix.scm | 204 ++++++++++++++++++++++++++++++++++++++++++ gnu/tests/guix.scm | 173 +++++++++++++++++++++++++++++++++++ 4 files changed, 462 insertions(+) create mode 100644 gnu/services/guix.scm create mode 100644 gnu/tests/guix.scm --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl1+gF5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XcbEBAAsZGWiuUZjybjMp2iC7h0W1pkjVhmuqoGviUxc1tymE4Wa6eX1LtGqOB6 6dWe5r2fWaV3j4DG/N9eGejuJQWU5tKNhsQ3NnszMSYjD/sUnuaho6jpLrwp4zI4 PUx/1079LeihIHso7cdu53YutEt5aoINqAD070p1BDwPGeto6BUpmHedarCfG888 aewaQUZ1I42zjewVN+l+mMUPyg7ZhOOk3Fc1t+tW9AHN36yaH0t43uz0nv03iqp9 7v3OvJV2U65ycbha/dTevr9whoEJiGMRbXDKUZbZB+QLamMOSfKc7MYUC1353KbX mL88M0ryoJ8cymM5E+byWALWHj5Ag+PHBsmbkuvk9qNkqk4KUGmcFvnxZSWDoEDz MoTjC5tH+ux7MAzpnn5PKAu0P6QsC3Y5gZEkRC4cr4AZcMbfNMBKn0naB9adxJ38 vdmFOmMT512TyQxdJasTdjgeUXVwx6pSelpXjucwWDcIzTAPxfBCLDff8EbYl970 OA+yPHb9fZlQPHZ2fGCF/OlGM8iv3heB2e7ZU05wQT/KJ+nJL4ZbXJXjbmfBMRFN LZo7CtHfpfFOpmwQPm6WjNcbd5Ic6SZORw3Xy+yaXlOpYuhQLkxtc3ON+GjNZZcX y017+mLpwbdcGMoIQR6BXXFWnnJgwbICTXnDDXk7ha7Ph5L1Gb0= =wFrO -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Jun 21 10:45:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37412] [PATCH 1/2] gnu: Add guix-data-service. References: <87v9tt1l0h.fsf@cbaines.net> In-Reply-To: <87v9tt1l0h.fsf@cbaines.net> Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 15 Sep 2019 18:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37412 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37412@debbugs.gnu.org Received: via spool by 37412-submit@debbugs.gnu.org id=B37412.15685716921989 (code B ref 37412); Sun, 15 Sep 2019 18:22:01 +0000 Received: (at 37412) by debbugs.gnu.org; 15 Sep 2019 18:21:32 +0000 Received: from localhost ([127.0.0.1]:48709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9Z9O-0000Vy-9B for submit@debbugs.gnu.org; Sun, 15 Sep 2019 14:21:32 -0400 Received: from mira.cbaines.net ([212.71.252.8]:59204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9Z9M-0000Vi-Gb for 37412@debbugs.gnu.org; Sun, 15 Sep 2019 14:21:29 -0400 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id BA9E0173D1 for <37412@debbugs.gnu.org>; Sun, 15 Sep 2019 19:21:27 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 8e43d5b6 for <37412@debbugs.gnu.org>; Sun, 15 Sep 2019 18:21:27 +0000 (UTC) From: Christopher Baines Date: Sun, 15 Sep 2019 19:21:26 +0100 Message-Id: <20190915182127.10525-1-mail@cbaines.net> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/web.scm (guix-data-service): New variable. --- gnu/packages/web.scm | 83 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 39475bd6a8..30adc75aa1 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -3973,6 +3973,89 @@ CDF, Atom 0.3, and Atom 1.0 feeds.") (define-public python2-feedparser (package-with-python2 python-feedparser)) +(define-public guix-data-service + (let ((commit "6a9f11fb94fbfd969396dd4d9f768a0c9ec67734") + (revision "1")) + (package + (name "guix-data-service") + (version (string-append "0.0.1-" revision "." (string-take commit 7))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/guix/data-service.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "08kfi74dp8h1i03gfmjqfv07ff7m93psnh6xmrgwzr0ja5cdqjri")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; TODO Tests require PostgreSQL + #:modules ((guix build utils) + (guix build gnu-build-system) + (ice-9 rdelim) + (ice-9 popen)) + #:phases + (modify-phases %standard-phases + (add-after 'install 'wrap-executable + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (guile (assoc-ref inputs "guile")) + (guile-effective-version + (read-line + (open-pipe* OPEN_READ + (string-append guile "/bin/guile") + "-c" "(display (effective-version))"))) + (scm (string-append out "/share/guile/site/" + guile-effective-version)) + (go (string-append out "/lib/guile/" + guile-effective-version + "/site-ccache"))) + (for-each + (lambda (file) + (wrap-program (string-append bin "/" file) + `("PATH" ":" prefix + (,bin)) + `("GUILE_LOAD_PATH" ":" prefix + (,scm ,(getenv "GUILE_LOAD_PATH"))) + `("GUILE_LOAD_COMPILED_PATH" ":" prefix + (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))) + '("guix-data-service" + "guix-data-service-process-branch-updated-email" + "guix-data-service-process-job" + "guix-data-service-process-jobs" + "guix-data-service-query-build-servers")) + #t)))))) + (inputs + `(("guile" ,guile-2.2) + ("guix" ,guix) + ("guile-fibers" ,guile-fibers) + ("guile-json" ,guile-json-3) + ("guile-email" ,guile-email) + ("guile-squee" ,guile-squee) + ("postgresql" ,postgresql) + ("sqitch" ,sqitch))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("pkg-config" ,pkg-config))) + (native-search-paths + ;; guile-git requires this to be set + (list (search-path-specification + (variable "GIT_SSL_CAINFO") + (file-type 'regular) + (separator #f) + (files '("etc/ssl/certs/ca-certificates.crt"))))) + (synopsis "Store and provide data about GNU Guix") + (description + "The Guix Data Service stores data about GNU Guix, and provides this +through a web interface. It supports listening to the guix-commits mailing +list to find out about new revisions, then loads the data from these in to a +PostgreSQL database.") + (home-page "https://data.guix.gnu.org/") + (license license:agpl3+)))) + (define-public gumbo-parser (package (name "gumbo-parser") -- 2.23.0 From unknown Sat Jun 21 10:45:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37412] [PATCH 2/2] services: Add the Guix Data Service. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 15 Sep 2019 18:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37412 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37412@debbugs.gnu.org Received: via spool by 37412-submit@debbugs.gnu.org id=B37412.15685716931996 (code B ref 37412); Sun, 15 Sep 2019 18:22:02 +0000 Received: (at 37412) by debbugs.gnu.org; 15 Sep 2019 18:21:33 +0000 Received: from localhost ([127.0.0.1]:48711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9Z9Q-0000W2-ID for submit@debbugs.gnu.org; Sun, 15 Sep 2019 14:21:33 -0400 Received: from mira.cbaines.net ([212.71.252.8]:59206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9Z9M-0000Vj-Gk for 37412@debbugs.gnu.org; Sun, 15 Sep 2019 14:21:29 -0400 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id C9861173D3 for <37412@debbugs.gnu.org>; Sun, 15 Sep 2019 19:21:27 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 5e6cb9bf for <37412@debbugs.gnu.org>; Sun, 15 Sep 2019 18:21:27 +0000 (UTC) From: Christopher Baines Date: Sun, 15 Sep 2019 19:21:27 +0100 Message-Id: <20190915182127.10525-2-mail@cbaines.net> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190915182127.10525-1-mail@cbaines.net> References: <20190915182127.10525-1-mail@cbaines.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/guix.scm: New file. * gnu/tests/guix.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add both new files. --- gnu/local.mk | 2 + gnu/services/guix.scm | 204 ++++++++++++++++++++++++++++++++++++++++++ gnu/tests/guix.scm | 173 +++++++++++++++++++++++++++++++++++ 3 files changed, 379 insertions(+) create mode 100644 gnu/services/guix.scm create mode 100644 gnu/tests/guix.scm diff --git a/gnu/local.mk b/gnu/local.mk index 3f32b9cbf2..b30afdd585 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -532,6 +532,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/authentication.scm \ %D%/services/games.scm \ %D%/services/getmail.scm \ + %D%/services/guix.scm \ %D%/services/kerberos.scm \ %D%/services/lirc.scm \ %D%/services/virtualization.scm \ @@ -596,6 +597,7 @@ GNU_SYSTEM_MODULES = \ %D%/tests/desktop.scm \ %D%/tests/dict.scm \ %D%/tests/docker.scm \ + %D%/tests/guix.scm \ %D%/tests/monitoring.scm \ %D%/tests/nfs.scm \ %D%/tests/install.scm \ diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm new file mode 100644 index 0000000000..65cffce2c0 --- /dev/null +++ b/gnu/services/guix.scm @@ -0,0 +1,204 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Christopher Baines +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation, either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services guix) + #:use-module (ice-9 match) + #:use-module (guix gexp) + #:use-module (guix records) + #:use-module ((gnu packages base) + #:select (glibc-utf8-locales)) + #:use-module (gnu packages admin) + #:use-module (gnu packages web) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu services admin) + #:use-module (gnu services shepherd) + #:use-module (gnu services getmail) + #:use-module (gnu system shadow) + #:export ( + guix-data-service-configuration + guix-data-service-configuration? + + guix-data-service-type)) + +;;;; Commentary: +;;; +;;; This module implements a service that to run instances of the Guix Data +;;; Service, which provides data about Guix over time. +;;; +;;;; Code: + +(define-record-type* + guix-data-service-configuration make-guix-data-service-configuration + guix-data-service-configuration? + (package guix-data-service-package + (default guix-data-service)) + (user guix-data-service-configuration-user + (default "guix-data-service")) + (group guix-data-service-configuration-group + (default "guix-data-service")) + (port guix-data-service-port + (default 8765)) + (host guix-data-service-host + (default "127.0.0.1")) + (getmail-idle-mailboxes + guix-data-service-getmail-idle-mailboxes + (default #f)) + (commits-getmail-retriever-configuration + guix-data-service-commits-getmail-retriever-configuration + (default #f))) + +(define (guix-data-service-profile-packages config) + "Return the guix-data-service package, this will populate the +ca-certificates.crt file in the system profile." + (list + (guix-data-service-package config))) + +(define (guix-data-service-shepherd-services config) + (match config + (($ package user group + port host) + (list + (shepherd-service + (documentation "Guix Data Service web server") + (provision '(guix-data-service)) + (requirement '(postgres networking)) + (start #~(make-forkexec-constructor + (list #$(file-append package + "/bin/guix-data-service") + "--pid-file=/var/run/guix-data-service/pid" + #$(string-append "--port=" (number->string port)) + #$(string-append "--host=" host) + ;; Perform any database migrations when the + ;; service is started + "--update-database") + + #:user #$user + #:group #$group + #:pid-file "/var/run/guix-data-service/pid" + ;; Allow time for migrations to run + #:pid-file-timeout 60 + #:environment-variables + `(,(string-append + "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "LC_ALL=en_US.utf8") + #:log-file "/var/log/guix-data-service/web.log")) + (stop #~(make-kill-destructor))) + + (shepherd-service + (documentation "Guix Data Service process jobs") + (provision '(guix-data-service-process-jobs)) + (requirement '(postgres + networking + ;; Require guix-data-service, as that the database + ;; migrations are handled through this service + guix-data-service)) + (start #~(make-forkexec-constructor + (list + #$(file-append package + "/bin/guix-data-service-process-jobs")) + #:user #$user + #:group #$group + #:environment-variables + `("HOME=/var/lib/guix-data-service" + "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt" + ,(string-append + "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "LC_ALL=en_US.utf8") + #:log-file "/var/log/guix-data-service/process-jobs.log")) + (stop #~(make-kill-destructor))))))) + +(define (guix-data-service-activation config) + #~(begin + (use-modules (guix build utils)) + + (define %user (getpw "guix-data-service")) + + (mkdir-p "/var/log/guix-data-service") + + ;; Allow writing the PID file + (mkdir-p "/var/run/guix-data-service") + (chown "/var/run/guix-data-service" + (passwd:uid %user) + (passwd:gid %user)))) + +(define (guix-data-service-account config) + (match config + (($ package user group) + (list (user-group + (name group) + (system? #t)) + (user-account + (name user) + (group group) + (system? #t) + (comment "Guix Data Service user") + (home-directory "/var/lib/guix-data-service") + (shell (file-append shadow "/sbin/nologin"))))))) + +(define (guix-data-service-getmail-configuration config) + (match config + (($ package user group + port host + #f #f) + '()) + (($ package user group + port host + getmail-idle-mailboxes + commits-getmail-retriever-configuration) + (list + (getmail-configuration + (name 'guix-data-service) + (user user) + (group group) + (directory "/var/lib/getmail/guix-data-service") + (rcfile + (getmail-configuration-file + (retriever commits-getmail-retriever-configuration) + (destination + (getmail-destination-configuration + (type "MDA_external") + (path (file-append + package + "/bin/guix-data-service-process-branch-updated-email")))) + (options + (getmail-options-configuration + (read-all #f) + (delivered-to #f) + (received #f))))) + (idle getmail-idle-mailboxes)))))) + +(define guix-data-service-type + (service-type + (name 'guix-data-service) + (extensions + (list + (service-extension profile-service-type + guix-data-service-profile-packages) + (service-extension shepherd-root-service-type + guix-data-service-shepherd-services) + (service-extension activation-service-type + guix-data-service-activation) + (service-extension account-service-type + guix-data-service-account) + (service-extension getmail-service-type + guix-data-service-getmail-configuration))) + (default-value + (guix-data-service-configuration)) + (description + "Run an instance of the Guix Data Service."))) diff --git a/gnu/tests/guix.scm b/gnu/tests/guix.scm new file mode 100644 index 0000000000..6139e31cf0 --- /dev/null +++ b/gnu/tests/guix.scm @@ -0,0 +1,173 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Christopher Baines +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu tests guix) + #:use-module (gnu tests) + #:use-module (gnu system) + #:use-module (gnu system file-systems) + #:use-module (gnu system shadow) + #:use-module (gnu system vm) + #:use-module (gnu services) + #:use-module (gnu services guix) + #:use-module (gnu services databases) + #:use-module (gnu services shepherd) + #:use-module (gnu services networking) + #:use-module (gnu packages databases) + #:use-module (guix packages) + #:use-module (guix modules) + #:use-module (guix records) + #:use-module (guix gexp) + #:use-module (guix store) + #:use-module (guix utils) + #:use-module (ice-9 match) + #:export (%test-guix-data-service)) + + +;;; +;;; Guix Data Service +;;; + +(define guix-data-service-initial-database-setup-service + (let ((user "guix_data_service") + (name "guix_data_service")) + (define start-gexp + #~(lambda () + (let ((pid (primitive-fork)) + (postgres (getpwnam "postgres"))) + (if (eq? pid 0) + (dynamic-wind + (const #t) + (lambda () + (setgid (passwd:gid postgres)) + (setuid (passwd:uid postgres)) + (primitive-exit + (if (and + (zero? + (system* #$(file-append postgresql "/bin/createuser") + #$user)) + (zero? + (system* #$(file-append postgresql "/bin/createdb") + "-O" #$user #$name))) + 0 + 1))) + (lambda () + (primitive-exit 1))) + (zero? (cdr (waitpid pid))))))) + + (shepherd-service + (requirement '(postgres)) + (provision '(guix-data-service-initial-database-setup)) + (start start-gexp) + (stop #~(const #f)) + (respawn? #f) + (one-shot? #t) + (documentation "Setup Guix Data Service database.")))) + +(define %guix-data-service-os + (simple-operating-system + (service dhcp-client-service-type) + (service postgresql-service-type + (postgresql-configuration + (config-file + (postgresql-config-file + (hba-file + (plain-file "pg_hba.conf" + " +local all all trust +host all all 127.0.0.1/32 trust +host all all ::1/128 trust")))))) + (service guix-data-service-type + (guix-data-service-configuration + (host "0.0.0.0"))) + (simple-service 'guix-data-service-database-setup + shepherd-root-service-type + (list guix-data-service-initial-database-setup-service)))) + +(define (run-guix-data-service-test) + (define os + (marionette-operating-system + %guix-data-service-os + #:imported-modules '((gnu services herd) + (guix combinators)))) + + (define forwarded-port 8080) + + (define vm + (virtual-machine + (operating-system os) + (memory-size 1024) + (port-forwardings `((,forwarded-port . 8765))))) + + (define test + (with-imported-modules '((gnu build marionette)) + #~(begin + (use-modules (srfi srfi-11) (srfi srfi-64) + (gnu build marionette) + (web uri) + (web client) + (web response)) + + (define marionette + (make-marionette (list #$vm))) + + (mkdir #$output) + (chdir #$output) + + (test-begin "guix-data-service") + + (test-assert "service running" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (match (start-service 'guix-data-service) + (#f #f) + (('service response-parts ...) + (match (assq-ref response-parts 'running) + ((pid) (number? pid)))))) + marionette)) + + (test-assert "process jobs service running" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (match (start-service 'guix-data-service-process-jobs) + (#f #f) + (('service response-parts ...) + (match (assq-ref response-parts 'running) + ((pid) (number? pid)))))) + marionette)) + + (test-equal "http-get" + 200 + (let-values + (((response text) + (http-get #$(simple-format + #f "http://localhost:~A/healthcheck" forwarded-port) + #:decode-body? #t))) + (response-code response))) + + (test-end) + (exit (= (test-runner-fail-count (test-runner-current)) 0))))) + + (gexp->derivation "guix-data-service-test" test)) + +(define %test-guix-data-service + (system-test + (name "guix-data-service") + (description "Connect to a running Guix Data Service.") + (value (run-guix-data-service-test)))) -- 2.23.0 From unknown Sat Jun 21 10:45:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37412] [PATCH 1/2] gnu: Add guix-data-service. Resent-From: Alex ter Weele Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 15 Sep 2019 20:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37412 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 37412@debbugs.gnu.org Received: via spool by 37412-submit@debbugs.gnu.org id=B37412.156858031817882 (code B ref 37412); Sun, 15 Sep 2019 20:46:02 +0000 Received: (at 37412) by debbugs.gnu.org; 15 Sep 2019 20:45:18 +0000 Received: from localhost ([127.0.0.1]:48761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9bOY-0004eM-11 for submit@debbugs.gnu.org; Sun, 15 Sep 2019 16:45:18 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:43763) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9bOU-0004dy-DN for 37412@debbugs.gnu.org; Sun, 15 Sep 2019 16:45:16 -0400 Received: by mail-io1-f67.google.com with SMTP id r8so49155731iol.10 for <37412@debbugs.gnu.org>; Sun, 15 Sep 2019 13:45:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=tpBbtHPJhHhvIdjhGuBOdYuIjL1QIe/ksvdMoMEn9pU=; b=oHSDaiqrWAABe2MnEDrPc24hLAP7Izx9f9S1X2MYll8P2UsqVAjHpPJGREt+islkEa wHpEXY3gtPVuhGHqpP9T75dmUOsnQrveBx90xjVQwx1vXbWSfjuxn29bRCBY5s+ENWA/ IVpOKihlz6y1AwKlS0BbdXgqMtFR0tKNR8+pOzsHy6qn1KQXWZ6gDEdDD+pvTwudIIzp C5GfwERZkE/pd54xabgiNIcjhaOLbn9dOAN1x5wKLwtWn+R4UogdpNWviqCf0A/2U3i6 kUOcdnxsnH6zgGnEAziDhprrUV9t93swwhdrJUlpTip7YZRpwg99x44AeNFc178JtQ0Z dtPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=tpBbtHPJhHhvIdjhGuBOdYuIjL1QIe/ksvdMoMEn9pU=; b=gzK7r2qM4sfYQVKSKguvfSArsJGwzXDUYSjSCQXHXVYytubjMb5UGcqX487HHxgQUt 5ajGEeiBFBtUJRAlMzKcz7bH9IQby8383aqrqOgsZEQI0vv8d4CW64mC3leOrjrPoB8g wc9e/ebE+e+XY2LvHWtoQ97VcedEFtVmuM7tMyu2i91paax/L4j8c7PMK0W7ytmqZOBC 9JR5S8x0SYVDRGGAsirEGS7J8vzSHAm5rWJOyFKX1KV8ddfXfbbQAbfgmc/Kl/bxtdHY cmV0yFDqo2QJ4kO0S4bMV7FyBd2mUphPjH1TjcUuBYSDZdatRKm7Wt2L4QALj4RvCPIa pQYg== X-Gm-Message-State: APjAAAVONeD1J8KAz1TVaSnQsOgFM9hj2wFcRF0HPJbTrFeCvQhs75xZ Th1RxeqkX2fpXtc24ZAS/W2ww41FLGM= X-Google-Smtp-Source: APXvYqwU1/SCf3P5vurIrjKM16haG33+mNCcs2tbuWoHrH5zwYnAdKwHD6MTIZLbOfJWVGp+4C2ItQ== X-Received: by 2002:a6b:b8c3:: with SMTP id i186mr8689263iof.194.1568580308385; Sun, 15 Sep 2019 13:45:08 -0700 (PDT) Received: from librem (c-73-22-1-166.hsd1.il.comcast.net. [73.22.1.166]) by smtp.gmail.com with ESMTPSA id f12sm16653760iob.58.2019.09.15.13.45.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Sep 2019 13:45:07 -0700 (PDT) From: Alex ter Weele X-Google-Original-From: Alex ter Weele References: <87v9tt1l0h.fsf@cbaines.net> <20190915182127.10525-1-mail@cbaines.net> Date: Sun, 15 Sep 2019 15:45:06 -0500 In-Reply-To: <20190915182127.10525-1-mail@cbaines.net> (Christopher Baines's message of "Sun, 15 Sep 2019 19:21:26 +0100") Message-ID: <87o8zlp9v1.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Christopher Baines writes: > * gnu/packages/web.scm (guix-data-service): New variable. > --- > gnu/packages/web.scm | 83 ++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 83 insertions(+) > > diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm > index 39475bd6a8..30adc75aa1 100644 > --- a/gnu/packages/web.scm > +++ b/gnu/packages/web.scm > @@ -3973,6 +3973,89 @@ CDF, Atom 0.3, and Atom 1.0 feeds.") > (define-public python2-feedparser > (package-with-python2 python-feedparser)) > > +(define-public guix-data-service > + (let ((commit "6a9f11fb94fbfd969396dd4d9f768a0c9ec67734") > + (revision "1")) > + (package > + (name "guix-data-service") > + (version (string-append "0.0.1-" revision "." (string-take commit 7))) > + (source (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://git.savannah.gnu.org/git/guix/data-service.git") > + (commit commit))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 > + "08kfi74dp8h1i03gfmjqfv07ff7m93psnh6xmrgwzr0ja5cdqjri")))) > + (build-system gnu-build-system) > + (arguments > + '(#:tests? #f ; TODO Tests require PostgreSQL > + #:modules ((guix build utils) > + (guix build gnu-build-system) > + (ice-9 rdelim) > + (ice-9 popen)) > + #:phases > + (modify-phases %standard-phases > + (add-after 'install 'wrap-executable > + (lambda* (#:key inputs outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (bin (string-append out "/bin")) > + (guile (assoc-ref inputs "guile")) > + (guile-effective-version > + (read-line > + (open-pipe* OPEN_READ > + (string-append guile "/bin/guile") > + "-c" "(display (effective-version))"))) > + (scm (string-append out "/share/guile/site/" > + guile-effective-version)) > + (go (string-append out "/lib/guile/" > + guile-effective-version > + "/site-ccache"))) > + (for-each > + (lambda (file) > + (wrap-program (string-append bin "/" file) > + `("PATH" ":" prefix > + (,bin)) > + `("GUILE_LOAD_PATH" ":" prefix > + (,scm ,(getenv "GUILE_LOAD_PATH"))) > + `("GUILE_LOAD_COMPILED_PATH" ":" prefix > + (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))) > + '("guix-data-service" > + "guix-data-service-process-branch-updated-email" > + "guix-data-service-process-job" > + "guix-data-service-process-jobs" > + "guix-data-service-query-build-servers")) > + #t)))))) > + (inputs > + `(("guile" ,guile-2.2) > + ("guix" ,guix) > + ("guile-fibers" ,guile-fibers) > + ("guile-json" ,guile-json-3) > + ("guile-email" ,guile-email) > + ("guile-squee" ,guile-squee) > + ("postgresql" ,postgresql) > + ("sqitch" ,sqitch))) > + (native-inputs > + `(("autoconf" ,autoconf) > + ("automake" ,automake) > + ("pkg-config" ,pkg-config))) > + (native-search-paths > + ;; guile-git requires this to be set > + (list (search-path-specification > + (variable "GIT_SSL_CAINFO") > + (file-type 'regular) > + (separator #f) > + (files '("etc/ssl/certs/ca-certificates.crt"))))) > + (synopsis "Store and provide data about GNU Guix") > + (description > + "The Guix Data Service stores data about GNU Guix, and provides this > +through a web interface. It supports listening to the guix-commits mailing > +list to find out about new revisions, then loads the data from these in to a > +PostgreSQL database.") > + (home-page "https://data.guix.gnu.org/") I found that only http://data.guix.gnu.org/ works. > > + (license license:agpl3+)))) + (define-public gumbo-parser (package > (name "gumbo-parser") From unknown Sat Jun 21 10:45:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37412] [PATCH 1/2] gnu: Add guix-data-service. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 15 Sep 2019 21:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37412 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Alex ter Weele Cc: 37412@debbugs.gnu.org Received: via spool by 37412-submit@debbugs.gnu.org id=B37412.156858299623060 (code B ref 37412); Sun, 15 Sep 2019 21:30:02 +0000 Received: (at 37412) by debbugs.gnu.org; 15 Sep 2019 21:29:56 +0000 Received: from localhost ([127.0.0.1]:48772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9c5h-0005zo-V4 for submit@debbugs.gnu.org; Sun, 15 Sep 2019 17:29:56 -0400 Received: from mira.cbaines.net ([212.71.252.8]:59388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9c5g-0005zc-4l for 37412@debbugs.gnu.org; Sun, 15 Sep 2019 17:29:52 -0400 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 04397173D5; Sun, 15 Sep 2019 22:29:51 +0100 (BST) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id b6a7d33b; Sun, 15 Sep 2019 21:29:50 +0000 (UTC) References: <87v9tt1l0h.fsf@cbaines.net> <20190915182127.10525-1-mail@cbaines.net> <87o8zlp9v1.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me> User-agent: mu4e 1.2.0; emacs 26.3 From: Christopher Baines In-reply-to: <87o8zlp9v1.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me> Date: Sun, 15 Sep 2019 22:29:50 +0100 Message-ID: <87tv9d1c4x.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Alex ter Weele writes: >> + (home-page "https://data.guix.gnu.org/") > > I found that only http://data.guix.gnu.org/ works. Good spot. When I wrote this, I was planning on setting up HTTPS for data.guix.gnu.org, but when I came to do it, I didn't quite know how to configure it. It's still on my list of things to do, but I've now changed the patch to use http. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl1+rU5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XdHiQ//ZJnOPDt+i/3yV+aN625OpnPGQYsmUCvt5vrKtobpsx0xZv51Xw4Mh97v vhfP1AV0KTIcn9Am8J6YJk+XQS7N3H3Vl+56Crv2w76fSnrBFu1gyKhhFeDQbPdW 5TSpXdXKhv5smimF6AYEI9bKhO3eXnwkLF2NuTY1qGF3hqRvM23npdzMVvQl7Oul fN22zUvkETVpexIMOWYZxs42TEz+n5VE+ab8L+GhYgc7RUWOvj5HNr5pKRzkEbXO ACNbZbZMggZjqVbHhxYH7oX8guuqp1EaXZss0xqn9VdLLHrSzKGLqle3Duhz426z 5Imt4iYiYs5v5OWoEyJRJdP5DCIVdbso9vwdVWcdNqt+TeewQorqJnXQveNK3gyE YQBYf/XTcJT0ZnLWMbjNwN/UrKCX9EZ6QIgVdwO+e/WP/DIqcJeivx+D9fabkiaA yDm2Lw1o2sYUeI3jt5b6vvzvs/o63CUG4dNH7UJvn/O4MxiEmmszLfuooS8ZohQv h3KsH81WjtPtQPe9XPYcGU2nrJZU1uWpG2yJjLsW2Pmx/rXCj5SNx9R27hjfMJeg 7GB4AcWC8Xr8S9xOrq5EZx2vNAhJaWO9jdz4B2xjVZWzT/yYgI/wHlk50HGvF4fI UeMQQPqYrqiTRLrZ99UxFtIAPd05DB9TpBgktNBAhEsztCrabi0= =MNzN -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Jun 21 10:45:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37412] [PATCH 1/2] gnu: Add guix-data-service. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Sep 2019 07:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37412 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 37412@debbugs.gnu.org Received: via spool by 37412-submit@debbugs.gnu.org id=B37412.156862012213123 (code B ref 37412); Mon, 16 Sep 2019 07:49:01 +0000 Received: (at 37412) by debbugs.gnu.org; 16 Sep 2019 07:48:42 +0000 Received: from localhost ([127.0.0.1]:49084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9lkY-0003Pb-0Y for submit@debbugs.gnu.org; Mon, 16 Sep 2019 03:48:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9lkW-0003PH-An for 37412@debbugs.gnu.org; Mon, 16 Sep 2019 03:48:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i9lkN-0001rX-LC; Mon, 16 Sep 2019 03:48:33 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=44052 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i9lkM-0000AJ-M3; Mon, 16 Sep 2019 03:48:31 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87v9tt1l0h.fsf@cbaines.net> <20190915182127.10525-1-mail@cbaines.net> Date: Mon, 16 Sep 2019 09:48:29 +0200 In-Reply-To: <20190915182127.10525-1-mail@cbaines.net> (Christopher Baines's message of "Sun, 15 Sep 2019 19:21:26 +0100") Message-ID: <87y2yofzqq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Good morning, Chris! Christopher Baines skribis: > * gnu/packages/web.scm (guix-data-service): New variable. Woohoo! \o/ > + (inputs > + `(("guile" ,guile-2.2) Guile should be =E2=80=98native-inputs=E2=80=99 because we use it for its c= ompiler (which can act as a =E2=80=9Ccross-compiler=E2=80=9D with =E2=80=98--target= =E2=80=99). > + (native-search-paths > + ;; guile-git requires this to be set > + (list (search-path-specification > + (variable "GIT_SSL_CAINFO") > + (file-type 'regular) > + (separator #f) > + (files '("etc/ssl/certs/ca-certificates.crt"))))) It=E2=80=99s a bit of a workaround for , isn=E2=80=99t it? :-) What about either removing it, or adding an =E2=80=9CXXX=E2=80=9D to the co= mment? Otherwise LGTM! Ludo=E2=80=99. From unknown Sat Jun 21 10:45:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37412] [PATCH 2/2] services: Add the Guix Data Service. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Sep 2019 07:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37412 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 37412@debbugs.gnu.org Received: via spool by 37412-submit@debbugs.gnu.org id=B37412.156862042913605 (code B ref 37412); Mon, 16 Sep 2019 07:54:02 +0000 Received: (at 37412) by debbugs.gnu.org; 16 Sep 2019 07:53:49 +0000 Received: from localhost ([127.0.0.1]:49088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9lpU-0003XM-Ok for submit@debbugs.gnu.org; Mon, 16 Sep 2019 03:53:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45271) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9lpS-0003X5-Nv for 37412@debbugs.gnu.org; Mon, 16 Sep 2019 03:53:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i9lpN-0003ZI-Ge; Mon, 16 Sep 2019 03:53:41 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=44054 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i9lpN-0000VG-4O; Mon, 16 Sep 2019 03:53:41 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20190915182127.10525-1-mail@cbaines.net> <20190915182127.10525-2-mail@cbaines.net> Date: Mon, 16 Sep 2019 09:53:39 +0200 In-Reply-To: <20190915182127.10525-2-mail@cbaines.net> (Christopher Baines's message of "Sun, 15 Sep 2019 19:21:27 +0100") Message-ID: <87lfuofzi4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Christopher Baines skribis: > * gnu/services/guix.scm: New file. > * gnu/tests/guix.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add both new files. Yay, nice! > + (commits-getmail-retriever-configuration > + guix-data-service-commits-getmail-retriever-configuration New world record: longer than =E2=80=98call-with-current-continuation=E2=80= =99. :-) > +(define (guix-data-service-shepherd-services config) > + (match config > + (($ package user group > + port host) Perhaps use =E2=80=98match-record=E2=80=99 here and elsewhere, to avoid mis= takes when the record type changes. > +(define %test-guix-data-service > + (system-test > + (name "guix-data-service") > + (description "Connect to a running Guix Data Service.") > + (value (run-guix-data-service-test)))) Nice. Could you add a bit to guix.texi, maybe under =E2=80=9CContinuous Integrati= on=E2=80=9D? You don=E2=80=99t have to go into too much detail if you think some of the configuration elements are subject to change. Thank you! Ludo=E2=80=99. From unknown Sat Jun 21 10:45:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37412] [PATCH 1/2] gnu: Add guix-data-service. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Sep 2019 07:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37412 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 37412@debbugs.gnu.org Received: via spool by 37412-submit@debbugs.gnu.org id=B37412.156862055013806 (code B ref 37412); Mon, 16 Sep 2019 07:56:01 +0000 Received: (at 37412) by debbugs.gnu.org; 16 Sep 2019 07:55:50 +0000 Received: from localhost ([127.0.0.1]:49092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9lrS-0003ac-9M for submit@debbugs.gnu.org; Mon, 16 Sep 2019 03:55:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9lrR-0003aP-6W for 37412@debbugs.gnu.org; Mon, 16 Sep 2019 03:55:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i9lrL-0004Ft-Vy; Mon, 16 Sep 2019 03:55:44 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=44100 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i9lrL-0000mq-CJ; Mon, 16 Sep 2019 03:55:43 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87v9tt1l0h.fsf@cbaines.net> <20190915182127.10525-1-mail@cbaines.net> Date: Mon, 16 Sep 2019 09:55:41 +0200 In-Reply-To: <20190915182127.10525-1-mail@cbaines.net> (Christopher Baines's message of "Sun, 15 Sep 2019 19:21:26 +0100") Message-ID: <87d0g0fzeq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Christopher Baines skribis: > + (home-page "https://data.guix.gnu.org/") It would be nice to add a reference to data.guix.gnu.org at or in the manual. WDYT? Ludo=E2=80=99. From unknown Sat Jun 21 10:45:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37412] [PATCH 1/2] gnu: Add guix-data-service. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Sep 2019 10:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37412 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 37412@debbugs.gnu.org Received: via spool by 37412-submit@debbugs.gnu.org id=B37412.156914706021015 (code B ref 37412); Sun, 22 Sep 2019 10:11:01 +0000 Received: (at 37412) by debbugs.gnu.org; 22 Sep 2019 10:11:00 +0000 Received: from localhost ([127.0.0.1]:33413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBypY-0005St-7A for submit@debbugs.gnu.org; Sun, 22 Sep 2019 06:11:00 -0400 Received: from mira.cbaines.net ([212.71.252.8]:35864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBypV-0005Sk-Op for 37412@debbugs.gnu.org; Sun, 22 Sep 2019 06:10:58 -0400 Received: from localhost (220.185.93.209.dyn.plus.net [209.93.185.220]) by mira.cbaines.net (Postfix) with ESMTPSA id DC008173BF; Sun, 22 Sep 2019 11:10:56 +0100 (BST) Received: from phact (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 20626eea; Sun, 22 Sep 2019 10:10:56 +0000 (UTC) References: <87v9tt1l0h.fsf@cbaines.net> <20190915182127.10525-1-mail@cbaines.net> <87d0g0fzeq.fsf@gnu.org> User-agent: mu4e 1.2.0; emacs 26.3 From: Christopher Baines In-reply-to: <87d0g0fzeq.fsf@gnu.org> Date: Sun, 22 Sep 2019 11:10:53 +0100 Message-ID: <87r2484p5e.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Christopher Baines skribis: > >> + (home-page "https://data.guix.gnu.org/") > > It would be nice to add a reference to data.guix.gnu.org at > or in the manual. WDYT? Yeah, maybe there could be a "Services" section, and that could mention Cuirass, Mumi, and the Guix Data Service. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl2HSK1fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XfGkA/9GuQxS6h+hA+kJynR0Q7MqKSUFhvbTy7CFnl1zU+4ypY61Ft5L1aIMGnZ KsprpM87q1yIWHE+S8UYiV6/qB8C8J6OYuDzxEkv9aEp8Lntf8CG4ZdJgmVzMI0r Parvu3SvTGmnADoqteG/+ULp2cagITdhwMRq+lb8YAQTiKqB5BC1C8mHYnEsxEkc ooJJnGQFTUv0+NZO+VePJMjGj4D7LGQod8SqZB2DduOpjt/uXV0HVuXe3CJZzEUA PlBwlmRqhVmqEsYrVF9nze1GPYkz//r84HHYInuE01roppS9n0995DFsdk42r1M0 SzoiL8nw9F++TZw42bqwplOkGhKLEft3ImCNHYcxwa1xKsz/ZeeViK8CuFs/7dxK 9Sv+Lyoc7t0qJNZe6XEwp84sgOAefc45hJj7U7d2Jr/1liI+Pbdsf4K3pTZ6pJLK EzAvWfTxkx9tAX2EoVsOQBWabRdTipzthgtax4KnQrf7FpTuuKxUkTzI5Qo1Kgln YDGIV5FEyVGXaPWv1Iz96d8SPZqnCTL5/Zqq42Nqc9LSiKXYwQrkPXycWPT+cBhJ ghBKFjLCOHfaEgDGQ06djjg2I2vF8nWziXuasvG/qJtYSKJ/mZDAo45n4Kx31+Pq SrPfK8dby9njVI3UkrC1r30cWpfhHi3vYo6CC5LYgaphyuWnnfs= =BQFM -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Jun 21 10:45:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37412] [PATCH 1/2] gnu: Add guix-data-service. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Sep 2019 10:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37412 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 37412@debbugs.gnu.org Received: via spool by 37412-submit@debbugs.gnu.org id=B37412.156914752121783 (code B ref 37412); Sun, 22 Sep 2019 10:19:02 +0000 Received: (at 37412) by debbugs.gnu.org; 22 Sep 2019 10:18:41 +0000 Received: from localhost ([127.0.0.1]:33421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBywz-0005fH-HB for submit@debbugs.gnu.org; Sun, 22 Sep 2019 06:18:41 -0400 Received: from mira.cbaines.net ([212.71.252.8]:35876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBywx-0005f9-Mb for 37412@debbugs.gnu.org; Sun, 22 Sep 2019 06:18:40 -0400 Received: from localhost (220.185.93.209.dyn.plus.net [209.93.185.220]) by mira.cbaines.net (Postfix) with ESMTPSA id E9907173BF; Sun, 22 Sep 2019 11:18:38 +0100 (BST) Received: from phact (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 5564c5a0; Sun, 22 Sep 2019 10:18:38 +0000 (UTC) References: <87v9tt1l0h.fsf@cbaines.net> <20190915182127.10525-1-mail@cbaines.net> <87y2yofzqq.fsf@gnu.org> User-agent: mu4e 1.2.0; emacs 26.3 From: Christopher Baines In-reply-to: <87y2yofzqq.fsf@gnu.org> Date: Sun, 22 Sep 2019 11:18:35 +0100 Message-ID: <87pnjs4osk.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Good morning, Chris! > > Christopher Baines skribis: > >> * gnu/packages/web.scm (guix-data-service): New variable. > > Woohoo! \o/ > >> + (inputs >> + `(("guile" ,guile-2.2) > > Guile should be =E2=80=98native-inputs=E2=80=99 because we use it for its= compiler > (which can act as a =E2=80=9Ccross-compiler=E2=80=9D with =E2=80=98--targ= et=E2=80=99). This makes sense, but the scripts will still refer to the guile used to build the package, so building for a different architecture won't work right? Does the package somehow need to take as input two Guiles, one for build time, and one for runtime? >> + (native-search-paths >> + ;; guile-git requires this to be set >> + (list (search-path-specification >> + (variable "GIT_SSL_CAINFO") >> + (file-type 'regular) >> + (separator #f) >> + (files '("etc/ssl/certs/ca-certificates.crt"))))) > > It=E2=80=99s a bit of a workaround for > , isn=E2=80=99t it? :-) > > What about either removing it, or adding an =E2=80=9CXXX=E2=80=9D to the = comment? I can't quite remember, I think I added that a long while ago when trying to get the Guix service working. I'm not sure it's a great approach. I'll add XXX to the comment though. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl2HSnxfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xez8BAAi+5Tlj9vDZiqwbnsnzNYlPPxLQuIi04TNZJyJvuXy0JtBPyrGNpBYBre rpXM7jfDW+wXzUMjqYaSfL8F7+lEyBFn1ct0JaUeDiWNbUMiNxhaXAt6VyaubjUf MlQYlXzIZ24a6uaCz9hjYz7KZbLa4jS0mY4SzksOdpb3UToY0Rq0Oz6FSkaYQelr o+TElKgIAXEJvMqWSjX8QaF0ylm+6Xl6qRBWcwKtTDIHGEv7qOWKG4IyqaYVd50r XcZx8TvKgb5s0Q5r5Kj7fCD+gR2FP0PHFETDNVdKQpRh41zDk7RTp8iflOu4VY/x W0i9SGNSvTGnv43ZpnVtip9vEZ18usWI5S+Th/RvIeAMpaKlu2YYg+p/UDH6qTIR iKQHyM/8st/YRT2LSABZ1tH1b0qF4PxizHAowCLsgUqqLRKGl/YlBe1VnaGI6MgR ckni2NJNQ2Ovs2HoM6AZNGcYbbDQ3JABO08XQec2BVYi/TKGTY540fUD47J9/tIN JPiK/787FK4yTgxakQ8vB5JWQ++ylmsGhY9vuhvzKkMfyTZYat4krNJFfFuIf0cM GeljeMJ7LfLlf4PxCDO43k30Msx/cuG9Avvdc1Ivcvp05rVX9CP7Kbco6kj2sJiF 5pECTsdTI0Fn/GBI5+xTvTlvlAvfIA7XYeVdm8CQ+SEFWuX5j2w= =lzHu -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Jun 21 10:45:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37412] [PATCH 2/2] services: Add the Guix Data Service. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Sep 2019 12:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37412 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37412@debbugs.gnu.org Received: via spool by 37412-submit@debbugs.gnu.org id=B37412.15691538229079 (code B ref 37412); Sun, 22 Sep 2019 12:04:02 +0000 Received: (at 37412) by debbugs.gnu.org; 22 Sep 2019 12:03:42 +0000 Received: from localhost ([127.0.0.1]:33448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC0ab-0002MM-5w for submit@debbugs.gnu.org; Sun, 22 Sep 2019 08:03:41 -0400 Received: from mira.cbaines.net ([212.71.252.8]:35898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC0aY-0002M7-Vh for 37412@debbugs.gnu.org; Sun, 22 Sep 2019 08:03:40 -0400 Received: from localhost (220.185.93.209.dyn.plus.net [209.93.185.220]) by mira.cbaines.net (Postfix) with ESMTPSA id 265C917407 for <37412@debbugs.gnu.org>; Sun, 22 Sep 2019 13:03:38 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id b34b6487 for <37412@debbugs.gnu.org>; Sun, 22 Sep 2019 12:03:37 +0000 (UTC) From: Christopher Baines Date: Sun, 22 Sep 2019 13:03:37 +0100 Message-Id: <20190922120337.3533-2-mail@cbaines.net> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190922120337.3533-1-mail@cbaines.net> References: <87v9tt1l0h.fsf@cbaines.net> <20190922120337.3533-1-mail@cbaines.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/guix.scm: New file. * gnu/tests/guix.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add both new files. * doc/guix.texi (Guix Services): New section documenting the Guix Data Service. --- doc/guix.texi | 52 +++++++++++ gnu/local.mk | 2 + gnu/services/guix.scm | 212 ++++++++++++++++++++++++++++++++++++++++++ gnu/tests/guix.scm | 173 ++++++++++++++++++++++++++++++++++ 4 files changed, 439 insertions(+) create mode 100644 gnu/services/guix.scm create mode 100644 gnu/tests/guix.scm diff --git a/doc/guix.texi b/doc/guix.texi index 39d4b865f6..24da18ea13 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -11657,6 +11657,7 @@ declaration. * Virtualization Services:: Virtualization services. * Version Control Services:: Providing remote access to Git repositories. * Game Services:: Game servers. +* Guix Services:: Services relating specifically to Guix. * Miscellaneous Services:: Other services. @end menu @@ -24167,6 +24168,57 @@ The port to bind the server to. @end table @end deftp + +@node Guix Services +@subsection Guix Services + +@subsubheading Guix Data Service +The @uref{http://data.guix.gnu.org,Guix Data Service} processes, stores +and provides data about GNU Guix. This includes information about +packages, derivations and lint warnings. + +The data is stored in a PostgreSQL database, and available through a web +interface. + +@defvar {Scheme Variable} guix-data-service-type +Service type for the Guix Data Service. Its value must be a +@code{guix-data-service-configuration} object. The service optionally +extends the getmail service, as the guix-commits mailing list is used to +find out about changes in the Guix git repository. +@end defvar + +@deftp {Data Type} guix-data-service-configuration +Data type representing the configuration of the Guix Data Service. + +@table @asis +@item @code{package} (default: @code{guix-data-service}) +The Guix Data Service package to use. + +@item @code{user} (default: @code{"guix-data-service"}) +The system user to run the service as. + +@item @code{group} (default: @code{"guix-data-service"}) +The system group to run the service as. + +@item @code{port} (default: @code{8765}) +The port to bind the web service to. + +@item @code{host} (default: @code{"127.0.0.1"}) +The host to bind the web service to. + +@item @code{getmail-idle-mailboxes} (default: @code{#f}) +If set, this is the list of mailboxes that the getmail service will be +configured to listen to. + +@item @code{commits-getmail-retriever-configuration} (default: @code{#f}) +If set, this is the @code{getmail-retriever-configuration} object with +which to configure getmail to fetch mail from the guix-commits mailing +list. + +@end table +@end deftp + + @node Miscellaneous Services @subsection Miscellaneous Services diff --git a/gnu/local.mk b/gnu/local.mk index 3f32b9cbf2..b30afdd585 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -532,6 +532,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/authentication.scm \ %D%/services/games.scm \ %D%/services/getmail.scm \ + %D%/services/guix.scm \ %D%/services/kerberos.scm \ %D%/services/lirc.scm \ %D%/services/virtualization.scm \ @@ -596,6 +597,7 @@ GNU_SYSTEM_MODULES = \ %D%/tests/desktop.scm \ %D%/tests/dict.scm \ %D%/tests/docker.scm \ + %D%/tests/guix.scm \ %D%/tests/monitoring.scm \ %D%/tests/nfs.scm \ %D%/tests/install.scm \ diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm new file mode 100644 index 0000000000..0f0fad39b0 --- /dev/null +++ b/gnu/services/guix.scm @@ -0,0 +1,212 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Christopher Baines +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation, either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services guix) + #:use-module (ice-9 match) + #:use-module (guix gexp) + #:use-module (guix records) + #:use-module ((gnu packages base) + #:select (glibc-utf8-locales)) + #:use-module (gnu packages admin) + #:use-module (gnu packages web) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu services admin) + #:use-module (gnu services shepherd) + #:use-module (gnu services getmail) + #:use-module (gnu system shadow) + #:export ( + guix-data-service-configuration + guix-data-service-configuration? + guix-data-service-package + guix-data-service-user + guix-data-service-group + guix-data-service-port + guix-data-service-host + guix-data-service-getmail-idle-mailboxes + guix-data-service-commits-getmail-retriever-configuration + + guix-data-service-type)) + +;;;; Commentary: +;;; +;;; This module implements a service that to run instances of the Guix Data +;;; Service, which provides data about Guix over time. +;;; +;;;; Code: + +(define-record-type* + guix-data-service-configuration make-guix-data-service-configuration + guix-data-service-configuration? + (package guix-data-service-package + (default guix-data-service)) + (user guix-data-service-configuration-user + (default "guix-data-service")) + (group guix-data-service-configuration-group + (default "guix-data-service")) + (port guix-data-service-port + (default 8765)) + (host guix-data-service-host + (default "127.0.0.1")) + (getmail-idle-mailboxes + guix-data-service-getmail-idle-mailboxes + (default #f)) + (commits-getmail-retriever-configuration + guix-data-service-commits-getmail-retriever-configuration + (default #f))) + +(define (guix-data-service-profile-packages config) + "Return the guix-data-service package, this will populate the +ca-certificates.crt file in the system profile." + (list + (guix-data-service-package config))) + +(define (guix-data-service-shepherd-services config) + (match-record config + (package user group port host) + (list + (shepherd-service + (documentation "Guix Data Service web server") + (provision '(guix-data-service)) + (requirement '(postgres networking)) + (start #~(make-forkexec-constructor + (list #$(file-append package + "/bin/guix-data-service") + "--pid-file=/var/run/guix-data-service/pid" + #$(string-append "--port=" (number->string port)) + #$(string-append "--host=" host) + ;; Perform any database migrations when the + ;; service is started + "--update-database") + + #:user #$user + #:group #$group + #:pid-file "/var/run/guix-data-service/pid" + ;; Allow time for migrations to run + #:pid-file-timeout 60 + #:environment-variables + `(,(string-append + "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "LC_ALL=en_US.utf8") + #:log-file "/var/log/guix-data-service/web.log")) + (stop #~(make-kill-destructor))) + + (shepherd-service + (documentation "Guix Data Service process jobs") + (provision '(guix-data-service-process-jobs)) + (requirement '(postgres + networking + ;; Require guix-data-service, as that the database + ;; migrations are handled through this service + guix-data-service)) + (start #~(make-forkexec-constructor + (list + #$(file-append package + "/bin/guix-data-service-process-jobs")) + #:user #$user + #:group #$group + #:environment-variables + `("HOME=/var/lib/guix-data-service" + "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt" + ,(string-append + "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "LC_ALL=en_US.utf8") + #:log-file "/var/log/guix-data-service/process-jobs.log")) + (stop #~(make-kill-destructor)))))) + +(define (guix-data-service-activation config) + #~(begin + (use-modules (guix build utils)) + + (define %user (getpw "guix-data-service")) + + (chmod "/var/lib/guix-data-service" #o755) + + (mkdir-p "/var/log/guix-data-service") + + ;; Allow writing the PID file + (mkdir-p "/var/run/guix-data-service") + (chown "/var/run/guix-data-service" + (passwd:uid %user) + (passwd:gid %user)))) + +(define (guix-data-service-account config) + (match-record config + (user group) + (list (user-group + (name group) + (system? #t)) + (user-account + (name user) + (group group) + (system? #t) + (comment "Guix Data Service user") + (home-directory "/var/lib/guix-data-service") + (shell (file-append shadow "/sbin/nologin")))))) + +(define (guix-data-service-getmail-configuration config) + (match config + (($ package user group + port host + #f #f) + '()) + (($ package user group + port host + getmail-idle-mailboxes + commits-getmail-retriever-configuration) + (list + (getmail-configuration + (name 'guix-data-service) + (user user) + (group group) + (directory "/var/lib/getmail/guix-data-service") + (rcfile + (getmail-configuration-file + (retriever commits-getmail-retriever-configuration) + (destination + (getmail-destination-configuration + (type "MDA_external") + (path (file-append + package + "/bin/guix-data-service-process-branch-updated-email")))) + (options + (getmail-options-configuration + (read-all #f) + (delivered-to #f) + (received #f))))) + (idle getmail-idle-mailboxes)))))) + +(define guix-data-service-type + (service-type + (name 'guix-data-service) + (extensions + (list + (service-extension profile-service-type + guix-data-service-profile-packages) + (service-extension shepherd-root-service-type + guix-data-service-shepherd-services) + (service-extension activation-service-type + guix-data-service-activation) + (service-extension account-service-type + guix-data-service-account) + (service-extension getmail-service-type + guix-data-service-getmail-configuration))) + (default-value + (guix-data-service-configuration)) + (description + "Run an instance of the Guix Data Service."))) diff --git a/gnu/tests/guix.scm b/gnu/tests/guix.scm new file mode 100644 index 0000000000..6139e31cf0 --- /dev/null +++ b/gnu/tests/guix.scm @@ -0,0 +1,173 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Christopher Baines +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu tests guix) + #:use-module (gnu tests) + #:use-module (gnu system) + #:use-module (gnu system file-systems) + #:use-module (gnu system shadow) + #:use-module (gnu system vm) + #:use-module (gnu services) + #:use-module (gnu services guix) + #:use-module (gnu services databases) + #:use-module (gnu services shepherd) + #:use-module (gnu services networking) + #:use-module (gnu packages databases) + #:use-module (guix packages) + #:use-module (guix modules) + #:use-module (guix records) + #:use-module (guix gexp) + #:use-module (guix store) + #:use-module (guix utils) + #:use-module (ice-9 match) + #:export (%test-guix-data-service)) + + +;;; +;;; Guix Data Service +;;; + +(define guix-data-service-initial-database-setup-service + (let ((user "guix_data_service") + (name "guix_data_service")) + (define start-gexp + #~(lambda () + (let ((pid (primitive-fork)) + (postgres (getpwnam "postgres"))) + (if (eq? pid 0) + (dynamic-wind + (const #t) + (lambda () + (setgid (passwd:gid postgres)) + (setuid (passwd:uid postgres)) + (primitive-exit + (if (and + (zero? + (system* #$(file-append postgresql "/bin/createuser") + #$user)) + (zero? + (system* #$(file-append postgresql "/bin/createdb") + "-O" #$user #$name))) + 0 + 1))) + (lambda () + (primitive-exit 1))) + (zero? (cdr (waitpid pid))))))) + + (shepherd-service + (requirement '(postgres)) + (provision '(guix-data-service-initial-database-setup)) + (start start-gexp) + (stop #~(const #f)) + (respawn? #f) + (one-shot? #t) + (documentation "Setup Guix Data Service database.")))) + +(define %guix-data-service-os + (simple-operating-system + (service dhcp-client-service-type) + (service postgresql-service-type + (postgresql-configuration + (config-file + (postgresql-config-file + (hba-file + (plain-file "pg_hba.conf" + " +local all all trust +host all all 127.0.0.1/32 trust +host all all ::1/128 trust")))))) + (service guix-data-service-type + (guix-data-service-configuration + (host "0.0.0.0"))) + (simple-service 'guix-data-service-database-setup + shepherd-root-service-type + (list guix-data-service-initial-database-setup-service)))) + +(define (run-guix-data-service-test) + (define os + (marionette-operating-system + %guix-data-service-os + #:imported-modules '((gnu services herd) + (guix combinators)))) + + (define forwarded-port 8080) + + (define vm + (virtual-machine + (operating-system os) + (memory-size 1024) + (port-forwardings `((,forwarded-port . 8765))))) + + (define test + (with-imported-modules '((gnu build marionette)) + #~(begin + (use-modules (srfi srfi-11) (srfi srfi-64) + (gnu build marionette) + (web uri) + (web client) + (web response)) + + (define marionette + (make-marionette (list #$vm))) + + (mkdir #$output) + (chdir #$output) + + (test-begin "guix-data-service") + + (test-assert "service running" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (match (start-service 'guix-data-service) + (#f #f) + (('service response-parts ...) + (match (assq-ref response-parts 'running) + ((pid) (number? pid)))))) + marionette)) + + (test-assert "process jobs service running" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (match (start-service 'guix-data-service-process-jobs) + (#f #f) + (('service response-parts ...) + (match (assq-ref response-parts 'running) + ((pid) (number? pid)))))) + marionette)) + + (test-equal "http-get" + 200 + (let-values + (((response text) + (http-get #$(simple-format + #f "http://localhost:~A/healthcheck" forwarded-port) + #:decode-body? #t))) + (response-code response))) + + (test-end) + (exit (= (test-runner-fail-count (test-runner-current)) 0))))) + + (gexp->derivation "guix-data-service-test" test)) + +(define %test-guix-data-service + (system-test + (name "guix-data-service") + (description "Connect to a running Guix Data Service.") + (value (run-guix-data-service-test)))) -- 2.23.0 From unknown Sat Jun 21 10:45:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37412] [PATCH 1/2] gnu: Add guix-data-service. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Sep 2019 12:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37412 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37412@debbugs.gnu.org Received: via spool by 37412-submit@debbugs.gnu.org id=B37412.15691538229086 (code B ref 37412); Sun, 22 Sep 2019 12:04:02 +0000 Received: (at 37412) by debbugs.gnu.org; 22 Sep 2019 12:03:42 +0000 Received: from localhost ([127.0.0.1]:33450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC0ab-0002MO-Uo for submit@debbugs.gnu.org; Sun, 22 Sep 2019 08:03:42 -0400 Received: from mira.cbaines.net ([212.71.252.8]:35900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC0aY-0002M8-UD for 37412@debbugs.gnu.org; Sun, 22 Sep 2019 08:03:40 -0400 Received: from localhost (220.185.93.209.dyn.plus.net [209.93.185.220]) by mira.cbaines.net (Postfix) with ESMTPSA id 144AC17406 for <37412@debbugs.gnu.org>; Sun, 22 Sep 2019 13:03:38 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 14899235 for <37412@debbugs.gnu.org>; Sun, 22 Sep 2019 12:03:37 +0000 (UTC) From: Christopher Baines Date: Sun, 22 Sep 2019 13:03:36 +0100 Message-Id: <20190922120337.3533-1-mail@cbaines.net> X-Mailer: git-send-email 2.23.0 In-Reply-To: <87v9tt1l0h.fsf@cbaines.net> References: <87v9tt1l0h.fsf@cbaines.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/web.scm (guix-data-service): New variable. --- gnu/packages/web.scm | 102 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 39475bd6a8..065979f959 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -56,6 +56,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix cvs-download) #:use-module (guix hg-download) @@ -77,6 +78,8 @@ #:use-module (gnu packages check) #:use-module (gnu packages documentation) #:use-module (gnu packages docbook) + #:use-module (gnu packages emacs) + #:use-module (gnu packages emacs-xyz) #:use-module (gnu packages autotools) #:use-module (gnu packages compression) #:use-module (gnu packages curl) @@ -3973,6 +3976,105 @@ CDF, Atom 0.3, and Atom 1.0 feeds.") (define-public python2-feedparser (package-with-python2 python-feedparser)) +(define-public guix-data-service + (let ((commit "970bcb31cf994b0e3b67e7f912734e5b53355d8d") + (revision "1")) + (package + (name "guix-data-service") + (version (string-append "0.0.1-" revision "." (string-take commit 7))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/guix/data-service.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0wiw1m4g30sx155ldjrg4060ydqwgxv93day89pf6w515n5fv08j")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; TODO Tests require PostgreSQL + #:modules ((guix build utils) + (guix build gnu-build-system) + (ice-9 rdelim) + (ice-9 popen)) + #:phases + (modify-phases %standard-phases + (add-after 'set-paths 'set-GUIX_ENVIRONMENT + (lambda* (#:key inputs #:allow-other-keys) + ;; This means guix.el finds the Emacs modules + (setenv "GUIX_ENVIRONMENT" + (assoc-ref inputs "emacs-with-modules")) + #t)) + (add-before 'build 'set-GUILE_AUTO_COMPILE + (lambda _ + ;; To avoid errors relating to guild + (setenv "GUILE_AUTO_COMPILE" "0") + #t)) + (add-after 'install 'wrap-executable + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (guile (assoc-ref inputs "guile")) + (guile-effective-version + (read-line + (open-pipe* OPEN_READ + (string-append guile "/bin/guile") + "-c" "(display (effective-version))"))) + (scm (string-append out "/share/guile/site/" + guile-effective-version)) + (go (string-append out "/lib/guile/" + guile-effective-version + "/site-ccache"))) + (for-each + (lambda (file) + (wrap-program (string-append bin "/" file) + `("PATH" ":" prefix + (,bin)) + `("GUILE_LOAD_PATH" ":" prefix + (,scm ,(getenv "GUILE_LOAD_PATH"))) + `("GUILE_LOAD_COMPILED_PATH" ":" prefix + (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))) + '("guix-data-service" + "guix-data-service-process-branch-updated-email" + "guix-data-service-process-job" + "guix-data-service-process-jobs" + "guix-data-service-query-build-servers")) + #t))) + (delete 'strip)))) ; As the .go files aren't compatible + (inputs + `(("guile" ,guile-2.2) + ("guix" ,guix) + ("guile-fibers" ,guile-fibers) + ("guile-json" ,guile-json-3) + ("guile-email" ,guile-email) + ("guile-squee" ,guile-squee) + ("postgresql" ,postgresql) + ("sqitch" ,sqitch))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("emacs-with-modules" ,(directory-union + "emacs-union" + (list emacs-no-x + emacs-htmlize))) + ("pkg-config" ,pkg-config))) + (native-search-paths + ;; XXX guile-git requires this to be set, maybe there's a better way + (list (search-path-specification + (variable "GIT_SSL_CAINFO") + (file-type 'regular) + (separator #f) + (files '("etc/ssl/certs/ca-certificates.crt"))))) + (synopsis "Store and provide data about GNU Guix") + (description + "The Guix Data Service stores data about GNU Guix, and provides this +through a web interface. It supports listening to the guix-commits mailing +list to find out about new revisions, then loads the data from these in to a +PostgreSQL database.") + (home-page "http://data.guix.gnu.org/") + (license license:agpl3+)))) + (define-public gumbo-parser (package (name "gumbo-parser") -- 2.23.0 From unknown Sat Jun 21 10:45:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37412] [PATCH 2/2] services: Add the Guix Data Service. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Sep 2019 12:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37412 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 37412@debbugs.gnu.org Received: via spool by 37412-submit@debbugs.gnu.org id=B37412.156915454710146 (code B ref 37412); Sun, 22 Sep 2019 12:16:01 +0000 Received: (at 37412) by debbugs.gnu.org; 22 Sep 2019 12:15:47 +0000 Received: from localhost ([127.0.0.1]:33456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC0mJ-0002dZ-9p for submit@debbugs.gnu.org; Sun, 22 Sep 2019 08:15:47 -0400 Received: from mira.cbaines.net ([212.71.252.8]:35910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC0mI-0002dS-IX for 37412@debbugs.gnu.org; Sun, 22 Sep 2019 08:15:46 -0400 Received: from localhost (220.185.93.209.dyn.plus.net [209.93.185.220]) by mira.cbaines.net (Postfix) with ESMTPSA id DC0CC1730D; Sun, 22 Sep 2019 13:15:45 +0100 (BST) Received: from phact (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 88c21c7d; Sun, 22 Sep 2019 12:15:45 +0000 (UTC) References: <20190915182127.10525-1-mail@cbaines.net> <20190915182127.10525-2-mail@cbaines.net> <87lfuofzi4.fsf@gnu.org> User-agent: mu4e 1.2.0; emacs 26.3 From: Christopher Baines In-reply-to: <87lfuofzi4.fsf@gnu.org> Date: Sun, 22 Sep 2019 13:15:42 +0100 Message-ID: <87o8zc4jdd.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Christopher Baines skribis: > >> +(define (guix-data-service-shepherd-services config) >> + (match config >> + (($ package user group >> + port host) > > Perhaps use =E2=80=98match-record=E2=80=99 here and elsewhere, to avoid m= istakes when > the record type changes. Yeah, I've switched a couple of the match statements across to match-record, but I've left one, as it has a couple of clauses. >> +(define %test-guix-data-service >> + (system-test >> + (name "guix-data-service") >> + (description "Connect to a running Guix Data Service.") >> + (value (run-guix-data-service-test)))) > > Nice. > > Could you add a bit to guix.texi, maybe under =E2=80=9CContinuous Integra= tion=E2=80=9D? > You don=E2=80=99t have to go into too much detail if you think some of the > configuration elements are subject to change. I forgot you mentioned the "Continuous Integration" section, so I actually added something under a new "Guix" section, but regardless, I've now sent some new patches, which includes some documentation. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl2HZe5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xf+9w/9FzPu+FWqxm4VBz2xUov+Fiy4BOcz8C8P83iIP49FhOviwZ04kYAF4D1m r9GkpzWZ9ATZyuTkZFF+WHpkJTNw+47kpF43IM0g8rDICYxhzmT/06519oEzAogV FrLUnmmvcvauIMao/4q2uVszOEfvC4blEkvsKyO9AyFxjrdox0sB47Exzy6LiG2O b94qotSYG5Gi1og6l2afSuNwkTl7HZ82ylOnZ4p7hIle9Lfq2Hkb2c+5//1LVof8 bMmkDJboa2w1egIH/3gYTP1+kXnWy6HLYFaUFh4l9b4TLwZ5DoevKdQBsv139qSp eOCCG5EUbTssdQaqvKt4NE4UVwXsBL4CUBuVGr+K7WBU2at1qFKq3+fr6SJFZfTv JLaeV2Mx07CXcROSm0B2eG6Ilo4whj4EWIF2ZW0J5gr5EJSBOvKoNu4W01yf2eO+ OkR9HyC8HWVwhGcYOUpXvkX4eCIstcwLE0Ye4VWKkBk5TsqW7KHzOWO2mGizNNcO qfsH9t/U/a4f/EIBCdKAYPL+Nu5ExH8TNbF0zHFD5+3nEiVPeBGjgiGAe/jTgEsl 29vh4Ww4Z6W3FOnqL3tqBmeHAiNp8zLFuU+UYL784cgsUCXuN0gV2IofEYzv1Gur ysroOkip+j8QmO3b0gU+roEbEhniLZYYaRdkj7fzmuRL/eu07FI= =45ss -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Jun 21 10:45:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37412] [PATCH 1/2] gnu: Add guix-data-service. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Sep 2019 21:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37412 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 37412@debbugs.gnu.org Received: via spool by 37412-submit@debbugs.gnu.org id=B37412.156918627424224 (code B ref 37412); Sun, 22 Sep 2019 21:05:01 +0000 Received: (at 37412) by debbugs.gnu.org; 22 Sep 2019 21:04:34 +0000 Received: from localhost ([127.0.0.1]:34568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC922-0006Ie-6I for submit@debbugs.gnu.org; Sun, 22 Sep 2019 17:04:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46357) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC91z-0006IL-Qw for 37412@debbugs.gnu.org; Sun, 22 Sep 2019 17:04:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iC91u-0000EY-JV; Sun, 22 Sep 2019 17:04:26 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54730 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iC91t-00023r-Ni; Sun, 22 Sep 2019 17:04:26 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87v9tt1l0h.fsf@cbaines.net> <20190915182127.10525-1-mail@cbaines.net> <87y2yofzqq.fsf@gnu.org> <87pnjs4osk.fsf@cbaines.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 1 =?UTF-8?Q?Vend=C3=A9miaire?= an 228 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sun, 22 Sep 2019 23:04:24 +0200 In-Reply-To: <87pnjs4osk.fsf@cbaines.net> (Christopher Baines's message of "Sun, 22 Sep 2019 11:18:35 +0100") Message-ID: <87muew59gn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Chris, Christopher Baines skribis: > Ludovic Court=C3=A8s writes: > >> Good morning, Chris! >> >> Christopher Baines skribis: >> >>> * gnu/packages/web.scm (guix-data-service): New variable. >> >> Woohoo! \o/ >> >>> + (inputs >>> + `(("guile" ,guile-2.2) >> >> Guile should be =E2=80=98native-inputs=E2=80=99 because we use it for it= s compiler >> (which can act as a =E2=80=9Ccross-compiler=E2=80=9D with =E2=80=98--tar= get=E2=80=99). > > This makes sense, but the scripts will still refer to the guile used to > build the package, so building for a different architecture won't work > right? Does the package somehow need to take as input two Guiles, one > for build time, and one for runtime? Yes, we probably need to have Guile both as input and native input. Well don=E2=80=99t lose your hair on it anyway. >>> + (native-search-paths >>> + ;; guile-git requires this to be set >>> + (list (search-path-specification >>> + (variable "GIT_SSL_CAINFO") >>> + (file-type 'regular) >>> + (separator #f) >>> + (files '("etc/ssl/certs/ca-certificates.crt"))))) >> >> It=E2=80=99s a bit of a workaround for >> , isn=E2=80=99t it? :-) >> >> What about either removing it, or adding an =E2=80=9CXXX=E2=80=9D to the= comment? > > I can't quite remember, I think I added that a long while ago when > trying to get the Guix service working. I'm not sure it's a great > approach. I'll add XXX to the comment though. What about removing it altogether and instead setting GIT_SSL_CAINFO in the service itself? Thanks, Ludo=E2=80=99. From unknown Sat Jun 21 10:45:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37412] [PATCH 1/2] gnu: Add guix-data-service. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Sep 2019 21:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37412 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 37412@debbugs.gnu.org Received: via spool by 37412-submit@debbugs.gnu.org id=B37412.156918668724987 (code B ref 37412); Sun, 22 Sep 2019 21:12:01 +0000 Received: (at 37412) by debbugs.gnu.org; 22 Sep 2019 21:11:27 +0000 Received: from localhost ([127.0.0.1]:34577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC98h-0006Ux-CG for submit@debbugs.gnu.org; Sun, 22 Sep 2019 17:11:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49109) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC98g-0006Uj-45 for 37412@debbugs.gnu.org; Sun, 22 Sep 2019 17:11:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37403) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iC98Y-0005Wg-Ll; Sun, 22 Sep 2019 17:11:19 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54734 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iC98X-00056l-Rj; Sun, 22 Sep 2019 17:11:18 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87v9tt1l0h.fsf@cbaines.net> <20190922120337.3533-1-mail@cbaines.net> Date: Sun, 22 Sep 2019 23:11:16 +0200 In-Reply-To: <20190922120337.3533-1-mail@cbaines.net> (Christopher Baines's message of "Sun, 22 Sep 2019 13:03:36 +0100") Message-ID: <87impk5957.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Christopher Baines skribis: > * gnu/packages/web.scm (guix-data-service): New variable. [...] > + (native-inputs > + `(("autoconf" ,autoconf) > + ("automake" ,automake) > + ("emacs-with-modules" ,(directory-union > + "emacs-union" > + (list emacs-no-x > + emacs-htmlize))) Should it be =E2=80=98emacs-minimal=E2=80=99? > + (native-search-paths > + ;; XXX guile-git requires this to be set, maybe there's a better = way > + (list (search-path-specification > + (variable "GIT_SSL_CAINFO") > + (file-type 'regular) > + (separator #f) > + (files '("etc/ssl/certs/ca-certificates.crt"))))) Like I wrote, I=E2=80=99d rather remove the search path and add the environ= ment variable=E2=80=A6 > + (start #~(make-forkexec-constructor > + (list #$(file-append package > + "/bin/guix-data-service") > + "--pid-file=3D/var/run/guix-data-service/pid" > + #$(string-append "--port=3D" (number->string port)) > + #$(string-append "--host=3D" host) > + ;; Perform any database migrations when the > + ;; service is started > + "--update-database") > + > + #:user #$user > + #:group #$group > + #:pid-file "/var/run/guix-data-service/pid" > + ;; Allow time for migrations to run > + #:pid-file-timeout 60 > + #:environment-variables > + `(,(string-append > + "GUIX_LOCPATH=3D" #$glibc-utf8-locales "/lib/locale") > + "LC_ALL=3Den_US.utf8") > + #:log-file "/var/log/guix-data-service/web.log")) =E2=80=A6 here. =E2=86=91 But anyway, these are details so I think you can go ahead and push as you see fit. Thanks! Ludo=E2=80=99. From unknown Sat Jun 21 10:45:52 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37412] [PATCH 1/2] gnu: Add guix-data-service. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 24 Sep 2019 19:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37412 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 37412@debbugs.gnu.org Received: via spool by 37412-submit@debbugs.gnu.org id=B37412.156935370818304 (code B ref 37412); Tue, 24 Sep 2019 19:36:02 +0000 Received: (at 37412) by debbugs.gnu.org; 24 Sep 2019 19:35:08 +0000 Received: from localhost ([127.0.0.1]:40185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCqaW-0004l4-8q for submit@debbugs.gnu.org; Tue, 24 Sep 2019 15:35:07 -0400 Received: from mira.cbaines.net ([212.71.252.8]:37970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCqaR-0004kV-HK for 37412@debbugs.gnu.org; Tue, 24 Sep 2019 15:35:03 -0400 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 7E0CB1741D; Tue, 24 Sep 2019 20:34:58 +0100 (BST) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id d6183ccc; Tue, 24 Sep 2019 19:34:58 +0000 (UTC) References: <87v9tt1l0h.fsf@cbaines.net> <20190922120337.3533-1-mail@cbaines.net> <87impk5957.fsf@gnu.org> User-agent: mu4e 1.2.0; emacs 26.3 From: Christopher Baines In-reply-to: <87impk5957.fsf@gnu.org> Date: Tue, 24 Sep 2019 20:34:55 +0100 Message-ID: <877e5xqyhs.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Christopher Baines skribis: > >> * gnu/packages/web.scm (guix-data-service): New variable. > > [...] > >> + (native-inputs >> + `(("autoconf" ,autoconf) >> + ("automake" ,automake) >> + ("emacs-with-modules" ,(directory-union >> + "emacs-union" >> + (list emacs-no-x >> + emacs-htmlize))) > > Should it be =E2=80=98emacs-minimal=E2=80=99? It probably could be, but at the moment this doesn't work with the Emacs Lisp code that's run at package build time to convert the README to HTML [1]. 1: https://git.savannah.gnu.org/cgit/guix/data-service.git/tree/Makefile.am= #n35 Do you know if there's a way to remove the need for the autoloading behaviour from the guix-emacs.el file? The error I get when using emacs-minimal suggests htmlize isn't being found. >> + (native-search-paths >> + ;; XXX guile-git requires this to be set, maybe there's a better= way >> + (list (search-path-specification >> + (variable "GIT_SSL_CAINFO") >> + (file-type 'regular) >> + (separator #f) >> + (files '("etc/ssl/certs/ca-certificates.crt"))))) > > Like I wrote, I=E2=80=99d rather remove the search path and add the envir= onment > variable=E2=80=A6 Yeah, I'm actually unsure if this is doing anything. I'll remove it. >> + (start #~(make-forkexec-constructor >> + (list #$(file-append package >> + "/bin/guix-data-service") >> + "--pid-file=3D/var/run/guix-data-service/pid" >> + #$(string-append "--port=3D" (number->string port= )) >> + #$(string-append "--host=3D" host) >> + ;; Perform any database migrations when the >> + ;; service is started >> + "--update-database") >> + >> + #:user #$user >> + #:group #$group >> + #:pid-file "/var/run/guix-data-service/pid" >> + ;; Allow time for migrations to run >> + #:pid-file-timeout 60 >> + #:environment-variables >> + `(,(string-append >> + "GUIX_LOCPATH=3D" #$glibc-utf8-locales "/lib/locale= ") >> + "LC_ALL=3Den_US.utf8") >> + #:log-file "/var/log/guix-data-service/web.log")) > > =E2=80=A6 here. =E2=86=91 So, this shepherd service which serves requests doesn't do any Git access, and the process jobs shepherd service defined below actually already sets it: "GIT_SSL_CAINFO=3D/etc/ssl/certs/ca-certificates.crt" So yeah, I think I can just remove the native-search-paths bit from the package definition. > But anyway, these are details so I think you can go ahead and push as > you see fit. Great, thanks for taking a look Ludo! Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl2Kb99fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XdAcw/9HcYfWfSQ40DqlNU5ylV1VY3AmCf/2bSiTdQFPgy2fAMmrOuaMJJxlEIh be5VVrtf+MLCmAqyHKI2WTbeaaso7hBUFAK53dmy6koyTLuSbjNtRccLzWKRFymn SRq1NoigTm5WZuW5EZuzozmhty5qkQd0Wcmj2WmZR5ZyWChFyaP284LZPIACToFA g9L1aFT2cSUG8srGMDFKPhI+ge/f5u1fby+weitTpuH4k0sykT1CfUpfi/fk01ml xTFKxkSd3lJ8f4CFoqPDrepZohAV+ZfyrpRAFoKCaq96k0o3s4i5hVrr5UmWjC2X LxifKMFRSJgxf2gmIvnYx6ABqPXkcX0oJ1WC5dAcKsS80sJBog5qupaCRaEvgFKg LuSnq1uR/RBGJc35Ifej5jrhFIt6hYlfQK9Vswacew6kvjH8UMiQ9HmJo7ja/DaU Qs9nx3+B0EYRgqnwQHSenDOOjMgoqFBBO96mo5MzlL2FdnhgUj0TnXYyY4M0tEd3 3WmOrKdzJyFFH8l8/PSdGX++BiNPy1WjLq4cOW7Md4jAfZDkPW/VI9OzC8YDhcVp d82UNc9I4Dcb0Yo4sFwCTPRWGeXYiK8ULDbABL84AIMdWqsvqvaiKz4fK3CO2fKt r5e5TlwkDrJ7PsMkON0stqQ3CIo9npeQKawKbTZFQz4TdrzTtME= =gT0Y -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Jun 21 10:45:52 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Christopher Baines Subject: bug#37412: closed (Re: [bug#37412] [PATCH 1/2] gnu: Add guix-data-service.) Message-ID: References: <875zlgrf77.fsf@cbaines.net> <87v9tt1l0h.fsf@cbaines.net> X-Gnu-PR-Message: they-closed 37412 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 37412@debbugs.gnu.org Date: Wed, 25 Sep 2019 07:47:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1569397622-20646-1" This is a multi-part message in MIME format... ------------=_1569397622-20646-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #37412: [PATCH 0/2] Add package and service for the Guix Data Service. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 37412@debbugs.gnu.org. --=20 37412: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D37412 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1569397622-20646-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 37412-done) by debbugs.gnu.org; 25 Sep 2019 07:46:26 +0000 Received: from localhost ([127.0.0.1]:40779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD20H-0005M8-PL for submit@debbugs.gnu.org; Wed, 25 Sep 2019 03:46:26 -0400 Received: from mira.cbaines.net ([212.71.252.8]:38244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD20F-0005Lz-FJ for 37412-done@debbugs.gnu.org; Wed, 25 Sep 2019 03:46:24 -0400 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 82DBB173AB; Wed, 25 Sep 2019 08:46:22 +0100 (BST) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 701b9f91; Wed, 25 Sep 2019 07:46:22 +0000 (UTC) References: <87v9tt1l0h.fsf@cbaines.net> <20190915182127.10525-1-mail@cbaines.net> <87y2yofzqq.fsf@gnu.org> <87pnjs4osk.fsf@cbaines.net> <87muew59gn.fsf@gnu.org> User-agent: mu4e 1.2.0; emacs 26.3 From: Christopher Baines To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#37412] [PATCH 1/2] gnu: Add guix-data-service. In-reply-to: <87muew59gn.fsf@gnu.org> Date: Wed, 25 Sep 2019 08:46:20 +0100 Message-ID: <875zlgrf77.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 37412-done Cc: 37412-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hi Chris, > > Christopher Baines skribis: > >> Ludovic Court=C3=A8s writes: >> >>> Good morning, Chris! >>> >>> Christopher Baines skribis: >>> >>>> * gnu/packages/web.scm (guix-data-service): New variable. >>> >>> Woohoo! \o/ >>> >>>> + (inputs >>>> + `(("guile" ,guile-2.2) >>> >>> Guile should be =E2=80=98native-inputs=E2=80=99 because we use it for i= ts compiler >>> (which can act as a =E2=80=9Ccross-compiler=E2=80=9D with =E2=80=98--ta= rget=E2=80=99). >> >> This makes sense, but the scripts will still refer to the guile used to >> build the package, so building for a different architecture won't work >> right? Does the package somehow need to take as input two Guiles, one >> for build time, and one for runtime? > > Yes, we probably need to have Guile both as input and native input. > Well don=E2=80=99t lose your hair on it anyway. I've just gone with making it a native input for now. >>>> + (native-search-paths >>>> + ;; guile-git requires this to be set >>>> + (list (search-path-specification >>>> + (variable "GIT_SSL_CAINFO") >>>> + (file-type 'regular) >>>> + (separator #f) >>>> + (files '("etc/ssl/certs/ca-certificates.crt"))))) >>> >>> It=E2=80=99s a bit of a workaround for >>> , isn=E2=80=99t it? :-) >>> >>> What about either removing it, or adding an =E2=80=9CXXX=E2=80=9D to th= e comment? >> >> I can't quite remember, I think I added that a long while ago when >> trying to get the Guix service working. I'm not sure it's a great >> approach. I'll add XXX to the comment though. > > What about removing it altogether and instead setting GIT_SSL_CAINFO in > the service itself? Turns out I was already setting GIT_SSL_CAINFO in the service, so I've removed the native-search-paths from the package definition. I've now pushed both patches, thanks for taking a look! Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl2LG0xfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XeH3Q//Vk4SMCrj62VD40hxNPW768R9tu2SCEycpZPw5zfdA5Ct2lxQO+8PPYEe aEjw9fGkJsRc0Qq0h9wkW891vpKe4s5UKMCDBAhqtnN/YK0drVG8u4wi5+GnAqwA xNtIeTZWCXWC58MWhE0HZOqznYYvsTRhbg+784uQLVdyrWHsnuVMZLeSkS8rGkSL D9vS369wXSo812h7240Rk8t7DowVhFK6pIoWUDO/Sf6sxzH+cbMw6ntZ450xSpT2 Lirv1bJI0ycT89h2GRw33AWCz6Yd5PHWEaGH+D6Rp0+8GmQqNPesePDR6f+7yHrq nGuTkkk5YFhTYjZozCLO6g+lY3uZKMwUjHTWoVL9U7D2VlMjflVITQFY3ZX+N1KV iJ2B9XTZVogcyzPYb2uplzcwGOV0ABcsPqF3D5ajjgrfsY9CYvNuhzhhRBbu6bBE +dhPlDinmo1hUfTXznMEDKRFLZpICshk9y0z8oCDySX98cqqB59cBGdxSXpoOAlJ 7+Ne2rFGfuVqF2tCUgUHhaLbUb3Q8BGQpTKaR/4Vy9RPV2C6U+3yGu4bQURpDlSU My/UwwyrhmX2923FJZSm6eCMzwquDGBN865OM/I/hwQzLVcdjtpckfNP32UcP0Cm KKCiyhTZldqtJZXvoXVqbU79f9fpWLnKdw3LucurYJ+jJTYzjOM= =ToPc -----END PGP SIGNATURE----- --=-=-=-- ------------=_1569397622-20646-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Sep 2019 18:18:15 +0000 Received: from localhost ([127.0.0.1]:48703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9Z6D-0000Pb-0h for submit@debbugs.gnu.org; Sun, 15 Sep 2019 14:18:13 -0400 Received: from lists.gnu.org ([209.51.188.17]:46719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9Z6B-0000PR-Ch for submit@debbugs.gnu.org; Sun, 15 Sep 2019 14:18:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34071) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9Z6A-0008Md-Em for guix-patches@gnu.org; Sun, 15 Sep 2019 14:18:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9Z69-0007sL-8P for guix-patches@gnu.org; Sun, 15 Sep 2019 14:18:10 -0400 Received: from mira.cbaines.net ([2a01:7e00::f03c:91ff:fe69:8da9]:46960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i9Z69-0007rl-31 for guix-patches@gnu.org; Sun, 15 Sep 2019 14:18:09 -0400 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 87676173C4 for ; Sun, 15 Sep 2019 19:18:07 +0100 (BST) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 2f7986e2 for ; Sun, 15 Sep 2019 18:18:07 +0000 (UTC) User-agent: mu4e 1.2.0; emacs 26.3 From: Christopher Baines To: guix-patches@gnu.org Subject: [PATCH 0/2] Add package and service for the Guix Data Service. Date: Sun, 15 Sep 2019 19:18:06 +0100 Message-ID: <87v9tt1l0h.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:7e00::f03c:91ff:fe69:8da9 X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain These patches add a package definition, and service type for the Guix Data Service, as well as a system test. Christopher Baines (2): gnu: Add guix-data-service. services: Add the Guix Data Service. gnu/local.mk | 2 + gnu/packages/web.scm | 83 +++++++++++++++++ gnu/services/guix.scm | 204 ++++++++++++++++++++++++++++++++++++++++++ gnu/tests/guix.scm | 173 +++++++++++++++++++++++++++++++++++ 4 files changed, 462 insertions(+) create mode 100644 gnu/services/guix.scm create mode 100644 gnu/tests/guix.scm --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl1+gF5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XcbEBAAsZGWiuUZjybjMp2iC7h0W1pkjVhmuqoGviUxc1tymE4Wa6eX1LtGqOB6 6dWe5r2fWaV3j4DG/N9eGejuJQWU5tKNhsQ3NnszMSYjD/sUnuaho6jpLrwp4zI4 PUx/1079LeihIHso7cdu53YutEt5aoINqAD070p1BDwPGeto6BUpmHedarCfG888 aewaQUZ1I42zjewVN+l+mMUPyg7ZhOOk3Fc1t+tW9AHN36yaH0t43uz0nv03iqp9 7v3OvJV2U65ycbha/dTevr9whoEJiGMRbXDKUZbZB+QLamMOSfKc7MYUC1353KbX mL88M0ryoJ8cymM5E+byWALWHj5Ag+PHBsmbkuvk9qNkqk4KUGmcFvnxZSWDoEDz MoTjC5tH+ux7MAzpnn5PKAu0P6QsC3Y5gZEkRC4cr4AZcMbfNMBKn0naB9adxJ38 vdmFOmMT512TyQxdJasTdjgeUXVwx6pSelpXjucwWDcIzTAPxfBCLDff8EbYl970 OA+yPHb9fZlQPHZ2fGCF/OlGM8iv3heB2e7ZU05wQT/KJ+nJL4ZbXJXjbmfBMRFN LZo7CtHfpfFOpmwQPm6WjNcbd5Ic6SZORw3Xy+yaXlOpYuhQLkxtc3ON+GjNZZcX y017+mLpwbdcGMoIQR6BXXFWnnJgwbICTXnDDXk7ha7Ph5L1Gb0= =wFrO -----END PGP SIGNATURE----- --=-=-=-- ------------=_1569397622-20646-1--