Subject: bug#35640: Make USB modems just work on Guix

From: "pelzflorian (Florian Pelz)" <[email-masked]>
Date: Sat, 25 May 2019 21:42:15 +0200

On Sat, May 25, 2019 at 07:44:37PM +0200, Ludovic Courtès wrote:
> "pelzflorian (Florian Pelz)" <[email-masked]> 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
(<https://web.archive.org/web/20100921062014/http://draisberghof.de/usb_modeswitch/usb-modeswitch-data-20100826.tar.bz2>)
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