From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#35640: Make USB modems just work on Guix Date: Sat, 25 May 2019 19:44:37 +0200 Message-ID: <87lfyupgxm.fsf@gnu.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:55040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUaj9-00040g-06 for bug-guix@gnu.org; Sat, 25 May 2019 13:45:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hUaj8-0007sz-0l for bug-guix@gnu.org; Sat, 25 May 2019 13:45:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36028) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hUaj7-0007sm-TY for bug-guix@gnu.org; Sat, 25 May 2019 13:45:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hUaj7-0005Yr-Mc for bug-guix@gnu.org; Sat, 25 May 2019 13:45:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Sat, 25 May 2019 13:18:56 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: "pelzflorian (Florian Pelz)" Cc: 35640@debbugs.gnu.org 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.