unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
To: Divan Santana <divan@santanas.co.za>
Cc: bug-guix@gnu.org, Help guix <help-guix@gnu.org>
Subject: Getting network-manager-openconnect to work
Date: Tue, 10 Sep 2019 13:21:20 +0200	[thread overview]
Message-ID: <20190910112120.ezqnrrfffhhjvc2d@pelzflorian.localdomain> (raw)
In-Reply-To: <87sgp4pj7s.fsf@santanas.co.za>

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

On Tue, Sep 10, 2019 at 11:57:11AM +0200, Divan Santana wrote:
> Hi Guix,
> 
> I'm glad openconnect and network-manager-openconnect are now in Guix!
> 
> It would be nice to get it to work via network-manager, though I suppose
> it's not essential.
> 
> Using openconnect directly works for me.
> 
> $ sudo openconnect vpn.somewhere.com
> 
> Trying to get it work via network-manager gives an error like so:
> 
> $ sudo nmcli con up vpn-fnb --ask
> Error: openconnect failed: Could not find "openconnect" binary
> A password is required to connect to 'vpn-fnb'.
> Gateway (vpn.secrets.gateway):
> 
> Even though my services configuration has this vpn-plugins set.
> 
> (modify-services %desktop-services
>                  (network-manager-service-type
>                   config => (network-manager-configuration
>                              (inherit config)
>                              (dns "dnsmasq")
>                              (vpn-plugins (list network-manager-openconnect))
>                              ))
> 
> Anyone else seen this?

Cc’ing bug-guix@gnu.org

I suspect something like the attached patch would help (and expand the
closure of network-manager to always include openconnect).

To test, follow section “Building from Git” from the manual or Laura’s
video 04-packaging-part-one.webm from
<https://lists.gnu.org/archive/html/guix-devel/2019-07/msg00249.html>,
but after the initial clone command, do

  git apply the-attached.patch

Then after make, do

  sudo -E ./pre-inst-env guix system reconfigure /etc/config.scm

(or whatever your configuration file is called).  I cannot test right
now and have never used openconnect.  It is quite possible I made a
mistake.

Regards,
Florian

[-- Attachment #2: 0001-gnu-network-manager-Enable-openconnect-helper.patch --]
[-- Type: text/plain, Size: 1520 bytes --]

From 8de7675a2dc2c1385d312e35136f8fa9eb4f9825 Mon Sep 17 00:00:00 2001
From: Florian Pelz <pelzflorian@pelzflorian.de>
Date: Tue, 10 Sep 2019 12:59:19 +0200
Subject: [PATCH] gnu: network-manager: Enable openconnect helper.

* gnu/packages/gnome.scm (network-manager): Add openconnect input.
Patch source to use it instead of searching /usr/bin.
---
 gnu/packages/gnome.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index efe5206e53..a6ea09d8f6 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5372,6 +5372,13 @@ users.")
                (("src/devices/tests/test-lldp") " ")
                (("src/tests/test-route-manager-linux") " "))
              #t))
+         (add-after 'unpack 'patch-source
+           (lambda* (#:key inputs #:allow-other-keys)
+             (begin
+               (substitute* "clients/common/nm-vpn-helpers.c"
+                 (("\\\"/usr/sbin/openconnect\\\"")
+                  (string-append openconnect "\"/bin/openconnect\"")))
+               #t)))
          (add-after 'unpack 'delete-failing-tests
            (lambda _
              ;; FIXME: These four tests fail for unknown reasons.
@@ -5434,6 +5441,7 @@ users.")
        ("libsoup" ,libsoup)
        ("modem-manager" ,modem-manager)
        ("newt" ,newt)                       ;for the 'nmtui' console interface
+       ("openconnect" ,openconnect)
        ("polkit" ,polkit)
        ("ppp" ,ppp)
        ("readline" ,readline)
-- 
2.23.0


  reply	other threads:[~2019-09-10 11:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-10  9:57 Getting network-manager-openconnect to work Divan Santana
2019-09-10 11:21 ` pelzflorian (Florian Pelz) [this message]
2019-09-11  7:38   ` bug#37369: " Efraim Flashner
2019-09-11 11:39     ` pelzflorian (Florian Pelz)
2019-09-11 20:46   ` Ludovic Courtès
2019-09-12  5:34     ` pelzflorian (Florian Pelz)
2019-09-16 15:57       ` Ludovic Courtès
2019-09-16 16:06         ` pelzflorian (Florian Pelz)
2019-09-27 16:37           ` bug#37369: " pelzflorian (Florian Pelz)
2019-09-28 14:00             ` Divan Santana
2019-09-28 14:16             ` Divan Santana
2019-09-28 15:34               ` pelzflorian (Florian Pelz)
2019-09-29  7:54                 ` pelzflorian (Florian Pelz)
2019-09-28 16:47               ` pelzflorian (Florian Pelz)
2019-10-03 11:51                 ` Divan Santana
2019-09-16 11:53   ` pelzflorian (Florian Pelz)
  -- strict thread matches above, loose matches on Subject: below --
2020-04-22 12:25 divan

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20190910112120.ezqnrrfffhhjvc2d@pelzflorian.localdomain \
    --to=pelzflorian@pelzflorian.de \
    --cc=bug-guix@gnu.org \
    --cc=divan@santanas.co.za \
    --cc=help-guix@gnu.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).