Re: Move /gnu/store to another filesystem

2022-05-27 Thread Théo Maxime Tyburn


Giovanni Biscuolo  writes:

>>> ...but please don't hold your breath :-)
>>
>> What do you mean? ^^
>
> Oh sorry, I mean I don't know when I'll succeed in doing what I want :-)

Ah I get it :) No problem!



Re: Move /gnu/store to another filesystem

2022-05-27 Thread Giovanni Biscuolo
Théo Maxime Tyburn  writes:

[...]

> I’ll try my best!

Thank you

>> ...but please don't hold your breath :-)
>
> What do you mean? ^^

Oh sorry, I mean I don't know when I'll succeed in doing what I want :-)

Thanks, Gio'

-- 
Giovanni Biscuolo

Xelera IT Infrastructures


signature.asc
Description: PGP signature


Re: Move /gnu/store to another filesystem

2022-05-27 Thread Théo Maxime Tyburn
Hi Tobias,

Tobias Geerinckx-Rice  writes:
> I forgot to add:
>
> You can probably reclaim most of that space by deleting the (now
> bogus) /gnu/store/.links directory.  That's safe.

Can you elaborate on that? In my case since I used cp without the -a
option all elements of /gnu/store/.links are just hard copies, right?
That’s why it is safe to delete them? Can I force guix to generate the
links again once i removed the directory?

Thanks,

Théo





Re: Move /gnu/store to another filesystem

2022-05-27 Thread Théo Maxime Tyburn
Hi Tobias,

Tobias Geerinckx-Rice  writes:

> However, ‘cp -p’ does not preserve everything, including hard links.
> Applications shouldn't care but you might be surprised at how much
> disc space hard links save on my system:
>
> ~ λ du -hs /gnu/store
> 86G   /gnu/store
> ~ λ du -hs --count-links /gnu/store
> 192G  /gnu/store
>
> I was!

Wow!

> ‘cp -a’ should preserve hard links but I personally recommend using
> rsync instead, with a paranoid helping of -aHAX flags. Unlike cp, it's
> resumable, which is nice when copying 100s of gigabytes.

Yes I wasn’t sure if keeping links could not break something. But I
guess it shouldn’t harm since after mounting everything will have the
same place on the filesystem.

I agree that rsync -aHAX seems a much better option. I would have
resorted to that if things kept breaking with cp. That’s what I meant by
"just using cp is a bit brutal". I wasn’t sure which of
the uncountable options of rsync to use though ^^

> Kind regards,
>
> T G-R

Thanks for the feedback,

Théo



Re: Move /gnu/store to another filesystem

2022-05-27 Thread Théo Maxime Tyburn
Hi Gio’

[...]

> Sorry, now I can't help with setting up a Guix development environment,
> all I can suggest you is to read the "19 Contrubuting" manual section,
> in particular "19.1 Building from Git" and "19.2 Running Guix Before It
> Is Installed".

No problem. I will post that to guix devel directly.

[...]

> The texinfo manual is
> https://www.gnu.org/software/texinfo/manual/texinfo/
>
> Anyway if you are still not familiar with texinfo and all pthe
> contributing process, please just write the Cookbook session in any
> format you like (that I can read with free software) or in plain text, I
> can convert it to texinfo and propose a patch

I’ll try my best!

> ...but please don't hold your breath :-)

What do you mean? ^^

Thanks,

Théo



Re: Multiple profiles with Guix Home

2022-05-27 Thread Liliana Marie Prikler
Hi,

Am Freitag, dem 27.05.2022 um 15:52 +0300 schrieb and...@trop.in:
> On 2022-05-26 01:36, Liliana Marie Prikler wrote:
> 
> > [...]
> > I can't see it anywhere in the code for Guix Home, so I
> > assume generations are currently littered into the user home.  The
> > specific choice of moving ~/.guix-profile to ~/.guix-home is
> > another.
> > Assume I only want to use Guix Home for one or two config files,
> > well nope you can't unless you're willing to move you packages as
> > well or willing to have a pointless symlink that you didn't ask
> > for.
> 
> ~/.guix-profile is independent from ~/.guix-home and you don't need
> to move all the packages to Guix Home if you don't want it.
That's not quite an answer to the point I'm making.  The point is that
whether I want to or not, Guix Home clutters $HOME with this directory.
Point taken, guix package does so too *by default*, but the -p switch
exists partly to change that.  Problem is, -p on its own also clutters
(viz the generations), unless you are careful enough to populate /var
with it, which isn't a nice design either.

> The profile management is the same as for Guix System.
> 
> ~/.guix-home is a synonym to /run/current-system.
> 
> Customization of ~/.guix-home location is potentially troublesome and
> was removed in October 2021.
/run is not /home, though; I don't think that analogy really works. 
Assuming we do need to hardcode the guix-home root for... reasons...
why can't we place that root somewhere where the user won't be bothered
by it?  For backwards compatibility, we could check whether ~/.guix-
home exists and symlink it to the home profile in /var/guix/per-user if
it does.

Cheers
> 



Re: Multiple profiles with Guix Home

2022-05-27 Thread andrew
On 2022-05-26 01:36, Liliana Marie Prikler wrote:

> Hi,
>
> Am Mittwoch, dem 25.05.2022 um 14:01 +0300 schrieb Andrew Tropin:
>> On 2022-05-24 20:31, Liliana Marie Prikler wrote:
>> 
>> > Hi,
>> > 
>> > Am Dienstag, dem 24.05.2022 um 14:55 +0300 schrieb Andrew Tropin:
>> > 
>> > > On 2022-05-23 19:05, Liliana Marie Prikler wrote:
>> > > > [...]
>> > > > I don't think I agree with this choice.  To satisfy both my own
>> > > > use case of serving profiles in different locations from
>> > > > another and another issue being raised w.r.t. configuring the
>> > > > location of the .guix-home profile, I think we should make a
>> > > > triple of location, optional short name, and manifest (which
>> > > > may be generated from packages implicitly).  WDYT?
>> > > > 
>> > > 
>> > > This service is intended for profiles managed by Guix Home, so
>> > > every profile MUST be a part of home-environment (~/.guix-home is
>> > > a symlink to it).  I don't see any meaningful reasons to make it
>> > > possible to customize the path inside home-environment.
>> > Why though?  The decision to restrict Guix Home to dotfiles was
>> > already a bad one that has since been overturned, so I think we
>> > should carefully evaluate why "~/.guix-home" even is special.  In
>> > my point of view, any path that is prefixed with the user's home
>> > ought to be fair game, as should be constructing intermediate per-
>> > user profile symlinks in /var/guix.
>> 
>> It's not bad, it had and has its own goals, pros and cons, I found
>> another design descision, which we think is more intuitive, but still
>> partially serving original goals and we switched to it.  The
>> disucssion about ~/.guix-home symlink itself is unrelated to both
>> "dotfiles question" and my original statement.
> Perhaps it's only tangentially related, but it highlights a point of
> contention that I have with Guix Home overall, being that it takes a
> few very idiosyncratic "shortcuts", that I don't think make too much
> sense in the wider sense of Guix.  Consider %profile-directory, for
> example.  I can't see it anywhere in the code for Guix Home, so I
> assume generations are currently littered into the user home.  The
> specific choice of moving ~/.guix-profile to ~/.guix-home is another.
> Assume I only want to use Guix Home for one or two config files, well
> nope you can't unless you're willing to move you packages as well or
> willing to have a pointless symlink that you didn't ask for.

~/.guix-profile is independent from ~/.guix-home and you don't need to
move all the packages to Guix Home if you don't want it.

The profile management is the same as for Guix System.

~/.guix-home is a synonym to /run/current-system.

Customization of ~/.guix-home location is potentially troublesome and
was removed in October 2021.

>
> Don't get me wrong, this is still mostly about managing multiple
> profiles with Guix Home, but the way I see it, Guix Home's own profile
> management could also be improved.
>
>> All dot/xdg/other files belong to home-environment and no side-
>> effects are done during the build of home-environment, the only side-
>> effects happens during activation and $HOME touched only by symlink-
>> manager and I would like to keep it to be the case, otherwise we will
>> end up with tons of stateful ad-hoc hacks.
> I struggle to see how my proposal would complicate that other than
> adding more jobs to symlink manager (perhaps?).  For what it's worth, I
> do think that job could be much simplified too by storing the symlinks
> in an association list
> (("~/path/to/symlink" "/gnu/store/path/to/target") ...),
> which could be part of a Guix Home "profile" just like manifest.scm is
> part of a normal Guix profile.  The activation script would then read
> this table, expand "~" (as well as check that it is the first letter i
> each of the first paths) and create the symlinks according to spec. 
> Best of all, it doesn't even matter that much if the target is in the
> store, in /var/guix/profiles/per-user, or even another place relative
> to ~.  

