unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: 40162@debbugs.gnu.org
Subject: [bug#40162] [PATCH] gnu: guix-data-service: Update to 0.0.1-19.d12909d.
Date: Thu, 26 Mar 2020 21:26:40 +0000	[thread overview]
Message-ID: <20200326212640.10610-1-mail@cbaines.net> (raw)
In-Reply-To: <20200321092259.2729-1-mail@cbaines.net>

These changes support the guix-data-service-backup-database and
guix-data-service-create-small-backup scripts. These are shell scripts, so
require coreutils from the build environment at runtime as well as binaries
from postgresql, ephemeralpg and optionally util-linux (for ionice and
renice).

* gnu/packages/web.scm (guix-data-service): Update to 0.0.1-19.d12909d.
[arguments]: Add (ice-9 ftw) and (ice-9 match) to #:modules, change the
'install phase to wrap all bin files with some inputs as well.
[inputs]: Add util-linux and include ephemeralpg from native-inputs.
[native-inputs]: Move ephemeralpg to inputs.
---
 gnu/packages/web.scm | 35 +++++++++++++++++++++++------------
 1 file changed, 23 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 10cbf6165b..86d3f41efc 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -4381,8 +4381,8 @@ CDF, Atom 0.3, and Atom 1.0 feeds.")
   (package-with-python2 python-feedparser))
 
 (define-public guix-data-service
-  (let ((commit "18eb9dfdcb3174bfd4bab5b9089acffa13aa1214")
-        (revision "18"))
+  (let ((commit "d1c243f7fd8902f359ff06fb78dce663cf4297ce")
+        (revision "19"))
     (package
       (name "guix-data-service")
       (version (string-append "0.0.1-" revision "." (string-take commit 7)))
@@ -4394,11 +4394,13 @@ CDF, Atom 0.3, and Atom 1.0 feeds.")
                 (file-name (git-file-name name version))
                 (sha256
                  (base32
-                  "0lb78cqzqaz0r4sspg272w2a3yhzhqah30j0kxf0z182b0qpmp37"))))
+                  "1ji8d4vwmv7j9h7z96hvzi3zvik594yngjrdal37w13fbxy2v6sw"))))
       (build-system gnu-build-system)
       (arguments
        '(#:modules ((guix build utils)
                     (guix build gnu-build-system)
+                    (ice-9 ftw)
+                    (ice-9 match)
                     (ice-9 rdelim)
                     (ice-9 popen))
          #:test-target "check-with-tmp-database"
@@ -4426,20 +4428,28 @@ CDF, Atom 0.3, and Atom 1.0 feeds.")
                                           "/site-ccache")))
                  (for-each
                   (lambda (file)
+                    (simple-format (current-error-port)
+                                   "wrapping: ~A\n"
+                                   (string-append bin "/" file))
                     (wrap-program (string-append bin "/" file)
                       `("PATH" ":" prefix
-                        (,bin))
+                        ,(cons*
+                          bin
+                          (map (lambda (input)
+                                 (string-append
+                                  (assoc-ref inputs input)
+                                  "/bin"))
+                               '("ephemeralpg"
+                                 "util-linux"
+                                 "postgresql"))))
                       `("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-branch-updated-mbox"
-                    "guix-data-service-process-job"
-                    "guix-data-service-process-jobs"
-                    "guix-data-service-manage-build-servers"
-                    "guix-data-service-query-build-servers"))
+                  (scandir bin
+                           (match-lambda
+                             ((or "." "..") #f)
+                             (_ #t))))
                  #t)))
            (delete 'strip))))           ; As the .go files aren't compatible
       (inputs
@@ -4448,13 +4458,14 @@ CDF, Atom 0.3, and Atom 1.0 feeds.")
          ("guile-json" ,guile3.0-json)
          ("guile-email" ,guile3.0-email)
          ("guile-squee" ,guile3.0-squee)
+         ("ephemeralpg" ,ephemeralpg)
+         ("util-linux" ,util-linux)
          ("postgresql" ,postgresql)
          ("sqitch" ,sqitch)))
       (native-inputs
        `(("guile" ,guile-3.0)
          ("autoconf" ,autoconf)
          ("automake" ,automake)
-         ("ephemeralpg" ,ephemeralpg)
          ("emacs-minimal" ,emacs-minimal)
          ("emacs-htmlize" ,emacs-htmlize)
          ("pkg-config" ,pkg-config)))
-- 
2.26.0

  parent reply	other threads:[~2020-03-26 21:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-21  9:22 [bug#40162] [PATCH] gnu: guix-data-service: Update to 0.0.1-19.d12909d Christopher Baines
2020-03-21 21:50 ` Ludovic Courtès
2020-03-26 21:28   ` Christopher Baines
2020-03-26 21:26 ` Christopher Baines [this message]
2020-03-26 21:33   ` Ludovic Courtès
2020-03-26 22:53     ` bug#40162: " Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200326212640.10610-1-mail@cbaines.net \
    --to=mail@cbaines.net \
    --cc=40162@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).