From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id uMs9L9FalWYvMQAA62LTzQ:P1 (envelope-from ) for ; Mon, 15 Jul 2024 17:22:25 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id uMs9L9FalWYvMQAA62LTzQ (envelope-from ) for ; Mon, 15 Jul 2024 19:22:25 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1721064115; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=hxNmddq7VnxWMSgxL02L57CIxk3qY2eWYuXNyarJuFA=; b=FPabinUsKD+APYTxIlY6wjXoYnWxZtgLqQyZuiSy+TOMCjpuWyTd4TWvbVM/gnVTP9aJ9r 3/ZlBjqvMWHVGKPE/Or08wj491ZKFk5YzT5aIX49LOMk90fFJnQ5qI0D0j67i7sncqMKyo balgISG2nMnCt4d967oQ+5MMiKP5fs8z9rIh1+x+SvF/fQPetxOz66HeUCirpj0GifOqZk pIaDf63BIS+q0ZGsrXfb6+bNiwhh7gZequxt8VoNqGI6nt9A080oegj6ol2cnNas9LMc// LnKGdBeBmohz5qG9G7C3f+iGnxvyeMDiK2lLwPzXuRctdTiysIHbKvrQ34vRTA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1721064115; a=rsa-sha256; cv=none; b=Dku428yrFBbVd8mxOJbf0gOMkoPBYTFzS5ATLOJGGIeHi/9MQp91tISNXqr6+hMYwBIL1D rGhNALlX2Z6TPsvvcwI77zxeBF+PcmQvZw9bJ6Ovh+NQClukYIqMMo+idjuSjfpyUaicBA sjC696PtE2y2eM/fQnwPGEXg+RANY5w4AqTO34F7WF5XsfyMnpaGE+0G912Tb3AGqrOKIC a26qcp7gwAGSRPFXZDYssTpMGlU9KNnkOCfCyPVgq/jKZJJibJQoig8DfSXxop53vx2QQj beaAuj+xRmq52JHgScasjZeFEy5CaEc55sFg40jY+rNbGxS7/QwGW7lLw10a0g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3FB2C1F574 for ; Mon, 15 Jul 2024 19:21:55 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTPO6-0004Eo-Th; Mon, 15 Jul 2024 13:21:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sTPNt-0003VD-L7 for guix-devel@gnu.org; Mon, 15 Jul 2024 13:21:11 -0400 Received: from smtp84.cstnet.cn ([159.226.251.84] helo=cstnet.cn) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1sTPNq-0000Uy-8R for guix-devel@gnu.org; Mon, 15 Jul 2024 13:21:09 -0400 Received: from m (unknown [64.176.166.156]) by APP-05 (Coremail) with SMTP id zQCowAA3PbVuWpVmRlp5Aw--.21249S2; Tue, 16 Jul 2024 01:20:51 +0800 (CST) From: Zheng Junjie To: Ricardo Wurmus Cc: guix-devel@gnu.org, Efraim Flashner Subject: Re: [core-updates] Setting SSL_CERT_FILE in the build environment In-Reply-To: <87o76y39s1.fsf@elephly.net> (Ricardo Wurmus's message of "Mon, 15 Jul 2024 18:22:22 +0200") References: <877cdn3ph7.fsf@elephly.net> <87zfqi3gcv.fsf@elephly.net> <87sewa3eif.fsf@elephly.net> <87y162fxil.fsf@iscas.ac.cn> <87o76y39s1.fsf@elephly.net> Date: Tue, 16 Jul 2024 01:20:44 +0800 Message-ID: <87ttgqfu6r.fsf@iscas.ac.cn> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-CM-TRANSID: zQCowAA3PbVuWpVmRlp5Aw--.21249S2 X-Coremail-Antispam: 1UD129KBjvdXoW7Gr1fKrWUArW8uw15Cw13twb_yoWDJFcEgF WUAFnrK3y5JrWvka98tr95CFWxAry7AF45Xa40vrsrGFnY9rsxWasrCr1xGF1FyF4xtFn5 Kw1jgrW7JwnI9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbaxYjsxI4VWDJwAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUJVWUCwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVWUJVW8JwA2z4x0Y4vEx4A2jsIE14v26r1j6r4UM28EF7xvwVC2z2 80aVCY1x0267AKxVWUJVW8JwAa7VASzI0EjI02j7AqF2xKxVCjxxvEa2IrM2AIxVAIcxkE cVAq07x20xvEncxIr21le4C267I2x7xF54xIwI1l5I8CrVACY4xI64kE6c02F40Ex7xfMc Ij6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_ Jr0_Gr1lF7xvr2IY64vIr41lc2xSY4AK6IIF6r4l42xK82IYc2Ij64vIr41l4I8I3I0E4I kC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWU WwC2zVAF1VAY17CE14v26r1Y6r17MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr 0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWU JVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYx BIdaVFxhVjvjDU0xZFpf9x07j8DGOUUUUU= X-Originating-IP: [64.176.166.156] X-CM-SenderInfo: x2kh0wxmxqyx3h6l2u1dvotugofq/ Received-SPF: pass client-ip=159.226.251.84; envelope-from=zhengjunjie@iscas.ac.cn; helo=cstnet.cn 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 3FB2C1F574 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -8.50 X-Spam-Score: -8.50 X-TUID: SVAZ3Gz8zZPC --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Ricardo Wurmus writes: > Zheng Junjie writes: > >> This patch should fix it. > > Thank you for the patch! > >> From f41bf905cfb1395a53cfc0d79315148ac9ba0a79 Mon Sep 17 00:00:00 2001 >> Message-ID: >> From: Zheng Junjie >> Date: Tue, 16 Jul 2024 00:06:39 +0800 >> Subject: [PATCH] gnu: python-requests-next: Fix build. >> >> * gnu/packages/python-web.scm (python-requests-next): Fix build. >> [native-inputs]: Add nss-certs. >> [arguments]: Add set-SSL_CERT_FILE phase. >> <#:modules>: Adjust it. > > This seems rather complicated for something that may have to be added to > a number of packages. Would it make sense to create a package > containing this bundle file, set a search path specification, and add > that to the packages needing it? Indeed, please try these patches --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-nss-certs-for-test.patch Content-Transfer-Encoding: quoted-printable From=200ad24103d82147eece6bd546fc31a9f81e2d17fd Mon Sep 17 00:00:00 2001 Message-ID: <0ad24103d82147eece6bd546fc31a9f81e2d17fd.1721063765.git.zhengj= unjie@iscas.ac.cn> From: Zheng Junjie Date: Tue, 16 Jul 2024 01:13:35 +0800 Subject: [PATCH 1/2] gnu: Add nss-certs-for-test. * gnu/packages/certs.scm (nss-certs-for-test): New variable. Change-Id: Id808e058835556717a6585ecd86dd14d0d2a5039 =2D-- gnu/packages/certs.scm | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/certs.scm b/gnu/packages/certs.scm index 449be0b35a..e2de6b168b 100644 =2D-- a/gnu/packages/certs.scm +++ b/gnu/packages/certs.scm @@ -7,6 +7,7 @@ ;;; Copyright =C2=A9 2021 Maxim Cournoyer ;;; Copyright =C2=A9 2021 Efraim Flashner ;;; Copyright =C2=A9 2021 Raghav Gururajan +;;; Copyright =C2=A9 2024 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,6 +26,7 @@ =20 (define-module (gnu packages certs) #:use-module ((guix licenses) #:prefix license:) + #:use-module ((guix search-paths) #:select ($SSL_CERT_DIR $SSL_CERT_FILE= )) #:use-module (guix packages) #:use-module (guix utils) #:use-module (guix download) @@ -188,6 +190,49 @@ (define-public nss-certs (home-page "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/= NSS") (license license:mpl2.0))) =20 +(define-public nss-certs-for-test + (hidden-package + (package + (inherit nss-certs) + (name "nss-certs-for-test") + (source #f) + (build-system trivial-build-system) + (native-inputs (list nss-certs)) + (inputs '()) + (propagated-inputs '()) + (arguments + (list #:modules '((guix build utils) + (rnrs io ports) + (srfi srfi-26)) + #:builder + #~(begin + (use-modules (guix build utils) + (rnrs io ports) + (srfi srfi-26)) + (define certs-dir (string-append #$output "/etc/ssl/certs/= ")) + (define ca-files + (find-files (string-append #+(this-package-native-input + "nss-certs") + "/etc/ssl/certs") + (lambda (file stat) + (string-suffix? ".pem" file)))) + (define (concatenate-files files result) + "Make RESULT the concatenation of all of FILES." + (define (dump file port) + (display (call-with-input-file file get-string-all) po= rt) + (newline port)) + (call-with-output-file result + (lambda (port) + (for-each (cut dump <> port) files)))) + + (mkdir-p certs-dir) + (concatenate-files + ca-files (string-append certs-dir "/ca-certificates.crt")) + (for-each (cut install-file <> certs-dir) ca-files)))) + (native-search-paths + (list $SSL_CERT_DIR + $SSL_CERT_FILE))))) + (define-public le-certs (package (name "le-certs") base-commit: 05e6bd3efe1b03190839d2b91b09fa768c4ef83c =2D-=20 2.45.2 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0002-gnu-python-requests-next-Fix-build.patch Content-Transfer-Encoding: quoted-printable From=205417197e22dd7efa6732ea8de188f2f94bfc3ccc Mon Sep 17 00:00:00 2001 Message-ID: <5417197e22dd7efa6732ea8de188f2f94bfc3ccc.1721063765.git.zhengj= unjie@iscas.ac.cn> In-Reply-To: <0ad24103d82147eece6bd546fc31a9f81e2d17fd.1721063765.git.zheng= junjie@iscas.ac.cn> References: <0ad24103d82147eece6bd546fc31a9f81e2d17fd.1721063765.git.zhengj= unjie@iscas.ac.cn> From: Zheng Junjie Date: Tue, 16 Jul 2024 00:06:39 +0800 Subject: [PATCH 2/2] gnu: python-requests-next: Fix build. * gnu/packages/python-web.scm (python-requests-next): Fix build. [native-inputs]: Add nss-certs-for-test. Change-Id: I1592ef3329fdcd681df618bb12fbc205aa028be3 =2D-- gnu/packages/python-web.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index bca7da9139..9367dfba34 100644 =2D-- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -65,6 +65,7 @@ ;;; Copyright =C2=A9 2024 Sharlatan Hellseher ;;; Copyright =C2=A9 2024 normally_js ;;; Copyright =C2=A9 2024 Markku Korkeala +;;; Copyright =C2=A9 2024 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -94,6 +95,7 @@ (define-module (gnu packages python-web) #:use-module (gnu packages admin) #:use-module (gnu packages base) #:use-module (gnu packages bash) + #:use-module (gnu packages certs) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages curl) @@ -3614,6 +3616,8 @@ (define-public python-requests-next (base32 "0q5742pnibwy74169kacin3dmqg9jzmzk7qab5aq5caffcbm8djm")))) (build-system python-build-system) + (native-inputs + (list nss-certs-for-test)) (propagated-inputs (list python-certifi python-charset-normalizer =2D-=20 2.45.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfr6klGDOXiwIdX/bO1qpk+Gi3/AFAmaVWmwACgkQO1qpk+Gi 3/BQ7hAAtMqHr0pZGN3tUU/j3IQyTWhA6CdHYCzH9v4lbqvyjfIUPASEmupF6vCa xyjFOcfpMnknPViaN7dvqgvb14AXbgGj2Z3mrvJBvP+TalpmcKzTCTKuVzntN3uH ZLWAqc8LniKO1vf0HmpD6qf53R9I/12ToR/O/RAGb6761QqkOyw1yV2div7Sf8Xi Ja4A6RQd9+mGR7Hi5OtCw5Kd9lFQzsmia8opQ8K+OooWaewwI5SpwpgNkn5uzjQH W27BZBqvSUkwoPfX1VWZSu/MMIlQv0DQlaS9pmvoGjHbeBNjTL3vO/dwBgOzeXym +UAmTBhqYEB/q8vyI8B2IjlT1QXAGvYrgrU3TJiapHR5jR90tbg3/W9I6gcd9utq RLIP0qO6oNtQtbGsPa2xhJIgdt1LYYefC0aLO87hvprwTfLFyzXV+Ue8aKy3lSdJ 8mz8gzw+r6ol6likNEkgqbfawD5EgpZ3SfU5NXaWz9xaLSlEPApCF6qPpq52IjfJ BhXyt9/RrbZZIy9kiF8nBbyR/Kx3UubudV6gf4uYxc/hLgm8qSbn89DdVRuZ0Xhu MAYa7YcdwXEOwWUbSkwldq9fgKwVgk0BYiu3WgBbnxMw0kP3uUXmLZWn4MyD2CiL TB+Xl91cVk3bd7C+eGLUpm2Pvijr1/OMLqmanFvU/aqXzVJamg4= =DKdm -----END PGP SIGNATURE----- --==-=-=--