From unknown Thu Jun 19 14:10:48 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#35640 <35640@debbugs.gnu.org> To: bug#35640 <35640@debbugs.gnu.org> Subject: Status: Make USB modems just work on Guix Reply-To: bug#35640 <35640@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:10:48 +0000 retitle 35640 Make USB modems just work on Guix reassign 35640 guix submitter 35640 "pelzflorian (Florian Pelz)" severity 35640 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed May 08 14:26:45 2019 Received: (at submit) by debbugs.gnu.org; 8 May 2019 18:26:45 +0000 Received: from localhost ([127.0.0.1]:33977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hORHA-0000VM-Oc for submit@debbugs.gnu.org; Wed, 08 May 2019 14:26:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hORH6-0000V7-JY for submit@debbugs.gnu.org; Wed, 08 May 2019 14:26:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:44575) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hORH0-0003aE-DO for submit@debbugs.gnu.org; Wed, 08 May 2019 14:26:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hORGy-0004rr-Oq for bug-guix@gnu.org; Wed, 08 May 2019 14:26:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hORGv-0003XX-HA for bug-guix@gnu.org; Wed, 08 May 2019 14:26:32 -0400 Received: from pelzflorian.de ([5.45.111.108]:60810 helo=mail.pelzflorian.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hORGu-0003S0-Fw for bug-guix@gnu.org; Wed, 08 May 2019 14:26:29 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id C81E8360038 for ; Wed, 8 May 2019 20:26:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1557339967; bh=thHqQzBalFxVlGwRPRBSNdSmVk8P8WDYbKgFaYDgR9s=; h=Date:From:To:Subject; b=FcwdvOWzJzFFxtiTTdI4DGjsRHMBO0xIyhcHYvJFLN02bxkdyZx9BURyox6MuASnO +dfZb7rDf8KW5IMreaafSpw6GSCmLtxw1toM/3OxwuZDZVbaob+r7ldI7WRNx6D9M+ CWIjrdai/1ad1D8RA1ZobFbs4dF/6vnqThdTK2/Y= Date: Wed, 8 May 2019 20:26:07 +0200 From: "pelzflorian (Florian Pelz)" To: bug-guix@gnu.org Subject: Make USB modems just work on Guix Message-ID: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nc2j33f4en2jwjnc" Content-Disposition: inline User-Agent: NeoMutt/20180716 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 5.45.111.108 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --nc2j33f4en2jwjnc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable When plugging in a USB modem, i.e. a =E2=80=9Csurf stick=E2=80=9D / inter= net stick with a SIM card for mobile broadband, setup should be as simple as WiFi. However, a few things are missing in Guix. First, the manual claims: -- Scheme Variable: modem-manager-service-type [=E2=80=A6] This service is part of =E2=80=98%desktop-services=E2=80=99 (*note D= esktop Services::). But it is not part of %desktop-services. The first attached patch fixes this oversight. Now I can type this to get an internet connection: sudo nmcli connection add type gsm ifname ttyUSB1 apn internet However, I want to be able to do this setup graphically. I made a second patch to propagate iso-codes (for mobile broadband country selection) and mobile-broadband-provider-selection (for selecting defaults for providers) in nm-connection-editor (network-manager-applet) and gnome-control-center. Propagation is ugly though. Should I try patching network-manager-applet instead? I assume there are other packages doing such patching that I can imitate. Now I can configure the modem as Mobile Broadband in a graphical interface. I cannot do so in nmtui; I believe this modem setup feature is not included in nmtui. However, this is not the whole truth. Before I can configure anything, I have to run sudo ~/usr/sbin/usb_modeswitch -c ~/Downloads/usb-modeswitch-data-2017080= 6/usb_modeswitch.d/12d1:14fe -v 0x12d1 -p 0x14fe because my modem by default presents itself as a CD containing Windows drivers and not as a USB modem. Preferrably, usb-modeswitch and usb-modeswitch-data would be packaged (as a single package). I can try that later this week. Lastly, there are udev rules in usb-modeswitch, I believe, because on Debian I do not need to run any command; mode switching happens automatically when plugging in the USB modem. I suppose that means there should also be a usb-modeswitch-service-type extending udev? Regards, Florian --nc2j33f4en2jwjnc Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-services-Include-ModemManager-in-desktop-services.patch" Content-Transfer-Encoding: quoted-printable >From 5e9b45fe785dee52da2a67fbecbabc4741f85e54 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Tue, 7 May 2019 11:51:43 +0200 Subject: [PATCH 1/2] services: Include ModemManager in %desktop-services. * gnu/services/desktop.scm (%desktop-services): Add modem-manager-service= -type. --- gnu/services/desktop.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 5e0bd102a2..c0300c0ddc 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1062,6 +1062,9 @@ dispatches events from it."))) =20 ;; The D-Bus clique. (service network-manager-service-type) + (service modem-manager-service-type) ;the manual claims this we= re + ;part of %desktop-services= , but + ;it wasn=E2=80=99t (service wpa-supplicant-service-type) ;needed by NetworkMana= ger (service avahi-service-type) (udisks-service) --=20 2.21.0 --nc2j33f4en2jwjnc Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0002-gnu-network-manager-applet-Propagate-packages-requir.patch" >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. --- gnu/packages/gnome.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 7c40a39f01..a3765007bf 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5511,10 +5511,12 @@ to virtual private networks (VPNs) via OpenVPN.") ;; libnm-gtk.pc refers to all these. `(("dbus-glib" ,dbus-glib) ("gtk+" ,gtk+) + ("iso-codes" ,iso-codes) ;mobile broadband country selection + ("mobile-broadband-provider-info" + ,mobile-broadband-provider-info) ;mobile broadband provider selection ("network-manager" ,network-manager))) (inputs - `(("iso-codes" ,iso-codes) - ("libgudev" ,libgudev) + `(("libgudev" ,libgudev) ("libnotify" ,libnotify) ("libsecret" ,libsecret) ("libselinux" ,libselinux) @@ -5895,6 +5897,10 @@ devices using the GNOME desktop.") ("smbclient" ,samba) ("tzdata" ,tzdata) ("upower" ,upower))) + (propagated-inputs + `(("iso-codes" ,iso-codes) ;mobile broadband country selection + ("mobile-broadband-provider-info" + ,mobile-broadband-provider-info))) ;mobile broadband provider selection (synopsis "Utilities to configure the GNOME desktop") (home-page "https://www.gnome.org/") (description -- 2.21.0 --nc2j33f4en2jwjnc-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 09 01:32:22 2019 Received: (at 35640) by debbugs.gnu.org; 9 May 2019 05:32:22 +0000 Received: from localhost ([127.0.0.1]:34508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hObfK-0005gT-5V for submit@debbugs.gnu.org; Thu, 09 May 2019 01:32:22 -0400 Received: from pelzflorian.de ([5.45.111.108]:47424 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hObfH-0005gI-Em for 35640@debbugs.gnu.org; Thu, 09 May 2019 01:32:20 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id E08DD360038 for <35640@debbugs.gnu.org>; Thu, 9 May 2019 07:31:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1557379918; bh=a2V8wwfW+hrUzGjb26BUnL8GEUwrLs192+2FYe7RT/Q=; h=Date:From:To:Subject:References:In-Reply-To; b=XU4JZn4W+niiMybgeBX4YQjSKf+mbNWsWOJvXC70PojJJllpbn8oPIengpWo/CTmE MWaBbEbpRunelprxZo/X8fZQ0uK8t2gyWdR0nyEcad4xuG48cDU7B57SELlXlSB+Aa QTn7WG4gpglmIPbzhkDx98b13Aid94/eK9ZaOMSQ= Date: Thu, 9 May 2019 07:31:58 +0200 From: "pelzflorian (Florian Pelz)" To: 35640@debbugs.gnu.org Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190509053158.cbp3i6q4qvmjs64o@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, May 08, 2019 at 08:26:07PM +0200, pelzflorian (Florian Pelz) wrote: > However, I want to be able to do this setup graphically. I made a > second patch to propagate iso-codes (for mobile broadband country > selection) and mobile-broadband-provider-selection (for selecting > defaults for providers) in nm-connection-editor > (network-manager-applet) and gnome-control-center. > I meant mobile-broadband-provider-info. > Propagation is ugly though. Should I try patching > network-manager-applet instead? I assume there are other packages > doing such patching that I can imitate. > > There is a branch wip-gnome3.30. Should I base the patch on wip-gnome3.30 or on master? > Preferrably, usb-modeswitch and > usb-modeswitch-data would be packaged (as a single package). There are two source URLs, so these two must be two packages, right? Regards, Florian From debbugs-submit-bounces@debbugs.gnu.org Thu May 09 08:55:13 2019 Received: (at 35640) by debbugs.gnu.org; 9 May 2019 12:55:13 +0000 Received: from localhost ([127.0.0.1]:34962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOiZs-0001dm-Mg for submit@debbugs.gnu.org; Thu, 09 May 2019 08:55:13 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:51024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOiZq-0001dc-Fr for 35640@debbugs.gnu.org; Thu, 09 May 2019 08:55:10 -0400 Received: from localhost (178.112.234.177.wireless.dyn.drei.com [178.112.234.177]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 154A833602AB; Thu, 9 May 2019 14:55:08 +0200 (CEST) Date: Thu, 9 May 2019 14:55:04 +0200 From: Danny Milosavljevic To: "pelzflorian (Florian Pelz)" Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190509145504.41cf8efc@scratchpost.org> In-Reply-To: <20190509053158.cbp3i6q4qvmjs64o@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <20190509053158.cbp3i6q4qvmjs64o@pelzflorian.localdomain> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/lpR35Ip/Q3EWJ9c0gLuolyt"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --Sig_/lpR35Ip/Q3EWJ9c0gLuolyt Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable I think back then we thought it would be too big for the installation mediu= m. How big is it after that? --Sig_/lpR35Ip/Q3EWJ9c0gLuolyt Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlzUIygACgkQ5xo1VCww uqUBaAgAlhvcN07b2+px8LR49pPnlYWVAw/C9VkDAFVxCqL3MK3c/3Zfkgki0daD zplR9EnVJ6HQ35RgSJxDkjtaHsZNji4xEt2ZnEETVxKOSUozcjWsaXqTYM71Cjct 4RmXYrsr9BjZNYjTGVZUG91ECkUWt51thSNLqauLSouzsE9XPUBsDWeFXpzdpXqC Ab/+xJqAIfvquwY0pa5DIdWpYyF+hhYEIrltqahWuMqW6ZQZRDFQTrB2/uNR530q oTUU1gm86sxRO09oRinqyuN+uVOvkhLWE2Z5m/kOMJTVEERdROzBOMDPQaK1cXbf ZYhMuDDKNv43QaI6B8jqIe2TK5eXQg== =Iw46 -----END PGP SIGNATURE----- --Sig_/lpR35Ip/Q3EWJ9c0gLuolyt-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 09 09:07:42 2019 Received: (at 35640) by debbugs.gnu.org; 9 May 2019 13:07:42 +0000 Received: from localhost ([127.0.0.1]:34984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOilv-00020F-Ax for submit@debbugs.gnu.org; Thu, 09 May 2019 09:07:42 -0400 Received: from pelzflorian.de ([5.45.111.108]:47852 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOilp-000201-DA for 35640@debbugs.gnu.org; Thu, 09 May 2019 09:07:37 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 778C4360038; Thu, 9 May 2019 15:07:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1557407232; bh=cIGtguaIsnYfVyFXs9BCyAj90p3wnL+Sm6jGTp8lOMo=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=gnJp/fVj9A/Wm4Qsu8E3b8kdBSvnN52bBfJScgXNYrTRtfDLzVIfMearCTLWHSiG7 nI6JkPf6ukAD7sfl5SlF1SD6NlBSudpSSHJ/wXNhek7vPhk4Q8eLrIawqnMy3/tI+J uLQHNj+gMXbgT65omc2atJk7rpx8Psst20CA/jEI= Date: Thu, 9 May 2019 15:07:12 +0200 From: "pelzflorian (Florian Pelz)" To: Danny Milosavljevic Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190509130712.7dyymud4ndtdsg6v@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <20190509053158.cbp3i6q4qvmjs64o@pelzflorian.localdomain> <20190509145504.41cf8efc@scratchpost.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190509145504.41cf8efc@scratchpost.org> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thu, May 09, 2019 at 02:55:04PM +0200, Danny Milosavljevic wrote: > I think back then we thought it would be too big for the installation medium. > How big is it after that? The installation medium uses %desktop-services? I will check, but my proposal does not concern the installation medium. Regards, Florian From debbugs-submit-bounces@debbugs.gnu.org Thu May 09 09:44:23 2019 Received: (at 35640) by debbugs.gnu.org; 9 May 2019 13:44:23 +0000 Received: from localhost ([127.0.0.1]:35020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOjLS-0002us-0j for submit@debbugs.gnu.org; Thu, 09 May 2019 09:44:23 -0400 Received: from pelzflorian.de ([5.45.111.108]:47894 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOjLO-0002uj-Vg for 35640@debbugs.gnu.org; Thu, 09 May 2019 09:44:20 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 38DBF360038; Thu, 9 May 2019 15:43:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1557409438; bh=M96/0+oNJo0v97rqzZNZxDXHLrB09XuAHv+J5Q29/RI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=g09DW7AsEX4qXlv9lvH6fQPfsyz1vJqOWvcHo/7A9uMIEnlWoLhbh+Cd8hOXAYJKx U6tTatbFwfxFJD2K6q6uU/7CrJoIZmBk1DGyL/XuioKbLt67/j7ZTkF7baR0E1LN9f hKOWBblXpBhVNd+Q4aUF10BuNcD5IYCe0fOS3Y0M= Date: Thu, 9 May 2019 15:43:56 +0200 From: "pelzflorian (Florian Pelz)" To: Danny Milosavljevic Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190509134356.y7kodjqndlnfx7am@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <20190509053158.cbp3i6q4qvmjs64o@pelzflorian.localdomain> <20190509145504.41cf8efc@scratchpost.org> <20190509130712.7dyymud4ndtdsg6v@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190509130712.7dyymud4ndtdsg6v@pelzflorian.localdomain> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) OBOn Thu, May 09, 2019 at 03:07:12PM +0200, pelzflorian (Florian Pelz) wrote: > On Thu, May 09, 2019 at 02:55:04PM +0200, Danny Milosavljevic wrote: > > I think back then we thought it would be too big for the installation medium. > > How big is it after that? > > > The installation medium uses %desktop-services? I will check, but my > proposal does not concern the installation medium. > There is no size difference. The patches only affect installed systems. Regards, Florian From debbugs-submit-bounces@debbugs.gnu.org Thu May 09 11:24:50 2019 Received: (at 35640) by debbugs.gnu.org; 9 May 2019 15:24:50 +0000 Received: from localhost ([127.0.0.1]:36077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOkug-0005WN-GX for submit@debbugs.gnu.org; Thu, 09 May 2019 11:24:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOkuf-0005WA-Ii for 35640@debbugs.gnu.org; Thu, 09 May 2019 11:24:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOkuZ-0000Sx-EN; Thu, 09 May 2019 11:24:43 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=52906 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hOkuY-0006Nv-N7; Thu, 09 May 2019 11:24:43 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#35640: Make USB modems just work on Guix References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> Date: Thu, 09 May 2019 17:24:39 +0200 In-Reply-To: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Wed, 8 May 2019 20:26:07 +0200") Message-ID: <87v9yjd51k.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Florian, "pelzflorian (Florian Pelz)" skribis: >>>From 5e9b45fe785dee52da2a67fbecbabc4741f85e54 Mon Sep 17 00:00:00 2001 > From: Florian Pelz > Date: Tue, 7 May 2019 11:51:43 +0200 > Subject: [PATCH 1/2] services: Include ModemManager in %desktop-services. > > * gnu/services/desktop.scm (%desktop-services): Add modem-manager-service= -type. > --- > gnu/services/desktop.scm | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm > index 5e0bd102a2..c0300c0ddc 100644 > --- a/gnu/services/desktop.scm > +++ b/gnu/services/desktop.scm > @@ -1062,6 +1062,9 @@ dispatches events from it."))) >=20=20 > ;; The D-Bus clique. > (service network-manager-service-type) > + (service modem-manager-service-type) ;the manual claims this we= re > + ;part of %desktop-services= , but > + ;it wasn=E2=80=99t The comment is unnecessary, but otherwise LGTM! I=E2=80=99ve confirmed that there is no size increase: --8<---------------cut here---------------start------------->8--- $ guix size network-manager | tail -1 total: 534.9 MiB $ guix size network-manager modem-manager | tail -1 total: 534.9 MiB --8<---------------cut here---------------end--------------->8--- >>>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 requ= ired > 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? Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon May 13 16:57:55 2019 Received: (at 35640) by debbugs.gnu.org; 13 May 2019 20:57:55 +0000 Received: from localhost ([127.0.0.1]:46488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQI1C-0000r8-PW for submit@debbugs.gnu.org; Mon, 13 May 2019 16:57:55 -0400 Received: from pelzflorian.de ([5.45.111.108]:53796 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQI19-0000qy-PQ for 35640@debbugs.gnu.org; Mon, 13 May 2019 16:57:53 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 1EACB360038; Mon, 13 May 2019 22:57:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1557781041; bh=rSGXgMkpmZUGzaAppQWz/o8TMWMitPxOgHQGi8fjzj4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=4FTAWKJWoeIldF5cgALRkvHM7+1Z3NZUFZ9TIJXKeUZKCtXsbwIQT1pTMCOs28XG4 /5iKUQ92WfQNcLF/5EmjfrqIJYKA9P7Y/ab0yrjI2wohKvKzN46hA2MR1MWUOZB8H7 TKN3Nnh65D2YhTKzJxOey6mu9BlJ1cf6jyErQWzQ= Date: Mon, 13 May 2019 22:57:20 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="6ot6xifyb7bxqd57" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87v9yjd51k.fsf@gnu.org> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --6ot6xifyb7bxqd57 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: > The comment is unnecessary, but otherwise LGTM! > :) I have attached the patch without the command. Also attached is my current work-in-progress package for USB_ModeSwitch. It does *not* work because I cannot figure out how to use tcl in the package’s inputs field. #:use-module gives me errors; only (@ (gnu packages tcl) tcl) appears to work. > 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 will try finding and imitating an example for such substitutions tomorrow. Regards, Florian --6ot6xifyb7bxqd57 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-services-Include-ModemManager-in-desktop-services.patch" >From 827d931eb6b72572f547c87e650780cf50e9e20c Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Mon, 13 May 2019 22:51:28 +0200 Subject: [PATCH] services: Include ModemManager in %desktop-services. * gnu/services/desktop.scm (%desktop-services): Add modem-manager-service-type. --- gnu/services/desktop.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 5e0bd102a2..ac714ca5e0 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1062,6 +1062,7 @@ dispatches events from it."))) ;; The D-Bus clique. (service network-manager-service-type) + (service modem-manager-service-type) (service wpa-supplicant-service-type) ;needed by NetworkManager (service avahi-service-type) (udisks-service) -- 2.21.0 --6ot6xifyb7bxqd57 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-Add-USB_ModeSwitch.patch" Content-Transfer-Encoding: 8bit >From 8861177166d74b84c0ac18bf102802cc1e6cf5d3 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Mon, 13 May 2019 22:35:00 +0200 Subject: [PATCH] Add USB_ModeSwitch. * gnu/packages/libusb.scm (usb-modeswitch-data) Add it. (usb-modeswitch) Add it. --- gnu/packages/libusb.scm | 91 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index 5ef62e47fb..00577bb333 100644 --- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm @@ -8,6 +8,7 @@ ;;; Copyright 2017 Jonathan Brielmaier ;;; Copyright 2018 Tobias Geerinckx-Rice ;;; Copyright 2018 Vagrant Cascadian +;;; Copyright 2019 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,6 +26,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages libusb) + #:use-module (system repl debug) #:use-module (gnu packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -36,6 +38,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system python) + #:use-module (guix build-system trivial) #:use-module (gnu packages autotools) #:use-module (gnu packages gnupg) #:use-module (gnu packages gtk) @@ -45,8 +48,12 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) + #:use-module ((gnu packages tcl) #:prefix tcl:) + #:use-module (system foreign) + #:use-module (rnrs bytevectors) #:use-module (gnu packages tls) #:use-module (gnu packages xiph)) +(terminal-width 1000000) (define-public libusb (package @@ -601,3 +608,87 @@ HID-Class devices.") (define-public python2-hidapi (package-with-python2 python-hidapi)) + +(define-public usb-modeswitch-data + (package + (name "usb-modeswitch-data") + (version "20170806") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.draisberghof.de/usb_modeswitch/" + "usb-modeswitch-data-" version ".tar.bz2")) + (sha256 + (base32 + "0b1wari3aza6qjggqd0hk2zsh93k1q8scgmwh6f8wr0flpr3whff")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (let ((share-dir (string-append %output "/share"))) + (install-file + (string-append (assoc-ref %build-inputs "source") + "/usb_modeswitch.d") + share-dir)) + #t))) + (home-page "http://www.draisberghof.de/usb_modeswitch/") + (synopsis "Data package for USB_ModeSwitch") + (description "Device data collection and UDEV rules file for +USB_ModeSwitch.") + (license license:gpl2+))) + +(define-public usb-modeswitch + (package + (name "usb-modeswitch") + (version "2.5.2") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.draisberghof.de/usb_modeswitch/" + "usb-modeswitch-" version ".tar.bz2")) + (sha256 + (base32 + "19ifi80g9ns5dmspchjvfj4ykxssq9yrci8m227dgb3yr04srzxb")))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs `(("libusb" ,libusb) + ("tcl" ,(error tcl:tcl)))) + (propagated-inputs `(("usb-modeswitch-data" ,usb-modeswitch-data))) + (outputs '("out" "dispatcher")) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; does not support `make check` + #:make-flags (list "CC=gcc") + #:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (replace 'install + (lambda _ ; calling make would use usr as PREFIX + (let* ((source (assoc-ref %build-inputs "source")) + (out (assoc-ref %outputs "out")) + (bin (string-append out "/bin")) + (man1 (string-append out "/share/man/man1")) + (dispatcher-out (assoc-ref %outputs "dispatcher")) + (etc (string-append dispatcher-out "/etc")) + (dispatcher-bin (string-append dispatcher-out "/bin"))) + (begin + (install-file "usb_modeswitch" bin) + (install-file "usb_modeswitch.1" man1) + (install-file "usb_modeswitch.conf" etc) + (rename-file "usb_modeswitch.tcl" "usb_modeswitch_dispatcher") + (substitute* "usb_modeswitch_dispatcher" + (("!/usr/bin/tclsh") + (string-append (assoc-ref %build-inputs "tcl") + "/bin/tclsh"))) + (install-file "usb_modeswitch_dispatcher" + dispatcher-bin)))))))) + (home-page "http://www.draisberghof.de/usb_modeswitch/") + (synopsis "Mode switching tool for controlling 'multi-mode' USB devices") + (description "USB_ModeSwitch is a mode switching tool for controlling USB +devices with multiple \"modes\". When plugged in for the first time many USB +devices (primarily high-speed WAN modems) act like a flash storage containing +installers for Windows drivers. USB_ModeSwitch replays the sequence the +Windows drivers would send to switch their mode from storage to modem (or +whatever the thing is supposed to do).") + (license license:gpl2+))) -- 2.21.0 --6ot6xifyb7bxqd57-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 13 17:05:20 2019 Received: (at 35640) by debbugs.gnu.org; 13 May 2019 21:05:20 +0000 Received: from localhost ([127.0.0.1]:46496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQI8O-00039C-7S for submit@debbugs.gnu.org; Mon, 13 May 2019 17:05:20 -0400 Received: from pelzflorian.de ([5.45.111.108]:53810 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQI8J-000390-LQ for 35640@debbugs.gnu.org; Mon, 13 May 2019 17:05:17 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id D1667360038; Mon, 13 May 2019 23:04:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1557781485; bh=5Y4etPKHgx64h3Y5Z2TzQA48RjvXKMiyoJA79kEMk/g=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=pX/q9Qj0+AVos5VFegUZsyXGmCgQhfffh94fWal2ThDThMkDfIlcPoNnsXpj6htiu uDAJHtAm/csLBiPGRo2bSKUvmanw0dMYPEmtJ/ioTDqdn4wkzJkWgonanx5mUnweBG hXyD4wVaCqy9ciOrT8psR+i0Xw4JI40JfsWbErHc= Date: Mon, 13 May 2019 23:04:43 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Mon, May 13, 2019 at 10:57:20PM +0200, pelzflorian (Florian Pelz) wrote: > Also attached is my current work-in-progress package for > USB_ModeSwitch. It does *not* work because I cannot figure out how to > use tcl in the package’s inputs field. > > #:use-module gives me errors; only (@ (gnu packages tcl) tcl) appears > to work. > I uploaded + (inputs `(("libusb" ,libusb) + ("tcl" ,(error tcl:tcl)))) This was a mistake, I mean + (inputs `(("libusb" ,libusb) + ("tcl" tcl:tcl))) It still gives me errors when used: florian@florianmacbook ~/git/guix [env]$ ./pre-inst-env guix install usb-modeswitch:dispatcher usb-modeswitch Backtrace: 18 (apply-smob/1 #) In ice-9/boot-9.scm: 705:2 17 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 16 (_ #(#(#))) In guix/ui.scm: 1747:12 15 (run-guix-command _ . _) In ice-9/boot-9.scm: 829:9 14 (catch _ _ # _) 829:9 13 (catch _ _ # _) In guix/scripts/package.scm: 915:10 12 (_) In guix/status.scm: 768:4 11 (call-with-status-report _ _) In guix/scripts/package.scm: 923:14 10 (_) 882:6 9 (process-actions # _) In guix/ui.scm: 1096:4 8 (show-manifest-transaction # _ _ #:dry-run? _) In srfi/srfi-1.scm: 628:19 7 (mapn ("usb-modeswitch" "usb-modeswitch") (("2.5.2" "2.5.2") ("dispatcher" "out") (# #)) 2) In guix/ui.scm: 1101:23 6 (_ "usb-modeswitch" "2.5.2" "dispatcher" #) In guix/packages.scm: 1296:13 5 (package-output # # _ _) 936:16 4 (cache! # # ("x86_64-linux" . #t) _) 1254:22 3 (thunk) 936:16 2 (cache! # # ("x86_64-linux" #f #t) _) 1042:46 1 (thunk) In gnu/packages/libusb.scm: 655:12 0 (inputs _) gnu/packages/libusb.scm:655:12: In procedure inputs: error: tcl:tcl: unbound variable Regards, Florian From debbugs-submit-bounces@debbugs.gnu.org Tue May 14 03:23:16 2019 Received: (at 35640) by debbugs.gnu.org; 14 May 2019 07:23:16 +0000 Received: from localhost ([127.0.0.1]:47031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQRmO-0007QC-3f for submit@debbugs.gnu.org; Tue, 14 May 2019 03:23:16 -0400 Received: from pelzflorian.de ([5.45.111.108]:54318 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQRmL-0007Q3-1n for 35640@debbugs.gnu.org; Tue, 14 May 2019 03:23:14 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 50DDA360038; Tue, 14 May 2019 09:22:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1557818559; bh=2Lh4loM+yB3f+RsxNawCib+OAXz2uh4An7nVbSLQEnQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=t2RK4OK8zftofJX2RaAm3ecSPJpGvMss5W+zbeXPQYPujaMxER64czs0//NvjZ42v EESpdS454HZOQZVHsdUMP9NW0OoFbgCMCNjSpLTjcc8SqoU9xoa4khrNw0lIlqZZxF CmsFMgRi3MfwTXC9VQlRExJPRLY49LTLxxl0882U= Date: Tue, 14 May 2019 09:22:39 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190514072238.qyh2jqlnhvwbb426@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Mon, May 13, 2019 at 11:04:43PM +0200, pelzflorian (Florian Pelz) wrote: > gnu/packages/libusb.scm:655:12: In procedure inputs: > error: tcl:tcl: unbound variable > This tcl:tcl gets resolved all right elsewhere in the libusb.scm file. There must be something special about definitions or their inputs. Regards, Florian From debbugs-submit-bounces@debbugs.gnu.org Tue May 14 04:36:03 2019 Received: (at 35640) by debbugs.gnu.org; 14 May 2019 08:36:03 +0000 Received: from localhost ([127.0.0.1]:47218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQSup-0002wy-0S for submit@debbugs.gnu.org; Tue, 14 May 2019 04:36:03 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:51808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQSum-0002wY-Ri for 35640@debbugs.gnu.org; Tue, 14 May 2019 04:36:01 -0400 Received: from localhost (178.113.152.22.wireless.dyn.drei.com [178.113.152.22]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 242B43360B64; Tue, 14 May 2019 10:35:59 +0200 (CEST) Date: Tue, 14 May 2019 10:35:55 +0200 From: Danny Milosavljevic To: "pelzflorian (Florian Pelz)" Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190514103555.1b2a6316@scratchpost.org> In-Reply-To: <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/Fc60.kH_9veWOswpU=uUOy9"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org, Ludovic =?ISO-8859-1?Q?Court=E8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --Sig_/Fc60.kH_9veWOswpU=uUOy9 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Florian, On Mon, 13 May 2019 23:04:43 +0200 "pelzflorian (Florian Pelz)" wrote: > On Mon, May 13, 2019 at 10:57:20PM +0200, pelzflorian (Florian Pelz) wrot= e: > > Also attached is my current work-in-progress package for > > USB_ModeSwitch. It does *not* work because I cannot figure out how to > > use tcl in the package=E2=80=99s inputs field. > >=20 > > #:use-module gives me errors; only (@ (gnu packages tcl) tcl) appears > > to work. The problem is there's a use-modules cycle somewhere. > I uploaded >=20 > + (inputs `(("libusb" ,libusb) > + ("tcl" ,(error tcl:tcl)))) >=20 > This was a mistake, I mean >=20 > + (inputs `(("libusb" ,libusb) > + ("tcl" tcl:tcl))) Should be (inputs `(("libusb" ,libusb) ("tcl" ,tcl:tcl))) But I guess you meant that anyway. The problem is there's a use-modules cycle somewhere. Try putting usb-modeswitch in another module (a new one if necessary). Also, does it really require tcl? Sounds kinda weird to me. --Sig_/Fc60.kH_9veWOswpU=uUOy9 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlzafesACgkQ5xo1VCww uqU/nQf/ZMQLpCGA/PwGV0wXcbkdhVHJDBngI+j+e9Po090bp8xM7mOctmQpojW/ TUs4QN4iiMVn8FxPkay9yao6Ald9msxU5M66XeSdHOxHn6Vg8l6EjkMIimCclyWQ cxqcUVs/fPzOf9ovwxercSzbm02kq08Q+WOLBcLeD5ZJXgq9yQnF8jS/Y6E5w8zC yEjFOm/6xU8c9pZNVfgZeBoWEkF8d8P+WqxkcVvha5M5XnhgdnLVEH+hmzRKXs7m g71asVofV2O6SfIqC3/bMWn2XFwTWsnaR/yxKv8Q1xfbq6u9McPqlZdoSG/OUQxd xqQ1ly7hRX2D47w8DFtnwBU5lk7BPA== =DCBn -----END PGP SIGNATURE----- --Sig_/Fc60.kH_9veWOswpU=uUOy9-- From debbugs-submit-bounces@debbugs.gnu.org Tue May 14 16:48:28 2019 Received: (at 35640) by debbugs.gnu.org; 14 May 2019 20:48:28 +0000 Received: from localhost ([127.0.0.1]:50000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQeLc-00051G-Ju for submit@debbugs.gnu.org; Tue, 14 May 2019 16:48:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQeLb-000513-9a for 35640@debbugs.gnu.org; Tue, 14 May 2019 16:48:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42390) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQeLW-0002AH-43; Tue, 14 May 2019 16:48:22 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=37378 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hQeLV-0000dw-FM; Tue, 14 May 2019 16:48:21 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#35640: Make USB modems just work on Guix References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 =?utf-8?Q?Flor=C3=A9al?= an 227 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 14 May 2019 22:48:19 +0200 In-Reply-To: <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Mon, 13 May 2019 22:57:20 +0200") Message-ID: <87d0kkyd7w.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "pelzflorian (Florian Pelz)" skribis: > + #:use-module ((gnu packages tcl) #:prefix tcl:) In short, you cannot do that for (gnu packages =E2=80=A6) modules. But if you remove that #:prefix, it=E2=80=99s hopefully fine? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue May 14 16:57:26 2019 Received: (at 35640) by debbugs.gnu.org; 14 May 2019 20:57:26 +0000 Received: from localhost ([127.0.0.1]:50012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQeUH-0005F6-PL for submit@debbugs.gnu.org; Tue, 14 May 2019 16:57:26 -0400 Received: from pelzflorian.de ([5.45.111.108]:55118 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQeUF-0005Ex-3J for 35640@debbugs.gnu.org; Tue, 14 May 2019 16:57:24 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 30025360038; Tue, 14 May 2019 22:56:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1557867409; bh=blW+Y5YbA3Oo9n4XVa56MCvY9Zf7JEdr6HDN4uKY3zg=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=EUw3R2h3VN5O+7MDjukQutX9qNSm98L2BIXoVSRXOD/+dxiZybJidONpGYVCkBXo6 +PzTBf9UTgaRSIDn1lJmOH9jQsI8LFw+zroLW1VjmH5VCBBhmJKdnsD5urtOR+Ab/F 0XtxquPwwQ6xycNnUlPGzwfy1AGzjl1L4v6o5QVg= Date: Tue, 14 May 2019 22:56:48 +0200 From: "pelzflorian (Florian Pelz)" To: Danny Milosavljevic Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="7kwbvpapydh5xq5m" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190514103555.1b2a6316@scratchpost.org> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --7kwbvpapydh5xq5m Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, May 14, 2019 at 10:35:55AM +0200, Danny Milosavljevic wrote: > Should be > > (inputs `(("libusb" ,libusb) > ("tcl" ,tcl:tcl))) > Yes I did mean that with comma, sorry. > But I guess you meant that anyway. > > The problem is there's a use-modules cycle somewhere. > Try putting usb-modeswitch in another module (a new one if necessary). > Using a new module helps, thank you! Now I also do not need a prefix tcl: anymore. @Ludo: without that prefix, I got errors because 'zip was redefined or something, I do not remember now. Now only packaging issues remain. When I use trivial-build-system, #:builder (begin (use-modules (guix build utils) (guix packages)) (let ((source (assoc-ref %build-inputs "source")) (tar (assoc-ref %build-inputs "tar")) (bzip2 (assoc-ref %build-inputs "bzip2")) (share-dir (string-append %output "/share"))) (copy-file source "data.tar.bz2") (invoke (string-append bzip2 "/bin/bzip2") "-d" "data.tar.bz2") (invoke (string-append tar "/bin/tar") "xvf" "data.tar") (install-file (string-append "usb-modeswitch-data-" (package-version this-package) "/usb_modeswitch.d") share-dir)) #t))) this package-version call seems not to work (at least not without more adding more modules). Is this the right approach? Also I forgot, do I need this #t at the end? > Also, does it really require tcl? Sounds kinda weird to me. TCL is not needed for command-line mode switching, but there is a TCL script called usb_modeswitch_dispatcher that gets called by the UDEV rule and by the systemd service file shipped with USB_ModeSwitch. This dispatcher automatically modeswitches USB devices that are plugged in, I believe. Regards, Florian --7kwbvpapydh5xq5m Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-Add-USB_ModeSwitch.patch" Content-Transfer-Encoding: 8bit >From 3430070606904b6dc6b247a6b8bfb2ce7c4fce0f Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Tue, 14 May 2019 12:36:24 +0200 Subject: [PATCH] Add USB_ModeSwitch. * gnu/packages/usb-modeswitch.scm (usb-modeswitch-data) Add it. (usb-modeswitch) Add it. --- gnu/packages/usb-modeswitch.scm | 122 ++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 gnu/packages/usb-modeswitch.scm diff --git a/gnu/packages/usb-modeswitch.scm b/gnu/packages/usb-modeswitch.scm new file mode 100644 index 0000000000..f3708c44ab --- /dev/null +++ b/gnu/packages/usb-modeswitch.scm @@ -0,0 +1,122 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright 2019 Florian Pelz +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages libusb) +;; #:use-module (gnu packages) + #:use-module ((guix licenses) #:prefix license:) + ;; #:use-module (guix packages) + #:use-module (guix build-system trivial) + #:use-module (gnu packages base) + #:use-module (gnu packages compression) + #:use-module (gnu packages libusb) + #:use-module (gnu packages tcl)) + +(define-public usb-modeswitch-data + (package + (name "usb-modeswitch-data") + (version "20170806") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.draisberghof.de/usb_modeswitch/" + "usb-modeswitch-data-" version ".tar.bz2")) + (sha256 + (base32 + "0b1wari3aza6qjggqd0hk2zsh93k1q8scgmwh6f8wr0flpr3whff")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils) + (guix packages)) + #:builder + (begin + (use-modules (guix build utils) + (guix packages)) + (let ((source (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "tar")) + (bzip2 (assoc-ref %build-inputs "bzip2")) + (share-dir (string-append %output "/share"))) + (copy-file source "data.tar.bz2") + (invoke (string-append bzip2 "/bin/bzip2") "-d" "data.tar.bz2") + (invoke (string-append tar "/bin/tar") "xvf" "data.tar") + (install-file (string-append "usb-modeswitch-data-" + (package-version this-package) + "/usb_modeswitch.d") share-dir)) + #t))) + (native-inputs `(("tar" ,tar) + ("bzip2" ,bzip2))) + (home-page "http://www.draisberghof.de/usb_modeswitch/") + (synopsis "Data package for USB_ModeSwitch") + (description "Device data collection and UDEV rules file for +USB_ModeSwitch.") + (license license:gpl2+))) + +(define-public usb-modeswitch + (package + (name "usb-modeswitch") + (version "2.5.2") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.draisberghof.de/usb_modeswitch/" + "usb-modeswitch-" version ".tar.bz2")) + (sha256 + (base32 + "19ifi80g9ns5dmspchjvfj4ykxssq9yrci8m227dgb3yr04srzxb")))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs `(("libusb" ,libusb) + ("tcl" ,tcl))) + (propagated-inputs `(("usb-modeswitch-data" ,usb-modeswitch-data))) + (outputs '("out" "dispatcher")) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; does not support `make check` + #:make-flags (list "CC=gcc") + #:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (replace 'install + (lambda _ ; calling make would use usr as PREFIX + (let* ((source (assoc-ref %build-inputs "source")) + (out (assoc-ref %outputs "out")) + (bin (string-append out "/bin")) + (man1 (string-append out "/share/man/man1")) + (dispatcher-out (assoc-ref %outputs "dispatcher")) + (etc (string-append dispatcher-out "/etc")) + (dispatcher-bin (string-append dispatcher-out "/bin"))) + (begin +;; (use-modules (guix build utils)) + (install-file "usb_modeswitch" bin) + (install-file "usb_modeswitch.1" man1) + (install-file "usb_modeswitch.conf" etc) + (rename-file "usb_modeswitch.tcl" "usb_modeswitch_dispatcher") + (substitute* "usb_modeswitch_dispatcher" + (("!/usr/bin/tclsh") + (string-append (assoc-ref %build-inputs "tcl") + "/bin/tclsh"))) + (install-file "usb_modeswitch_dispatcher" + dispatcher-bin)))))))) + (home-page "http://www.draisberghof.de/usb_modeswitch/") + (synopsis "Mode switching tool for controlling 'multi-mode' USB devices") + (description "USB_ModeSwitch is a mode switching tool for controlling USB +devices with multiple \"modes\". When plugged in for the first time many USB +devices (primarily high-speed WAN modems) act like a flash storage containing +installers for Windows drivers. USB_ModeSwitch replays the sequence the +Windows drivers would send to switch their mode from storage to modem (or +whatever the thing is supposed to do).") + (license license:gpl2+))) -- 2.21.0 --7kwbvpapydh5xq5m-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 15 07:18:22 2019 Received: (at 35640) by debbugs.gnu.org; 15 May 2019 11:18:22 +0000 Received: from localhost ([127.0.0.1]:51232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQrvS-0007kR-Hu for submit@debbugs.gnu.org; Wed, 15 May 2019 07:18:22 -0400 Received: from pelzflorian.de ([5.45.111.108]:55888 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQrvO-0007kH-Rv for 35640@debbugs.gnu.org; Wed, 15 May 2019 07:18:20 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 478EB360038; Wed, 15 May 2019 13:17:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1557919064; bh=wPjIpg0+XfH5lUEyPXXKbMiv6KDUzguiEw+g05tbC8Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=emOtJKoKS6ph+pbktXKN7zctkZIyAwpyCzuvXUoppptV2GCFjJwt/RBGOaCjEdn2d Sv8ZZZ5hkvCkL3vMQOqzunKqTh5Cc5akZVIEAKASABuYsksCIBLflTjr8dJKb4pjc1 JQ+GDDa0Qo3auodL831fBIqUGuMoC5vJpcEwvk14= Date: Wed, 15 May 2019 13:17:44 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190515111743.eo3ayemhoygiphun@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="dvruifng6rg7cc7i" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --dvruifng6rg7cc7i Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Mon, May 13, 2019 at 10:57:20PM +0200, pelzflorian (Florian Pelz) wrote: > On Thu, May 09, 2019 at 05:24:39PM +0200, Ludovic Courts wrote: > > The comment is unnecessary, but otherwise LGTM! > > > > :) I have attached the patch without the command. > I have attached the patch again without the comment and with mentioning modem support in the Desktop services section in the doc/guix.texi manual. Previously it was only said in the Network services section that modem-manager-service-type were part of %desktop-services. Regards, Florian --dvruifng6rg7cc7i Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-services-Include-ModemManager-in-desktop-services.patch" Content-Transfer-Encoding: 8bit >From 061c976e38b8b332602e84ac74717384aab57d56 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Mon, 13 May 2019 22:51:28 +0200 Subject: [PATCH] services: Include ModemManager in %desktop-services. * gnu/services/desktop.scm (%desktop-services): Add modem-manager-service-type. * doc/guix.texi (Desktop services): Mention it here. --- doc/guix.texi | 17 +++++++++-------- gnu/services/desktop.scm | 1 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 3f50bf77fe..aa08832fae 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -59,7 +59,7 @@ Copyright @copyright{} 2018 Oleg Pykhalov@* Copyright @copyright{} 2018 Mike Gerwitz@* Copyright @copyright{} 2018 Pierre-Antoine Rouby@* Copyright @copyright{} 2018 Gbor Boskovits@* -Copyright @copyright{} 2018 Florian Pelz@* +Copyright @copyright{} 2018, 2019 Florian Pelz@* Copyright @copyright{} 2018 Laura Lazzati@* Copyright @copyright{} 2018 Alex Vong@* Copyright @copyright{} 2019 Josh Holland@* @@ -14620,13 +14620,14 @@ adds or adjusts services for a typical ``desktop'' setup. In particular, it adds a graphical login manager (@pxref{X Window, @code{gdm-service-type}}), screen lockers, a network management tool -(@pxref{Networking Services, @code{network-manager-service-type}}), energy and color -management services, the @code{elogind} login and seat manager, the -Polkit privilege service, the GeoClue location service, the -AccountsService daemon that allows authorized users change system -passwords, an NTP client (@pxref{Networking Services}), the Avahi -daemon, and has the name service switch service configured to be able to -use @code{nss-mdns} (@pxref{Name Service Switch, mDNS}). +(@pxref{Networking Services, @code{network-manager-service-type}}) with modem +support (@pxref{Networking Services, @code{modem-manager-service-type}}), +energy and color management services, the @code{elogind} login and seat +manager, the Polkit privilege service, the GeoClue location service, the +AccountsService daemon that allows authorized users change system passwords, +an NTP client (@pxref{Networking Services}), the Avahi daemon, and has the +name service switch service configured to be able to use @code{nss-mdns} +(@pxref{Name Service Switch, mDNS}). @end defvr The @var{%desktop-services} variable can be used as the @code{services} diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 5e0bd102a2..ac714ca5e0 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1062,6 +1062,7 @@ dispatches events from it."))) ;; The D-Bus clique. (service network-manager-service-type) + (service modem-manager-service-type) (service wpa-supplicant-service-type) ;needed by NetworkManager (service avahi-service-type) (udisks-service) -- 2.21.0 --dvruifng6rg7cc7i-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 15 08:51:31 2019 Received: (at 35640) by debbugs.gnu.org; 15 May 2019 12:51:31 +0000 Received: from localhost ([127.0.0.1]:51451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQtNa-0007tn-Vy for submit@debbugs.gnu.org; Wed, 15 May 2019 08:51:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQtNZ-0007tX-Qk for 35640@debbugs.gnu.org; Wed, 15 May 2019 08:51:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQtNU-0003z7-1f; Wed, 15 May 2019 08:51:24 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42026 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hQtNT-0002f2-CV; Wed, 15 May 2019 08:51:23 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#35640: Make USB modems just work on Guix References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190515111743.eo3ayemhoygiphun@pelzflorian.localdomain> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 26 =?utf-8?Q?Flor=C3=A9al?= an 227 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 15 May 2019 14:51:20 +0200 In-Reply-To: <20190515111743.eo3ayemhoygiphun@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Wed, 15 May 2019 13:17:44 +0200") Message-ID: <87lfz7vq2f.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "pelzflorian (Florian Pelz)" skribis: > From 061c976e38b8b332602e84ac74717384aab57d56 Mon Sep 17 00:00:00 2001 > From: Florian Pelz > Date: Mon, 13 May 2019 22:51:28 +0200 > Subject: [PATCH] services: Include ModemManager in %desktop-services. > > * gnu/services/desktop.scm (%desktop-services): Add modem-manager-service= -type. > * doc/guix.texi (Desktop services): Mention it here. Applied. I had applied the desktop.scm yesterday, so I=E2=80=99ve taken ju= st the texi part here. Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed May 15 09:01:17 2019 Received: (at 35640) by debbugs.gnu.org; 15 May 2019 13:01:17 +0000 Received: from localhost ([127.0.0.1]:51461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQtX2-0008AC-Vj for submit@debbugs.gnu.org; Wed, 15 May 2019 09:01:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQtX1-00089x-61 for 35640@debbugs.gnu.org; Wed, 15 May 2019 09:01:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56085) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQtWv-0007BB-3n; Wed, 15 May 2019 09:01:09 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42028 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hQtWu-0002gj-BV; Wed, 15 May 2019 09:01:08 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#35640: Make USB modems just work on Guix References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 26 =?utf-8?Q?Flor=C3=A9al?= an 227 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 15 May 2019 15:01:04 +0200 In-Reply-To: <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Tue, 14 May 2019 22:56:48 +0200") Message-ID: <87ef4zvpm7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35640 Cc: Danny Milosavljevic , 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, "pelzflorian (Florian Pelz)" skribis: > On Tue, May 14, 2019 at 10:35:55AM +0200, Danny Milosavljevic wrote: [...] >> The problem is there's a use-modules cycle somewhere. >> Try putting usb-modeswitch in another module (a new one if necessary). >> > > Using a new module helps, thank you! Now I also do not need a prefix > tcl: anymore. @Ludo: without that prefix, I got errors because 'zip > was redefined or something, I do not remember now. That could be a collision with =E2=80=98zip=E2=80=99 from (srfi srfi-1) or = with =E2=80=98zlib=E2=80=99 from (guix licenses), which can both be worked around by doing something along these lines: #:use-module ((srfi srfi-1) #:hide (zip)) > Now only packaging issues remain. When I use trivial-build-system, > > #:builder > (begin > (use-modules (guix build utils) > (guix packages)) > (let ((source (assoc-ref %build-inputs "source")) > (tar (assoc-ref %build-inputs "tar")) > (bzip2 (assoc-ref %build-inputs "bzip2")) > (share-dir (string-append %output "/share"))) > (copy-file source "data.tar.bz2") > (invoke (string-append bzip2 "/bin/bzip2") "-d" "data.tar.bz2") > (invoke (string-append tar "/bin/tar") "xvf" "data.tar") > (install-file (string-append "usb-modeswitch-data-" > (package-version this-package) ^ You=E2=80=99re missing a comma (=E2=80=9Cunquote=E2=80=9D) so that =E2=80= =98package-version=E2=80=99 is called on the host side; it doesn=E2=80=99t exist on the build side. > "/usb_modeswitch.d") share-dir)) > #t))) #t is unnecessary here. > From 3430070606904b6dc6b247a6b8bfb2ce7c4fce0f Mon Sep 17 00:00:00 2001 > From: Florian Pelz > Date: Tue, 14 May 2019 12:36:24 +0200 > Subject: [PATCH] Add USB_ModeSwitch. > > * gnu/packages/usb-modeswitch.scm (usb-modeswitch-data) Add it. > (usb-modeswitch) Add it. Just =E2=80=9CNew file=E2=80=9D. Make sure to add the file to gnu/local.mk= please. > +(define-module (gnu packages libusb) Please adjust the module name: it should be =E2=80=98usb-modeswitch=E2=80= =99. > + (synopsis "Data package for USB_ModeSwitch") > + (description "Device data collection and UDEV rules file for > +USB_ModeSwitch.") Please make it a full sentence, and ideally expound a bit (info "(guix) Synopses and Descriptions"). > +;; (use-modules (guix build utils)) Make sure to remove any leftovers like this comment before sending the next version. :-) > + (replace 'install > + (lambda _ ; calling make would use usr as PR= EFIX > + (let* ((source (assoc-ref %build-inputs "source")) > + (out (assoc-ref %outputs "out")) > + (bin (string-append out "/bin")) Please don=E2=80=99t refer to global variables =E2=80=98%outputs=E2=80=99 a= nd =E2=80=98%build-inputs=E2=80=99. Instead, take them from the phase=E2=80=99s arguments: (lambda* (#:key source outputs inputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out"))) =E2=80=A6)) > + (install-file "usb_modeswitch_dispatcher" > + dispatcher-bin)))))))) The phase must return #t. > + (synopsis "Mode switching tool for controlling 'multi-mode' USB devi= ces") Probably `multi-mode', as expected in Texinfo. > + (description "USB_ModeSwitch is a mode switching tool for controllin= g USB > +devices with multiple \"modes\". When plugged in for the first time man= y USB =E2=80=A6 and @dfn{modes} Could you send an updated patch? Is USB_ModeSwitch needed for proper use of ModemManager? I=E2=80=99d say = =E2=80=9Cno=E2=80=9D but I=E2=80=99m unsure. Thanks for working on it! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed May 15 10:40:55 2019 Received: (at 35640) by debbugs.gnu.org; 15 May 2019 14:40:56 +0000 Received: from localhost ([127.0.0.1]:53152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQv5P-0006kq-UF for submit@debbugs.gnu.org; Wed, 15 May 2019 10:40:55 -0400 Received: from pelzflorian.de ([5.45.111.108]:56078 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQv5K-0006kY-7D for 35640@debbugs.gnu.org; Wed, 15 May 2019 10:40:50 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 093FA360038; Wed, 15 May 2019 16:40:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1557931211; bh=fAbGloJ87meZZ7vZBdzB2EOkwO/biet737hhg5et/JU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=YI8pAjNUslHXswkwZbfble4OCtliXRE832BhIt/DXIumO8SLuxDdVV9FuS8i5nTKq 300IzB7yBJYn1yZeBRKjCBmJMJ1qNpJ7D7LkSR+G2bdETLB55kpx9A55rmIMmpZxXV JHS+Bqyj8ZCDhOFSRdKo2stnecnT8uZPuUG2Ja5U= Date: Wed, 15 May 2019 16:40:10 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190515144010.pdsk4zv7fm4mprpv@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87ef4zvpm7.fsf@gnu.org> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: Danny Milosavljevic , 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, May 15, 2019 at 03:01:04PM +0200, Ludovic Courtès wrote: > Could you send an updated patch? > Thank you very much! Will do later, today or tomorrow. > Is USB_ModeSwitch needed for proper use of ModemManager? I’d say “no” > but I’m unsure. > Only on some modems. > Thanks for working on it! > > Ludo’. :) Regards, Florian From debbugs-submit-bounces@debbugs.gnu.org Thu May 16 03:50:59 2019 Received: (at 35640) by debbugs.gnu.org; 16 May 2019 07:50:59 +0000 Received: from localhost ([127.0.0.1]:54118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRBAJ-0004f1-Fp for submit@debbugs.gnu.org; Thu, 16 May 2019 03:50:59 -0400 Received: from pelzflorian.de ([5.45.111.108]:57080 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRBAH-0004es-7X for 35640@debbugs.gnu.org; Thu, 16 May 2019 03:50:58 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 9A788360038; Thu, 16 May 2019 09:50:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1557993018; bh=Q/FF8pkCluwwjB3+FSTegPa7J/3RP8hrmr5spjt46d0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=2LHosrv8+ADty4+MZf9DPcxsnAUYG4H2n0pAqd1RX1qm5G6AqZnU0lRV7AcXZDoDn LjcpZBfpmOLlHn6/+AbpdE+UZQVrTu0w1hJ2W/FiwlTENy3JlUZmWP0ZK7drvJSpMW Ig7bmY3Bnqh/OtW/waXp4MV05C5MQ4MYVng047YY= Date: Thu, 16 May 2019 09:50:18 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87v9yjd51k.fsf@gnu.org> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --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-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 16 04:35:27 2019 Received: (at 35640) by debbugs.gnu.org; 16 May 2019 08:35:27 +0000 Received: from localhost ([127.0.0.1]:54181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRBrL-0005il-6b for submit@debbugs.gnu.org; Thu, 16 May 2019 04:35:27 -0400 Received: from pelzflorian.de ([5.45.111.108]:57140 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRBrI-0005ia-3f for 35640@debbugs.gnu.org; Thu, 16 May 2019 04:35:25 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id B5769360038; Thu, 16 May 2019 10:34:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1557995686; bh=zw5Xi6v4j9odlmr0BRIjRtpPoUJgMyx59tPmIHZWLW4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=gnQlUPyC8WHNufLvFlV8h7f4pbA9ynTTn5Eplgf7ppIjIEjORNNEKyiTYy2wybY12 LbxEEKMHTCYHxtXou+P808p9lggej8xPdlKaOEzbwNu2frK8Ob/1DoZRqFQPEgkyuU jd5HlRkTB1IPanziyQC1AF3vpUoOuWvv8sVWQIKk= Date: Thu, 16 May 2019 10:34:46 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190516083446.i2xdzug5zcb3sndy@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190516075018.htx3hi4vd5zswjpw@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190516075018.htx3hi4vd5zswjpw@pelzflorian.localdomain> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thu, May 16, 2019 at 09:50:18AM +0200, pelzflorian (Florian Pelz) wrote: > 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. I hope it would not have been required to increase a revision number. Regards, Florian From debbugs-submit-bounces@debbugs.gnu.org Thu May 16 07:30:27 2019 Received: (at 35640) by debbugs.gnu.org; 16 May 2019 11:30:27 +0000 Received: from localhost ([127.0.0.1]:54486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hREah-0004Bz-4m for submit@debbugs.gnu.org; Thu, 16 May 2019 07:30:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hREaf-00045j-Da for 35640@debbugs.gnu.org; Thu, 16 May 2019 07:30:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hREaZ-0005J8-TL; Thu, 16 May 2019 07:30:19 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=40990 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hREaZ-0004DC-ER; Thu, 16 May 2019 07:30:19 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#35640: Make USB modems just work on Guix References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190516075018.htx3hi4vd5zswjpw@pelzflorian.localdomain> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 27 =?utf-8?Q?Flor=C3=A9al?= an 227 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 16 May 2019 13:30:17 +0200 In-Reply-To: <20190516075018.htx3hi4vd5zswjpw@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Thu, 16 May 2019 09:50:18 +0200") Message-ID: <87sgtehc1i.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable "pelzflorian (Florian Pelz)" skribis: > 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 supp= ort. > > * gnu/packages/gnome.scm (network-manager-applet): Patch libnma to load > iso-codes and mobile-broadband-provider-info from the store and not requi= re > them in the profile. Great. Applied with the changes below; the spacing change is to please Emacs (C-M-a & co. get confused by opening parentheses at the beginning of a line.) Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index fc024ebf72..9070673cf6 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5512,14 +5512,15 @@ to virtual private networks (VPNs) via OpenVPN.") "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) + (("(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) + (("(g_build_filename \\()dirs\\[i\\].*,\ + (ISO_3166_COUNTRY_CODES.*)" all start end) (string-append start "\"" iso-codes - "/share\", " end))))))))) + "/share\", " end))) + #t)))))) (native-inputs `(("intltool" ,intltool) ("gobject-introspection" ,gobject-introspection) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 22 12:29:15 2019 Received: (at 35640) by debbugs.gnu.org; 22 May 2019 16:29:15 +0000 Received: from localhost ([127.0.0.1]:42783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hTU78-00005D-R3 for submit@debbugs.gnu.org; Wed, 22 May 2019 12:29:15 -0400 Received: from pelzflorian.de ([5.45.111.108]:49690 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hTU75-00004w-TP for 35640@debbugs.gnu.org; Wed, 22 May 2019 12:29:13 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id D218636003D; Wed, 22 May 2019 18:29:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1558542550; bh=U6bsVM/FXbj1dRJRELA8M6gAxWM7z1TVBDuzpR1FpjU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=WAFKJEuldgM/2ywfpaA0GmidWHV6oXGq8XIzJh82q9c8AqamCr/GTl7/F5udGCv0k iY5EtMUZiiJVO2Amf+Raq/Znjcn2te8MDG7BkfwdNhtTxC/STZO3ARTZAgHo4UjUKZ HKpf5Q8HwffMKUSgRXVFSSc7oXpPlsXcaMOcNrTo= Date: Wed, 22 May 2019 18:29:09 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="3i55onlmz2ycjxrf" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87ef4zvpm7.fsf@gnu.org> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: Danny Milosavljevic , 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --3i55onlmz2ycjxrf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Thank you for your thorough review. Find attached a new version of the patch. I can now modeswitch my USB modem by doing ./pre-inst-env guix install usb-modeswitch:dispatcher sudo usb_modeswitch -c ~/.guix-profile/share/usb_modeswitch.d/12d1\:14fe -v 0x12d1 -p 0x14fe Tring to put the packages in gnu/packages/libusb.scm and not in their own file gnu/packages/usb-modeswitch.scm again resulted in [ 11%] LOAD guix/scripts/search.scm [ 11%] LOAD guix/scripts/gc.scm [ 11%] LOAD guix/scripts/hash.scm [ 11%] LOAD guix/scripts/pack.scm Backtrace: In ice-9/boot-9.scm: 222:29 19 (map1 (((guix utils)) ((guix store)) ((guix #) # (#)) …)) 222:29 18 (map1 (((guix store)) ((guix status) #:select (#)) (#) …)) 222:29 17 (map1 (((guix status) #:select (#)) ((guix grafts)) # …)) 222:29 16 (map1 (((guix grafts)) ((guix monads)) ((guix #)) (#) …)) 222:29 15 (map1 (((guix monads)) ((guix modules)) ((guix #)) (#) …)) 222:29 14 (map1 (((guix modules)) ((guix packages)) ((guix #)) # …)) 222:29 13 (map1 (((guix packages)) ((guix profiles)) ((guix #)) …)) 222:29 12 (map1 (((guix profiles)) ((guix describe)) ((guix #)) …)) 222:29 11 (map1 (((guix describe)) ((guix derivations)) ((# #)) …)) 222:29 10 (map1 (((guix derivations)) ((guix search-paths)) (#) …)) 222:29 9 (map1 (((guix search-paths)) ((guix build-system #)) # …)) 222:29 8 (map1 (((guix build-system gnu)) ((guix scripts #)) # …)) 222:29 7 (map1 (((guix scripts build)) ((guix self) #:select …) …)) 222:29 6 (map1 (((guix self) #:select (make-config.scm)) ((…)) …)) 222:29 5 (map1 (((gnu packages)) ((gnu packages bootstrap)) (…) …)) 222:29 4 (map1 (((gnu packages bootstrap)) ((gnu packages …) …) …)) 222:17 3 (map1 (((gnu packages compression) #:hide (zip)) ((…)) …)) 2830:10 2 (resolve-interface (gnu packages compression) #:select _ …) 260:13 1 (for-each # …) In unknown file: 0 (scm-error misc-error #f "~A" ("no binding `zip' to h…") …) ERROR: In procedure scm-error: no binding `zip' to hide in module (gnu packages compression) when running make. Then I rebuilt and commented and uncommented and moved some code and putting the code in gnu/packages/libusb.scm worked again in ./pre-inst-env. Later it failed again. Danny speculated the reason was a use-module cycle. I would like confirmation that this is what a use-module cycle looks like and that I should stop trying to put usb-modeswitch back in gnu/packages/libusb.scm. As for the packaging, I hope it is correct to still refer to %outputs in the trivial-build-system for usb-modeswitch-data. Should I also make the usb-modeswitch-data package install the license file of usb-modeswitch-data? Or should I use gnu-build-system instead of trivial-build-system? trivial works now though. The file dispatcher.c of usb-modeswitch is licensed bsd-2 and not gpl2+. Should I list both licenses or just gpl2+? I have checked the license of the files of usb-modeswitch-data and usb-modeswitch by going through each of them with the `less` program and reading its header while assuming that no license header means the file has the license described in the README file, by diff’ing the license files with a license downloaded from gnu.org, and that nothing looked like a program blob (there only are very small hex strings for the messages USB_ModeSwitch sends like MessageContent="55534243123456782400000080000612000024000000000000000000000000" that seem harmless). Is this the usual procedure? Currently I also install the UDEV rule shipped with usb-modeswitch-data; I hope this is correct. Currently I install the usb_modeswitch_dispatcher that is needed by the udev rule in a separate output called “dispatcher”. I am unsure if this usb_modeswitch_dispatcher would need the usb_modeswitch program from the “out” output. Is it OK when one output only works when the “out” output is installed too? What is still missing is adding a service type for usb-modeswitch that extends the udev service type by the rules file and that calls the usb-modeswitch dispatcher once every reboot. I can try making one, but I am not sure if this is the right approach. I am also unsure if this service should be part of %desktop-services; many modems need it though and modem-manager-service-type. Regards, Florian --3i55onlmz2ycjxrf Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-gnu-Add-USB_ModeSwitch.patch" Content-Transfer-Encoding: 8bit >From af86ed879ecfc6ef5970ceff638a9303af497b14 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Wed, 22 May 2019 18:16:26 +0200 Subject: [PATCH] gnu: Add USB_ModeSwitch. * gnu/packages/usb-modeswitch.scm: New file. --- gnu/local.mk | 1 + gnu/packages/usb-modeswitch.scm | 133 ++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 gnu/packages/usb-modeswitch.scm diff --git a/gnu/local.mk b/gnu/local.mk index cfc16c5ac8..7f834c374f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -466,6 +466,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/uml.scm \ %D%/packages/unrtf.scm \ %D%/packages/upnp.scm \ + %D%/packages/usb-modeswitch.scm \ %D%/packages/uucp.scm \ %D%/packages/valgrind.scm \ %D%/packages/version-control.scm \ diff --git a/gnu/packages/usb-modeswitch.scm b/gnu/packages/usb-modeswitch.scm new file mode 100644 index 0000000000..c43f7c46bd --- /dev/null +++ b/gnu/packages/usb-modeswitch.scm @@ -0,0 +1,133 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright 2019 Florian Pelz +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages usb-modeswitch) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) + #:use-module (gnu packages base) + #:use-module (gnu packages compression) + #:use-module (gnu packages embedded) + #:use-module (gnu packages libusb) + #:use-module (gnu packages pkg-config)) + +(define-public usb-modeswitch-data + (package + (name "usb-modeswitch-data") + (version "20170806") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.draisberghof.de/usb_modeswitch/" + "usb-modeswitch-data-" version ".tar.bz2")) + (sha256 + (base32 + "0b1wari3aza6qjggqd0hk2zsh93k1q8scgmwh6f8wr0flpr3whff")))) + (build-system trivial-build-system) + (native-inputs `(("tar" ,tar) + ("bzip2" ,bzip2))) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((source (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "tar")) + (bzip2 (assoc-ref %build-inputs "bzip2")) + (files (string-append "usb-modeswitch-data-" + ,(package-version this-package))) + (share-dir (string-append %output "/share")) + (udev-dir (string-append %output "/udev"))) + (copy-file source "data.tar.bz2") + (invoke (string-append bzip2 "/bin/bzip2") "-d" "data.tar.bz2") + (invoke (string-append tar "/bin/tar") "xvf" "data.tar") + (copy-recursively (string-append files "/usb_modeswitch.d") + (string-append share-dir "/usb_modeswitch.d")) + (install-file (string-append files "/40-usb_modeswitch.rules") + udev-dir))))) + (home-page "http://www.draisberghof.de/usb_modeswitch/") + (synopsis "Data package for USB_ModeSwitch") + (description "This packages contains data about devices and a UDEV rules +file for use with USB_ModeSwitch.") + (license license:gpl2+))) + +(define-public usb-modeswitch + (package + (name "usb-modeswitch") + (version "2.5.2") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.draisberghof.de/usb_modeswitch/" + "usb-modeswitch-" version ".tar.bz2")) + (sha256 + (base32 + "19ifi80g9ns5dmspchjvfj4ykxssq9yrci8m227dgb3yr04srzxb")) + (modules '((guix build utils))) + (snippet + ;; Remove bundled jimtcl. + '(begin + (delete-file-recursively "jim") + #t)))) + (native-inputs `(("pkg-config" ,pkg-config))) + (inputs `(("libusb" ,libusb) + ("jimtcl" ,jimtcl))) + (propagated-inputs `(("usb-modeswitch-data" ,usb-modeswitch-data))) + (outputs '("out" "dispatcher")) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; does not support `make check` + #:make-flags (list "CC=gcc") + #:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (replace 'install ; calling make would use usr as PREFIX + (lambda* (#:key source outputs inputs #:allow-other-keys) + (let* ((source (assoc-ref inputs "source")) + (jimtcl (assoc-ref inputs "jimtcl")) + (out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (man1 (string-append out "/share/man/man1")) + (dispatcher-out (assoc-ref outputs "dispatcher")) + (etc (string-append dispatcher-out "/etc")) + (dispatcher-bin (string-append dispatcher-out "/bin")) + (dispatcher-man1 (string-append dispatcher-out + "/share/man/man1"))) + (begin + (install-file "usb_modeswitch" bin) + (install-file "usb_modeswitch.conf" etc) + (install-file "usb_modeswitch.1" man1) + (install-file "usb_modeswitch_dispatcher.1" dispatcher-man1) + (rename-file "usb_modeswitch.tcl" "usb_modeswitch_dispatcher") + (substitute* "usb_modeswitch_dispatcher" + (("!/usr/bin/tclsh") + (string-append "!" jimtcl "/bin/jimsh"))) + (install-file "usb_modeswitch_dispatcher" + dispatcher-bin) + #t))))))) + (home-page "http://www.draisberghof.de/usb_modeswitch/") + (synopsis "Mode switching tool for controlling `multi-mode' USB devices") + (description "USB_ModeSwitch is a mode switching tool for controlling USB +devices with multiple @dfn{modes}. When plugged in for the first time many +USB devices (primarily high-speed WAN modems) act like a flash storage +containing installers for Windows drivers. USB_ModeSwitch replays the +sequence the Windows drivers would send to switch their mode from storage to +modem (or whatever the thing is supposed to do).") + (license license:gpl2+))) -- 2.21.0 --3i55onlmz2ycjxrf-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 22 13:59:07 2019 Received: (at 35640) by debbugs.gnu.org; 22 May 2019 17:59:07 +0000 Received: from localhost ([127.0.0.1]:42856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hTVW5-0002Ui-NC for submit@debbugs.gnu.org; Wed, 22 May 2019 13:59:07 -0400 Received: from pelzflorian.de ([5.45.111.108]:49782 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hTVW0-0002UG-Rz for 35640@debbugs.gnu.org; Wed, 22 May 2019 13:59:04 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id DB1E536003D; Wed, 22 May 2019 19:58:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1558547939; bh=4twRgnrguy9ruyXMsO3uBp+Ksyevu/xd1qazGCWlVvk=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=z4ZvQFJ6lj41kQ+mrZzZpnATXXbz1mmjtIdzUzivLRfPnIg6YYkUt+AsYxEw/TvEg 729aA4yWRHwAscAskfEUFnzNC7kxCJopXqWNoemqeYdDGxg2WyM4czohW8SZz75P35 KhBY65/JrQe6uhBY7aJ9FECaHzeoyK1H7DQ7EoXQ= Date: Wed, 22 May 2019 19:58:58 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190522175858.qsin6ybgpsemnarb@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="3iil4funmjtmakdn" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --3iil4funmjtmakdn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I forgot to mention gnu/local.mk in the commit message. Please use this patch attached here instead. Regards, Florian --3iil4funmjtmakdn Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-gnu-Add-USB_ModeSwitch.patch" Content-Transfer-Encoding: 8bit >From 854198efebbe91feea2fbb3ab2a94c26014f1699 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Wed, 22 May 2019 19:53:58 +0200 Subject: [PATCH] gnu: Add USB_ModeSwitch. * gnu/packages/usb-modeswitch.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/local.mk | 1 + gnu/packages/usb-modeswitch.scm | 133 ++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 gnu/packages/usb-modeswitch.scm diff --git a/gnu/local.mk b/gnu/local.mk index cfc16c5ac8..7f834c374f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -466,6 +466,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/uml.scm \ %D%/packages/unrtf.scm \ %D%/packages/upnp.scm \ + %D%/packages/usb-modeswitch.scm \ %D%/packages/uucp.scm \ %D%/packages/valgrind.scm \ %D%/packages/version-control.scm \ diff --git a/gnu/packages/usb-modeswitch.scm b/gnu/packages/usb-modeswitch.scm new file mode 100644 index 0000000000..c43f7c46bd --- /dev/null +++ b/gnu/packages/usb-modeswitch.scm @@ -0,0 +1,133 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright 2019 Florian Pelz +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages usb-modeswitch) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) + #:use-module (gnu packages base) + #:use-module (gnu packages compression) + #:use-module (gnu packages embedded) + #:use-module (gnu packages libusb) + #:use-module (gnu packages pkg-config)) + +(define-public usb-modeswitch-data + (package + (name "usb-modeswitch-data") + (version "20170806") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.draisberghof.de/usb_modeswitch/" + "usb-modeswitch-data-" version ".tar.bz2")) + (sha256 + (base32 + "0b1wari3aza6qjggqd0hk2zsh93k1q8scgmwh6f8wr0flpr3whff")))) + (build-system trivial-build-system) + (native-inputs `(("tar" ,tar) + ("bzip2" ,bzip2))) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((source (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "tar")) + (bzip2 (assoc-ref %build-inputs "bzip2")) + (files (string-append "usb-modeswitch-data-" + ,(package-version this-package))) + (share-dir (string-append %output "/share")) + (udev-dir (string-append %output "/udev"))) + (copy-file source "data.tar.bz2") + (invoke (string-append bzip2 "/bin/bzip2") "-d" "data.tar.bz2") + (invoke (string-append tar "/bin/tar") "xvf" "data.tar") + (copy-recursively (string-append files "/usb_modeswitch.d") + (string-append share-dir "/usb_modeswitch.d")) + (install-file (string-append files "/40-usb_modeswitch.rules") + udev-dir))))) + (home-page "http://www.draisberghof.de/usb_modeswitch/") + (synopsis "Data package for USB_ModeSwitch") + (description "This packages contains data about devices and a UDEV rules +file for use with USB_ModeSwitch.") + (license license:gpl2+))) + +(define-public usb-modeswitch + (package + (name "usb-modeswitch") + (version "2.5.2") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.draisberghof.de/usb_modeswitch/" + "usb-modeswitch-" version ".tar.bz2")) + (sha256 + (base32 + "19ifi80g9ns5dmspchjvfj4ykxssq9yrci8m227dgb3yr04srzxb")) + (modules '((guix build utils))) + (snippet + ;; Remove bundled jimtcl. + '(begin + (delete-file-recursively "jim") + #t)))) + (native-inputs `(("pkg-config" ,pkg-config))) + (inputs `(("libusb" ,libusb) + ("jimtcl" ,jimtcl))) + (propagated-inputs `(("usb-modeswitch-data" ,usb-modeswitch-data))) + (outputs '("out" "dispatcher")) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; does not support `make check` + #:make-flags (list "CC=gcc") + #:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (replace 'install ; calling make would use usr as PREFIX + (lambda* (#:key source outputs inputs #:allow-other-keys) + (let* ((source (assoc-ref inputs "source")) + (jimtcl (assoc-ref inputs "jimtcl")) + (out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (man1 (string-append out "/share/man/man1")) + (dispatcher-out (assoc-ref outputs "dispatcher")) + (etc (string-append dispatcher-out "/etc")) + (dispatcher-bin (string-append dispatcher-out "/bin")) + (dispatcher-man1 (string-append dispatcher-out + "/share/man/man1"))) + (begin + (install-file "usb_modeswitch" bin) + (install-file "usb_modeswitch.conf" etc) + (install-file "usb_modeswitch.1" man1) + (install-file "usb_modeswitch_dispatcher.1" dispatcher-man1) + (rename-file "usb_modeswitch.tcl" "usb_modeswitch_dispatcher") + (substitute* "usb_modeswitch_dispatcher" + (("!/usr/bin/tclsh") + (string-append "!" jimtcl "/bin/jimsh"))) + (install-file "usb_modeswitch_dispatcher" + dispatcher-bin) + #t))))))) + (home-page "http://www.draisberghof.de/usb_modeswitch/") + (synopsis "Mode switching tool for controlling `multi-mode' USB devices") + (description "USB_ModeSwitch is a mode switching tool for controlling USB +devices with multiple @dfn{modes}. When plugged in for the first time many +USB devices (primarily high-speed WAN modems) act like a flash storage +containing installers for Windows drivers. USB_ModeSwitch replays the +sequence the Windows drivers would send to switch their mode from storage to +modem (or whatever the thing is supposed to do).") + (license license:gpl2+))) -- 2.21.0 --3iil4funmjtmakdn-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 24 11:37:12 2019 Received: (at 35640) by debbugs.gnu.org; 24 May 2019 15:37:12 +0000 Received: from localhost ([127.0.0.1]:47075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUCFs-0007zK-3k for submit@debbugs.gnu.org; Fri, 24 May 2019 11:37:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUCFq-0007z4-BA for 35640@debbugs.gnu.org; Fri, 24 May 2019 11:37:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUCFk-0004ju-GF; Fri, 24 May 2019 11:37:04 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36700 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hUCFj-0000sa-Lb; Fri, 24 May 2019 11:37:04 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#35640: Make USB modems just work on Guix References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 5 Prairial an 227 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 24 May 2019 17:37:01 +0200 In-Reply-To: <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Wed, 22 May 2019 18:29:09 +0200") Message-ID: <87ef4nx3s2.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35640 Cc: Danny Milosavljevic , 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, "pelzflorian (Florian Pelz)" skribis: > Tring to put the packages in gnu/packages/libusb.scm and not in their > own file gnu/packages/usb-modeswitch.scm again resulted in > > [ 11%] LOAD guix/scripts/search.scm > [ 11%] LOAD guix/scripts/gc.scm > [ 11%] LOAD guix/scripts/hash.scm > [ 11%] LOAD guix/scripts/pack.scm > Backtrace: > In ice-9/boot-9.scm: > 222:29 19 (map1 (((guix utils)) ((guix store)) ((guix #) # (#)) =E2=80= =A6)) > 222:29 18 (map1 (((guix store)) ((guix status) #:select (#)) (#) =E2= =80=A6)) > 222:29 17 (map1 (((guix status) #:select (#)) ((guix grafts)) # =E2=80= =A6)) > 222:29 16 (map1 (((guix grafts)) ((guix monads)) ((guix #)) (#) =E2=80= =A6)) > 222:29 15 (map1 (((guix monads)) ((guix modules)) ((guix #)) (#) =E2= =80=A6)) > 222:29 14 (map1 (((guix modules)) ((guix packages)) ((guix #)) # =E2= =80=A6)) > 222:29 13 (map1 (((guix packages)) ((guix profiles)) ((guix #)) =E2=80= =A6)) > 222:29 12 (map1 (((guix profiles)) ((guix describe)) ((guix #)) =E2=80= =A6)) > 222:29 11 (map1 (((guix describe)) ((guix derivations)) ((# #)) =E2=80= =A6)) > 222:29 10 (map1 (((guix derivations)) ((guix search-paths)) (#) =E2=80= =A6)) > 222:29 9 (map1 (((guix search-paths)) ((guix build-system #)) # =E2= =80=A6)) > 222:29 8 (map1 (((guix build-system gnu)) ((guix scripts #)) # =E2=80= =A6)) > 222:29 7 (map1 (((guix scripts build)) ((guix self) #:select =E2=80= =A6) =E2=80=A6)) > 222:29 6 (map1 (((guix self) #:select (make-config.scm)) ((=E2=80=A6)= ) =E2=80=A6)) > 222:29 5 (map1 (((gnu packages)) ((gnu packages bootstrap)) (=E2=80= =A6) =E2=80=A6)) > 222:29 4 (map1 (((gnu packages bootstrap)) ((gnu packages =E2=80=A6) = =E2=80=A6) =E2=80=A6)) > 222:17 3 (map1 (((gnu packages compression) #:hide (zip)) ((=E2=80=A6= )) =E2=80=A6)) > 2830:10 2 (resolve-interface (gnu packages compression) #:select _ =E2= =80=A6) > 260:13 1 (for-each # =E2=80=A6) > In unknown file: > 0 (scm-error misc-error #f "~A" ("no binding `zip' to h=E2=80= =A6") =E2=80=A6) > > ERROR: In procedure scm-error: > no binding `zip' to hide in module (gnu packages compression) You cannot use #:hide on (gnu packages =E2=80=A6) modules, for unfortunate = and obscure reasons. The trick would be to hide the other =E2=80=98zip=E2=80= =99 binding, the one from (srfi srfi-1). > As for the packaging, I hope it is correct to still refer to %outputs > in the trivial-build-system for usb-modeswitch-data. Yes. > Should I also make the usb-modeswitch-data package install the license > file of usb-modeswitch-data? > > Or should I use gnu-build-system instead of trivial-build-system? > trivial works now though. In general we should install license files. If =E2=80=98trivial=E2=80=99 w= orks for you, that=E2=80=99s OK; an additional line to install the license would be welco= me, but not blocking. > The file dispatcher.c of usb-modeswitch is licensed bsd-2 and not > gpl2+. Should I list both licenses or just gpl2+? I think it=E2=80=99s enough to mark it as =E2=80=98gpl2+=E2=80=99 because, = IIUC, the combination of all this is GPLv2+. If you think that needs clarification, you can just add a comment about the =E2=80=98license=E2=80=99 field. > I have checked the license of the files of usb-modeswitch-data and > usb-modeswitch by going through each of them with the `less` program > and reading its header while assuming that no license header means the > file has the license described in the README file, by diff=E2=80=99ing the > license files with a license downloaded from gnu.org, and that nothing > looked like a program blob (there only are very small hex strings for > the messages USB_ModeSwitch sends like > > MessageContent=3D"5553424312345678240000008000061200002400000000000000000= 0000000" > > that seem harmless). Is this the usual procedure? Yes. I often just scan a few source file headers, not necessarily all of them, but of course doing an exhaustive search is even better! > Currently I also install the UDEV rule shipped with > usb-modeswitch-data; I hope this is correct. Yep. > Currently I install the usb_modeswitch_dispatcher that is needed by > the udev rule in a separate output called =E2=80=9Cdispatcher=E2=80=9D. = I am unsure > if this usb_modeswitch_dispatcher would need the usb_modeswitch > program from the =E2=80=9Cout=E2=80=9D output. Is it OK when one output = only works > when the =E2=80=9Cout=E2=80=9D output is installed too? I=E2=80=99d say no. :-) In general, we want =E2=80=9Cguix install foo:bar= =E2=80=9D to provide something that Just Works. > What is still missing is adding a service type for usb-modeswitch that > extends the udev service type by the rules file and that calls the > usb-modeswitch dispatcher once every reboot. I can try making one, > but I am not sure if this is the right approach. I am also unsure if > this service should be part of %desktop-services; many modems need it > though and modem-manager-service-type. We=E2=80=99ll see that later. :-) Let me know if you want to send an updated patch if you we should proceed with the one you sent. Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri May 24 16:12:15 2019 Received: (at 35640) by debbugs.gnu.org; 24 May 2019 20:12:15 +0000 Received: from localhost ([127.0.0.1]:47413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUGY2-00034P-OA for submit@debbugs.gnu.org; Fri, 24 May 2019 16:12:15 -0400 Received: from pelzflorian.de ([5.45.111.108]:52798 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUGY0-00034D-Dn for 35640@debbugs.gnu.org; Fri, 24 May 2019 16:12:14 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id E562236003D; Fri, 24 May 2019 22:12:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1558728731; bh=lkZjzwdD+tIX8Or/BJCLN35QduVxwfs+uBjX+40R/2E=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=U/T9ENnn7QQq7vsLliSyWYxQFT4n4xk2Vb2tVoDwGeLrA0NrgXipLREr0Bumifo9V CIbY+SgXxiziUO0bljt/FWgmM2DzUQJNHHby1qg4gUQbfVZnVWIZGrT+MTzPrW8vNG j66a8pSodevcnDakqv+CgRBLem26v9tubhVRJzzU= Date: Fri, 24 May 2019 22:12:10 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87ef4nx3s2.fsf@gnu.org> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: Danny Milosavljevic , 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Thank you for your feedback! On Fri, May 24, 2019 at 05:37:01PM +0200, Ludovic Courtès wrote: > > Tring to put the packages in gnu/packages/libusb.scm and not in their > > own file gnu/packages/usb-modeswitch.scm again resulted in > > > > [ 11%] LOAD guix/scripts/search.scm > > [ 11%] LOAD guix/scripts/gc.scm > > [ 11%] LOAD guix/scripts/hash.scm > > [ 11%] LOAD guix/scripts/pack.scm > > Backtrace: > > In ice-9/boot-9.scm: > > 222:29 19 (map1 (((guix utils)) ((guix store)) ((guix #) # (#)) …)) > > 222:29 18 (map1 (((guix store)) ((guix status) #:select (#)) (#) …)) > > 222:29 17 (map1 (((guix status) #:select (#)) ((guix grafts)) # …)) > > 222:29 16 (map1 (((guix grafts)) ((guix monads)) ((guix #)) (#) …)) > > 222:29 15 (map1 (((guix monads)) ((guix modules)) ((guix #)) (#) …)) > > 222:29 14 (map1 (((guix modules)) ((guix packages)) ((guix #)) # …)) > > 222:29 13 (map1 (((guix packages)) ((guix profiles)) ((guix #)) …)) > > 222:29 12 (map1 (((guix profiles)) ((guix describe)) ((guix #)) …)) > > 222:29 11 (map1 (((guix describe)) ((guix derivations)) ((# #)) …)) > > 222:29 10 (map1 (((guix derivations)) ((guix search-paths)) (#) …)) > > 222:29 9 (map1 (((guix search-paths)) ((guix build-system #)) # …)) > > 222:29 8 (map1 (((guix build-system gnu)) ((guix scripts #)) # …)) > > 222:29 7 (map1 (((guix scripts build)) ((guix self) #:select …) …)) > > 222:29 6 (map1 (((guix self) #:select (make-config.scm)) ((…)) …)) > > 222:29 5 (map1 (((gnu packages)) ((gnu packages bootstrap)) (…) …)) > > 222:29 4 (map1 (((gnu packages bootstrap)) ((gnu packages …) …) …)) > > 222:17 3 (map1 (((gnu packages compression) #:hide (zip)) ((…)) …)) > > 2830:10 2 (resolve-interface (gnu packages compression) #:select _ …) > > 260:13 1 (for-each # …) > > In unknown file: > > 0 (scm-error misc-error #f "~A" ("no binding `zip' to h…") …) > > > > ERROR: In procedure scm-error: > > no binding `zip' to hide in module (gnu packages compression) > > You cannot use #:hide on (gnu packages …) modules, for unfortunate and > obscure reasons. The trick would be to hide the other ‘zip’ binding, > the one from (srfi srfi-1). > I did not #:hide anything. The error is reported when (or after?) a call to “make” loads guix/scripts/pack.scm (which I have not changed) after putting the packages and required modules into libusb.scm instead of usb-modeswitch.scm. > > Should I also make the usb-modeswitch-data package install the license > > file of usb-modeswitch-data? > > > > Or should I use gnu-build-system instead of trivial-build-system? > > trivial works now though. > > In general we should install license files. If ‘trivial’ works for you, > that’s OK; an additional line to install the license would be welcome, > but not blocking. > I add the license file. > > The file dispatcher.c of usb-modeswitch is licensed bsd-2 and not > > gpl2+. Should I list both licenses or just gpl2+? > > I think it’s enough to mark it as ‘gpl2+’ because, IIUC, the combination > of all this is GPLv2+. If you think that needs clarification, you can > just add a comment about the ‘license’ field. > Since nobody is likely to use the USB_ModeSwitch dispatcher.c without USB_ModeSwitch, I tend to leave it at gpl2+. > > Currently I install the usb_modeswitch_dispatcher that is needed by > > the udev rule in a separate output called “dispatcher”. I am unsure > > if this usb_modeswitch_dispatcher would need the usb_modeswitch > > program from the “out” output. Is it OK when one output only works > > when the “out” output is installed too? > > I’d say no. :-) In general, we want “guix install foo:bar” to provide > something that Just Works. > I will try substitute*ing the dispatcher script to use /gnu/store until it just works. > Let me know if you want to send an updated patch if you we should > proceed with the one you sent. > I will send an updated patch tomorrow with a working ”dispatcher“ output. Regards, Florian From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 07:19:02 2019 Received: (at 35640) by debbugs.gnu.org; 25 May 2019 11:19:02 +0000 Received: from localhost ([127.0.0.1]:48271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUUhZ-0007Ks-A2 for submit@debbugs.gnu.org; Sat, 25 May 2019 07:19:01 -0400 Received: from pelzflorian.de ([5.45.111.108]:53608 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUUhW-0007Kj-D2 for 35640@debbugs.gnu.org; Sat, 25 May 2019 07:18:59 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id DFC1836003D; Sat, 25 May 2019 13:18:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1558783137; bh=MsDZ3rOIf8/frVLZ8YcjVQegS4/qc6zWPnVqxxvwYfA=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=0bYJG+b/x5uQG/vdTZBE3jTZFoJ526Wex0xvkaRvEx3t8CYqReK1u4azc9xUfUKaJ nul4Z/uS+jgiXyIPCQX0pWUrhcqjg/8XvOIHlioUNefOXJ145v/2V2VPENsqBD1z+u FIzIOmYTG//d6BvBjnFm93zSZjl5hZdN19CyiRaE= Date: Sat, 25 May 2019 13:18:56 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="tpl3nxaozpmm4qkj" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --tpl3nxaozpmm4qkj Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Fri, May 24, 2019 at 10:12:10PM +0200, pelzflorian (Florian Pelz) wrote: > I will send an updated patch tomorrow with a working ”dispatcher“ > output. > Please find attached a patch that no longer propagates usb-modeswitch-data from usb-modeswitch. I can now modeswitch my USB modem by running $ ./pre-inst-env guix install usb-modeswitch:dispatcher $ lsmod -v #find bus name and device name of modem […] Bus 001 Device 007: ID 12d1:14fe Huawei Technologies Co., Ltd. Modem (Mass Storage Mode) $ for d in /sys/bus/usb/devices/*/; do echo $d; cat $d/busnum; cat $d/devnum; done […] /sys/bus/usb/devices/1-1/ 1 7 […] $ sudo usb_modeswitch_dispatcher --switch-mode 1-1 --config-file ~/.guix-profile/etc/usb_modeswitch.conf I added the --config-file option since by default usb_modeswitch_dispatcher loads its optional config file from /etc and a future Guix service type for USB_ModeSwitch should be able to pass a config file. The udev rules file in usb-modeswitch-data has lines like: ATTR{idVendor}=="03f0", ATTR{idProduct}=="002a", RUN+="usb_modeswitch '/%k'" Maybe I should substitute these by RUN+="/gnu/store/…-usb-modeswich-2.5.2/usb_modeswitch '/%k'" but this would introduce a cyclic dependency between usb-modeswitch and usb-modeswitch-data. Therefore this rules file should rather be fixed in a future USB_ModeSwitch service type. Regards, Florian --tpl3nxaozpmm4qkj Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-gnu-Add-USB_ModeSwitch.patch" Content-Transfer-Encoding: 8bit >From de53b666160d82ffe4d16c77601e742e55d7f435 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Sat, 25 May 2019 13:14:02 +0200 Subject: [PATCH] gnu: Add USB_ModeSwitch. * gnu/packages/usb-modeswitch.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/local.mk | 1 + gnu/packages/usb-modeswitch.scm | 150 ++++++++++++++++++++++++++++++++ 2 files changed, 151 insertions(+) create mode 100644 gnu/packages/usb-modeswitch.scm diff --git a/gnu/local.mk b/gnu/local.mk index cfc16c5ac8..7f834c374f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -466,6 +466,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/uml.scm \ %D%/packages/unrtf.scm \ %D%/packages/upnp.scm \ + %D%/packages/usb-modeswitch.scm \ %D%/packages/uucp.scm \ %D%/packages/valgrind.scm \ %D%/packages/version-control.scm \ diff --git a/gnu/packages/usb-modeswitch.scm b/gnu/packages/usb-modeswitch.scm new file mode 100644 index 0000000000..f77b23d7d9 --- /dev/null +++ b/gnu/packages/usb-modeswitch.scm @@ -0,0 +1,150 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright 2019 Florian Pelz +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages usb-modeswitch) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) + #:use-module (gnu packages base) + #:use-module (gnu packages compression) + #:use-module (gnu packages embedded) + #:use-module (gnu packages libusb) + #:use-module (gnu packages pkg-config)) + +(define-public usb-modeswitch-data + (package + (name "usb-modeswitch-data") + (version "20170806") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.draisberghof.de/usb_modeswitch/" + "usb-modeswitch-data-" version ".tar.bz2")) + (sha256 + (base32 + "0b1wari3aza6qjggqd0hk2zsh93k1q8scgmwh6f8wr0flpr3whff")))) + (build-system trivial-build-system) + (native-inputs `(("tar" ,tar) + ("bzip2" ,bzip2))) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let* ((source (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "tar")) + (bzip2 (assoc-ref %build-inputs "bzip2")) + (files (string-append "usb-modeswitch-data-" + ,(package-version this-package))) + (share-dir (string-append %output "/share")) + (doc-dir (string-append share-dir "/doc/")) + (license-dir (string-append doc-dir + (strip-store-file-name %output))) + (udev-dir (string-append %output "/udev"))) + (copy-file source "data.tar.bz2") + (invoke (string-append bzip2 "/bin/bzip2") "-d" "data.tar.bz2") + (invoke (string-append tar "/bin/tar") "xvf" "data.tar") + (copy-recursively (string-append files "/usb_modeswitch.d") + (string-append share-dir "/usb_modeswitch.d")) + (install-file (string-append files "/40-usb_modeswitch.rules") + udev-dir) + (install-file (string-append files "/COPYING") license-dir))))) + (home-page "http://www.draisberghof.de/usb_modeswitch/") + (synopsis "Data package for USB_ModeSwitch") + (description "This packages contains data about devices and a UDEV rules +file for use with USB_ModeSwitch.") + (license license:gpl2+))) + +(define-public usb-modeswitch + (package + (name "usb-modeswitch") + (version "2.5.2") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.draisberghof.de/usb_modeswitch/" + "usb-modeswitch-" version ".tar.bz2")) + (sha256 + (base32 + "19ifi80g9ns5dmspchjvfj4ykxssq9yrci8m227dgb3yr04srzxb")) + (modules '((guix build utils))) + (snippet + ;; Remove bundled jimtcl. + '(begin + (delete-file-recursively "jim") + #t)))) + (native-inputs `(("pkg-config" ,pkg-config))) + (inputs `(("libusb" ,libusb) + ("jimtcl" ,jimtcl) + ("usb-modeswitch-data" ,usb-modeswitch-data))) + (outputs '("out" "dispatcher")) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; does not support `make check` + #:make-flags (list "CC=gcc") + #:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (replace 'install ; calling make would use usr as PREFIX + (lambda* (#:key source outputs inputs #:allow-other-keys) + (let* ((source (assoc-ref inputs "source")) + (jimtcl (assoc-ref inputs "jimtcl")) + (data (assoc-ref inputs "usb-modeswitch-data")) + (out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (man1 (string-append out "/share/man/man1")) + (dispatcher-out (assoc-ref outputs "dispatcher")) + (etc (string-append dispatcher-out "/etc")) + (dispatcher-bin (string-append dispatcher-out "/bin")) + (dispatcher-man1 (string-append dispatcher-out + "/share/man/man1"))) + (begin + (install-file "usb_modeswitch" bin) + (install-file "usb_modeswitch.conf" etc) + (install-file "usb_modeswitch.1" man1) + (install-file "usb_modeswitch_dispatcher.1" dispatcher-man1) + (rename-file "usb_modeswitch.tcl" "usb_modeswitch_dispatcher") + (substitute* "usb_modeswitch_dispatcher" + (("!/usr/bin/tclsh") + (string-append "!" jimtcl "/bin/jimsh")) + (("/usr/sbin") bin) + (("/usr/share/usb_modeswitch") + (string-append data "/share/usb_modeswitch.d")) + (("\\[ParseGlobalConfig\\]") ;use config in command line + "[ParseGlobalConfig $argv]") + (("proc \\{ParseGlobalConfig\\} \\{\\}") + "proc {ParseGlobalConfig} {argv}") + (("set configFile \\\"\\\"") + " +if {[lindex $argv 2] == \"--config-file\"} { + set configFile [lindex $argv 3] +}")) + (install-file "usb_modeswitch_dispatcher" + dispatcher-bin) + #t))))))) + (home-page "http://www.draisberghof.de/usb_modeswitch/") + (synopsis "Mode switching tool for controlling `multi-mode' USB devices") + (description "USB_ModeSwitch is a mode switching tool for controlling USB +devices with multiple @dfn{modes}. When plugged in for the first time many +USB devices (primarily high-speed WAN modems) act like a flash storage +containing installers for Windows drivers. USB_ModeSwitch replays the +sequence the Windows drivers would send to switch their mode from storage to +modem (or whatever the thing is supposed to do).") + (license license:gpl2+))) -- 2.21.0 --tpl3nxaozpmm4qkj-- From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 08:44:04 2019 Received: (at 35640) by debbugs.gnu.org; 25 May 2019 12:44:04 +0000 Received: from localhost ([127.0.0.1]:48357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUW1q-00037m-Fz for submit@debbugs.gnu.org; Sat, 25 May 2019 08:44:04 -0400 Received: from pelzflorian.de ([5.45.111.108]:53714 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUW1o-00037D-2W for 35640@debbugs.gnu.org; Sat, 25 May 2019 08:44:00 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id B136C36003D; Sat, 25 May 2019 14:43:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1558788238; bh=hFXEiOUk4aUTXslamov4HXPIg8gAZvT5UBGv+OX38Cc=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=pCO9cpUFOff3DmB34MHWoE9S4DxEPdCO/OcKUvkhUPZQKbupSXz7Pd08/Cd8OLVTP 3E0Zfv0+OHUjwYmQLJXuqIMsqMtY105fxD3tlHnqNG+Tw+MekPpH07pgviIi/G+/us Daks1v2LrUSZJkLUWwLdTF46A/dri9mm+Eiy7Z/Q= Date: Sat, 25 May 2019 14:43:58 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190525124358.bezpp7y4rqtuigs4@pelzflorian.localdomain> References: <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, May 25, 2019 at 01:18:56PM +0200, pelzflorian (Florian Pelz) wrote: > I added the --config-file option since by default > usb_modeswitch_dispatcher loads its optional config file from /etc and > a future Guix service type for USB_ModeSwitch should be able to pass a > config file. > […] > + (substitute* "usb_modeswitch_dispatcher" > + (("!/usr/bin/tclsh") > + (string-append "!" jimtcl "/bin/jimsh")) > + (("/usr/sbin") bin) > + (("/usr/share/usb_modeswitch") > + (string-append data "/share/usb_modeswitch.d")) > + (("\\[ParseGlobalConfig\\]") ;use config in command line > + "[ParseGlobalConfig $argv]") > + (("proc \\{ParseGlobalConfig\\} \\{\\}") > + "proc {ParseGlobalConfig} {argv}") > + (("set configFile \\\"\\\"") > + " > +if {[lindex $argv 2] == \"--config-file\"} { > + set configFile [lindex $argv 3] > +}")) Or should I rather use a patch file instead of substitute*? From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 13:44:49 2019 Received: (at 35640) by debbugs.gnu.org; 25 May 2019 17:44:49 +0000 Received: from localhost ([127.0.0.1]:49572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUait-0005Y5-GP for submit@debbugs.gnu.org; Sat, 25 May 2019 13:44:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUair-0005Xj-KL for 35640@debbugs.gnu.org; Sat, 25 May 2019 13:44:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUaim-0007h6-5a; Sat, 25 May 2019 13:44:40 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=37954 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hUail-0007F4-KB; Sat, 25 May 2019 13:44:39 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#35640: Make USB modems just work on Guix References: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 6 Prairial an 227 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 25 May 2019 19:44:37 +0200 In-Reply-To: <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Sat, 25 May 2019 13:18:56 +0200") Message-ID: <87lfyupgxm.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, "pelzflorian (Florian Pelz)" skribis: > Please find attached a patch that no longer propagates > usb-modeswitch-data from usb-modeswitch. I can now modeswitch my USB > modem by running Yay! > The udev rules file in usb-modeswitch-data has lines like: > > ATTR{idVendor}=3D=3D"03f0", ATTR{idProduct}=3D=3D"002a", RUN+=3D"usb_mode= switch '/%k'" > > Maybe I should substitute these by > > RUN+=3D"/gnu/store/=E2=80=A6-usb-modeswich-2.5.2/usb_modeswitch '/%k'" > > but this would introduce a cyclic dependency between usb-modeswitch > and usb-modeswitch-data. Therefore this rules file should rather be > fixed in a future USB_ModeSwitch service type. Sounds good. Another option would be to install the udev rule as part of the =E2=80=98usb-modeswitch=E2=80=99 package, which makes more sense and= would solve the problem. But anyway, don=E2=80=99t lose your hair over it. >> + (substitute* "usb_modeswitch_dispatcher" >> + (("!/usr/bin/tclsh") >> + (string-append "!" jimtcl "/bin/jimsh")) I don=E2=80=99t think it=E2=80=99s needed, is it? >> + (("/usr/sbin") bin) >> + (("/usr/share/usb_modeswitch") >> + (string-append data "/share/usb_modeswitch.d")) >> + (("\\[ParseGlobalConfig\\]") ;use config in command = line >> + "[ParseGlobalConfig $argv]") >> + (("proc \\{ParseGlobalConfig\\} \\{\\}") >> + "proc {ParseGlobalConfig} {argv}") >> + (("set configFile \\\"\\\"") >> + " >> +if {[lindex $argv 2] =3D=3D \"--config-file\"} { >> + set configFile [lindex $argv 3] >> +}")) > > > Or should I rather use a patch file instead of substitute*? I think it=E2=80=99s OK like this. It does mean Guix=E2=80=99s =E2=80=98usb_modeswitch_dispatcher=E2=80=99 has an option that upstream doe= sn=E2=80=99t provide. It would be worth proposing it upstream. Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 15:42:22 2019 Received: (at 35640) by debbugs.gnu.org; 25 May 2019 19:42:22 +0000 Received: from localhost ([127.0.0.1]:49688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUcYg-0000QU-A4 for submit@debbugs.gnu.org; Sat, 25 May 2019 15:42:22 -0400 Received: from pelzflorian.de ([5.45.111.108]:54194 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUcYb-0000QH-2c for 35640@debbugs.gnu.org; Sat, 25 May 2019 15:42:18 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id C11C636003D; Sat, 25 May 2019 21:42:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1558813335; bh=TySPJ5+hUHiDAziZS6bLf9lijoKu5jOQgt36yHHmKiM=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=nX1MWPTnfyNzEpoSQZeQPTJm1ErrIamPwUaXYK7w3uP/9Nw+QYExeYL+k/LD9/S9z LlP2Afmn9Bom7Ct5ficI5QodCYLv6Sp8HsI7avkCCEnAvDmnpURRv6Iynegaq4loab 7Z+D766UusBilm3kgq6rKfCpD0Vws3JwLEXN6XRY= Date: Sat, 25 May 2019 21:42:15 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190525194215.egiyrax3f3k7nojp@pelzflorian.localdomain> References: <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> <87lfyupgxm.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87lfyupgxm.fsf@gnu.org> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, May 25, 2019 at 07:44:37PM +0200, Ludovic Courtès wrote: > "pelzflorian (Florian Pelz)" skribis: > > The udev rules file in usb-modeswitch-data has lines like: > > > > ATTR{idVendor}=="03f0", ATTR{idProduct}=="002a", RUN+="usb_modeswitch '/%k'" > > > > Maybe I should substitute these by > > > > RUN+="/gnu/store/…-usb-modeswich-2.5.2/usb_modeswitch '/%k'" > > > > but this would introduce a cyclic dependency between usb-modeswitch > > and usb-modeswitch-data. Therefore this rules file should rather be > > fixed in a future USB_ModeSwitch service type. > > Sounds good. Another option would be to install the udev rule as part > of the ‘usb-modeswitch’ package, which makes more sense and would solve > the problem. But anyway, don’t lose your hair over it. > The udev rules file is shipped with usb-modeswitch-data, so I need to install it from usb-modeswitch-data. > >> + (substitute* "usb_modeswitch_dispatcher" > >> + (("!/usr/bin/tclsh") > >> + (string-append "!" jimtcl "/bin/jimsh")) > > I don’t think it’s needed, is it? > Frankly, I am not actually sure if usb_modeswitch_dispatcher is really needed for the USB_ModeSwitch service type. In much earlier (2010) versions of USB_ModeSwitch () the UDEV rules file referred to usb_modeswitch_dispatcher. It does not do so anymore, instead it apparently uses usb_modeswitch directly. I will ask in the USB_ModeSwitch forums tomorrow if the dispatcher is needed. I will also ask about an option for specifying the config file. usb_modeswitch has one, usb_modeswitch_dispatcher does not have the option. Regards, Florian From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 12 06:36:58 2019 Received: (at 35640) by debbugs.gnu.org; 12 Jun 2019 10:36:58 +0000 Received: from localhost ([127.0.0.1]:60763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hb0cd-0006cG-7f for submit@debbugs.gnu.org; Wed, 12 Jun 2019 06:36:58 -0400 Received: from pelzflorian.de ([5.45.111.108]:48208 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hb0ca-0006c4-Mz for 35640@debbugs.gnu.org; Wed, 12 Jun 2019 06:36:50 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 42057360035; Wed, 12 Jun 2019 12:36:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1560335807; bh=CMNgA2njNHDxInEJ/xJBckbMvSHYL8iK1JWNsd7pH8A=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=dZrONOafCF4IswEjGXLyil4K3Qhq2tmcf3TTf1xgLF5FuP1AymXimF2GDwBCY7uwp mRv90Z+mkyIU41fRo31iUWEnMV2DbIoH1AKxK13pIsxPAyxcEwSHKCzH6cQkrE4nmb fihw1F0ngbd02xtOWUC5khLyAIk4s2kNr7bzuAgI= Date: Wed, 12 Jun 2019 12:36:47 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190612103646.yem2wtmw6w2vw7an@pelzflorian.localdomain> References: <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> <87lfyupgxm.fsf@gnu.org> <20190525194215.egiyrax3f3k7nojp@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="7k5uzagutszup5w4" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190525194215.egiyrax3f3k7nojp@pelzflorian.localdomain> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --7k5uzagutszup5w4 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Find attached patches that make USB modems just work, fixing this bug. I have confirmed that at least on x86_64-linux (service usb-modeswitch-service-type) works with the default config and that (service usb-modeswitch-service-type (usb-modeswitch-configuration (config-file #f))) works, passing no config file, leading to different defaults. Manual use as described in a comment of the usb-modeswitch package works as well. I hope using putenv before wrap-program is OK. I tried using computed-file #:options instead, but could not get it to work. I am uncertain if having paragraphs like this in modem-manager-service-type and usb-modeswitch-service-type is a good idea: This service is part of ‘%desktop-services’ (*note Desktop Services::). On Sat, May 25, 2019 at 09:42:15PM +0200, pelzflorian (Florian Pelz) wrote: > Frankly, I am not actually sure if usb_modeswitch_dispatcher is really > needed for the USB_ModeSwitch service type. I am sure, it is needed. > In much earlier (2010) > versions of USB_ModeSwitch > () > the UDEV rules file referred to usb_modeswitch_dispatcher. It does > not do so anymore, instead it apparently uses usb_modeswitch directly. > There are two different executable files called usb_modeswitch. The one used by the UDEV rule runs the dispatcher. > I will ask in the USB_ModeSwitch forums tomorrow if the dispatcher is > needed. I will also ask about an option for specifying the config > file. usb_modeswitch has one, usb_modeswitch_dispatcher does not have > the option. > I have not asked. I will propose the patch after this is commited at Guix. Regards, Florian --7k5uzagutszup5w4 Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-gnu-Add-USB_ModeSwitch.patch" Content-Transfer-Encoding: 8bit >From 7af598d980a43d426c4341b1c581add06fd6ae72 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Wed, 12 Jun 2019 10:24:05 +0200 Subject: [PATCH 1/3] gnu: Add USB_ModeSwitch. * gnu/packages/usb-modeswitch.scm: New file. * gnu/packages/patches/usb-modeswitch-accept-config-arg.patch: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add package. (dist_patch_DATA): Add patch. --- gnu/local.mk | 2 + .../usb-modeswitch-accept-config-arg.patch | 42 +++++ gnu/packages/usb-modeswitch.scm | 166 ++++++++++++++++++ 3 files changed, 210 insertions(+) create mode 100644 gnu/packages/patches/usb-modeswitch-accept-config-arg.patch create mode 100644 gnu/packages/usb-modeswitch.scm diff --git a/gnu/local.mk b/gnu/local.mk index 907641ff3e..7a90b279f6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -468,6 +468,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/uml.scm \ %D%/packages/unrtf.scm \ %D%/packages/upnp.scm \ + %D%/packages/usb-modeswitch.scm \ %D%/packages/uucp.scm \ %D%/packages/valgrind.scm \ %D%/packages/version-control.scm \ @@ -1332,6 +1333,7 @@ dist_patch_DATA = \ %D%/packages/patches/util-linux-tests.patch \ %D%/packages/patches/upower-builddir.patch \ %D%/packages/patches/upx-fix-CVE-2017-15056.patch \ + %D%/packages/patches/usb-modeswitch-accept-config-arg.patch \ %D%/packages/patches/valgrind-enable-arm.patch \ %D%/packages/patches/vboot-utils-fix-format-load-address.patch \ %D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \ diff --git a/gnu/packages/patches/usb-modeswitch-accept-config-arg.patch b/gnu/packages/patches/usb-modeswitch-accept-config-arg.patch new file mode 100644 index 0000000000..9c050f7ee6 --- /dev/null +++ b/gnu/packages/patches/usb-modeswitch-accept-config-arg.patch @@ -0,0 +1,42 @@ +--- old/usb_modeswitch.tcl 1970-01-01 01:00:00.000000000 +0100 ++++ usb_modeswitch.tcl 2019-06-12 08:39:42.140000000 +0200 +@@ -41,7 +41,7 @@ + global scsi usb config match device flags setup devdir loginit + + set flags(config) "" +-Log "[ParseGlobalConfig]" ++Log "[ParseGlobalConfig $argv]" + + if {$flags(stordelay) > 0} { + SetStorageDelay $flags(stordelay) +@@ -496,9 +496,21 @@ + # end of proc {MatchDevice} + + +-proc {ParseGlobalConfig} {} { ++proc {ParseGlobalConfig} {argv} { + + global flags ++ ++set configFileParam "" ++for {set i 0} {$i < [llength $argv]} {incr i} { ++ switch -glob -- [set v [lindex $argv $i]] { ++ --config-file=* { ++ set configFileParam $v ++ } ++ } ++} ++if {$configFileParam != ""} { ++ set configFile [string range $configFileParam [string length "--config-file="] end] ++} else { + set configFile "" + set places [list /etc/usb_modeswitch.conf /etc/sysconfig/usb_modeswitch /etc/default/usb_modeswitch] + foreach cfg $places { +@@ -507,6 +519,7 @@ + break + } + } ++} + if {$configFile == ""} {return} + + set rc [open $configFile r] diff --git a/gnu/packages/usb-modeswitch.scm b/gnu/packages/usb-modeswitch.scm new file mode 100644 index 0000000000..533b6988ed --- /dev/null +++ b/gnu/packages/usb-modeswitch.scm @@ -0,0 +1,166 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright ? 2019 Florian Pelz +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages usb-modeswitch) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) + #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages compression) + #:use-module (gnu packages embedded) + #:use-module (gnu packages libusb) + #:use-module (gnu packages pkg-config)) + +(define-public usb-modeswitch-data + (package + (name "usb-modeswitch-data") + (version "20170806") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.draisberghof.de/usb_modeswitch/" + "usb-modeswitch-data-" version ".tar.bz2")) + (sha256 + (base32 + "0b1wari3aza6qjggqd0hk2zsh93k1q8scgmwh6f8wr0flpr3whff")))) + (build-system trivial-build-system) + (native-inputs `(("tar" ,tar) + ("bzip2" ,bzip2))) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let* ((source (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "tar")) + (bzip2 (assoc-ref %build-inputs "bzip2")) + (files (string-append "usb-modeswitch-data-" + ,(package-version this-package))) + (share-dir (string-append %output "/share")) + (doc-dir (string-append share-dir "/doc/")) + (license-dir (string-append doc-dir + (strip-store-file-name %output))) + (udev-dir (string-append %output "/udev"))) + (copy-file source "data.tar.bz2") + (invoke (string-append bzip2 "/bin/bzip2") "-d" "data.tar.bz2") + (invoke (string-append tar "/bin/tar") "xvf" "data.tar") + (copy-recursively (string-append files "/usb_modeswitch.d") + (string-append share-dir "/usb_modeswitch.d")) + (install-file (string-append files "/40-usb_modeswitch.rules") + udev-dir) + (install-file (string-append files "/COPYING") license-dir))))) + (home-page "http://www.draisberghof.de/usb_modeswitch/") + (synopsis "Data package for USB_ModeSwitch") + (description "This packages contains data about devices and a UDEV rules +file for use with USB_ModeSwitch.") + (license license:gpl2+))) + +(define-public usb-modeswitch + (package + (name "usb-modeswitch") + (version "2.5.2") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.draisberghof.de/usb_modeswitch/" + "usb-modeswitch-" version ".tar.bz2")) + (sha256 + (base32 + "19ifi80g9ns5dmspchjvfj4ykxssq9yrci8m227dgb3yr04srzxb")) + (modules '((guix build utils))) + (snippet + ;; Remove bundled jimtcl. + '(begin + (delete-file-recursively "jim") + #t)) + (patches + (search-patches "usb-modeswitch-accept-config-arg.patch")))) + (native-inputs `(("pkg-config" ,pkg-config))) + (inputs `(("libusb" ,libusb) + ("jimtcl" ,jimtcl) + ("usb-modeswitch-data" ,usb-modeswitch-data))) + (outputs '("out" "dispatcher")) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; does not support `make check` + #:make-flags (list "CC=gcc") + #:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (replace 'install + (lambda* (#:key source outputs inputs #:allow-other-keys) + (let* ((source (assoc-ref inputs "source")) + (jimtcl (assoc-ref inputs "jimtcl")) + (data (assoc-ref inputs "usb-modeswitch-data")) + (out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (man1 (string-append out "/share/man/man1")) + (dispatcher-out (assoc-ref outputs "dispatcher")) + (udev (string-append dispatcher-out "/lib/udev")) + (etc (string-append dispatcher-out "/etc")) + (dispatcher-bin (string-append dispatcher-out "/bin")) + (dispatcher-man1 (string-append dispatcher-out + "/share/man/man1"))) + (begin + ;; Users can install the default output and + ;; usb-modeswitch-data and then modeswitch their USB device + ;; by running e.g.: + ;; + ;; sudo usb_modeswitch -c \ + ;; ~/.guix-profile/share/usb_modeswitch.d/12d1\:14fe \ + ;; -v 0x12d1 -p 0x14fe + ;; + ;; But it is simpler to use the usb-modeswitch-service-type + ;; that installs a UDEV rules file which invokes a shell + ;; script in lib/udev (also called `usb_modeswitch' like the + ;; main binary) which, in turn, invokes the program + ;; `usb_modeswitch_dispatcher'. Normal users should not + ;; invoke this dispatcher directly, so it is a separate output. + (install-file "usb_modeswitch" bin) + (install-file "usb_modeswitch.conf" etc) + (install-file "usb_modeswitch.1" man1) + (install-file "usb_modeswitch_dispatcher.1" dispatcher-man1) + + (substitute* "usb_modeswitch.sh" + (("PATH=") "PATH=$PATH:") ; we do not want hardcoded FHS path + (("init_path=") "init_path=/does/not/exist")) ; no /sbin/init + (rename-file "usb_modeswitch.sh" "usb_modeswitch") + (install-file "usb_modeswitch" udev) + + (rename-file "usb_modeswitch.tcl" "usb_modeswitch_dispatcher") + (substitute* "usb_modeswitch_dispatcher" + (("!/usr/bin/tclsh") + (string-append "!" jimtcl "/bin/jimsh")) + (("/usr/sbin") bin) + (("/usr/share/usb_modeswitch") + (string-append data "/share/usb_modeswitch.d"))) + (install-file "usb_modeswitch_dispatcher" + dispatcher-bin) + #t))))))) + (home-page "http://www.draisberghof.de/usb_modeswitch/") + (synopsis "Mode switching tool for controlling `multi-mode' USB devices") + (description "USB_ModeSwitch is a mode switching tool for controlling USB +devices with multiple @dfn{modes}. When plugged in for the first time many +USB devices (primarily high-speed WAN modems) act like a flash storage +containing installers for Windows drivers. USB_ModeSwitch replays the +sequence the Windows drivers would send to switch their mode from storage to +modem (or whatever the thing is supposed to do).") + (license license:gpl2+))) -- 2.21.0 --7k5uzagutszup5w4 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0002-Add-usb-modeswitch-service-type.patch" Content-Transfer-Encoding: 8bit >From db6e3a937f89811017abf06c7dffc494b71b9127 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Tue, 11 Jun 2019 16:56:46 +0200 Subject: [PATCH 2/3] Add usb-modeswitch-service-type. * gnu/services/networking.scm (usb-modeswitch-service-type): New variable. (usb-modeswitch-configuration): New variable. (usb-modeswitch-configuration->udev-rules): New procedure. * doc/guix.texi (Networking Services): Document it. --- doc/guix.texi | 35 +++++++++++++ gnu/services/networking.scm | 99 +++++++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index bd0f3e8fd5..28e752a335 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12655,6 +12655,41 @@ The ModemManager package to use. @end table @end deftp +@cindex USB_ModeSwitch +@cindex Modeswitching + +@defvr {Scheme Variable} usb-modeswitch-service-type +This is the service type for the +@uref{http://www.draisberghof.de/usb_modeswitch/, USB_ModeSwitch} service. The +value for this service type is a @code{usb-modeswitch-configuration} record. + +When plugged in, some USB modems (and other USB devices) initially present +themselves as a read-only storage medium and not as a modem. They need to be +@dfn{modeswitched} before they are usable. The USB_ModeSwitch service type +installs UDEV rules to automatically modeswitch these devices when they are +plugged in. +@end defvr + +@deftp {Data Type} usb-modeswitch-configuration +Data type representing the configuration of USB_ModeSwitch. + +@table @asis +@item @code{usb-modeswitch} (default: @code{usb-modeswitch}) +The USB_ModeSwitch package providing the binaries for modeswitching. + +@item @code{usb-modeswitch-data} (default: @code{usb-modeswitch-data}) +The package providing the device data and UDEV rules file used by +USB_ModeSwitch. + +@item @code{config-file} (default: @code{#~(string-append #$usb-modeswitch:dispatcher "/etc/usb_modeswitch.conf")}) +Which config file to use for the USB_ModeSwitch dispatcher. By default the +config file shipped with USB_ModeSwitch is used which disables logging to +@file{/var/log} among other default settings. If set to @code{#f}, no config +file is used. + +@end table +@end deftp + @cindex NetworkManager @defvr {Scheme Variable} network-manager-service-type diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 082a85f63d..fda589ab28 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -9,6 +9,7 @@ ;;; Copyright 2018 Tobias Geerinckx-Rice ;;; Copyright 2018 Chris Marusich ;;; Copyright 2018 Arun Isaac +;;; Copyright 2019 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,10 +34,13 @@ #:use-module (gnu system shadow) #:use-module (gnu system pam) #:use-module (gnu packages admin) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages connman) #:use-module (gnu packages freedesktop) #:use-module (gnu packages linux) #:use-module (gnu packages tor) + #:use-module (gnu packages usb-modeswitch) #:use-module (gnu packages messaging) #:use-module (gnu packages networking) #:use-module (gnu packages ntp) @@ -104,6 +108,12 @@ modem-manager-configuration? modem-manager-service-type + usb-modeswitch-configuration + usb-modeswitch-configuration? + usb-modeswitch-configuration-usb-modeswitch + usb-modeswitch-configuration-usb-modeswitch-data + usb-modeswitch-service-type + wpa-supplicant-configuration wpa-supplicant-configuration? @@ -1042,6 +1052,95 @@ ModemManager}, a modem management daemon that aims to simplify dialup networking.")))) +;;; +;;; USB_ModeSwitch +;;; + +(define-record-type* + usb-modeswitch-configuration make-usb-modeswitch-configuration + usb-modeswitch-configuration? + (usb-modeswitch usb-modeswitch-configuration-usb-modeswitch + (default usb-modeswitch)) + (usb-modeswitch-data usb-modeswitch-configuration-usb-modeswitch-data + (default usb-modeswitch-data)) + (config-file usb-modeswitch-configuration-config-file + (default #~(string-append #$usb-modeswitch:dispatcher + "/etc/usb_modeswitch.conf")))) + +(define (usb-modeswitch-configuration->udev-rules config) + "Build a rules file for extending udev-service-type from the rules in the +usb-modeswitch package. The rules file will invoke usb_modeswitch.sh from the +usb-modeswitch package, modified to pass the right config file." + (define usb-modeswitch-sh + (match-lambda + (($ usb-modeswitch data config-file) + (let ((orig #~(string-append #$usb-modeswitch:dispatcher + "/lib/udev/usb_modeswitch"))) + (computed-file + "usb_modeswitch-sh" + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (let ((cfg-param + (case #$config-file + ((#f) "") + (else + (string-append " --config-file=" #$config-file))))) + (mkdir #$output) + (install-file #$orig #$output) + (substitute* (string-append #$output "/usb_modeswitch") + (("(exec usb_modeswitch_dispatcher .*)( 2>>)" _ left right) + (string-append left cfg-param right)) + (("(exec usb_modeswitch_dispatcher .*)( &)" _ left right) + (string-append left cfg-param right))) + + ;; wrap-program needs bash in PATH: + (putenv (string-append "PATH=" #$bash "/bin")) + (wrap-program (string-append #$output "/usb_modeswitch") + `("PATH" ":" = (,(string-append #$coreutils "/bin") + ,(string-append + #$usb-modeswitch:dispatcher + "/bin")))))))))))) + (match config + (($ usb-modeswitch data config-file) + (computed-file + "usb_modeswitch.rules" + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (let ((in (string-append #$data "/udev/40-usb_modeswitch.rules")) + (out (string-append #$output "/lib/udev/rules.d"))) + (mkdir-p out) + (chdir out) + (install-file in out) + (substitute* "40-usb_modeswitch.rules" + (("PROGRAM=\"usb_modeswitch") + (string-append "PROGRAM=\"" #$(usb-modeswitch-sh config) + "/usb_modeswitch")) + (("RUN\\+=\"usb_modeswitch") + (string-append "RUN+=\"" #$(usb-modeswitch-sh config) + "/usb_modeswitch")))))))))) + +(define usb-modeswitch-service-type + (service-type + (name 'usb-modeswitch) + (extensions + (list + (service-extension + udev-service-type + (lambda (config) + (let ((rules (usb-modeswitch-configuration->udev-rules config))) + (list rules)))))) + (default-value (usb-modeswitch-configuration)) + (description "Run @uref{http://www.draisberghof.de/usb_modeswitch/, +USB_ModeSwitch}, a mode switching tool for controlling USB devices with +multiple @dfn{modes}. When plugged in for the first time many USB +devices (primarily high-speed WAN modems) act like a flash storage containing +installers for Windows drivers. USB_ModeSwitch replays the sequence the +Windows drivers would send to switch their mode from storage to modem (or +whatever the thing is supposed to do)."))) + + ;;; ;;; WPA supplicant ;;; -- 2.21.0 --7k5uzagutszup5w4 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0003-services-Include-USB_ModeSwitch-in-desktop-services.patch" >From dc50f979f77d9298e8c81e6943076c612e5f459a Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Wed, 12 Jun 2019 11:16:57 +0200 Subject: [PATCH 3/3] services: Include USB_ModeSwitch in %desktop-services. Fixes . * gnu/services/desktop.scm (%desktop-services): Add usb-modeswitch-service-type. * doc/guix.texi (Networking Services): Document it. --- doc/guix.texi | 3 +++ gnu/services/desktop.scm | 1 + 2 files changed, 4 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 28e752a335..5c36abeb71 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12668,6 +12668,9 @@ themselves as a read-only storage medium and not as a modem. They need to be @dfn{modeswitched} before they are usable. The USB_ModeSwitch service type installs UDEV rules to automatically modeswitch these devices when they are plugged in. + +This service is part of @code{%desktop-services} (@pxref{Desktop +Services}). @end defvr @deftp {Data Type} usb-modeswitch-configuration diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 652f7b1b02..343d507c14 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1067,6 +1067,7 @@ dispatches events from it."))) profile-service-type (list network-manager-applet)) (service modem-manager-service-type) + (service usb-modeswitch-service-type) ;; The D-Bus clique. (service avahi-service-type) -- 2.21.0 --7k5uzagutszup5w4-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 12 06:41:17 2019 Received: (at 35640) by debbugs.gnu.org; 12 Jun 2019 10:41:17 +0000 Received: from localhost ([127.0.0.1]:60767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hb0gv-0006nB-Gn for submit@debbugs.gnu.org; Wed, 12 Jun 2019 06:41:17 -0400 Received: from pelzflorian.de ([5.45.111.108]:48224 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hb0gt-0006n0-F0 for 35640@debbugs.gnu.org; Wed, 12 Jun 2019 06:41:15 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 7DBB8360035; Wed, 12 Jun 2019 12:41:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1560336074; bh=agj7lqG+IyoABStJsQ05O297kAcEqiwsiG0xr6dbym0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Pzibybn4vF1Z8+D5PbR6uB2VR1CHlAySwfQZG+k4io97hoKZBd31UpXNBqP918pca 0m0hhpoa3XfKmw31jOPqFQoQh6FcfUK6tFO1CCMV1q8z1r6pVO7lLowSMwEcs8PD0h i8c3X44LsxjaqKq94jZZhWh30HE08lksy4JDgFHM= Date: Wed, 12 Jun 2019 12:41:14 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190612104114.aye2qfnla7bjatqm@pelzflorian.localdomain> References: <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> <87lfyupgxm.fsf@gnu.org> <20190525194215.egiyrax3f3k7nojp@pelzflorian.localdomain> <20190612103646.yem2wtmw6w2vw7an@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190612103646.yem2wtmw6w2vw7an@pelzflorian.localdomain> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, Jun 12, 2019 at 12:36:47PM +0200, pelzflorian (Florian Pelz) wrote: > Find attached patches that make USB modems just work, fixing this bug. > I forgot to ask: The USB_ModeSwitch website says: If you are a system integrator (package maintainer) you can use this XML file to check for new releases: usb-modeswitch-versions.xml . Is it possible to add a hash of this URL to the usb-modeswitch and usb-modeswitch-data packages so that guix refresh notifies us of new releases? From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 12 08:13:21 2019 Received: (at 35640) by debbugs.gnu.org; 12 Jun 2019 12:13:21 +0000 Received: from localhost ([127.0.0.1]:60817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hb280-0003Pt-F6 for submit@debbugs.gnu.org; Wed, 12 Jun 2019 08:13:21 -0400 Received: from pelzflorian.de ([5.45.111.108]:48328 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hb27x-0003Pi-O1 for 35640@debbugs.gnu.org; Wed, 12 Jun 2019 08:13:19 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 92A99360035; Wed, 12 Jun 2019 14:13:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1560341596; bh=vsN+62H8y648X6fYQIK3dw//uaRJ8GQN2DCw/kuJmHY=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=IRZuQWnbnrMsFn3PK6C8IzT8GjVXGtSvABB2voMsg2YemEGfonnH5My0VmruSqezc mKtz0CArkuyFkZ5vNt4OLh7T+kQjD5kMUDiqKQxO5InMi+5DE6gyxN37Xvae3byvxC 6b5isvwu69325DoXAhrIMlVBAU0S7WE9PxYXfYm0= Date: Wed, 12 Jun 2019 14:13:12 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190612121312.hobngtkentkiavai@pelzflorian.localdomain> References: <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> <87lfyupgxm.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="tr6hzybahymuoecq" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87lfyupgxm.fsf@gnu.org> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --tr6hzybahymuoecq Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sat, May 25, 2019 at 07:44:37PM +0200, Ludovic Courtès wrote: > >> + (substitute* "usb_modeswitch_dispatcher" > >> + (("!/usr/bin/tclsh") > >> + (string-append "!" jimtcl "/bin/jimsh")) > > I don’t think it’s needed, is it? > I see now, you mean the exclamation mark? It is not needed. Sorry. Attached is the same patch without exclamation mark. Regards, Florian --tr6hzybahymuoecq Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-gnu-Add-USB_ModeSwitch.patch" Content-Transfer-Encoding: 8bit >From 2a790dacdb818387325f7a2a895adde6bacabf8b Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Wed, 12 Jun 2019 14:05:44 +0200 Subject: [PATCH 1/3] gnu: Add USB_ModeSwitch. * gnu/packages/usb-modeswitch.scm: New file. * gnu/packages/patches/usb-modeswitch-accept-config-arg.patch: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add package. (dist_patch_DATA): Add patch. --- gnu/local.mk | 2 + .../usb-modeswitch-accept-config-arg.patch | 42 +++++ gnu/packages/usb-modeswitch.scm | 166 ++++++++++++++++++ 3 files changed, 210 insertions(+) create mode 100644 gnu/packages/patches/usb-modeswitch-accept-config-arg.patch create mode 100644 gnu/packages/usb-modeswitch.scm diff --git a/gnu/local.mk b/gnu/local.mk index 907641ff3e..7a90b279f6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -468,6 +468,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/uml.scm \ %D%/packages/unrtf.scm \ %D%/packages/upnp.scm \ + %D%/packages/usb-modeswitch.scm \ %D%/packages/uucp.scm \ %D%/packages/valgrind.scm \ %D%/packages/version-control.scm \ @@ -1332,6 +1333,7 @@ dist_patch_DATA = \ %D%/packages/patches/util-linux-tests.patch \ %D%/packages/patches/upower-builddir.patch \ %D%/packages/patches/upx-fix-CVE-2017-15056.patch \ + %D%/packages/patches/usb-modeswitch-accept-config-arg.patch \ %D%/packages/patches/valgrind-enable-arm.patch \ %D%/packages/patches/vboot-utils-fix-format-load-address.patch \ %D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \ diff --git a/gnu/packages/patches/usb-modeswitch-accept-config-arg.patch b/gnu/packages/patches/usb-modeswitch-accept-config-arg.patch new file mode 100644 index 0000000000..9c050f7ee6 --- /dev/null +++ b/gnu/packages/patches/usb-modeswitch-accept-config-arg.patch @@ -0,0 +1,42 @@ +--- old/usb_modeswitch.tcl 1970-01-01 01:00:00.000000000 +0100 ++++ usb_modeswitch.tcl 2019-06-12 08:39:42.140000000 +0200 +@@ -41,7 +41,7 @@ + global scsi usb config match device flags setup devdir loginit + + set flags(config) "" +-Log "[ParseGlobalConfig]" ++Log "[ParseGlobalConfig $argv]" + + if {$flags(stordelay) > 0} { + SetStorageDelay $flags(stordelay) +@@ -496,9 +496,21 @@ + # end of proc {MatchDevice} + + +-proc {ParseGlobalConfig} {} { ++proc {ParseGlobalConfig} {argv} { + + global flags ++ ++set configFileParam "" ++for {set i 0} {$i < [llength $argv]} {incr i} { ++ switch -glob -- [set v [lindex $argv $i]] { ++ --config-file=* { ++ set configFileParam $v ++ } ++ } ++} ++if {$configFileParam != ""} { ++ set configFile [string range $configFileParam [string length "--config-file="] end] ++} else { + set configFile "" + set places [list /etc/usb_modeswitch.conf /etc/sysconfig/usb_modeswitch /etc/default/usb_modeswitch] + foreach cfg $places { +@@ -507,6 +519,7 @@ + break + } + } ++} + if {$configFile == ""} {return} + + set rc [open $configFile r] diff --git a/gnu/packages/usb-modeswitch.scm b/gnu/packages/usb-modeswitch.scm new file mode 100644 index 0000000000..8f1cf9df60 --- /dev/null +++ b/gnu/packages/usb-modeswitch.scm @@ -0,0 +1,166 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright 2019 Florian Pelz +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages usb-modeswitch) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) + #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages compression) + #:use-module (gnu packages embedded) + #:use-module (gnu packages libusb) + #:use-module (gnu packages pkg-config)) + +(define-public usb-modeswitch-data + (package + (name "usb-modeswitch-data") + (version "20170806") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.draisberghof.de/usb_modeswitch/" + "usb-modeswitch-data-" version ".tar.bz2")) + (sha256 + (base32 + "0b1wari3aza6qjggqd0hk2zsh93k1q8scgmwh6f8wr0flpr3whff")))) + (build-system trivial-build-system) + (native-inputs `(("tar" ,tar) + ("bzip2" ,bzip2))) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let* ((source (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "tar")) + (bzip2 (assoc-ref %build-inputs "bzip2")) + (files (string-append "usb-modeswitch-data-" + ,(package-version this-package))) + (share-dir (string-append %output "/share")) + (doc-dir (string-append share-dir "/doc/")) + (license-dir (string-append doc-dir + (strip-store-file-name %output))) + (udev-dir (string-append %output "/udev"))) + (copy-file source "data.tar.bz2") + (invoke (string-append bzip2 "/bin/bzip2") "-d" "data.tar.bz2") + (invoke (string-append tar "/bin/tar") "xvf" "data.tar") + (copy-recursively (string-append files "/usb_modeswitch.d") + (string-append share-dir "/usb_modeswitch.d")) + (install-file (string-append files "/40-usb_modeswitch.rules") + udev-dir) + (install-file (string-append files "/COPYING") license-dir))))) + (home-page "http://www.draisberghof.de/usb_modeswitch/") + (synopsis "Data package for USB_ModeSwitch") + (description "This packages contains data about devices and a UDEV rules +file for use with USB_ModeSwitch.") + (license license:gpl2+))) + +(define-public usb-modeswitch + (package + (name "usb-modeswitch") + (version "2.5.2") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.draisberghof.de/usb_modeswitch/" + "usb-modeswitch-" version ".tar.bz2")) + (sha256 + (base32 + "19ifi80g9ns5dmspchjvfj4ykxssq9yrci8m227dgb3yr04srzxb")) + (modules '((guix build utils))) + (snippet + ;; Remove bundled jimtcl. + '(begin + (delete-file-recursively "jim") + #t)) + (patches + (search-patches "usb-modeswitch-accept-config-arg.patch")))) + (native-inputs `(("pkg-config" ,pkg-config))) + (inputs `(("libusb" ,libusb) + ("jimtcl" ,jimtcl) + ("usb-modeswitch-data" ,usb-modeswitch-data))) + (outputs '("out" "dispatcher")) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; does not support `make check` + #:make-flags (list "CC=gcc") + #:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (replace 'install + (lambda* (#:key source outputs inputs #:allow-other-keys) + (let* ((source (assoc-ref inputs "source")) + (jimtcl (assoc-ref inputs "jimtcl")) + (data (assoc-ref inputs "usb-modeswitch-data")) + (out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (man1 (string-append out "/share/man/man1")) + (dispatcher-out (assoc-ref outputs "dispatcher")) + (udev (string-append dispatcher-out "/lib/udev")) + (etc (string-append dispatcher-out "/etc")) + (dispatcher-bin (string-append dispatcher-out "/bin")) + (dispatcher-man1 (string-append dispatcher-out + "/share/man/man1"))) + (begin + ;; Users can install the default output and + ;; usb-modeswitch-data and then modeswitch their USB device + ;; by running e.g.: + ;; + ;; sudo usb_modeswitch -c \ + ;; ~/.guix-profile/share/usb_modeswitch.d/12d1\:14fe \ + ;; -v 0x12d1 -p 0x14fe + ;; + ;; But it is simpler to use the usb-modeswitch-service-type + ;; that installs a UDEV rules file which invokes a shell + ;; script in lib/udev (also called `usb_modeswitch' like the + ;; main binary) which, in turn, invokes the program + ;; `usb_modeswitch_dispatcher'. Normal users should not + ;; invoke this dispatcher directly, so it is a separate output. + (install-file "usb_modeswitch" bin) + (install-file "usb_modeswitch.conf" etc) + (install-file "usb_modeswitch.1" man1) + (install-file "usb_modeswitch_dispatcher.1" dispatcher-man1) + + (substitute* "usb_modeswitch.sh" + (("PATH=") "PATH=$PATH:") ; we do not want hardcoded FHS path + (("init_path=") "init_path=/does/not/exist")) ; no /sbin/init + (rename-file "usb_modeswitch.sh" "usb_modeswitch") + (install-file "usb_modeswitch" udev) + + (rename-file "usb_modeswitch.tcl" "usb_modeswitch_dispatcher") + (substitute* "usb_modeswitch_dispatcher" + (("/usr/bin/tclsh") + (string-append jimtcl "/bin/jimsh")) + (("/usr/sbin") bin) + (("/usr/share/usb_modeswitch") + (string-append data "/share/usb_modeswitch.d"))) + (install-file "usb_modeswitch_dispatcher" + dispatcher-bin) + #t))))))) + (home-page "http://www.draisberghof.de/usb_modeswitch/") + (synopsis "Mode switching tool for controlling `multi-mode' USB devices") + (description "USB_ModeSwitch is a mode switching tool for controlling USB +devices with multiple @dfn{modes}. When plugged in for the first time many +USB devices (primarily high-speed WAN modems) act like a flash storage +containing installers for Windows drivers. USB_ModeSwitch replays the +sequence the Windows drivers would send to switch their mode from storage to +modem (or whatever the thing is supposed to do).") + (license license:gpl2+))) -- 2.21.0 --tr6hzybahymuoecq-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 12 08:21:14 2019 Received: (at 35640) by debbugs.gnu.org; 12 Jun 2019 12:21:14 +0000 Received: from localhost ([127.0.0.1]:60835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hb2Fe-0003eA-9Z for submit@debbugs.gnu.org; Wed, 12 Jun 2019 08:21:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hb2Fd-0003dz-54 for 35640@debbugs.gnu.org; Wed, 12 Jun 2019 08:21:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hb2FY-0006Se-0D; Wed, 12 Jun 2019 08:21:08 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42756 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hb2FX-0004Wz-Cx; Wed, 12 Jun 2019 08:21:07 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#35640: Make USB modems just work on Guix References: <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> <87lfyupgxm.fsf@gnu.org> <20190612121312.hobngtkentkiavai@pelzflorian.localdomain> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 24 Prairial an 227 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 12 Jun 2019 14:21:05 +0200 In-Reply-To: <20190612121312.hobngtkentkiavai@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Wed, 12 Jun 2019 14:13:12 +0200") Message-ID: <874l4vxadq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "pelzflorian (Florian Pelz)" skribis: > On Sat, May 25, 2019 at 07:44:37PM +0200, Ludovic Court=C3=A8s wrote: >> >> + (substitute* "usb_modeswitch_dispatcher" >> >> + (("!/usr/bin/tclsh") >> >> + (string-append "!" jimtcl "/bin/jimsh")) >>=20 >> I don=E2=80=99t think it=E2=80=99s needed, is it? >>=20 > > I see now, you mean the exclamation mark? It is not needed. Sorry. I meant that the =E2=80=98patch-shebangs=E2=80=99 phase should take care of= this, so you can remove this substitution and save two lines. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 12 15:51:24 2019 Received: (at 35640) by debbugs.gnu.org; 12 Jun 2019 19:51:24 +0000 Received: from localhost ([127.0.0.1]:34102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hb9HI-0005rO-DP for submit@debbugs.gnu.org; Wed, 12 Jun 2019 15:51:24 -0400 Received: from pelzflorian.de ([5.45.111.108]:48892 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hb9HG-0005rE-Qg for 35640@debbugs.gnu.org; Wed, 12 Jun 2019 15:51:23 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id DEE03360035; Wed, 12 Jun 2019 21:51:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1560369081; bh=ljFNIg/xRqhaIwY/qpX0L3hUmEoMbyPuYjAgPCt4Im0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Ih6OSKriddsey7slDiJPSvnriDjvoNI4CWkTazZkpfjpihAj94P2oTMqlwf45mQT0 trEggBKDZ9kUr2m+7mPZ41tajOwa6uoGXDrezHOCOoywZ8d5FT+mterdOXw7o+oc/C dqG6E6uqhby5pB54Yuwuoauf9q9+XiJ8dWlAkSms= Date: Wed, 12 Jun 2019 21:51:20 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190612195120.bg7yuvjghf2d546f@pelzflorian.localdomain> References: <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> <87lfyupgxm.fsf@gnu.org> <20190612121312.hobngtkentkiavai@pelzflorian.localdomain> <874l4vxadq.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <874l4vxadq.fsf@gnu.org> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, Jun 12, 2019 at 02:21:05PM +0200, Ludovic Courtès wrote: > "pelzflorian (Florian Pelz)" skribis: > > On Sat, May 25, 2019 at 07:44:37PM +0200, Ludovic Courtès wrote: > >> >> + (substitute* "usb_modeswitch_dispatcher" > >> >> + (("!/usr/bin/tclsh") > >> >> + (string-append "!" jimtcl "/bin/jimsh")) > […] > I meant that the ‘patch-shebangs’ phase should take care of this, so you > can remove this substitution and save two lines. > > Ludo’. It is needed. Upstream USB_Modeswitch bundles jimtcl. Its Makefile uses jimsh0 from the bundled jimtcl, if possible, and replaces the shebang using sed. Therefore it seems right to use jimsh for Guix’ USB_ModeSwitch as well. patch-shebang fails because the basename of #!/usr/bin/tclsh is not jimsh. patch-shebang: /gnu/store/24yzny7szv1fnmq6ci1x2ndyy7dzyigk-usb-modeswitch-2.5.2-dispatcher/bin/usb_modeswitch_dispatcher: warning: no binary for interpreter `tclsh' found in $PATH Regards, Florian From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 12 16:42:45 2019 Received: (at 35640) by debbugs.gnu.org; 12 Jun 2019 20:42:45 +0000 Received: from localhost ([127.0.0.1]:34152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbA4z-0007Ng-GY for submit@debbugs.gnu.org; Wed, 12 Jun 2019 16:42:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbA4y-0007NQ-5L for 35640@debbugs.gnu.org; Wed, 12 Jun 2019 16:42:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hbA4s-000720-OJ; Wed, 12 Jun 2019 16:42:38 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=51976 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hbA4r-0006Cq-Vy; Wed, 12 Jun 2019 16:42:38 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#35640: Make USB modems just work on Guix References: <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> <87lfyupgxm.fsf@gnu.org> <20190612121312.hobngtkentkiavai@pelzflorian.localdomain> <874l4vxadq.fsf@gnu.org> <20190612195120.bg7yuvjghf2d546f@pelzflorian.localdomain> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 24 Prairial an 227 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 12 Jun 2019 22:42:36 +0200 In-Reply-To: <20190612195120.bg7yuvjghf2d546f@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Wed, 12 Jun 2019 21:51:20 +0200") Message-ID: <87v9xasfgj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "pelzflorian (Florian Pelz)" skribis: > On Wed, Jun 12, 2019 at 02:21:05PM +0200, Ludovic Court=C3=A8s wrote: >> "pelzflorian (Florian Pelz)" skribis: >> > On Sat, May 25, 2019 at 07:44:37PM +0200, Ludovic Court=C3=A8s wrote: >> >> >> + (substitute* "usb_modeswitch_dispatcher" >> >> >> + (("!/usr/bin/tclsh") >> >> >> + (string-append "!" jimtcl "/bin/jimsh")) >> [=E2=80=A6] >> I meant that the =E2=80=98patch-shebangs=E2=80=99 phase should take care= of this, so you >> can remove this substitution and save two lines. >>=20 >> Ludo=E2=80=99. > > It is needed. Upstream USB_Modeswitch bundles jimtcl. Its Makefile > uses jimsh0 from the bundled jimtcl, if possible, and replaces the > shebang using sed. Therefore it seems right to use jimsh for Guix=E2=80= =99 > USB_ModeSwitch as well. > > patch-shebang fails because the basename of #!/usr/bin/tclsh is not > jimsh. > > patch-shebang: /gnu/store/24yzny7szv1fnmq6ci1x2ndyy7dzyigk-usb-modeswitch= -2.5.2-dispatcher/bin/usb_modeswitch_dispatcher: warning: no binary for int= erpreter `tclsh' found in $PATH Oh got it, thanks for explaining. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 12 16:59:08 2019 Received: (at 35640) by debbugs.gnu.org; 12 Jun 2019 20:59:08 +0000 Received: from localhost ([127.0.0.1]:34156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbAKq-0001W2-0K for submit@debbugs.gnu.org; Wed, 12 Jun 2019 16:59:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbAKl-0001VU-HA for 35640@debbugs.gnu.org; Wed, 12 Jun 2019 16:59:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hbAKf-0001fd-JW; Wed, 12 Jun 2019 16:58:57 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52034 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hbAKc-0001VL-OG; Wed, 12 Jun 2019 16:58:56 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#35640: Make USB modems just work on Guix References: <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> <87lfyupgxm.fsf@gnu.org> <20190612121312.hobngtkentkiavai@pelzflorian.localdomain> Date: Wed, 12 Jun 2019 22:58:49 +0200 In-Reply-To: <20190612121312.hobngtkentkiavai@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Wed, 12 Jun 2019 14:13:12 +0200") Message-ID: <87r27ysepi.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "pelzflorian (Florian Pelz)" skribis: >>>From 2a790dacdb818387325f7a2a895adde6bacabf8b Mon Sep 17 00:00:00 2001 > From: Florian Pelz > Date: Wed, 12 Jun 2019 14:05:44 +0200 > Subject: [PATCH 1/3] gnu: Add USB_ModeSwitch. > > * gnu/packages/usb-modeswitch.scm: New file. > * gnu/packages/patches/usb-modeswitch-accept-config-arg.patch: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add package. > (dist_patch_DATA): Add patch. Applied, thanks! Ludo'. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 12 17:01:08 2019 Received: (at 35640) by debbugs.gnu.org; 12 Jun 2019 21:01:08 +0000 Received: from localhost ([127.0.0.1]:34160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbAMm-0001bE-E1 for submit@debbugs.gnu.org; Wed, 12 Jun 2019 17:01:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48467) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbAMl-0001b0-Hh for 35640@debbugs.gnu.org; Wed, 12 Jun 2019 17:01:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hbAMa-00031Q-Ac; Wed, 12 Jun 2019 17:01:01 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52036 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hbAMQ-0006y1-1D; Wed, 12 Jun 2019 17:00:49 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#35640: Make USB modems just work on Guix References: <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> <87lfyupgxm.fsf@gnu.org> <20190525194215.egiyrax3f3k7nojp@pelzflorian.localdomain> <20190612103646.yem2wtmw6w2vw7an@pelzflorian.localdomain> <20190612104114.aye2qfnla7bjatqm@pelzflorian.localdomain> Date: Wed, 12 Jun 2019 23:00:43 +0200 In-Reply-To: <20190612104114.aye2qfnla7bjatqm@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Wed, 12 Jun 2019 12:41:14 +0200") Message-ID: <87h88usemc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "pelzflorian (Florian Pelz)" skribis: > On Wed, Jun 12, 2019 at 12:36:47PM +0200, pelzflorian (Florian Pelz) wrot= e: >> Find attached patches that make USB modems just work, fixing this bug. >>=20 > > I forgot to ask: The USB_ModeSwitch website says: > > If you are a system integrator (package maintainer) you can use this > XML file to check for new releases: usb-modeswitch-versions.xml > . > > Is it possible to add a hash of this URL to the usb-modeswitch and > usb-modeswitch-data packages so that guix refresh notifies us of new > releases? No, it=E2=80=99s not that simple. You could write an =E2=80=9Cupdater=E2= =80=9D (see (guix upstream)) that specifically reads this file and reports the new version specified in this file, but maybe it=E2=80=99s overkill to do that for a si= ngle package. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 12 17:11:25 2019 Received: (at 35640) by debbugs.gnu.org; 12 Jun 2019 21:11:25 +0000 Received: from localhost ([127.0.0.1]:34189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbAWj-0001tw-Em for submit@debbugs.gnu.org; Wed, 12 Jun 2019 17:11:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50805) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbAWh-0001th-F0 for 35640@debbugs.gnu.org; Wed, 12 Jun 2019 17:11:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hbAWc-0001dS-Al; Wed, 12 Jun 2019 17:11:18 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52044 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hbAWb-0000G0-PT; Wed, 12 Jun 2019 17:11:18 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#35640: Make USB modems just work on Guix References: <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> <87lfyupgxm.fsf@gnu.org> <20190525194215.egiyrax3f3k7nojp@pelzflorian.localdomain> <20190612103646.yem2wtmw6w2vw7an@pelzflorian.localdomain> Date: Wed, 12 Jun 2019 23:11:16 +0200 In-Reply-To: <20190612103646.yem2wtmw6w2vw7an@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Wed, 12 Jun 2019 12:36:47 +0200") Message-ID: <87zhmmqzkb.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "pelzflorian (Florian Pelz)" skribis: > I am uncertain if having paragraphs like this in > modem-manager-service-type and usb-modeswitch-service-type is a good > idea: > > This service is part of =E2=80=98%desktop-services=E2=80=99 (*note D= esktop > Services::). I think it=E2=80=99s OK. Looks like we=E2=80=99re almost there! A couple of comments and suggestion= s: >>>From db6e3a937f89811017abf06c7dffc494b71b9127 Mon Sep 17 00:00:00 2001 > From: Florian Pelz > Date: Tue, 11 Jun 2019 16:56:46 +0200 > Subject: [PATCH 2/3] Add usb-modeswitch-service-type. > > * gnu/services/networking.scm (usb-modeswitch-service-type): New variable. > (usb-modeswitch-configuration): New variable. > (usb-modeswitch-configuration->udev-rules): New procedure. > * doc/guix.texi (Networking Services): Document it. [...] > +When plugged in, some USB modems (and other USB devices) initially prese= nt > +themselves as a read-only storage medium and not as a modem. They need = to be > +@dfn{modeswitched} before they are usable. The USB_ModeSwitch service t= ype > +installs UDEV rules to automatically modeswitch these devices when they = are s/UDEV/udev/ (here and elsewhere). > +(define (usb-modeswitch-configuration->udev-rules config) > + "Build a rules file for extending udev-service-type from the rules in = the > +usb-modeswitch package. The rules file will invoke usb_modeswitch.sh fr= om the > +usb-modeswitch package, modified to pass the right config file." > + (define usb-modeswitch-sh > + (match-lambda > + (($ usb-modeswitch data config-file) > + (let ((orig #~(string-append #$usb-modeswitch:dispatcher > + "/lib/udev/usb_modeswitch"))) > + (computed-file > + "usb_modeswitch-sh" (computed-file =E2=80=A6) should probably be moved to a separate procedure,= to keep the main procedure concise. > + (with-imported-modules '((guix build utils)) > + #~(begin > + (use-modules (guix build utils)) > + (let ((cfg-param > + (case #$config-file > + ((#f) "") > + (else > + (string-append " --config-file=3D" #$config-fi= le))))) Instead of (case =E2=80=A6), maybe this would be slightly clearer: #$(if config-file #~(string-append =E2=80=A6 #$config-file) "") > + (mkdir #$output) > + (install-file #$orig #$output) > + (substitute* (string-append #$output "/usb_modeswitch") > + (("(exec usb_modeswitch_dispatcher .*)( 2>>)" _ left= right) > + (string-append left cfg-param right)) > + (("(exec usb_modeswitch_dispatcher .*)( &)" _ left r= ight) > + (string-append left cfg-param right))) Perhaps add comments to explain what=E2=80=99s happening here. > + ;; wrap-program needs bash in PATH: > + (putenv (string-append "PATH=3D" #$bash "/bin")) Why do you think so? =E2=80=98wrap-program=E2=80=99 does not read $PATH, A= FAICS. >>>From dc50f979f77d9298e8c81e6943076c612e5f459a Mon Sep 17 00:00:00 2001 > From: Florian Pelz > Date: Wed, 12 Jun 2019 11:16:57 +0200 > Subject: [PATCH 3/3] services: Include USB_ModeSwitch in %desktop-service= s. > > Fixes . > > * gnu/services/desktop.scm (%desktop-services): Add usb-modeswitch-servic= e-type. > * doc/guix.texi (Networking Services): Document it. OK! Thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 13 14:04:57 2019 Received: (at 35640) by debbugs.gnu.org; 13 Jun 2019 18:04:57 +0000 Received: from localhost ([127.0.0.1]:36063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbU5p-00030e-Ii for submit@debbugs.gnu.org; Thu, 13 Jun 2019 14:04:57 -0400 Received: from pelzflorian.de ([5.45.111.108]:50254 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbU5m-00030T-Um for 35640@debbugs.gnu.org; Thu, 13 Jun 2019 14:04:55 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 46284360035; Thu, 13 Jun 2019 20:04:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1560449093; bh=wydDvNvKg8NMCJeEob9qAo9Iqh4+8DTLu03/A7qP5qI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=KkN2bydsYhDOvLBcFUf8UXdOMBWeNCWBmXP1duCu0omF3TCV6RlcCQ9SP7O1yuTQe 1hmCgkR0CC4hK/tB+5W1TpErHcrRREdTQigcrYJBRmeFGXkThPft2hxgxt7iGhU2BT 2K8zF2+6eWegTfE7m2126+B1UXiGgx3uj3QuUcbg= Date: Thu, 13 Jun 2019 20:04:53 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190613180452.yeytgript2vhnl5b@pelzflorian.localdomain> References: <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> <87lfyupgxm.fsf@gnu.org> <20190525194215.egiyrax3f3k7nojp@pelzflorian.localdomain> <20190612103646.yem2wtmw6w2vw7an@pelzflorian.localdomain> <87zhmmqzkb.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87zhmmqzkb.fsf@gnu.org> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Find attached patches taking into account your suggestions. (The second patch is unchanged.) On Wed, Jun 12, 2019 at 11:11:16PM +0200, Ludovic Courtès wrote: > > + ;; wrap-program needs bash in PATH: > > + (putenv (string-append "PATH=" #$bash "/bin")) > > Why do you think so? ‘wrap-program’ does not read $PATH, AFAICS. > wrap-program uses (which "bash"). Without bash in the path, it generates a wrong shebang “#!#f”. Regards, Florian From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 13 14:06:02 2019 Received: (at 35640) by debbugs.gnu.org; 13 Jun 2019 18:06:02 +0000 Received: from localhost ([127.0.0.1]:36068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbU6n-00032l-TO for submit@debbugs.gnu.org; Thu, 13 Jun 2019 14:06:02 -0400 Received: from pelzflorian.de ([5.45.111.108]:50262 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbU6j-00032W-Km for 35640@debbugs.gnu.org; Thu, 13 Jun 2019 14:05:56 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 01621360035; Thu, 13 Jun 2019 20:05:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1560449153; bh=afXtOwkW4D1ndbOarTpCiH9tsBq0FvzCJzFy84VDoj4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=e8y05dV13yYa/IidTN09Y+aPPsb0A1ZWyA5z9BOlLTIDGpVHyIrIR06B2kXSxkzzR L8A+IC6heKMjO07boYtQA8Hs5SNkOhe0QQyXkKofnyhddoW1l73cgXtQzg1tuOMJMf kyi9JbJB6batJblND1w2uxYE2m+FrjPLP+TbxQCA= Date: Thu, 13 Jun 2019 20:05:52 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35640: Make USB modems just work on Guix Message-ID: <20190613180552.ckiihg7p6imni5a3@pelzflorian.localdomain> References: <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> <87lfyupgxm.fsf@gnu.org> <20190525194215.egiyrax3f3k7nojp@pelzflorian.localdomain> <20190612103646.yem2wtmw6w2vw7an@pelzflorian.localdomain> <87zhmmqzkb.fsf@gnu.org> <20190613180452.yeytgript2vhnl5b@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="4ztiyylwfo3eovbp" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190613180452.yeytgript2vhnl5b@pelzflorian.localdomain> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35640 Cc: 35640@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --4ztiyylwfo3eovbp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jun 13, 2019 at 08:04:52PM +0200, pelzflorian (Florian Pelz) wrote: > Find attached patches taking into account your suggestions. (The > second patch is unchanged.) > Forgot attachment. Sorry. --4ztiyylwfo3eovbp Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-Add-usb-modeswitch-service-type.patch" Content-Transfer-Encoding: 8bit >From 27aff97683537407c178ea2b664069def0cf141a Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Thu, 13 Jun 2019 19:17:05 +0200 Subject: [PATCH 1/2] Add usb-modeswitch-service-type. * gnu/services/networking.scm (usb-modeswitch-service-type): New variable. (usb-modeswitch-configuration): New variable. (usb-modeswitch-sh): New procedure. (usb-modeswitch-configuration->udev-rules): New procedure. * doc/guix.texi (Networking Services): Document it. --- doc/guix.texi | 35 ++++++++++++ gnu/services/networking.scm | 104 ++++++++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 9dc1d2a9ca..c407d6257f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12668,6 +12668,41 @@ The ModemManager package to use. @end table @end deftp +@cindex USB_ModeSwitch +@cindex Modeswitching + +@defvr {Scheme Variable} usb-modeswitch-service-type +This is the service type for the +@uref{http://www.draisberghof.de/usb_modeswitch/, USB_ModeSwitch} service. The +value for this service type is a @code{usb-modeswitch-configuration} record. + +When plugged in, some USB modems (and other USB devices) initially present +themselves as a read-only storage medium and not as a modem. They need to be +@dfn{modeswitched} before they are usable. The USB_ModeSwitch service type +installs udev rules to automatically modeswitch these devices when they are +plugged in. +@end defvr + +@deftp {Data Type} usb-modeswitch-configuration +Data type representing the configuration of USB_ModeSwitch. + +@table @asis +@item @code{usb-modeswitch} (default: @code{usb-modeswitch}) +The USB_ModeSwitch package providing the binaries for modeswitching. + +@item @code{usb-modeswitch-data} (default: @code{usb-modeswitch-data}) +The package providing the device data and udev rules file used by +USB_ModeSwitch. + +@item @code{config-file} (default: @code{#~(string-append #$usb-modeswitch:dispatcher "/etc/usb_modeswitch.conf")}) +Which config file to use for the USB_ModeSwitch dispatcher. By default the +config file shipped with USB_ModeSwitch is used which disables logging to +@file{/var/log} among other default settings. If set to @code{#f}, no config +file is used. + +@end table +@end deftp + @cindex NetworkManager @defvr {Scheme Variable} network-manager-service-type diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 082a85f63d..73acb3b17f 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Chris Marusich ;;; Copyright © 2018 Arun Isaac +;;; Copyright © 2019 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,10 +34,13 @@ #:use-module (gnu system shadow) #:use-module (gnu system pam) #:use-module (gnu packages admin) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages connman) #:use-module (gnu packages freedesktop) #:use-module (gnu packages linux) #:use-module (gnu packages tor) + #:use-module (gnu packages usb-modeswitch) #:use-module (gnu packages messaging) #:use-module (gnu packages networking) #:use-module (gnu packages ntp) @@ -104,6 +108,12 @@ modem-manager-configuration? modem-manager-service-type + usb-modeswitch-configuration + usb-modeswitch-configuration? + usb-modeswitch-configuration-usb-modeswitch + usb-modeswitch-configuration-usb-modeswitch-data + usb-modeswitch-service-type + wpa-supplicant-configuration wpa-supplicant-configuration? @@ -1042,6 +1052,100 @@ ModemManager}, a modem management daemon that aims to simplify dialup networking.")))) +;;; +;;; USB_ModeSwitch +;;; + +(define-record-type* + usb-modeswitch-configuration make-usb-modeswitch-configuration + usb-modeswitch-configuration? + (usb-modeswitch usb-modeswitch-configuration-usb-modeswitch + (default usb-modeswitch)) + (usb-modeswitch-data usb-modeswitch-configuration-usb-modeswitch-data + (default usb-modeswitch-data)) + (config-file usb-modeswitch-configuration-config-file + (default #~(string-append #$usb-modeswitch:dispatcher + "/etc/usb_modeswitch.conf")))) + +(define (usb-modeswitch-sh usb-modeswitch config-file) + "Build a copy of usb_modeswitch.sh located in package USB-MODESWITCH, +modified to pass the CONFIG-FILE in its calls to usb_modeswitch_dispatcher, +and wrap it to actually find the dispatcher in USB-MODESWITCH. The script +will be run by USB_ModeSwitch’s udev rules file when a modeswitchable USB +device is detected." + (computed-file + "usb_modeswitch-sh" + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (let ((cfg-param + #$(if config-file + #~(string-append " --config-file=" #$config-file) + ""))) + (mkdir #$output) + (install-file (string-append #$usb-modeswitch:dispatcher + "/lib/udev/usb_modeswitch") + #$output) + + ;; insert CFG-PARAM into usb_modeswitch_dispatcher command-lines + (substitute* (string-append #$output "/usb_modeswitch") + (("(exec usb_modeswitch_dispatcher .*)( 2>>)" _ left right) + (string-append left cfg-param right)) + (("(exec usb_modeswitch_dispatcher .*)( &)" _ left right) + (string-append left cfg-param right))) + + ;; wrap-program needs bash in PATH: + (putenv (string-append "PATH=" #$bash "/bin")) + (wrap-program (string-append #$output "/usb_modeswitch") + `("PATH" ":" = (,(string-append #$coreutils "/bin") + ,(string-append + #$usb-modeswitch:dispatcher + "/bin"))))))))) + +(define (usb-modeswitch-configuration->udev-rules config) + "Build a rules file for extending udev-service-type from the rules in the +usb-modeswitch package specified in CONFIG. The rules file will invoke +usb_modeswitch.sh from the usb-modeswitch package, modified to pass the right +config file." + (match config + (($ usb-modeswitch data config-file) + (computed-file + "usb_modeswitch.rules" + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (let ((in (string-append #$data "/udev/40-usb_modeswitch.rules")) + (out (string-append #$output "/lib/udev/rules.d")) + (script #$(usb-modeswitch-sh usb-modeswitch config-file))) + (mkdir-p out) + (chdir out) + (install-file in out) + (substitute* "40-usb_modeswitch.rules" + (("PROGRAM=\"usb_modeswitch") + (string-append "PROGRAM=\"" script "/usb_modeswitch")) + (("RUN\\+=\"usb_modeswitch") + (string-append "RUN+=\"" script "/usb_modeswitch")))))))))) + +(define usb-modeswitch-service-type + (service-type + (name 'usb-modeswitch) + (extensions + (list + (service-extension + udev-service-type + (lambda (config) + (let ((rules (usb-modeswitch-configuration->udev-rules config))) + (list rules)))))) + (default-value (usb-modeswitch-configuration)) + (description "Run @uref{http://www.draisberghof.de/usb_modeswitch/, +USB_ModeSwitch}, a mode switching tool for controlling USB devices with +multiple @dfn{modes}. When plugged in for the first time many USB +devices (primarily high-speed WAN modems) act like a flash storage containing +installers for Windows drivers. USB_ModeSwitch replays the sequence the +Windows drivers would send to switch their mode from storage to modem (or +whatever the thing is supposed to do)."))) + + ;;; ;;; WPA supplicant ;;; -- 2.21.0 --4ztiyylwfo3eovbp Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0002-services-Include-USB_ModeSwitch-in-desktop-services.patch" >From f4a5103b365f8bc5d2c514dad2e40f3c9981cfc2 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Wed, 12 Jun 2019 11:16:57 +0200 Subject: [PATCH 2/2] services: Include USB_ModeSwitch in %desktop-services. Fixes . * gnu/services/desktop.scm (%desktop-services): Add usb-modeswitch-service-type. * doc/guix.texi (Networking Services): Document it. --- doc/guix.texi | 3 +++ gnu/services/desktop.scm | 1 + 2 files changed, 4 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index c407d6257f..8b07693445 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12681,6 +12681,9 @@ themselves as a read-only storage medium and not as a modem. They need to be @dfn{modeswitched} before they are usable. The USB_ModeSwitch service type installs udev rules to automatically modeswitch these devices when they are plugged in. + +This service is part of @code{%desktop-services} (@pxref{Desktop +Services}). @end defvr @deftp {Data Type} usb-modeswitch-configuration diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 652f7b1b02..343d507c14 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1067,6 +1067,7 @@ dispatches events from it."))) profile-service-type (list network-manager-applet)) (service modem-manager-service-type) + (service usb-modeswitch-service-type) ;; The D-Bus clique. (service avahi-service-type) -- 2.21.0 --4ztiyylwfo3eovbp-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 15 12:39:36 2019 Received: (at 35640-done) by debbugs.gnu.org; 15 Jun 2019 16:39:36 +0000 Received: from localhost ([127.0.0.1]:39125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hcBiJ-0004ma-Km for submit@debbugs.gnu.org; Sat, 15 Jun 2019 12:39:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hcBiH-0004mL-Ok for 35640-done@debbugs.gnu.org; Sat, 15 Jun 2019 12:39:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39453) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hcBiC-0000Lt-4r; Sat, 15 Jun 2019 12:39:28 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=50452 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hcBi8-00005O-Iu; Sat, 15 Jun 2019 12:39:25 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#35640: Make USB modems just work on Guix References: <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> <87lfyupgxm.fsf@gnu.org> <20190525194215.egiyrax3f3k7nojp@pelzflorian.localdomain> <20190612103646.yem2wtmw6w2vw7an@pelzflorian.localdomain> <87zhmmqzkb.fsf@gnu.org> <20190613180452.yeytgript2vhnl5b@pelzflorian.localdomain> <20190613180552.ckiihg7p6imni5a3@pelzflorian.localdomain> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 27 Prairial an 227 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 15 Jun 2019 18:39:22 +0200 In-Reply-To: <20190613180552.ckiihg7p6imni5a3@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Thu, 13 Jun 2019 20:05:52 +0200") Message-ID: <87h88qajlx.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35640-done Cc: 35640-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! "pelzflorian (Florian Pelz)" skribis: > From 27aff97683537407c178ea2b664069def0cf141a Mon Sep 17 00:00:00 2001 > From: Florian Pelz > Date: Thu, 13 Jun 2019 19:17:05 +0200 > Subject: [PATCH 1/2] Add usb-modeswitch-service-type. > > * gnu/services/networking.scm (usb-modeswitch-service-type): New variable. > (usb-modeswitch-configuration): New variable. > (usb-modeswitch-sh): New procedure. > (usb-modeswitch-configuration->udev-rules): New procedure. > * doc/guix.texi (Networking Services): Document it. [...] > From f4a5103b365f8bc5d2c514dad2e40f3c9981cfc2 Mon Sep 17 00:00:00 2001 > From: Florian Pelz > Date: Wed, 12 Jun 2019 11:16:57 +0200 > Subject: [PATCH 2/2] services: Include USB_ModeSwitch in %desktop-service= s. > > Fixes . > > * gnu/services/desktop.scm (%desktop-services): Add usb-modeswitch-servic= e-type. > * doc/guix.texi (Networking Services): Document it. Pushed, thank you! Ludo=E2=80=99. From unknown Thu Jun 19 14:10:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 14 Jul 2019 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator