GNU bug report logs - #40344
inconsistent 'guix package --list-generations' for root

Previous Next

Package: guix;

Reported by: Efraim Flashner <efraim <at> flashner.co.il>

Date: Tue, 31 Mar 2020 08:56:02 UTC

Severity: normal

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 40344 in the body.
You can then email your comments to 40344 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#40344; Package guix. (Tue, 31 Mar 2020 08:56:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Efraim Flashner <efraim <at> flashner.co.il>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 31 Mar 2020 08:56:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: bug-guix <at> gnu.org
Subject: inconsistent 'guix package --list-generations' for root
Date: Tue, 31 Mar 2020 11:54:36 +0300
[Message part 1 (text/plain, inline)]
When I run 'sudo guix package --list-generations' on a foreign distro
I get a list of all the profiles for all the users, not just for root.
When I run 'sudo guix package --list-generations' on Guix System I get:
guix package: error: profile '/var/guix/profiles/per-user/root/guix-profile' does not exist

1: it probably shouldn't error if the default profile doesn't exist
2: I like the idea of root being able to, say, clean up all the profiles
over a certain age (ie.: guix package --delete-generations 6m). On the
other hand it is unexpected behavior since root is "just another user"

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#40344; Package guix. (Tue, 31 Mar 2020 15:46:01 GMT) Full text and rfc822 format available.

Message #8 received at 40344 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 40344 <at> debbugs.gnu.org
Subject: Re: bug#40344: inconsistent 'guix package --list-generations' for root
Date: Tue, 31 Mar 2020 11:45:48 -0400
On Tue, Mar 31, 2020 at 11:54:36AM +0300, Efraim Flashner wrote:
> When I run 'sudo guix package --list-generations' on a foreign distro
> I get a list of all the profiles for all the users, not just for root.

It's complicated on foreign distros, since they vary in how they
configure sudo, and since Guix is really based on login environments.

I think it's correct that you'd see your own user's generations. Doing
`sudo foo` doesn't totally change your user from Guix's point of view,
just your privilege level. You'd need `sudo --login` to become root.

Try `env`, `sudo env`, `sudo --login env`...

It's definitely not expected to see all the users' generations, though
(I can't reproduce that).

Exactly how it works on the foreign distro will probably vary by distro
and setup, however. `sudo guix ...` doesn't work at all on my Debian; it
fails with "sudo: guix: command not found" and I have to use `sudo
--login`.




Reply sent to Efraim Flashner <efraim <at> flashner.co.il>:
You have taken responsibility. (Tue, 31 Mar 2020 17:49:02 GMT) Full text and rfc822 format available.

Notification sent to Efraim Flashner <efraim <at> flashner.co.il>:
bug acknowledged by developer. (Tue, 31 Mar 2020 17:49:02 GMT) Full text and rfc822 format available.

Message #13 received at 40344-done <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Leo Famulari <leo <at> famulari.name>
Cc: 40344-done <at> debbugs.gnu.org
Subject: Re: bug#40344: inconsistent 'guix package --list-generations' for root
Date: Tue, 31 Mar 2020 20:48:03 +0300
[Message part 1 (text/plain, inline)]
Looks like I messsed up the bug report completely and mixed up
--list-profiles and --list-generations.

If anyone is curious, when run as root, 'guix package --list-profiles'
on Guix system and on a foreign distro, for me, return a list of all the
profiles of all the users.

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#40344; Package guix. (Tue, 31 Mar 2020 18:18:02 GMT) Full text and rfc822 format available.

Message #16 received at 40344-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 40344-done <at> debbugs.gnu.org
Subject: Re: bug#40344: inconsistent 'guix package --list-generations' for root
Date: Tue, 31 Mar 2020 14:17:26 -0400
[Message part 1 (text/plain, inline)]
On Tue, Mar 31, 2020 at 08:48:03PM +0300, Efraim Flashner wrote:
> Looks like I messsed up the bug report completely and mixed up
> --list-profiles and --list-generations.
> 
> If anyone is curious, when run as root, 'guix package --list-profiles'
> on Guix system and on a foreign distro, for me, return a list of all the
> profiles of all the users.

Can you share the exact command you run and the result of `env` with
that sudo invocation? For example, if you are doing `sudo guix package
--list-profiles`, the result of `sudo env`? Having sanitized it as
necessary...
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#40344; Package guix. (Tue, 31 Mar 2020 18:32:02 GMT) Full text and rfc822 format available.

Message #19 received at 40344-done <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Leo Famulari <leo <at> famulari.name>
Cc: 40344-done <at> debbugs.gnu.org
Subject: Re: bug#40344: inconsistent 'guix package --list-generations' for root
Date: Tue, 31 Mar 2020 21:30:53 +0300
[Message part 1 (text/plain, inline)]
On Tue, Mar 31, 2020 at 02:17:26PM -0400, Leo Famulari wrote:
> On Tue, Mar 31, 2020 at 08:48:03PM +0300, Efraim Flashner wrote:
> > Looks like I messsed up the bug report completely and mixed up
> > --list-profiles and --list-generations.
> > 
> > If anyone is curious, when run as root, 'guix package --list-profiles'
> > on Guix system and on a foreign distro, for me, return a list of all the
> > profiles of all the users.
> 
> Can you share the exact command you run and the result of `env` with
> that sudo invocation? For example, if you are doing `sudo guix package
> --list-profiles`, the result of `sudo env`? Having sanitized it as
> necessary...

This time I ran it as root directly
On my kids' computer:
root <at> E2140 /home/efraim# guix package --list-profiles
/var/guix/profiles/per-user/efraim/current-guix
/var/guix/profiles/per-user/efraim/guix-profile
/var/guix/profiles/per-user/kids/current-guix
/var/guix/profiles/per-user/kids/guix-profileo

Guix on Debian, also directly as root:
debian-box:/home/efraimf# guix package --list-profiles | tail -n20
/var/guix/profiles/per-user/user1/current-guix
/var/guix/profiles/per-user/user1/guix-profile
/var/guix/profiles/per-user/user2/guix-profile
/var/guix/profiles/per-user/user3/current-guix
/var/guix/profiles/per-user/user3/guix-profile
/var/guix/profiles/per-user/user4/current-guix
/var/guix/profiles/per-user/user4/guix-profile
/var/guix/profiles/per-user/user5/current-guix
/var/guix/profiles/per-user/user5/guix-profile
/root/.config/guix/current
/root/.guix-profile
/var/guix/profiles/per-user/user6/current-guix
/var/guix/profiles/per-user/user6/guix-profile
/var/guix/profiles/per-user/user7/current-guix
/var/guix/profiles/per-user/user7/guix-profile
/var/guix/profiles/per-user/user8/current-guix
/var/guix/profiles/per-user/user8/guix-profile
/var/guix/profiles/per-user/user9/current-guix
/var/guix/profiles/per-user/user9/guix-profile
/var/guix/profiles/per-user/user10/guix-profile

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#40344; Package guix. (Tue, 31 Mar 2020 18:57:02 GMT) Full text and rfc822 format available.

Message #22 received at 40344-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 40344-done <at> debbugs.gnu.org
Subject: Re: bug#40344: inconsistent 'guix package --list-generations' for root
Date: Tue, 31 Mar 2020 14:56:32 -0400
[Message part 1 (text/plain, inline)]
Sorry to add to the confusion. I didn't even realize there was a
`guix package --list-profiles` command...
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 29 Apr 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 58 days ago.

Previous Next


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