From mboxrd@z Thu Jan 1 00:00:00 1970 From: "pelzflorian (Florian Pelz)" Subject: bug#35640: Make USB modems just work on Guix Date: Thu, 16 May 2019 09:50:18 +0200 Message-ID: <20190516075018.htx3hi4vd5zswjpw@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="mkmru52x2dm27cs6" Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:54548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRBAN-0006Gu-V5 for bug-guix@gnu.org; Thu, 16 May 2019 03:51:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRBAM-0001Od-Ks for bug-guix@gnu.org; Thu, 16 May 2019 03:51:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40574) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hRBAM-0001OX-HF for bug-guix@gnu.org; Thu, 16 May 2019 03:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hRBAM-0004fI-F0 for bug-guix@gnu.org; Thu, 16 May 2019 03:51:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <87v9yjd51k.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 35640@debbugs.gnu.org --mkmru52x2dm27cs6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Thu, May 09, 2019 at 05:24:39PM +0200, Ludovic Courtès wrote: > >>From d489f805599ea63e2e06727a3201572ee0480a60 Mon Sep 17 00:00:00 2001 > > From: Florian Pelz > > Date: Wed, 8 May 2019 20:02:00 +0200 > > Subject: [PATCH 2/2] gnu: network-manager-applet: Propagate packages required > > for USB modem setup. > > > > * gnu/packages/gnome.scm (network-manager-applet): Propagate iso-codes and > > mobile-broadband-provider-info. > > (gnome-control-center): Ditto. > > Would it be an option to avoid propagation by instead substituting > references to these two things in the code of network-manager-applet and > gnome-control-center? WDYT? > I have confirmed that the patch attached to this e-mail makes network-manager-applet’s libnma library load its data from the store and not the profile. This fixes nm-connection-editor from network-manager-applet as well as gnome-control-center which previously required modem-broadband-provider-info and iso-codes to be installed in the profile. I am still working on packaging USB_ModeSwitch which some USB modems require. Regards, Florian --mkmru52x2dm27cs6 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-gnu-network-manager-applet-Patch-libnma-for-modem-su.patch" Content-Transfer-Encoding: 8bit >From 627e41c4741acd5b91771131a1646bb89b8c270b Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Wed, 15 May 2019 23:41:44 +0200 Subject: [PATCH] gnu: network-manager-applet: Patch libnma for modem support. * gnu/packages/gnome.scm (network-manager-applet): Patch libnma to load iso-codes and mobile-broadband-provider-info from the store and not require them in the profile. --- gnu/packages/gnome.scm | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 09984717cc..fc024ebf72 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -35,6 +35,7 @@ ;;; Copyright © 2018, 2019 Timothy Sample ;;; Copyright © 2019 Danny Milosavljevic ;;; Copyright © 2019 Marius Bakke +;;; Copyright © 2019 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -5502,7 +5503,23 @@ to virtual private networks (VPNs) via OpenVPN.") (base32 "1js0i2kwfklahsn77qgxzdscy33drrlym3mrj1qhlw0zf8ri56ya")))) (build-system glib-or-gtk-build-system) - (arguments '(#:configure-flags '("--disable-migration"))) + (arguments '(#:configure-flags '("--disable-migration") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-source + (lambda* (#:key inputs #:allow-other-keys) + (let ((mbpi (assoc-ref inputs + "mobile-broadband-provider-info")) + (iso-codes (assoc-ref inputs "iso-codes"))) + (substitute* "src/libnma/nma-mobile-providers.c" + (("(g_build_filename \\()dirs\\[i\\].*, \ +(MOBILE_BROADBAND_PROVIDER_INFO.*)" all start end) + (string-append start "\"" mbpi "/share\", " end))) + (substitute* "src/libnma/nma-mobile-providers.c" + (("(g_build_filename \\()dirs\\[i\\].*, \ +(ISO_3166_COUNTRY_CODES.*)" all start end) + (string-append start "\"" iso-codes + "/share\", " end))))))))) (native-inputs `(("intltool" ,intltool) ("gobject-introspection" ,gobject-introspection) @@ -5519,7 +5536,8 @@ to virtual private networks (VPNs) via OpenVPN.") ("libsecret" ,libsecret) ("libselinux" ,libselinux) ("jansson" ,jansson) ; for team support - ("modem-manager" ,modem-manager))) + ("modem-manager" ,modem-manager) + ("mobile-broadband-provider-info" ,mobile-broadband-provider-info))) (synopsis "Applet for managing network connections") (home-page "https://www.gnome.org/projects/NetworkManager/") (description -- 2.21.0 --mkmru52x2dm27cs6--