Compare commits

..

61 commits

Author SHA1 Message Date
Fedora Release Engineering
d1134f5058 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 08:15:41 +00:00
Fedora Release Engineering
f8de5edc68 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 19:41:04 +00:00
Lubomir Rintel
498f59aeed Do not let the unit send SIGTERM to usb_modeswitch mid-switch. 2025-08-14 16:52:19 +02:00
Fedora Release Engineering
98f0e006be Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 19:51:55 +00:00
Sérgio M. Basto
75c8580965 Revert the move of usb_modeswitch to /usr/lib/udev/rules.d, usb_modeswitch is
not an rule
2025-02-27 13:05:59 +00:00
Sérgio M. Basto
4898f94e0e vim :retab 2025-02-20 01:26:39 +00:00
Sérgio M. Basto
b2294969f2 Update usb_modeswitch to 2.6.2
Resolves: rhbz#2346392
2025-02-20 01:25:59 +00:00
Fedora Release Engineering
ec98dd90b0 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 13:55:05 +00:00
Fedora Release Engineering
109fa600da Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 08:24:06 +00:00
Fedora Release Engineering
d4c4cd8bdc Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 07:16:03 +00:00
Íñigo Huguet
674dbed569 Really use SPDX license identifier 2023-11-02 16:00:46 +01:00
Till Maas
80331ece0f Cleanup spec: use %license, use %patch 0
- Use spdx license specifier
- Remove unused patch
2023-08-24 19:35:03 +02:00
Fedora Release Engineering
2e63e4c74f Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 17:15:04 +00:00
Fedora Release Engineering
c848680bae Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 05:57:03 +00:00
Fedora Release Engineering
a38ecae852 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 11:31:50 +00:00
Fedora Release Engineering
9718ae0f03 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 03:38:53 +00:00
Fedora Release Engineering
49b5091342 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 20:09:46 +00:00
Fedora Release Engineering
6ca83012be - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 22:46:57 +00:00
Tom Stellard
9001135f20 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-09 00:29:12 +00:00
Sérgio M. Basto
8258cbbb77 Update usb_modeswitch to 2.6.1
Drop patch1, http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=2&t=2733
Drop BR jimtcl-devel, if we don't install dynlink-dispatcher
2020-11-30 00:39:59 +00:00
Sérgio M. Basto
421c517eaf Use make macros (https://src.fedoraproject.org/rpms/usb_modeswitch/pull-request/1)
https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
2020-09-29 23:58:21 +01:00
Fedora Release Engineering
8a2687d26d - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 13:24:50 +00:00
Lubomir Rintel
870d68e8f3 New 2.6.0 release 2020-03-24 15:51:28 +01:00
Fedora Release Engineering
d78d63e3d2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-31 02:45:54 +00:00
Fedora Release Engineering
b19e83bb54 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-27 02:38:54 +00:00
Fedora Release Engineering
abe42ed6b8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-03 10:56:53 +00:00
0f7f377d1b Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:53 +01:00
5e11010ea9
Add missing BuildRequires on gcc
/bin/sh: cc: command not found

References: https://bugzilla.redhat.com/show_bug.cgi?id=1606622
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-24 16:37:42 +02:00
Fedora Release Engineering
583d7c7500 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-14 08:19:42 +00:00
Lubomir Rintel
44f1f68290 New 2.5.2 release 2018-02-28 22:19:47 +01:00
Florian Weimer
881e9241f3 Use LDFLAGS from redhat-rpm-config 2018-02-23 16:23:06 +01:00
Fedora Release Engineering
a0cc21923b - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-09 20:10:11 +00:00
Lubomir Rintel
167d48b6f3 New 2.5.1 release 2017-08-18 11:05:10 +02:00
Fedora Release Engineering
1bc4210f1e - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 09:53:06 +00:00
Fedora Release Engineering
cbb6ca7b09 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 21:04:46 +00:00
Fedora Release Engineering
779c2a9b03 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-11 16:49:30 +00:00
Lubomir Rintel
238128f1f9 Bump the release number to be higher than in Fedora 24 2016-07-29 09:51:21 +02:00
Lubomir Rintel
3965ee0d29 BR systemd for _unitdir macro 2016-07-21 19:20:00 +02:00
Lubomir Rintel
85d527ef90 BR systemd for _unitdir macro 2016-07-21 19:19:37 +02:00
Lubomir Rintel
44f5b8c9ee Fix undefined behavior in config parser 2016-07-21 18:57:33 +02:00
Lubomir Rintel
3926c0e434 Two fixes
- Add the previously omitted systemd service file (rh #1352055)
- Fix crash with invalid arguments (rh #1358472)
2016-07-20 21:50:44 +02:00
Lubomir Rintel
56942f2771 Add an upstream patch note 2016-06-22 14:36:30 +02:00
Lubomir Rintel
d272fa639a Update the manpage patch 2016-06-22 14:19:07 +02:00
Lubomir Rintel
52ec3eae85 New 2.4.0 release 2016-06-22 14:04:35 +02:00
Lubomir Rintel
37d3d152ff New 2.3.0 release 2016-05-03 14:35:33 +02:00
Fedora Release Engineering
878865efb9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-05 02:26:53 +00:00
Lubomir Rintel
ff9eddd797 New 2.2.5 release 2015-08-18 15:32:20 +02:00
Dennis Gilmore
1574df5120 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-19 01:41:15 +00:00
Peter Robinson
ae5dc33d56 2.2.1 2015-02-22 16:20:20 +00:00
Till Maas
0b0c2da0cd Update device_reference.txt 2014-11-24 20:54:43 +01:00
Robert M. Albrecht
cfc953b88f New upstream release
- Fixed a typo in the description
2014-08-26 21:10:24 +02:00
7483e64331 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-18 07:13:35 +00:00
Dennis Gilmore
084e42c86a - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 22:03:14 -05:00
Peter Robinson
4c009eaaec add the patch, likely needs to be rebased 2014-04-16 15:19:05 +01:00
Peter Robinson
93378f42c6 Update to 2.1.1 2014-04-16 15:12:03 +01:00
Dan Williams
fe3bcefafb Resurrect manpage patch 2014-01-28 16:51:23 -06:00
Peter Robinson
12b0446425 - Update to 2.0.1 and build against libusbx (RHBZ 994974)
- Use distro jimtcl (RHBZ 967314)
- Fix build on aarch64
- Cleanup and modernise spec
2014-01-06 18:09:24 +00:00
Dan Williams
f26b0a5f27 Fix wrong date in changelog 2013-08-28 08:22:53 -05:00
Thomas Haller
e683b4bf99 fix manual pages for usb_modeswitch
- remove obsolete patch usb_modeswitch-dir.patch.
- add a manual page for usb_modeswitch_dispatcher (rh #884203).
- fix several inconsistencies in the manual page and the
  help output of usb_modeswitch (rh #948451).

Resolves: #948451
Resolves: #884203
2013-08-28 08:14:21 -05:00
Dan Williams
c227b39ce2 Fix changelog date 2013-08-26 10:41:33 -05:00
Dan Williams
394c8bf499 Fix udev helper path 2013-08-26 10:37:20 -05:00
6 changed files with 324 additions and 277 deletions

View file

@ -0,0 +1,74 @@
--- device_reference.txt 2014-05-29 22:18:46.000000000 +0200
+++ device_reference_utf8.txt 2014-11-24 20:51:17.647221466 +0100
@@ -60,7 +60,7 @@
########################################################
# Option GlobeTrotter GT MAX 3.6 (aka "T-Mobile Web'n'walk Card Compact II")
#
-# Contributor: Bernd Holzmüller
+# Contributor: Bernd Holzmüller
DefaultVendor= 0x05c6
DefaultProduct= 0x1000
@@ -279,7 +279,7 @@
#
# Probably works with DetachStorageOnly too
#
-# Contributor: Flávio Moringa and others
+# Contributor: Flávio Moringa and others
DefaultVendor= 0x19d2
DefaultProduct= 0x2000
@@ -777,7 +777,7 @@
#
# Recommended init command: ATE0V1&D2&C1S0=0
#
-# Contributor: Jérôme Oufella
+# Contributor: Jérôme Oufella
DefaultVendor= 0x1004
DefaultProduct= 0x1000
@@ -1336,7 +1336,7 @@
########################################################
# LG HDM-2100 (EVDO Rev.A USB modem)
#
-# Contributor: Jérôme Oufella
+# Contributor: Jérôme Oufella
DefaultVendor= 0x1004
DefaultProduct=0x607f
@@ -1641,7 +1641,7 @@
########################################################
# Huawei U8110 / U8300 / Joy, Vodafone 845 (Android smartphone)
#
-# Contributor: David Erosa García
+# Contributor: David Erosa García
DefaultVendor= 0x12d1
DefaultProduct=0x1031
@@ -1658,7 +1658,7 @@
########################################################
# Nokia CS-10
#
-# Contributor: Wacław Sierek
+# Contributor: Wacław Sierek
DefaultVendor= 0x0421
DefaultProduct=0x060c
@@ -1700,7 +1700,7 @@
#######################################################
# Samsung GT-B3730
#
-# Contributor: Per Øyvind Karlsen
+# Contributor: Per Øyvind Karlsen
DefaultVendor= 0x04e8
DefaultProduct=0x689a
@@ -1771,7 +1771,7 @@
#######################################################
# Huawei EC168C (from Zantel)
#
-# Contributor: Ã…smund Hjulstad
+# Contributor: Åsmund Hjulstad
DefaultVendor= 0x12d1
DefaultProduct=0x1446

View file

@ -1,16 +1,16 @@
#
# Device and Configuration Reference (UTF-8 encoding used)
# Device Reference (UTF-8 encoding used)
#
# Last modified: 2013-11-13
# 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,193 +21,18 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# For custom settings:
# Numbers can be decimal or hexadecimal, MessageStrings MUST be
# hexadecimal without prepended "0x". Digits 9-16 in the known
# MessageStrings are arbitrary; I set them to "12345678"
# What it all means (short command line flags appended):
# For a parameter reference see file REFERENCE in the data package or
# http://www.draisberghof.de/usb_modeswitch/parameter_reference.txt
#
#
# * DefaultVendor -v <hex number>
# * DefaultProduct -p <hex number>
#
# This is the ID the USB device shows after having been plugged in.
# The program needs this, either on the command line or in the config
# file; if not found -> no action.
#
#
# * TargetVendor -V <hex number>
# * TargetProduct -P <hex number>
#
# These are the IDs of the USB device after successful mode switching.
# They are optional, but I recommend to provide them for better analysis.
# You definitely need them if you enable CheckSuccess (see below)
#
#
# * TargetProductList (file only) <comma separated hex strings>
#
# Like TargetProduct, but more than one possibility. Only used in automated
# config files (in /etc/usb_modeswitch.d).
#
#
# * TargetClass -C <hex number>
#
# Some weird devices don't change IDs. They only switch the device class.
# If the device has the target class -> no action (and vice versa)
#
#
# * MessageEndpoint -m <hex number>
#
# A kind of address inside the interface to which the "message"
# (the sequence that does the actual switching) is directed.
# Obsolete since version 0.9.7, only useful for testing
#
#
# * MessageContent -M <hex string>
#
# A hex string containing the "message" sequence; it will be
# sent as a USB bulk transfer
#
#
# * MessageContent2, ...3 -2/-3 <hex string>
#
# Additional "messages". Use with "NeedResponse"!
#
#
# * ReleaseDelay -w <milliseconds>
#
# Waiting time after message transfers. Helps with some sensitive devices
# that don't want any traffic after the mode switch initialisation
#
#
# * ResponseEndpoint -r <hex number>
# * NeedResponse <0/1> -n
#
# Some devices were reported to require receiving the response of the
# bulk transfer to do the switching properly. Usually not needed.
# Starting from version 1.0.0 the ResponseEndpoint is autodetected
# if not given
#
#
# * DetachStorageOnly <0/1> -d
#
# Some early devices just needed to be detached from the usb-storage
# driver to initiate the mode switching. Now paractically obsolete for
# switching, but still comes handy sometimes
#
#
# * HuaweiMode <0/1> -H
#
# Some early Huawei devices can be switched by a special control
# message. Don't use with recent devices
#
#
# * SonyMode <0/1> -O
#
# Some Sony-Ericsson devices can be switched by a special control
# message. May take a long time (20+ seconds).
#
#
# * SierraMode <0/1> -S
# * KobilMode <0/1> -T
# * GCTMode <0/1> -G
# * SequansMode <0/1> -N
# * MobileActionMode <0/1> -A
# * QisdaMode <0/1> -B
# * QuantaMode <0/1> -E
# * PantechMode <0/1> -F
# * BlackberryMode <0/1> -Z
# * CiscoMode <0/1> -L
#
#
# Flags to support devices that need special control messages.
# The names are referring to the respective manufacturers.
#
#
# * ResetUSB <0/1> -R
#
# Few devices or systems need a rougher treatment. If the switching seems
# to do something but your system does not reflect it, try this somewhat
# brutal method to do a reset after switching.
# Mind that if your device switched OK before, this may set it back to
# storage mode ...
#
#
# * Interface -i <hex number>
# * Configuration -u <hex number>
# * AltSetting -a <hex number>
#
# More USB parameter to help with tricky devices and for doing lots
# of cruel experiments ...
#
## Note:
## AltSetting/Configuration changes and ResetUSB are executed after all
## other steps and can be combined or used on their own (e.g. a reset
## might have the same effect as a manual replug)
#
#
# * InquireDevice <0|1> -I (disables inquiry)
#
# The standard since 1.0.0 is to do a SCSI inquiry on the default device
# before other actions. This might be a future way to identify a device
# without ambiguities. If it causes trouble with your device, just disable.
#
#
# * CheckSuccess -s <number>
#
# Check continuously if the switch succeeded for max <number> seconds.
# First, an interface access test: most devices vanish after
# switching and can't be accessed anymore.
# Second, a recount of target devices: one more than at the initial
# count, at the same bus with a higher device number -> device
# switched fine.
# It's safe to give a higher value than needed; checking stops as
# soon as the target device is found
#
#
# * NoDriverLoading <0|1> (no command line parameter)
#
# The binary tells the wrapper script NOT to check for and initiate
# binding of the serial driver after switching.
# Mostly useful for non-modem devices.
#
#
# * WaitBefore <seconds> (no command line parameter)
#
# Waiting time before taking any action. Helps with some sensitive setups.
#
#
# * NoMBIMCheck <0|1> (no command line parameter)
#
# Disable the check for new MBIM standard devices, which is always done
# by default.
#
#
#
# -> All other entries in config files are just ignored <-
# Additional command line flags:
#
# Verbose output -W
# No output at all -q
# Use config file -c <file>
# Use stdin for long config -t
# Give long config as string -f <multiline string using config file syntax>
# Give bus number for ID'ing -b
# Give dev number for ID'ing -g
# For filling in all this information for an unknown device,
# see instructions and links on the homepage:
# http://www.draisberghof.de/usb_modeswitch
#
# If you find working codes and configurations, please contribute
# If you find new working codes and configurations, please report
# them!
#######################################################
# Option GlobeSurfer Icon (aka "Vodafone EasyBox")
# This is the thing that started it all ...
#
# The MessageContent is identical for all Option devices

View file

@ -1,48 +0,0 @@
diff -up usb-modeswitch-1.2.7/usb_modeswitch.c.fix-manual-pages usb-modeswitch-1.2.7/usb_modeswitch.c
--- usb-modeswitch-1.2.7/usb_modeswitch.c.fix-manual-pages 2013-08-20 12:12:10.752953754 +0200
+++ usb-modeswitch-1.2.7/usb_modeswitch.c 2013-08-20 12:37:27.415242925 +0200
@@ -1968,7 +1968,8 @@ void printHelp()
" -g, --device-num NUM system device number (for hard ID)\n"
" -m, --message-endpoint NUM direct the message transfer there (optional)\n"
" -M, --message-content <msg> message to send (hex number as string)\n"
- " -2 <msg>, -3 <msg> additional messages to send (-n recommended)\n"
+ " -2, --message-content2 <msg> additional messages to send (-n recommended)\n"
+ " -3, --message-content3 <msg> additional messages to send (-n recommended)\n"
" -n, --need-response read response to the message transfer (CSW)\n"
" -r, --response-endpoint NUM read response from there (optional)\n"
" -d, --detach-only detach the active driver, no further action\n"
@@ -1989,10 +1990,11 @@ void printHelp()
" -B, --qisda-mode apply a special procedure\n"
" -E, --quanta-mode apply a special procedure\n"
" -R, --reset-usb reset the device after all other actions\n"
+ " -w, --release-delay <seconds> delay releasing the interface\n"
" -Q, --quiet don't show progress or error messages\n"
" -W, --verbose print all settings and debug output\n"
" -D, --sysmode specific result and syslog message\n"
- " -s, --success <seconds> switching result check with timeout\n"
+ " -s, --check-success <seconds> switching result check with timeout\n"
" -I, --no-inquire do not get SCSI attributes (default on)\n\n"
" -c, --config-file <filename> load long configuration from file\n\n"
" -t, --stdinput read long configuration from stdin\n\n"
diff -up usb-modeswitch-1.2.7/usb_modeswitch_dispatcher.1.fix-manual-pages usb-modeswitch-1.2.7/usb_modeswitch_dispatcher.1
--- usb-modeswitch-1.2.7/usb_modeswitch_dispatcher.1.fix-manual-pages 2013-08-20 11:59:15.467713141 +0200
+++ usb-modeswitch-1.2.7/usb_modeswitch_dispatcher.1 2013-08-20 12:57:51.913947292 +0200
@@ -0,0 +1,18 @@
+.TH "USB_MODESWITCH_DISPATCHER" "1"
+.SH "NAME"
+usb_modeswitch_dispatcher - dispatcher not intended for direct invocation.
+.SH "SYNOPSIS"
+.PP
+\fBusb_modeswitch_dispatcher\fR
+.SH "DESCRIPTION"
+.PP
+usb_modeswitch_dispatcher is doing additional device checking and
+using the usb_modeswitch binary to switch with the selected device config file.
+If no drivers are taking care of the device after the mode switch, the dispatcher
+will try to load and bind the "option" serial driver, in order to make the device
+usable.
+.PP
+This program is called by udev and is not supposed to be called directly
+by the user.
+.SH SEE ALSO
+.BR usb_modeswitch(1).

View file

@ -1 +1 @@
e48d4419d0574d342bb183f7465556d0 usb-modeswitch-2.0.1.tar.bz2
SHA512 (usb-modeswitch-2.6.2.tar.bz2) = adaedf89de3c5f9dc55da7bb5bb3fe8165c0424cffacb00f83876094b7abdc386ced9959e5dbdf46ab06aa1d03fbfca13df539421489ef4d2dd0f72742057f3d

View 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

View file

@ -1,32 +1,38 @@
%define source_name usb-modeswitch
%define source_name usb-modeswitch
Name: usb_modeswitch
Version: 2.0.1
Release: 2%{?dist}
Summary: USB Modeswitch gets mobile broadband cards in operational mode
Summary(de): USB Modeswitch aktiviert UMTS-Karten
Group: Applications/System
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
Patch0: rhbz948451-fix-manual-pages.patch
# 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: libusbx-devel
BuildRequires: jimtcl-devel
BuildRequires: systemd-devel
Requires: usb_modeswitch-data >= 20121109
BuildRequires: make
BuildRequires: gcc
BuildRequires: libusbx-devel
# "tcl" or "jimsh"), use the light-weight installation:
#BuildRequires: jimtcl-devel
BuildRequires: systemd
Requires: usb_modeswitch-data >= 20121109
Requires: systemd
%description
USB Modeswitch brings up your datacard into operational mode. When plugged
in they identify themselves as cdrom and present some non-Linux compatible
installation files. This tool deactivates this cdrom-devices and enables
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,
@ -35,33 +41,25 @@ Vodafone, Option, ZTE und Novatell werden unterstützt.
%prep
%setup -q -n %{source_name}-%{version}
%patch0 -p1 -b .manpage
cp -f %{SOURCE1} device_reference.txt
# convert device_reference.txt encoding to UTF-8
iconv --from=ISO-8859-1 --to=UTF-8 device_reference.txt > device_reference.txt.new && \
touch -r device_reference.txt device_reference.txt.new && \
chmod 644 device_reference.txt && \
mv device_reference.txt.new device_reference.txt
%patch 0 -p0
%patch 1 -p1
%build
CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags}
%{set_build_flags}
# this will require jimtcl-devel
#make_build all-with-dynlink-dispatcher
%make_build
%install
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/udev
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
install -p -m 755 usb_modeswitch $RPM_BUILD_ROOT%{_sbindir}/
install -p -m 755 usb_modeswitch_dispatcher $RPM_BUILD_ROOT%{_sbindir}/usb_modeswitch_dispatcher
install -p -m 644 usb_modeswitch.conf $RPM_BUILD_ROOT%{_sysconfdir}/
gzip -9c usb_modeswitch.1 > usb_modeswitch.1.gz && install -m 644 usb_modeswitch.1.gz $RPM_BUILD_ROOT%{_datadir}/man/man1
gzip -9c usb_modeswitch_dispatcher.1 > usb_modeswitch_dispatcher.1.gz && install -m 644 usb_modeswitch_dispatcher.1.gz $RPM_BUILD_ROOT%{_datadir}/man/man1
install -p -m 755 usb_modeswitch.sh $RPM_BUILD_ROOT%{_prefix}/lib/udev/usb_modeswitch
mkdir -p %{buildroot}%{_unitdir}
%make_install \
SYSDIR=%{buildroot}%{_unitdir} \
SBINDIR=%{buildroot}%{_sbindir} \
UDEVDIR=%{buildroot}%{_prefix}/lib/udev
%files
@ -70,11 +68,160 @@ install -p -m 755 usb_modeswitch.sh $RPM_BUILD_ROOT%{_prefix}/lib/udev/usb_modes
%{_mandir}/man1/usb_modeswitch.1.gz
%{_mandir}/man1/usb_modeswitch_dispatcher.1.gz
%{_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
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Nov 18 2020 Sérgio Basto <sergio@serjux.com> - 2.6.1-1
- Update usb_modeswitch to 2.6.1
- Drop patch1, http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=2&t=2733
- Drop BR jimtcl-devel, if we don't install dynlink-dispatcher
* Tue Sep 29 2020 Sérgio Basto <sergio@serjux.com> - 2.6.0-3
- Use make macros (https://src.fedoraproject.org/rpms/usb_modeswitch/pull-request/1)
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Mar 24 2020 Lubomir Rintel <lkundrak@v3.sk> - 2.6.0-1
- New 2.6.0 release
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 28 2018 Lubomir Rintel <lkundrak@v3.sk> - 2.5.2-1
- New 2.5.2 release
* Fri Feb 23 2018 Florian Weimer <fweimer@redhat.com> - 2.5.1-3
- Use LDFLAGS from redhat-rpm-config
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Aug 18 2017 Lubomir Rintel <lkundrak@v3.sk> - 2.5.1-1
- New 2.5.1 release
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Jul 29 2016 Lubomir Rintel <lkundrak@v3.sk> - 2.4.0-5
- Bump the release number to be higher than in Fedora 24
* Thu Jul 21 2016 Lubomir Rintel <lkundrak@v3.sk> - 2.4.0-3
- Fix undefined behavior in config parser (rh #1352055)
* Wed Jul 20 2016 Lubomir Rintel <lkundrak@v3.sk> - 2.4.0-2
- Add the previously omitted systemd service file (rh #1352055)
- Fix crash with invalid arguments (rh #1358472)
* Wed Jun 22 2016 Lubomir Rintel <lkundrak@v3.sk> - 2.4.0-1
- New 2.4.0 release
* Tue May 03 2016 Lubomir Rintel <lkundrak@v3.sk> - 2.3.0-1
- New 2.3.0 release
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Aug 18 2015 Lubomir Rintel <lkundrak@v3.sk> - 2.2.5-1
- New 2.2.5 release
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Feb 22 2015 Peter Robinson <pbrobinson@fedoraproject.org> 2.2.1-1
- New 2.2.1 release
* Mon Nov 24 2014 Till Maas <opensource@till.name> - 2.2.0-2
- Update device_reference.txt, make it proper UTF-8
* Tue Aug 26 2014 Robert M. Albrecht <mail@romal.de> - 2.2.0-1
- New upstream release
- Fixed a typo in the description
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed Apr 16 2014 Peter Robinson <pbrobinson@fedoraproject.org> 2.1.1-1
- Update to 2.1.1
* Tue Jan 28 2014 Dan Williams <dcbw@redhat.com> - 2.0.1-2
- Resurrect manpage patch