| Summary: | usb_modeswitch udev helper can't parse arguments and exits | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Dominic Cleal <dcleal> | ||||
| Component: | usb_modeswitch | Assignee: | romal <linux> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 16 | CC: | digidietze, huzaifas, linux | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | usb_modeswitch-1.2.2-2.fc15 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2012-02-15 11:30:42 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
|
Description
Dominic Cleal
2012-01-17 22:36:06 UTC
Reported in the upstream bug forum: http://web52.017.netroom.de/draisberghof_de/usb_modeswitch/bb/viewtopic.php?p=5621 If you try with the upstream source package, probably after a forced uninstall of the Fedora package, does that fail as well? Thanks for the tip, looking at the upstream source and installation partly explains the problem, which I think may be the packaging. In the Fedora package, /lib/udev/usb_modeswitch is the Tcl script shipped as usb_modeswitch.tcl. Compared to the upstream Makefile, it's actually the shell script "usb_modeswitch.sh" that should be installed at /lib/udev/usb_modeswitch and the Tcl script is installed to /usr/sbin/usb_modeswitch_dispatcher. udev then calls the shell script, which calls the Tcl script, which then calls usb_modeswitch itself. Does that description sound correct Josua? I've also looked at the Debian package of 1.2.1 and it has the above layout, with the shell script in /lib/udev and the Tcl script compiled with jim at /usr/sbin/usb_modeswitch_dispatcher. The Ubuntu package is different again, as they've rewritten the dispatcher in C! Having moved files around for the above layout, I'm able to get further with the dispatcher log file now correctly showing arguments (which are set by the shell script). I've now hit the issue where usb_modeswitch can't find the device: Looking for default devices ... bus/device number matched searching devices, found USB ID 0af0:7501 found matching vendor ID found matching product ID target class ff not matching No devices in default mode found. Nothing to do. Bye. This reported in Debian with a patch: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=656248 Now having compiled upstream sources with the patch the usb_modeswitch log file shows it's made the change, the dispatcher confirms it and my modem now shows up in NetworkManager! I'll create a patch to the spec tomorrow. Yes, the shell script is needed to keep the udev thread from blocking further processing while the mode switch is done - it can take up to 20 seconds. I don't know if there is a good reason to skip it ... The bug in 1.2.1 will be fixed immediately, I'll release upstream 1.2.2 later today. Created attachment 556130 [details]
Proposed fix, adds usb_modeswitch.sh udev helper and Debian patch
(In reply to comment #4) > Yes, the shell script is needed to keep the udev thread from blocking further > processing while the mode switch is done - it can take up to 20 seconds. I > don't know if there is a good reason to skip it ... Ah okay. It looks like between 1.2.0 and 1.2.1 the arguments into the Tcl script from the shell script changed, so the absence of the shell script probably wouldn't have been noticed before. > The bug in 1.2.1 will be fixed immediately, I'll release upstream 1.2.2 later > today. Great, in which case the maintainer can leave off the extra patch I added in my attachment for 1.2.1. Version 1.2.2 is available upstream. It fixes the bug reported at Debian (which would have affected all other distributions as well). http://draisberghof.de/usb_modeswitch/usb-modeswitch-1.2.2.tar.bz2 Version 1.2.2 is packaged for Fedora - but without the patch to "usb_modeswitch.spec" attached here. It will always fail if that is not fixed. (In reply to comment #8) > Version 1.2.2 is packaged for Fedora - but without the patch to > "usb_modeswitch.spec" attached here. It will always fail if that is not fixed. Right, i will respin the rpm to fix the issue usb_modeswitch-1.2.2-2.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/usb_modeswitch-1.2.2-2.fc16 usb_modeswitch-1.2.2-2.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/usb_modeswitch-1.2.2-2.fc15 Package usb_modeswitch-1.2.2-2.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing usb_modeswitch-1.2.2-2.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-0904/usb_modeswitch-1.2.2-2.fc15 then log in and leave karma (feedback). Thanks, 1.2.2-2.fc16 seems to work perfectly (karma given). usb_modeswitch-1.2.2-2.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. usb_modeswitch-1.2.2-2.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. |