Re: Should I upgrade root user's guix too?
> I got this idea after reading ‘(guix) Invoking guix pull’. > > (1) Under the hood, ‘guix pull’ updates the ‘~/.config/guix/latest’ > symbolic link to point to the latest Guix, and the ‘guix’ command > loads code from there. Currently, the only way to roll back an > invocation of ‘guix pull’ is to manually update this symlink to > point to the previous Guix. > > Some folks just do ‘/root/.config/guix/latest -> ~/.config/guix/latest’ > symlink. But I like to have a script which I could run manually as > needed. Oleg, Thank you! I've forgotten about that paragraph I read a long time ago. Thanks for your reminding me. Have a nice day! ;) -- Attic Hermit
Re: Should I upgrade root user's guix too?
Attic Hermit writes: >> #!/bin/sh >> GUIX_LATEST=/root/.config/guix/latest >> unlink $GUIX_LATEST && ln -s $(readlink $HOME/.config/guix/latest) >> $GUIX_LATEST To be sure your tip, I read the part of source code of guix pull and try to understand what it really do: http://git.savannah.gnu.org/cgit/guix.git/tree/guix/scripts/pull.scm and it seems that it only builds latest guix and make a symlink to ~/.config/guix/latest. Is that all? I'm little nervous that if I've missed something. If it is correct, then I can use your tip without doubt. -- Attic Hermit
Re: Should I upgrade root user's guix too?
Oleg Pykhalov writes: > #!/bin/sh > GUIX_LATEST=/root/.config/guix/latest > unlink $GUIX_LATEST && ln -s $(readlink $HOME/.config/guix/latest) > $GUIX_LATEST Nice tip. I've been annoyed about the fact that root compiles almost same definitions once again after a non-priv user has done. But I wonder, in that sense, if root user has only "guix" package which should be located on the non-priv user, then don't we just replace root's profile into the one of the non-privileged user? like this: #!/bin/sh ROOT_LATEST=/root/.config/guix/latest ROOT_PROFILE=/root/.guix-profile USER_LATEST=/home/alice/.config/guix/latest USER_PROFILE=/home/alice/.guix-profile unlink $ROOT_LATEST && ln -s $(readlink $USER_LATEST) $ROOT_LATEST unlink $ROOT_PROFILE && ln -s $(readlink $USER_PROFILE) $ROOT_PROFILE Once you've done this, root won't need to `guix pull && guix package -u' anymore because the profile of the user is the same one that root has. It'll cause severe security problems because the non-priv user will be able to manipulate root's system through guix, but theoretically it should work. (I assume that guix profile is user-agnostic. If it isn't, please correct my error.) Root would get redundant packages, but it wouldn't matter because the only package root will use is guix and it won't be influenced. Root will lose its generation history, but will get and share user's history instead. P.S. I know that only changing the path of package definitions is enough to saving a time because guix will graft the packages which are already installed in almost no time, but just for the curiosity. -- Attic Hermit
Re: Should I upgrade root user's guix too?
> When alice invokes the guix command to install the hello package, the > guix command essentially translates the package definition into a > derivation, and then asks the guix-daemon (via remote procedure calls) > to build that derivation. > guix-daemon has no knowledge of the "package" abstraction, and it > doesn't need to know about packages. For this reason, the guix-daemon > doesn't necessarily need to be updated in order to build more > up-to-date packages. The guix-daemon just knows how to do basic > things related to the store like add files, build derivations, perform > garbage collection, etc. To summarize, `guix pull && guix package -u' on the root user is basically for the sake of the features to do basic things, when the root user's guix profile is only for the guix-daemon. Thanks for your precise explanation! All things are clear now. I'll give a link to this conversation if someone encounter and ask the same confusion. Your mail was that helpful. :) -- Attic Hermit
Re: Should I upgrade root user's guix too?
Thanks for your reply. > You should run "guix pull" for both root and your non-privileged > user(s). The version of Guix deployed for root is the version of Guix > that will be used when running commands like "guix system reconfigure" > as root. If you don't do "guix pull" as root, then whenever you run > "guix" as root, you'll be using out of date Guix code, which includes > the package definitions that come with Guix. The manual discusses the > fact that "guix pull" only updates the Guix copy for the user who runs > it (info '(guix) Invoking guix pull'). I use Guix, but not GuixSD, only on the non-privileged user and there's no package installed but guix on the root user. So technically I can't use `guix system' command, and won't run `guix' command on the root shell interactively. Then the reason that I should pull and upgrade the guix profile of the root user is for implicit executions of the guix as the root user. And the package definition is one of that implicit executions... Is it right? Then I should run `guix pull && guix package -u' _as the root user_ *before* have done it as a non-privileged user, because when the packages are upgraded, the package definitions should be up to date. And the system should be *rebooted* or *restart* the guix build daemon which, in fact, is using the guix binary that the root user has. Is my understanding correct? -- Attic Hermit
Should I upgrade root user's guix too?
I use guix for using the softwares that Parabola GNU+Linux doesn't provide. Everything works great, but I have a question on the upgrade of guix itself. I regularly do `guix pull && guix package -u` in my default user, but I rarely do it in root user. I don't know if I'm right, but the guix build users runs the guix of the version of root, so if I don't upgrade the guix of root, that will stay on the old version for good. Therefore, the guix of root should be upgraded as well, when the guix of the default user is upgraded; Am I right? If upgrading the root's guix is valid, then which guix should be upgraded before? I usually upgrade non-root user's guix before and then root's. I couldn't find a related topic on the manual, so I'm little bit confused. -- Attic Hermit