From patchwork Sat Dec 18 20:49:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 35450 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 E443927BBE9; Sat, 18 Dec 2021 20:56:33 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 157EF27BBE9 for ; Sat, 18 Dec 2021 20:56:33 +0000 (GMT) Received: from localhost ([::1]:34456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mygkq-0006Bi-77 for patchwork@mira.cbaines.net; Sat, 18 Dec 2021 15:56:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myggW-0006sp-Gt for guix-patches@gnu.org; Sat, 18 Dec 2021 15:52:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60950) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1myggW-0003wf-8H for guix-patches@gnu.org; Sat, 18 Dec 2021 15:52:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1myggW-0004vt-5w for guix-patches@gnu.org; Sat, 18 Dec 2021 15:52:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52610] [PATCH 40/42] gnu: sequoia: Change into a meta-package and update to 1.6.0. Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 18 Dec 2021 20:52:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52610 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52610@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163986071318907 (code B ref -1); Sat, 18 Dec 2021 20:52:04 +0000 Received: (at submit) by debbugs.gnu.org; 18 Dec 2021 20:51:53 +0000 Received: from localhost ([127.0.0.1]:44257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myggF-0004uc-Be for submit@debbugs.gnu.org; Sat, 18 Dec 2021 15:51:53 -0500 Received: from lists.gnu.org ([209.51.188.17]:51454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mygg9-0004u3-UL for submit@debbugs.gnu.org; Sat, 18 Dec 2021 15:51:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mygg9-0005dO-0Z for guix-patches@gnu.org; Sat, 18 Dec 2021 15:51:41 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:52555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mygg6-0003il-OF for guix-patches@gnu.org; Sat, 18 Dec 2021 15:51:40 -0500 Received: from hermia.goebel-consult.de ([46.87.136.58]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mw9oq-1mg3pV0YHU-00s83I for ; Sat, 18 Dec 2021 21:51:29 +0100 Received: from thisbe.fritz.box (thisbe.fritz.box [192.168.110.24]) by hermia.goebel-consult.de (Postfix) with ESMTP id 0DEE66615C; Sat, 18 Dec 2021 21:50:13 +0100 (CET) From: Hartmut Goebel Date: Sat, 18 Dec 2021 21:49:51 +0100 Message-Id: <7a938985ee6d71c3ecdd81b6e5fc494b2642e1d5.1639859823.git.h.goebel@crazy-compilers.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:DnE+rRv6yMX6MpkCw9yUDdSeZae83HfrwVDjoOJtpL+Q1iE7MMa mRZ/NHbutgCRWzf32v3VjytZ/vpWyDBiG5gi3D23GuL14JIeiSELL3bQ5z7wWOQ30WmN8Mw czsBMDd/HuiGd4jKNaqDWvkjOP8KXlo+McwV2rtIj6Z3OMxfybR1eXmuB15PBYEy7D9Y6ZB QOjpi/6VJS/vFgBYJ3rog== X-UI-Out-Filterresults: notjunk:1;V03:K0:BYJLparpHmU=:UB/P8/a5O4aN/mPiT72sFi 6/htL1b7Ew2++7kwKbHMoFyfAeLgs7PuiOCj0hGdyccJzeH1OmyWZgMYFEHElUGh1K5uxEk32 Vxoh5JZFaS+CqbtZDrLcrP/OoU0IpHaXREpCeXHbML0BzjdH+SJVccvWcbMqxI/xIj1iFTk/t crcMVukvyMWD43/dQK6YwwvLsCwiN1CtmN+8EWDEriONklBr5G1NzIYZOgNB1LLY96xyc2ZQD 5KIisUY90otvO+Oe9KsbStvDsO1a/xi4xju+71kddp9jCP6u+z5kLBshFnFKClG5pAbATdlsz PquRgx6KrTxuW3kM8s9EcKTN7aAxl6Z51uEdiwsfc+m7ZlIsZJ4RsiFJ4Gt+Je+cVyVZyLO2o /n7RFiSthijuS1iXvvds950LTawnpqhdVork6RfsVGLggfqLfNqt6VECtddepfCbFkUBfIshG lqwpsnZNAl+AcpEj337AFXD7/QPLbofLThvimPwEJsSlX/5ZePuSVm0Wlk/OoYa9V5LKdcVbb 5qNDc6n1xEatr6ORF05eneYn5/TDNPIZ5ddLSPUe6P1wWSFEVkaQCftOSHRxdV/M9gPuqp/Z+ NfKH5cMLu01WbhdKTBUjRdCTP9hKS5qICDkWTLajgU2RyhcKCg0rMAXwBunMkjGAn90cfLV4t KshvUYkMWTC9tBSTLEqhLdDlA2zjXZFNhCNQZSfMULsY3SZRpZnWnrUorXJxQ1ZW+AZ62bBgO ZLu1eZScVjETwmbP Received-SPF: none client-ip=212.227.126.187; envelope-from=h.goebel@crazy-compilers.com; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/sequoia.scm (sequoia): Update to 1.6.0. Change into a meta-package for all sequoia related binaries. [source, native-inputs]: Remove. [build-system]: Use trivial-build-system. [inputs]: Replace with list of packages to be merged. [arguments]: Replace by a trivial build step. [synopsis, description]: Adopt to being a meta-package. [license]: Adjust to license change of project. --- gnu/packages/sequoia.scm | 211 ++++++++------------------------------- 1 file changed, 40 insertions(+), 171 deletions(-) diff --git a/gnu/packages/sequoia.scm b/gnu/packages/sequoia.scm index 811beb823a..16488ca073 100644 --- a/gnu/packages/sequoia.scm +++ b/gnu/packages/sequoia.scm @@ -19,12 +19,14 @@ (define-module (gnu packages sequoia) #:use-module (guix build-system cargo) + #:use-module (guix build-system trivial) #:use-module (guix download) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages) + #:use-module (gnu packages base) ; glibc #:use-module (gnu packages check) ;; python-pytest #:use-module (gnu packages crates-io) #:use-module (gnu packages libffi) ;; python-cffi @@ -35,8 +37,6 @@ #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) ;; python-setuptools #:use-module (gnu packages rust) - #:use-module (gnu packages serialization) - #:use-module (gnu packages sqlite) #:use-module (gnu packages tls)) (define-public rust-sequoia-autocrypt-0.23 @@ -469,176 +469,45 @@ even go away.") (define-public sequoia (package (name "sequoia") - (version "1.1.0") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://gitlab.com/sequoia-pgp/sequoia.git") - (commit (string-append "openpgp/v" version)))) - (sha256 - (base32 "0knkm0nw1h4ww51vks4jnnp1yc45llfi7j0i70f6vf2bcknnbmci")) - (file-name (git-file-name name version)))) - (build-system cargo-build-system) + (version "1.6.0") + (source #f) + (build-system trivial-build-system) (outputs '("out" "python")) - (native-inputs - (list clang pkg-config python-pytest python-pytest-runner - python-wrapper)) (inputs - (list capnproto - gmp - nettle - openssl - python - python-cffi - sqlite)) + `(("glibc" ,glibc) ;; for ldconfig in make-dynamic-linker-cache + ("libsequoia" ,libsequoia) + ("libsequoia:python" ,libsequoia "python") + ("sequoia-sq" ,sequoia-sq) + ("sequoia-sqv" ,sequoia-sqv))) (arguments - `(#:tests? #f ;; building the tests requires 9.7GB total - #:rust ,rust - #:cargo-inputs - (("rust-anyhow" ,rust-anyhow-1) - ("rust-backtrace" ,rust-backtrace-0.3) - ("rust-base64" ,rust-base64-0.13) - ;;("rust-buffered-reader" included - ("rust-bzip2" ,rust-bzip2-0.4) - ("rust-capnp" ,rust-capnp-0.13) - ("rust-capnp-rpc" ,rust-capnp-rpc-0.13) - ("rust-capnpc" ,rust-capnpc-0.13) - ("rust-chrono" ,rust-chrono-0.4) ;; for sqv, sop - ("rust-clap" ,rust-clap-2) ;; for sqv - ("rust-colored" ,rust-colored-1.9.1) - ("rust-crossterm" ,rust-crossterm-0.13) - ("rust-ctor" ,rust-ctor-0.1) - ("rust-dirs" ,rust-dirs-2) - ("rust-dyn-clone" ,rust-dyn-clone-1) - ("rust-ed25519-dalek" ,rust-ed25519-dalek-1) - ("rust-eax" ,rust-eax-0.3) - ;;("rust-failure" included - ("rust-filetime" ,rust-filetime-0.2) - ("rust-flate2" ,rust-flate2-1) - ("rust-fs2" ,rust-fs2-0.4) - ("rust-futures" ,rust-futures-0.3) - ("rust-futures-util" ,rust-futures-util-0.3) - ("rust-http" ,rust-http-0.2) - ("rust-hyper" ,rust-hyper-0.13) - ("rust-hyper-tls" ,rust-hyper-tls-0.4) - ("rust-idna" ,rust-idna-0.2) - ("rust-itertools" ,rust-itertools-0.9) ;; for sq - ("rust-lalrpop" ,rust-lalrpop-0.19) - ("rust-lalrpop-util" ,rust-lalrpop-util-0.19) - ("rust-lazy-static" ,rust-lazy-static-1) - ("rust-libc" ,rust-libc-0.2) - ("rust-memsec" ,rust-memsec-0.6) - ("rust-native-tls" ,rust-native-tls-0.2) - ("rust-nettle" ,rust-nettle-7) - ("rust-num-bigint-dig" ,rust-num-bigint-dig-0.6) - ("rust-parity-tokio-ipc" ,rust-parity-tokio-ipc-0.4) - ("rust-percent-encoding" ,rust-percent-encoding-2) - ("rust-prettytable-rs" ,rust-prettytable-rs-0.8) ;; for sq - ("rust-proc-macro2" ,rust-proc-macro2-1) - ("rust-quickcheck" ,rust-quickcheck-0.9) - ("rust-rand" ,rust-rand-0.7) - ("rust-regex" ,rust-regex-1) - ("rust-rusqlite" ,rust-rusqlite-0.24) - ("rust-sha1collisiondetection" ,rust-sha1collisiondetection-0.2) - ("rust-socket2", rust-socket2-0.3) - ("rust-structopt" ,rust-structopt-0.3) ;; for sop - ("rust-tempfile" ,rust-tempfile-3) ;; for sq - ("rust-thiserror" ,rust-thiserror-1) - ("rust-tokio" ,rust-tokio-0.2) - ("rust-tokio-core" ,rust-tokio-core-0.1) - ("rust-unicode-normalization" ,rust-unicode-normalization-0.1) - ("rust-url" ,rust-url-2) - ("rust-win-crypto-ng" ,rust-win-crypto-ng-0.4) - ("rust-winapi" ,rust-winapi-0.3) - ("rust-zbase32" ,rust-zbase32-0.1)) - #:cargo-development-inputs - (("rust-assert-cli" ,rust-assert-cli-0.6) ;; dev-dep for for sq, sqv - ("rust-bindgen" ,rust-bindgen-0.51) ;; FIXME for nettle-sys and rusqlite - ;;("rust-lalrpop" ,rust-lalrpop-0.19) - ("rust-quickcheck" ,rust-quickcheck-0.9) - ("rust-rand" ,rust-rand-0.7) - ("rust-rpassword" ,rust-rpassword-5)) - #:phases - (modify-phases %standard-phases - ;; Run make instead of using the rust build system, as - ;; suggested by the installation instructions - (replace 'build (lambda _ (invoke "make" "build-release") #t)) - (delete 'package) ;; cargo can't package a multi-crate workspace - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (if tests? - (invoke "make" "check") - #t))) - (replace 'install (lambda _ (invoke "make" "install") #t)) - (add-after 'unpack 'fix-rand-dependency - (lambda _ - (substitute* "ipc/Cargo.toml" - ;; required: enable rand::rngs::OsRng in rand >= 0.8 - (("(^rand =.*,) default-features = false(.*)" _ a b) - (string-append a " features = [\"getrandom\"]" b))) - #t)) - (add-after 'unpack 'fix-permissions - (lambda _ - (chmod "sq/src/sq-usage.rs" #o644) - (chmod "sqv/src/sqv-usage.rs" #o644) - #t)) - (add-after 'unpack 'fix-environment - (lambda* (#:key outputs #:allow-other-keys) - ;; adjust prefix - (setenv "PREFIX" (assoc-ref outputs "out")) - ;; fix install script detection - (setenv "INSTALL" "install") - #t)) - (add-after 'unpack 'fix-fo-python-output - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (pyout (assoc-ref outputs "python"))) - (substitute* "ffi/lang/python/Makefile" - ;; adjust prefix for python package - (("PREFIX\\s*\\??=.*") - (string-append "PREFIX = " pyout "\n")) - ;; fix rpath to include the main package - (("\\WLDFLAGS=" text) - (string-append text "'-Wl,-rpath=" out "/lib '")) - ;; make setuptools install into the prefix, see - ;; guix/build/python-build-system.scm for explanation - (("\\ssetup.py\\s+install\\s") - " setup.py install --root=/ --single-version-externally-managed ")) - #t))) - (add-after 'unpack 'fix-pkgconfig-file-substitutes - ;; preempt Makefiles replacing PREFIX by pwd - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (substitute* "ffi/sequoia.pc.in" - (("PREFIX") out)) - (substitute* "openpgp-ffi/sequoia-openpgp.pc.in" - (("PREFIX") out)) - #t))) - (add-after 'unpack 'keep-SOURCE_DATE_EPOCH - (lambda _ - ;; preempt Makefiles replacing SOURCE_DATE_EPOCH - (substitute* "Makefile" - (("SOURCE_DATE_EPOCH\\s=" line) - (string-append "#" line))) - #t)) - (add-after 'unpack 'set-missing-env-vars - (lambda* (#:key inputs #:allow-other-keys) - ;; FIXME: why do we need to set this here? - (setenv "LIBCLANG_PATH" - (string-append (assoc-ref inputs "clang") "/lib")) - #t)) - (add-after 'unpack 'unpin-deps - (lambda _ - ;; As the comment in that file explains, upstream encourages - ;; unpinning, as the pinned version is only to make sure the crate - ;; compiles on older versions of rustc - (substitute* '("openpgp/Cargo.toml" "sq/Cargo.toml") - (("= \"=") "= \"")) - #t))))) + `(#:modules ((guix build utils) (guix build gnu-build-system) + (guix build gremlin) (guix elf)) + #:builder + (begin + (use-modules (guix build utils) (guix build gnu-build-system)) + (let ((make-dynamic-linker-cache + (assoc-ref %standard-phases 'make-dynamic-linker-cache)) + (ld.so.cache + (string-append (assoc-ref %outputs "out") "/etc/ld.so.cache"))) + (copy-recursively (assoc-ref %build-inputs "libsequoia") + (assoc-ref %outputs "out")) + (copy-recursively (assoc-ref %build-inputs "sequoia-sq") + (assoc-ref %outputs "out")) + (delete-file ld.so.cache) + (copy-recursively (assoc-ref %build-inputs "sequoia-sqv") + (assoc-ref %outputs "out")) + (delete-file ld.so.cache) + (copy-recursively (assoc-ref %build-inputs "libsequoia:python") + (assoc-ref %outputs "python")) + (setenv "PATH" + (string-append (getenv "PATH") ":" + (assoc-ref %build-inputs "glibc") "/sbin")) + (make-dynamic-linker-cache #:outputs %outputs) + #t)))) (home-page "https://sequoia-pgp.org") - (synopsis "New OpenPGP implementation") - (description "Sequoia is a new OpenPGP implementation. It consists of -several crates, providing both a low-level and a high-level API for dealing -with OpenPGP data.") - (license license:gpl2+))) + (synopsis "New OpenPGP implementation (meta-package)") + (description "Sequoia is a new OpenPGP implementation, written in Rust, +consisting of several Rust crates/packages. This Guix meta-package combines +these packages into a single one for convenience. Anyhow, you should not +depend other packages on this one avoid excessive compile-times for users.") + (license license:lgpl2.0+)))