Thus quoth Leo Famulari on Mon Mar 22 2021 at 01:11 (+0100): > I'm happy to help, but unfortunately, the paste that included the error > messages is no longer online: > > https://lists.gnu.org/archive/html/help-guix/2021-03/msg00184.html > > This illustrates why it is important to include all relevant details of > a problem in the email, rather than linking to external sites. > > Can any of you share the error messages, to refresh my memory? I attach the complete error log as the plain text file original-error-message. It's the message I got today, but I think I got the same or a very similar message a couple of days ago. (And I didn't save it because I thought it was transient.) > I was hoping to use the following info to see if you were using a > version of Guix that preceded a bug fix, but now I can't tell. I do > think your bug has been fixed recently, and that `guix pull && sudo guix > system reconfigure ...` will fix your problem, but I wanted to be sure. Yaay! It worked! Not directly though: I did a `guix gc` first, because I seemed stuck on the same error message all the time, then I had to run `guix pull` multiple times, because I was getting different error messages. I attach the files transient-error-1 and transient-error-2 to give some examples, but I got about 5 or 6 of them in total. guix pull did manage to finish successfully though, so I'm quite happy, and I can live with occasional transient network issues. `sudo guix system reconfigure /etc/config.scm` has showed some download errors, but they consistently went away when I retried the command, so that's fine. Thank you the Guix team for working hard! > Here are some general observations and advice: Thank you very much for taking your time! > On Sun, Mar 21, 2021 at 09:27:12AM +0100, Sergiu Ivanov wrote: >> Thus quoth Leo Famulari on Sat Mar 20 2021 at 23:10 (+0100): >> > $ guix describe >> >> Generation 5 Mar 16 2021 10:31:09 (current) >> [blurred] >> guix db87d6d >> repository URL: https://git.savannah.gnu.org/git/guix.git >> branch: master >> commit: db87d6ddafd26c5ad657178cf7fdab524d05c522 > > Okay. This is a recent version of Guix. > >> > $ sudo --login guix describe >> >> Generation 1 Feb 02 2021 10:36:19 (current) >> [blurred] >> guix 625708b >> repository URL: https://git.savannah.gnu.org/git/guix.git >> branch: master >> commit: 625708b03a37fc2a33c437b8e27856ca76965f43 > > This is probably the Guix at '/root/.config/guix/current/bin/guix'. That > is the root user's Guix command, created and updated with `guix pull` as > root. It's from early February. Ah, just reading this paragraph fixed things in my brain. I moved the directory /root/.config/guix to some temporary place from where I will delete it soon. >> $ sudo su >> $ guix describe >> >> which gave me >> >> guix c8887a5 >> repository URL: https://git.savannah.gnu.org/git/guix.git >> branch: master >> commit: c8887a5c6e8f6a19d54ffa428c6fe88a797b867a > > This is probably the system's Guix command, at > '/run/current-system/profile/bin/guix'. It's recent. Yes! After moving /root/.config/guix away, both `sudo --login guix describe` and first doing `sudo su` and then `guix describe` give me the same results, probably because both are running the same system's Guix command. I was quite confused by getting different results in these two cases, and I really happy to have sorted this out. (Also, later in this message I learnt something about sudo and su :-)) > Based on this, I guess you are updating the system by `guix pull` as > your regular user and then `sudo guix system reconfigure ...`. Is that > correct? Yes, exactly. I once accidentally did `sudo guix pull`, which brought in that extra Guix in /root/.config/guix, but I don't normally do that. > The different results between those two sudo commands shows an important > and confusing issue with privilege elevation on Linux: > > There is a difference between plain `sudo` and `sudo --login`. > > `su` is an entirely different command, and it also does something > different than `su --login`. > > Basically, plain `sudo` and `su` put the user into an incomplete and > typically unexpected environment, as compared to using the "--login" > options. One could say they turn you into "nobody", but with privileges. > > In general, I recommend to learn the difference between them and use > them accordingly. > > On old-school distros, there is not usually a big problem, but on Guix > it really matters, because we use the login shell initialization to > export some environment variables, and the resulting environment is what > provides the per-user view of installed packages. > > So, if you don't login when elevating privileges, you get a weird > environment and your view of Guix will be unexpected. As you noticed, > the environment you got from `sudo su` lacked any user's packages or > channels. Thank you very much for the explanation! I have just checked out the manpages for sudo, su, and their corresponding --login options. I knew that there was a difference between sudo and su, but I actually thought su was doing what `sudo --login` does! That doesn't seem true. As you say, it has never really mattered for me, and I didn't feel any difference even in 4 years of using NixOS. I'm happy to learn that I have to pay attention to those differences with Guix. >> I think I did guix pull as root once at the beginning of the >> installation of this machine 3 months ago. I ran sudo guix pull >> a couple of times, before I managed to remember that guix pull should be >> run as normal user (I think?). > > `guix pull` should be run as any user that you use. So, if you ever use > the root user, we highly recommend you update root's packages sometimes, > too. If you never login as root, and do not run any programs as root, > then it doesn't matter very much. Nah, I don't ever login as root, so I stick to running `guix pull` as my normal user. I realize from what you are saying that users on a system may all have different versions of Guix, and they will peacefully co-exist. Not my use case, but quite impressive! >> The blurred parts of the output are due to the fact that Linux Libre >> does not detect all my devices. >> >> By the way, please tell me if there is anything inappropriate in my >> message: I'm still not sure how to talk about certain things, as you can >> see :-) > > No worries :) I don't think those other channels are relevant to your > problem. They were not indeed. Thanks again! - Sergiu