all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#28752: openvpn-client-service error
@ 2017-10-08 20:03 john herrlin
  2017-10-09 11:41 ` julien lepiller
  0 siblings, 1 reply; 5+ messages in thread
From: john herrlin @ 2017-10-08 20:03 UTC (permalink / raw)
  To: 28752; +Cc: julien


[-- Attachment #1.1: Type: text/plain, Size: 1810 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 2256 bytes --]

[-- Attachment #2: .system.scm --]
[-- Type: text/x-scheme, Size: 4057 bytes --]

(use-modules
 (srfi srfi-1)
 (srfi srfi-9)
 (ice-9 rdelim)
 (guix)
 (gnu)
 (gnu system nss)
 (gnu system locale)
 (gnu packages linux)
 (gnu packages gnome)
 (gnu packages gnuzilla)
 (gnu packages suckless)
 (gnu packages vpn)
 (gnu packages ssh)
 (gnu packages scheme)
 (gnu packages admin)
 (gnu packages fonts)
 (gnu packages xorg)
 (gnu packages emacs)
 (gnu packages vpn)
 (gnu packages mail)
 (gnu packages dunst)
 (gnu packages xdisorg)
 (gnu packages guile)
 (gnu packages image-viewers)
 (gnu packages pulseaudio)
 (gnu packages display-managers)
 (gnu packages video)
 (gnu packages networking)
 (gnu packages version-control)
 (gnu packages ntp)
 (gnu packages libusb)
 (gnu services)
 (gnu services dbus)
 (gnu services networking)
 (gnu services admin)
 (gnu services vpn)
 (gnu services xorg)
 (gnu services web)
 (gnu services desktop))


(use-service-modules xorg dbus networking desktop admin mcron)
(use-package-modules xorg bootloaders wm certs suckless emacs base idutils)

(define libinput.conf "
# Use the libinput driver for all event devices
Section \"InputClass\"
	Identifier \"libinput keyboard catchall\"
	MatchIsKeyboard \"on\"
	MatchDevicePath \"/dev/input/event*\"
	Driver \"libinput\"
	Option \"XkbLayout\" \"us,se\"
	Option \"XkbOptions\" \"grp:win_space_toggle,caps:ctrl_modifier\"
EndSection
")

(define %user-name "nils")
(define %host-name "gnu")

(operating-system
  (host-name %host-name)
  (timezone "Europe/Paris")
  (locale "en_US.utf8")
  (locale-definitions
   (list
    (locale-definition (name "en_US.utf8") (source "en_US") (charset "UTF-8"))
    (locale-definition (name "sv_SE.utf8") (source "sv_SE") (charset "UTF-8"))))

  (bootloader (bootloader-configuration
	       (bootloader grub-efi-bootloader)
	       (target "/boot")))

  (file-systems (cons* (file-system
			 (device "guixsd-root")
			 (title 'label)
			 (mount-point "/")
			 (type "ext4"))
		       (file-system
			 (device "/dev/sda1")
			 (mount-point "/boot")
			 (needed-for-boot? #t)
			 (type "vfat"))
		       %base-file-systems))

  (kernel-arguments '("modprobe.blacklist=pcspkr,snd_pcsp"))

  (users (cons (user-account
		(name %user-name)
		(comment %user-name)
		(group "users")
		(supplementary-groups
                 '("wheel" "netdev" "audio" "video"))
		(home-directory (string-append "/home/" %user-name)))
	       %base-user-accounts))

  (packages (cons* i3-wm
                   i3status
                   dmenu
                   dunst
		   nss-certs
                   font-inconsolata
		   font-dejavu
		   font-hack
		   font-liberation
		   font-terminus
		   font-ubuntu
                   pulseaudio
                   alsa-utils
                   openssh
		   emacs
                   emacs-use-package
                   offlineimap
                   mu
                   openvpn
                   network-manager-openvpn
                   sicp
		   icecat
		   htop
                   feh                   ;; set background image in i3
                   xbacklight
		   xf86-input-evdev
		   xf86-video-fbdev
		   xorg-server
		   rxvt-unicode
		   git
		   %base-packages))

  (services
   (cons*
    (service mcron-service-type)
    (service rottlog-service-type)

    (slim-service
     #:allow-empty-passwords? #f #:auto-login? #f
     #:startx (xorg-start-command
               #:configuration-file
               (xorg-configuration-file
                #:extra-config (list libinput.conf))))

    (simple-service 'mtp udev-service-type (list libmtp))

    ;; The D-Bus clique.
    (udisks-service)
    (upower-service)
    (accountsservice-service)
    (colord-service)
    (geoclue-service)
    (polkit-service)
    (elogind-service)
    (dbus-service)

    (service wpa-supplicant-service-type wpa-supplicant)
    (service network-manager-service-type
	     (network-manager-configuration))

    (ntp-service #:allow-large-adjustment? #t)

    (openvpn-client-service)

    %base-services))

  ;; Allow resolution of '.local' host names with mDNS.
  (name-service-switch %mdns-host-lookup-nss))

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#28752: openvpn-client-service error
  2017-10-08 20:03 bug#28752: openvpn-client-service error john herrlin
@ 2017-10-09 11:41 ` julien lepiller
  2017-10-09 16:22   ` john herrlin
  2017-10-11 13:29   ` Ludovic Courtès
  0 siblings, 2 replies; 5+ messages in thread
From: julien lepiller @ 2017-10-09 11:41 UTC (permalink / raw)
  To: john herrlin; +Cc: 28752

[-- 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#28752: openvpn-client-service error
  2017-10-09 11:41 ` julien lepiller
@ 2017-10-09 16:22   ` john herrlin
  2017-10-10 12:06     ` julien lepiller
  2017-10-11 13:29   ` Ludovic Courtès
  1 sibling, 1 reply; 5+ messages in thread
From: john herrlin @ 2017-10-09 16:22 UTC (permalink / raw)
  To: julien lepiller; +Cc: 28752

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

With some help from the wonderful people in #guix, IRC I managed to get
this far.

```
git am <patch>
guix environment guix
./bootstrap && ./configure --sysconfdir=/etc --localstatedir=/var
make
guix system vm config.scm    # failed on grub/efi
guix system build config.scm  # succeeded
```

I dont know how to proceed further.

2017-10-09 13:41 GMT+02:00 julien lepiller <julien@lepiller.eu>:

> 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!




-- 
MVH
John Herrlin

[-- Attachment #2: Type: text/html, Size: 3578 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#28752: openvpn-client-service error
  2017-10-09 16:22   ` john herrlin
@ 2017-10-10 12:06     ` julien lepiller
  0 siblings, 0 replies; 5+ messages in thread
From: julien lepiller @ 2017-10-10 12:06 UTC (permalink / raw)
  To: john herrlin; +Cc: 28752

Le 2017-10-09 18:22, john herrlin a écrit :
> With some help from the wonderful people in #guix, IRC I managed to get
> this far.
> 
> ```
> git am <patch>
> guix environment guix
> ./bootstrap && ./configure --sysconfdir=/etc --localstatedir=/var
> make
> guix system vm config.scm    # failed on grub/efi
> guix system build config.scm  # succeeded
> ```
> 
> I dont know how to proceed further.
> 

So you could build your configuration, but it's not appropriate for a 
vm. I could test my patch using a variant of 
gnu/system/examples/vm-image.tmpl. It builds the system and starts it, 
but since there is no configured server, the vpn service cannot start. I 
will push the patch this evening.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#28752: openvpn-client-service error
  2017-10-09 11:41 ` julien lepiller
  2017-10-09 16:22   ` john herrlin
@ 2017-10-11 13:29   ` Ludovic Courtès
  1 sibling, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2017-10-11 13:29 UTC (permalink / raw)
  To: julien lepiller; +Cc: 28752-done

julien lepiller <julien@lepiller.eu> skribis:

> 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.

Julien committed this as 4b8b4418e609b5e0bfb6efbc11ac28deaa437e80 and it
does seem to fix this bug, so I’m closing it now.

John, let us know if anything’s wrong!

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-11 13:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-08 20:03 bug#28752: openvpn-client-service error john herrlin
2017-10-09 11:41 ` julien lepiller
2017-10-09 16:22   ` john herrlin
2017-10-10 12:06     ` julien lepiller
2017-10-11 13:29   ` Ludovic Courtès

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.