GNU bug report logs - #36294
[PATCH 0/3] Fix and document NetworkManager + dnsmasq

Previous Next

Package: guix-patches;

Reported by: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>

Date: Wed, 19 Jun 2019 16:07:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36294 in the body.
You can then email your comments to 36294 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#36294; Package guix-patches. (Wed, 19 Jun 2019 16:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 19 Jun 2019 16:07:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/3] Fix and document NetworkManager + dnsmasq
Date: Wed, 19 Jun 2019 18:05:57 +0200
Please accept this patch series which enables and describes more use
cases of NetworkManager + Dnsmasq.

Regards,
Florian




Information forwarded to guix-patches <at> gnu.org:
bug#36294; Package guix-patches. (Wed, 19 Jun 2019 16:09:01 GMT) Full text and rfc822 format available.

Message #8 received at 36294 <at> debbugs.gnu.org (full text, mbox):

From: Florian Pelz <pelzflorian <at> pelzflorian.de>
To: 36294 <at> debbugs.gnu.org
Subject: [PATCH 1/3] Use new upstream nomenclature in documentation of NetworkManager’s dnsmasq.
Date: Wed, 19 Jun 2019 18:08:36 +0200
* doc/guix.texi (Networking Services): Replace term 'split DNS' by
'conditional forwarding'.
---
 doc/guix.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 65c3b8a7f1..694b802e1e 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12735,8 +12735,8 @@ NetworkManager will update @code{resolv.conf} to reflect the nameservers
 provided by currently active connections.
 
 @item dnsmasq
-NetworkManager will run @code{dnsmasq} as a local caching nameserver,
-using a "split DNS" configuration if you are connected to a VPN, and
+NetworkManager will run @code{dnsmasq} as a local caching nameserver, using a
+@dfn{conditional forwarding} configuration if you are connected to a VPN, and
 then update @code{resolv.conf} to point to the local nameserver.
 
 @item none
-- 
2.22.0





Information forwarded to guix-patches <at> gnu.org:
bug#36294; Package guix-patches. (Wed, 19 Jun 2019 16:10:02 GMT) Full text and rfc822 format available.

Message #11 received at 36294 <at> debbugs.gnu.org (full text, mbox):

From: Florian Pelz <pelzflorian <at> pelzflorian.de>
To: 36294 <at> debbugs.gnu.org
Subject: [PATCH 2/3] Have NetworkManager create '/var/lib/misc' directory
 required by dnsmasq.
Date: Wed, 19 Jun 2019 18:09:01 +0200
* gnu/services/networking.scm (%network-manager-activation): Rename to...
(network-manager-activation): ... this and make it a procedure.  Make it
create '/var/lib/misc' when using dnsmasq.
(network-manager-service-type): Use it.
---
 gnu/services/networking.scm | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 73acb3b17f..13cffd9feb 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -895,11 +895,17 @@ and @command{wicd-curses} user interfaces."
   (vpn-plugins network-manager-vpn-plugins        ;list of <package>
                (default '())))
 
-(define %network-manager-activation
-  ;; Activation gexp for NetworkManager.
-  #~(begin
-      (use-modules (guix build utils))
-      (mkdir-p "/etc/NetworkManager/system-connections")))
+(define network-manager-activation
+  ;; Activation gexp for NetworkManager
+  (match-lambda
+    (($ <network-manager-configuration> network-manager dns vpn-plugins)
+     #~(begin
+         (use-modules (guix build utils))
+         (mkdir-p "/etc/NetworkManager/system-connections")
+         #$@(if (equal? dns "dnsmasq")
+                ;; create directory to store dnsmasq lease file
+                '((mkdir-p "/var/lib/misc"))
+                '())))))
 
 (define (vpn-plugin-directory plugins)
   "Return a directory containing PLUGINS, the NM VPN plugins."
@@ -949,7 +955,7 @@ and @command{wicd-curses} user interfaces."
             (service-extension dbus-root-service-type config->package)
             (service-extension polkit-service-type config->package)
             (service-extension activation-service-type
-                               (const %network-manager-activation))
+                               network-manager-activation)
             (service-extension session-environment-service-type
                                network-manager-environment)
             ;; Add network-manager to the system profile.
-- 
2.22.0





Information forwarded to guix-patches <at> gnu.org:
bug#36294; Package guix-patches. (Wed, 19 Jun 2019 16:10:02 GMT) Full text and rfc822 format available.

Message #14 received at 36294 <at> debbugs.gnu.org (full text, mbox):

From: Florian Pelz <pelzflorian <at> pelzflorian.de>
To: 36294 <at> debbugs.gnu.org
Subject: [PATCH 3/3] Document use cases for NetworkManager with dnsmasq.
Date: Wed, 19 Jun 2019 18:09:24 +0200
* doc/guix.texi (Networking Services): Give examples.
---
 doc/guix.texi | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 694b802e1e..172106068f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12739,6 +12739,31 @@ NetworkManager will run @code{dnsmasq} as a local caching nameserver, using a
 @dfn{conditional forwarding} configuration if you are connected to a VPN, and
 then update @code{resolv.conf} to point to the local nameserver.
 
+With this setting, you can share your network connection.  For example when
+you want to share your network connection to another laptop @i{via} an
+Ethernet cable, you can open @command{nm-connection-editor} and configure the
+Wired connection’s method for IPv4 and IPv6 to be 'Shared to other computers'
+and reestablish the connection (or reboot).
+
+You can also set up a @dfn{host-to-guest connection} to QEMU VMs
+(@pxref{Installing Guix in a VM}).  With a host-to-guest connection, you can
+e.g.@: access a Web server running on the VM (@pxref{Web Services}) from a Web
+browser on your host system, or connect to the VM @i{via} SSH
+(@pxref{Networking Services, @code{openssh-service-type}}).  To set up a
+host-to-guest connection, run this command once:
+
+@example
+nmcli connection add type tun \
+ connection.interface-name tap0 \
+ tun.mode tap tun.owner $(id -u) \
+ ipv4.method shared \
+ ipv4.addresses 172.28.112.1/24
+@end example
+
+Then each time you launch your QEMU VM (@pxref{Running Guix in a VM}), pass
+@option{-nic tap,ifname=tap0,script=no,downscript=no} to
+@command{qemu-system-...}.
+
 @item none
 NetworkManager will not modify @code{resolv.conf}.
 @end table
-- 
2.22.0





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 24 Jun 2019 21:27:01 GMT) Full text and rfc822 format available.

Notification sent to "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>:
bug acknowledged by developer. (Mon, 24 Jun 2019 21:27:02 GMT) Full text and rfc822 format available.

Message #19 received at 36294-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Florian Pelz <pelzflorian <at> pelzflorian.de>
Cc: 36294-done <at> debbugs.gnu.org
Subject: Re: [bug#36294] [PATCH 3/3] Document use cases for NetworkManager
 with dnsmasq.
Date: Mon, 24 Jun 2019 23:26:24 +0200
Hi Florian,

Applied all 3 patches (I adjusted the subject line of each to have a
prefix as we usually do.)

Thank you!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 23 Jul 2019 11:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 284 days ago.

Previous Next


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