GNU bug report logs - #42983
"sudo -E guix pull" breaks ~/.config/guix/current for regular user

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Danny Milosavljevic <dannym@HIDDEN>; dated Sat, 22 Aug 2020 10:29:02 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 42983 <at> debbugs.gnu.org:


Received: (at 42983) by debbugs.gnu.org; 22 Aug 2020 16:22:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 22 12:22:52 2020
Received: from localhost ([127.0.0.1]:51209 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k9WI8-0000zc-9E
	for submit <at> 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 <leo@HIDDEN>) id 1k9WI5-0000zP-Ca
 for 42983 <at> 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: <xms:U0ZBXzokjd1mPKkF0BypZ7pOFNbpRqYqCfeBLfV338uGGwOSNn23wA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddugedguddtvdcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepnfgvohcu
 hfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhirdhnrghmvgeqnecuggftrfgrth
 htvghrnhepueekkedtffdvtddugeejgedtvefhueefiedvjeeitdeigedtveejvdejheff
 vefgnecukfhppeejfedrudeguddruddvjedrudegieenucevlhhushhtvghrufhiiigvpe
 dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv
X-ME-Proxy: <xmx:U0ZBX9qkEh102-d_srMH0jxiKv3d5zlxsGGl5eaXulEaTLB1oaeWBw>
 <xmx:U0ZBXwNlZB0JP43kSV1gNTaowJRzWKrf9lIGwxakgBsZZU6XB9LDKg>
 <xmx:U0ZBX24gJ7Q1Cn9kaLYGYVUwJG4y-zVp8N4LuurSVYufx9ZfzNghaw>
 <xmx:VEZBX0EcZAd7TrOv7mj-gXo3vtvm0jYQvTUZvOnrc4opiE4WiiPXxQ>
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 <leo@HIDDEN>
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: bug#42983: "sudo -E guix pull" breaks ~/.config/guix/current for
 regular user
Message-ID: <20200822162241.GA5895@HIDDEN>
References: <20200822122750.78ddc111@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20200822122750.78ddc111@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 42983
Cc: 42983 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sat, Aug 22, 2020 at 12:27:50PM +0200, Danny Milosavljevic wrote:
> Paul <paul@HIDDEN> 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?




Information forwarded to bug-guix@HIDDEN:
bug#42983; Package guix. Full text available.

Message received at 42983 <at> debbugs.gnu.org:


Received: (at 42983) by debbugs.gnu.org; 22 Aug 2020 16:20:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 22 12:20:24 2020
Received: from localhost ([127.0.0.1]:51192 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k9WFk-0000uv-Ag
	for submit <at> 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 <bokr@HIDDEN>) id 1k9WFj-0000uo-9h
 for 42983 <at> 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 <bokr@HIDDEN>
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: bug#42983: "sudo -E guix pull" breaks ~/.config/guix/current for
 regular user
Message-ID: <20200822162009.GA2810@LionPure>
References: <20200822122750.78ddc111@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20200822122750.78ddc111@HIDDEN>
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 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Bengt Richter <bokr@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.4 (-)

Hi,

On +2020-08-22 12:27:50 +0200, Danny Milosavljevic wrote:
> Hello,
> 
> Paul <paul@HIDDEN> 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




Information forwarded to bug-guix@HIDDEN:
bug#42983; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 22 Aug 2020 10:28:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 22 06:28:07 2020
Received: from localhost ([127.0.0.1]:48915 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k9Qkp-0000sS-NF
	for submit <at> 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 <dannym@HIDDEN>) id 1k9Qkk-0000s5-2f
 for submit <at> 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 <dannym@HIDDEN>)
 id 1k9Qkj-0007xe-Rs
 for bug-guix@HIDDEN; 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 <dannym@HIDDEN>)
 id 1k9Qkh-00041l-N2
 for bug-guix@HIDDEN; 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 <bug-guix@HIDDEN>; Sat, 22 Aug 2020 12:27:55 +0200 (CEST)
Date: Sat, 22 Aug 2020 12:27:50 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: <bug-guix@HIDDEN>
Subject: "sudo -E guix pull" breaks ~/.config/guix/current for regular user
Message-ID: <20200822122750.78ddc111@HIDDEN>
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@HIDDEN; 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 <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--Sig_/woRHX4ql0x6sjWi.7AbL.V3
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hello,

Paul <paul@HIDDEN> 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--




Acknowledgement sent to Danny Milosavljevic <dannym@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#42983; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 22 Aug 2020 16:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.