Re: Advanced distribution

2022-12-09 Thread Ryan Prior
Hi Octavio! We had a discussion about this last month, and we might make some 
changes to make it clearer what "advanced" means (or perhaps change the 
wording.)

Here's a link to that discussion in the list archive: 
https://lists.gnu.org/archive/html/guix-devel/2022-11/msg00298.html

Cheers,
Ryan

P.S. apropos of your email header: this email thread will also be visible on 
the public Guix archive. For sensitive issues please consider sending to 
guix-maintain...@gnu.org
--- Original Message ---
On Saturday, December 10th, 2022 at 3:08 AM, Engineer Octavio 
 wrote:

> ---...---
> Este email es para el staff del proyecto Guix.
> ___
> Cualquier otra persona no autorizada por mi Octavio Alfredo Toscano Flores 
> que lo esté leyendo le informo que está violando mi intimidad y privacidad.
> -----
>
> Hello everyone.
>
> I was reading.
>
> The specific URL: guix.gnu.org/es/
> I found the specific text:
> "Guix es una avanzada distribución del sistema operativo GNU desarrollada por 
> el proyecto GNU"
>
> Also.
>
> The specific URL:
> guix.gnu.org/en/
> I found the specific text:
> "Guix is an advanced distribution of the GNU operating system"
>
> I was wondering.
>
> Why Guix is an advanced distribution of the GNU operating system?
>
> Muchas gracias.
> Saludos cordiales.
>
> Ing. Octavio Toscano.

Advanced distribution

2022-12-09 Thread Engineer Octavio
---...---
Este email es para el staff del proyecto Guix.
___
Cualquier otra persona no autorizada por mi Octavio Alfredo Toscano Flores
que lo esté leyendo le informo que está violando mi intimidad y privacidad.
-----

Hello everyone.

I was reading.

The specific URL: guix.gnu.org/es/
I found the specific text:
"Guix es una avanzada distribución del sistema operativo GNU desarrollada
por el proyecto GNU"

Also.

The specific URL:
guix.gnu.org/en/
I found the specific text:
"Guix is an advanced distribution of the GNU operating system"

I was wondering.

Why Guix is an advanced distribution of the GNU operating system?

Muchas gracias.
Saludos cordiales.

Ing. Octavio Toscano.


Re: Status of hibernation (suspend to disk) in Guix

2022-12-09 Thread Mekeor Melire
2022-12-09 23:10 mek...@posteo.de:

> 2022-12-05 17:23 i...@selidor.net:
>
> > in #59746 I skipped documenting `resume_offset` with more detail, even
> > if it's needed for resuming from a swap file. The reason is that
> > according to [swsusp doc][1], some specific tool may be needed to
> > compute the swap file offset. There is [swap-offset][2] from the
> > uswsusp suite, which is missing from Guix and no longer shipped with
> > Debian.
>
> What about the "filefrag" executable from the "e2fsprogs" package.
> According to this article, it can be used in place of the deprecated
> uswsusp suite:
>
> https://www.linuxuprising.com/2021/08/how-to-enable-hibernation-on-ubuntu.html

I just tried this out. And it worked like a charm! I have hibernated and
resumed successfully - first time with Guix System. I'm so happy :)

Would you like to add instructions for swap-files to your
patch-series #59746?

What I did: First, determine offset:

--8<---cut here---start->8---
$ sudo filefrag -v /swapfile
Filesystem type is: ef53
File size of /swapfile is 1717986918 (4194304 blocks of 4096 bytes)
 ext: logical_offset:physical_offset: length:   expected: flags:
   0:0..   0:5308416..   5308416:  1:
--8<---cut here---end--->8---

Then, use offset in operating-system declaration:

--8<---cut here---start->8---
  (kernel-arguments
(cons*
  "resume=/dev/mapper/cryptroot"
  "resume_offset=5308416"
  %default-kernel-arguments))
--8<---cut here---end--->8---

Caveat: IIUC, this does not work with Btrfs.



Re: Some stats about the graph of dependencies

2022-12-09 Thread jbranso
December 9, 2022 12:32 PM, "zimoun"  wrote:

> Hi,
> 
> Preparing some Python stuff, I was toying with the package
> python-networkx. And Guix is awesome because it is easy to extract the
> graph of dependencies.
> 
> Here dependencies are just inputs, native-inputs and propagated-inputs.
> It could be interesting to also include build-system dependencies, I
> have been lazy. :-)
> 
> My initial question is to know what are the “essentials”? By essential,
> I mean the “important“ ones, the “hot” ones, etc. The ones which are
> “influencers” – yeah the world is a social network. :-)
> 
> First, let extract the graph with a tiny Scheme script:
> 
> $ guix repl -- packages-to-dict.scm > dod.py
> 
> Then, let import that into an IPython session:
> 
> $ guix shell python python-ipython \
> python-scipy python-matplotlib python-networkx -- ipython
> 
> and run another tiny Python script for plotting. See Figure attached.
> 
> We can compare a link analysis metrics [1] and a centrality measure
> [2]; say PageRank [3] and Eigenvector [4]. More the value is large and
> higher the package is “important“ (for this metrics).
> 
> And the Directed and Undirected graphs can be compared, using Networkx
> [5,6]. Well, Eigenvector centrality (or Katz centrality [7]) is failing
> because the power iteration does not converge but other metrics could be
> also considered. Here is just a first rough toy. :-)
> 
> According to PageRank applied to the Directed Graph, the 10 most
> “important” packages are:
> 
> --8<---cut here---start->8---
> [('pkg-config-0.29.2', 0.02418335991713879),
> ('perl-5.34.0', 0.015404032767249512),
> ('coreutils-minimal-8.32', 0.013240458675517012),
> ('zlib-1.2.11', 0.009107245584307803),
> ('python-pytest-6.2.5', 0.008413060648307678),
> ('ncurses-6.2.20210619', 0.007598925467605917),
> ('r-knitr-1.41', 0.00554772892485958),
> ('sbcl-rt-1990.12.19-1.a6a7503', 0.004884721933452539),
> ('bzip2-1.0.8', 0.004800877844001881),
> ('python-3.9.9', 0.00415536078558266)]
> --8<---cut here---end--->8---
> 
> And if we compare the 3 results (Undirected with PageRank and
> Eigenvector, and Directed with PageRank only, then 10 most “important”
> packages are:
> 
> --8<---cut here---start->8---
> ['pkg-config-0.29.2',
> 'glib-2.70.2',
> 'zlib-1.2.11',
> 'gtk+-3.24.30',
> 'perl-5.34.0',
> 'gettext-minimal-0.21',
> 'qtbase-5.15.5',
> 'libxml2-2.9.12',
> 'python-3.9.9',
> 'autoconf-2.69']
> --8<---cut here---end--->8---
> 
> Somehow, it means that these packages have an high influence on all the
> others. Now, we can roughly compare with the release-manifest.scm [8],
> 
> --8<---cut here---start->8---
> '("bootstrap-tarballs" "gcc-toolchain" "nss-certs"
> "openssh" "emacs" "vim" "python" "guile" "guix")))
> '("coreutils" "grep" "findutils" "gawk" "make"
> #;"gcc-toolchain" "tar" "xz")))
> '("xorg-server" "xfce" "gnome" "mate" "enlightenment"
> "openbox" "awesome" "i3-wm" "ratpoison"
> "emacs" "emacs-exwm" "emacs-desktop-environment"
> "xlockmore" "slock" "libreoffice"
> "connman" "network-manager" "network-manager-applet"
> "openssh" "ntp" "tor"
> "linux-libre" "grub-hybrid"
> '("coreutils" "grep" "sed" "findutils" "diffutils" "patch"
> "gawk" "gettext" "gzip" "xz"
> "hello" "zlib"
> --8<---cut here---end--->8---
> 
> Well, we could investigate more and play more with some graphs tools.
> For instance, include all the build-system dependencies and so on.
> 
> Some list about “statistically important” packages could help for
> improving the list of “essential” packages.
> 
> Although Python is great, I would like to run Guile. Any Guile library
> for manipulating graph is around?

https://packages.guix.gnu.org/packages/guile2.2-charting/0.2.0-1.75f755b/

Thought it may be guile 2 only...?

> 
> All that to say, Guix is great! :-) And perhaps some of you have already
> some Guile code for analysing graphs. Maybe.
> 
> Well, comment or idea is welcome. :-)
> 
> 1: 
> 2: 
> 3: 
> 4: 
> 5: 
> 
> 6: 
> 
> 7: 
> 8: 
> 
> 
> Cheers,
> simon



Re: Status of hibernation (suspend to disk) in Guix

2022-12-09 Thread Mekeor Melire
2022-12-05 17:23 i...@selidor.net:

> in #59746 I skipped documenting `resume_offset` with more detail, even
> if it's needed for resuming from a swap file. The reason is that
> according to [swsusp doc][1], some specific tool may be needed to
> compute the swap file offset. There is [swap-offset][2] from the
> uswsusp suite, which is missing from Guix and no longer shipped with
> Debian.

What about the "filefrag" executable from the "e2fsprogs" package.
According to this article, it can be used in place of the deprecated
uswsusp suite:

https://www.linuxuprising.com/2021/08/how-to-enable-hibernation-on-ubuntu.html



Re: Status of hibernation (suspend to disk) in Guix

2022-12-09 Thread Jack Hill

On Fri, 9 Dec 2022, Mekeor Melire wrote:


Thanks for making hibernation work and for bringing that up. I have two
questions:

 1. Does hibernation work in case of swap-partition inside an
luks-encrypted device?


Yes, this works for me (nested LVM in LUKS too)


 2. Does hibernation work in case of a swap-file inside a
root-partition inside a luks-encrypted device?


I haven't personally tried this one.

Best,
Jack



Re: Status of hibernation (suspend to disk) in Guix

2022-12-09 Thread Mekeor Melire
2022-12-02 21:32 m...@tobias.gr:

> Ivan Vilata i Balaguer 写道:

> > But then I wonder if I may have rushed to post the patch, as I don't
> > know whether hibernation is supposed to be more or less mature or
> > supported in Guix (we may not want to encourage people to use a
> > feature which may easily cause data loss)… Though it works quite
> > well for me!
>
> OTOH, I deliberately hadn't documented ‘resume=’ so far.
>
> OTOH, I have been hibernating multiple times a day for years now, only
> ever rebooting my laptop for kernel updates.
>
> So the feature is probably safe, and we should probably consider it
> supported at this point. Thanks for bringing it up!
>
> > So the TL;DR would be: Is it worth adding such documentation, given
> > the current state of hibernation support in Guix?
>
> I think documenting the current status quo in time for 1.4.0 is a good
> idea.
>
> The next step is to automate things so ‘resume=’ becomes optional.
> This should have landed already, but hasn't for personal reasons. The
> code is basically ready, but won't be in the release.

Thanks for making hibernation work and for bringing that up. I have two
questions:

  1. Does hibernation work in case of swap-partition inside an
 luks-encrypted device?

  2. Does hibernation work in case of a swap-file inside a
 root-partition inside a luks-encrypted device?

Also, I'm not sure if it makes sense to mark the hibernation-feature
stable and finished if the mentioned two cases are not supported.



Re: Drafting a Guix blog post on the FHS container

2022-12-09 Thread zimoun
Hi,

On Mon, 05 Dec 2022 at 02:32, John Kehayias  
wrote:

> Here is a current (rough!) draft. For the ease of plain text email
> I've exported from the org source to text with some light edits:

Nice!  If you can turn the draft into Markdown and format a patch for
guix-artwork [1] under website/drafts, it could be awesome! :-)

Then you could send the patch to guix-devel, guix-blog or guix-patches.

1: 


Cheers,
simon



Re: guile profiling / speeding up derivations on slow storage

2022-12-09 Thread zimoun
Hi,

On Thu, 01 Dec 2022 at 02:02, Csepp  wrote:

> First of all, I'm curious, how do other Guile developers profile code?

Well, recently Ludo posted a heap profiler for Guile

https://lists.gnu.org/archive/html/guile-user/2022-11/msg00012.html

> Could we add a profiling flag for the CLI similar to the existing
> debugging flags?

I agree that some utilities would be welcome.  And for instance, I am
unable to use ,profile or ’statprof’.

Well, maybe it could be interesting to collect various scenarios as
proposed in this thread [1].

1: https://yhetil.org/guix/87lenve3t2@gnu.org

Cheers,
simon



Re: File search

2022-12-09 Thread zimoun
Hi Antoine,

Cool!  I have not really look yet.  Just a minor answer to one of your
question. :-)

On Fri, 09 Dec 2022 at 11:05, "Antoine R. Dumont (@ardumont)" 
 wrote:
>> It should instead show “git@2.38.1:send-email”.  We probably need an
>> ‘output’ field in the ‘Packages’ table.
>
> Why must that be "git@2.38.1:send-email", what does it mean?

It is about outputs [1].  Some packages have more than one output.  For
instance,

--8<---cut here---start->8---
$ guix show git | recsel -p outputs
outputs: 
+ send-email: [description missing]
+ svn: [description missing]
+ credential-netrc: [description missing]
+ credential-libsecret: [description missing]
+ subtree: [description missing]
+ gui: [description missing]
+ out: everything else
--8<---cut here---end--->8---

It means that “git:send-email” provides “git send-email” for not
necessary Git itself.

1: https://guix.gnu.org/manual/devel/en/guix.html#Packages-with-Multiple-Outputs

Cheers,
simon



Re: Booth at FOSDEM (Brussels), 4-5 Feb 2023?

2022-12-09 Thread zimoun
Hi,

We do NOT have a stand at FOSDEM 2023.  We are not listed in:

https://fosdem.org/2023/news/2022-12-08-accepted-stands-fosdem-2023/

if I read correctly, although I did not received any email.

Thanks to everyone who offered to spend their time at the stand.  Maybe
next year!

See you at the Guix Days right before FOSDEM:

https://lists.gnu.org/archive/html/guix-devel/2022-12/msg00100.html
https://libreplanet.org/wiki/FOSDEM2023-guix-days

Cheers,
simon


PS: The Guix project had also been refused back in 2019 [1].

1: 



Some stats about the graph of dependencies

2022-12-09 Thread zimoun
Hi,

Preparing some Python stuff, I was toying with the package
python-networkx.  And Guix is awesome because it is easy to extract the
graph of dependencies.

Here dependencies are just inputs, native-inputs and propagated-inputs.
It could be interesting to also include build-system dependencies, I
have been lazy. :-)

My initial question is to know what are the “essentials”?  By essential,
I mean the “important“ ones, the “hot” ones, etc.  The ones which are
“influencers” – yeah the world is a social network. :-)

First, let extract the graph with a tiny Scheme script:

$ guix repl -- packages-to-dict.scm > dod.py

Then, let import that into an IPython session:

$ guix shell python python-ipython \
   python-scipy python-matplotlib python-networkx  -- ipython

and run another tiny Python script for plotting.  See Figure attached.

We can compare a link analysis metrics [1] and a centrality measure
[2]; say PageRank [3] and Eigenvector [4].  More the value is large and
higher the package is “important“ (for this metrics).

And the Directed and Undirected graphs can be compared, using Networkx
[5,6].  Well, Eigenvector centrality (or Katz centrality [7]) is failing
because the power iteration does not converge but other metrics could be
also considered.  Here is just a first rough toy. :-)

According to PageRank applied to the Directed Graph, the 10 most
“important” packages are:

--8<---cut here---start->8---
[('pkg-config-0.29.2', 0.02418335991713879),
 ('perl-5.34.0', 0.015404032767249512),
 ('coreutils-minimal-8.32', 0.013240458675517012),
 ('zlib-1.2.11', 0.009107245584307803),
 ('python-pytest-6.2.5', 0.008413060648307678),
 ('ncurses-6.2.20210619', 0.007598925467605917),
 ('r-knitr-1.41', 0.00554772892485958),
 ('sbcl-rt-1990.12.19-1.a6a7503', 0.004884721933452539),
 ('bzip2-1.0.8', 0.004800877844001881),
 ('python-3.9.9', 0.00415536078558266)]
--8<---cut here---end--->8---

And if we compare the 3 results (Undirected with PageRank and
Eigenvector, and Directed with PageRank only, then 10 most “important”
packages are:

--8<---cut here---start->8---
['pkg-config-0.29.2',
 'glib-2.70.2',
 'zlib-1.2.11',
 'gtk+-3.24.30',
 'perl-5.34.0',
 'gettext-minimal-0.21',
 'qtbase-5.15.5',
 'libxml2-2.9.12',
 'python-3.9.9',
 'autoconf-2.69']
--8<---cut here---end--->8---

Somehow, it means that these packages have an high influence on all the
others.  Now, we can roughly compare with the release-manifest.scm [8],

--8<---cut here---start->8---
   '("bootstrap-tarballs" "gcc-toolchain" "nss-certs"
 "openssh" "emacs" "vim" "python" "guile" "guix")))
   '("coreutils" "grep" "findutils" "gawk" "make"
 #;"gcc-toolchain" "tar" "xz")))
   '("xorg-server" "xfce" "gnome" "mate" "enlightenment"
 "openbox" "awesome" "i3-wm" "ratpoison"
 "emacs" "emacs-exwm" "emacs-desktop-environment"
 "xlockmore" "slock" "libreoffice"
 "connman" "network-manager" "network-manager-applet"
 "openssh" "ntp" "tor"
 "linux-libre" "grub-hybrid"
   '("coreutils" "grep" "sed" "findutils" "diffutils" "patch"
 "gawk" "gettext" "gzip" "xz"
 "hello" "zlib"
--8<---cut here---end--->8---

Well, we could investigate more and play more with some graphs tools.
For instance, include all the build-system dependencies and so on.

Some list about “statistically important” packages could help for
improving the list of “essential” packages.

Although Python is great, I would like to run Guile.  Any Guile library
for manipulating graph is around?

All that to say, Guix is great! :-) And perhaps some of you have already
some Guile code for analysing graphs.  Maybe.

Well, comment or idea is welcome. :-)

1: 
2: 
3: 
4: 
5: 

6: 

7: 
8: 


Cheers,
simon



packages-to-dict.scm
Description: packages-to-dict.scm
import networkx as nx
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
import numpy as np

exec(open("dod.py").read())
UG = nx.Graph(dod)
DG = nx.DiGraph(dod)

nnodes = DG.number_of_nodes()

# nx.draw(G, with_labels=True);plt.show()

metrics = [
(UG, nx.eigenvector_centrality),
(UG, nx.pagerank),
(DG, nx.pagerank),
]

Re: Dissecting Guix -- blog post series

2022-12-09 Thread (
Heya,

On Fri Dec 9, 2022 at 9:32 AM GMT,  wrote:
> How does a gullible noob like me know what the dangers might be, (e.g. http:)
> and how to avoid (most of) them by finding a guix version that has been
> gone through with a fine-tooth comb by trusted guix devs and has been
> re-hosted at gitlab or gnu.org, etc ... for added security?

Sorry, I don't really understand; how is this relevant to derivations? :)

-- (


signature.asc
Description: PGP signature


Re: File search

2022-12-09 Thread Antoine R. Dumont (@ardumont)
Hello,

> So we went from 413s to 11s (on the Guix System node) for only 6% fewer
> files in the latter case?  Do I get that right?  That’s pretty cool.

Not 6% of loss, a bit more, around half is only detected between the
first and second round. Here is the summary [1] (org-mode) table I should
have sent to ease reading.

I don't have a better dataset to test against so you tell me if it is
still worth pushing in that direction ;)

[1]

|---+-+--+--|
| Iteration | Host System | Time (s) | Packages |
|---+-+--+--|
| 1st   | Debian  |   121.88 |  284 |
|   | Guix System |   413.55 |  749 |
|---+-+--+--|
| 2nd   | Debian  |  1.3 |  101 |
|   | Guix System |11.54 |  354 |
|---+-+--+--|

> It should instead show “git@2.38.1:send-email”.  We probably need an
> ‘output’ field in the ‘Packages’ table.

Why must that be "git@2.38.1:send-email", what does it mean?

Providing we continue on that direction (see first question above), I'll
check what i can do (I'm not sure how to properly do that just yet).

> Also going forward we’ll need a schema version, as in:

yes, that I see how to do.

> Oh, and progress bars too.

I'm a bit unsettled on this. Hopefully it was mostly a joke ;)

If it's serious, how can we implement this as we don't know in advance
how many packages we'll discover locally (if we don't change the current
approach, that is, to avoid incurring too much time penalty).

And also, what implem should be used, I know the "pv" package provide
some pipe utility for that but that's about it. Do you have some example
in the guix codebase that does some progress bar already?

> And a pony.  :-)

