From unknown Fri Aug 15 16:25:09 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#58398] [core-updates] gnu: dbm: Regenerate Autotools files. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 09 Oct 2022 17:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58398 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 58398@debbugs.gnu.org Cc: Maxime Devos X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166533618026701 (code B ref -1); Sun, 09 Oct 2022 17:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Oct 2022 17:23:00 +0000 Received: from localhost ([127.0.0.1]:44890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oha0x-0006wa-MQ for submit@debbugs.gnu.org; Sun, 09 Oct 2022 13:23:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:40246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oha0v-0006wT-UY for submit@debbugs.gnu.org; Sun, 09 Oct 2022 13:22:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oha0v-0000Zb-PH for guix-patches@gnu.org; Sun, 09 Oct 2022 13:22:57 -0400 Received: from michel.telenet-ops.be ([2a02:1800:110:4::f00:18]:48714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oha0q-0002Yu-Pv for guix-patches@gnu.org; Sun, 09 Oct 2022 13:22:57 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16]) by michel.telenet-ops.be with bizsmtp id VtNm2800D20ykKC06tNm3k; Sun, 09 Oct 2022 19:22:48 +0200 From: Maxime Devos Date: Sun, 9 Oct 2022 19:22:44 +0200 Message-Id: <20221009172244.26683-1-maximedevos@telenet.be> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1665336168; bh=hV9q1prn4lempa1Qtp1tyTFQ7vBMJ3QcJWnpQZ7kpaY=; h=From:To:Cc:Subject:Date; b=ltCbsULuzw1nteFfkBXeg1QIFskIMis+x4I3JG/XhG2NwR52YrXJEd20A9W4HYxMx ifgvdNJjzISrp74YtT6evy113WJ+PUXlDx+xN5l4tVeYqAePP+hAgdvK31Loi7SzMh 557aHhOnRAh3hXWerNYP5Qfy5DVWASxTKhi6VWvEJeHHlNrN3kqREXN+uJoW8emOZH /Lud/ZRNnzUujCnY+k3OUo0nCVieDqCkVm7hrSQQmmlf0XhwWgmxWMxAoh+hiXBRaB 0+1jW0VrBlllOp//uDQURViANcKOJQn3qP5cTyANT4BXEP2l8t1PWQK/4pw6zIDvAM bMrrlKVXgcMfg== Received-SPF: pass client-ip=2a02:1800:110:4::f00:18; envelope-from=maximedevos@telenet.be; helo=michel.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.6 (/) 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 (--) This way, overriding the 'detection of 'build' isn't needed anymore. I switched from 'config' to 'automake' to prevent a hang of './pre-inst-env guix build bdb@4.8' with ever-increasing memory usage, presumably indicating a cycle. Build-tested on a x86_64-linux with: $ ./pre-inst-env guix build --system=x86_64-linux bdb@4 bdb@5 bdb@6 $ ./pre-inst-env guix build --system=x86_64-linux --target=aarch64-linux-gnu bdb@4 bdb@5 bdb@6 It could not be tested with a non-x86_64 system (aarch64-linux) because of an (presumably unrelated) coreutils build failure. * gnu/packages/dbm.scm (bdb-snippet): New procedure. (bdb-4.8)[source]: Add the snippet. [arguments]: Copy "config.sub"," "config.guess" and "install-sh" in a new 'boostrap phase', this time from automake. Move macros from aclocal_java to aclocal. Move configure flags to #:configure-flags. Remove 'configure' phase, instead add a pre-configure phase for adjusting Makefile.in and use '#:out-of-source' to perform an out-of-source build. Run "s_config" to fix up the version numbers. (bdb-5.3)[source]: Inherit from bdb-4.8's source, to get the snippet. (bdb-6)[source]: Likewise, and be careful to not add a patch. --- gnu/packages/dbm.scm | 149 ++++++++++++++++++++++++------------------- 1 file changed, 82 insertions(+), 67 deletions(-) diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm index 8c49094697..4a8acb7ab6 100644 --- a/gnu/packages/dbm.scm +++ b/gnu/packages/dbm.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2018 Mark H Weaver ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2021 Leo Le Bouter -;;; Copyright © 2021 Maxime Devos +;;; Copyright © 2021, 2022 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +29,7 @@ (define-module (gnu packages dbm) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix utils) #:use-module (ice-9 match)) @@ -38,6 +39,29 @@ (define-module (gnu packages dbm) ;;; This module has been separated from (gnu packages databases) to reduce the ;;; number of module references for core packages. +(define bdb-snippet + ;; Remove some bundled and generated files. Some of the old + ;; Autotools files are too old for some architectures + ;; (e.g. aarch64 and powerpc64le). + #~(begin + (for-each delete-file-recursively + '("dist/configure" + "dist/config.sub" + "dist/config.guess" + "dist/install-sh" + "dist/ltmain.sh" + "dist/aclocal/libtool.m4" + "dist/aclocal/ltoptions.m4" + "dist/aclocal/ltsugar.m4" + "dist/aclocal/ltversion.m4" + "dist/aclocal/lt~obsolete.m4")) + (substitute* "dist/configure.ac" + ;; Placate 'automake'. + (("AC_DEFINE\\(DB_WIN32\\)") + "AC_DEFINE(DB_WIN32, [], [Description])") + (("AC_DEFINE\\(HAVE_SYSTEM_INCLUDE_FILES\\)") + "AC_DEFINE(HAVE_SYSTEM_INCLUDE_FILES, [], [Description])")))) + (define-public bdb-4.8 (package (name "bdb") @@ -51,76 +75,65 @@ (define-public bdb-4.8 (sha256 (base32 "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0")) - (patches (search-patches "bdb-5.3-atomics-on-gcc-9.patch")))) + (patches (search-patches "bdb-5.3-atomics-on-gcc-9.patch")) + (modules '((guix build utils) + (srfi srfi-1))) + (snippet bdb-snippet))) (build-system gnu-build-system) (outputs '("out" ; programs, libraries, headers "doc")) ; 94 MiB of HTML docs (arguments - `(#:tests? #f ; no check target available - #:disallowed-references ("doc") - #:phases - (modify-phases %standard-phases - ;; The configure script is too old to recognise aarch64 and - ;; powerpc64le as valid architectures. The trick below works - ;; for "--build", but not for "--host", so update config.sub. - ,@(if (and (%current-target-system) - (or (target-ppc64le? (%current-target-system)) - (target-aarch64? (%current-target-system)))) - `((add-after 'unpack 'update-config.sub - (lambda* (#:key native-inputs #:allow-other-keys) - (delete-file "dist/config.sub") - (symlink - (search-input-file native-inputs "/bin/config.sub") - "dist/config.sub")))) - '()) - (replace 'configure - (lambda* (#:key target outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (doc (assoc-ref outputs "doc"))) - ;; '--docdir' is not honored, so we need to patch. - (substitute* "dist/Makefile.in" - (("docdir[[:blank:]]*=.*") - (string-append "docdir = " doc "/share/doc/bdb"))) - - (chdir "build_unix") - (invoke "../dist/configure" - (string-append "--prefix=" out) - (string-append "CONFIG_SHELL=" (which "bash")) - (string-append "SHELL=" (which "bash")) - - ;; Bdb's config script doesn't recognize very many - ;; architectures, and is a dependant on the 'config' - ;; package, so we manually define the build target. - ,@(match (%current-system) - ("aarch64-linux" - '("--build=aarch64-unknown-linux-gnu")) - ("powerpc64le-linux" - '("--build=powerpc64le-unknown-linux-gnu")) - ("riscv64-linux" - '("--build=riscv64-unknown-linux-gnu")) - (_ '())) + (list #:tests? #f ; no check target available + #:disallowed-references '("doc") + #:out-of-source? #true + #:configure-flags + #~(list + ;; Remove 7 MiB of .a files. + "--disable-static" - ,@(if (%current-target-system) ; cross building - '((string-append "--host=" target)) - '()) + ;; The compatibility mode is needed by some packages, + ;; notably iproute2. + "--enable-compat185" - ;; Remove 7 MiB of .a files. - "--disable-static" - - ;; The compatibility mode is needed by some packages, - ;; notably iproute2. - "--enable-compat185" - - ;; The following flag is needed so that the inclusion - ;; of db_cxx.h into C++ files works; it leads to - ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h. - "--enable-cxx"))))))) - (native-inputs - (if (and (%current-target-system) - (or (target-ppc64le? (%current-target-system)) - (target-aarch64? (%current-target-system)))) - `(("config" ,config)) ; for config.sub - '())) + ;; The following flag is needed so that the inclusion + ;; of db_cxx.h into C++ files works; it leads to + ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h. + "--enable-cxx") + #:phases + #~(modify-phases %standard-phases + (replace 'bootstrap + (lambda* (#:key inputs native-inputs outputs + #:allow-other-keys #:rest arguments) + (with-directory-excursion "dist" + (for-each (lambda (x) + (install-file x "aclocal")) + (find-files "aclocal_java")) + (apply (assq-ref %standard-phases 'bootstrap) arguments) + (let ((automake-files (search-input-directory + (or native-inputs inputs) + "share/automake-1.16"))) + (define (replace file) + (symlink (string-append automake-files "/" file) file)) + (for-each replace '("config.sub" "config.guess" + "install-sh")))))) + (add-before 'configure 'pre-configure + (lambda _ + (chdir "dist") + ;; '--docdir' is not honored, so we need to patch. + (substitute* "Makefile.in" + (("docdir[[:blank:]]*=.*") + (string-append "docdir = " #$output:doc + "/share/doc/bdb"))) + ;; Replace __EDIT_DB_VERSION__... by actual version numbers. + ;; s_config is responsible for this, but also runs autoconf + ;; again, so patch out the autoconf bits. + (substitute* "s_config" + (("^.*(aclocal|autoconf|autoheader|config\\.hin).*$") "") + (("^.*auto4mte.*$") "") + (("rm (.*) configure") "") + (("chmod (.*) config.guess(.*)$") "")) + (invoke "sh" "s_config")))))) + (native-inputs (list autoconf automake libtool)) (synopsis "Berkeley database") (description "Berkeley DB is an embeddable database allowing developers the choice of @@ -135,7 +148,7 @@ (define-public bdb-5.3 (name "bdb") (version "5.3.28") (source (origin - (method url-fetch) + (inherit (package-source bdb-4.8)) (uri (string-append "https://download.oracle.com/berkeley-db/db-" version ".tar.gz")) (sha256 @@ -149,12 +162,14 @@ (define-public bdb-6 (name "bdb") (version "6.2.32") (source (origin + (inherit (package-source bdb-4.8)) (method url-fetch) (uri (string-append "https://download.oracle.com/berkeley-db/db-" version ".tar.gz")) (sha256 (base32 - "1yx8wzhch5wwh016nh0kfxvknjkafv6ybkqh6nh7lxx50jqf5id9")))) + "1yx8wzhch5wwh016nh0kfxvknjkafv6ybkqh6nh7lxx50jqf5id9")) + (patches '()))) ;; Starting with version 6, BDB is distributed under AGPL3. Many individual ;; files are covered by the 3-clause BSD license. (license (list license:agpl3+ license:bsd-3)))) base-commit: ccc2658e2a111590ec25e308946e47a24d357785 prerequisite-patch-id: 87e197146284fb770478e0c2d73027e68ee3db6d prerequisite-patch-id: 32ea6453c34258e3ac8a8766aa14ebb5fe1f5f88 prerequisite-patch-id: b359f1dbbcd6374492720ebd67b0212bd3dfe246 -- 2.37.3 From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 21 05:08:03 2022 Received: (at control) by debbugs.gnu.org; 21 Oct 2022 09:08:03 +0000 Received: from localhost ([127.0.0.1]:37009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olo0Z-0004Qd-Kp for submit@debbugs.gnu.org; Fri, 21 Oct 2022 05:08:03 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:35320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olo0W-0004QC-Uj for control@debbugs.gnu.org; Fri, 21 Oct 2022 05:08:01 -0400 Received: from [192.168.76.79] ([188.189.36.127]) by baptiste.telenet-ops.be with bizsmtp id aZ7r2800n2kbXl001Z7yZG; Fri, 21 Oct 2022 11:07:59 +0200 Message-ID: Date: Fri, 21 Oct 2022 11:07:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Content-Language: en-US To: GNU bug tracker automated control server From: Maxime Devos Subject: control message for bug #58398 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------ySv4uDU6qNJOvDB0K3YHDUii" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1666343279; bh=47Zxy4PImq4nTvaTomxIu4qbioQ9oQWXl48WEYVPAYM=; h=Date:To:From:Subject; b=oGE1xSh0JfVt8b4eEpPek3Psvx1vhKLSJ8TBPwJ22SythbzxoMtrBvNahbgP1LUCQ Uc3dKOGAQNBi30BBLdY8HSqnPfHVWiwcTkR6xdiak4000zmLFpgLDhZR8S2BMH/9T6 O3vozlH6EFvWdmLZ9eZb7PoXw1NDM9uNAav7DIvaKcre0gvP8/ARsRrm6Im48DVmyH U9JBxLaAAJrsUOlOo+yLc8XgwxsAViUxytFp2bCMopHDLug1LdTJqgIZiIsZAMCAPW cxEoBD1mL8yW4w6Jm1NjnMWmlZOgek+IUNJhJFFwc1N0SKtzPPJ4EtEl1IhjR6Xnli Sbt/+K87igwlQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control 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.7 (-) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------ySv4uDU6qNJOvDB0K3YHDUii Content-Type: multipart/mixed; boundary="------------xUduzXLjyWnBkyu5V8xtqHAS"; protected-headers="v1" From: Maxime Devos To: GNU bug tracker automated control server Message-ID: Subject: control message for bug #58398 --------------xUduzXLjyWnBkyu5V8xtqHAS Content-Type: multipart/mixed; boundary="------------CQ0GKFV35r560LWfBc4aOlba" --------------CQ0GKFV35r560LWfBc4aOlba Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 dGl0bGUgNTgzOTggW1BBVENIIGNvcmUtdXBkYXRlc10gZ251OiBkYm06IFJlZ2VuZXJhdGUg QXV0b3Rvb2xzIGZpbGVzLg0KdGFncyA1ODM5OCBwYXRjaA0KdGhhbmtzDQoNCk9vcHMgdXNl ZCAtLXN1YmplY3QtcHJlZml4IHdyb25nLg0K --------------CQ0GKFV35r560LWfBc4aOlba Content-Type: application/pgp-keys; name="OpenPGP_0x49E3EE22191725EE.asc" Content-Disposition: attachment; filename="OpenPGP_0x49E3EE22191725EE.asc" Content-Description: OpenPGP public key Content-Transfer-Encoding: quoted-printable -----BEGIN PGP PUBLIC KEY BLOCK----- xjMEX4ch6BYJKwYBBAHaRw8BAQdANPb/d6MrGnGi5HyvODCkBUJPRjiFQcRU5V+m xvMaAa/NL01heGltZSBEZXZvcyA8bWF4aW1lLmRldm9zQHN0dWRlbnQua3VsZXV2 ZW4uYmU+wpAEExYIADgWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCX4ch6AIbAwUL CQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRBJ4+4iGRcl7japAQC3opZ2KGWzWmRc /gIWSu0AAcfMwyinFEEPa/QhUt2CogD/e2RdF4CYAgaRHJJmZ9WU7piKbLZ7llB4 LzgezVDHggzNJU1heGltZSBEZXZvcyA8bWF4aW1lZGV2b3NAdGVsZW5ldC5iZT7C kAQTFggAOBYhBMHzPuIMUo/bfdcBH0nj7iIZFyXuBQJf56ycAhsDBQsJCAcDBRUK CQgLBRYCAwEAAh4BAheAAAoJEEnj7iIZFyXujpQBAKV1SwDDl4f24rXciDlB9L8W ycZt30CgbewMSRQk4mvbAP9dFMbVVixYBd6C8cfhR+NsOBGiOJnQABlUmgNuqGFJ Dc44BF+HIegSCisGAQQBl1UBBQEBB0BOlzIWiJzgobMF6/cqwLaLk7jIcFSZ++c0 k9cCNT6YXwMBCAfCeAQYFggAIBYhBMHzPuIMUo/bfdcBH0nj7iIZFyXuBQJfhyHo AhsMAAoJEEnj7iIZFyXuMr0BAJc8cl5PGvVmVuSQVKjleNl4DK1/XAaPAYPe34AE fZJPAP9IqLCQhH/FeJanHqBP8gNdGNI2qn8RnnLVfRJgUjZ1BA=3D=3D =3DOVqp -----END PGP PUBLIC KEY BLOCK----- --------------CQ0GKFV35r560LWfBc4aOlba-- --------------xUduzXLjyWnBkyu5V8xtqHAS-- --------------ySv4uDU6qNJOvDB0K3YHDUii Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wnsEABYIACMWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCY1JhZwUDAAAAAAAKCRBJ4+4iGRcl7thl AQD+d402IJOk3G3X4xojrUj88qg2Fu7s+mALi4X6nukhPAD/bvALm4ET3TjqHL1kJ/uYlz77H1Dk mdI4sc/HbYpNggo= =TXiI -----END PGP SIGNATURE----- --------------ySv4uDU6qNJOvDB0K3YHDUii-- From unknown Fri Aug 15 16:25:09 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: Maxime Devos Subject: bug#58398: closed (Re: bug#58398: [core-updates] gnu: dbm: Regenerate Autotools files.) Message-ID: References: <87fryreo7k.fsf@gmail.com> <20221009172244.26683-1-maximedevos@telenet.be> X-Gnu-PR-Message: they-closed 58398 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 58398@debbugs.gnu.org Date: Sat, 20 Jan 2024 20:38:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1705783082-15963-1" This is a multi-part message in MIME format... ------------=_1705783082-15963-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #58398: [core-updates] gnu: dbm: Regenerate Autotools files. 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 58398@debbugs.gnu.org. --=20 58398: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D58398 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1705783082-15963-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 58398-done) by debbugs.gnu.org; 20 Jan 2024 20:37:19 +0000 Received: from localhost ([127.0.0.1]:35906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRI5e-00047y-Iv for submit@debbugs.gnu.org; Sat, 20 Jan 2024 15:37:18 -0500 Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]:48427) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRI5Z-00047b-Os for 58398-done@debbugs.gnu.org; Sat, 20 Jan 2024 15:37:17 -0500 Received: by mail-qt1-x835.google.com with SMTP id d75a77b69052e-42a032cf012so16933431cf.1 for <58398-done@debbugs.gnu.org>; Sat, 20 Jan 2024 12:37:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705783025; x=1706387825; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=NEBsCEPXiYrNvum3C+sUDnqDAvQyLOunDH2O9EGwEDs=; b=VwK5YLX4FhD39QLrUYa/laaBM06vAvaDeV5DTye/n+u5UpY7XUIUafpYDvLf34Z2De riAvAafJlrZSCUlYkRzDT+QHsra0GmP9nQmEnum9dTW0sjrMsnd1MrMy7HqXGLQOrzvt no3hDUxmn8Iw7A2nw/cTE8w+AHetVAOKwIfGEDYjM5myb4/JZ1csoWLxDZ4dF6Rkljni AT6EVR8+XH7yfOroXtf6m6qZo7SX4/+XjULiXtlsi8buhjeSwTWsqFOs5z4N6sw/dLZQ 9GqHP9dMjVt6+Iprk9lkr7h2JpUeJMAKDI+p3eG2rwC0wMGpy6HjyQbCAiTqcZ8bluem mJKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705783025; x=1706387825; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NEBsCEPXiYrNvum3C+sUDnqDAvQyLOunDH2O9EGwEDs=; b=M8UnCmEkNn0hUr9v40ojwO85pzoGRUC2QqKoSaqsfcFtTjKKPnmHs1yHne2p+kBViK G+SCNE2n+B1d8/nywOpf6Kv3XDT4r0ziKyU1yrpAUr9BIULAFmFi2COVolNj8nPlyJ2g MZPMe8V2lsdHFVnKxxPufmAaEC6ul53ETXAR5xQMJKXuUS/ukOof+J8+fsb/ZmfCZn5K 07WN6tp9ZxmGPshhoFasm3FP0fyIu6k5CVSvagWj6Com+bhYFpAndIAAONow+KHEFqfC SU+dal3P2dHicm/t12jkUyRreRlquNiuraueBqztNTaUOwJYQukfFT0vyFJCgGe0r5V9 ou2A== X-Gm-Message-State: AOJu0YwCBeh2znht5POheSMIRsrSX5qYV2cEnV6QnnUTV7L/VgvT4hZO 7xD1KUcoPI107QvXBqYD3WCFxOQ2hqt2IQEjbkdurOXexMGV9dBaE6bfSOnW8OE= X-Google-Smtp-Source: AGHT+IGsHlYnBLlktjeWfUO5XAeR1OMqzWDvRe0zOuHgmjMjIZn71LMJl4qZb0osAUJhre+E//ig+Q== X-Received: by 2002:ac8:7d90:0:b0:42a:1e0f:b631 with SMTP id c16-20020ac87d90000000b0042a1e0fb631mr2571874qtd.63.1705783024887; Sat, 20 Jan 2024 12:37:04 -0800 (PST) Received: from hurd (dsl-10-128-232.b2b2c.ca. [72.10.128.232]) by smtp.gmail.com with ESMTPSA id bq17-20020a05622a1c1100b004299f302a7csm955006qtb.23.2024.01.20.12.37.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 12:37:04 -0800 (PST) From: Maxim Cournoyer To: Maxime Devos Subject: Re: bug#58398: [core-updates] gnu: dbm: Regenerate Autotools files. In-Reply-To: <20221009172244.26683-1-maximedevos@telenet.be> (Maxime Devos's message of "Sun, 9 Oct 2022 19:22:44 +0200") References: <20221009172244.26683-1-maximedevos@telenet.be> Date: Sat, 20 Jan 2024 15:37:03 -0500 Message-ID: <87fryreo7k.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58398-done Cc: 58398-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 (-) Hi, Maxime Devos writes: > This way, overriding the 'detection of 'build' isn't needed anymore. > > I switched from 'config' to 'automake' to prevent a hang of > './pre-inst-env guix build bdb@4.8' with ever-increasing memory usage, > presumably indicating a cycle. > > Build-tested on a x86_64-linux with: > > $ ./pre-inst-env guix build --system=x86_64-linux bdb@4 bdb@5 bdb@6 > $ ./pre-inst-env guix build --system=x86_64-linux --target=aarch64-linux-gnu bdb@4 bdb@5 bdb@6 > > It could not be tested with a non-x86_64 system (aarch64-linux) because of > an (presumably unrelated) coreutils build failure. > > * gnu/packages/dbm.scm (bdb-snippet): New procedure. > (bdb-4.8)[source]: Add the snippet. > [arguments]: Copy "config.sub"," "config.guess" and "install-sh" in a new > 'boostrap phase', this time from automake. Move macros from aclocal_java > to aclocal. Move configure flags to #:configure-flags. Remove 'configure' > phase, instead add a pre-configure phase for adjusting Makefile.in and use > '#:out-of-source' to perform an out-of-source build. Run "s_config" to fix up > the version numbers. > (bdb-5.3)[source]: Inherit from bdb-4.8's source, to get the snippet. > (bdb-6)[source]: Likewise, and be careful to not add a patch. Queued locally for core-updates. Thanks! -- Maxim ------------=_1705783082-15963-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 9 Oct 2022 17:23:00 +0000 Received: from localhost ([127.0.0.1]:44890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oha0x-0006wa-MQ for submit@debbugs.gnu.org; Sun, 09 Oct 2022 13:23:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:40246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oha0v-0006wT-UY for submit@debbugs.gnu.org; Sun, 09 Oct 2022 13:22:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oha0v-0000Zb-PH for guix-patches@gnu.org; Sun, 09 Oct 2022 13:22:57 -0400 Received: from michel.telenet-ops.be ([2a02:1800:110:4::f00:18]:48714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oha0q-0002Yu-Pv for guix-patches@gnu.org; Sun, 09 Oct 2022 13:22:57 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16]) by michel.telenet-ops.be with bizsmtp id VtNm2800D20ykKC06tNm3k; Sun, 09 Oct 2022 19:22:48 +0200 From: Maxime Devos To: guix-patches@gnu.org Subject: [core-updates] gnu: dbm: Regenerate Autotools files. Date: Sun, 9 Oct 2022 19:22:44 +0200 Message-Id: <20221009172244.26683-1-maximedevos@telenet.be> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1665336168; bh=hV9q1prn4lempa1Qtp1tyTFQ7vBMJ3QcJWnpQZ7kpaY=; h=From:To:Cc:Subject:Date; b=ltCbsULuzw1nteFfkBXeg1QIFskIMis+x4I3JG/XhG2NwR52YrXJEd20A9W4HYxMx ifgvdNJjzISrp74YtT6evy113WJ+PUXlDx+xN5l4tVeYqAePP+hAgdvK31Loi7SzMh 557aHhOnRAh3hXWerNYP5Qfy5DVWASxTKhi6VWvEJeHHlNrN3kqREXN+uJoW8emOZH /Lud/ZRNnzUujCnY+k3OUo0nCVieDqCkVm7hrSQQmmlf0XhwWgmxWMxAoh+hiXBRaB 0+1jW0VrBlllOp//uDQURViANcKOJQn3qP5cTyANT4BXEP2l8t1PWQK/4pw6zIDvAM bMrrlKVXgcMfg== Received-SPF: pass client-ip=2a02:1800:110:4::f00:18; envelope-from=maximedevos@telenet.be; helo=michel.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: submit Cc: Maxime Devos 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 (--) This way, overriding the 'detection of 'build' isn't needed anymore. I switched from 'config' to 'automake' to prevent a hang of './pre-inst-env guix build bdb@4.8' with ever-increasing memory usage, presumably indicating a cycle. Build-tested on a x86_64-linux with: $ ./pre-inst-env guix build --system=x86_64-linux bdb@4 bdb@5 bdb@6 $ ./pre-inst-env guix build --system=x86_64-linux --target=aarch64-linux-gnu bdb@4 bdb@5 bdb@6 It could not be tested with a non-x86_64 system (aarch64-linux) because of an (presumably unrelated) coreutils build failure. * gnu/packages/dbm.scm (bdb-snippet): New procedure. (bdb-4.8)[source]: Add the snippet. [arguments]: Copy "config.sub"," "config.guess" and "install-sh" in a new 'boostrap phase', this time from automake. Move macros from aclocal_java to aclocal. Move configure flags to #:configure-flags. Remove 'configure' phase, instead add a pre-configure phase for adjusting Makefile.in and use '#:out-of-source' to perform an out-of-source build. Run "s_config" to fix up the version numbers. (bdb-5.3)[source]: Inherit from bdb-4.8's source, to get the snippet. (bdb-6)[source]: Likewise, and be careful to not add a patch. --- gnu/packages/dbm.scm | 149 ++++++++++++++++++++++++------------------- 1 file changed, 82 insertions(+), 67 deletions(-) diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm index 8c49094697..4a8acb7ab6 100644 --- a/gnu/packages/dbm.scm +++ b/gnu/packages/dbm.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2018 Mark H Weaver ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2021 Leo Le Bouter -;;; Copyright © 2021 Maxime Devos +;;; Copyright © 2021, 2022 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +29,7 @@ (define-module (gnu packages dbm) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix utils) #:use-module (ice-9 match)) @@ -38,6 +39,29 @@ (define-module (gnu packages dbm) ;;; This module has been separated from (gnu packages databases) to reduce the ;;; number of module references for core packages. +(define bdb-snippet + ;; Remove some bundled and generated files. Some of the old + ;; Autotools files are too old for some architectures + ;; (e.g. aarch64 and powerpc64le). + #~(begin + (for-each delete-file-recursively + '("dist/configure" + "dist/config.sub" + "dist/config.guess" + "dist/install-sh" + "dist/ltmain.sh" + "dist/aclocal/libtool.m4" + "dist/aclocal/ltoptions.m4" + "dist/aclocal/ltsugar.m4" + "dist/aclocal/ltversion.m4" + "dist/aclocal/lt~obsolete.m4")) + (substitute* "dist/configure.ac" + ;; Placate 'automake'. + (("AC_DEFINE\\(DB_WIN32\\)") + "AC_DEFINE(DB_WIN32, [], [Description])") + (("AC_DEFINE\\(HAVE_SYSTEM_INCLUDE_FILES\\)") + "AC_DEFINE(HAVE_SYSTEM_INCLUDE_FILES, [], [Description])")))) + (define-public bdb-4.8 (package (name "bdb") @@ -51,76 +75,65 @@ (define-public bdb-4.8 (sha256 (base32 "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0")) - (patches (search-patches "bdb-5.3-atomics-on-gcc-9.patch")))) + (patches (search-patches "bdb-5.3-atomics-on-gcc-9.patch")) + (modules '((guix build utils) + (srfi srfi-1))) + (snippet bdb-snippet))) (build-system gnu-build-system) (outputs '("out" ; programs, libraries, headers "doc")) ; 94 MiB of HTML docs (arguments - `(#:tests? #f ; no check target available - #:disallowed-references ("doc") - #:phases - (modify-phases %standard-phases - ;; The configure script is too old to recognise aarch64 and - ;; powerpc64le as valid architectures. The trick below works - ;; for "--build", but not for "--host", so update config.sub. - ,@(if (and (%current-target-system) - (or (target-ppc64le? (%current-target-system)) - (target-aarch64? (%current-target-system)))) - `((add-after 'unpack 'update-config.sub - (lambda* (#:key native-inputs #:allow-other-keys) - (delete-file "dist/config.sub") - (symlink - (search-input-file native-inputs "/bin/config.sub") - "dist/config.sub")))) - '()) - (replace 'configure - (lambda* (#:key target outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (doc (assoc-ref outputs "doc"))) - ;; '--docdir' is not honored, so we need to patch. - (substitute* "dist/Makefile.in" - (("docdir[[:blank:]]*=.*") - (string-append "docdir = " doc "/share/doc/bdb"))) - - (chdir "build_unix") - (invoke "../dist/configure" - (string-append "--prefix=" out) - (string-append "CONFIG_SHELL=" (which "bash")) - (string-append "SHELL=" (which "bash")) - - ;; Bdb's config script doesn't recognize very many - ;; architectures, and is a dependant on the 'config' - ;; package, so we manually define the build target. - ,@(match (%current-system) - ("aarch64-linux" - '("--build=aarch64-unknown-linux-gnu")) - ("powerpc64le-linux" - '("--build=powerpc64le-unknown-linux-gnu")) - ("riscv64-linux" - '("--build=riscv64-unknown-linux-gnu")) - (_ '())) + (list #:tests? #f ; no check target available + #:disallowed-references '("doc") + #:out-of-source? #true + #:configure-flags + #~(list + ;; Remove 7 MiB of .a files. + "--disable-static" - ,@(if (%current-target-system) ; cross building - '((string-append "--host=" target)) - '()) + ;; The compatibility mode is needed by some packages, + ;; notably iproute2. + "--enable-compat185" - ;; Remove 7 MiB of .a files. - "--disable-static" - - ;; The compatibility mode is needed by some packages, - ;; notably iproute2. - "--enable-compat185" - - ;; The following flag is needed so that the inclusion - ;; of db_cxx.h into C++ files works; it leads to - ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h. - "--enable-cxx"))))))) - (native-inputs - (if (and (%current-target-system) - (or (target-ppc64le? (%current-target-system)) - (target-aarch64? (%current-target-system)))) - `(("config" ,config)) ; for config.sub - '())) + ;; The following flag is needed so that the inclusion + ;; of db_cxx.h into C++ files works; it leads to + ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h. + "--enable-cxx") + #:phases + #~(modify-phases %standard-phases + (replace 'bootstrap + (lambda* (#:key inputs native-inputs outputs + #:allow-other-keys #:rest arguments) + (with-directory-excursion "dist" + (for-each (lambda (x) + (install-file x "aclocal")) + (find-files "aclocal_java")) + (apply (assq-ref %standard-phases 'bootstrap) arguments) + (let ((automake-files (search-input-directory + (or native-inputs inputs) + "share/automake-1.16"))) + (define (replace file) + (symlink (string-append automake-files "/" file) file)) + (for-each replace '("config.sub" "config.guess" + "install-sh")))))) + (add-before 'configure 'pre-configure + (lambda _ + (chdir "dist") + ;; '--docdir' is not honored, so we need to patch. + (substitute* "Makefile.in" + (("docdir[[:blank:]]*=.*") + (string-append "docdir = " #$output:doc + "/share/doc/bdb"))) + ;; Replace __EDIT_DB_VERSION__... by actual version numbers. + ;; s_config is responsible for this, but also runs autoconf + ;; again, so patch out the autoconf bits. + (substitute* "s_config" + (("^.*(aclocal|autoconf|autoheader|config\\.hin).*$") "") + (("^.*auto4mte.*$") "") + (("rm (.*) configure") "") + (("chmod (.*) config.guess(.*)$") "")) + (invoke "sh" "s_config")))))) + (native-inputs (list autoconf automake libtool)) (synopsis "Berkeley database") (description "Berkeley DB is an embeddable database allowing developers the choice of @@ -135,7 +148,7 @@ (define-public bdb-5.3 (name "bdb") (version "5.3.28") (source (origin - (method url-fetch) + (inherit (package-source bdb-4.8)) (uri (string-append "https://download.oracle.com/berkeley-db/db-" version ".tar.gz")) (sha256 @@ -149,12 +162,14 @@ (define-public bdb-6 (name "bdb") (version "6.2.32") (source (origin + (inherit (package-source bdb-4.8)) (method url-fetch) (uri (string-append "https://download.oracle.com/berkeley-db/db-" version ".tar.gz")) (sha256 (base32 - "1yx8wzhch5wwh016nh0kfxvknjkafv6ybkqh6nh7lxx50jqf5id9")))) + "1yx8wzhch5wwh016nh0kfxvknjkafv6ybkqh6nh7lxx50jqf5id9")) + (patches '()))) ;; Starting with version 6, BDB is distributed under AGPL3. Many individual ;; files are covered by the 3-clause BSD license. (license (list license:agpl3+ license:bsd-3)))) base-commit: ccc2658e2a111590ec25e308946e47a24d357785 prerequisite-patch-id: 87e197146284fb770478e0c2d73027e68ee3db6d prerequisite-patch-id: 32ea6453c34258e3ac8a8766aa14ebb5fe1f5f88 prerequisite-patch-id: b359f1dbbcd6374492720ebd67b0212bd3dfe246 -- 2.37.3 ------------=_1705783082-15963-1--