all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: julien lepiller <julien@lepiller.eu>
To: john herrlin <jherrlin@gmail.com>
Cc: 28752@debbugs.gnu.org
Subject: bug#28752: openvpn-client-service error
Date: Mon, 09 Oct 2017 13:41:33 +0200	[thread overview]
Message-ID: <9848dda76b124fbfd0add50cdbccf6db@lepiller.eu> (raw)
In-Reply-To: <CAKJA2oGhJ32KE9TbX3hPpp=5xLkcR7k-OD5fSyHPC68x8A4+pg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2090 bytes --]

Le 2017-10-08 22:03, john herrlin a écrit :
> Hey,
> 
> I am facing a problem with (openvpn-client-service) when trying to
> reconfigure the system.
> Its GuixSD on a x86-64, the system config is attached.
> 
> Backtrace:
> In srfi/srfi-1.scm:
>    592:29 19 (map1 (#<<service> type: #<service-type nscd 22f74b0…> …))
>    592:29 18 (map1 (#<<service> type: #<service-type guix 22f73c0…> …))
>    592:29 17 (map1 (#<<service> type: #<service-type urandom-seed…> …))
>    592:29 16 (map1 (#<<service> type: #<service-type syslog 22f74…> …))
>    592:29 15 (map1 (#<<service> type: #<service-type static-netwo…> …))
>    592:29 14 (map1 (#<<service> type: #<service-type mingetty 22f…> …))
>    592:29 13 (map1 (#<<service> type: #<service-type mingetty 22f…> …))
>    592:29 12 (map1 (#<<service> type: #<service-type mingetty 22f…> …))
>    592:29 11 (map1 (#<<service> type: #<service-type mingetty 22f…> …))
>    592:29 10 (map1 (#<<service> type: #<service-type mingetty 22f…> …))
>    592:29  9 (map1 (#<<service> type: #<service-type mingetty 22f…> …))
>    592:29  8 (map1 (#<<service> type: #<service-type console-font…> …))
>    592:17  7 (map1 (#<<service> type: #<service-type openvpn-clie…> …))
> In gnu/services/vpn.scm:
>    409:24  6 (_ #<<openvpn-client-configuration> openvpn: #<package …>)
>     379:9  5 (openvpn-config-file client #<<openvpn-client-configura…>)
> In ice-9/ports.scm:
>     549:4  4 (call-with-output-string _)
>     473:4  3 (with-output-to-port _ _)
> In ice-9/boot-9.scm:
>    268:13  2 (for-each #<procedure 2636d40 at gnu/services/configur…> 
> …)
> In gnu/services/vpn.scm:
>    112:19  1 (serialize-tls-auth client #f)
> In unknown file:
>            0 (string-append #f " " "1")
> 
> ERROR: In procedure string-append:
> ERROR: In procedure string-append: Wrong type (expecting string): #f

Although I won't be able to check it before tomorrow evening, here is a 
patch that should solve your issue. Are you able to test it and tell me 
whether it works?

Thank you for reporting this!

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-services-vpn-Fix-bug-with-default-tls-auth-configura.patch --]
[-- Type: text/x-diff; name=0001-services-vpn-Fix-bug-with-default-tls-auth-configura.patch, Size: 1209 bytes --]

From 179727553c91987a1154860f952d4d83383a48d5 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Mon, 9 Oct 2017 12:09:11 +0200
Subject: [PATCH] services: vpn: Fix bug with default tls-auth configuration.

* gnu/services/vpn.scm (serialize-tls-auth): Fix serialization error when
tls-auth is disabled.
---
 gnu/services/vpn.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/services/vpn.scm b/gnu/services/vpn.scm
index 868a227fc..cbb4a79a7 100644
--- a/gnu/services/vpn.scm
+++ b/gnu/services/vpn.scm
@@ -108,10 +108,12 @@
       #f))
 
 (define (serialize-tls-auth role location)
-  (serialize-field 'tls-auth
-                   (string-append location " " (match role
-                                                 ('server "0")
-                                                 ('client "1")))))
+  (if location
+      (serialize-field 'tls-auth
+                       (string-append location " " (match role
+                                                     ('server "0")
+                                                     ('client "1"))))
+      #f))
 (define (tls-auth? val)
   (or (eq? val #f)
       (string? val)))
-- 
2.14.2


  reply	other threads:[~2017-10-09 11:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-08 20:03 bug#28752: openvpn-client-service error john herrlin
2017-10-09 11:41 ` julien lepiller [this message]
2017-10-09 16:22   ` john herrlin
2017-10-10 12:06     ` julien lepiller
2017-10-11 13:29   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9848dda76b124fbfd0add50cdbccf6db@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=28752@debbugs.gnu.org \
    --cc=jherrlin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.