From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id GIpqG9eF6GbDBAEA62LTzQ:P1 (envelope-from ) for ; Mon, 16 Sep 2024 19:24:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id GIpqG9eF6GbDBAEA62LTzQ (envelope-from ) for ; Mon, 16 Sep 2024 21:24:07 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="fgc/ZARB"; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail3 header.b=vcrr9MWi; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726514647; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=aUqyT85b9lNJdX699rTvLhMjVDFd5uugtf5P82bCnug=; b=CwhZ1VUHkqpmPQUOwnE3uM17XZDAGD/2XQ6VIqDCRj49KTLSeE23TTqzcmvudhELFKuucC ofGYLRuaBlHNACcit/k9k78pJ57RZbv01L6SPxBm9Hr96IRbdVjVi7karSEzEOk5hopSyw IrjoYRlpBa3JiIDbRWQNjjZ9zcZINx3olxyY3rc4DSXJ0dSBVYjiUerJm/bSCjXOXdVgw7 7iO5QRV6LAikzrGl96IZWQc1gtpzaK3aPhZIDoQhCHyB22NsM1YuEJUDhCY+BqkDa/dtf0 Z7KAwtlNwtczg5mQoAJAq/s+JPzjIkJvcoEYS/LfaEHE9hz+wOcyMrlXxFLaQQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726514647; a=rsa-sha256; cv=none; b=FTDMDj7fKotHZXa0bpUKW/g4es756VvvWoNjrC9fquKvC3ZU4fP/qNVrID90gmhN62fzuR 8ZAb4SZNNrd1ujXofjmZC2yOCBqfLYtdDzKxB8dR8cHtaU+Kn6VYjUY+RXNNL1QtL08jaq b0XA/WXmhybzh/muYD6R0r7fGu9g3YqzRpl/A+593dzbdke0NWZd4Z+70eA9H5s5bNAlxh gG/LsTWkWwZzUYiv5OvV2lu8xpZ1JgN9Agws7BstkKeIrkBrG8LXbmlM1xEwisENdbL39E vw/fljVjsgtO/KEUlg5nBkWNs3Ch3qolqMwEjvXQbV84g3EeDhuPa9r3l4swgg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="fgc/ZARB"; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail3 header.b=vcrr9MWi; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-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 2731458793 for ; Mon, 16 Sep 2024 21:24:07 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sqHKA-0004CB-Um; Mon, 16 Sep 2024 15:23:50 -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 1sqHK9-0004Bs-6O for bug-guix@gnu.org; Mon, 16 Sep 2024 15:23:49 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sqHK8-0005rq-TE for bug-guix@gnu.org; Mon, 16 Sep 2024 15:23:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:From:Date:To:Subject; bh=aUqyT85b9lNJdX699rTvLhMjVDFd5uugtf5P82bCnug=; b=fgc/ZARBYT9sHE0035l9AZ2gB222/3qE4mtTB5qN/H3uUsVWBGM7uXoNehNLN8NBTDJGe+l/cMVGSe4HmFg27CSRfzXZZ+TsbqOnUH9CalaeYphSmPDgGOJT8iuN0XWcp4qYmuV+fbns2Q/4AVt6SMGMf2hGBTk9y6OYBw269fIarlvf2ZVrIVttlryIL473X5ErlovGTmmFiNs3Vfv2k7Hm5lfC+TLzxGUBQdN93++jHT6AeBVq0oUcdtgkUA57b6voPqsyV4Sgb5LSt9R0MVEuRYBvcOStkD65/PMdyghDcXGGx6DJcbMaTqUwe2TS2aZ5jefNXfudZnT/lqnmOQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sqHKM-0002zz-Bk for bug-guix@gnu.org; Mon, 16 Sep 2024 15:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#73304: Python in relocatable guix pack leads to wrong sys.path Resent-From: Rutherther Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 16 Sep 2024 19:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73304 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 73304@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172651461711480 (code B ref -1); Mon, 16 Sep 2024 19:24:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Sep 2024 19:23:37 +0000 Received: from localhost ([127.0.0.1]:53301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqHJw-0002z5-JY for submit@debbugs.gnu.org; Mon, 16 Sep 2024 15:23:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:33472) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqHJu-0002yx-II for submit@debbugs.gnu.org; Mon, 16 Sep 2024 15:23:35 -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 1sqHJe-0003t6-6S for bug-guix@gnu.org; Mon, 16 Sep 2024 15:23:18 -0400 Received: from mail-4322.protonmail.ch ([185.70.43.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sqHJZ-0005qE-I9 for bug-guix@gnu.org; Mon, 16 Sep 2024 15:23:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1726514589; x=1726773789; bh=aUqyT85b9lNJdX699rTvLhMjVDFd5uugtf5P82bCnug=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=vcrr9MWi/mj5+Ko1Rs+MLrEg1lFVlIncDDIJd7bz0Caq2UsZ/7Y/x5RiGRVHuh15a 2VpJy3GgJLGIWIdr/TadkLYSLE9e9n1+cQMUxlcWQ8N4tKscBJKAaF6jZjNtU0SsF0 si/MyZhrP8mN053EMJmKplo9eBRACUSYVFmsvRLC1DG7s4K69mYuM7XMBghrbNdpQt tDAl92DdkzZZx0alcNv6yZtFfPQLWGfAZMyVaeyCd6Ucps8BykEzinsTF04qVtDLv8 XX2Xy7WEZtM+AGK1ZbGlNtEcLwcZRcPblkpqSsMBEkECrV1qMQbPodoaVkLtQ6ac7w qNuDf3beIstAQ== Date: Mon, 16 Sep 2024 19:23:04 +0000 Message-ID: <87ed5j1jzd.fsf@protonmail.com> Feedback-ID: 8107604:user:proton X-Pm-Message-ID: c9efd0637c333d35c1f16874564cb84ea6cbc489 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.43.22; envelope-from=rutherther@protonmail.com; helo=mail-4322.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-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: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Rutherther From: Rutherther via Bug reports for GNU Guix Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -5.11 X-Spam-Score: -5.11 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Queue-Id: 2731458793 X-TUID: DgEpBsJzYqp7 When I add both python and a python package (seems like any) to a relocatable guix pack, the resulting python in the merged profile seems to be broken. Specifically its `sys.path` contains missing paths. To replicate: ``` mkdir -p /tmp/b && cd /tmp/b tar xzvf $(guix pack -RR python python-pyflakes -S /profile=3D)` ``` Then try executing the python from merged profile, and see sys.path output --8<---------------cut here---------------start------------->8--- ./profile/bin/python3 >>> import sys >>> print(sys.path) ['', '/tmp/b/pwajwfiygrkmag8fm1wzn3cf362j7sri-python-3.10.7R/lib/python310.= zip', '/tmp/b/pwajwfiygrkmag8fm1wzn3cf362j7sri-python-3.10.7R/lib/python3.1= 0', '/tmp/b/pwajwfiygrkmag8fm1wzn3cf362j7sri-python-3.10.7R/lib/python3.10/= lib-dynload', '/tmp/b/pwajwfiygrkmag8fm1wzn3cf362j7sri-python-3.10.7R/lib/p= ython3.10/site-packages'] --8<---------------cut here---------------end--------------->8--- Now if you instead use the realpath of this python --8<---------------cut here---------------start------------->8--- $(realpath ./profile/bin/python3) >>> import sys >>> print(sys.path) ['', '/tmp/b/gnu/store/pwajwfiygrkmag8fm1wzn3cf362j7sri-python-3.10.7R/lib/= python310.zip', '/tmp/b/gnu/store/pwajwfiygrkmag8fm1wzn3cf362j7sri-python-3= .10.7R/lib/python3.10', '/tmp/b/gnu/store/pwajwfiygrkmag8fm1wzn3cf362j7sri-= python-3.10.7R/lib/python3.10/lib-dynload', '/tmp/b/gnu/store/pwajwfiygrkma= g8fm1wzn3cf362j7sri-python-3.10.7R/lib/python3.10/site-packages'] --8<---------------cut here---------------end--------------->8--- As can be observed, the first instance misses "gnu/store" in the path, and instead points to a path that does not exist. I have not investigated, at least not yet, where this discrepancy comes from. I was not able to replicate this with anything else than relocatable pack. So my guess would be something strange happens when making bwrap/fakechroot etc. Regards, Rutherther