A little too abstract/general, let's see how it goes during
implementation.

>
> Note that I believe that at the point of writing this file variables
> such as $XDG_CONFIG_HOME should already have been resolved relative to
> $HOME, with the former being specified in home-configuration or
> assuming their usual defaults.  YMMV on whether that's actually useful,
> one could alternatively allow $XDG_CONFIG_HOME/ etc. as leading
> sequences too, though that invites more errors when experimenting with
> homeless shelters outside of clean shells.
>
>> That said, I would like to avoid any Guix Home logic to rely on paths
>> outside of home-environment.  In case you really need
>> ~/work/my-project/guix-profile to be created for some reason you can
>> extend home-files-service-type and rely on symlink-manager to do this
>> dirty job, but the setup-environment script will still source
>> 

Re: Move /gnu/store to another filesystem

2022-05-27 Thread Giovanni Biscuolo
Hi Théo

Théo Maxime Tyburn  writes:

> Hi again,

> I ran into 2 errors when running the tests after running make in
> the repo. One error has to do with crate. I guess there is a dependency
> missing. The other error has to do with channels. Not sure why. 

[...]

Sorry, now I can't help with setting up a Guix development environment,
all I can suggest you is to read the "19 Contrubuting" manual section,
in particular "19.1 Building from Git" and "19.2 Running Guix Before It
Is Installed".

> I also pulled guix today as well as the guix git repository.
> Tell me if you need more details.
>
> Anyway I can already start writing some things in the cookbook. Should I
> directly edit doc/guix-cookbok.texi?

Yes, and propose a patch

> I have no expereince writing docs
> in texinfo, so I’ll try my best. Are there any recommendations or
> guidelines?

The texinfo manual is
https://www.gnu.org/software/texinfo/manual/texinfo/

Anyway if you are still not familiar with texinfo and all pthe
contributing process, please just write the Cookbook session in any
format you like (that I can read with free software) or in plain text, I
can convert it to texinfo and propose a patch

...but please don't hold your breath :-)

Thanks! Gio'

-- 
Giovanni Biscuolo

Xelera IT Infrastructures


signature.asc
Description: PGP signature


Re: Move /gnu/store to another filesystem

2022-05-27 Thread Tobias Geerinckx-Rice

I forgot to add:

You can probably reclaim most of that space by deleting the (now 
bogus) /gnu/store/.links directory.  That's safe.


Kind regards,

T G-R


signature.asc
Description: PGP signature


Re: Move /gnu/store to another filesystem

2022-05-27 Thread Tobias Geerinckx-Rice

Hi Théo,

Théo Maxime Tyburn 写道:
I figured out where the problem came from. I forgot to use the 
-p option

while copying the store with cp.


I think this will probably work (I mean—it obviously did, but also 
longer-term).


However, ‘cp -p’ does not preserve everything, including hard 
links.  Applications shouldn't care but you might be surprised at 
how much disc space hard links save on my system:


~ λ du -hs /gnu/store
86G /gnu/store
~ λ du -hs --count-links /gnu/store
192G/gnu/store

I was!

‘cp -a’ should preserve hard links but I personally recommend 
using rsync instead, with a paranoid helping of -aHAX flags. 
Unlike cp, it's resumable, which is nice when copying 100s of 
gigabytes.


Kind regards,

T G-R


signature.asc
Description: PGP signature


Re: Move /gnu/store to another filesystem

2022-05-27 Thread Théo Maxime Tyburn
Hi again,

I ran into 2 errors when running the tests after running make in
the repo. One error has to do with crate. I guess there is a dependency
missing. The other error has to do with channels. Not sure why. 

Here are my test logs ==
   GNU Guix 1.3.0.19080-38bf6: ./test-suite.log
==

# TOTAL: 2207
# PASS:  2186
# SKIP:  18
# XFAIL: 1
# FAIL:  2
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: tests/channels


