unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: Andy Wingo <wingo@igalia.com>
Cc: guix-devel@gnu.org, rennes@openmailbox.org
Subject: Re: NetworkManager doesn't "Connect automatically"
Date: Thu, 15 Dec 2016 02:24:37 -0800	[thread overview]
Message-ID: <87mvfxpk0q.fsf@gmail.com> (raw)
In-Reply-To: <87wpf1wtju.fsf@gmail.com> (Chris Marusich's message of "Wed, 14 Dec 2016 23:16:53 -0800")


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

Chris Marusich <cmmarusich@gmail.com> writes:

> Chris Marusich <cmmarusich@gmail.com> writes:
>
>> Andy Wingo <wingo@igalia.com> writes:
>>
>>> On Wed 14 Dec 2016 10:13, Chris Marusich <cmmarusich@gmail.com> writes:
>>>
>>>> Did I make a mistake, or does NetworkManager just not recognize elogind?
>>>> I'll look into this more, but unless I made a mistake, I suspect that
>>>> either elogind or network-manager might require some tweaks to convince
>>>> network-manager that elogind is equivalent to systemd in this case.
>>>
>>> See README where it mentions differences to logind:
>>>
>>>   https://github.com/elogind/elogind
>>>
>>> In particular see the changes in gnu/packages/polkit.scm to get
>>> PolicyKit to recognize elogind.
>>>
>>> ANdy
>>
>> Awesome, thank you for the tip!  At first blush it looks like the word
>> "systemd" is mentioned in surprisingly many files inside the
>> NetworkManager source.  I'll try following the example of polkit and see
>> how it goes!
>
> Upon closer inspection, it looks almost as if NetworkManager has
> extracted code from systemd for its own internal use.  I'll continue to
> look into this, but I don't expect to be able to make progress on my own
> very soon, so if someone else wants to dive in and help figure out what
> substitutions to make in the NetworkManager code, it would be welcome.

I tried following polkit's example.  These patches enable me to build
network-manager with elogind, but when I reconfigure my system using the
new network-manager package, NetworkManager still fails to automatically
connect (like before, there are no error messages that I can find).

I suspect I didn't replace the right "systemd" references, but it's hard
to say.  A second pair of eyes on this would be very helpful!

-- 
Chris

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnome-Enable-session-tracking-in-network-manager.patch --]
[-- Type: text/x-patch, Size: 2825 bytes --]

From 775e0f0c18fb2bcfc297c92184c54e81fb2db79d Mon Sep 17 00:00:00 2001
From: Chris Marusich <cmmarusich@gmail.com>
Date: Wed, 14 Dec 2016 00:44:54 -0800
Subject: [PATCH 1/2] gnome: Enable session tracking in network-manager.

* gnu/packages/gnome.scm (network-manager): Add configuration options
  "--with-systemd-logind=yes" (so we can use elogind to track login sessions)
  and "--with-consolekit=no" (so we don't use consolekit to track sessions,
  since it isn't packaged yet).  Add elogind as an input, and add a snippet to
  replace some references to systemd with elogind.
---
 gnu/packages/gnome.scm | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 1762381cf..846317f1d 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4399,7 +4399,19 @@ users.")
                                   "NetworkManager-" version ".tar.xz"))
               (sha256
                (base32
-                "016jc21mwjxvnfiblp5lji55sr8aq6w8a08fsjmqvnpnvm3y6r58"))))
+                "016jc21mwjxvnfiblp5lji55sr8aq6w8a08fsjmqvnpnvm3y6r58"))
+              (snippet
+              '(begin
+                 (use-modules (guix build utils))
+                 (substitute* "configure"
+                   ;; Replace libsystemd-login with libelogind.
+                   (("libsystemd-login") "libelogind"))
+                 (substitute* "src/devices/wwan/nm-modem-manager.c"
+                   (("systemd") "elogind"))
+                 (substitute* "src/nm-session-monitor.c"
+                   (("systemd") "elogind"))
+                 (substitute* "./src/nm-logging.c"
+                   (("systemd") "elogind"))))))
     (build-system gnu-build-system)
     (outputs '("out"
                "doc")) ; 8 MiB of gtk-doc HTML
@@ -4409,7 +4421,9 @@ users.")
              (doc      (assoc-ref %outputs "doc"))
              (dhclient (string-append (assoc-ref %build-inputs "isc-dhcp")
                                       "/sbin/dhclient")))
-         (list "--with-crypto=gnutls"
+         (list "--with-systemd-logind=yes" ; In Guix, this is provided via elogind.
+               "--with-consolekit=no" ; We haven't packaged consolekit yet.
+               "--with-crypto=gnutls"
                "--disable-config-plugin-ibft"
                "--sysconfdir=/etc"
                "--localstatedir=/var"
@@ -4474,7 +4488,8 @@ users.")
        ("polkit" ,polkit)
        ("ppp" ,ppp)
        ("readline" ,readline)
-       ("util-linux" ,util-linux)))
+       ("util-linux" ,util-linux)
+       ("elogind" ,elogind)))
     (synopsis "Network connection manager")
     (home-page "http://www.gnome.org/projects/NetworkManager/")
     (description
-- 
2.11.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0002-gnome-Enable-NetworkManager-in-gnome-settings-daemon.patch --]
[-- Type: text/x-patch, Size: 1600 bytes --]

From d6de68789959bd657c5697c717201d5bcdaf2fcf Mon Sep 17 00:00:00 2001
From: Chris Marusich <cmmarusich@gmail.com>
Date: Wed, 14 Dec 2016 00:01:26 -0800
Subject: [PATCH 2/2] gnome: Enable NetworkManager in gnome-settings-daemon.

* gnu/packages/gnome.scm (gnome-settings-daemon): remove the configure option
  "--disable-network-manager".  Add network-manager as an input.
---
 gnu/packages/gnome.scm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 846317f1d..74ccf9e75 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -2648,9 +2648,7 @@ services for numerous locations.")
          "1rvqisrh3lridsb8rvm7spvncyq206ly0245zgpbm8swi5fhfjp8"))))
     (build-system glib-or-gtk-build-system)
     (arguments
-     `(;; Network manager not yet packaged.
-       #:configure-flags '("--disable-network-manager")
-       ;; Color management test can't reach the colord system service.
+     `(;; Color management test can't reach the colord system service.
        #:tests? #f))
     (native-inputs
      `(("pkg-config" ,pkg-config)
@@ -2679,7 +2677,8 @@ services for numerous locations.")
        ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
        ("libwacom" ,libwacom)
        ("librsvg" ,librsvg)
-       ("xf86-input-wacom" ,xf86-input-wacom)))
+       ("xf86-input-wacom" ,xf86-input-wacom)
+       ("network-manager" ,network-manager)))
     (home-page "http://www.gnome.org")
     (synopsis "GNOME settings daemon")
     (description
-- 
2.11.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2016-12-15 10:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-13  6:51 NetworkManager doesn't "Connect automatically" Chris Marusich
2016-12-13 14:37 ` Thomas Haller
2016-12-13 15:26   ` rennes
2016-12-13 22:38     ` Ludovic Courtès
2016-12-14  9:13       ` Chris Marusich
2016-12-14  9:20         ` Andy Wingo
2016-12-14 10:06           ` Chris Marusich
2016-12-15  7:16             ` Chris Marusich
2016-12-15 10:24               ` Chris Marusich [this message]
2016-12-15 10:41                 ` Andy Wingo
2016-12-15 15:53                 ` Ludovic Courtès
2016-12-17  9:33                   ` Chris Marusich
2016-12-14  9:38   ` Chris Marusich
2016-12-14 21:08     ` Thomas Haller
2016-12-17  9:51       ` Chris Marusich
2016-12-19 11:45         ` Thomas Haller
2016-12-23 10:09           ` Chris Marusich

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=87mvfxpk0q.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=rennes@openmailbox.org \
    --cc=wingo@igalia.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 public inbox

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

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