From patchwork Mon Nov 2 11:48:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Geerinckx-Rice X-Patchwork-Id: 24953 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9E98427BBF2; Mon, 2 Nov 2020 11:50:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BC8BE27BBF3 for ; Mon, 2 Nov 2020 11:50:08 +0000 (GMT) Received: from localhost ([::1]:45840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZYLf-000198-TP for patchwork@mira.cbaines.net; Mon, 02 Nov 2020 06:50:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZYLa-000190-CJ for guix-patches@gnu.org; Mon, 02 Nov 2020 06:50:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56649) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZYLa-0000Pk-2u for guix-patches@gnu.org; Mon, 02 Nov 2020 06:50:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kZYLa-0005K9-0c for guix-patches@gnu.org; Mon, 02 Nov 2020 06:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44389] [PATCH] gnu: Add firebird. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Nov 2020 11:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44389 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44389@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160431774620395 (code B ref -1); Mon, 02 Nov 2020 11:50:01 +0000 Received: (at submit) by debbugs.gnu.org; 2 Nov 2020 11:49:06 +0000 Received: from localhost ([127.0.0.1]:39962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZYKc-0005Ip-KP for submit@debbugs.gnu.org; Mon, 02 Nov 2020 06:49:06 -0500 Received: from lists.gnu.org ([209.51.188.17]:34506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZYKa-0005IG-Cd for submit@debbugs.gnu.org; Mon, 02 Nov 2020 06:49:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZYKa-000144-4n for guix-patches@gnu.org; Mon, 02 Nov 2020 06:49:00 -0500 Received: from tobias.gr ([2a02:c205:2020:6054::1]:43192) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZYKX-0008Sa-Fs for guix-patches@gnu.org; Mon, 02 Nov 2020 06:48:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobias.gr; s=2018; bh=9yX+A1gh6t9f0BB1Rcn0OLIgla3lntmOsKrhJDDUqPc=; h=date:subject:to: from; b=kT0/KoRudDdIj82j3F9OH3Eyi0iLw67vV7qlQeUSHc9gvZfAKhFHBnH7R/4zRz ZsO9a5BypYu5n6yXWNM63bk9kVTA1mdZP0ZIjLLOTYwLRi2FvjcsSJbLDBLX7N0DNGB68A id04Ef+UYEbhaiqnUNqEe66abkRmLQGqKXgv59D4c0EBH6afROChyxkfOwm7Y/1ZfMdwTp hFTZpGQoErm8kBBqpnCHN1sYqx0tOdpi/9qPHK4Utl4IHqjUylfn5JgWjapUKVrvwdqNN2 59YNSvrUHOx/2VR9Rl6F4epSjjVnepnWYvbkCJmtvOXoTzFNO1wucbwP4B8+LPZ6EvPsGg == Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 70a5815a (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO) for ; Mon, 2 Nov 2020 11:48:51 +0000 (UTC) Date: Mon, 2 Nov 2020 12:48:52 +0100 Message-Id: <20201102114852.7394-1-me@tobias.gr> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Tobias Geerinckx-Rice , Tobias Geerinckx-Rice via Guix-patches X-Patchwork-Original-From: Tobias Geerinckx-Rice via Guix-patches via From: Tobias Geerinckx-Rice X-getmail-retrieved-from-mailbox: Patches * gnu/packages/databases.scm (firebird): New public variable. --- Guix, This adds Firebird to enable LibreOffice Base. Kind regards, T G-R gnu/packages/databases.scm | 174 +++++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 0d8342b04a..c1a9482b5d 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -87,13 +87,16 @@ #:use-module (gnu packages guile) #:use-module (gnu packages time) #:use-module (gnu packages golang) + #:use-module (gnu packages icu4c) #:use-module (gnu packages jemalloc) #:use-module (gnu packages language) + #:use-module (gnu packages libedit) #:use-module (gnu packages libevent) #:use-module (gnu packages linux) #:use-module (gnu packages logging) #:use-module (gnu packages man) #:use-module (gnu packages maths) + #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) #:use-module (gnu packages onc-rpc) #:use-module (gnu packages parallel) @@ -308,6 +311,177 @@ ElasticSearch server") (home-page "https://github.com/patientslikeme/es_dump_restore") (license license:expat))) +(define-public firebird + (package + (name "firebird") + (version "3.0.7") + (source + (let ((revision "33374-0")) + (origin + (method url-fetch) + (uri (string-append "https://github.com/FirebirdSQL/" + "firebird/releases/download/R" + (string-replace-substring version "." "_") "/" + "Firebird-" version "." revision ".tar.bz2")) + (sha256 + (base32 "0xpy1bncz36c6n28y7kllm1dkrdkn4vb4gw2n43f2351mznmrf5c")) + (modules '((guix build utils))) + (snippet + `(begin + (for-each + delete-file-recursively + (list "extern/btyacc/test" ; TODO: package and remove entirely + "extern/editline" + "extern/icu" + "extern/libtommath" + "extern/zlib" + "src/include/firebird/impl/boost" + + ;; Missing licence. + "builds/install/arch-specific/solaris" + "extern/SfIO" + "src/msgs/templates.sql" + + ;; Generated files missing sources. + "doc/Firebird-3-QuickStart.pdf" + (string-append "doc/Firebird-" ,version + "-ReleaseNotes.pdf") + "doc/README.SecureRemotePassword.html")) + #t))))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (let ((out (assoc-ref %outputs "out"))) + (list (string-append "--with-fbsbin=" out "/sbin") + (string-append "--with-fbdoc=" out "/share/doc/" + ,name "-" ,version) + (string-append "--with-fbconf=" out "/lib/firebird") + (string-append "--with-fbintl=" out "/lib/firebird/intl") + (string-append "--with-fbmisc=" out "/lib/firebird/misc") + (string-append "--with-fbmsg=" out "/lib/firebird") + (string-append "--with-fbplugins=" out "/lib/firebird/plugins") + (string-append "--with-fbudf=" out "/lib/firebird/UDF") + "--with-fbglock=/run/firebird" + "--with-fblog=/var/log/firebird" + "--with-fbhelp=/var/lib/firebird/system" + "--with-fbsecure-db=/var/lib/firebird/secure" + "--without-fbsample" + "--without-fbsample-db" + "--with-system-editline")) + #:make-flags + (list (string-append "CC=" ,(cc-for-target)) + ;; The plugins/ can't find libfbclient otherwise. + (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib")) + #:tests? #f ; no test suite + #:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-26)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'use-system-boost + (lambda _ + (substitute* "src/include/firebird/Message.h" + (("\"\\./impl/boost/preprocessor/seq/for_each_i\\.hpp\"") + "") + (("FB_BOOST_") "BOOST_")) + #t)) + (add-after 'unpack 'patch-installation + (lambda _ + (substitute* + "builds/install/arch-specific/linux/makeInstallImage.sh.in" + (("/bin/sh") (which "bash")) + ;; Remove shell script helpers from $PATH. + (("(addLibs|cp) .*\\.sh .*@FB_SBINDIR@") ":") + ;; Put files where Guix users expect them. + (("(License\\.txt.*)@FB_CONFDIR" match) + (string-append match "@FB_DOCDIR@")) + (("@FB_CONFDIR@(.*License\\.txt.*)" match) + (string-append "@FB_DOCDIR@" match)) + (("(cp .*/doc/.*)@FB_CONFDIR@(.*)" _ head tail) + (string-append head "@FB_DOCDIR@" tail "\n"))) + (substitute* + (list "builds/install/posix-common/changeServerMode.sh.in" + "builds/install/posix-common/install.sh.in") + ;; Skip phases that (could) cause problems in Guix. + (("check(InstallUser|IfServerRunning|Libraries)|addFirebirdUser") + ":") + ;; Skip phases that are merely pointless on Guix. + (("buildUninstallFile|installInitdScript|startFirebird") ":") + ;; Omit randomly generated password with bonus timestamp. + (("setDBAPassword") ":")) + + ;; These files are not relevant on Guix nor missed by install.sh. + (for-each delete-file-recursively + (find-files "doc" "README\\.(NT|Win)")) + #t)) + (add-after 'configure 'delete-init-scripts + (lambda _ + (delete-file-recursively "gen/install/misc") + #t)) + (add-before 'build 'set-build-environment-variables + (lambda _ + ;; ‘isql’ needs to run & find libfbclient.so during the build. + ;; This doubles as a rudimentary test in lieu of a test suite. + (setenv "LD_LIBRARY_PATH" + (string-append (assoc-ref %build-inputs "icu4c") "/lib")) + #t)) + (add-after 'install 'remove-examples + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each delete-file-recursively + (find-files out "example")) + #t))) + (add-after 'install 'remove-debug-symbols + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each delete-file-recursively + (find-files out "^\\.debug$")) + ;; The ordering of lines in this file is not deterministic. + (delete-file + (string-append out "/lib/firebird/misc/manifest_debug.txt")) + #t)))))) + (inputs + `(("boost" ,boost) + ("editline" ,editline) + ("icu4c" ,icu4c-67) + ("libtommath" ,libtommath) + ("ncurses" ,ncurses) + ("zlib" ,zlib))) + (home-page "https://www.firebirdsql.org") + (synopsis "Relational database with many ANSI SQL standard features") + (description + "Firebird is an SQL @acronym{RDBMS, relational database management system} +with rich support for ANSI SQL (e.g., @code{INSERT...RETURNING}), PSQL stored +procedures, cursors, and triggers, @acronym{UDFs, user-defined functions}, and +more. Transactions provide full ACID-compliant referential integrity. + +The database requires very little manual maintenance once set up, making it +ideal for small business or embedded use. + +When installed as a traditional local or remote (network) database server, +Firebird can grow to terabyte scale with proper tuning---although PostgreSQL +may be a better choice for such very large environments. + +Firebird can also be embedded into stand-alone applications that don't want or +need a full client & server. Used in this manner, it offers richer SQL support +than SQLite as well as the option to seamlessly migrate to a client/server +database later.") + (properties + `((lint-hidden-cve . ("CVE-2017-6369")))) + (license + ;; See doc/license/README.license.usage.txt for rationale & details. + (list license:bsd-3 ; src/common/sha2/ + license:bsd-4 ; src/common/enc.cpp + license:gpl2+ ; builds/posix/make.defaults + (license:non-copyleft "file:///builds/install/misc/IPLicense.txt" + "InterBase Public License v1.0") + (license:non-copyleft "file:///builds/install/misc/IDPLicense.txt" + "Initial Developer's Public License v1.0") + license:lgpl2.1 ; exception for OSI-compatible licences + license:mpl1.1 ; examples/interfaces/0{6,8}*.cpp + license:public-domain)))) ; including files without explicit licence + (define-public leveldb (package (name "leveldb")