From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 02:00:54 2019 Received: (at submit) by debbugs.gnu.org; 21 Oct 2019 06:00:55 +0000 Received: from localhost ([127.0.0.1]:55596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMQkQ-0003Pv-8r for submit@debbugs.gnu.org; Mon, 21 Oct 2019 02:00:54 -0400 Received: from lists.gnu.org ([209.51.188.17]:60163) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMQkO-0003Pn-7D for submit@debbugs.gnu.org; Mon, 21 Oct 2019 02:00:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39222) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMQkL-0003Ok-8R for guix-patches@gnu.org; Mon, 21 Oct 2019 02:00:51 -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,UNPARSEABLE_RELAY, 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 1iMQkI-0004KN-TB for guix-patches@gnu.org; Mon, 21 Oct 2019 02:00:48 -0400 Received: from mira.cbaines.net ([2a01:7e00::f03c:91ff:fe69:8da9]:44306) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iMQkI-0004K5-LE for guix-patches@gnu.org; Mon, 21 Oct 2019 02:00:46 -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 D858C1757E for ; Mon, 21 Oct 2019 07:00:44 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id b3f1529d for ; Mon, 21 Oct 2019 06:00:44 +0000 (UTC) From: Christopher Baines To: guix-patches@gnu.org Subject: [PATCH] gnu: Add ephemeralpg. Date: Mon, 21 Oct 2019 07:00:44 +0100 Message-Id: <20191021060044.9696-1-mail@cbaines.net> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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(+) Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: eradman.com] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [2a01:7e00:0:0:f03c:91ff:fe69:8da9 listed in] [zen.spamhaus.org] 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 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: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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(+) Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: eradman.com] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [2a01:7e00:0:0:f03c:91ff:fe69:8da9 listed in] [zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 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))) =20 +(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=3Dgcc" + (string-append "PREFIX=3D" %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 possibl= e 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=3DC as some tests use sort, and the local= e + ;; affects the order. It will hopefully be possible to remo= ve + ;; 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 automatical= ly +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") --=20 2.23.0