From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KN6tGfeMVWGsZgEAgWs5BA (envelope-from ) for ; Thu, 30 Sep 2021 12:09:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iMdeFfeMVWEcUwAAB5/wlQ (envelope-from ) for ; Thu, 30 Sep 2021 10:09:59 +0000 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 4C66C1C79D for ; Thu, 30 Sep 2021 12:09:57 +0200 (CEST) Received: from localhost ([::1]:44664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVt0l-0006xi-Bx for larch@yhetil.org; Thu, 30 Sep 2021 06:09:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVszv-0006vo-JT for help-guix@gnu.org; Thu, 30 Sep 2021 06:09:03 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:51897) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVszt-0004xf-Bz for help-guix@gnu.org; Thu, 30 Sep 2021 06:09:03 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id E8095320187F; Thu, 30 Sep 2021 06:08:57 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 30 Sep 2021 06:08:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:subject:date:message-id:mime-version:content-type; s= fm1; bh=fUNW98sqe7UH4xcG6zhHq9bCAf+SWtMrpCxhr1YzKps=; b=phppLlVy k2734HpY8MpUEqPd0TbpEW/NBs2sOyFpsN7z+bbT7wdzFCziy5EoGr31vTdcjbFa HaBySm+jkExslHZJkj1KQbTKIE6vOEANrD5vU5arNTsjMkmHQM5EZWjR9aHgozpF FN4lemignFMIlEPc5wcDJkrHDpBOaJZ8WAaogqVfqB8ACIgkhGRRnICye1pgRSIJ uycaI9TXArCXr0q2V1mr4yLeTudvjk/moLqSr3phZrscsiSSJQzHHXjnZyje8ct8 EKSov0LevRrEB6H14CH6mH4ekjIHXsgkYdUgiip0uE010EFMZLvnlXC34sgjqX8b YLTzOzLfeF9l+w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=fUNW98sqe7UH4xcG6zhHq9bCAf+SW tMrpCxhr1YzKps=; b=eY4tn8bt6G6sxm0K3niun7bo8qYGpfRErKHOMqR6WoXzt TkSnsf1YxuWOfblR4FWFNiIBQj6YgiPCL6pXUb/TbWeeHaxcIDv/6aatr4LnD/7/ /OLBbtuyrRcAY0KWauRPs+gmBmvgWYv3WZPT5g8JslWFaszu570Hj22ZnQzHybuR cG090ifQffienYUqLJHiauWGwhzdTXsAaNCIZaBFRAOOzYclZvuL553a8PwNXOzQ RPSwg/ElCMoY+pGJRrc2Qu0GHqkA3ZGg+DKRQrMTYdd2WaGVQ6nGjlo99wax8iSv QQOAnox/aHuS4lXI2ZAFOK/3uyr7RKma3QnpZjz7g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudekgedgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtsehttdertddttd dtnecuhfhrohhmpefmohhnrhgrugcujfhinhhsvghnuceokhhonhhrrggurdhhihhnshgv nhesfhgrshhtmhgrihhlrdhnvghtqeenucggtffrrghtthgvrhhnpeeiffeffeegudegud efffegieekvdekhfeugeejvdfgudejteeuleegvedtueehieenucffohhmrghinhepshhi uggtrdgsvgenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehkohhnrhgrugdrhhhinhhsvghnsehfrghsthhmrghilhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 30 Sep 2021 06:08:57 -0400 (EDT) From: Konrad Hinsen To: help-guix@gnu.org Subject: Certificates in pure and containerized environments Date: Thu, 30 Sep 2021 12:08:53 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=64.147.123.19; envelope-from=konrad.hinsen@fastmail.net; helo=wout3-smtp.messagingengine.com 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632996599; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=fUNW98sqe7UH4xcG6zhHq9bCAf+SWtMrpCxhr1YzKps=; b=YVsjMnxcuO24EMx6/0jMDcTBT+bPSzPvlX2z4KZet1ntsm3UtCfzQz5cSyEKqNYow4mq3q HlmyyaNbx1u60kYzIJ4B90GIc7VMfg3OG6LGSvwlQAh+dtI0+PmleO/mUrPt8p2hJh4nO3 UXWwEuCZaCSflEhz+Qktmo+1IAg6f+XkLH6NKZvC6vHmlvveqOnfoFhSXuf89/JITY6og3 Zud7aoJQ58MksxgmdgihjhFO7FTeovTj4EnpNmEQISMTL0dpWqNqjc5eLmiaxSzh87sFXL kjcxmBZLZlVM5FJUwmMcqqQeu5HX/bq1Eqfrh631dCB66a8Ka96izjVZ0rplfA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632996599; a=rsa-sha256; cv=none; b=B26K6iC+ZCwqN1KPmASezfFPmPbFewl+vy8+riCO/ZJjj9Gla+G4gcZTVwF0PRM9uvKQSC BL5ieTLPoGtMkIlDeKq0jDKcDX6/Itn/9i0jJvWMmLmRLHXuL5GQJ1TGbxXUr+ZEe+jvlb RIYfazCMxg9o69t0NWpNLvypIDjfyM6tZ40RKaSWb+Cfeb8eaKNFzoqAQfAR71LJVttS5N fGSdyhxBtBDSnzznIqR4wX27Jw6N073weqVBqBBsWibSat9pAGzrm7Ox5PT1stHxbmuddv SrUL61sP+c7oIcsSoQl3vNFWYwN40gHwIHSPeBRnq6yx0EQwks/OxRspQdgtGQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=fastmail.net header.s=fm1 header.b=phppLlVy; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=eY4tn8bt; dmarc=pass (policy=none) header.from=fastmail.net; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -3.10 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=fastmail.net header.s=fm1 header.b=phppLlVy; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=eY4tn8bt; dmarc=pass (policy=none) header.from=fastmail.net; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 4C66C1C79D X-Spam-Score: -3.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: p5BpaZZBWzxQ Dear Guix experts, I am trying to move the execution of a Python script into a pure environment, but it fails because of certificate issues for which I am looking for a good fix. The minimal example I came up with is: guix environment --pure \ --ad-hoc python -- \ python3 -c 'import urllib.request; print(urllib.request.urlopen("http://wwwbis.sidc.be/DATA/uset/Wlight/2003/11/UPH20031109112104.FTS"))' This fails with the error message urllib.error.URLError: I have no idea why Python's urllib checks a certificate chain for a http URL, but that's not my subject now. A variant that works fine is guix environment --pure --preserve=^SSL_CERT \ --ad-hoc python -- \ python3 -c 'import urllib.request; print(urllib.request.urlopen("http://wwwbis.sidc.be/DATA/uset/Wlight/2003/11/UPH20031109112104.FTS"))' which adds two environment variables to the temporary environment: SSL_CERT_DIR=/home/hinsen/.guix-profile/etc/ssl/certs SSL_CERT_FILE=/home/hinsen/.guix-profile/etc/ssl/certs/ca-certificates.crt Since all the certificates come from Guix, I expect that I should also be able to use guix environment --pure \ --ad-hoc python nss-certs -- \ python3 -c 'import urllib.request; print(urllib.request.urlopen("http://wwwbis.sidc.be/DATA/uset/Wlight/2003/11/UPH20031109112104.FTS"))' but this doesn't work - same error as initially. I am not happy with exposing an environment variable from my personal account, as I want my run to be reproducible and portable to any machine running Guix, Ideally, I'd even move on to a containerized environment. Is there any way to achieve this? Thanks in advance, Konrad