GNU bug report logs - #37845
[PATCH] gnu: Add ephemeralpg.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Mon, 21 Oct 2019 06:01:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37845 in the body.
You can then email your comments to 37845 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#37845; Package guix-patches. (Mon, 21 Oct 2019 06:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Baines <mail <at> cbaines.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 21 Oct 2019 06:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add ephemeralpg.
Date: Mon, 21 Oct 2019 07:00:44 +0100
This is a general utility, but I'm particularly interested in using this to
enable build time tests for the guix-data-service package.

* gnu/packages/databases.scm (ephemeralpg): New variable.
---
 gnu/packages/databases.scm | 62 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index f8e72565a0..7e26e9ebbd 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -216,6 +216,68 @@ standard Go idioms.")
     (home-page "http://labix.org/mgo")
     (license license:bsd-2)))
 
+(define-public ephemeralpg
+  (package
+    (name "ephemeralpg")
+    (version "2.8")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "http://eradman.com/ephemeralpg/code/ephemeralpg-"
+             version ".tar.gz"))
+       (sha256
+        (base32 "1dpfxsd8a52psx3zlfbqkw53m35w28qwyb87a8anz143x6gnkkr4"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:make-flags (list "CC=gcc"
+                          (string-append "PREFIX=" %output))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'check
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; The intention for one test is to test without PostgreSQL on
+             ;; the $PATH, so replace the test $PATH with just the util-linux
+             ;; bin, which contains getopt. It will hopefully be possible to
+             ;; remove this for releases after 2.8.
+             (substitute* "test.rb"
+               (("/bin:/usr/bin")
+                (string-append (assoc-ref inputs "util-linux")
+                               "/bin")))
+             ;; Set the LC_ALL=C as some tests use sort, and the locale
+             ;; affects the order. It will hopefully be possible to remove
+             ;; this for releases after 2.8.
+             (setenv "LC_ALL" "C")
+             (invoke "ruby" "test.rb")
+             #t))
+         (add-after 'install 'wrap
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/pg_tmp")
+                 `("PATH" ":" prefix
+                   (,(string-append (assoc-ref inputs "util-linux")
+                                    "/bin")
+                    ,(string-append (assoc-ref inputs "postgresql")
+                                    "/bin")
+                    ;; For getsocket
+                    ,(string-append out "/bin")))))
+             #t)))))
+    (inputs
+     `(("postgresql" ,postgresql)
+       ("util-linux" ,util-linux)))
+    (native-inputs
+     `(("ruby" ,ruby)))
+    (home-page "http://eradman.com/ephemeralpg/")
+    (synopsis "Run temporary PostgreSQL databases")
+    (description
+     "@code{pg_tmp} creates temporary PostgreSQL databases, suitable for tasks
+like running software test suites.  Temporary databases created with
+@code{pg_tmp} have a limited shared memory footprint and are automatically
+garbage-collected after a configurable number of seconds (the default is
+60).")
+    (license license:gpl2)))
+
 (define-public es-dump-restore
   (package
     (name "es-dump-restore")
-- 
2.23.0





Information forwarded to guix-patches <at> gnu.org:
bug#37845; Package guix-patches. (Mon, 21 Oct 2019 13:45:02 GMT) Full text and rfc822 format available.

Message #8 received at 37845 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 37845 <at> debbugs.gnu.org
Subject: Re: [bug#37845] [PATCH] gnu: Add ephemeralpg.
Date: Mon, 21 Oct 2019 15:44:29 +0200
Hi Chris,

Christopher Baines <mail <at> cbaines.net> skribis:

> This is a general utility, but I'm particularly interested in using this to
> enable build time tests for the guix-data-service package.
>
> * gnu/packages/databases.scm (ephemeralpg): New variable.

[...]

> +    (license license:gpl2)))

I think this is ISC, no?

Apart from that, it LGTM.  Thanks!

Ludo’.




Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Mon, 21 Oct 2019 17:30:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Mon, 21 Oct 2019 17:30:02 GMT) Full text and rfc822 format available.

Message #13 received at 37845-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 37845-done <at> debbugs.gnu.org
Subject: Re: [bug#37845] [PATCH] gnu: Add ephemeralpg.
Date: Mon, 21 Oct 2019 18:29:25 +0100
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi Chris,
>
> Christopher Baines <mail <at> cbaines.net> skribis:
>
>> This is a general utility, but I'm particularly interested in using this to
>> enable build time tests for the guix-data-service package.
>>
>> * gnu/packages/databases.scm (ephemeralpg): New variable.
>
> [...]
>
>> +    (license license:gpl2)))
>
> I think this is ISC, no?

Ah, yep, I probably didn't change that from whatever package definition
I copied... I've updated it now.

> Apart from that, it LGTM.  Thanks!

Great, with the above change, I've pushed this as
6fc03fccd41c1687933a0a70a40efcb5ed821995.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 19 Nov 2019 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 160 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.