From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 22 06:28:07 2020 Received: (at submit) by debbugs.gnu.org; 22 Aug 2020 10:28:08 +0000 Received: from localhost ([127.0.0.1]:48915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9Qkp-0000sS-NF for submit@debbugs.gnu.org; Sat, 22 Aug 2020 06:28:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:46676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9Qkk-0000s5-2f for submit@debbugs.gnu.org; Sat, 22 Aug 2020 06:28:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9Qkj-0007xe-Rs for bug-guix@gnu.org; Sat, 22 Aug 2020 06:28:01 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:56962) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9Qkh-00041l-N2 for bug-guix@gnu.org; Sat, 22 Aug 2020 06:28:01 -0400 Received: from localhost (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 4B2E93362EEF for ; Sat, 22 Aug 2020 12:27:55 +0200 (CEST) Date: Sat, 22 Aug 2020 12:27:50 +0200 From: Danny Milosavljevic To: Subject: "sudo -E guix pull" breaks ~/.config/guix/current for regular user Message-ID: <20200822122750.78ddc111@scratchpost.org> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/woRHX4ql0x6sjWi.7AbL.V3"; protocol="application/pgp-signature"; micalg=pgp-sha512 Received-SPF: none client-ip=85.13.145.193; envelope-from=dannym@scratchpost.org; helo=dd26836.kasserver.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/22 06:27:55 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit 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 (---) --Sig_/woRHX4ql0x6sjWi.7AbL.V3 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hello, Paul reported on IRC that his guix behaved strangely. = Upon investigation we found that the following happens (on a Guix system), when = logged in as regular user (not root): $ readlink ~/.config/guix/current /var/guix/profiles/per-user/dannym/current-guix $ sudo -E guix pull $ readlink ~/.config/guix/current /var/guix/profiles/per-user/root/current-guix You can also rm -f ~/.config/guix/current after that and do everything above again and it will happen again. It even happens when guix pull has nothing= to do. That doesn't seem right. We should at least try to prevent this from happe= ning, or warn or something. The guix package manager that did that is: $ sudo -E guix describe Generation 64 Aug 22 2020 11:41:04 (current) guix dad963a repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: dad963a4393ea51409baa63817b26b449ed58338 heads 50b97d4 repository URL: https://github.com/daym/heads-guix.git branch: wip-musl commit: 50b97d446ebafd0be7a0e19d87cd236882093244 $ sudo -i # guix describe Generation 64 22. August 2020 11:41:04 (aktuell) guix dad963a Repository-URL: https://git.savannah.gnu.org/git/guix.git Branch: master Commit: dad963a4393ea51409baa63817b26b449ed58338 heads 50b97d4 Repository-URL: https://github.com/daym/heads-guix.git Branch: wip-musl Commit: 50b97d446ebafd0be7a0e19d87cd236882093244 --Sig_/woRHX4ql0x6sjWi.7AbL.V3 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl9A8yYACgkQ5xo1VCww uqULaQf9GIfBH86NSavxsMh6Snv+NBgfYZljjwegB9v8S9i7Ws317cnb7SIt1RIP kmFfovcF1WYgtwc/YxBdlVDUMwDqof9FxMjDwqtgDASfYWHiu4u9PR5Gx3zenIqt Modr6FY68NoqzjCyErn2qP1LXguIyZPoBYiKs3YwwWFhEtP+Mbj6q+4tL6nP+FHg LOVUnDOrmKpmm5ZOyBno4gtw3EYakWhoNDwte3pTUce4IQOMtQiY7KBGoH1V4qUZ ruXojCUuZsCxtovV1dHhTUlVy9sukQx0LUQeB/iOcY3RpuMnfUJpxrclFFk7aNpH m1eYysmE3xrz2tP7+fdxpIAW2zVa6A== =/A12 -----END PGP SIGNATURE----- --Sig_/woRHX4ql0x6sjWi.7AbL.V3-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 22 12:20:24 2020 Received: (at 42983) by debbugs.gnu.org; 22 Aug 2020 16:20:24 +0000 Received: from localhost ([127.0.0.1]:51192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9WFk-0000uv-Ag for submit@debbugs.gnu.org; Sat, 22 Aug 2020 12:20:24 -0400 Received: from imta-36.everyone.net ([216.200.145.36]:46026 helo=imta-38.everyone.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9WFj-0000uo-9h for 42983@debbugs.gnu.org; Sat, 22 Aug 2020 12:20:23 -0400 Received: from pps.filterd (omta002.sj2.proofpoint.com [127.0.0.1]) by imta-38.everyone.net (8.16.0.27/8.16.0.27) with SMTP id 07MGFnU4002688; Sat, 22 Aug 2020 09:20:21 -0700 X-Eon-Originating-Account: bLMaz92QjasWbGNJI-hx33LCWBuQHbudjWLsQfRhsX8 X-Eon-Dm: m0117124.ppops.net Received: by m0117124.mta.everyone.net (EON-AUTHRELAY2 - 5a81ce85) id m0117124.5f332921.16e686; Sat, 22 Aug 2020 09:20:19 -0700 X-Eon-Sig: AQMHrIJfQUXD9ZTSyQIAAAAC,2346450d90e05fb15f3ee3066b81326c X-Eip: dsa0Z5ZK6XbqUCR30_DJZDGraE5mBgu1OBG3qbibLvk Date: Sat, 22 Aug 2020 18:20:09 +0200 From: Bengt Richter To: Danny Milosavljevic Subject: Re: bug#42983: "sudo -E guix pull" breaks ~/.config/guix/current for regular user Message-ID: <20200822162009.GA2810@LionPure> References: <20200822122750.78ddc111@scratchpost.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200822122750.78ddc111@scratchpost.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-22_10:2020-08-21, 2020-08-22 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1034 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2006250000 definitions=main-2008220180 X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 42983 Cc: 42983@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: , Reply-To: Bengt Richter Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Hi, On +2020-08-22 12:27:50 +0200, Danny Milosavljevic wrote: > Hello, > > Paul reported on IRC that his guix behaved strangely. Upon > investigation we found that the following happens (on a Guix system), when logged > in as regular user (not root): > > $ readlink ~/.config/guix/current > /var/guix/profiles/per-user/dannym/current-guix > $ sudo -E guix pull > $ readlink ~/.config/guix/current > /var/guix/profiles/per-user/root/current-guix > > You can also rm -f ~/.config/guix/current after that and do everything above > again and it will happen again. It even happens when guix pull has nothing to > do. > > That doesn't seem right. We should at least try to prevent this from happening, > or warn or something. > ISTM it looks like a bug that should be fixed[1], urgently, not just warned about :) [1] eliminated from the possibility of happening :) > The guix package manager that did that is: > > $ sudo -E guix describe > Generation 64 Aug 22 2020 11:41:04 (current) > guix dad963a > repository URL: https://git.savannah.gnu.org/git/guix.git > branch: master > commit: dad963a4393ea51409baa63817b26b449ed58338 > heads 50b97d4 > repository URL: https://github.com/daym/heads-guix.git > branch: wip-musl > commit: 50b97d446ebafd0be7a0e19d87cd236882093244 > > $ sudo -i > # guix describe > Generation 64 22. August 2020 11:41:04 (aktuell) > guix dad963a > Repository-URL: https://git.savannah.gnu.org/git/guix.git > Branch: master > Commit: dad963a4393ea51409baa63817b26b449ed58338 > heads 50b97d4 > Repository-URL: https://github.com/daym/heads-guix.git > Branch: wip-musl > Commit: 50b97d446ebafd0be7a0e19d87cd236882093244 I find it peculiar that root (sudo -i) looks like it's using swedish locale ("aktuell" is swedish for "current") with the rest of the output identical. (Hm, maybe that's also Norwegian ;-) If describe is describing two things that are identical end values of readlink -f thing{1..2}, I think it would be helpful to show the thing{1..2} profile links it's using. BTW, what would sudo guix describe without the -E (preserving user environment) have produced? -- Regards, Bengt Richter From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 22 12:22:52 2020 Received: (at 42983) by debbugs.gnu.org; 22 Aug 2020 16:22:52 +0000 Received: from localhost ([127.0.0.1]:51209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9WI8-0000zc-9E for submit@debbugs.gnu.org; Sat, 22 Aug 2020 12:22:52 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:54007) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9WI5-0000zP-Ca for 42983@debbugs.gnu.org; Sat, 22 Aug 2020 12:22:50 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 2A3FE5C0110; Sat, 22 Aug 2020 12:22:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 22 Aug 2020 12:22:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=pnKBtQ4QosMLx3M19s577FWP 2YYgCIo26HDrTS797lk=; b=XIlVX5J9yNmJVprwRVgPU3V+FF3xERgvetUpCxIW sNeuLmOKpzkPaGM9hOEBd1ZJnFWqLwbJ5RUSGuChiP3siHznzMxtk40YeNs8WENr DbcXC39VWDvyoTYNHDDxKLZ6Xo3UOYpfKqpazqc7KbsBW2OuKWjP4IPID2F05ps3 XV0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=pnKBtQ 4QosMLx3M19s577FWP2YYgCIo26HDrTS797lk=; b=i+XZrAiE7Oe7eRCmC4RrHY mD/ikF00sque5VgbtyHwglgF9OMeJ77bv9MXhXVUrHVPECKe2RkMTjR5ueA7++P1 i2b97ouD0S11DTxxfsoH/iEFuzXTBB1p1lPC9vNW+Vfv7QtpywkaW7+5kNwXlmQF pS0FJFmPo7PI18UlI1Olv2BA1eX1D306fx001SB3Kf0nJT1wJpu9wuKgbv1ebCpG CC89xvMM2f0S8XIByjtypDdVUJWWWB9RBpFClr4dPIwmitXJOD8XSwGUXFL7QDCQ uuMjgWanqfKdXxesXphtVcUOsxR5HbcYxn5jhDebJVTyFWh1QLS0U2Va0ynVGuKg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddugedguddtvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepnfgvohcu hfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhirdhnrghmvgeqnecuggftrfgrth htvghrnhepueekkedtffdvtddugeejgedtvefhueefiedvjeeitdeigedtveejvdejheff vefgnecukfhppeejfedrudeguddruddvjedrudegieenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: Received: from localhost (c-73-141-127-146.hsd1.pa.comcast.net [73.141.127.146]) by mail.messagingengine.com (Postfix) with ESMTPA id BFB723280059; Sat, 22 Aug 2020 12:22:43 -0400 (EDT) Date: Sat, 22 Aug 2020 12:22:41 -0400 From: Leo Famulari To: Danny Milosavljevic Subject: Re: bug#42983: "sudo -E guix pull" breaks ~/.config/guix/current for regular user Message-ID: <20200822162241.GA5895@jasmine.lan> References: <20200822122750.78ddc111@scratchpost.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200822122750.78ddc111@scratchpost.org> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42983 Cc: 42983@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: -1.0 (-) On Sat, Aug 22, 2020 at 12:27:50PM +0200, Danny Milosavljevic wrote: > Paul reported on IRC that his guix behaved strangely. Upon > investigation we found that the following happens (on a Guix system), when logged > in as regular user (not root): > > $ readlink ~/.config/guix/current > /var/guix/profiles/per-user/dannym/current-guix > $ sudo -E guix pull > $ readlink ~/.config/guix/current > /var/guix/profiles/per-user/root/current-guix What is expected to happen in this case? Why would one want to use an unprivileged environment with privileges to do `guix pull`, which is a per-user operation? From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 23 17:24:50 2020 Received: (at 42983) by debbugs.gnu.org; 23 Aug 2020 21:24:50 +0000 Received: from localhost ([127.0.0.1]:55233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9xTu-0001kh-Gu for submit@debbugs.gnu.org; Sun, 23 Aug 2020 17:24:50 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:36838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9xTs-0001kY-FY for 42983@debbugs.gnu.org; Sun, 23 Aug 2020 17:24:49 -0400 Received: from localhost (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id E5EEA3360EDE; Sun, 23 Aug 2020 23:24:46 +0200 (CEST) Date: Sun, 23 Aug 2020 23:24:43 +0200 From: Danny Milosavljevic To: Leo Famulari Subject: Re: bug#42983: "sudo -E guix pull" breaks ~/.config/guix/current for regular user Message-ID: <20200823232429.13c8c10e@scratchpost.org> In-Reply-To: <20200822162241.GA5895@jasmine.lan> References: <20200822122750.78ddc111@scratchpost.org> <20200822162241.GA5895@jasmine.lan> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/9WOPEHPkPB4typWphO.Ep4H"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42983 Cc: 42983@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: -1.0 (-) --Sig_/9WOPEHPkPB4typWphO.Ep4H Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Leo, On Sat, 22 Aug 2020 12:22:41 -0400 Leo Famulari wrote: > What is expected to happen in this case? Why would one want to use an > unprivileged environment with privileges to do `guix pull`, which is a > per-user operation? Paul did not know that it is a per-user operation. I did almost exactly the same thing when I was a new guix user. That's pretty much what one is used to from Debian etc. I don't really know whether it should do anything useful, but the current situation is seriously weird. --Sig_/9WOPEHPkPB4typWphO.Ep4H Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl9C3psACgkQ5xo1VCww uqVSOAf+OKBNZ0XnIVGeobivRJwXzEiho2NphqX72TfFHaxLBx/78UhKbrSAkUKW BwAtny/QmfXD6QDsLS1TNskn1Gqux+CTDbXCppBOprtGZFB2vb57TCy5XmyBEWvx y0/rSImsPX1bs8FxvsGaLuJLBPOONCv/zoXxKWoZXmXIGLwOgYmkuQPu+41x8fRV fxmbNYHVLZsCEKnHftiwCTlnGsZ2XPernvGhCLJnmKyeJAb6EeI2jJV17xCqcWUt IkI4AGhyaFkf1PDwnTWcz8ZOuHjVrDK3bPwMf24tXpCIgYa/Du9AI1NcuDVBoO6q i466wA2cFstfokALoFRP0EqVvl/vAg== =POZD -----END PGP SIGNATURE----- --Sig_/9WOPEHPkPB4typWphO.Ep4H-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 23 17:45:57 2020 Received: (at 42983) by debbugs.gnu.org; 23 Aug 2020 21:45:57 +0000 Received: from localhost ([127.0.0.1]:55273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9xoK-0002HD-VW for submit@debbugs.gnu.org; Sun, 23 Aug 2020 17:45:57 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:57281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9xoJ-0002H0-OS for 42983@debbugs.gnu.org; Sun, 23 Aug 2020 17:45:56 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 628595C0041; Sun, 23 Aug 2020 17:45:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 23 Aug 2020 17:45:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=2LDSMpreXb4pR/imNvQ767Tq X8Wiq2b7BGc40O4PQpA=; b=sDFNH0RpMdo0BwD9l2CFaUBeefnYzyBH5mQTkA+F Gx2ae+ajaWqIz9J9HGuFNWNDuVvy7SGWSZGg2daaHBUUAjSVHg5g/aO3JugTE3k+ dZnX3jwBha+FG7SEuVdafigXFil5fXfW2ygt55Xl0JyR8/5jo/vwjefSq97rkQaW 0q4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=2LDSMp reXb4pR/imNvQ767TqX8Wiq2b7BGc40O4PQpA=; b=UxQ0hoTbPidx/gokpUfGfR Hm8DDPPLdreV9aal1qjpP6izKCqyF4IXuruQqzOiyjpzAfZUrgIS+fDkpgx8fzQd AI7qy5l7VIgIkU8zbxtBXKmygfTjBupQoJt2GO9TX553Mj8+GpShDbLerrxAUt6X aCfFlNb/pPW/+OlTc3YNy2f1kePVL7G293PN7rBzx/FiGt7yRclTBpgSTH8UyryQ Geq2ENEFy2DBL4/ZGe12sDjz60GqCGkgIvdZJa7rjhB6uWGebXqeXaRkXv2Fq/lr IUHrmL/hFxBRkUeIiT5bl7gK3f3oVGv41rM0NqQ53tr4lXz+2AFv8HQsX18BPx0Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudduiedgudehfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepnfgvohcu hfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhirdhnrghmvgeqnecuggftrfgrth htvghrnhepudekveegteekleetgfeitdejgfejkeffudethedvhfeukeduleeikeejfeeh ffetnecukfhppeejfedrudeguddruddvjedrudegieenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: Received: from localhost (c-73-141-127-146.hsd1.pa.comcast.net [73.141.127.146]) by mail.messagingengine.com (Postfix) with ESMTPA id 6C00B30600A9; Sun, 23 Aug 2020 17:45:49 -0400 (EDT) Date: Sun, 23 Aug 2020 17:45:47 -0400 From: Leo Famulari To: Danny Milosavljevic Subject: Re: bug#42983: "sudo -E guix pull" breaks ~/.config/guix/current for regular user Message-ID: <20200823214547.GA30907@jasmine.lan> References: <20200822122750.78ddc111@scratchpost.org> <20200822162241.GA5895@jasmine.lan> <20200823232429.13c8c10e@scratchpost.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="+HP7ph2BbKc20aGI" Content-Disposition: inline In-Reply-To: <20200823232429.13c8c10e@scratchpost.org> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42983 Cc: 42983@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: -1.0 (-) --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 23, 2020 at 11:24:43PM +0200, Danny Milosavljevic wrote: > Paul did not know that it is a per-user operation. >=20 > I did almost exactly the same thing when I was a new guix user. > That's pretty much what one is used to from Debian etc. I see. Coming from Debian, I also had trouble learning the differences between various options of sudo, and also the differences between login shells, interactive shells, etc. They don't matter on Debian, but they do matter for Guix. > I don't really know whether it should do anything useful, but the current > situation is seriously weird. Considering how often people stumble on this, I've been wondering if Guix should handle privilege escalation internally, rather than asking users to learn these arcane details of Unix. Systemd does that. For example, given an operation that requires privileges, if I attempt to run it without privileges, it will use polkit (I think) to escalate safely. It's optional and not all distros enable it by default. It looks like this: ------ $ systemctl restart guix-daemon=20 =3D=3D=3D=3D AUTHENTICATING FOR org.freedesktop.systemd1.manage-units =3D= =3D=3D Authentication is required to restart 'guix-daemon.service'. Authenticating as: leo,,, (leo) Password:=20 =3D=3D=3D=3D AUTHENTICATION COMPLETE =3D=3D=3D ------ --+HP7ph2BbKc20aGI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAl9C44sACgkQJkb6MLrK fwh9iA//c3lD8Q73bJ6+qMUdIzL9yTyqQKGP1ZamIvyvtNluJ73xQfSGu5n93BBm O5K/kCjeA7bBG08uSTXPULQV7wCnwmdeVusm9+39qFE2mr7w1XlLPULU66K0cTXq M2Ir1vNxknUsgJ1aLBeN87HbJcwhyy5IjWiBio52+vOrAcnpMD5dWox1iO1Sje/2 kZj6wdSXW7yLpFvpH3nl3A7CHNOFaWH2R0SMUHrsCZMDX3AA3t/pvGfYPTAyZxeO 24U87arxY7z4j1qbXl8LQgGy7YiWN/+85dWFemtnWIFOKjBfaIPD74hJ8ChCyoQc 8pSYPszcQ75SQnhlNX24qK1iZbunCLXTD3uqw6lkvJmr139Wgld87U8b8FMYdbcn 1dQEceE9AVHvrPuH0wWfRLWdkEvr3QCg9zqTIYDMXnbCwGBtHY38CDRb9gbcAgyK fw069+lnm8rwMRQdAtB88/s7EVUW3hOadsLPTegjJn9Cxy69xcEZrcNfY0za9L7U B8GZqPxSGGiF7xTavjfzDUuYc5DLnLRRzoYZOoD15CHQ6t1phhhHu5RZkHPphJl+ EoERdVJ8S7AX0ArkJrNjELmQPEHammAWaJDBE20cJ45BESeq8xCLoelyCIPA0Zi6 tXvynFOC5PX+0/G+7K6TW9ONw3JoW6/R7hfJWNGiOyoUxIqHMwM= =SM4L -----END PGP SIGNATURE----- --+HP7ph2BbKc20aGI-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 23 19:53:27 2020 Received: (at 42983) by debbugs.gnu.org; 23 Aug 2020 23:53:28 +0000 Received: from localhost ([127.0.0.1]:55355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9znj-0005Hb-Lm for submit@debbugs.gnu.org; Sun, 23 Aug 2020 19:53:27 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:49862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9zni-0005HP-2k for 42983@debbugs.gnu.org; Sun, 23 Aug 2020 19:53:26 -0400 Received: from localhost (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 2F1193360AB3; Mon, 24 Aug 2020 01:53:24 +0200 (CEST) Date: Mon, 24 Aug 2020 01:53:20 +0200 From: Danny Milosavljevic To: Bengt Richter Subject: Re: bug#42983: "sudo -E guix pull" breaks ~/.config/guix/current for regular user Message-ID: <20200824015320.669fb70c@scratchpost.org> In-Reply-To: <20200822162009.GA2810@LionPure> References: <20200822122750.78ddc111@scratchpost.org> <20200822162009.GA2810@LionPure> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/xgILrQiOjwQXEB48XUnm.+="; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42983 Cc: 42983@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: -1.7 (-) --Sig_/xgILrQiOjwQXEB48XUnm.+= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi, On Sat, 22 Aug 2020 18:20:09 +0200 Bengt Richter wrote: > BTW, what would sudo guix describe without the -E (preserving user enviro= nment) have produced? I've tried it again (it's 100% reproducible) and I get (after "sudo -E guix= pull"): dannym@dayas ~$ export LC_ALL=3DC dannym@dayas ~$ sudo -E guix describe Generation 65 Aug 23 2020 23:44:26 (current) guix 9e2a49d repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 9e2a49db8ce70068644cecdfda4c198d4c09e36e heads 50b97d4 repository URL: https://github.com/daym/heads-guix.git branch: wip-musl commit: 50b97d446ebafd0be7a0e19d87cd236882093244 dannym@dayas ~$ sudo guix describe Generation 65 Aug 23 2020 23:44:26 (current) guix 9e2a49d repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 9e2a49db8ce70068644cecdfda4c198d4c09e36e heads 50b97d4 repository URL: https://github.com/daym/heads-guix.git branch: wip-musl commit: 50b97d446ebafd0be7a0e19d87cd236882093244 dannym@dayas ~$ guix describe guix 9e2a49d repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 9e2a49db8ce70068644cecdfda4c198d4c09e36e heads 50b97d4 repository URL: https://github.com/daym/heads-guix.git branch: wip-musl commit: 50b97d446ebafd0be7a0e19d87cd236882093244 --Sig_/xgILrQiOjwQXEB48XUnm.+= Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl9DAXAACgkQ5xo1VCww uqVzIgf+N1nfNk6ZMkVY4YH4F7dXvFpZ2BEXO1ucKWhMc57g5HSoeEY1nhPhmznK SOQAhVvbKJxQ3CWhAvb4438MBAEIKwWqXgTD0cnyqdzFZ9pw3dxcylQUTuHYqopM np+XR112FTRsk19jcGKlSwzyIOcCKkBwh72xxIb4V8Cn4l6t9c521GBLhzCSsPbT OJrA8P5JlnvwjgeXi/47ZTSSuJl7oPXICEh82+Gs17AwVdN0GBV5BXeF6Rj+ZlxK hLmCAc/YajtrETtCv1qJ6asqbWZ7Lf+HFDxPt+s1iqsYKAjpPcByWrrQBnCMpkNc bDbWDympIrFne9vcVIlmK11aCdKeaw== =19MO -----END PGP SIGNATURE----- --Sig_/xgILrQiOjwQXEB48XUnm.+=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 23 20:11:20 2020 Received: (at 42983) by debbugs.gnu.org; 24 Aug 2020 00:11:20 +0000 Received: from localhost ([127.0.0.1]:55359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kA052-0005iW-77 for submit@debbugs.gnu.org; Sun, 23 Aug 2020 20:11:20 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:51202) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kA04z-0005iL-SS for 42983@debbugs.gnu.org; Sun, 23 Aug 2020 20:11:18 -0400 Received: from localhost (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id D76253360C6A for <42983@debbugs.gnu.org>; Mon, 24 Aug 2020 02:11:16 +0200 (CEST) Date: Mon, 24 Aug 2020 02:11:13 +0200 From: Danny Milosavljevic To: 42983@debbugs.gnu.org Subject: Re: "sudo -E guix pull" breaks ~/.config/guix/current for regular user Message-ID: <20200824021113.71a79f10@scratchpost.org> In-Reply-To: <20200822122750.78ddc111@scratchpost.org> References: <20200822122750.78ddc111@scratchpost.org> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/S=sYHUX5tIQrRDWhIxQmIS="; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42983 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.7 (-) --Sig_/S=sYHUX5tIQrRDWhIxQmIS= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, 22 Aug 2020 12:27:50 +0200 Danny Milosavljevic wrote: > /var/guix/profiles/per-user/dannym/current-guix Follow-up errors (translated to English manually): dannym@dayas ~$ guix pull Migrating profile generations to =E2=80=9E/var/guix/profiles/per-user/danny= m=E2=80=9C =E2=80=A6 guix pull: error: symlink: file exists: "/var/guix/profiles/per-user/dannym= /current-guix" 1 dannym@dayas ~$ rm ~/.config/guix/current dannym@dayas ~$ cd .config/guix/ dannym@dayas ~/.config/guix$ ln -s /var/guix/profiles/per-user/dannym/curr= ent-guix current dannym@dayas ~/.config/guix$ guix pull Refreshing channel =E2=80=9Eguix=E2=80=9C from Git-Repository =E2=80=9Ehttp= s://git.savannah.gnu.org/git/guix.git=E2=80=9C =E2=80=A6 guix pull: error: Git-Error: failed open - '/home/dannym/.cache/guix/checko= uts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq/.git/FETCH_HEAD' i= s locked: Permission denied That's some weird guix pull state. The culprit, I think, is this: (define (ensure-default-profile) (ensure-profile-directory) ;; In 0.15.0+ we'd create ~/.config/guix/current-[0-9]*-link symlinks. M= ove ;; them to %PROFILE-DIRECTORY. ;; ;; XXX: Ubuntu's 'sudo' preserves $HOME by default, and thus the second ;; condition below is always false when one runs "sudo guix pull". As a ;; workaround, skip this code when $SUDO_USER is set. See ;; . (unless (or (getenv "SUDO_USER") (string=3D? %profile-directory (dirname (canonicalize-profile %user-profile-directory)))) (migrate-generations %user-profile-directory %profile-directory)) where %profile-directory =3D "/var/guix/profiles/per-user/dannym" %user-profile-directory =3D "/home/dannym/.config/guix/current" (which is= a symlink to /var/guix/profiles/per-user/root/current-guix) --Sig_/S=sYHUX5tIQrRDWhIxQmIS= Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl9DBaEACgkQ5xo1VCww uqWiMwf+II/z5OwbmOAELsuZc7REnUj53HpyjvaYLc8Y3tXPvEemo5XX/G/pgfwH lBGMvLvLhLzMXuQCclkimUmaYM5IyFyGpB6Ykc1WDzabMxjW3UUmntUY3sIoKS4V SHvla70Mf+CbClFZ2VHb3roBP/Q9WSSlKuJuG6EseNnLLzpyKRtylYBGGgRYIgLH KWRkmF2pe5mutb+JUMyhMxexRytXg+jxLf5LXnxc1skZ5xlM23MjSLyiIjS+VntH cPDLdO2NZp/CsA5gPzCXwRYf3njDwOWA+2GPGoPzl0OTA4fc1L+nvhj5dTl+RLVQ xnoabBGUl7nNAMIlZr256kLTTLGsOw== =gPgG -----END PGP SIGNATURE----- --Sig_/S=sYHUX5tIQrRDWhIxQmIS=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 04:43:48 2020 Received: (at 42983) by debbugs.gnu.org; 25 Aug 2020 08:43:48 +0000 Received: from localhost ([127.0.0.1]:60259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAUYW-0007Rz-4u for submit@debbugs.gnu.org; Tue, 25 Aug 2020 04:43:48 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:47604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAUYS-0007Ro-D0 for 42983@debbugs.gnu.org; Tue, 25 Aug 2020 04:43:47 -0400 Received: from localhost (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 871203362155; Tue, 25 Aug 2020 10:43:42 +0200 (CEST) Date: Tue, 25 Aug 2020 10:43:39 +0200 From: Danny Milosavljevic To: Bengt Richter , 42983@debbugs.gnu.org Subject: Re: bug#42983: "sudo -E guix pull" breaks ~/.config/guix/current for regular user Message-ID: <20200825104246.2f92dbcc@scratchpost.org> In-Reply-To: <20200824023829.GA18670@LionPure> References: <20200822122750.78ddc111@scratchpost.org> <20200822162009.GA2810@LionPure> <20200824015320.669fb70c@scratchpost.org> <20200824023829.GA18670@LionPure> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/4dapqnuQrxie6=T_XwNboPx"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42983 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.7 (-) --Sig_/4dapqnuQrxie6=T_XwNboPx Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi, On Mon, 24 Aug 2020 04:38:29 +0200 Bengt Richter wrote: > On +2020-08-24 01:53:20 +0200, Danny Milosavljevic wrote: > > Hi, > >=20 > > On Sat, 22 Aug 2020 18:20:09 +0200 > > Bengt Richter wrote: > > =20 > > > BTW, what would sudo guix describe without the -E (preserving user en= vironment) have produced? =20 > ^^^^^^^^^^^^^^ > ^^^^^^^ > >=20 > > I've tried it again (it's 100% reproducible) and I get (after "sudo -E = guix pull"): > >=20 > > dannym@dayas ~$ export LC_ALL=3DC > > dannym@dayas ~$ sudo -E guix describe =20 > ^^^^^^^-- ?? Ohh, yeah, sudo without "-E" works fine (sudo guix pull, too). $ sudo guix describe Passwort:=20 guix 3d9fddb Repository-URL: https://git.savannah.gnu.org/git/guix.git Branch: master Commit: 3d9fddb2683790df26c53e18d4ff9468442e2368 heads 50b97d4 Repository-URL: https://github.com/daym/heads-guix.git Branch: wip-musl Commit: 50b97d446ebafd0be7a0e19d87cd236882093244 > Maybe it would throw some light to try > sudo -iu root env SHELL=3D/gnu/store/87kif0bpf0anwbsaw0jvg8fyciw4sz67-bash-5.0.16/bin/bash XDG_CONFIG_DIRS=3D/root/.guix-profile/etc/xdg:/run/current-system/profile/e= tc/xdg SUDO_GID=3D998 BASH_LOADABLES_PATH=3D/run/current-system/profile/lib/bash LINUX_MODULE_DIRECTORY=3D/run/booted-system/kernel/lib/modules XCURSOR_PATH=3D/root/.icons:/root/.guix-profile/share/icons:/run/current-sy= stem/profile/share/icons SUDO_COMMAND=3D/gnu/store/87kif0bpf0anwbsaw0jvg8fyciw4sz67-bash-5.0.16/bin/= bash -c env NM_VPN_PLUGIN_DIR=3D/gnu/store/mnq8x522qp0f0dd6v9p85xqrsx9pjx4a-network-man= ager-vpn-plugins/lib/NetworkManager/VPN SUDO_USER=3Ddannym GTK_DATA_PREFIX=3D/run/current-system/profile PWD=3D/root LOGNAME=3Droot MANPATH=3D/run/current-system/profile/share/man:/root/.guix-profile/share/m= an:/run/current-system/profile/share/man GUILE_LOAD_PATH=3D/run/current-system/profile/share/guile/site/3.0 XAUTHORITY=3D/run/user/27481/gdm/Xauthority HOME=3D/root GIT_SSL_CAINFO=3D/etc/ssl/certs/ca-certificates.crt LANG=3Dde_AT.utf8 COLUMNS=3D1600 SSL_CERT_DIR=3D/etc/ssl/certs GIO_EXTRA_MODULES=3D/run/current-system/profile/lib/gio/modules PULSE_CLIENTCONFIG=3D/gnu/store/zc4dsmvdabi00nvisrjhi9w00ff4igs7-client.conf GUILE_LOAD_COMPILED_PATH=3D/run/current-system/profile/lib/guile/3.0/site-c= cache:/run/current-system/profile/share/guile/site/3.0 INFOPATH=3D/root/.config/guix/current/share/info:/run/current-system/profil= e/share/info:/root/.guix-profile/share/info:/run/current-system/profile/sha= re/info DICPATH=3D/root/.guix-profile/share/hunspell:/run/current-system/profile/sh= are/hunspell DBUS_FATAL_WARNINGS=3D0 PYTHONPATH=3D/root/.guix-profile/lib/python3.7/site-packages TERM=3Dxterm USER=3Droot TZDIR=3D/gnu/store/pyk3skinp1f72afpd2xdjdi2j80xngr0-tzdata-2020a/share/zone= info DISPLAY=3D:1.0 SHLVL=3D0 GUIX_LOCPATH=3D/run/current-system/locale LC_MEASUREMENT=3Dde_DE.utf8 GST_PLUGIN_PATH=3D/root/.guix-profile/lib/gstreamer-1.0 SSL_CERT_FILE=3D/etc/ssl/certs/ca-certificates.crt NODE_PATH=3D/root/.guix-profile/lib/node_modules LC_TIME=3Dde_DE.utf8 LC_ALL=3Dde_DE.utf8 PULSE_CONFIG=3D/gnu/store/i90b7c63gxd7jf8jqvw2giry88jy3hx0-daemon.conf XDG_DATA_DIRS=3D/run/current-system/profile/share:/root/.guix-profile/share= :/run/current-system/profile/share PATH=3D/run/setuid-programs:/root/.config/guix/current/bin:/root/.guix-prof= ile/bin:/root/.guix-profile/sbin:/run/current-system/profile/bin:/run/curre= nt-system/profile/sbin SUDO_UID=3D27481 MAIL=3D/var/mail/root GUIX_GTK3_PATH=3D/run/current-system/profile/lib/gtk-3.0 _=3D/run/current-system/profile/bin/env > vs > sudo -u root env XAUTHORITY=3D/run/user/27481/gdm/Xauthority LANG=3Dde_AT.utf8 TERM=3Dxterm DISPLAY=3D:1.0 LC_MEASUREMENT=3Dde_DE.utf8 PS1=3D${?#0} \u@\h \w\$=20 LC_TIME=3Dde_DE.utf8 LC_ALL=3Dde_DE.utf8 PATH=3D/home/dannym/.meteor:/home/dannym/.local/scala/bin:/home/dannym/.loc= al/bin:/home/dannym/.local/rust/bin:/home/dannym/.meteor:/home/dannym/.loca= l/scala/bin:/home/dannym/.local/bin:/home/dannym/.local/rust/bin:/run/setui= d-programs:/home/dannym/.config/guix/current/bin:/home/dannym/.guix-profile= /bin:/home/dannym/.guix-profile/sbin:/run/current-system/profile/bin:/run/c= urrent-system/profile/sbin MAIL=3D/var/mail/root LOGNAME=3Droot USER=3Droot HOME=3D/root SHELL=3D/gnu/store/87kif0bpf0anwbsaw0jvg8fyciw4sz67-bash-5.0.16/bin/bash SUDO_COMMAND=3D/run/current-system/profile/bin/env SUDO_USER=3Ddannym SUDO_UID=3D27481 SUDO_GID=3D998 TZDIR=3D/gnu/store/pyk3skinp1f72afpd2xdjdi2j80xngr0-tzdata-2020a/share/zone= info LINUX_MODULE_DIRECTORY=3D/run/booted-system/kernel/lib/modules SSL_CERT_DIR=3D/etc/ssl/certs SSL_CERT_FILE=3D/etc/ssl/certs/ca-certificates.crt GIT_SSL_CAINFO=3D/etc/ssl/certs/ca-certificates.crt GTK_DATA_PREFIX=3D/run/current-system/profile DBUS_FATAL_WARNINGS=3D0 GUIX_LOCPATH=3D/run/current-system/locale PULSE_CONFIG=3D/gnu/store/i90b7c63gxd7jf8jqvw2giry88jy3hx0-daemon.conf PULSE_CLIENTCONFIG=3D/gnu/store/zc4dsmvdabi00nvisrjhi9w00ff4igs7-client.conf NM_VPN_PLUGIN_DIR=3D/gnu/store/mnq8x522qp0f0dd6v9p85xqrsx9pjx4a-network-man= ager-vpn-plugins/lib/NetworkManager/VPN ># should most likely be the same as sudo env It is. >, and maybe also same as sudo -E env No. SHELL=3D/gnu/store/87kif0bpf0anwbsaw0jvg8fyciw4sz67-bash-5.0.16/bin/bash WINDOWID=3D48234509 XDG_CONFIG_DIRS=3D/home/dannym/.guix-profile/etc/xdg:/run/current-system/pr= ofile/etc/xdg GTK_IM_MODULE=3Duim XTERM_VERSION=3DXTerm(353) HISTSIZE=3D BASH_LOADABLES_PATH=3D/run/current-system/profile/lib/bash SSH_AUTH_SOCK=3D/tmp/ssh-LxjFPNecF9So/agent.886 KICAD_TEMPLATE_DIR=3D/home/dannym/.guix-profile/share/kicad/template LINUX_MODULE_DIRECTORY=3D/run/booted-system/kernel/lib/modules PACKAGEPATH=3D/home/dannym/.local/guix/gnu/packages XMODIFIERS=3D@im=3Duim DESKTOP_SESSION=3Dmate SSH_AGENT_PID=3D994 NM_VPN_PLUGIN_DIR=3D/gnu/store/mnq8x522qp0f0dd6v9p85xqrsx9pjx4a-network-man= ager-vpn-plugins/lib/NetworkManager/VPN XTERM_SHELL=3D/gnu/store/87kif0bpf0anwbsaw0jvg8fyciw4sz67-bash-5.0.16/bin/b= ash GDM_DBUS_DAEMON=3D/gnu/store/c34bs9dzcw2nblcmjpvaq97a95ywqbps-gdm-dbus-wrap= per GTK_DATA_PREFIX=3D/run/current-system/profile EDITOR=3Dnano -w XDG_SEAT=3Dseat0 PWD=3D/home/dannym PURPLE_PLUGIN_PATH=3D/home/dannym/.guix-profile/lib/purple-2:/home/dannym/.= guix-profile/lib/pidgin LOGNAME=3Droot XDG_SESSION_DESKTOP=3Dmate XDG_SESSION_TYPE=3Dx11 MANPATH=3D/run/current-system/profile/share/man:/home/dannym/.guix-profile/= share/man:/run/current-system/profile/share/man R_LIBS_SITE=3D/home/dannym/.guix-profile/site-library/ GUILE_LOAD_PATH=3D/run/current-system/profile/share/guile/site/3.0 XAUTHORITY=3D/run/user/27481/gdm/Xauthority WINDOWPATH=3D8 GDM_LANG=3Dde_AT.utf8 GIT_EXEC_PATH=3D/home/dannym/.guix-profile/libexec/git-core GI_TYPELIB_PATH=3D/home/dannym/.guix-profile/lib/girepository-1.0 HOME=3D/home/dannym USERNAME=3Ddannym GIT_SSL_CAINFO=3D/etc/ssl/certs/ca-certificates.crt LANG=3Dde_AT.utf8 XDG_CURRENT_DESKTOP=3DMATE SSL_CERT_DIR=3D/etc/ssl/certs GIO_EXTRA_MODULES=3D/home/dannym/.guix-profile/lib/gio/modules:/run/current= -system/profile/lib/gio/modules:/gnu/store/nsxp18n8yk2k773719a5qc5h6l11f1yq= -dconf-0.34.0/lib/gio/modules PROMPT_COMMAND=3Dexport PREV_COMMAND=3D"" PULSE_CLIENTCONFIG=3D/gnu/store/zc4dsmvdabi00nvisrjhi9w00ff4igs7-client.conf XTERM_LOCALE=3Dde_DE.utf8 GUILE_LOAD_COMPILED_PATH=3D/run/current-system/profile/lib/guile/3.0/site-c= cache:/run/current-system/profile/share/guile/site/3.0 INFOPATH=3D/home/dannym/.config/guix/current/share/info:/home/dannym/.guix-= profile/share/info:/run/current-system/profile/share/info:/home/dannym/.gui= x-profile/share/info:/run/current-system/profile/share/info DICPATH=3D/home/dannym/.guix-profile/share/hunspell:/run/current-system/pro= file/share/hunspell GDM_X_SESSION=3D/gnu/store/q8bc2cv7dcbx97ka6lq82dbkg4v2v283-xinitrc GDM_CUSTOM_CONF=3D/gnu/store/x9jrhvajqpdfk4hhkw5bxplg7fisx6pg-gdm-custom.co= nf XDG_SESSION_CLASS=3Duser DBUS_FATAL_WARNINGS=3D0 TERM=3Dxterm GTK_PATH=3D/gnu/store/c4dspf0c3p445rx4hsddsd2dv962i4b1-libcanberra-0.30/lib= /gtk-3.0:/gnu/store/067bymbx50ng0fll7zi3mpmsjwbrlja4-gtk+-3.24.20/lib/gtk-3= .0 CPLUS_INCLUDE_PATH=3D/home/dannym/.guix-profile/include/c++:/home/dannym/.g= uix-profile/include USER=3Droot LIBRARY_PATH=3D/home/dannym/.guix-profile/lib PYTHONIOENCODING=3Dutf-8 DISPLAY=3D:1.0 SHLVL=3D1 GUIX_LOCPATH=3D/run/current-system/locale QT_IM_MODULE=3Duim LC_MEASUREMENT=3Dde_DE.utf8 XDG_VTNR=3D8 XDG_SESSION_ID=3Dc2 GST_PLUGIN_PATH=3D/home/dannym/.guix-profile/lib/gstreamer-1.0 XDG_RUNTIME_DIR=3D/run/user/27481 SSL_CERT_FILE=3D/etc/ssl/certs/ca-certificates.crt PREV_COMMAND=3D PS1=3D${?#0} \u@\h \w\$=20 NODE_PATH=3D/home/dannym/.guix-profile/lib/node_modules LC_TIME=3Dde_DE.utf8 GST_PLUGIN_SYSTEM_PATH=3D/home/dannym/.guix-profile/lib/gstreamer-1.0 LC_ALL=3Dde_DE.utf8 PULSE_CONFIG=3D/gnu/store/i90b7c63gxd7jf8jqvw2giry88jy3hx0-daemon.conf XDG_DATA_DIRS=3D/home/dannym/.guix-profile/share:/run/current-system/profil= e/share:/home/dannym/.guix-profile/share:/run/current-system/profile/share BROWSER=3Dicecat PATH=3D/home/dannym/.meteor:/home/dannym/.local/scala/bin:/home/dannym/.loc= al/bin:/home/dannym/.local/rust/bin:/home/dannym/.meteor:/home/dannym/.loca= l/scala/bin:/home/dannym/.local/bin:/home/dannym/.local/rust/bin:/run/setui= d-programs:/home/dannym/.config/guix/current/bin:/home/dannym/.guix-profile= /bin:/home/dannym/.guix-profile/sbin:/run/current-system/profile/bin:/run/c= urrent-system/profile/sbin GDMSESSION=3Dmate GHC_PACKAGE_PATH=3D/home/dannym/.guix-profile/lib/ghc-8.6.5/package.conf.d GDM_X_SERVER=3D/gnu/store/1lcxxwl5rmbqqvbr8rbfyhyc7v10s27l-X-wrapper DBUS_SESSION_BUS_ADDRESS=3Dunix:abstract=3D/tmp/dbus-dRjt5ThTHH,guid=3D5feb= 1b57970b7afe5fea4e5b5f39031f C_INCLUDE_PATH=3D/home/dannym/.guix-profile/include EMACSLOADPATH=3D/home/dannym/.guix-profile/share/emacs/site-lisp:/home/dann= ym/.guix-profile/share/emacs/26.3/lisp GUIX_GTK3_PATH=3D/home/dannym/.guix-profile/lib/gtk-3.0:/run/current-system= /profile/lib/gtk-3.0 MICRO_TRUECOLOR=3D1 _=3D/run/setuid-programs/sudo SUDO_COMMAND=3D/run/current-system/profile/bin/env SUDO_USER=3Ddannym SUDO_UID=3D27481 SUDO_GID=3D998 TZDIR=3D/gnu/store/pyk3skinp1f72afpd2xdjdi2j80xngr0-tzdata-2020a/share/zone= info --Sig_/4dapqnuQrxie6=T_XwNboPx Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl9EzzsACgkQ5xo1VCww uqXp9wf/RRz41DswZoIQootVi4WZPWAlu9htctDV8IGLqLUpNRdLt7FDJD7UTPq5 Hg5O5+kaoJVjHs+jnZiv3kbK0Sw6LziKdptouFaYcK1z0zaUiUb2/Nk3MtzXuJkD Wm10y2ztG0ODcmKnSkFmj0kGQdkDTRrzfFpm2rNK8BQmiYMeiaGGVfkeNSkbF/ZL hsI2ppcwXRG29fMCX0Eavl4cJiiwFcMvLlXSWHcL+hAzlSPLj0IRkVg8GhhO+2l6 Okj7Eg76CYU7Xs6BdCUJBrVX0GBpVL0c3/8MmFCvvxUD+L7E4VEEGrPMlpPHZX/b JjxBaPkOUu6GZmXsp1Z7Gg5Kdz9F9Q== =76oW -----END PGP SIGNATURE----- --Sig_/4dapqnuQrxie6=T_XwNboPx-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 28 09:41:16 2020 Received: (at 42983) by debbugs.gnu.org; 28 Aug 2020 13:41:16 +0000 Received: from localhost ([127.0.0.1]:45693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBed1-00082P-KU for submit@debbugs.gnu.org; Fri, 28 Aug 2020 09:41:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBed0-00082D-8v for 42983@debbugs.gnu.org; Fri, 28 Aug 2020 09:41:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58373) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBecu-0007iy-9U; Fri, 28 Aug 2020 09:41:08 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=49106 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kBect-0007ub-Qm; Fri, 28 Aug 2020 09:41:08 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Danny Milosavljevic Subject: Re: bug#42983: "sudo -E guix pull" breaks ~/.config/guix/current for regular user References: <20200822122750.78ddc111@scratchpost.org> <20200824021113.71a79f10@scratchpost.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 12 Fructidor an 228 de la =?utf-8?Q?R=C3=A9volution?= 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: Fri, 28 Aug 2020 15:41:05 +0200 In-Reply-To: <20200824021113.71a79f10@scratchpost.org> (Danny Milosavljevic's message of "Mon, 24 Aug 2020 02:11:13 +0200") Message-ID: <87sgc6q45q.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (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: 42983 Cc: 42983@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 Danny, Danny Milosavljevic skribis: > The culprit, I think, is this: > > (define (ensure-default-profile) > (ensure-profile-directory) > > ;; In 0.15.0+ we'd create ~/.config/guix/current-[0-9]*-link symlinks. = Move > ;; them to %PROFILE-DIRECTORY. > ;; > ;; XXX: Ubuntu's 'sudo' preserves $HOME by default, and thus the second > ;; condition below is always false when one runs "sudo guix pull". As a > ;; workaround, skip this code when $SUDO_USER is set. See > ;; . > (unless (or (getenv "SUDO_USER") > (string=3D? %profile-directory > (dirname > (canonicalize-profile %user-profile-directory)))) > (migrate-generations %user-profile-directory %profile-directory)) > > where > > %profile-directory =3D "/var/guix/profiles/per-user/dannym" > %user-profile-directory =3D "/home/dannym/.config/guix/current" (which = is a > symlink to /var/guix/profiles/per-user/root/current-guix) We could detect such inconsistencies and emit a warning/hint. I=E2=80=99m unsure just how far we need to go in trying to prevent users from shooting themselves in the foot, though. Thoughts? > Ohh, yeah, sudo without "-E" works fine (sudo guix pull, too). Yes. Ludo=E2=80=99.