On Sun, 2025-03-23 at 10:04 -0700, Vagrant Cascadian wrote: > On 2025-03-23, Rutherther wrote: > > "Thomas Ieong" <[email protected]> writes: > > > I have a guix system setup and I was wondering if it was > > > necessary to guix > > > pull from times to times with the root user. > > > > > > My understanding was that guix pull with your regular user was > > > enough with > > > sudo guix system reconfigure <your-conf.scm> > > > > Yes, exactly. sudo will use the guix from your user's path, so > > root's > > guix is not used for this. > > I have noticed that "sudo guix system reconfigure ..." does work, but > it > needlessly populates /root/.cache/guix with duplicate cruft which > over > time gets to be sizeable. Using "sudo -E guix system reconfigure ..." > does not seem to have this side-effect.
Similarly, "sudo -E guix pull" instead of "sudo -i guix pull" should
allow to reuse the guix checkout in the user's directory. Or would I
risk ending up with root-owned files in the home directory?
I wanted to test that with PureOS as the foreign distribution but some
configuration is apparently required there.
$ sudo du -sh
/root/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj
7apsnalwq/
1,4G
/root/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj
7apsnalwq/
$ LC_ALL=C sudo -E guix pull
guix pull: error: directory '/home/purism/.cache/guix' is not owned by
user root
hint: Backtrace:
In ice-9/boot-9.scm:
1685:16 19 (raise-exception _ #:continuable? _)
In guix/ui.scm:
873:16 18 (_ _)
344:43 17 (display-hint "You should run this command as purism…" .
#)
In ice-9/boot-9.scm:
1747:15 16 (with-exception-handler #<procedure ffffb59b0150 at ic…>
…)
3474:28 15 (_)
3327:17 14 (resolve-interface (guix build syscalls) #:select _ # _ …)
In ice-9/threads.scm:
390:8 13 (_ _)
In ice-9/boot-9.scm:
3253:13 12 (_)
In ice-9/threads.scm:
390:8 11 (_ _)
In ice-9/boot-9.scm:
3544:20 10 (_)
2836:4 9 (save-module-excursion #<procedure ffffb59b00f0 at ice-…>)
3564:26 8 (_)
In unknown file:
7 (primitive-load-path "guix/build/syscalls" #<procedure …>)
In guix/build/syscalls.scm:
2457:14 6 (_)
In ice-9/boot-9.scm:
1747:15 5 (with-exception-handler #<procedure ffffb59f0cf0 at ic…>
…)
In guix/build/syscalls.scm:
463:39 4 (_)
In ice-9/boot-9.scm:
1747:15 3 (with-exception-handler #<procedure ffffb59f0cc0 at ic…>
…)
In unknown file:
2 (dynamic-link "libutil")
In system/foreign-library.scm:
190:25 1 (load-foreign-library _ #:extensions _ # _ #:search-path
…)
In unknown file:
0 (dlopen "libutil.so" 1)
ERROR: In procedure dlopen:
In procedure dlopen: file "libutil.so", message "libutil.so: cannot
open shared object file: No such file or directory"
Roman
signature.asc
Description: This is a digitally signed message part
