From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id IGW8Inq/XGNF3gAAbAwnHQ (envelope-from ) for ; Sat, 29 Oct 2022 07:51:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UZa2Inq/XGMFuQAA9RJhRA (envelope-from ) for ; Sat, 29 Oct 2022 07:51:54 +0200 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 3A3402233B for ; Sat, 29 Oct 2022 07:51:54 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooejj-00039E-9B; Sat, 29 Oct 2022 01:50:27 -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 1ooeRu-0001Fs-B1 for bug-guix@gnu.org; Sat, 29 Oct 2022 01:32:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ooeRu-0000Op-0x for bug-guix@gnu.org; Sat, 29 Oct 2022 01:32:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ooeRt-00015W-Nb for bug-guix@gnu.org; Sat, 29 Oct 2022 01:32:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#58861: guix shell emulate-fhs option can have wrong glibc package Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 29 Oct 2022 05:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58861 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 58861@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-To: Guix Bugs Received: via spool by submit@debbugs.gnu.org id=B.16670214864131 (code B ref -1); Sat, 29 Oct 2022 05:32:01 +0000 Received: (at submit) by debbugs.gnu.org; 29 Oct 2022 05:31:26 +0000 Received: from localhost ([127.0.0.1]:34801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooeRJ-00014Z-Iq for submit@debbugs.gnu.org; Sat, 29 Oct 2022 01:31:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:43566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooeRG-00014P-6l for submit@debbugs.gnu.org; Sat, 29 Oct 2022 01:31:24 -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 1ooeRF-0000n9-J2 for bug-guix@gnu.org; Sat, 29 Oct 2022 01:31:21 -0400 Received: from mail-40131.protonmail.ch ([185.70.40.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooeRC-0000MQ-C6; Sat, 29 Oct 2022 01:31:20 -0400 Date: Sat, 29 Oct 2022 05:31:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1667021473; x=1667280673; bh=JGzXVndkVsSC73q6AZvOCbwJMG80A5YXx7oRymzvBxY=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=upiJtN4LZEAzPxC/1WzxJrSc2LHZmxsPZo8d6sOgQH0iBBlvcJszFqFEbOhWXOTcr SyAKWGRbDPVsFCzNArkvlv5UYSx9abFWlSQSczLkSyZWNxdsF05A9NEmH0NN7Wq/8k a+pqbEuPFSvzLW0t2mAMtD3pIyLctfjdp0MqC8ru+EyoFqlill/PvBLigaE/oPCLwa H20Au7Uo33dcmrAXhfpADHv4Z6Lk02Adp1pKOjPJI/Q6IW7n2TXnAfUsxgOeJ0iu8P dCzYzx11kBdNGHN9jkD8NZ7MfAnFtfLjYUpOCuLu9bdDSxe1RiwWd4BSy8yHoRvDcI 8hlHBxFA10aRQ== Message-ID: <87tu3n9oxd.fsf@protonmail.com> Feedback-ID: 7805494:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.131; envelope-from=john.kehayias@protonmail.com; helo=mail-40131.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, 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: , Sender: "bug-Guix" Reply-to: John Kehayias From: John Kehayias via Bug reports for GNU Guix Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667022714; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=JGzXVndkVsSC73q6AZvOCbwJMG80A5YXx7oRymzvBxY=; b=fOaOZtaaeake6r2LNXGIXa20ENLzZ5D8g52TfkiUmvuop/HBwo9bIOyzXbHVwUtiQJPvm5 HghCcTtzgZRZuyEv/HmUF/uhuZMckjAnjK40n3pvsHSUK1vgnf0OmxJTkjy61+sqLzFxhH I2JqOopH/61X0YBwIX/gey+J79A6B/X78rBLyTyxpvXMclKD1nV6Kl1FWh4F5eeKw/V1U0 r/+Sy41guY37FJ1UU41+Lkexm/f9gX5yMrBVTPEyI84xLTspdpAET1d30ILNkcZ65FLDNS f9cJd4DAhDIadr6Frsc6yqt0p0gmTZdih+tJOsq5SIGAKD38Plwucn2NsJOQBw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667022714; a=rsa-sha256; cv=none; b=T7UdkK7k0c5pScOyIs6Fq/9p/RHm6QmcM7lMniwMOwBu+GMcSYi2pmTVTJISnNRPmq7L1X vx2/VyUvY0aeXSb9W3CGbeG8ECpMdmjni8ndNsYa8KS45jG+bsZfUFQb7Ix3lPHE/I7065 KXPYwYHGGijV3r8oogqxUdwVuqCGN5tMCImDYeE2kqPQUTUHCTUpzM4tEZhAtK7IJNMJy6 GzABBt+Pcgy9YGHcIJ3AFDIFu9zgDmkfO6N6Wyl8bgftblPYdGDnLctRe56zXvnM/JeDjS oDwR/Nc3amJqP4YmJWJx6ZXx65nCXeMKUNruV/AULelMwdeXIiLG+FgV+zKbow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail3 header.b=upiJtN4L; 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" X-Migadu-Spam-Score: -3.63 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail3 header.b=upiJtN4L; 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" X-Migadu-Queue-Id: 3A3402233B X-Spam-Score: -3.63 X-Migadu-Scanner: scn1.migadu.com X-TUID: MgqHBt+LVZgR Hi Guixers, (cc'ing Ludo=E2=80=99 as author of the commit referenced below) After commit I noticed a changed in behavior of gui= x shell with the emulate-fhs option for a container. I tracked it down to t= he wrong glibc package appearing in the container, i.e. the standard Guix v= ersion rather than glibc-for-fhs (which reads a global ld cache). The cause I believe is related to , name= ly that package input order for a profile can matter. But it is slightly di= fferent here since the glibc-for-fhs package is added internally. We can see this demonstrated by comparing the FHS container with a -D input= so that a glibc package is implicitly included (here from the gnu-build-sy= stem): --8<---------------cut here---------------start------------->8--- =E2=9D=AF guix shell -CFD hello coreutils john@narya ~/Files/UPenn/canvasgrading [env]$ ls /lib/ld* -la lrwxrwxrwx 1 65534 overflow 69 Jan 1 1970 /lib/ld-2.33.so -> /gnu/store/5= h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/ld-2.33.so lrwxrwxrwx 1 65534 overflow 79 Jan 1 1970 /lib/ld-linux-x86-64.so.2 -> /g= nu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/ld-linux-x86-64.so= .2 --8<---------------cut here---------------end--------------->8--- Note that the loader comes from the standard glibc package. This means it w= on't read from the global cache. However, if we change the order, placing the FHS option after the (implicit= ) glibc input, we do get the glibc-for-fhs package. This is similar to #588= 59 which I just reported: --8<---------------cut here---------------start------------->8--- =E2=9D=AF guix shell -CD hello -F coreutils The following derivation will be built: /gnu/store/1hvdkgp68nak827qx6vhmrixdixnl6yl-profile.drv building CA certificate bundle... listing Emacs sub-directories... building fonts directory... building directory of Info manuals... building profile with 23 packages... [env]$ ls /lib/ld* -la lrwxrwxrwx 1 65534 overflow 77 Jan 1 1970 /lib/ld-2.33.so -> /gnu/store/d= hd4a04vxs6nzz0kqnhp0f2sm1q1xbkq-glibc-for-fhs-2.33/lib/ld-2.33.so lrwxrwxrwx 1 65534 overflow 87 Jan 1 1970 /lib/ld-linux-x86-64.so.2 -> /g= nu/store/dhd4a04vxs6nzz0kqnhp0f2sm1q1xbkq-glibc-for-fhs-2.33/lib/ld-linux-x= 86-64.so.2 --8<---------------cut here---------------end--------------->8--- Here the ld loader is as it should be for the FHS container. This was not the behavior before 8b192c5550213911f930594f4fd7386f36618237, = where the option handling was moved to shell rather than environment for em= ulate-fhs. Reverting this commit and doing the same thing, I get --8<---------------cut here---------------start------------->8--- =E2=9D=AF ./pre-inst-env guix shell -CFD hello coreutils [env]$ ls -la /lib/ld* lrwxrwxrwx 1 65534 overflow 77 Jan 1 1970 /lib/ld-2.33.so -> /gnu/store/d= hd4a04vxs6nzz0kqnhp0f2sm1q1xbkq-glibc-for-fhs-2.33/lib/ld-2.33.so lrwxrwxrwx 1 65534 overflow 87 Jan 1 1970 /lib/ld-linux-x86-64.so.2 -> /g= nu/store/dhd4a04vxs6nzz0kqnhp0f2sm1q1xbkq-glibc-for-fhs-2.33/lib/ld-linux-x= 86-64.so.2 [env]$ exit =E2=9D=AF ./pre-inst-env guix shell -CD hello -F coreutils [env]$ ls -la /lib/ld* lrwxrwxrwx 1 65534 overflow 77 Jan 1 1970 /lib/ld-2.33.so -> /gnu/store/d= hd4a04vxs6nzz0kqnhp0f2sm1q1xbkq-glibc-for-fhs-2.33/lib/ld-2.33.so lrwxrwxrwx 1 65534 overflow 87 Jan 1 1970 /lib/ld-linux-x86-64.so.2 -> /g= nu/store/dhd4a04vxs6nzz0kqnhp0f2sm1q1xbkq-glibc-for-fhs-2.33/lib/ld-linux-x= 86-64.so.2 --8<---------------cut here---------------end--------------->8--- Both cases have the expected behavior. The glibc-for-fhs package being adde= d to the profile is done last, when creating the manifest, so I think it is= the last package in the list and thus "wins out" over the glibc from the -= -development input (in keeping with the behavior noted in #58859). Further, I don't reproduce the bug that the commit above was supposed to fi= x: running the same FHS container shell multiple times (so the profile is c= ached) does not give me any errors. Although I didn't test for this specifi= cally before the final FHS patches, I did (and do) use the same cached prof= iles repeatedly. Was the bug in using the --profile option in combination with --emulate-fhs= ? I haven't tested that, but I could see that being the problem instead. Assuming there is a problem with profiles and emulate-fhs, what is the best= fix here? My guess is to put the glibc-for-fhs package always last to make= sure it is the glibc of the profile in this case to always have the same (= expected) behavior. Thanks! John