prevent gc of texlive-...-texmf.tar.xz

2020-02-12 Thread Thomas Danckaert

Hi,

I have limited space on my root file system, and therefore need to 
run 'guix gc' regularly.  One problem with that is that the texlive 
source package (currently 
/gnu/store/mj40l554qxw15acz0h018gk5c9mxzfgn-texlive-20180414-texmf.tar.xz) 
regularly gets deleted that way.  When I upgrade after running guix 
gc, I often find I need to download this very large (2.5G) tarball 
again.


How do I add a gc root for this tarball (or is that a bad idea)?  I 
tried 'guix build texlive --source --root ...', but I get a warning 
'package texlive has no source'.


All ideas are welcome!

Thomas



Re: Running "guild" runs a script in one of my projects

2020-02-12 Thread Jeremy Korwin-Zmijowski
Le lundi 10 février 2020 à 14:20 -0500, sirgazil a écrit :
> Hi,
> 
> Trying to learn about "guild" (a tool that comes with Guile), I ran
> "guild --help" and noticed something strange: the usage information
> is displayed, and immediately after that a script in one of my Guile
> projects is run, so I see the output of that script as well. Running
> "guild" alone does the same. It doesn't matter where in my home
> directory I run "guild", I get the same results.
> 
> Any idea what could this be?
> 
> 
> ---
> https://sirgazil.bitbucket.io/
> 
> 
> 

Hello Sirgazil !

Here are two commands I just tried and I don't have this behavior on my
system (Ubuntu).

   $ guild --version
   guild (GNU Guile) 2.2.6
   Copyright (C) 2019 Free Software Foundation, Inc.

   License LGPLv3+: GNU LGPL 3 or later <
   http://gnu.org/licenses/lgpl.html>.
   This is free software: you are free to change and redistribute it.
   There is NO WARRANTY, to the extent permitted by law.
   $ guild --help
   Usage: guild COMMAND [ARGS]
   Run command-line scripts provided by GNU Guile and related programs.

   Commands:
 compile  Compile a file.
 disassemble  Disassemble a compiled .go file.
 display-commentary   Display the Commentary section from a file or
   module.
 doc-snarfSnarf out documentation from a file.
 help Show a brief help message.
 use2dot  Print a module's dependencies in graphviz
   format.

   For help on a specific command, try "guild help COMMAND".

   Report guild bugs to bug-gu...@gnu.org
GNU Guile home page: 
General help using GNU software: 
For complete documentation, run: info '(guile)Using Guile Tools'

Cheers

Jérémy




Re: Running "guild" runs a script in one of my projects

2020-02-12 Thread sirgazil
  On Wed, 12 Feb 2020 02:18:43 -0500 Jeremy Korwin-Zmijowski 
 wrote 
 > Le lundi 10 février 2020 à 14:20 -0500, sirgazil a écrit :
 > > Hi,
 > > 
 > > Trying to learn about "guild" (a tool that comes with Guile), I ran
 > > "guild --help" and noticed something strange: the usage information
 > > is displayed, and immediately after that a script in one of my Guile
 > > projects is run, so I see the output of that script as well. Running
 > > "guild" alone does the same. It doesn't matter where in my home
 > > directory I run "guild", I get the same results.
 > > 
 > > Any idea what could this be?
 > > 
 > > 
 > > ---
 > > https://sirgazil.bitbucket.io/
 > > 
 > > 
 > > 
 > 
 > Hello Sirgazil !

Hi Jérémy :)

 > Here are two commands I just tried and I don't have this behavior on my
 > system (Ubuntu).

I forgot to say I'm using the Guix System with this guix:

$ guix describe
Generation 36   Feb 11 2020 11:04:57(current)
  sirgazil-x 8364c4d
repository URL: g...@gitlab.com:sirgazil/guix-channel-x.git
branch: master
commit: 8364c4df64c5aabd25751a6297e8463a50cd7c2c
  guix 4835f86
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 4835f862925e8aa06b7e23d5dd5d08ceb25a02dc


 >$ guild --version
 >guild (GNU Guile) 2.2.6
 >Copyright (C) 2019 Free Software Foundation, Inc.
 > 
 >License LGPLv3+: GNU LGPL 3 or later <
 >http://gnu.org/licenses/lgpl.html>.
 >This is free software: you are free to change and redistribute it.
 >There is NO WARRANTY, to the extent permitted by law.

This one works fine for me; I get the same output as you.


 >$ guild --help
 >Usage: guild COMMAND [ARGS]
 >Run command-line scripts provided by GNU Guile and related programs.
 > 
 >Commands:
 >  compile  Compile a file.
 >  disassemble  Disassemble a compiled .go file.
 >  display-commentary   Display the Commentary section from a file or
 >module.
 >  doc-snarfSnarf out documentation from a file.
 >  help Show a brief help message.
 >  use2dot  Print a module's dependencies in graphviz
 >format.
 > 
 >For help on a specific command, try "guild help COMMAND".
 > 
 >Report guild bugs to bug-gu...@gnu.org
 > GNU Guile home page: 
 > General help using GNU software: 
 > For complete documentation, run: info '(guile)Using Guile Tools'

In my case, I get the same output until the "doc-snarf" line (inclusive). The 
rest of the information is replaced by the output of a script I have in one of 
my project folders.

Could someone using the Guix System check if they can reproduce this problem, 
please?


Thanks for checking, Jérémy.



Re: GNOME Terminal: Horrible font after guix system reconfigure

2020-02-12 Thread Ludovic Courtès
Hello!

sirgazil  skribis:

> I have GNOME 3.32.2 now. When I launched a GNOME Terminal, I noticed that the 
> font is too big and the spacing between characters seems odd:
>
>   
> https://multimedialib.files.wordpress.com/2020/01/terminal-font-problem-2020-01-08.png
>
> Maybe there is a bug with the defaults (at least with the spacing)?

This problem still shows up in ‘guix system vm’, so it’s not related to
state.

Any idea how to fix it?

Ludo’.



Re: Is this normal? /var/log/messages is ~730 MB

2020-02-12 Thread Ludovic Courtès
Hi,

Maxim Cournoyer  skribis:

> Ricardo Wurmus  writes:

[...]

>>> Guix System has a log rotation service, described here:
>>> https://guix.gnu.org/manual/en/html_node/Log-Rotation.html
>>> could you try to configure it, and see if the problem persists?
>>
>> Should we include it in the examples and select it by default in the
>> installer?
>
> +1.  I too was surprised to have infinitely growing logs out of the box.
> I think it's a sane default to have a log rotation service enabled.

Alternately, what about adding ‘rottlog-service-type’ to
‘%base-services’?  That’ll pull in mcron, but I guess that’s OK.

Thoughts?

Ludo’.



Re: Avoiding the garbage collector for the Guix Data Service

2020-02-12 Thread Ludovic Courtès
Hi Christopher,

Christopher Baines  skribis:

> The Guix Data Service has Guix compute lots of derivations, and then it
> loads the data in to a database. I'm having some issues with the garbage
> collector though, as sometimes it removes data from the disk before I've
> had a chance to read it (at least I think this is what's happening, I
> think this job failed for this reason [1]).
>
> 1: http://data.guix.gnu.org/job/10638
>
> I'm not quite sure what the best strategy is to combat this? I had a
> look, and I couldn't see how to acquire a lock to prevent the garbage
> collector from running. I thought about registering thousands of gc
> roots, but that seems to just move the race a bit, as there's still a
> period between generating the derivation and registering the root where
> it can be deleted.
>
> Any ideas?

At the Guix Days we discussed using ‘add-temp-root’ and similar to
ensure that .drv files are at least GC-protected for the duration of the
session (connection to the daemon).

Does that address your problem?

Thanks,
Ludo’.



Re: Guix and openmpi in a container environment

2020-02-12 Thread Ludovic Courtès
Hello Todor,

Todor Kondić  skribis:

> guix environment -C -N --ad-hoc -m default.scm

> Simply installing openmpi (guix package -i openmpi) in my usual Guix profile 
> just works out of the box. So, there has to be some quirk where the openmpi 
> container installation is blind to some settings within the usual environment.

Open MPI and its “drivers” (UCX, PSM, etc.) browse /sys, /proc, and /dev
to determine what devices are available.  Could it be that one of these
things is missing or different inside the container?  Does ‘strace’
reveal anything?

The article at

might shed some light on some of these things.

HTH,
Ludo’.



Re: guix browsers timezones are set to GMT

2020-02-12 Thread Ludovic Courtès
Hi!

di...@santanas.co.za skribis:

> I see timezones in browsers on my guix system are set to GMT.

IceCat has a privacy feature turned on by default that, among other
things, has it not announce its timezone.

You can turn that option off by going to “about:config” in IceCat and
then turn off “privacy.trackingprotection.enabled”, IIRC.

However, that’s coarse-grain.  I’d love to have the option to just turn
off timezone concealing; anyone knows how to do it?

Thanks,
Ludo’.



Re: How to get libtool for gcc-9?

2020-02-12 Thread Ludovic Courtès
Hi Moritz,

Moritz Lell  skribis:

> but libtool looks for gcc-7.4.0 libraries:
>
> grep 'gcc-.*\ ' `which libtool` | sed 's/ /\n  /g'
>
> # sys_lib_search_path_spec="[...]
> #   /gnu/store/2plcy91lypnbbysb18ymnhaw3zwk8pg1-gcc-7.4.0-lib/[...]"

The ‘libtool’ executable provided by the ‘libtool’ package doesn’t
really matter.

Normally, Libtool is copied in package sources using ‘libtoolize’; only
when you run ./configure is a ‘libtool’ script generated for the program
you’re about to build.

HTH!

Ludo’.



Re: Packaging a simple Guile library

2020-02-12 Thread Ludovic Courtès
Hi,

sirgazil  skribis:

> I thought using the "guile-build-system" would make this straightforward, but 
> it didn't work as I expected. I was hoping to say, "Hey, guile-build-system:"
>
> 1. "glab" is the library you should build and install.
> 2. "doc" is the texinfo documentation you should build and install
>
> But this build system compiles every scheme file in the source, which
> results in a build failure in the case of my package,

The #:not-compiled-file-regexp option allows you to specify files not to
compile.  Let me know if it works for you.

> and the documentation it installs is just the README file, not the
> info documentation.

Ah, that part is missing from the build system, we should probably add
it.  In the meantime, you can add a custom phase, as you wrote.

HTH,
Ludo’.



Re: Packaging a simple Guile library

2020-02-12 Thread sirgazil
  On Wed, 12 Feb 2020 09:23:48 -0500 Ludovic Courtès  wrote 

 > Hi,
 > 
 > sirgazil  skribis:
 > 
 > > I thought using the "guile-build-system" would make this straightforward, 
 > > but it didn't work as I expected. I was hoping to say, "Hey, 
 > > guile-build-system:"
 > >
 > > 1. "glab" is the library you should build and install.
 > > 2. "doc" is the texinfo documentation you should build and install
 > >
 > > But this build system compiles every scheme file in the source, which
 > > results in a build failure in the case of my package,
 > 
 > The #:not-compiled-file-regexp option allows you to specify files not to
 > compile.  Let me know if it works for you.

Yes, that did it! I could build and install my package successfully.


 > > and the documentation it installs is just the README file, not the
 > > info documentation.
 > 
 > Ah, that part is missing from the build system, we should probably add
 > it.  In the meantime, you can add a custom phase, as you wrote.

I'll leave this for another version of my package.


Thanks a lot, Ludovic :)



Re: prevent gc of texlive-...-texmf.tar.xz

2020-02-12 Thread zimoun
Hi,

On Wed, 12 Feb 2020 at 13:54, Thomas Danckaert  wrote:

> I have limited space on my root file system, and therefore need to
> run 'guix gc' regularly.  One problem with that is that the texlive
> source package (currently
> /gnu/store/mj40l554qxw15acz0h018gk5c9mxzfgn-texlive-20180414-texmf.tar.xz)
> regularly gets deleted that way.  When I upgrade after running guix
> gc, I often find I need to download this very large (2.5G) tarball
> again.

What does it mean "upgrade after running guix gc"?

If 'texlive' is installed in a profile, "guix gc" cannot delete it. Or
I miss a point.

Do you mean that you work only with temporary profile ("guix
environment") and you garbage collect each time you have ended with
this temporary profile and you create often the same temporary profile
(say '--ad-hoc texlive')? Is it what you mean?


However, note that 'texlive' could even be downloaded twice, I guess,

--8<---cut here---start->8---
$ guix package -i texlive -p /tmp/texlive
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
The following package will be installed:
   texlive  20180414
/gnu/store/wlba9v03ypi0z5qz7p89sa0w12lh37zb-texlive-20180414

substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
The following derivations will be built:
   /gnu/store/4zlvfr2qv4ky1r7ski9inpaixqx7ingz-profile.drv
   /gnu/store/2s9f925wx29p75i6yzv3svki6ldb3ngp-texlive-texmf-20180414.drv
2,595.2 MB will be downloaded:
   /gnu/store/5aq60gx42sfs5drigb5g7fpa7fh1pq4z-texlive-20180414
   /gnu/store/mj40l554qxw15acz0h018gk5c9mxzfgn-texlive-20180414-texmf.tar.xz
The following grafts will be made:
   /gnu/store/al6wnvipcns3pkz4d9j1xg40cf9vg9qh-texlive-20180414.drv
   /gnu/store/3jpxlpgjabr5ilrn8pisl07sl2vsns7a-texlive-texmf-20180414.drv
The following profile hooks will be built:
   /gnu/store/03ry4vji3qz300wbx2a71bq6bilx2c50-ca-certificate-bundle.drv
   /gnu/store/cbjz3ydan5ach8vzcbmvwa92zqb4f0nn-manual-database.drv
   /gnu/store/i5j5896wcslgrz6nx8jd8hfw50qkwkhw-fonts-dir.drv
   /gnu/store/kik4kvwv7s3hpb0k5sbzv3dc97fwh1bb-info-dir.drv

downloading from
https://ci.guix.gnu.org/nar/mj40l554qxw15acz0h018gk5c9mxzfgn-texlive-20180414-texmf.tar.xz...
 texlive-20180414-texmf.tar.xz  2.42GiB
   10.2MiB/s 04:03 [##] 100.0%

downloading from
https://ci.guix.gnu.org/nar/lzip/zkcd3i5r98rh36cp9is1l5griiyrgvap-texlive-texmf-20180414...
 texlive-texmf-20180414  2.38GiB

[...]
 --8<---cut here---end--->8---


> How do I add a gc root for this tarball (or is that a bad idea)?  I
> tried 'guix build texlive --source --root ...', but I get a warning
> 'package texlive has no source'.

A quick workaround could be to create your own channel containing for
example this definition:

--8<---cut here---start->8---
(define-public my-texlive
  (package
(inherit texlive)
(version "mine")
(source (origin
  (method url-fetch)
  (uri "file:your/local/path/to/texlive-20180414-texmf.tar.xz")
  (sha256
   (base32
""))
--8<---cut here---end--->8---

So, you download once the texlive archive and you locate it somewhere
on your local disk. Then each time, you run "guix install
texlive@mine", Guix will compute the derivations etc. and will fetch
the source directly from your local disk.


It does not answer your question for protecting from GC but it should
avoid to download it again and again when you did a mistake with "guix
gc".



Hope that helps,
simon



how can I add a static IPv4 route?

2020-02-12 Thread Giovanni Biscuolo
Hello,

I have a very simple networking configuration:

--8<---cut here---start->8---
(service dhcp-client-service-type)
--8<---cut here---end--->8---

Please how can I add a static route? (I know there is wip-netlink, but
AFAIU it's still not in master)

I found a message from Julien [1] explaining he is using a custom
service [2] to define both IPv4 and IPv6 for the same device: do I have
to adapt that?

Since my guile-fu is very minimal, please do you have a snippet I can
reuse apart Julien's above?

Thanks! Gio'

[1] Message-ID: <80602dd8-60a9-487d-b39c-46360f42c...@lepiller.eu>

[2] 
https://framagit.org/tyreunom/system-configuration/blob/master/modules/config/network.scm

-- 
Giovanni Biscuolo

Xelera IT Infrastructures


signature.asc
Description: PGP signature


Re: how can I add a static IPv4 route?

2020-02-12 Thread Julien Lepiller
Le 12 février 2020 13:08:46 GMT-05:00, Giovanni Biscuolo  a 
écrit :
>Hello,
>
>I have a very simple networking configuration:
>
>--8<---cut here---start->8---
>(service dhcp-client-service-type)
>--8<---cut here---end--->8---
>
>Please how can I add a static route? (I know there is wip-netlink, but
>AFAIU it's still not in master)
>
>I found a message from Julien [1] explaining he is using a custom
>service [2] to define both IPv4 and IPv6 for the same device: do I have
>to adapt that?
>
>Since my guile-fu is very minimal, please do you have a snippet I can
>reuse apart Julien's above?
>
>Thanks! Gio'
>
>[1] Message-ID: <80602dd8-60a9-487d-b39c-46360f42c...@lepiller.eu>
>
>[2]
>https://framagit.org/tyreunom/system-configuration/blob/master/modules/config/network.scm

Hi,

I only use this custom service because guix doesn't provide static networking 
for IPv6. However, if you don't need IPv6, I'd like to encourage you to use the 
static-networking-service that's described in the manual: 
https://guix.gnu.org/manual/devel/en/html_node/Networking-Services.html#Networking-Services

Otherwise, feel free to copy and adapt my stuff :)



Re: prevent gc of texlive-...-texmf.tar.xz

2020-02-12 Thread Leo Famulari
On Wed, Feb 12, 2020 at 01:53:45PM +0100, Thomas Danckaert wrote:
> Hi,
> 
> I have limited space on my root file system, and therefore need to run 'guix
> gc' regularly.  One problem with that is that the texlive source package
> (currently
> /gnu/store/mj40l554qxw15acz0h018gk5c9mxzfgn-texlive-20180414-texmf.tar.xz)
> regularly gets deleted that way.  When I upgrade after running guix gc, I
> often find I need to download this very large (2.5G) tarball again.
> 
> How do I add a gc root for this tarball (or is that a bad idea)?  I tried
> 'guix build texlive --source --root ...', but I get a warning 'package
> texlive has no source'.

The simplest way to make a gcroot is to symlink the store item into
/var/guix/gcroots.

In fact, I've had this exact symlink for a few years now:

lrwxrwxrwx 1 root root   73 Aug  5  2017 texlive-20170524-texmf.tar.xz -> 
/gnu/store/5rnvmy02yazy8iwaa91kijbbqp8qmflz-texlive-20170524-texmf.tar.xz



Re: Avoiding the garbage collector for the Guix Data Service

2020-02-12 Thread Christopher Baines

Ludovic Courtès  writes:

> Hi Christopher,
>
> Christopher Baines  skribis:
>
>> The Guix Data Service has Guix compute lots of derivations, and then it
>> loads the data in to a database. I'm having some issues with the garbage
>> collector though, as sometimes it removes data from the disk before I've
>> had a chance to read it (at least I think this is what's happening, I
>> think this job failed for this reason [1]).
>>
>> 1: http://data.guix.gnu.org/job/10638
>>
>> I'm not quite sure what the best strategy is to combat this? I had a
>> look, and I couldn't see how to acquire a lock to prevent the garbage
>> collector from running. I thought about registering thousands of gc
>> roots, but that seems to just move the race a bit, as there's still a
>> period between generating the derivation and registering the root where
>> it can be deleted.
>>
>> Any ideas?
>
> At the Guix Days we discussed using ‘add-temp-root’ and similar to
> ensure that .drv files are at least GC-protected for the duration of the
> session (connection to the daemon).
>
> Does that address your problem?

I think so, it at least seems to greatly reduce the chance the
derivations get removed. I made the Guix Data Service change here [1],
and I haven't seen the issue since.

1: 
https://git.savannah.gnu.org/cgit/guix/data-service.git/commit/?id=f59354ed23a9c50e43b7aaaeaddb5365feda4e29

Thanks,

Chris


signature.asc
Description: PGP signature


Re: GNOME Terminal: Horrible font after guix system reconfigure

2020-02-12 Thread Christopher Baines

Ludovic Courtès  writes:

> Hello!
>
> sirgazil  skribis:
>
>> I have GNOME 3.32.2 now. When I launched a GNOME Terminal, I noticed that 
>> the font is too big and the spacing between characters seems odd:
>>
>>   
>> https://multimedialib.files.wordpress.com/2020/01/terminal-font-problem-2020-01-08.png
>>
>> Maybe there is a bug with the defaults (at least with the spacing)?
>
> This problem still shows up in ‘guix system vm’, so it’s not related to
> state.
>
> Any idea how to fix it?

I think I encountered this, I "fixed" it by going in to the Tweaks app
and selecting some fonts where previously I think some options didn't
have a font selected.


signature.asc
Description: PGP signature


Re: Is this normal? /var/log/messages is ~730 MB

2020-02-12 Thread Maxim Cournoyer
Ludovic Courtès  writes:

> Hi,
>
> Maxim Cournoyer  skribis:
>
>> Ricardo Wurmus  writes:
>
> [...]
>
 Guix System has a log rotation service, described here:
 https://guix.gnu.org/manual/en/html_node/Log-Rotation.html
 could you try to configure it, and see if the problem persists?
>>>
>>> Should we include it in the examples and select it by default in the
>>> installer?
>>
>> +1.  I too was surprised to have infinitely growing logs out of the box.
>> I think it's a sane default to have a log rotation service enabled.
>
> Alternately, what about adding ‘rottlog-service-type’ to
> ‘%base-services’?  That’ll pull in mcron, but I guess that’s OK.
>
> Thoughts?

That's an even better idea, in my opinion.

Maxim



Re: GNOME Terminal: Horrible font after guix system reconfigure

2020-02-12 Thread Gábor Boskovits
Hello,

Christopher Baines  ezt írta (időpont: 2020. febr. 13.,
Csü 0:55):

>
> Ludovic Courtès  writes:
>
> > Hello!
> >
> > sirgazil  skribis:
> >
> >> I have GNOME 3.32.2 now. When I launched a GNOME Terminal, I noticed
> that the font is too big and the spacing between characters seems odd:
> >>
> >>
> https://multimedialib.files.wordpress.com/2020/01/terminal-font-problem-2020-01-08.png
> >>
> >> Maybe there is a bug with the defaults (at least with the spacing)?
> >
> > This problem still shows up in ‘guix system vm’, so it’s not related to
> > state.
> >
> > Any idea how to fix it?
>
> I think I encountered this, I "fixed" it by going in to the Tweaks app
> and selecting some fonts where previously I think some options didn't
> have a font selected.
>
Same thing here. It would be nice if we could somehow manipulate these
setting from a script/dotfile, but I did not go deep into finding out how
that work. Anyone has any idea if that is supported?

Best regards,
g_bor

>