bug#66102: guix system delete-generations ignores grub-configuration terminal-ouputs field setting

2023-09-19 Thread Maze
I deleted old generations of my system today and I think I noticed an
incorrect behavior. In most cases this would be just a minor temporary
badness, maybe (just maybe) in the case of some exotic or ancient
hardware, a variant of the same issue could results in an unbootable
system.

At the end of a 'guix system delete-generations' command, the bootloader
setup is updated for the current system. However, in my case, the
setting defined by the terminal-outputs field of the
bootloader-configuration record of my system configuration is not taken
into account by this step. I use the console output of GRUB.

In the event it matters, I should mention that I have the filesystem on
an encrypted partition: I input the passphrase once at GRUB rescue
before the GRUB menu, then a second time when I'm prompted by the initrd.

How to reproduce, then workaround:

1. Reconfigure an operating system with something like:
(bootloader-configuration ...
  (terminal-outputs '(console))
  ...)

2. Reboot, you should see a non-graphical GRUB menu with a blue
background.

3. Delete some generations, for example by running:
guix system delete-generations 1..N
(with N some integer)

4. Reboot immediately without reconfiguring your system. If you see a
guixified graphical background for the GRUB menu, then this is the bug,
since it's not what's configured for the current system. This ought to
be the gfxterm output of GRUB.

5. Reconfigure your system:
guix system reconfigure /path/to/system.scm

6. Reboot, and check that you see a non-graphical blue background GRUB
menu again. Issue is worked around, presumably until the next time
generations are deleted.







bug#66014: Unable to use UUIDs to construct RAID array in mapped-devices

2023-09-19 Thread Csepp


Ludovic Courtès  writes:

> Hi,
>
> Csepp  skribis:
>
>> Lars Rustand  writes:
>
> [...]
>
>>> But this one fails:
>>>
>>>   (mapped-devices
>>> (list
>>>   (mapped-device
>>> (source (list (uuid "a07c54da-eb61-4135-86b8-8791e863e46a") (uuid 
>>> "c40026af-ace9-47fc-9d3f-4b8d6a2219cb")))
>>> (target "/dev/md0")
>>> (type raid-device-mapping
>>>
>>> The error message I get is guix system: error: #< type: dce bv: 
>>> #vu8(160 124 84 218 235 97 65 53 134 184 135 145 232 99 228 106)>: invalid 
>>> G-expression input
>>>
>>> [[End of PGP Signed Part]]
>>
>> Would it be possible to use /dev/disk/by-uuid paths instead of uuid
>> objects for these?
>
> Depends: /dev/disk/by-uuid is populated by eudev, which is not running
> at the time initrd code runs; IOW it’s OK to use /dev/disk/by-uuid if
> and only if the mapped device is not “needed for boot”.
>
>> I think this big "typeof" based dynamic dispatch that we're using in
>> Scheme is erm, not very robust, to put it mildly.
>
> Yeah, it’s not great.  What would you suggest?
>
> Ludo’.

I guess MyPy-for-Guile is a bit out of scope for now, so the next best
way to catch these would be property based testing.
As for implementing them, can't we use Guile's generics, or model
something on Clojure's generics?  Something that lets client code add
implementations to an interface.  Although that might have some security
implications.





bug#65720: Guile-Git-managed checkouts grow way too much

2023-09-19 Thread Simon Tournier
Hi Ludo.

On Tue, 19 Sep 2023 at 00:35, Ludovic Courtès  wrote:

> --8<---cut here---start->8---
> scheme@(guile-user)> ,use(git)
> scheme@(guile-user)> ,t (clone "https://git.savannah.gnu.org/git/guix.git; 
> "/tmp/guix")
> $5 = #
> ;; 600.534529s real time, 435.260926s run time.  0.00s spent in GC.
> scheme@(guile-user)> ,t (clone "https://git.savannah.gnu.org/git/guix.git; 
> "/tmp/guix-after-removing-nix-branch")
> $6 = #
> ;; 420.321511s real time, 398.772963s run time.  0.00s spent in GC.
> --8<---cut here---end--->8---

[...]

> --8<---cut here---start->8---
> $ du -hs /tmp/guix/.git
> 373M  /tmp/guix/.git
> $ du -hs /tmp/guix-after-removing-nix-branch/.git
> 362M  /tmp/guix-after-removing-nix-branch/.git
> --8<---cut here---end--->8---

Just to also point [1] that using shallow clone and restrict to the
oldest reachable commit by the time-machine, it saves 25% of bits to
download, and similarly on disk.

--8<---cut here---start->8---
scheme@(guix-user)> ,t (clone "https://git.savannah.gnu.org/git/guix.git; 
"/tmp/guix-guile")
$1 = #
;; 383.186818s real time, 278.060733s run time.  0.00s spent in GC.

$ time git clone https://git.savannah.gnu.org/git/guix.git guix-full
Receiving objects: 100% (693699/693699), 342.14 MiB | 2.87 MiB/s, done.
real2m40,830s
user3m4,683s
sys 0m8,189s

$ time git clone --shallow-since=2019-04-30 
https://git.savannah.gnu.org/git/guix.git guix-oldest
Receiving objects: 100% (428646/428646), 259.41 MiB | 3.87 MiB/s, done.
real1m45,604s
user2m32,370s
sys 0m5,916s

$ du -sh guix-*/.git
362Mguix-full/.git
362Mguix-guile/.git
272Mguix-oldest/.git
--8<---cut here---end--->8---

Cheers,
simon


1: Re: hard dependency on Git? (was bug#65866: [PATCH 0/8] Add built-in builder 
for Git checkouts)
Simon Tournier 
Mon, 11 Sep 2023 19:52:34 +0200
id:871qf4ha1p@gmail.com
https://lists.gnu.org/archive/html/guix-devel/2023-09
https://yhetil.org/guix/871qf4ha1p@gmail.com