GNU bug report logs

#60849 [PATCH core-updates 0/4] Enable cross-Compilation for python-pycryptodome

PackageSource(s)Maintainer(s)
guix-patches PTS Buildd Popcon
Full log

Message #11 received at 60849@debbugs.gnu.org (full text, mbox, reply):

Received: (at 60849) by debbugs.gnu.org; 16 Jan 2023 05:14:29 +0000
From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 16 00:14:29 2023
Received: from localhost ([127.0.0.1]:60168 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1pHHpE-0004er-Mo
	for submit@debbugs.gnu.org; Mon, 16 Jan 2023 00:14:29 -0500
Received: from mail-qt1-f169.google.com ([209.85.160.169]:36630)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@gmail.com>) id 1pHHpA-0004eE-L1
 for 60849@debbugs.gnu.org; Mon, 16 Jan 2023 00:14:25 -0500
Received: by mail-qt1-f169.google.com with SMTP id x5so256192qti.3
 for <60849@debbugs.gnu.org>; Sun, 15 Jan 2023 21:14:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=sGFpH92DfajF9VzUNmTjNiF6+DLgBRCJAdWPA4itJvE=;
 b=KJDhiwsNgBycJxtLuOALAF318VxfrFOk/swIHZsKGL3D0dmJRlw38nntIQL4Qkb4uW
 q/ZuwaOf3q8NYGjpjHT6yQ7S37XGwLUiiUr+xZfyGS709aSpyDx6h6hxDZNwvdjxIU4M
 gURS1dU48K2M3hKGyOSrLObabOLjXSwBIOJUjV2Mq4Wl7TfF+kcAwlFz1T9qA7st26RQ
 k3Is0tF/V3w0M4PnIzPT7j7Nk6n48Hnp/2M7Bd4IVott/ZmSq0/s9atl8/VMszacXfQy
 IjKAAI7T/Lfccfun8EgUxtRLbU90qmkUgpgTcoINIXZvxOeyUCNiLEpBVDF6crBiDuMG
 8o8A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=sGFpH92DfajF9VzUNmTjNiF6+DLgBRCJAdWPA4itJvE=;
 b=kJPfPf505OC01Cink/W2b8Wp5Cz3KW9j9bQ0oqOdOYRGCtxdFFQShIPMp4XVYw5NX+
 A2BaB3clfL5EMB9MPGbuvNIgtxtaKQwMhdvM+Qgp0IUMPuRL1vW/PjaiJuWNo63XGvkU
 WEOkOtaakA7YxzHINVU/qV/BM437QxXeXjlc9mJcKpn1SVNhzDsoc4xm1NN/18NiDm8z
 7ZIIm2V3DvZemEpxY07FbDt2ZcLc3Vyg5GRrRkf8JxXOIt9SONQfYOAfYdbk8mau2hpc
 sOlx3n4smBrZq170k3s/qQ7njlfhrrQx8OUvWeOEFai6dXC4TIxmEeyg0csV3OJ4akJa
 nsbQ==
X-Gm-Message-State: AFqh2kpMxJjYw+mEAn9lZKcXiCnIC2PGHWH7W5RpHS8bITU2t+Aw7e0A
 ylx2vZKZDs6vzegj0DzTYdtXNRoFLbveDq1I
X-Google-Smtp-Source: AMrXdXtyIxQb1jWCWv21FK9tbgnnd9lei0uk/F1cWPN2ubbSvcJ6lOwzBtzOJbSNFNH/q3ykQVQCfA==
X-Received: by 2002:a05:622a:4c16:b0:3b6:2d75:9b07 with SMTP id
 ey22-20020a05622a4c1600b003b62d759b07mr7431841qtb.26.1673846059033; 
 Sun, 15 Jan 2023 21:14:19 -0800 (PST)
Received: from localhost.localdomain (dsl-10-130-209.b2b2c.ca. [72.10.130.209])
 by smtp.gmail.com with ESMTPSA id
 em8-20020a05622a438800b003a82ca4e81csm8084590qtb.80.2023.01.15.21.14.18
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 15 Jan 2023 21:14:18 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 60849@debbugs.gnu.org
Subject: [PATCH core-updates 2/4] gnu: libtomcrypt: Update to 1.18.2-0.29986d0.
Date: Mon, 16 Jan 2023 00:13:37 -0500
Message-Id: <20230116051339.27113-3-maxim.cournoyer@gmail.com>
X-Mailer: git-send-email 2.38.1
In-Reply-To: <20230116051339.27113-2-maxim.cournoyer@gmail.com>
References: <20230116051339.27113-2-maxim.cournoyer@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 60849
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
This change makes it possible to cross-compile libtomcrypt.

* gnu/packages/multiprecision.scm (libtomcrypt): Update to 1.18.2-0.29986d0.
[outputs]: Delete field.
[source]: Fetch from git.  Delete snippet and modules field.
[build-system]: Switch to cmake-build-system.
[phases]: Delete all phase.  Add patch-libtomcrypt.pc.in phase.
[native-inputs]: Delete field.
---

 gnu/packages/multiprecision.scm | 106 +++++++++++---------------------
 1 file changed, 35 insertions(+), 71 deletions(-)

diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm
index c8b4639ed7..6acf22c6d6 100644
--- a/gnu/packages/multiprecision.scm
+++ b/gnu/packages/multiprecision.scm
@@ -364,80 +364,44 @@ (define-public tomsfastmath
     (license public-domain)))
 
 (define-public libtomcrypt
-  (package
-    (name "libtomcrypt")
-    (version "1.18.2")
-    (outputs '("out" "static"))
-    (source
-      (origin
-        (method url-fetch)
-        (uri (string-append "https://github.com/libtom/libtomcrypt"
-                            "/releases/download/v" version
-                            "/crypt-" version ".tar.xz"))
-        (sha256
-         (base32
-          "113vfrgapyv72lalhd3nkw7jnks8az0gcb5wqn9hj19nhcxlrbcn"))
-        (modules '((guix build utils)))
-        (snippet
-         '(begin
-            ;; Patch CVE-2019-17362
-            ;; https://github.com/libtom/libtomcrypt/commit/25c26a3b7a9ad8192ccc923e15cf62bf0108ef94
-            (substitute* "src/pk/asn1/der/utf8/der_decode_utf8_string.c"
-              (("z > 4") "z == 1 || z > 4"))
-            #t))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (delete 'configure) ; no configure
-         (add-after 'unpack 'prepare-build
-           (lambda _
-             ;; We want the shared library by default so force it to be the
-             ;; default makefile target.
-             (delete-file "makefile")
-             (symlink "makefile.shared" "makefile")
-             ;; We link to libtommath, so we need to add it to the pc file
-             (substitute* "libtomcrypt.pc.in"
-               (("-ltomcrypt") "-ltomcrypt -ltommath"))
-             #t))
-         (add-after 'build 'build-static
-           (lambda* (#:key make-flags #:allow-other-keys)
-             (apply invoke "make" "-f" "makefile.unix" make-flags)))
-         (replace 'check
-           (lambda* (#:key test-target make-flags #:allow-other-keys)
-             (apply invoke "make" "-f" "makefile.unix" test-target make-flags)
-             (invoke "./test")))
-         (add-after 'install 'install-static-library
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (static (assoc-ref outputs "static")))
-               (mkdir-p (string-append static "/lib"))
-               (mkdir-p (string-append static "/include"))
-               (rename-file (string-append out "/lib/libtomcrypt.a")
-                            (string-append static "/lib/libtomcrypt.a"))
-               (copy-recursively (string-append out "/include")
-                                 (string-append static "/include"))
-               #t))))
-       #:test-target "test"
-       #:make-flags
-       (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
-             "CFLAGS += -DLTM_DESC -DUSE_LTM"
-             (string-append "EXTRALIBS="
-                            (search-input-file %build-inputs
-                                               "/lib/libtommath.so"))
-             (string-append "CC=" ,(cc-for-target)))))
-    (native-inputs
-     (list libtool))
-    (inputs
-     (list libtommath))
-    (home-page "https://www.libtom.net/LibTomCrypt/")
-    (synopsis "Cryptographic toolkit")
-    (description "LibTomCrypt is a fairly comprehensive, modular and portable
+  ;; Use the latest commit, as it contains a new CMake build system capable of
+  ;; cross-compilation.
+  (let ((revision "0")
+        (commit "29986d04f2dca985ee64fbca1c7431ea3e3422f4"))
+    (package
+      (name "libtomcrypt")
+      (version (git-version "1.18.2" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/libtom/libtomcrypt")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "02x0h3lcl2s4zykiqwdccj8cxsbilg0lspxn8r1gmhxc3k9bgk88"))))
+      (build-system cmake-build-system)
+      (arguments
+       (list
+        #:configure-flags #~(list "-DBUILD_TESTING=ON"
+                                  "-DBUILD_SHARED_LIBS=ON")
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'patch-libtomcrypt.pc.in
+              (lambda _
+                ;; We link to libtommath, so we need to add it to the pc file
+                ;; (see: https://github.com/libtom/libtomcrypt/issues/610).
+                (substitute* "libtomcrypt.pc.in"
+                  (("-ltomcrypt") "-ltomcrypt -ltommath")))))))
+      (inputs (list libtommath))
+      (home-page "https://www.libtom.net/LibTomCrypt/")
+      (synopsis "Cryptographic toolkit")
+      (description "LibTomCrypt is a fairly comprehensive, modular and portable
 cryptographic toolkit that provides developers with a vast array of well known
 published block ciphers, one-way hash functions, chaining modes, pseudo-random
 number generators, public key cryptography and a plethora of other routines.")
-    (properties `((lint-hidden-cve . ("CVE-2019-17362"))))
-    (license unlicense)))
+      (properties `((lint-hidden-cve . ("CVE-2019-17362"))))
+      (license unlicense))))
 
 (define-public libtommath
   ;; Use the latest commit, as it contains a new CMake build system capable of
-- 
2.38.1





Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Mon Dec 23 01:49:04 2024; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.