Re: How to delete per-user profiles

2023-08-25 Thread 宋文武
Jorge  writes:

> Hi!  I have removed (via Gnome Settings) user `jorge-morais' from my 
> Gentoo GNU/Linux system, but its Guix profiles remain.  How do I remove 
> them, so Guix GC can clean the store?  Can I simply remove the directory 
> `/var/guix/profiles/per-user/jorge-morais' ?

Yes, that's the right and safe thing to do.



How to delete per-user profiles

2023-08-25 Thread Jorge
Hi!  I have removed (via Gnome Settings) user `jorge-morais' from my 
Gentoo GNU/Linux system, but its Guix profiles remain.  How do I remove 
them, so Guix GC can clean the store?  Can I simply remove the directory 
`/var/guix/profiles/per-user/jorge-morais' ?

   /var/guix/profiles/per-user/jorge-morais:
   drwxr-xr-x 1 1002 1002 192 2023-08-25 15:22 ./
   drwxr-xr-x 1 root root  48 2023-07-04 14:16 ../
   lrwxrwxrwx 1 1002 1002  19 2023-07-03 12:33 current-guix -> 
current-guix-3-link/
   -rw-r--r-- 1 1002 1002   0 2023-07-03 12:31 current-guix.lock
   lrwxrwxrwx 1 1002 1002  51 2023-07-03 12:33 current-guix-3-link -> 
/gnu/store/7aqq65iaffpp10y9zm0mrkcml31632x2-profile/
   lrwxrwxrwx 1 1002 1002  19 2023-06-28 13:23 guix-profile -> 
guix-profile-2-link/
   -rw-r--r-- 1 1002 1002   0 2023-07-03 12:34 guix-profile.lock
   lrwxrwxrwx 1 1002 1002  51 2023-06-28 13:23 guix-profile-2-link -> 
/gnu/store/3aiqg5x0fyimkb7g47vdcc0p2lvazfg1-profile/

Regards




documentation in TeX Live collections

2023-08-25 Thread Emmanuel Beffara
Hello Guix,

There has been a lot of movement around TeX Live recently and it is very nice
to see. We now have a usable modular installation and a great number of
available packages and collections. However, I don't understand what is the
proper way to reach documentation in the current system.

I installed `texlive-scheme-medium` in my home profile managed by `guix home`,
everything works including `texdoc` (although it always says « Info: Running
Texdoc not installed in the current TEXMFMAIN. » for some reason), but there
is essentially no documentation installed:

$ texdoc inputenc
Info: Running Texdoc not installed in the current TEXMFMAIN.
You don't appear to have any local documentation installed.

There may be online documentation available for "inputenc" at
https://texdoc.org/serve/inputenc/0
This documentation may be for a different version than you have installed.

Would you like to search online? (y/N)

Indeed the `doc` folder is nearly empty:

$ ls $GUIX_TEXMF/doc
bibtex8/  bibtexu/  chktex/

Apparently, all individual packages have a specific "doc" output but
collections and schemes do not and they don't have them as inputs either. So
we end up with an installation with no documentation (apart from the three
above, which is surprising).

I tried to explicity include documentation in a sub-shell but this changes
nothing:

$ guix shell texlive-latex:doc -- texdoc inputenc
Info: Running Texdoc not installed in the current TEXMFMAIN.
You don't appear to have any local documentation installed.

There may be online documentation available for "inputenc" at
https://texdoc.org/serve/inputenc/0
This documentation may be for a different version than you have installed.

Would you like to search online? (y/N)

Including the TeX Live scheme in the same shell makes things worse:

$ guix shell texlive-scheme-medium texlive-latex:doc -- texdoc inputenc
Info: Running Texdoc not installed in the current TEXMFMAIN.
texdoc error: No texlive.tlpdb nor shipped tlpdb data found.

Inspecting GUIX_TEXMF in this shell reveals that it now contains two paths,
one of which does contain the right documentation:

$ guix shell texlive-scheme-medium texlive-latex:doc
$ env | grep TEX

GUIX_TEXMF=/gnu/store/fg1z0jgkj0r4v8i3rmpg0c1vfirbg1ac-profile/share/texmf-dist:/home/manu/.guix-home/profile/share/texmf-dist
$ ls 
/gnu/store/fg1z0jgkj0r4v8i3rmpg0c1vfirbg1ac-profile/share/texmf-dist/doc
bibtex8  bibtexu  chktex  latex
$ export GUIX_TEXMF=${GUIX_TEXMF%:*}
$ texdoc inputenc
... inputenc.pdf is displayed! ...

Apparently the fact that this GUIX_TEXMF variable contains several paths is
problematic for texdoc.

As an attempt to work around this, I tried to add texlive-latex:doc to my home
profile definition and it did make that documentation available to texdoc.
Moreover, for some reason, ALL documentation was downloaded:

$ guix home reconfigure home.scm
...
 texlive-cm-66594-doc  2KiB
 texlive-etex-66594-doc  189KiB
 texlive-hyphen-complete-66594-doc  783KiB
 texlive-kpathsea-66594-doc  1022KiB
 texlive-pdftex-66594  4.2MiB
...
$ ls -d /gnu/store/*-texlive-*-doc/ | wc
   11051105   82506

Apparently something has triggered the download of documentation for all
packages `texlive-scheme-medium` depends on but only the one I explicitly
requested is made available in the profile (which is expected). All these
other documentation were downloaded but not used and `guix gc` actually
deletes them all!

So what would be the proper way to install `texlive-scheme-medium` in a home
profile with the documentation of the packages it includes ?

-- 
Emmanuel



Re: Problem with Shepherd after `guix home reconfigure`

2023-08-25 Thread Hilton Chain
Hello,

On Fri, 25 Aug 2023 14:59:03 +0800,
Tanguy LE CARROUR wrote:
>
> Hi,
>
> Quoting nils@landt.email (2023-08-23 10:09:06)
> > Tanguy LE CARROUR  hat am 22.08.2023 18:56 CEST 
> > geschrieben:
> > > I now have a slightly different error message:
> > >
> > > ```
> > > $ guix home reconfigure
> > > # […]
> > > SSLoading /gnu/store/zbfyaxxigns5lqyxhxzxhm92w54ns1cz-shepherd.conf.
> > > herd: error: exception caught while executing 'load' on service 'root':
> > > In procedure fport_write: Broken pipe
> > > ```
> > > […]
> > > Even though `mpd` is reported as "starting" it actually works.
> > > `herd stop mcron` still hangs forever, but `herd status` keeps on
> > > working and reporting "starting" services.
> > >
> > > Thoughts? 樂
> >
> > I had a similar issue about 2 months ago. I was using XDG_LOG_HOME in
> > a shepherd service definition, and it was not available anymore.
> > The error message I got was different, but the result was the same -
> > some services shown as "starting" and working, but herd  not
> > working for one particular broken service.
> >
> > I suggest to check your
> > /gnu/store/zbfyaxxigns5lqyxhxzxhm92w54ns1cz-shepherd.conf file for the
> > log path of the mcron job. Maybe your XDG_STATE_HOME points to a
> > non-writable directory?
>
> ```
> $ cat /gnu/store/l1463gh71pm62404rxpwbzhwmz8dakl2-shepherd-mcron.scm
> # […]
> #:log-file (string-append %user-log-dir "/mcron.log")
>
> $ env | grep XDG
> # […]
> XDG_STATE_HOME=/home/tanguy/.local/state
>
> $ ls /home/tanguy/.local/state
> log  nvim  shepherd  wireplumber
>
> $ ls /home/tanguy/.local/state/log/
> dbus.log  mcron.log  shepherd.log
> ```
>
> I have no XDG "log" variable, but the `shepherd.log` in `~/.local/state/log/`
> contains today's log, so… I guess it can write to the log folder.
> The strange thing is that today mcron's log is in
> `~/.local/state/shepherd/`?! 樂


From the definition in (shepherd support), the location is expected:
--8<---cut here---start->8---
(define %user-log-dir
  ;; Default log directory if shepherd is run as a normal user.
  (string-append (or (getenv "XDG_STATE_HOME")
 (string-append user-homedir "/.local/state"))
 "/shepherd"))
--8<---cut here---end--->8---


And ~/.local/state/log/mcron.log was used before changing to
%user-log-dir:
--8<---cut here---start->8---
#:log-file (string-append
(or (getenv "XDG_STATE_HOME")
(format #f "~a/.local/state"
(getenv "HOME")))
"/log/mcron.log")
--8<---cut here---end--->8---



Re: Problem with Shepherd after `guix home reconfigure`

2023-08-25 Thread Tanguy LE CARROUR
Hi,

Quoting nils@landt.email (2023-08-23 10:09:06)
> Tanguy LE CARROUR  hat am 22.08.2023 18:56 CEST 
> geschrieben:
> > I now have a slightly different error message:
> > 
> > ```
> > $ guix home reconfigure
> > # […]
> > SSLoading /gnu/store/zbfyaxxigns5lqyxhxzxhm92w54ns1cz-shepherd.conf.
> > herd: error: exception caught while executing 'load' on service 'root':
> > In procedure fport_write: Broken pipe
> > ```
> > […]
> > Even though `mpd` is reported as "starting" it actually works.
> > `herd stop mcron` still hangs forever, but `herd status` keeps on
> > working and reporting "starting" services.
> > 
> > Thoughts? 樂
> 
> I had a similar issue about 2 months ago. I was using XDG_LOG_HOME in
> a shepherd service definition, and it was not available anymore.
> The error message I got was different, but the result was the same -
> some services shown as "starting" and working, but herd  not
> working for one particular broken service.
> 
> I suggest to check your
> /gnu/store/zbfyaxxigns5lqyxhxzxhm92w54ns1cz-shepherd.conf file for the
> log path of the mcron job. Maybe your XDG_STATE_HOME points to a
> non-writable directory?

```
$ cat /gnu/store/l1463gh71pm62404rxpwbzhwmz8dakl2-shepherd-mcron.scm
# […]
#:log-file (string-append %user-log-dir "/mcron.log")

$ env | grep XDG
# […]
XDG_STATE_HOME=/home/tanguy/.local/state

$ ls /home/tanguy/.local/state
log  nvim  shepherd  wireplumber

$ ls /home/tanguy/.local/state/log/
dbus.log  mcron.log  shepherd.log
```

I have no XDG "log" variable, but the `shepherd.log` in `~/.local/state/log/`
contains today's log, so… I guess it can write to the log folder.
The strange thing is that today mcron's log is in
`~/.local/state/shepherd/`?! 樂


-- 
Tanguy