inconsistent 'guix package --list-generations' for root

  • Done
  • quality assurance status badge
Details
2 participants
  • Efraim Flashner
  • Leo Famulari
Owner
unassigned
Submitted by
Efraim Flashner
Severity
normal
E
E
Efraim Flashner wrote on 31 Mar 2020 10:54
(address . bug-guix@gnu.org)
20200331085436.GD5436@E5400
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@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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl6DBUgACgkQQarn3Mo9
g1HpCw/+JAw4G6UJywcTQoegod/7Cwq7JMN6ADfiyEFrypeW8EuGy6QVt3lhS0xs
GuYZ3YABBTIaEszyr3WDReooalvesrmSrdCIMWKiMW8vdZzo56tG7wZxxe1e3IXe
vYkEPDndnp0Q0LNjQT0k+MsyMX5wAuqM4iKE6zeus9AyaBMxFNvikspQl3fC874v
YnJ3U+KRY8MfFzjs+dJA9uoKLXt5/qMtTgIAiIJF4/62+1vRRR8CqTQX3xgWFvxF
HhoEYupWWviq164bT5cqZmfAlpCXXlZ6MdW/7hcg6GUDCWE6g2K2ie6qGhF1UDny
SFd3tDdGTbTEWCPbnvUg6EasIOC8LHPTMy2DnMf9P3gKI1uVqr2w5+Hn92P2QHJ7
ZvI45p3Wa6pxWH6Ri8gnMxVgAnaWZLv/DyZZ0ZBrWlzhQhTpBWgkD/ZsiNNRLIhm
Yd3KxU7y/Dekj+pYgKkdb7IF05i87qOGwmYUIV4+k+lU5iUSAoEMNfrWyMMnoauf
XMXfJAwW25BIiLkIkyftvkboi1e74WUittU+5517lvmZKJ4KF94cASu4aCPthr6z
OYf8kTCKa1Vm7GfClgQTeaZIB1eWnXtH4+z2s9sCIWgG/64zwDyqGXi13mH9rEmV
wPjdtne3n/8Af3Iry1midxlLOFinwGDS/HHxhWsw90Eu5dHYADg=
=hZ5a
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 31 Mar 2020 17:45
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 40344@debbugs.gnu.org)
20200331154548.GA9695@jasmine.lan
On Tue, Mar 31, 2020 at 11:54:36AM +0300, Efraim Flashner wrote:
Toggle quote (3 lines)
> 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`.
E
E
Efraim Flashner wrote on 31 Mar 2020 19:48
(name . Leo Famulari)(address . leo@famulari.name)(address . 40344-done@debbugs.gnu.org)
20200331174803.GJ5436@E5400
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@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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl6DglAACgkQQarn3Mo9
g1H09A//S1IrTQ/0u6R45qzOA8W9QjM9X2EKQaifxfHjCGsnEkMVM0usfMFymwbT
q3zn0zzY0WruHdgG5p84qaNMYZvuiGBWqiXdiP3yhTcUIbBpbjlcpx+1AEhyLgXG
8x91uhx/Y5bkz0z6cOwELTB0zVou/0fSFEBwp+GPyfM2qnG+27+EeM8mEY0w+ToU
0XfirouGSleIecLpsgwkckL4r/Wq22BqAWgomcXi2dTb6hH6nzx9bhT3jTrQ4nBy
Mcxb0fiRKfaXJB8YmZLmBQZ//bivl8oJLabMHVoqGtrS6FVgHcChu7gAnQa0KGi5
ClnGro9DEftrK3fxWoIvoTs3Fc/ZlqV/yP3C7IxVQR+nh31TYf6mYQatP8BkTc0x
WWrDqLujyZlpfPQy8I/1LBQZY+avm5rYkmRGRC+VxV+aNU8qoU4PK70dnxcvM94L
tf1fP24Eing+MeraSQQMQgIk1iTYDilLaYmgjcq7CMC8sqgD3JqM5ogP7O3wu8vB
K5NrqRDxXB0HwWe6vTA5vCsqNZblQ6A7wUsWIt8EtcbBvnZkFgfHP1ZRBYba5cNq
FbmXVX6DD5xpiq7vN0Bfqp0L+EzcXu4xNPx/zKzVhW8BSHh3MM7mQVoT32bZaOsk
qfb8K7tX26fR6U9r9pQFR3UizRseDSh/fBwOh6PtM0wGWSB/9iQ=
=2Bs8
-----END PGP SIGNATURE-----


Closed
L
L
Leo Famulari wrote on 31 Mar 2020 20:17
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 40344-done@debbugs.gnu.org)
20200331181726.GA12660@jasmine.lan
On Tue, Mar 31, 2020 at 08:48:03PM +0300, Efraim Flashner wrote:
Toggle quote (7 lines)
> 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...
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAl6DiTUACgkQJkb6MLrK
fwj8jhAA1sNoCU6E3IopSECX0xCYCUSHf3g8ocbShQD+7Sv91nTALABkwIMN9e2X
j5ppZ0PybWQaOwEAyBYw7OAPiY0plh3hqJGNPLiZE+3UU3Z5n9+anrOwJJ4gYl7s
omB/OAINJkMgUDDEww+iJlrM4P4Sixhb5+FPycHg6lr2TSkk3X7XjdcTpfdtMVj4
nwaFXRmJ09yU4bjKnHCF3foXn1QAmC5FkStw152r611FIj/EPy7X74vu8SD6m/gU
2+FpWwVivli+Y+EWCAKKH/EYbWM4/b+ikua79yQvHzztharpW0uaQOJLjr9ldCJ1
xP5iivfkg4GYbRiN/lHBySvfRvadymweKgD66g1l+Pc+Zv1J/bO0SJru0McONs3/
JFkYYox5FU4EERsT9Ire5Uv36cc+4+/0DRwLh9U1f++Er5jmA1uBVRSFzdX08NtB
BsPhty3lBlisgtSTKCNGGlXcE3XO2NuQT8hXBxtu6LluZv+S3upb9/Ds4eAOFhaP
P2qfgydlaumMfPaQsNuPgA6bi6lyX4wBTWlmmzAD+bv1S79DE6VoJhVBxUyFpwD6
DKxuMYrXerr5VmRHD6FL2JCDFJLyeTYCbOBD0Mw7TfucgFH2TJm2KAlW+2ANwTYX
syEU0wXCR5AirohijTYAGaDMOIVtqDfA8TSzexjp6DTatRQpAsY=
=uiIM
-----END PGP SIGNATURE-----


Closed
E
E
Efraim Flashner wrote on 31 Mar 2020 20:30
(name . Leo Famulari)(address . leo@famulari.name)(address . 40344-done@debbugs.gnu.org)
20200331183053.GK5436@E5400
On Tue, Mar 31, 2020 at 02:17:26PM -0400, Leo Famulari wrote:
Toggle quote (13 lines)
> 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@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@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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl6DjFoACgkQQarn3Mo9
g1HMNw//ScAfmKU3/8XwU6F2txL5NVMosiW2i/VOsn8q6YEplDEXbvZSQ1WChWTc
1WP6NWenvgWvXb3A9FdBboKg+pSKVBgyKAeNA74RErUlNIuxxIMYtPkspSXHd2EM
ZAjmjiVfWobk2/dJn3WATsI27WzVs+5Mw8ZClRKi/1Q+UTryo4MSU7TSe1uq/LiJ
jku7JL2GJxyVvl145XhoO3BMI4p4citlB1r4uODvM2tyKv4fGxMEBmMKyzKRgzHm
e0t4wqzLxTbimRidC+G1qYBNGzCYpcjgdLuJ0SbiAfgmka2TnQhSjtyMPMFRlzj9
Ho3/owHR2jwg3+9FgX9vOsZSSCeXaKJSk+d8Ju1nHIDba5JD+ju9d8JU5fEK8GDR
tsRVm+Swjuol62KcKDOuSlxDho5J/0flADmcvra5LMsPptlqaZZtVQzjnmYQ2bAB
1OufDCQT7cyoiX02GfeTPxo0RmgiIH285uE8YVHSDy6CslBlW3qmNdfoG8KosePn
waOjHpgfChikJsrzajelFRBMStgbQnLVsWW71G86AxzmfutZH6Mkmd+doU7D7CXl
rbp/NQ7uphQ/k0m/u7Qh6DzJ22cwKZTyJs8YhqszD0gkHQMlyo4NGSKm3E3C7hU7
SQErsrhvK1NwYCqoamdI1XGQlMMpFw4fRKumoXp82h1DZQ+OLwE=
=4pDm
-----END PGP SIGNATURE-----


Closed
L
L
Leo Famulari wrote on 31 Mar 2020 20:56
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 40344-done@debbugs.gnu.org)
20200331185632.GA15381@jasmine.lan
Sorry to add to the confusion. I didn't even realize there was a
`guix package --list-profiles` command...
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAl6DklwACgkQJkb6MLrK
fwieFg//cVqwxBNpw8HcwnSz4FVbijtHbq3xkxgqFm2qUUBT1oB18rbztM9joKk+
+aM8qK2ZQM1r6xdR0ZS5C/xYaBSk+GHl1KrTlrWz+8+0HND7Syc13dGLTf9+NW+M
Njyg2+otDbLM/ws0pTgnXVbRBF21mkLfn30ScxkuOxPGTItLjkHdNWT141zS635b
A7VzF3pySci0gXM4A5O8jSBniBfDOcaf+LLfe3F6BUc0CqoHO6pCa9xQXPAzTL73
OV17PgK1BUIn0H7Ad7eNG+kx3KuObKdNobDNr/iqk28L06Pk7xDPx1IONGLohjA4
i7rEqSxiiD8WN1uB+HXBDu/zMaezNp+qxSDxdEtLKs9y2F0Dleg1g6GzsoJYjiv3
VVaHE6WXnnpKzzW8whgxdLRdniJpWbrKDNKa61pXrPLpGjs5LWdMfB2Uzp8fqBsZ
YN+e9VcTsz0MB94mqdXb3MnL/wfKJJkZokp++KEv8lDer1qvo1GXV05xhtKHvdD0
vAxtQgzw0Epf7WVxJQYiR362WuaondI4kGNeeA8/dFvNo25SchQ/CbILh17vO1/u
GU5iJr/PfO4QBzAiOxEcfHUzEzs0q1fenvho3J2QlRIEZzJ6ODhI3mFKSHYh9ZW5
TubkSbhI2PoRHBOLxNf0IO4IS8TkjtFm2NR6Bu1VIILamR9HREc=
=kLwK
-----END PGP SIGNATURE-----


Closed
?