bug#59423: Invalid 'location' field generated in dovecot configuration

2022-12-01 Thread Pierre Langlois
Hi all!

As suggested by mirai off-list, it would be nice to have a test that
would have caught the issue. How do people feel about something along
the following patch? The idea is to use namespaces in the dovecot config
to declare the INBOX and another additional mailbox.

The bug is quite obscure and not really about dovecot itself, so I don't
think adding such a test is strictly necessary, maybe more tests for the
configuration macro would be good instead. But I figured expanding the
dovecot system test can't hurt. Let me know if you agree and I'll format
it properly.



signature.asc
Description: PGP signature
diff --git a/gnu/tests/mail.scm b/gnu/tests/mail.scm
index f13751b72f..8a2dbd798f 100644
--- a/gnu/tests/mail.scm
+++ b/gnu/tests/mail.scm
@@ -301,8 +301,19 @@ (define %dovecot-os
  (auth-anonymous-username "alice")
  (mail-location
   (string-append "maildir:~/Maildir"
- ":INBOX=~/Maildir/INBOX"
- ":LAYOUT=fs"))
+ ":LAYOUT=fs"))
+ (namespaces
+  (list
+   (namespace-configuration
+(name "INBOX")
+(inbox? #t)
+(separator "/")
+(location "maildir:~/Maildir/INBOX"))
+   (namespace-configuration
+(name "guix-devel")
+(separator "/")
+(prefix "guix-devel/")
+(location "maildir:~/Maildir/guix-devel"
 
 (define (run-dovecot-test)
   "Return a test of an OS running Dovecot service."
@@ -351,9 +362,10 @@ (define message "From: t...@example.com\n\
   (marionette-eval `(file-exists? (string-append "/proc/" ,pid))
marionette)))
 
-  (test-assert "accept an email"
+  (define-syntax-rule (with-imap-connection imap exp ...)
 (let ((imap (socket AF_INET SOCK_STREAM 0))
-  (addr (make-socket-address AF_INET INADDR_LOOPBACK 8143)))
+  (addr (make-socket-address AF_INET INADDR_LOOPBACK 8143))
+  (body (lambda (imap) exp ...)))
   (connect imap addr)
   ;; Be greeted.
   (read-line imap) ;OK
@@ -362,6 +374,43 @@ (define message "From: t...@example.com\n\
   (read-line imap) ;+
   (write-line "c2lyaGM=" imap)
   (read-line imap) ;OK
+
+  (let ((ok (body imap)))
+;; Logout
+(write-line "a LOGOUT" imap)
+(close imap)
+ok)))
+
+  (define (marionette-read-new-mail mailbox marionette)
+(marionette-eval
+ `(begin
+(use-modules (ice-9 ftw)
+ (ice-9 match))
+(match (scandir ,mailbox)
+  (("." ".." message-file)
+   (call-with-input-file
+   (string-append ,mailbox message-file)
+ get-string-all
+ marionette))
+
+  (test-assert "accept an email"
+(with-imap-connection imap
+  ;; Append a message to the INBOX mailbox
+  (write-line (format #f "a APPEND INBOX {~a}"
+  (number->string (message-length message)))
+  imap)
+  (read-line imap) ;+
+  (write-line message imap)
+  (read-line imap) ;OK
+  #t))
+
+  (test-equal "mail arrived"
+message
+(marionette-read-new-mail "/home/alice/Maildir/INBOX/new/"
+  marionette))
+
+  (test-assert "accept an email in fresh mailbox"
+(with-imap-connection imap
   ;; Create a TESTBOX mailbox
   (write-line "a CREATE TESTBOX" imap)
   (read-line imap) ;OK
@@ -372,24 +421,16 @@ (define message "From: t...@example.com\n\
   (read-line imap) ;+
   (write-line message imap)
   (read-line imap) ;OK
-  ;; Logout
-  (write-line "a LOGOUT" imap)
-  (close imap)
   #t))
 
-  (test-equal "mail arrived"
+  (test-equal "mail arrived in fresh mailbox"
 message
-(marionette-eval
- '(begin
-(use-modules (ice-9 ftw)
- (ice-9 match))
-(let ((TESTBOX/new "/home/alice/Maildir/TESTBOX/new/"))
-  (match (scandir TESTBOX/new)
-(("." ".." message-file)
- (call-with-input-file
- (string-append TESTBOX/new message-file)
-   get-string-all)
- marionette))
+   

bug#59748: task init:1 blocked

2022-12-01 Thread Christopher Howard
I did a system reconfigure today, and I have a boot failure when I use the new 
system profile. More specifically, after I load the kernel (6.0.10) then I get 
to a boot message that the kernel modules are loading. If I wait long enough, 
eventually I get a message "task init:1 blocked for more than 120 seconds", 
which repeats every two minutes or so. The keyboard still works (I can enter a 
newline and watch the cursor move) but I cannot enter commands. I am using a 
LUKS encrypted system, and the hangup occurs in between the point were the 
(initially decrypted) kernel loads and the time when I would enter the password 
to unlock the main filesystem.

My last system upgrade was on October 31. That profile still works.

I will attach my system manifest file.

Here is my system information (running under the old profile):

```
christopher@theoden ~$ neofetch --stdout
christopher@theoden 
--- 
OS: Guix System x86_64 
Host: OptiPlex 9020 00 
Kernel: 5.19.17-gnu 
Uptime: 19 mins 
Packages: 93 (guix-system), 182 (guix-user) 
Shell: bash 5.1.8 
Resolution: 1920x1080 
DE: GNOME 
Theme: Adwaita [GTK2/3] 
Icons: Adwaita [GTK2/3] 
Terminal: .gnome-terminal 
CPU: Intel i5-4570 (4) @ 3.600GHz 
GPU: Intel HD Graphics 
GPU: AMD ATI Radeon HD 8490 / R5 235X OEM 
Memory: 1425MiB / 7867MiB 
```

Here is the guix commit I pulled:

```
christopher@theoden ~$ guix describe
Generation 42   Dec 01 2022 08:57:30(current)
  guix df25165
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: df25165530352161d6110466b2c9dbae7dc7e282
```

-- 
 Christopher Howard
 gemini://gem.librehacker.com
 http://gem.librehacker.com

בראשית ברא אלהים את השמים ואת הארץ
;; -*- geiser-scheme-implementation: guile -*-

(use-modules (gnu)
 (gnu packages cups)
 (gnu packages gnome)
 (gnu packages scanner))

(use-service-modules desktop networking ssh xorg cups)

(operating-system
 (locale "en_US.utf8")
 (timezone "America/Anchorage")
 (keyboard-layout
  (keyboard-layout "us" "altgr-intl" #:options '("ctrl:swapcaps")))
 (bootloader
  (bootloader-configuration
   (bootloader grub-bootloader)
   (targets (list "/dev/sda"))
   (keyboard-layout keyboard-layout)))
 (kernel-arguments (cons "cpufreq.default_governor=conservative"
 %default-kernel-arguments))
 (mapped-devices
(list (mapped-device
(source
  (uuid "32325179-3734-4223-9d4a-fe15aeca876a"))
(target "cryptroot")
(type luks-device-mapping
  (file-systems
(cons* (file-system
 (mount-point "/")
 (device "/dev/mapper/cryptroot")
 (type "ext4")
 (dependencies mapped-devices))
;  %fuse-control-file-system
   %base-file-systems))
  (host-name "theoden")
  (users (cons* (user-account
 (name "christopher")
 (comment "Christopher Howard")
 (group "users")
 (home-directory "/home/christopher")
 (supplementary-groups
  '("wheel" "netdev" "audio" "video"
"dialout" "lp" "disk" "floppy"
"cdrom" "lpadmin" "kvm")))
%base-user-accounts))
  (packages
   (append
(list
 (list (specification->package "bind") "utils"))
   (append
(map specification->package
 '("cups"
   "dosfstools"
   "ed"
   "evolution"
   "evolution-data-server"
   "file"
   "font-adobe-source-code-pro"
   "font-dejavu"
   "font-fantasque-sans"
   "font-fira-mono"
   "font-ghostscript"
   "font-gnu-freefont"
   "font-google-noto"
   "font-hermit"
   "font-inconsolata"
   "font-mononoki"
   "font-tamzen"
   "gnome-dictionary"
   "gnome-maps"
   "gnome-tweaks"
   "gsettings-desktop-schemas"
   "mg"
   "neofetch"
   "nss-certs"
   "procenv"
   "recutils"
   "sane-backends"
   "screen"
   "seahorse"
   "s-tui"
   "simple-scan"
   "torsocks"
   "tmon"
   "tree"
   "turbostat"
   "wget"))
   %base-packages)))

 (services
  (modify-services
   (cons*
(service gnome-desktop-service-type)
(service tor-service-type)
(rngd-service)
(service openssh-service-type)
(set-xorg-configuration
 (xorg-configuration
  (keyboard-layout keyboard-layout)))
(service cups-service-type
 (cups-configuration
  (web-interface? #t)
  (log-level 'debug)
  (access-log-level 'all)
  (extensions
   (list hplip-minimal cups-filters
(udev-rules-service
 'usbasp
 (udev-rule
  "99-USBasp.rules"
  (string-append
   "SUBSYSTEM==\"usb\", ENV{DEVTYPE}==\"usb_device\", "
   

bug#59423: Invalid 'location' field generated in dovecot configuration

2022-12-01 Thread Pierre Langlois
Hi Maxim,

Maxim Cournoyer  writes:

> Hi Ludovic,
>
> Ludovic Courtès  writes:
>
>> Hi,
>>
>> Maxim Cournoyer  skribis:
>>
> The issue seems to be with the serialization of the
>  object nested in the 
> record.  I tried this at the REPL:
>
> scheme@(guile-user)> ,m (gnu services mail)
> scheme@(gnu services mail)> (namespace-configuration (name "inbox"))
> $8 = #< name: "inbox" type: "private"
> separator: "" prefix: "" location: "" inbox?: #f hidden?: #f
> list?: #t subscriptions?: #t mailboxes: () %location: #f>
> scheme@(gnu services mail)> (serialize-configuration $8 
> namespace-configuration-fields)
> name=inbox
> type=private
> separator=
> prefix=
> location=#f

 The location here should probably be empty rather than `#f' no? It looks
 as though the value is coming from the internal %location, rather than
 the user-provided location.
>>
>> Uh.
>>
 I'll if I can find anything the macro, it looks quite complex to me :-).
>>>
>>> It's not only to you, if that helps.  It's rather... intimidating ^^'.
>>
>> [...]
>>
>>> Ludovic, would you have an idea of where the %location field or its
>>> CONFIGURATION-location accessor come into play?
>>
>> We have this:
>>
>>  (define-record-type* #,(id #'stem #'< #'stem #'>)
>>stem
>>#,(id #'stem #'make- #'stem)
>>#,(id #'stem #'stem #'?)
>>#,@(map (lambda (name getter def)
>>  #`(#,name #,getter (default #,def)
>>(sanitize
>> #,(id #'stem #'validate- #'stem #'- name
>>#'(field ...)
>>#'(field-getter ...)
>>#'(field-default ...))
>>(%location #,(id #'stem #'stem #'-location)
>>   (default (and=> (current-source-location)
>>   source-properties->location))
>>   (innate)))
>>
>> That generates two accessors called ‘namespace-configuration-location’.
>> The second one shadows the first one.
>
> Yes.  You didn't address my question directly though, so let me ask it
> again: where is this %location field access (named "location") used?  It
> seems nowhere.  Thus, we can simply rename it without impacting
> anything, right (except theoretical usages in the wild, since in the
> API).
>
>> With commit 44554e7133aa60e1b453436be1e80394189cabd9, the second one
>> is the “wrong” one: ‘namespace-configuration-location’ now returns the
>> ‘%location’ field, not the user-specified ‘location’ field.  (I
>> reported that issue in .)
>>
>> What do you think of reverting 44554e7133aa60e1b453436be1e80394189cabd9?
>
> No.  If we revert something, it won't be that whole commit, but just the
> moving of the field in the define-configuration produced record.

If we don't have an obvious solution to the issue and it may need more
time, how do you feel about reverting the changes? Unless there is a
work around that could be applied until a nicer more permanent solution
is found (although those temporary fixes do tend to stick around
sometimes :-) ).

Thanks,
Pierre


signature.asc
Description: PGP signature


bug#58606: Emacs next pgtk crashes when pasting to other app

2022-12-01 Thread Joshua Branson via Bug reports for GNU Guix
Andrew Tropin  writes:

> On 2022-11-16 10:34, Joshua Branson wrote:
>
>> Declan Tsien  writes:
>>
>>> Andrew Tropin  writes:
>>>
 Recently discovered a problem, which reproduces this way:
 - Open a new emacs instance.
 - Yank anything with M-w or select with mouse.
 - Paste yanked text to chromium/icecat.

 Both browser and emacs are hanging up for a while and after that Emacs
 crashes with:
>>>
>>
>> I just discovered today, that I can copy text from emacs and paste that
>> text into firefox.  It seems to no longer be an issue for me.  :)
>
> I built a latest emacs from master:
> https://git.sr.ht/~abcdw/rde/commit/b03373920c1cc7d8d4b2d64c96f72eed9bb3651a
>
> And it is affected by this issue, so I made a quick and dirty workaround:
> https://git.sr.ht/~abcdw/rde/commit/b6aef2d8b34d1166f33629b4b3a1a0f5751f90f9
>
> Unfortunately, I don't see an easy way to backport this fix to Guix.
>
> Probably, this issues should be reported to bug-gnu-emacs.
>

I will let one of you do the reporting, since this issue no longer
affects me.  :)





bug#57589: Guix hands on GDM with wayland

2022-12-01 Thread mirai
Grigory Shepelev wrote on 21 Nov 03:43 +0100:

> Figured out what was the problem. The /tmp dir. Once I had nonexisting /mnt
> dir on Guix boot. So I've added this piece In my file-systems:
> 
> (file-system
>   (mount-point "/tmp")
>   (device "tmp")
>   (type "tmpfs")
>   (check? #f))
> 
> This exact piece was causing a problem. Seems like it's connected to
> x11-socket-directory-service from (gnu services desktop). So, maybe the
> tmpdir was mounted after GDM boot and override the needed /tmp settings.

This might not be the case (like you, I'm also
using tmpfs for /tmp as mentioned in https://issues.guix.gnu.org/57589#9).
I've wrote a small guix system test for testing out this tmpfs theory at
https://issues.guix.gnu.org/59739 and so far, all the tests pass, with or 
without
/tmp as tmpfs mount.

Can you share your 'loginctl show-user gdm' and
'loginctl show-session ' output (before logging in with gdm, 
you
can do this via ssh or switch to another tty) and your system specs/GPU make?







bug#58606: Emacs next pgtk crashes when pasting to other app

2022-12-01 Thread Andrew Tropin
On 2022-11-16 10:34, Joshua Branson wrote:

> Declan Tsien  writes:
>
>> Andrew Tropin  writes:
>>
>>> Recently discovered a problem, which reproduces this way:
>>> - Open a new emacs instance.
>>> - Yank anything with M-w or select with mouse.
>>> - Paste yanked text to chromium/icecat.
>>>
>>> Both browser and emacs are hanging up for a while and after that Emacs
>>> crashes with:
>>
>
> I just discovered today, that I can copy text from emacs and paste that
> text into firefox.  It seems to no longer be an issue for me.  :)

I built a latest emacs from master:
https://git.sr.ht/~abcdw/rde/commit/b03373920c1cc7d8d4b2d64c96f72eed9bb3651a

And it is affected by this issue, so I made a quick and dirty workaround:
https://git.sr.ht/~abcdw/rde/commit/b6aef2d8b34d1166f33629b4b3a1a0f5751f90f9

Unfortunately, I don't see an easy way to backport this fix to Guix.

Probably, this issues should be reported to bug-gnu-emacs.

-- 
Best regards,
Andrew Tropin


signature.asc
Description: PGP signature


bug#59717: ‘guix’ package fails to build on armhf-linux (OOM)

2022-12-01 Thread Ludovic Courtès
Hi,

"pelzflorian (Florian Pelz)"  skribis:

> Ludovic Courtès  writes:
>> [ 76%] GUILEC   gnu/packages/uucp.go
>> [ 76%] GUILEC   gnu/packages/valgrind.go
>> [ 76%] GUILEC   gnu/packages/version-control.go
>> [ 76%] GUILEC   gnu/packages/video.go
>> GC Warning: Failed to expand heap by 67125248 bytes
>> GC Warning: Failed to expand heap by 67108864 bytes
>> GC Warning: Out of Memory! Heap size: 3440 MiB. Returning NULL!
>
> Happens for me too, unless I do --cores=1.

Interesting.

I worked around it with commit 1aa7ee52c6c520c2dbbdb06f1381466e9fd96294
on ‘version-1.4.0’.

Next I’d like to do some heap profiling to address the problem at its
root; it qualifies as a memory leak.

Thanks,
Ludo’.





bug#59695: ESP partition uses 1024 byte sectors

2022-12-01 Thread Efraim Flashner
On Tue, Nov 29, 2022 at 10:51:42PM +0200, Efraim Flashner wrote:
> I was working on using a grub-efi system image for aarch64 and I got the
> following error:
> 'Error: FAT sector size mismatch (fs=1024, dev=512)'
> I traced it back to u-boot¹. u-boot wouldn't chainload grub if the
> device block size and the filesystem sector size doesn't line up. I
> changed the line in (gnu build image) in make-vfat-image to use '-S 512'
> for esp partitions and was able to load the grub menu from u-boot.
> 
> I spent some time looking through the git history but I wasn't able to
> find anything to suggest why we have 1024 byte sectors there
> specifically.
> 
> ¹ https://source.denx.de/u-boot/u-boot/-/blob/master/fs/fat/fat.c#L589

Normally I'd be ok with hardcoding 512 for the sector size to fix this,
but then I remembered that there are 4k block size disks which actually
declare themselves as having 4k blocks and not emulating 512 byte
blocks.

What do you think? I suppose one option would be to patch u-boot to not
demand they be equal, but that only works with guix build u-boot. We
could force 512, u-boot is the only thing I've come across so far that
cares and most people² use µSD cards which advertise 512 byte blocks.

Maybe change it to 512 and add a TODO to revisit it later as needed?

² citation needed

-- 
Efraim Flashner  אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature