From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 IFQgOexJlWYBbwEAqHPOHw:P1 (envelope-from ) for ; Mon, 15 Jul 2024 16:10:21 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id IFQgOexJlWYBbwEAqHPOHw (envelope-from ) for ; Mon, 15 Jul 2024 18:10:21 +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=1721059820; 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=6fMikkPEWzQ/NVqmQIgaVvGRP2BnXAvZ+CWZ/fwUiqo=; b=TBk1xhFdnG37z4lIhFxYMqXv4vKw3ofBaQSYzioo3i9h8Jgpn6Fro5I1W2080XMUyf+nPT CBbeShVxUKPzH5iIPZzviWVBdTJPvZnUDZwnmBFNXtA7maxv8JaOw3bmBwNqbgDAGKs1kh Xqiasw+yYGibuZLdDaCW+xY5zjyLZNWezYQ+0q5Oi65wsb1pSG5qjRAv8BxONLeF3Ss3PC riNazRyyIokqy4sqHpj02ptjMUNcJXxV1O5clpnCgxh/Q8jhrhB6v0Px09juycsJqXUM7z yrfoE7PLOxSfe1I3s16+gu6VeYND6RMdvSJvRqBI3440MrIh9hqs2vjc860Y/g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1721059820; a=rsa-sha256; cv=none; b=p5GN/rm1qIsHOb432YMTn4PIbm2v6o3s7sqGUSeOltjRT7iFmwGqUkEh38NtTniinLfsV3 C9d8e8TIVCR4KkJideKTRlLTJbFOcDzT9w7jaQ4fQxzguDgUjKA2AspfprU+Xj+sUtmgPL SFbB6G6zkGlE2Jp96zOf3pIMoEBvTM3DrxIXmQAMhD6e1+iTgG2fPsSgT1By0gYvMolMJs nVZu34KfOdG4xnihlu7+sNCyZTONkSgoJNaAw6qL9FCbHAN7kGpHApsKBQbBfzioGuSB14 z2lgcUpSdVsdrpYaFKFTw2jt57nLf1fr7R1l4SrhJnsvicgQEu8s2zCbAuk8zA== 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 183271853A for ; Mon, 15 Jul 2024 18:10:19 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTOGO-000231-PT; Mon, 15 Jul 2024 12:09:20 -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 1sTOGJ-00022X-Cq for guix-devel@gnu.org; Mon, 15 Jul 2024 12:09:15 -0400 Received: from smtp81.cstnet.cn ([159.226.251.81] 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 1sTOGG-0001xI-9k for guix-devel@gnu.org; Mon, 15 Jul 2024 12:09:15 -0400 Received: from m (unknown [64.176.166.156]) by APP-03 (Coremail) with SMTP id rQCowABnbHyUSZVmbIHlFQ--.16184S2; Tue, 16 Jul 2024 00:08:57 +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: <87sewa3eif.fsf@elephly.net> (Ricardo Wurmus's message of "Mon, 15 Jul 2024 16:40:08 +0200") References: <877cdn3ph7.fsf@elephly.net> <87zfqi3gcv.fsf@elephly.net> <87sewa3eif.fsf@elephly.net> Date: Tue, 16 Jul 2024 00:08:50 +0800 Message-ID: <87y162fxil.fsf@iscas.ac.cn> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-CM-TRANSID: rQCowABnbHyUSZVmbIHlFQ--.16184S2 X-Coremail-Antispam: 1UD129KBjvdXoWruryfZFWxAw1UJr1UCr18uFg_yoWxtFgEgr 1rCFnaqr1DK3y7J3WSyr4UArW3XFyrWF4Utw4jvF45Gr1DCrs3Wwnxurn7AFn7ZFWrKrs5 Kr1vva93JrsI9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbaxYjsxI4VWDJwAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUJVWUCwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVWUJVW8JwA2z4x0Y4vEx4A2jsIE14v26r1j6r4UM28EF7xvwVC2z2 80aVCY1x0267AKxVWUJVW8JwAa7VASzI0EjI02j7AqF2xKxVCjxxvEa2IrM2AIxVAIcxkE cVAq07x20xvEncxIr21le4C267I2x7xF54xIwI1l5I8CrVACY4xI64kE6c02F40Ex7xfMc Ij6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_ Jr0_Gr1lF7xvr2IY64vIr41lc2xSY4AK6IIF6r1l42xK82IYc2Ij64vIr41l4I8I3I0E4I kC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWU WwC2zVAF1VAY17CE14v26r1Y6r17MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr 0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWU JVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYx BIdaVFxhVjvjDU0xZFpf9x07jrID7UUUUU= X-Originating-IP: [64.176.166.156] X-CM-SenderInfo: x2kh0wxmxqyx3h6l2u1dvotugofq/ Received-SPF: pass client-ip=159.226.251.81; 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: 183271853A X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -8.50 X-Spam-Score: -8.50 X-TUID: Nd8t+FQVnJoq --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Ricardo Wurmus writes: > Ricardo Wurmus writes: > >> Ricardo Wurmus writes: >> >>> How can we generate a certificate bundle in the build environment? >>> Apparently it is not enough to just add the nss-certs package. >> >> Apparently it is totally enough to just add the nss-certs package, and >> that's what I did in commit cf2fbc8f20e26c56d0e864f302a191a1d95962cd. > > I got confused by the fact that only python-requests-next fails to > build; the older python-requests has always been fine. > > So I reverted that commit and admit that I still don't have an answer to > the above question. Ideas welcome! This patch should fix it. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-python-requests-next-Fix-build.patch Content-Transfer-Encoding: quoted-printable From=20f41bf905cfb1395a53cfc0d79315148ac9ba0a79 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. Change-Id: I1592ef3329fdcd681df618bb12fbc205aa028be3 =2D-- gnu/packages/python-web.scm | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index bca7da9139..7cf54dc07a 100644 =2D-- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -94,6 +94,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 +3615,8 @@ (define-public python-requests-next (base32 "0q5742pnibwy74169kacin3dmqg9jzmzk7qab5aq5caffcbm8djm")))) (build-system python-build-system) + (native-inputs + (list nss-certs)) (propagated-inputs (list python-certifi python-charset-normalizer @@ -3621,7 +3624,37 @@ (define-public python-requests-next python-urllib3)) (arguments ;; FIXME: Some tests require network access. =2D '(#:tests? #f)) + (list #:tests? #f + #:modules `((guix build utils) + (guix build python-build-system) + (rnrs io ports) + (ice-9 ftw) + (srfi srfi-26)) + #:phases + #~(modify-phases %standard-phases + (add-before 'sanity-check 'set-SSL_CERT_FILE + ;; adjust from (guix profiles) ca-certificate-bundle + (lambda _ + (define (pem-file? file) + (string-suffix? ".pem" file)) + (define (ca-files top) + (let ((cert-dir (string-append top "/etc/ssl/certs"))) + (map (cut string-append cert-dir "/" <>) + (or (scandir cert-dir 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) + port) + (newline port)) + (call-with-output-file result + (lambda (port) + (for-each (cut dump <> port) files)))) + (concatenate-files (ca-files + #$(this-package-native-input + "nss-certs")) + "/tmp/ca-certificates.crt") + (setenv "SSL_CERT_FILE" "/tmp/ca-certificates.crt")))))) (home-page "http://python-requests.org/") (synopsis "Python HTTP library") (description base-commit: 05e6bd3efe1b03190839d2b91b09fa768c4ef83c =2D-=20 2.45.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfr6klGDOXiwIdX/bO1qpk+Gi3/AFAmaVSZIACgkQO1qpk+Gi 3/BlWA/+J7cNUjzKc4LXRoQkrkLEZttDuDLPG4+BJ4hIe9aPFDo22j4DvxkItovB KVcylpATeIApayvMyM+QZfF8cUvwjJnuNp1h4yMlToyZKXal8jgxLIiPCZkPU0Oi jOyAHQ38IQsocamOhKGF+JldGl5oVFkhdyF44lf6jALZhlsAhzXRyXR0m92mPdrx 1IbAG7ePj+0B3UqI+PO29w+mFm4QRB6ZG5gwcfyUY774yfou3cjsFIRQ0NaDph/b bjl1jKvrl/maEH0pLMw+lC+1wk37/mCgCQpjKeuclAPvbJU4m0Zi008dZsg/TtD+ yjrCV3hRlqA+Kjm4jgMIEokX1qzZRsfEa37WvRFr16MxTz08jw3+jeG9wdy0ZlFA m5AvgLPqMecFv4gbeinp4zLjsJzx71kxQydNKJ9XTr1zZCu/y27D1YAZFdy1duc3 Igop1HB9w0gwZ8OiDOoHGNUidB/9fVYMhtKgp4itBX4hCzzKx0TD6T1hZdYjFtT9 TYIIw+RXQ+Tt46Zauj7B8PYkJ5LHTr+mrUDyO7rx26ve/h+isQRqGQazlHIbijuY w4SZ2o6AWdcdcENNdAt4ySK3PoMBfWNq2uz37mee+dHbpzTCrlHPJSjctRf7ORwK 1eMpXay5oaK+w6YKhRajb3wFtSIIII1gBMf83jT/HWrLBCAqgOQ= =eyIA -----END PGP SIGNATURE----- --==-=-=--