;p

Cheers,
--
tony / Antoine R. Dumont (@ardumont)

-
gpg fingerprint BF00 203D 741A C9D5 46A8 BE07 52E2 E984 0D10 C3B8


Ludovic Courtès  writes:

> Howdy!
>
> "Antoine R. Dumont (@ardumont)" 
> skribis:
>
>> Please, find enclosed the latest implementation as a patch (somewhat vcs
>> code ;). I've edited commits to mark Ludo as author with his
>> started/amended implementations first [0] (that should be in the patch).
>
> Nice!
>
>> For information, I extracted some number from runs to compare our
>> iterations (see the org-file attachment). The first iteration being
>> "extracts packages from the store" and the second one "extracts packages
>> from the system manifest". Those runs happened both on a guixified
>> debian host and a raw guix host (more packages).
>
> So we went from 413s to 11s (on the Guix System node) for only 6% fewer
> files in the latter case?  Do I get that right?  That’s pretty cool.
>
> The implementation based on manifests can of course miss packages, so
> it’s a tradeoff.  Purely local indexing will only find packages you
> already have anyway, so eventually we’ll need a second mode that would
> download a database.
>
> BTW, I noticed outputs are not properly handled so far, as in this
> example:
>
> --8<---cut here---start->8---
> $ GUIX_EXTENSIONS_PATH=$HOME/tmp/guix-index guix index search git-send-email
> git@2.38.1   
> /gnu/store/g3lgyzr749l76qma7srycclgsm0f78iq-git-2.38.1-send-email/libexec/git-core/git-send-email
> git@2.37.1   
> /gnu/store/n3hkzz5ydm0qm1c2jja2pwy2v19mq1k0-git-2.37.1-send-email/libexec/git-core/git-send-email
> --8<---cut here---end--->8---
>
> It should instead show “git@2.38.1:send-email”.  We probably need an
> ‘output’ field in the ‘Packages’ table.
>
> Also going forward we’ll need a schema version, as in:
>
> --8<---cut here---start->8---
> create table SchemaVersion (
> version integer not null;
> );
> --8<---cut here---end--->8---
>
> so that the tool can upgrade or discard databases that have the wrong
> version.
>
> Oh, and progress bars too.  And a pony.  :-)
>
> Thanks for your work!
>
> Ludo’.


signature.asc
Description: PGP signature


Re: Dissecting Guix -- blog post series

2022-12-09 Thread bokr
Hi,

On +2022-12-09 07:33:16 +, ( wrote:
> On Fri Dec 9, 2022 at 7:31 AM GMT, 宋文武 wrote:
> > I think it's missing what "build-derivations" do, or "Part 0: Store".
> 
> Hmm, do you mean adding an example of building a derivation in Scheme with
> ``build-derivations''?  I'll definitiely add that :)
> 
> -- (

Where is a "What can I trust?" section?

I.e., when some well-meaning enthusiast says,

--8<---cut here---start->8---
"Can we package the "warm-fuzzy-floss-name" package that they have at
http://www.lesser-known-but-nice-sounding-distro.org/fantabulous/;
--8<---cut here---end--->8---

How does a gullible noob like me know what the dangers might be, (e.g. http:)
and how to avoid (most of) them by finding a guix version that has been
gone through with a fine-tooth comb by trusted guix devs and has been
re-hosted at gitlab or gnu.org, etc ... for added security?

--
Regards,
Bengt Richter