From unknown Fri Aug 22 01:03:38 2025 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== From: John Kehayias 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-Spam-Score: -0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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 From unknown Fri Aug 22 01:03:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58861: guix shell emulate-fhs option can have wrong glibc package Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 02 Nov 2022 13:07:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58861 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: John Kehayias , 58861@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 58861-submit@debbugs.gnu.org id=B58861.166739437214992 (code B ref 58861); Wed, 02 Nov 2022 13:07:03 +0000 Received: (at 58861) by debbugs.gnu.org; 2 Nov 2022 13:06:12 +0000 Received: from localhost ([127.0.0.1]:45155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqDRc-0003tk-29 for submit@debbugs.gnu.org; Wed, 02 Nov 2022 09:06:12 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:33726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqDRa-0003sj-OE for 58861@debbugs.gnu.org; Wed, 02 Nov 2022 09:06:11 -0400 Received: by mail-wr1-f43.google.com with SMTP id h9so24501644wrt.0 for <58861@debbugs.gnu.org>; Wed, 02 Nov 2022 06:06:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4vjg1eH68+WRhxzq9Y+Cj6/nT0kqYl5NUTnG2c426sc=; b=f/vMZbpPOYUYVMtyi/yUphgk6CoERMQ+0+kfxPzcUn7R1YUHrLNrF1GtbqxR4BVoDu D9uatXrUFPXKFj3b+FRv7oaHeIbxRAyoGlODU58b3a7sKOTHKTxiDGg+v9QgEXdREcu5 ldROEMZ1qH9FK4m9nb2nD+uPqR32MM68vr2ZLHJgXLZf8cT1dIQqnC9h7zylviy246NG 46fmzConSOB4r5RgMFtXBboSzGn0G4R1JpYoNG5CFDawfRArYF+mo25B5ZBaXtgWmekF cDy26RbWNIy8A7cCMqyaHEk8tIXMX+p/nLuIyMfBj7HUlcAmpOcPjv89Dqd9j4cenIXb 8FSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4vjg1eH68+WRhxzq9Y+Cj6/nT0kqYl5NUTnG2c426sc=; b=x7Sza57PXkk7+GQ7Sa3KaHazozKqjiWOrZUK/lXeLNvJpO2R6NzNqDbS8ItjnFma1V yjiwmwbzpWwUrd1TEz2ciqIboO9pOFnzSbfp0M3NXrl4QK1VGvsDD0eVSPtK4bJ1F9T5 4asYaVNsh4bACVEA67yDfRbDfJwWapzxFleKOGck64Zu9Reop88kF7iADnHWir10eLbl GkbyAdoEYcBY4r3eoX8yW/iC3eIE1M8mAJGA5VqqNWdmVUB/O4rrzFr0tp5VVim/5VlL m1mX686P5hb+rfnyNVkC8IhhjfUBN88AolyeR8iSkBERzL3Qe1jQS5DhKfNNlPbMoeKO RFPw== X-Gm-Message-State: ACrzQf3W41nM+fucEvMUv1xBPPAxb42i6TvSKsSuErPXiIicvpKIUe8L aSaQiXWeH4CvyvXYcW4stmw= X-Google-Smtp-Source: AMsMyM4DF4yQsjGLsSVFqrOXRerS58bFGgYT2oxtUhSLJ4ahfQh8zpWQ48uEvB3+At5oDi6FVZ2O5Q== X-Received: by 2002:adf:f447:0:b0:236:5840:1c72 with SMTP id f7-20020adff447000000b0023658401c72mr14558918wrp.686.1667394365141; Wed, 02 Nov 2022 06:06:05 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id t12-20020a7bc3cc000000b003cf66a2d433sm1940985wmj.33.2022.11.02.06.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 06:06:04 -0700 (PDT) From: zimoun In-Reply-To: <87tu3n9oxd.fsf@protonmail.com> References: <87tu3n9oxd.fsf@protonmail.com> Date: Wed, 02 Nov 2022 13:47:29 +0100 Message-ID: <87cza5frq6.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On sam., 29 oct. 2022 at 05:31, John Kehayias via Bug reports for GNU Guix = wrote: > --8<---------------cut here---------------start------------->8--- > =E2=9D=AF guix shell -CFD hello coreutils > =E2=9D=AF guix shell -CD hello -F coreutils > --8<---------------cut here---------------end--------------->8--- Unrelated, =E2=80=9Cguix package=E2=80=9D provides some =E2=80=99%actions= =E2=80=99 and as reported in [1], the command-line order matters =E2=80=93 when it should not be. Maybe= , as proposed in [1], =E2=80=9Cguix shell=E2=80=9D could process a =C2=AB plan = =C2=BB with always the same order, whatever the command-line order is. 1: Cheers, simon From unknown Fri Aug 22 01:03:38 2025 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: Wed, 02 Nov 2022 15:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58861 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: zimoun Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 58861@debbugs.gnu.org Received: via spool by 58861-submit@debbugs.gnu.org id=B58861.16674042238474 (code B ref 58861); Wed, 02 Nov 2022 15:51:02 +0000 Received: (at 58861) by debbugs.gnu.org; 2 Nov 2022 15:50:23 +0000 Received: from localhost ([127.0.0.1]:47006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqG0V-0002Cb-Di for submit@debbugs.gnu.org; Wed, 02 Nov 2022 11:50:23 -0400 Received: from mail-4322.protonmail.ch ([185.70.43.22]:58895) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqG0T-0002CN-Cf for 58861@debbugs.gnu.org; Wed, 02 Nov 2022 11:50:22 -0400 Date: Wed, 02 Nov 2022 15:50:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1667404215; x=1667663415; bh=Bhu61OpJufII9afD5UKfn/C510kFpLkGH/aA8gD+mPE=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=YCm54sI8f7L7O9rAmR1aaXqAOVqU3mJwm8Xd49uRLIhJ8u2wtVit2VfwppvzIDIJ1 xjhBUtn6Ezx48DtWvmYP2K3ACAPJ0N8P3pkvmtKIbaBs+flz8GbB3Suxc77NDDXSvm luNDsKncJOrdNyhbEcGqr3p1hpXslLgGUq3RshhOQYiQjh4DvbCC1jVdVoMZB0ClVK xGH8DCIoOxBXZ0v94/Lc2BpMZ+T4CAkNOYNJ3mfo3p31Ougz81vrP3v6opbj0jruT2 56EXbxAX1lMcW9ATxYGzMoehXHPHjiJTy1Wuo4qbpwzHVqzwlFYIpjaPe2h+iet/HM 6+2RR4yiAiT8g== From: John Kehayias Message-ID: <87y1st73vk.fsf@protonmail.com> In-Reply-To: <87cza5frq6.fsf@gmail.com> References: <87tu3n9oxd.fsf@protonmail.com> <87cza5frq6.fsf@gmail.com> Feedback-ID: 7805494:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi simon and Ludo=E2=80=99, Before I forget, nckx helpfully pointed out that I linked to the wrong comm= it, which made this all the more confusing. The correct commit is On Wed, Nov 02, 2022 at 01:47 PM, zimoun wrote: > Hi, > > On sam., 29 oct. 2022 at 05:31, John Kehayias via Bug reports for GNU Gui= x > wrote: > >> --8<---------------cut here---------------start------------->8--- >> =E2=9D=AF guix shell -CFD hello coreutils > >> =E2=9D=AF guix shell -CD hello -F coreutils >> --8<---------------cut here---------------end--------------->8--- > > Unrelated, =E2=80=9Cguix package=E2=80=9D provides some =E2=80=99%actions= =E2=80=99 and as reported in > [1], the command-line order matters =E2=80=93 when it should not be. May= be, as > proposed in [1], =E2=80=9Cguix shell=E2=80=9D could process a =C2=AB plan= =C2=BB with always the > same order, whatever the command-line order is. > > 1: > Thanks, I'll take a look. Seems like we may want to have a more systematic = method here. From unknown Fri Aug 22 01:03:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58861: guix shell emulate-fhs option can have wrong glibc package Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 02 Nov 2022 15:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58861 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: John Kehayias Cc: 58861@debbugs.gnu.org Received: via spool by 58861-submit@debbugs.gnu.org id=B58861.16674042668558 (code B ref 58861); Wed, 02 Nov 2022 15:52:01 +0000 Received: (at 58861) by debbugs.gnu.org; 2 Nov 2022 15:51:06 +0000 Received: from localhost ([127.0.0.1]:47011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqG1B-0002Dx-PG for submit@debbugs.gnu.org; Wed, 02 Nov 2022 11:51:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqG19-0002DN-NZ for 58861@debbugs.gnu.org; Wed, 02 Nov 2022 11:51:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqG14-0002PT-Hv; Wed, 02 Nov 2022 11:50:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=x/31c/1jFVjBQjmmKT2jm9xH10CQKt7YOadeTatJ5Y0=; b=pDac+GbThpBgkxJXwPuo EdbJGd0z7EDUvQaggn+S+q2Avu7yqQJNx578uvx6GW0kFJXGDRAd1BgPaRMrWzOZKdkJlVpa2HIrL yIS0UnTsXPU5EO8rUgo3XmhglQ7iIvk99FALkm3wv8Ms+mwtBXTZt9vvyBo/Aqw5TPhV4R5jE0v7h aodnSMO93ivdHyMySotSpbdirDsT0O2kvvSvMrBjb7BBEyFdzIbbRDLDcDImakQWFRsGSFXtvOzfQ JX8nxDLajrbTk2U6gHMWlNwzrJ4To26irdfPxFVtmD6GO901jTS6jv6+cUvAL3kCQY8H65KIToSPe PUFQ7O9NG/zdXw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqG12-0005vd-7k; Wed, 02 Nov 2022 11:50:58 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87tu3n9oxd.fsf@protonmail.com> Date: Wed, 02 Nov 2022 16:50:53 +0100 In-Reply-To: <87tu3n9oxd.fsf@protonmail.com> (John Kehayias's message of "Sat, 29 Oct 2022 05:31:05 +0000") Message-ID: <87sfj1tkwy.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi John, John Kehayias skribis: > After commit I noticed a changed in behavior of g= uix shell with the emulate-fhs option for a container. I tracked it down to= the wrong glibc package appearing in the container, i.e. the standard Guix= version rather than glibc-for-fhs (which reads a global ld cache). > > The cause I believe is related to , na= mely that package input order for a profile can matter. But it is slightly = different here since the glibc-for-fhs package is added internally. > > We can see this demonstrated by comparing the FHS container with a -D inp= ut so that a glibc package is implicitly included (here from the gnu-build-= system): > > =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= /5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/ld-2.33.so > lrwxrwxrwx 1 65534 overflow 79 Jan 1 1970 /lib/ld-linux-x86-64.so.2 -> = /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/ld-linux-x86-64.= so.2 How about fixing it by moving the (alist-cons 'expression =E2=80=A6) thing = right before the =E2=80=98options-with-caching=E2=80=99 call in =E2=80=98parse-ar= gs=E2=80=99? That way it would no longer be sensitive to the position of =E2=80=98-F=E2= =80=99 on the command line. Could you give it a try and add a test? Thanks, Ludo=E2=80=99. From unknown Fri Aug 22 01:03:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58861: [PATCH] shell: Fix '--emulate-fhs' sometimes not including 'glibc-for-fhs'. Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 03 Nov 2022 18:51:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58861 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 58861@debbugs.gnu.org Received: via spool by 58861-submit@debbugs.gnu.org id=B58861.166750143415273 (code B ref 58861); Thu, 03 Nov 2022 18:51:03 +0000 Received: (at 58861) by debbugs.gnu.org; 3 Nov 2022 18:50:34 +0000 Received: from localhost ([127.0.0.1]:50688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqfIP-0003yF-JI for submit@debbugs.gnu.org; Thu, 03 Nov 2022 14:50:34 -0400 Received: from mail-40133.protonmail.ch ([185.70.40.133]:32989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqfIL-0003xy-FZ for 58861@debbugs.gnu.org; Thu, 03 Nov 2022 14:50:30 -0400 Date: Thu, 03 Nov 2022 18:50:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1667501422; x=1667760622; bh=dTjgPZVJoQsANpSL/6+pgs01yQ6cTeQNQrlBboC9bSs=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=B9vLvzMG7c2jHT5p+u4bp3UbLFdgxHfZTeImPD9QSTLx2VJgZmhu5FeRaxG0REA7q s6h6ktJ15yWFNXIGxK8wLTIQr9PQcfkIRk0Ry/XeSsj7w9UTH9keo5/gBz0WfI7rxL Ir4h+Mr25iQIfLzzjS3AotxhrBfZ/Ldo2SKn7K67rKy+dE9HAKeebpgUqUR5w95QjF pLnFU45mN0cgXHA97kVjO3UO7Fo5E1O1FsKkeSFAfUMlB2W7faxzUrQqxYky4xDtWD kQHzp8+VzEiknhYyIg1xlkQlWLWeyLYD64/hEYhiqIKz2pQh6CCeFY11m+cUpet8/1 fiCQvSQD7eBdA== From: John Kehayias Message-ID: <87pme3dg9s.fsf@protonmail.com> In-Reply-To: <87sfj1tkwy.fsf@gnu.org> References: <87tu3n9oxd.fsf@protonmail.com> <87sfj1tkwy.fsf@gnu.org> Feedback-ID: 7805494:user:proton MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_6eXvRSle6BMPe2QR6AnfdwD6d6fGyRmlZcSberDuMA" X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi =?UTF-8?Q?Ludo=E2=80=99,?= On Wed, Nov 02, 2022 at 04:50 PM, Ludovic =?UTF-8?Q?Court=C3=A8s?= wrote: > Hi John, > > John Kehayias skribis: > >> After commit >> >> I noticed a changed in behavior of guix [...] Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [185.70.40.133 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (john.kehayias[at]protonmail.com) 1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist [URIs: libc.so] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) This is a multi-part message in MIME format. --b1_6eXvRSle6BMPe2QR6AnfdwD6d6fGyRmlZcSberDuMA Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo=E2=80=99, On Wed, Nov 02, 2022 at 04:50 PM, Ludovic Court=C3=A8s wrote: > Hi John, > > John Kehayias skribis: > >> After commit >> >> I noticed a changed in behavior of guix shell with the emulate-fhs optio= n for a >> container. I tracked it down to the wrong glibc package appearing in the= container, i.e. >> the standard Guix version rather than glibc-for-fhs (which reads a globa= l ld cache). >> >> The cause I believe is related to , n= amely that >> package input order for a profile can matter. But it is slightly differe= nt here since >> the glibc-for-fhs package is added internally. >> >> We can see this demonstrated by comparing the FHS container with a -D in= put so that a >> glibc package is implicitly included (here from the gnu-build-system): >> >> =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/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/ld-2.33.so >> lrwxrwxrwx 1 65534 overflow 79 Jan 1 1970 /lib/ld-linux-x86-64.so.2 -> >> /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/ld-linux-x86-= 64.so.2 > > How about fixing it by moving the (alist-cons 'expression =E2=80=A6) thin= g right > before the =E2=80=98options-with-caching=E2=80=99 call in =E2=80=98parse-= args=E2=80=99? > > That way it would no longer be sensitive to the position of =E2=80=98-F= =E2=80=99 on the > command line. > Good idea, that worked! I didn't think right away of an easier way of doing= this, so I added another let binding to easily check for '--emulate-fhs' i= n the parsed arguments. > Could you give it a try and add a test? > I added a test that explicitly includes 'glibc' in the 'guix shell' invocat= ion and checked the link to '/lib/libc.so' was from 'glibc-for-fhs'. Again,= not sure if there is a better way here, but the test does pass now and fai= ls without the change you proposed. I also checked against the examples I g= ave originally and looked good there too. Patch attached. I included an explanation (and link) of this bug and the fi= x in the commit message. Thanks and let me know if there is anything to improve here! John --b1_6eXvRSle6BMPe2QR6AnfdwD6d6fGyRmlZcSberDuMA Content-Type: text/x-patch; name=0001-shell-Fix-emulate-fhs-sometimes-not-including-glibc-.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=0001-shell-Fix-emulate-fhs-sometimes-not-including-glibc-.patch RnJvbSA3MmJlNGExNWExMDkxNmFlOGQ1MWRmYjI5OThkNjE3OWJjNTdiZTU5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQ0KRnJvbTogSm9obiBLZWhheWlhcyA8am9obi5rZWhheWlhc0Bwcm90b25t YWlsLmNvbT4NCkRhdGU6IFRodSwgMyBOb3YgMjAyMiAxNDoyNTowOSAtMDQwMA0KU3ViamVjdDog W1BBVENIXSBzaGVsbDogRml4ICctLWVtdWxhdGUtZmhzJyBzb21ldGltZXMgbm90IGluY2x1ZGlu Zw0KICdnbGliYy1mb3ItZmhzJy4NCg0KRml4ZXMgPGh0dHBzOi8vaXNzdWVzLmd1aXguZ251Lm9y Zy81ODg2MT4uDQoNClByZXZpb3VzbHkgdGhlIG9yZGVyIG9mIHRoZSBvcHRpb25zIGdpdmluZyB0 byAnZ3VpeCBzaGVsbCcgY291bGQgbWVhbiB0aGF0IHRoZQ0KJ2dsaWJjLWZvci1maHMnIHBhY2th Z2UgaW5jbHVkZWQgd2l0aCB0aGUgJy0tZW11bGF0ZS1maHMnIG9wdGlvbiB3b3VsZCBub3QNCmFw cGVhciBpbiB0aGUgY29udGFpbmVyLiAgRm9yIGV4YW1wbGUsIHVzaW5nIHRoZSBkZXZlbG9wbWVu dCBvcHRpb24gd2l0aCBhDQpwYWNrYWdlIHVzaW5nIHRoZSAnZ251LWJ1aWxkLXN5c3RlbScsIGUu Zy4gJ2d1aXggc2hlbGwgLUNGRCBoZWxsbycsIHdvdWxkDQppbmNsdWRlIHRoZSByZWd1bGFyICdn bGliYycgcGFja2FnZS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Y3JpcHRzL3NoZWxsLnNjbQ0KaW5kZXggYTI4MzY2MjlhZC4uZjMzNGJk NTdhZSAxMDA2NDQNCi0tLSBhL2d1aXgvc2NyaXB0cy9zaGVsbC5zY20NCisrKyBiL2d1aXgvc2Ny aXB0cy9zaGVsbC5zY20NCkBAIC0xNDMsMTYgKzE0Myw3IEBAIChkZWZpbmUgJW9wdGlvbnMNCiAN CiAgICAgICAgICAgICAgIChvcHRpb24gJygjXEYgImVtdWxhdGUtZmhzIikgI2YgI2YNCiAgICAg ICAgICAgICAgICAgICAgICAgKGxhbWJkYSAob3B0IG5hbWUgYXJnIHJlc3VsdCkNCi0gICAgICAg ICAgICAgICAgICAgICAgICAobGV0ICgocmVzdWx0DQotICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDs7IEZvciBhbiBGSFMtY29udGFpbmVyLCBhZGQgdGhlIChoaWRkZW4pDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDs7IHBhY2thZ2UgZ2xpYmMtZm9yLWZocyB3aGljaCB1 c2VzIHRoZSBnbG9iYWwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOzsgY2FjaGUg YXQgL2V0Yy9sZC5zby5jYWNoZS4NCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFs aXN0LWNvbnMNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdleHByZXNzaW9uDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKGFkLWhvYy1wYWNrYWdlDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICIoQEAgKGdudSBwYWNrYWdlcyBiYXNlKSBnbGli Yy1mb3ItZmhzKSIpDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQpKSkN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgKGFsaXN0LWNvbnMgJ2VtdWxhdGUtZmhzPyAjdCBy ZXN1bHQpKSkpKQ0KKyAgICAgICAgICAgICAgICAgICAgICAgIChhbGlzdC1jb25zICdlbXVsYXRl LWZocz8gI3QgcmVzdWx0KSkpKQ0KICAgICAgICAgKGZpbHRlci1tYXAgKGxhbWJkYSAob3B0KQ0K ICAgICAgICAgICAgICAgICAgICAgICAoYW5kIChub3QgKGFueSAobGFtYmRhIChuYW1lKQ0KICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtZW1iZXIgbmFtZSB0by1yZW1v dmUpKQ0KQEAgLTE3Myw4ICsxNjQsMTkgQEAgKGRlZmluZSAocGFyc2UtYXJncyBhcmdzKQ0KICAg OzsgVGhlICctLScgdG9rZW4gaXMgdXNlZCB0byBzZXBhcmF0ZSB0aGUgY29tbWFuZCB0byBydW4g ZnJvbSB0aGUgcmVzdCBvZg0KICAgOzsgdGhlIG9wZXJhbmRzLg0KICAgKGxldCAoKGFyZ3MgY29t bWFuZCAoYnJlYWsgKGN1dCBzdHJpbmc9PyAiLS0iIDw+KSBhcmdzKSkpDQotICAgIChsZXQgKChv cHRzIChwYXJzZS1jb21tYW5kLWxpbmUgYXJncyAlb3B0aW9ucyAobGlzdCAlZGVmYXVsdC1vcHRp b25zKQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICM6YXJndW1lbnQtaGFu ZGxlciBoYW5kbGUtYXJndW1lbnQpKSkNCisgICAgKGxldCogKChhcmdzLXBhcnNlZCAocGFyc2Ut Y29tbWFuZC1saW5lIGFyZ3MgJW9wdGlvbnMgKGxpc3QgJWRlZmF1bHQtb3B0aW9ucykNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICM6YXJndW1lbnQtaGFuZGxl ciBoYW5kbGUtYXJndW1lbnQpKQ0KKyAgICAgICAgICAgOzsgRm9yIGFuIEZIUy1jb250YWluZXIs IGFkZCB0aGUgKGhpZGRlbikgcGFja2FnZSBnbGliYy1mb3ItZmhzDQorICAgICAgICAgICA7OyB3 aGljaCB1c2VzIHRoZSBnb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DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgMA0KKyAgICAgICAgICAgICAgICAgICAgICAg ICAgIDEpKScNCi0tIA0KMi4zOC4wDQoNCg== --b1_6eXvRSle6BMPe2QR6AnfdwD6d6fGyRmlZcSberDuMA-- From unknown Fri Aug 22 01:03:38 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: John Kehayias Subject: bug#58861: closed (Re: [PATCH] shell: Fix '--emulate-fhs' sometimes not including 'glibc-for-fhs'.) Message-ID: References: <87mt94gwl7.fsf@gnu.org> <87tu3n9oxd.fsf@protonmail.com> X-Gnu-PR-Message: they-closed 58861 X-Gnu-PR-Package: guix Reply-To: 58861@debbugs.gnu.org Date: Sun, 06 Nov 2022 11:19:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1667733542-26260-1" This is a multi-part message in MIME format... ------------=_1667733542-26260-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #58861: guix shell emulate-fhs option can have wrong glibc package which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 58861@debbugs.gnu.org. --=20 58861: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D58861 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1667733542-26260-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 58861-done) by debbugs.gnu.org; 6 Nov 2022 11:18:39 +0000 Received: from localhost ([127.0.0.1]:58797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ordfj-0006ow-Aj for submit@debbugs.gnu.org; Sun, 06 Nov 2022 06:18:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ordfh-0006oh-1G for 58861-done@debbugs.gnu.org; Sun, 06 Nov 2022 06:18:37 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ordfb-0004h2-MR; Sun, 06 Nov 2022 06:18:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=kjACC/snVots0bP6l0Nctp83mC4U0vuaAoemgIibQh8=; b=pZ1W1z8+yBkQFYKPOgnC mNLDRRIJXpuvaj5lAx22EKob5JD1kRwvca7hcKELsFHMdDeWUhy7AFm6lNf8FRdq6FMS0NS0nuWTi tX6XNikeFxdeI541Y1SeOCAOJ6BieJw0VFkYyLI4oW0pzdM7RKD1wHoxkP3H+muiNhcsadL/nSID9 30qW+Sk75+/p1jujfUugIkz5PcAeRnskII5PTS5CAeZGdNaair/wBBDwEWWLa+/LYCmvfkV6ja4JI FJj4saO26ZHtirmew8yLEBJoec6nXZ5kk5c4NOxQ862BBgBhHj8v8dNIyGREWu3xIqu1J3NNLrfCJ TDeQrC7spmUwIw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ordfa-00073G-Ut; Sun, 06 Nov 2022 06:18:31 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: John Kehayias Subject: Re: [PATCH] shell: Fix '--emulate-fhs' sometimes not including 'glibc-for-fhs'. References: <87tu3n9oxd.fsf@protonmail.com> <87sfj1tkwy.fsf@gnu.org> <87pme3dg9s.fsf@protonmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Sextidi 16 Brumaire an 231 de la =?utf-8?Q?R=C3=A9vo?= =?utf-8?Q?lution=2C?= jour du Chervis X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sun, 06 Nov 2022 12:18:28 +0100 In-Reply-To: <87pme3dg9s.fsf@protonmail.com> (John Kehayias's message of "Thu, 03 Nov 2022 18:50:14 +0000") Message-ID: <87mt94gwl7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58861-done Cc: 58861-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, John Kehayias skribis: > From 72be4a15a10916ae8d51dfb2998d6179bc57be59 Mon Sep 17 00:00:00 2001 > From: John Kehayias > Date: Thu, 3 Nov 2022 14:25:09 -0400 > Subject: [PATCH] shell: Fix '--emulate-fhs' sometimes not including > 'glibc-for-fhs'. > > Fixes . > > Previously the order of the options giving to 'guix shell' could mean tha= t the > 'glibc-for-fhs' package included with the '--emulate-fhs' option would not > appear in the container. For example, using the development option with a > package using the 'gnu-build-system', e.g. 'guix shell -CFD hello', would > include the regular 'glibc' package. The option ordered mattered: 'guix = shell > -CD hello -F' would include the expected 'glibc-for-fhs'. We fix this by > having 'glibc-for-fhs' added to the package list just before calling > 'options-with-caching' so the option order given by the user does not mat= ter. > > * guix/scripts/shell.scm (%options): Move the '--emulate-fhs' (expression > . ...) component from here... > (parse-args): ... to here. > * tests/guix-environment-container.sh: Add a test to check that > 'glibc-for-fhs' is in the container even when 'glibc' is included in the = 'guix > shell' package list. Perfect; applied, thanks! Ludo=E2=80=99. ------------=_1667733542-26260-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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== To: Guix Bugs From: John Kehayias Subject: guix shell emulate-fhs option can have wrong glibc package 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-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: submit Cc: =?utf-8?Q?Ludovic_Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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 ------------=_1667733542-26260-1--