test-name: channel-instance-metadata returns default if .guix-channel does not 
exist
location: /data/src/guix/tests/channels.scm:117
source:
+ (test-equal
+   "channel-instance-metadata returns default if .guix-channel does not exist"
+   '("/" ())
+   (let ((metadata
+   (channel-instance-metadata instance--boring)))
+ (list (channel-metadata-directory metadata)
+   (channel-metadata-dependencies metadata
expected-value: ("/" ())
actual-value: ("/" ())
result: PASS

test-name: channel-instance-metadata and default dependencies
location: /data/src/guix/tests/channels.scm:123
source:
+ (test-equal
+   "channel-instance-metadata and default dependencies"
+   '()
+   (channel-metadata-dependencies
+ (channel-instance-metadata instance--no-deps)))
expected-value: ()
actual-value: ()
result: PASS

test-name: channel-instance-metadata and directory
location: /data/src/guix/tests/channels.scm:127
source:
+ (test-equal
+   "channel-instance-metadata and directory"
+   "/modules"
+   (channel-metadata-directory
+ (channel-instance-metadata
+   instance--sub-directory)))
expected-value: "/modules"
actual-value: "/modules"
result: PASS

test-name: channel-instance-metadata rejects unsupported version
location: /data/src/guix/tests/channels.scm:132
source:
+ (test-equal
+   "channel-instance-metadata rejects unsupported version"
+   1
+   (guard (c ((and (message-condition? c) (error-location? c))
+  (location-line (error-location c
+  (channel-instance-metadata
+instance--unsupported-version)))
expected-value: 1
actual-value: 1
result: PASS

test-name: channel-instance-metadata returns 
location: /data/src/guix/tests/channels.scm:138
source:
+ (test-assert
+   "channel-instance-metadata returns "
+   (every (@@ (guix channels) channel-metadata?)
+  (map channel-instance-metadata
+   (list instance--no-deps
+ instance--simple
+ instance--with-dupes
actual-value: #t
result: PASS

test-name: channel-instance-metadata dependencies are channels
location: /data/src/guix/tests/channels.scm:145
source:
+ (test-assert
+   "channel-instance-metadata dependencies are channels"
+   (let ((deps ((@@ (guix channels)
+channel-metadata-dependencies)
+(channel-instance-metadata instance--simple
+ (match deps (((? channel? dep)) #t) (_ #f
actual-value: #t
result: PASS

test-name: latest-channel-instances includes channel dependencies
location: /data/src/guix/tests/channels.scm:152
source:
+ (test-assert
+   "latest-channel-instances includes channel dependencies"
+   (let* ((channel (channel (name 'test) (url "test")))
+  (test-dir
+(channel-instance-checkout instance--simple)))
+ (mock ((guix git)
+update-cached-checkout
+(lambda* (url #:key ref starting-commit)
+  (match url
+ ("test" (values test-dir "caf3cabba9e" #f))
+ (_ (values
+  (channel-instance-checkout instance--no-deps)
+  "abcde1234"
+  #f)
+   (with-store
+ store
+ (let ((instances
+ (latest-channel-instances store (list channel
+   (and (eq? 2 (length instances))
+(lset= eq?
+   '(test test-channel)
+   (map (compose
+  channel-name
+  channel-instance-channel)
+instances
actual-value: #t
result: PASS

test-name: latest-channel-instances excludes duplicate channel dependencies
location: /data/src/guix/tests/channels.scm:171
source:
+ (test-assert
+   "latest-channel-instances excludes duplicate channel dependencies"
+   (let* ((channel (channel (name 'test) (url "test")))
+  (test-dir
+(channel-instance-checkout instance--with-dupes)))
+ (mock ((guix git)
+update-cached-checkout
+(lambda* (url #:key ref starting-commit)
+  (match url
+ ("test" (values test-dir "caf3cabba9e" #f))
+ (_ (values
+  (channel-instance-checkout instance--no-deps)
+  "abcde1234"
+  #f)
+   

Re: Move /gnu/store to another filesystem

2022-05-27 Thread Théo Maxime Tyburn
Hi Gio’

Giovanni Biscuolo  writes:

> Great!  IMHO it'd be useful for other users to have a "Move store to
> another device" section in our cookbook: would you like to try to add a
> patch to it and see if maintainers accept it?  I can help if needed.

Yes good idea. I’ll try to setup my guix git repo. I’ll let you know if
I have troubles.

> Happy Hacking! Gio'
 
Cheers, Théo



Cuirass and SQL

2022-05-27 Thread zimoun
Hi,

On jeu., 26 mai 2022 at 00:24, Arun Isaac  wrote:

>> Quick question about guix-forge.  Why laminar instead of cuirass as
>> the CI?
>
> Two reasons:
>
> - Cuirass requires a PostgreSQL database, but I wanted guix-forge to be
>   as stateless as possible and definitely not require a complex database
>   server like PostgreSQL. Laminar just uses sqlite.

Initially, Cuirass was using SQLite but then switched [1] to
PostgreSQL.  The main reason is scalability.

I do not know if it is a technically doable to have two SQL backends and
let the user pick the one they prefer.  For sure, it is not doable from
a maintenance point of view.

About the complexity of PostgreSQL, I think the Guix services [2,3] help here.



1: 

2: 
3: 


Cheers,
simon



Re: emacs-guix (upstream) needs more love: a survey of repositories, homepage and issues

2022-05-27 Thread Théo Maxime Tyburn
Hi,

Giovanni Biscuolo  writes:

> where do you plan to push that branch to? I mean, what git remote?

I pushed it to github for now. I tried using sr.ht but for some reason I
had troubles (fatal: error reading section header 'shallow-info'). We
can also use something else.

It is here https://github.com/theottm/emacs-guix-clone. There is only
one branch.

> if you succeed in building the new merged branch please notify me and
> I'll try to upstream it to
> https://git.savannah.gnu.org/cgit/guix/emacs-guix.git

I just sucessfuly built it. You can probably use
--8<---cut here---start->8---
git fetch https://github.com/theottm/emacs-guix-clone.git 
merge-gitlab-remote:merge-gitlab-remote
--8<---cut here---end--->8---
to create the branch. 

Cheers,

Théo



Re: Test Failure when upgrading python-rope

2022-05-27 Thread Lars-Dominik Braun
Hi jgart,

> ==
> FAIL: test_search_submodule (ropetest.contrib.autoimporttest.AutoImportTest)
> --
> Traceback (most recent call last):
>   File 
> "/tmp/guix-build-python-rope-1.1.1.drv-0/rope-1.1.1/ropetest/contrib/autoimporttest.py",
>  line 121, in test_search_submodule
> self.assertIn(import_statement, self.importer.search("env", 
> exact_match=True))
> AssertionError: ('from build import env', 'env') not found in []
this exact failure also appears outside of Guix (i.e. virtualenv and then
`python setup.py test`), so I’d assume it’s a bug, disable the test
and move on.

Cheers,
Lars




Re: emacs-guix (upstream) needs more love: a survey of repositories, homepage and issues

2022-05-27 Thread Giovanni Biscuolo
Hi Théo

Théo Maxime Tyburn  writes:

> I would also be happy to help if I can.
>
> I could create a new branch starting at savannah’s HEAD

where do you plan to push that branch to? I mean, what git remote?

> and cherry pick everything relevant from gitlab since the
> merge-base. That would probably be everything except the duplicates,
> so the 4 commit Kaelyn mentioned, right ?

yes, that's the plan

if you succeed in building the new merged branch please notify me and
I'll try to upstream it to
https://git.savannah.gnu.org/cgit/guix/emacs-guix.git

> Probably we also need to gather the issues from gitlab. Not experienced
> with savannah issue tracker, but I could try it out.

Savannah does not have an issue tracker, I think bug-guix
(http://lists.gnu.org/mailman/listinfo/bug-guix) it's the official
emacs-guix bug tracking system

But "issues merging" is another step, let's finish the code merge :-D

Thank! Gio'

[...]

-- 
Giovanni Biscuolo

Xelera IT Infrastructures


signature.asc
Description: PGP signature


Re: emacs-guix (upstream) needs more love: a survey of repositories, homepage and issues

2022-05-27 Thread Giovanni Biscuolo
Hello,

I've removed "GNU Guix maintainers "

Kaelyn  writes:

[...]

>> how is your cherry-picking going?
>>
>> is there anything I can do to help?

[...]

> However, I keep getting elisp errors about something having the wrong
> number of arguments,

I think it depends from the Emacs upgrade to 28.1 since I saw other
emacs packages had to adjust the build due to wrong number of arguments

emacs-guix as distributed now (taken from
https://gitlab.com/emacs-guix/emacs-guix.git) compiles well on 28.1

[...]

> I wanted to at least make sure the package built with the included
> guix.scm before figuring out how to send a pull request (or patch
> series) to a savannah-hosted project, but that error has me stumped.

OK, I'll try this week-end and I'll report back my findings

Thank! Gio'

[...]

-- 
Giovanni Biscuolo

Xelera IT Infrastructures


signature.asc
Description: PGP signature