Compare commits
14 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1134f5058 | ||
|
|
f8de5edc68 | ||
|
|
498f59aeed | ||
|
|
98f0e006be | ||
|
|
75c8580965 | ||
|
|
4898f94e0e | ||
|
|
b2294969f2 | ||
|
|
ec98dd90b0 | ||
|
|
109fa600da | ||
|
|
d4c4cd8bdc | ||
|
|
674dbed569 | ||
|
|
80331ece0f | ||
|
|
2e63e4c74f | ||
|
|
c848680bae |
5 changed files with 128 additions and 55 deletions
|
|
@ -1,26 +0,0 @@
|
|||
From 99cade3624c432a478e624f278692cdedf4e0450 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Fri, 18 Aug 2017 10:40:41 +0200
|
||||
Subject: [PATCH] usb_modeswitch: count the target devices from zero
|
||||
|
||||
Most likely a typo here.
|
||||
---
|
||||
usb_modeswitch.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/usb_modeswitch.c b/usb_modeswitch.c
|
||||
index 3239946..1b3bf9d 100644
|
||||
--- a/usb_modeswitch.c
|
||||
+++ b/usb_modeswitch.c
|
||||
@@ -1582,7 +1582,7 @@ int checkSuccess()
|
||||
* description is read for syslog message
|
||||
*/
|
||||
// Wait counter passed on from previous loop
|
||||
- for (i=i; i < CheckSuccess; i++) {
|
||||
+ for (i=0; i < CheckSuccess; i++) {
|
||||
SHOW_PROGRESS(output," Search for target devices ...\n");
|
||||
dev = search_devices(&newTargetCount, TargetVendor, TargetProductList,
|
||||
TargetClass, 0, SEARCH_TARGET);
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
#
|
||||
# Device Reference (UTF-8 encoding used)
|
||||
#
|
||||
# Last modified: 2014-05-29
|
||||
# Last modified: 2017-02-05
|
||||
#
|
||||
# Collection of configurations for usb_modeswitch, a mode switching
|
||||
# tool for controlling flip flop (multiple mode) USB devices
|
||||
#
|
||||
# Detailed instructions and a friendly forum on the homepage:
|
||||
# http://www.draisberghof.de/usb_modeswitch
|
||||
#
|
||||
# You may want to check for a newer version of this file at:
|
||||
# http://www.draisberghof.de/usb_modeswitch/device_reference.txt
|
||||
#
|
||||
# Note that new devices are no longer added to this file. See the
|
||||
# config files included with the data package for these
|
||||
|
||||
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
|
|
@ -21,9 +21,10 @@
|
|||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
|
||||
|
||||
# For a parameter reference see file REFERENCE in the data package
|
||||
# For a parameter reference see file REFERENCE in the data package or
|
||||
# http://www.draisberghof.de/usb_modeswitch/parameter_reference.txt
|
||||
#
|
||||
# If you find working codes and configurations, please contribute
|
||||
# If you find new working codes and configurations, please report
|
||||
# them!
|
||||
|
||||
|
||||
|
|
@ -31,6 +32,7 @@
|
|||
|
||||
#######################################################
|
||||
# Option GlobeSurfer Icon (aka "Vodafone EasyBox")
|
||||
# This is the thing that started it all ...
|
||||
#
|
||||
# The MessageContent is identical for all Option devices
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (usb-modeswitch-2.6.1.tar.bz2) = 5d800b45257ca1182a13155dc37b614ee2d93273ed226cc9d05b6ae423f9e88b7c9aca6829604bdb86f68707ddf2c51c9ad2bcf898b8261b2c5bb56a21351e1e
|
||||
SHA512 (usb-modeswitch-2.6.2.tar.bz2) = adaedf89de3c5f9dc55da7bb5bb3fe8165c0424cffacb00f83876094b7abdc386ced9959e5dbdf46ab06aa1d03fbfca13df539421489ef4d2dd0f72742057f3d
|
||||
|
|
|
|||
49
usb_modeswitch-2.6.2-SIGTERM.patch
Normal file
49
usb_modeswitch-2.6.2-SIGTERM.patch
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
From e3cf80c95a1c67d05dded68ec171bfde4686003f Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Thu, 14 Aug 2025 16:35:56 +0200
|
||||
Subject: [PATCH] service: Do not ever send SIGTERM to the unit
|
||||
|
||||
Following happens when modem 03f0:a31d (HP lt4132 LTE/HSPA+ 4G Module) is
|
||||
plugged:
|
||||
|
||||
- systemd-udevd emits "add" action
|
||||
- The "add" action triggers restart of usb_modeswitch@<port>.service
|
||||
- usb_modeswitch@<port>.service starts usb_modeswitch
|
||||
- Another udev rule renames the network interface from usb0 to enp0...
|
||||
- Above causes systemd-udevd emit "change" action for the device
|
||||
- The "change" action triggers another restart of usb_modeswitch@<port>.service
|
||||
- usb_modeswitch run initially gets terminated mid-air
|
||||
- Device drops off the bus
|
||||
- Infinite sadness
|
||||
|
||||
Possible solutions:
|
||||
|
||||
- The udev rule could just emit the "change" action. I have no idea why
|
||||
it handles "change" actions, but it looks intentional -> No touchy
|
||||
from me.
|
||||
- usb_modeswitch could just trap TERM and shut down gracefully. This
|
||||
involves Tcl -> No touchy.
|
||||
- The systemd unit could just send an innocent signal instead of TERM
|
||||
and just let usb_modeswitch end its life journey naturally.
|
||||
Let's do this, because it involves least brain.
|
||||
|
||||
Anybody please feel free to send this upstream.
|
||||
---
|
||||
usb_modeswitch@.service | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/usb_modeswitch@.service b/usb_modeswitch@.service
|
||||
index 22d2ea7..23d4ed0 100644
|
||||
--- a/usb_modeswitch@.service
|
||||
+++ b/usb_modeswitch@.service
|
||||
@@ -7,3 +7,7 @@ ExecStart=/usr/sbin/usb_modeswitch_dispatcher --switch-mode %i
|
||||
# Testing
|
||||
#ExecStart=/bin/echo "usb_modeswitch.service: device name is %i"
|
||||
|
||||
+# Do not ever terminate violently on restart -- interrupting the switching
|
||||
+# transaction will crash some modems! We'll terminate shortly anyways.
|
||||
+# If we hang, FinalKillSignal (defaults to SIGKILL) will take care of that.
|
||||
+KillSignal=SIGCONT
|
||||
--
|
||||
2.50.1
|
||||
|
||||
|
|
@ -1,27 +1,29 @@
|
|||
%define source_name usb-modeswitch
|
||||
%define source_name usb-modeswitch
|
||||
|
||||
Name: usb_modeswitch
|
||||
Version: 2.6.1
|
||||
Release: 5%{?dist}
|
||||
Summary: USB Modeswitch gets mobile broadband cards in operational mode
|
||||
Summary(de): USB Modeswitch aktiviert UMTS-Karten
|
||||
License: GPLv2+
|
||||
URL: http://www.draisberghof.de/usb_modeswitch/
|
||||
Name: usb_modeswitch
|
||||
Version: 2.6.2
|
||||
Release: 6%{?dist}
|
||||
Summary: USB Modeswitch gets mobile broadband cards in operational mode
|
||||
Summary(de): USB Modeswitch aktiviert UMTS-Karten
|
||||
License: GPL-2.0-or-later
|
||||
URL: http://www.draisberghof.de/usb_modeswitch/
|
||||
|
||||
Source0: http://www.draisberghof.de/%{name}/%{source_name}-%{version}.tar.bz2
|
||||
Source1: http://www.draisberghof.de/usb_modeswitch/device_reference.txt
|
||||
Source0: http://www.draisberghof.de/%{name}/%{source_name}-%{version}.tar.bz2
|
||||
Source1: http://www.draisberghof.de/usb_modeswitch/device_reference.txt
|
||||
|
||||
# Submitted upstream (2014-11-24)
|
||||
Patch0: device_reference-utf8.patch
|
||||
# Not submitted upstream due to lack of courage
|
||||
Patch1: usb_modeswitch-2.6.2-SIGTERM.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libusbx-devel
|
||||
BuildRequires: libusbx-devel
|
||||
# "tcl" or "jimsh"), use the light-weight installation:
|
||||
#BuildRequires: jimtcl-devel
|
||||
BuildRequires: systemd
|
||||
Requires: usb_modeswitch-data >= 20121109
|
||||
Requires: systemd
|
||||
#BuildRequires: jimtcl-devel
|
||||
BuildRequires: systemd
|
||||
Requires: usb_modeswitch-data >= 20121109
|
||||
Requires: systemd
|
||||
|
||||
%description
|
||||
USB Modeswitch brings up your datacard into operational mode. When plugged
|
||||
|
|
@ -30,7 +32,7 @@ installation files. This tool deactivates this cdrom-device and enables
|
|||
the real communication device. It supports most devices built and
|
||||
sold by Huawei, T-Mobile, Vodafone, Option, ZTE, Novatel.
|
||||
|
||||
%description -l de
|
||||
%description -l de
|
||||
USB Modeswitch deaktiviert die CDROM-Emulation einiger UMTS-Karten.
|
||||
Dadurch erkennt Linux die Datenkarte und kann damit Internet-
|
||||
Verbindungen aufbauen. Die gängigen Karten von Huawei, T-Mobile,
|
||||
|
|
@ -41,7 +43,8 @@ Vodafone, Option, ZTE und Novatell werden unterstützt.
|
|||
%setup -q -n %{source_name}-%{version}
|
||||
cp -f %{SOURCE1} device_reference.txt
|
||||
|
||||
%patch0 -p0
|
||||
%patch 0 -p0
|
||||
%patch 1 -p1
|
||||
|
||||
|
||||
%build
|
||||
|
|
@ -52,10 +55,11 @@ cp -f %{SOURCE1} device_reference.txt
|
|||
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
%make_install \
|
||||
SYSDIR=$RPM_BUILD_ROOT%{_unitdir} \
|
||||
UDEVDIR=$RPM_BUILD_ROOT%{_prefix}/lib/udev
|
||||
SYSDIR=%{buildroot}%{_unitdir} \
|
||||
SBINDIR=%{buildroot}%{_sbindir} \
|
||||
UDEVDIR=%{buildroot}%{_prefix}/lib/udev
|
||||
|
||||
|
||||
%files
|
||||
|
|
@ -66,10 +70,54 @@ mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
|||
%{_prefix}/lib/udev/usb_modeswitch
|
||||
%{_unitdir}/usb_modeswitch@.service
|
||||
%config(noreplace) %{_sysconfdir}/usb_modeswitch.conf
|
||||
%doc COPYING README ChangeLog device_reference.txt
|
||||
%doc README ChangeLog device_reference.txt
|
||||
%license COPYING
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.2-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
|
||||
|
||||
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.2-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||
|
||||
* Thu Aug 14 2025 Lubomir Rintel <lkundrak@v3.sk> - 2.6.2-4
|
||||
- Do not let the unit send SIGTERM to usb_modeswitch mid-switch.
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Thu Feb 27 2025 Sérgio Basto <sergio@serjux.com> - 2.6.2-2
|
||||
- Revert the move of usb_modeswitch to /usr/lib/udev/rules.d, usb_modeswitch is
|
||||
not an rule
|
||||
|
||||
* Thu Feb 20 2025 Sérgio Basto <sergio@serjux.com> - 2.6.2-1
|
||||
- Update usb_modeswitch to 2.6.2
|
||||
- Resolves: rhbz#2346392
|
||||
- Fix build related to /usr/sbin move
|
||||
|
||||
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Thu Nov 2 2023 Íñigo Huguet <ihuguet@redhat.com> - 2.6.1-9
|
||||
- Really use SPDX license specifier
|
||||
|
||||
* Thu Aug 24 2023 Till Maas <opensource@till.name> - 2.6.1-8
|
||||
- Cleanup spec: use %%license, use %%patch 0
|
||||
- Use spdx license specifier
|
||||
|
||||
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue