GNU bug report logs - #59423
Invalid 'location' field generated in dovecot configuration

Previous Next

Package: guix;

Reported by: Pierre Langlois <pierre.langlois <at> gmx.com>

Date: Sun, 20 Nov 2022 22:11:01 UTC

Severity: important

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Fredrik Salomonsson <plattfot <at> posteo.net>
To: 59423 <at> debbugs.gnu.org
Subject: bug#59423: Invalid 'location' field generated in dovecot configuration
Date: Sat, 26 Nov 2022 23:17:11 +0000
Hello,

I think I encountered the same bug when I updated my home rofi service
to use a configuration. It also has a `location` entry but it takes an
integer.

Here is a repro to reproduce it using `guix repl`:

    scheme@(guix-user)> (use-modules (gnu services configuration))
    scheme@(guix-user)> (define (serialize-integer f v) (number->string v))
    scheme@(guix-user)> (define-configuration repro-configuration (location (integer 2) "set location"))
    ;;; <stdin>:3:0: warning: shadows previous definition of `%repro-configuration-location-procedure' at <stdin>:3:0
    ;;; <unknown-location>: warning: shadows previous definition of `repro-configuration-location' at <unknown-location>
    scheme@(guix-user)> (serialize-configuration (repro-configuration) repro-configuration-fields)
    ice-9/boot-9.scm:1685:16: In procedure raise-exception:
    In procedure number->string: Wrong type argument in position 1: #f
    
    Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
    scheme@(guix-user) [1]> ,q
    scheme@(guix-user)> (repro-configuration)
    $1 = #<<repro-configuration> location: 2 %location: #f>

Note the warning about location being shadowed. And it looks like
%location is trying to use `serialize-integer` but failing as it is #f.

Here is what `guix describe` reports on what guix version I'm running:

    Generation 13	nov 26 2022 15:05:06	(current)
      guix 68925b5
        repository URL: https://git.savannah.gnu.org/git/guix.git
        branch: master
        commit: 68925b5ee7e0d96b0c84ae98a633eea5097bf511

I hope this helps with debugging this.

-- 
s/Fred[re]+i[ck]+/Fredrik/g




This bug report was last modified 2 years and 166 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.