summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2018-02-23 20:56:18 +0100
committerDidier Raboud <odyx@debian.org>2018-02-23 20:56:18 +0100
commit47d984475503ae140690835577bf4a6f956703b6 (patch)
treed59efc0f4133a05371d40f6adca0bdb322a99a0a
parent97c310418e4266fd2a69633786e2b09e03584ed9 (diff)
parent23bed021135e9be079bb8266968be4e439ca7e70 (diff)
usb-modeswitch (2.5.2+repack0-2) unstable; urgency=medium
* Update Vcs-* for the move to Salsa [dgit import unpatched usb-modeswitch 2.5.2+repack0-2]
-rw-r--r--debian/.git-dpm8
-rw-r--r--debian/NEWS54
-rw-r--r--debian/README.Debian18
-rw-r--r--debian/README.source11
-rw-r--r--debian/changelog663
-rw-r--r--debian/compat1
-rw-r--r--debian/control38
-rw-r--r--debian/copyright58
-rw-r--r--debian/docs1
-rw-r--r--debian/gbp.conf3
-rw-r--r--debian/patches/0001-Fix-official-l-y-typo.patch22
-rw-r--r--debian/patches/0002-Use-package-provided-jimsh-and-libjim.patch37
-rw-r--r--debian/patches/0003-Detect-if-systemd-is-running-not-only-if-its-corresp.patch27
-rw-r--r--debian/patches/0004-Set-TMPDIR-run-for-usb_modeswitch_dispatcher.patch45
-rw-r--r--debian/patches/0005-Allow-replacing-pkg-config-with-triplet-pkg-config.patch24
-rw-r--r--debian/patches/0006-Add-Documentation-pointer-in-systemd-service-unit.patch20
-rw-r--r--debian/patches/series6
-rwxr-xr-xdebian/rules35
-rw-r--r--debian/source/format1
-rw-r--r--debian/usb-modeswitch.dirs1
-rw-r--r--debian/usb-modeswitch.docs1
-rw-r--r--debian/usb-modeswitch.install6
-rw-r--r--debian/usb-modeswitch.maintscript1
-rw-r--r--debian/usb-modeswitch.prerm12
-rw-r--r--debian/watch3
25 files changed, 1096 insertions, 0 deletions
diff --git a/debian/.git-dpm b/debian/.git-dpm
new file mode 100644
index 0000000..b44f7f2
--- /dev/null
+++ b/debian/.git-dpm
@@ -0,0 +1,8 @@
+# see git-dpm(1) from git-dpm package
+52511ac77b0c4d97d6c52b8a27868f93bc6417c8
+52511ac77b0c4d97d6c52b8a27868f93bc6417c8
+b5fd485fa9d90311e2210f393b730bd7ea8cba37
+b5fd485fa9d90311e2210f393b730bd7ea8cba37
+usb-modeswitch_2.5.2+repack0.orig.tar.xz
+f9d91e70309664721bde8df3903a99db0865d82b
+44144
diff --git a/debian/NEWS b/debian/NEWS
new file mode 100644
index 0000000..12f8930
--- /dev/null
+++ b/debian/NEWS
@@ -0,0 +1,54 @@
+usb-modeswitch (1.0.5-1) unstable; urgency=low
+
+ UPSTREAM: Version 1.0.5 introduces two major changes.
+
+ * The devices configuration is split:
+ - /etc/usb_modeswitch.conf is dropped in favor of files in
+ /etc/usb_modeswitch.d/
+ - This means that the customisation or new devices that were defined in
+ /etc/usb_modeswitch.conf will be _LOST_.
+ + Normally, there no need anymore to play with comments and such to only
+ get the correct devices switched.
+
+ * The detection of devices is greatly improved:
+ - /etc/udev/rules.d/usb_modeswitch.rules (Debian-specific) is dropped in
+ favor of /etc/udev/rules.d/80-usb_modeswitch.rules (from upstream).
+ These rules call /usr/share/usb_modeswitch/usb_modeswitch.{sh,tcl} to
+ handle the automagical detection and switching of the devices.
+ - This means that any device selection done by comment-tweak in the
+ Debian-specific .rules file will be lost.
+ + But it is normally replaced by a superior and more universal device
+ detection.
+
+ Finally, if you had modified /etc/usb_modeswitch.conf to insert home-brewn
+ tweaks, you will need to migrate these tweaks to /etc/usb_modeswitch.d/*
+ files. But if you had only selected alternative devices in
+ /etc/udev/usb_modeswitch.rules, you should normally have nothing to do, as
+ these alternatives should now be detected (read below).
+
+ DEBIAN: Version 1.0.5-1 now makes the rules "opt-in"
+
+ * udev (from version 146-1) now ships a modem-modeswitch program that does
+ what usb-modeswitch used to do. To ensure that the transition to this udev
+ facility is smooth for everyone, the usb-modeswitch program is kept, but
+ with an opt-in /etc/udev/rules.d/80-usb_modeswitch.rules.
+ * Thus if modem-modeswitch from udev (>= 146-1) works for your device, you
+ can uninstall usb-modeswitch.
+ * A contrario, if modem-modeswitch doesn't switch your device, please file a
+ bug against udev and edit /etc/udev/rules.d/80-usb_modeswitch.rules to
+ enable it.
+
+ -- Didier Raboud <didier@raboud.com> Tue, 03 Nov 2009 11:02:40 +0100
+
+usb-modeswitch (1.0.2-1) unstable; urgency=low
+
+ For the 1.0.0 release, the command line options have changed in two ways from
+ their behavior in the 0.9.* versions:
+ * On/off flags don't require arguments anymore (e.g. '-H' instead of '-H 1')
+ * long option names changed to standard format (e.g. --huawei-mode instead
+ of --HuaweiMode).
+
+ The old options are _not_ recognised and _will_ make usb_modeswitch fail. So
+ check your scripts and everything that might be using these command lines.
+
+ -- Didier Raboud <didier@raboud.com> Thu, 11 Jun 2009 16:59:03 +0200
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..a391a97
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,18 @@
+usb-modeswitch for Debian
+-------------------------
+
+In Debian, usb-modeswitch is supposed to work automagically for all devices
+known to work :
+
+ /lib/udev/rules.d/40-usb_modeswitch.rules is a udev rules file provided by
+ usb-modeswitch-data. Along with the /lib/udev/usb_modeswitch and the
+ /usr/sbin/usb_modeswitch binary, it should trigger the flip-flop switch
+ when the device is plugged in.
+
+ If this method doesn't work, please go to usb_modeswitch homepage:
+ http://www.draisberghof.de/usb_modeswitch/
+ … and follow instructions. Once you have a working method for you device,
+ please report it there: in any case, I don't intend to divert much from
+ upstream.
+
+ -- Didier Raboud <didier@raboud.com> Tue, 12 Jan 2010 14:33:53 +0100
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..bf9100f
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,11 @@
+This package uses quilt for upstream source code patch management. Please read
+/usr/share/doc/quilt/README.source for more information how to apply, unapply,
+add, modify or remove patches.
+
+Please note that /usr/share/doc/quilt/README.source is only available in quilt
+version 0.46-4.1 or later.
+
+To use quilt with dh:
+ - add debhelper (>= 7.2.14) build dependency
+ - add quilt (>= 0.46-7) build dependency
+ - use quilt addon (e.g. dh --with quilt $@)
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..d53e142
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,663 @@
+usb-modeswitch (2.5.2+repack0-2) unstable; urgency=medium
+
+ * Update Vcs-* for the move to Salsa
+
+ -- Didier Raboud <odyx@debian.org> Fri, 23 Feb 2018 20:56:18 +0100
+
+usb-modeswitch (2.5.2+repack0-1) unstable; urgency=medium
+
+ * New upstream version 2.5.2
+ * Set priority optional
+ * Drop unused source lintian override
+ * Bump debhelper compat to 11
+ * Mangle version in debian/watch
+ * Drop trailing whitespace in debian/changelog
+ * Rewrite debian/copyright with CF1.0
+ * Bump S-V to 4.1.3
+
+ -- Didier Raboud <odyx@debian.org> Sun, 07 Jan 2018 12:32:11 +0100
+
+usb-modeswitch (2.5.1+repack0-1) unstable; urgency=medium
+
+ * New upstream version 2.5.1
+ * Bump debhelper compat to 10
+ * Bump S-V to 4.1.0 without changes needed
+ * Cleanup patch-suite:
+ - Remove upstart-specific enhancements
+ - Drop patch naming
+ - Add Documentation pointer in systemd service unit
+ * Stop installing the upstart conffile
+ * Drop all postinst code managing versions before the current
+ oldoldstable (wheezy, 1.2.3)
+
+ -- Didier Raboud <odyx@debian.org> Fri, 25 Aug 2017 09:41:39 +0200
+
+usb-modeswitch (2.5.0+repack0-1) unstable; urgency=medium
+
+ * New 2.5.0 upstream release
+ * Initialize git-dpm with the existing patches
+
+ -- Didier Raboud <odyx@debian.org> Mon, 23 Jan 2017 08:10:40 +0100
+
+usb-modeswitch (2.4.0+repack0-1) unstable; urgency=medium
+
+ * New 2.4.0 upstream release
+ * Refresh patches
+ * Bump S-V to 3.9.8 without changes needed
+ * Set hardening=+all in DEB_BUILD_MAINT_OPTIONS
+ * Use the https alternative in VCS-Browser
+ * Add patch to fix official{,l}y typo
+
+ -- Didier Raboud <odyx@debian.org> Mon, 13 Jun 2016 08:52:09 +0200
+
+usb-modeswitch (2.3.0+repack0-1) unstable; urgency=medium
+
+ * New 2.3.0 upstream release
+ - Fixed bug which prevented early logging
+ * Remove patch to use udev-specific code to wait on /usr mount
+ (Closes: #810104)
+ * Update gbp.conf
+
+ -- Didier Raboud <odyx@debian.org> Wed, 13 Jan 2016 15:56:26 +0100
+
+usb-modeswitch (2.2.6+repack0-1) unstable; urgency=medium
+
+ * New 2.2.6 upstream release
+
+ -- Didier Raboud <odyx@debian.org> Wed, 16 Dec 2015 13:00:52 +0100
+
+usb-modeswitch (2.2.5+repack0-1) unstable; urgency=medium
+
+ * New 2.2.5 upstream release
+ * Refresh patches
+
+ -- Didier Raboud <odyx@debian.org> Mon, 20 Jul 2015 12:12:31 +0200
+
+usb-modeswitch (2.2.3+repack0-1) unstable; urgency=medium
+
+ * New 2.2.3 upstream release
+ - Resolve systemd v221 incompatibility (Closes: #790652)
+ * Refresh patches
+
+ -- Didier Raboud <odyx@debian.org> Wed, 01 Jul 2015 21:24:07 +0200
+
+usb-modeswitch (2.2.2+repack0-1) unstable; urgency=medium
+
+ * New 2.2.2 upstream release
+ - Changed systemd template unit parameter to avoid escaping problems
+ (Closes: #787842)
+ * Refresh patches
+ * Update debian/rules to new branch names and gbp
+ * Add gbp.conf for dch and import-orig
+
+ -- Didier Raboud <odyx@debian.org> Mon, 29 Jun 2015 08:37:14 +0200
+
+usb-modeswitch (2.2.1+repack0-1) unstable; urgency=low
+
+ * New 2.2.1 upstream release
+ - Fixed unreliable switching function for Cisco AM10
+ * Bump Standards-Version to 3.9.6 without changes needed
+
+ -- Didier Raboud <odyx@debian.org> Wed, 27 May 2015 08:09:32 +0200
+
+usb-modeswitch (2.2.0+repack0-2) unstable; urgency=medium
+
+ * Add patch to set TMPDIR to /run, add Build-Depends version constraint to
+ pull a libjim supporting the setting of TMPDIR (Closes: #751271)
+
+ -- Didier Raboud <odyx@debian.org> Tue, 12 Aug 2014 12:59:22 +0200
+
+usb-modeswitch (2.2.0+repack0-1) unstable; urgency=medium
+
+ * New 2.2.0 upstream release
+ - Introduction of parameter "HuaweiNewMode", wrapping the standard bulk
+ message for all newer Huawei devices;
+ - Support for generic fallback config files, combined with OS switch (per
+ vendor ID);
+
+ * Repack the upstream tarball:
+ - Drop the code copy of jimtcl.
+
+ * Bump usb-modeswitch-data depends to 20140529
+ * Update VCS-* fields to canonical form
+
+ -- Didier Raboud <odyx@debian.org> Mon, 09 Jun 2014 11:21:08 +0200
+
+usb-modeswitch (2.1.1+repack0-1) unstable; urgency=medium
+
+ * New 2.1.1 upstream release
+ - "Interface" parameter was not working as expected, fixed
+ (LP: #1261923)
+
+ * Repack the upstream tarball:
+ - Drop the code copy of jimtcl.
+
+ * Bump usb-modeswitch-data depends to 20140327
+ * Append CPPFLAGS to CFLAGS
+
+ -- Didier Raboud <odyx@debian.org> Tue, 01 Apr 2014 13:28:36 +0200
+
+usb-modeswitch (2.1.0+repack0-1) unstable; urgency=medium
+
+ * New 2.1.0 upstream release
+ - -I flag meaning reversed, default is to skip SCSI inquiry
+
+ * Repack the upstream tarball:
+ - Drop the code copy of jimtcl.
+
+ * Bump usb-modeswitch-data depends to 20140129
+ * Bump Standards-Version to 3.9.5 without changes needed
+ * Add get-orig-source target to do the automatic repacking
+
+ -- Didier Raboud <odyx@debian.org> Mon, 10 Feb 2014 12:58:03 +0100
+
+usb-modeswitch (2.0.1+repack0-2) unstable; urgency=low
+
+ * Update the systemd patch to change the systemctl path to fit
+ Debian's (Closes: #725394) - thanks to Ralf Jung
+
+ -- Didier Raboud <odyx@debian.org> Mon, 30 Sep 2013 10:57:27 +0200
+
+usb-modeswitch (2.0.1+repack0-1) unstable; urgency=low
+
+ * New 2.0.1 upstream release
+ - Switched to libusb1.0
+ - Major code and debug output cleanup
+ - Man page corrections and additions
+ - Experimental systemd and upstart integration
+
+ * Repack the upstream tarball:
+ - Drop the code copy of jimtcl.
+
+ * Refresh patches for 2.0.1
+ * Update Build-Depends to add libusb-1.0-0-dev and pkg-config
+ * Incorporate support for upstart and systemd
+ - patch the dispatcher to correctly check if upstart or systemd are running
+ - install the upstart init file and the systemd service file
+
+ -- Didier Raboud <odyx@debian.org> Wed, 18 Sep 2013 19:53:11 +0200
+
+usb-modeswitch (1.2.6+repack0-1) unstable; urgency=low
+
+ * New 1.2.6 upstream release
+ - Several changes to streamline compiling as part of larger
+ projects, mostly in Makefile;
+ - fix compiler warnings appearing in certain build environments;
+ - new Quanta procedure for Quanta 1K3 LTE;
+ - fix for error with cascaded hubs in dispatcher script.
+
+ * Repack the upstream tarball:
+ - Drop the code copy of jimtcl.
+
+ * Replace 04_cope_with_repack patch by one to to use the
+ package-provided jimsh and libjim.
+ * Bump usb-modeswitch-data depends to 20130607.
+
+ -- Didier Raboud <odyx@debian.org> Sat, 08 Jun 2013 18:07:17 +0200
+
+usb-modeswitch (1.2.5+repack0-2) unstable; urgency=low
+
+ * Upload to unstable.
+
+ -- Didier Raboud <odyx@debian.org> Mon, 06 May 2013 17:36:17 +0200
+
+usb-modeswitch (1.2.5+repack0-1) experimental; urgency=low
+
+ * New 1.2.5 upstream release
+ - Initial support for MBIM devices, use with data package >= 20121109;
+ - checking for these is the automatic default, new parameter
+ NoMBIMCheck prevents the check per device in case of problems; new
+ global option to set "delay_use" of usb-storage (as low values may
+ prevent mode-switching);
+ - fix for handling multi-configuration devices (thanks to Bjørn Mork
+ for advice).
+
+ * Repack the upstream tarball:
+ - Drop the code copy of jimtcl.
+
+ * Bump usb-modeswitch-data depends to 20121109.
+ * Bump Standards-Version to 3.9.4 and debhelper B-D to 9 without
+ changes needed.
+
+ -- Didier Raboud <odyx@debian.org> Tue, 20 Nov 2012 10:45:07 +0100
+
+usb-modeswitch (1.2.4+repack0-1) experimental; urgency=low
+
+ * New 1.2.4 upstream release
+ - Additional interface checks to prevent sending UFI commands to
+ non-storage interfaces (prompted by more ambiguous device IDs
+ popping up);
+ - Change in SierraMode for handling newer devices which caused an
+ error abort before;
+ - Makefile fix for parallelized make runs.
+
+ * Repack the upstream tarball:
+ - Drop the code copy of jimtcl.
+
+ * Drop patch to disable logging as was (temporarily) enabled in 1.2.3.
+ * Refresh patches.
+
+ -- Didier Raboud <odyx@debian.org> Tue, 28 Aug 2012 11:13:00 +0200
+
+usb-modeswitch (1.2.3+repack0-1) unstable; urgency=medium
+
+ * New 1.2.3 upstream release.
+ - Fixed two bugs both causing the embedded-jimsh install variant of the
+ dispatcher crash;
+ (Closes: #656688)
+ - Fixed some "regexp" incompatibilities with Debian's libjim.
+ (Closes: #656063)
+
+ * Repack the upstream tarball:
+ - Drop the code copy of jimtcl.
+
+ * Rise urgency to medium as this new upstream release fixes two RC bugs.
+ * Add patch to disable logging as enabled in 1.2.3 upstream release.
+
+ -- Didier Raboud <odyx@debian.org> Mon, 30 Jan 2012 18:16:11 +0100
+
+usb-modeswitch (1.2.2+repack0-1) unstable; urgency=low
+
+ * New 1.2.2 upstream release.
+ - Fixed bad bug preventing mode switch for devices using TargetClass
+ (Closes: #656248);
+
+ * Repack the upstream tarball:
+ - Drop the code copy of jimtcl.
+
+ -- Didier Raboud <odyx@debian.org> Thu, 19 Jan 2012 11:27:49 +0100
+
+usb-modeswitch (1.2.1+repack0-1) unstable; urgency=low
+
+ * New 1.2.1 upstream release.
+
+ * Repack the upstream tarball:
+ - Drop the code copy of jimtcl.
+
+ * Refresh patches.
+ × 03_use_udev_specifics.patch: Refresh.
+
+ -- Didier Raboud <odyx@debian.org> Mon, 02 Jan 2012 21:27:00 +0100
+
+usb-modeswitch (1.2.0+repack0-1) unstable; urgency=low
+
+ * New 1.2.0 upstream release:
+ - added command line options for binary program to accept configuration
+ data via stdin or as a long string parameter - this fixes the bug with
+ non-writable temporary file during boot (Closes: #629371);
+
+ * Repack the upstream tarball:
+ - Drop the code copy of jimtcl.
+
+ * Refresh patches:
+ × 03_use_udev_specifics.patch: Refresh.
+ + 04_cope_with_repack.patch: Add.
+ - wait_half_second_non_scsi.patch: was from upstream; drop.
+ * Link usb-modeswitch-dispatcher against libjim.
+ - Add Build-Depends on jimtcl and libjim-dev.
+ - Drop Depends on tcl/tclsh.
+ - Use explicit makefile targets.
+ * Bump debhelper compat to 9, for auto- buildflags.
+ - Bump debhelper B-D to 8.9.0~.
+ - Add source lintian override.
+
+ -- Didier Raboud <odyx@debian.org> Mon, 24 Oct 2011 09:50:41 +0200
+
+usb-modeswitch (1.1.9-2) unstable; urgency=low
+
+ * Patch the tcl dispatcher to wait some time with non-scsi-needing
+ devices. (Closes: #637972)
+
+ -- Didier Raboud <odyx@debian.org> Tue, 16 Aug 2011 23:04:57 +0200
+
+usb-modeswitch (1.1.9-1) unstable; urgency=low
+
+ * New 1.1.9 upstream version:
+ × Refresh 03_use_udev_specifics.patch.
+
+ -- Didier Raboud <odyx@debian.org> Sun, 07 Aug 2011 16:59:11 +0200
+
+usb-modeswitch (1.1.8-1) unstable; urgency=low
+
+ * New 1.1.8 upstream version:
+ - Rewrite Debian's "override from /etc" code
+ (Closes: #630081, thanks to Alex Hermann).
+ - Fix boot-time switching regression
+ (Closes: #629371, thanks to Christian Kastner).
+
+ * Drop patches obsoleted by 1.1.8:
+ - 01_extract_to_var_lib_not_tmp
+ - 02_allow_override_from_etc
+ * Drop device_reference.txt from docs as upstream dropped it.
+ * Bump Standards-Version to 3.9.2 without changes needed.
+
+ -- Didier Raboud <odyx@debian.org> Mon, 20 Jun 2011 10:12:34 +0200
+
+usb-modeswitch (1.1.7-1) unstable; urgency=low
+
+ * New 1.1.7 upstream version.
+
+ * Patches:
+ + Add 01_extract_to_var_lib_not_tmp.patch to extract
+ temporary files to /var/lib/usb_modeswitch instead of /tmp.
+ + Add 02_allow_override_from_etc.patch to permit overriding
+ packed configurations with files within /etc/usb_modeswitch.d/.
+ - Remove 02_mp_correct_hyphens.patch: merged upstream.
+ - Remove 04__use_var_lib_not_etc.patch: merged upstream.
+ - Remove 05_fixed_configuration_switching_races.patch: was an upstream
+ backport.
+ - Remove 06_umdp_archive_in_usr.patch: Obsoleted by upstream.
+ * Replace usb-modeswitch-data-packed dependency by a versioned dependency on
+ usb-modeswitch-data (copes with -packed package removal).
+ * Add a postinst maintainer script to move past runtime files to their new
+ (and correct) location under /var/lib/.
+ * Also bump debhelper compat (was forgotten).
+
+ -- Didier Raboud <odyx@debian.org> Tue, 15 Mar 2011 17:57:00 +0100
+
+usb-modeswitch (1.1.6-2) unstable; urgency=low
+
+ * Upload to unstable.
+ * Use new dh_installdeb maintscript possibility:
+ - Bump debhelper Build-Depends to 8.1.0.
+ - Add Pre-Depends on ${misc:Pre-Depends} to usb-modeswitch.
+ - Remove usb-modeswitch.preinst.
+ - Add usb-modeswitch.maintscript.
+ * Use my @d.o address and remove the DMUA flag.
+
+ -- Didier Raboud <odyx@debian.org> Wed, 09 Feb 2011 14:11:13 +0100
+
+usb-modeswitch (1.1.6-1) experimental; urgency=low
+
+ * New 1.1.6 upstream version.
+
+ * Add a prerm maintainer script to remove leftover runtime files.
+ * Update package relationships to allow the install of usb-modeswitch-
+ data-packed.
+ * Patches:
+ + 06_umdp_archive_in_usr.patch: Add to search for the compressed archive
+ in /usr/share/usb-modeswitch-data/
+ x Refresh all others.
+ * Bump Standards to 3.9.1 without changes needed.
+
+ -- Didier Raboud <didier@raboud.com> Tue, 04 Jan 2011 17:22:40 +0100
+
+usb-modeswitch (1.1.5-1) experimental; urgency=low
+
+ * New 1.1.5 upstream version.
+
+ * Patches:
+ - 01_no_bash_before_tcl.patch: remove, included upstream.
+ x Refresh all others.
+
+ -- Didier Raboud <didier@raboud.com> Wed, 01 Dec 2010 15:59:47 +0100
+
+usb-modeswitch (1.1.4-2) unstable; urgency=low
+
+ * Fix configuration switching race (LP: #673435)
+
+ -- Didier Raboud <didier@raboud.com> Thu, 11 Nov 2010 14:52:43 +0100
+
+usb-modeswitch (1.1.4-1) unstable; urgency=low
+
+ * Patches:
+ + 04_use_var_lib_not_etc.patch : Add to put runtime files in /var/lib.
+
+ * Release to unstable, thanks to the Release Team approval.
+
+ -- Didier Raboud <didier@raboud.com> Mon, 30 Aug 2010 18:30:37 +0200
+
+usb-modeswitch (1.1.4-1~exp0) experimental; urgency=high
+
+ * New 1.1.4 upstream version; relevant changes:
+ - The package should work at boot time now (cold and warm);
+ (Closes: #591765, #591722)
+ - wrapper fix for the symlink feature: handling of multiple interrupt
+ ports was incomplete; (Closes: #587776)
+ - wrapper does not longer use a temporary file for the symlink feature
+ (security considerations, Marco d'Itri) (Closes: #591761)
+ - no udev rules grep'ing (Closes: #591760)
+
+ * Patches:
+ + 01_no_bash_before_tcl.patch : add to avoid one more waiting.
+ + 02_mp_correct_hyphens.patch: refresh.
+ + 03_use_udev_specifics.patch: avoid code duplication by using udev
+ specific hotplug functions.
+
+ * Set urgency to high as new upstream fixes security bug.
+
+ * Correct documentation glitches in debian/README.Debian
+ (Closes: #590903)
+
+ -- Didier Raboud <didier@raboud.com> Tue, 24 Aug 2010 00:07:38 +0200
+
+usb-modeswitch (1.1.3-1) unstable; urgency=low
+
+ * New 1.1.3 upstream version; relevant changes:
+ - Small additions in Makefile (install with -D)
+ => Remove patch 01_mf_install_path.patch
+ - Changes in option handling (NO MORE DEFAULT CONFIG FILE!) and help text
+ => Remove that conffile on upgrade, to avoid misunderstanding.
+ => Include the device_reference.txt as docs.
+ - Wrapper now ignores package manager leftovers in config folder
+ => Remove patch 03_filter_undesired_rules.patch
+ - Replaced bash-specific syntax in wrapper
+ => Remove patch 04_fix_bashism.patch
+
+ * Patches:
+ + 02_mp_correct_hyphens.patch: refresh.
+
+ -- Didier Raboud <didier@raboud.com> Wed, 23 Jun 2010 10:43:35 +0200
+
+usb-modeswitch (1.1.2-3) unstable; urgency=low
+
+ * Add 04_fix_bashisms.patch to fix bashism in usb_modeswitch.tcl
+ (Closes: #581143)
+
+ -- Didier Raboud <didier@raboud.com> Tue, 18 May 2010 14:24:17 +0200
+
+usb-modeswitch (1.1.2-2) unstable; urgency=low
+
+ * Add 03_filter_undesired_rules.patch to filter out undesired files
+ (Closes: #579981)
+
+ -- Didier Raboud <didier@raboud.com> Mon, 03 May 2010 11:37:08 +0200
+
+usb-modeswitch (1.1.2-1) unstable; urgency=low
+
+ * New 1.1.2 upstream version.
+ - Added support for two additional bulk messages
+ - Wrapper handles special ZTE case
+ - Generalized driver loading
+ - New parameter "DriverModule" and "DriverIDPath"
+ - New wrapper facility to add symlink pointing to interrupt port
+ * Update 01_mf_install_path.patch and 02_mp_correct_hyphens.patch
+ * Don't use Debian-specific revisions in debian/control.
+
+ -- Didier Raboud <didier@raboud.com> Mon, 19 Apr 2010 13:49:19 +0200
+
+usb-modeswitch (1.1.1-1) unstable; urgency=low
+
+ * New 1.1.1 upstream version.
+ - Add separate config file for wrapper (global settings for switching and
+ logging)
+ - Add config file option to disable driver loading
+ - Handling of kernel attribute AVOID_RESET_QUIRK added
+ - Bug fixed in SonyMode
+ - Bug fixed in SuccessCheck logic
+ - Minor flow alignments and fixes
+ - Debian:
+ + Update patches
+ + Update preinst to not drop /etc/usb_modeswitch.conf anymore
+ + Update usb-modeswitch.install to install the conffile
+
+ * Now that I am a DM, add DMUA field to debian/control.
+ Thanks go to Patrick Matthäi for the sponsoring!
+
+ -- Didier Raboud <didier@raboud.com> Thu, 18 Mar 2010 11:08:06 +0100
+
+usb-modeswitch (1.1.0-2) unstable; urgency=low
+
+ * Drop the udev rules file (shipped in usb-modeswitch-data). Thanks to
+ Sven-Haegar Koch for the report! (Closes: #567438)
+
+ -- Didier Raboud <didier@raboud.com> Fri, 29 Jan 2010 09:24:41 +0100
+
+usb-modeswitch (1.1.0-1) unstable; urgency=low
+
+ The "All your base are belong to us" release. It was great to collaborate
+ with upstream on that release. Thanks Josh!
+
+ * New 1.1.0 upstream version.
+ - Debian manpage got included, drop docbook-to-man.
+ - Merge the two wrappers and put them in /lib/udev/.
+ * Add a lintian override for the polyglot in /lib/udev/
+ * Update debian/watch to new upstream tarball naming.
+ * Bump dependency on -data to 20100127-1.
+ * Suggest comgt instead of gcom.
+ * Patches:
+ + 01_mf_install_all_path.patch
+ Add
+ - Ensures that the directories are created before accessing them
+ - Disables the udev rules reload
+ + 02_mp_correct_hyphens.patch
+ Add to correct hyphen-used-as-minus-sign on the manpage.
+ - 03_build_system_to_policy.patch
+ Merged upstream.
+ - 05_move_wrappers_to_usr.patch
+ Merged upstream.
+
+ -- Didier Raboud <didier@raboud.com> Thu, 28 Jan 2010 15:17:38 +0100
+
+usb-modeswitch (1.0.7-1) unstable; urgency=low
+
+ * New 1.0.7 upstream version (Closes: #563527).
+ - Update the manpage
+ - Split source in binary and data packages.
+ * Patches:
+ - 01_correct_broken_huawei_conf.patch
+ Removed.
+ + 03_build_system_to_policy.patch
+ Refreshed.
+ - 04_convert_umconf_to_unicode.patch
+ Removed.
+ + 05_move_wrappers_to_usr.patch
+ Refreshed.
+ - 06_disables_rules.patch
+ Removed.
+ * Add a preinst to delete configuration files forgotten in previous releases
+ - Also delete /etc/udev/rules.d/80-usb_modeswitch.rules.
+ - Delete only the data files not included in the -data upload
+ * Update README.Debian.
+
+ -- Didier Raboud <didier@raboud.com> Tue, 12 Jan 2010 15:58:14 +0100
+
+usb-modeswitch (1.0.5-1) unstable; urgency=low
+
+ * New 1.0.5 upstream version
+ - Configurations are now stored in independent files under
+ /etc/usb_modeswitch.d/
+ - The devices detection is greatly improved by having a broader set of
+ detection fields (Closes: #527122).
+ - Two new binaries: usb_modeswitch_sh and usb_modeswitch_tcl.
+ * Adaptation to new upstream:
+ - Add tclsh to Depends.
+ - Drop mkrules.py and thus python B-D (Closes: #535445).
+ - Update manpage to 1.0.5 (add --version)
+ * Patches:
+ - 01_correct_broken_huawei_conf.patch : refresh.
+ - 02_umconf_is_no_exec.patch : remove, merged upstream.
+ - 03_build_system_to_policy.patch : refresh.
+ - 04_convert_umconf_to_unicode.patch : Add to get everything in utf-8.
+ Thanks to W. Martin Borgert.
+ - 05_move_wrappers_to_usr.patch : Add. Moves wrappers to specific
+ /usr/share/usb_modeswitch
+ - 06_disables_rules.patch : Add to get the udev rules "opt-in"
+ (See NEWS.Debian)
+ - Add headers to make them all comply to DEP-3 Patch Tagging Guidelines.
+ * Bump Standards-Version to 3.8.3
+ - Add README.source.
+ * Document the major changes in NEWS.Debian
+ * Switch to source format 3.0 (quilt). Drop quilt Build-Dep and dh snippet.
+
+ -- Didier Raboud <didier@raboud.com> Tue, 03 Nov 2009 11:02:31 +0100
+
+usb-modeswitch (1.0.2-1) unstable; urgency=low
+
+ * New 1.0.2 Upstream Version
+ - New devices:
+ + EpiValley SEC-7089 (featured by Alegro and Starcomms / iZAP)
+ + ST Mobile Connect HSUPA USB Modem
+ - The command line options have changed:
+ + On/off flags don't require arguments anymore
+ + long option names changed to standard format (e.g. --HuaweiMode to
+ --huawei-mode)
+ - Code cleanup
+ - Added device inquiry
+ - Send and response endpoints now autoselected
+ * Fix manpage accordingly.
+ * Update mkrules.py accordingly with cleaner coding style, thanks to
+ Kris Warkentin.
+ * Add debian/NEWS with a clear warning about the command line changes.
+ * Fix "Broken generated udev rules for Huawei devices." by adding patch
+ 01_correct_broken_huawei_conf.patch (Closes: #530788).
+ - Thus adding quilt to Build-Depends and tweak debian/rules accordingly.
+ - Thanks Stephen Depooter.
+ * debian/rules: Redo from scratch using debhelper tiny style.
+ - Thus bump Build-Depends on debhelper to > 7.0.50.
+ - Use upstream's build system.
+ - Add patch 02_umconf_is_no_exec.patch.
+ - Add patch 03_build_system_to_policy.patch to accept DEB_BUILD_OPTIONS
+ (noopt, nostrip).
+ * Switch packaging to git under Alioth's collab-maint
+ - Add Vcs-{Git,Browser} to debian/control.
+ * Bump Standards to 3.8.2, no changes needed.
+
+ -- Didier Raboud <didier@raboud.com> Tue, 23 Jun 2009 17:41:06 +0200
+
+usb-modeswitch (0.9.7-1) unstable; urgency=low
+
+ * 0.9.7 new upstream release.
+ "Updated SonyMode, MD 400 now stable; automatic default endpoint detection
+ from Andrew Bird."
+ - Sony Ericsson MD400 now working
+ - Automatic bulk endpoint detection
+ * debian/copyright
+ - Point to GPL version 2, thanks to lintian --pedantic.
+
+ -- Didier Raboud <didier@raboud.com> Thu, 16 Apr 2009 11:34:47 +0200
+
+usb-modeswitch (0.9.7~beta1-1) experimental; urgency=low
+
+ * 0.9.7beta new upstream release.
+ "Major code clean up, optional success control (both suggested by Daniel
+ Cooper), new devices"
+ * New build system (not used in Debian yet).
+ * New option to enable success control (--success)
+ - Manpage updated
+ * New devices
+ - Option iCON 210,401
+ - Vodafone K3760
+ - ZTE MF636 (aka "Telstra / BigPond 7.2 Mobile Card")
+ - Sierra Wireless Compass 597
+ - MobiData MBD-200HU
+ - Hyundai Mobile MB-810
+ * Bump Standards to 3.8.1. No changes needed.
+
+ -- Didier Raboud <didier@raboud.com> Mon, 30 Mar 2009 19:44:55 +0200
+
+usb-modeswitch (0.9.6-2) unstable; urgency=low
+
+ * debian/copyright: Make clear that the packaging is GPLv2+, as
+ usb-modeswitch itself
+ * debian/mkrules.py: Generate udev rules based on /etc/usb-modeswitch.conf
+ * Add gcom and wvdial to Suggests.
+
+ -- Didier Raboud <didier@raboud.com> Sat, 14 Feb 2009 12:32:43 +0100
+
+usb-modeswitch (0.9.6-1) unstable; urgency=low
+
+ * Initial release (Closes: #453732)
+ * Description taken from the ITP, thanks to Aurélien GÉRÔME.
+
+ -- Didier Raboud <didier@raboud.com> Tue, 03 Feb 2009 14:11:19 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..b4de394
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+11
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..56c33cd
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,38 @@
+Source: usb-modeswitch
+Maintainer: Didier Raboud <odyx@debian.org>
+Section: comm
+Priority: optional
+Build-Depends: debhelper (>= 11~),
+ libusb-1.0-0-dev,
+ pkg-config,
+ jimsh,
+ libjim-dev (>= 0.75-1~)
+Standards-Version: 4.1.3
+Vcs-Browser: https://salsa.debian.org/debian/usb-modeswitch
+Vcs-Git: https://salsa.debian.org/debian/usb-modeswitch.git
+Homepage: http://www.draisberghof.de/usb_modeswitch/
+
+Package: usb-modeswitch
+Architecture: any
+Depends: ${shlibs:Depends},
+ ${misc:Depends},
+ usb-modeswitch-data (>= 20140529)
+Suggests: comgt,
+ wvdial
+Pre-Depends: ${misc:Pre-Depends}
+Breaks: usb-modeswitch-data (<< 20100127)
+Description: mode switching tool for controlling "flip flop" USB devices
+ Several new USB devices have their proprietary Windows drivers onboard,
+ especially WAN dongles. When plugged in for the first time, they act
+ like a flash storage and start installing the driver from there. If
+ the driver is already installed, the storage device vanishes and
+ a new device, such as an USB modem, shows up. This is called the
+ "ZeroCD" feature.
+ .
+ On Debian, this is not needed, since the driver is included as a
+ Linux kernel module, such as "usbserial". However, the device still
+ shows up as "usb-storage" by default. usb-modeswitch solves that
+ issue by sending the command which actually performs the switching
+ of the device from "usb-storage" to "usbserial".
+ .
+ This package contains the binaries and the brother scripts.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..cc04cdd
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,58 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: usb-modeswitch
+Upstream-Contact: Josua Dietze <usb_admin at the domain of the home page>
+Source: http://www.draisberghof.de/usb_modeswitch/
+
+Files: *
+Copyright: 2007-2017 Josua Dietze
+License: GPL-2+
+
+Files: dispatcher.c
+Copyright: 2011-2017 Josua Dietze
+ 2010 Wojciech A. Koszek <wkoszek@FreeBSD.org>
+License: BSD-2-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ .
+ Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: debian/*
+Copyright: 2009-2018 Didier Raboud <odyx@debian.org>
+License: GPL-2+
+
+License: GPL-2+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ .
+ On Debian systems, the complete text of the GNU General Public
+ License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..2541c07
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,3 @@
+[DEFAULT]
+debian-branch = debian/master
+upstream-branch = upstream/latest
diff --git a/debian/patches/0001-Fix-official-l-y-typo.patch b/debian/patches/0001-Fix-official-l-y-typo.patch
new file mode 100644
index 0000000..dc20edf
--- /dev/null
+++ b/debian/patches/0001-Fix-official-l-y-typo.patch
@@ -0,0 +1,22 @@
+From 327cecc259b38c3311df51a5d42bfba41faedf2e Mon Sep 17 00:00:00 2001
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 30 Aug 2016 14:24:03 +0200
+Subject: Fix official{,l}y typo
+
+---
+ usb_modeswitch.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usb_modeswitch.1 b/usb_modeswitch.1
+index d91135f..879e451 100644
+--- a/usb_modeswitch.1
++++ b/usb_modeswitch.1
+@@ -41,7 +41,7 @@ Print version information and exit
+ .IP "\fB-v\fP \fB\-\-default-vendor NUM\fP " 10
+ Vendor ID to look for (mandatory), usually given as hex number (example: 0x12d1).
+ Each USB device is identified by a number
+-officialy assigned to the vendor by the USB association and a number for the
++officially assigned to the vendor by the USB association and a number for the
+ respective model (product ID) chosen by the vendor
+ .IP "\fB-p\fP \fB\-\-default-product NUM\fP " 10
+ Product ID to look for (mandatory)
diff --git a/debian/patches/0002-Use-package-provided-jimsh-and-libjim.patch b/debian/patches/0002-Use-package-provided-jimsh-and-libjim.patch
new file mode 100644
index 0000000..333ab4c
--- /dev/null
+++ b/debian/patches/0002-Use-package-provided-jimsh-and-libjim.patch
@@ -0,0 +1,37 @@
+From 1d2a7a7a7f3e031e7ef05075d491655de345fc9a Mon Sep 17 00:00:00 2001
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 30 Aug 2016 14:24:04 +0200
+Subject: Use package-provided jimsh and libjim
+
+---
+ Makefile | 10 +++-------
+ 1 file changed, 3 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 463a11f..4f3634a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -13,12 +13,8 @@ UDEVDIR = $(DESTDIR)/lib/udev
+ SBINDIR = $(PREFIX)/sbin
+ MANDIR = $(PREFIX)/share/man/man1
+ VPATH = jimtcl
+-HOST_TCL := $(shell cd jim && ./autosetup/find-tclsh)
+-ifeq (,$(findstring jimsh0,$(HOST_TCL)))
+-TCL ?= $(HOST_TCL)
+-else
+-TCL ?= /usr/bin/tclsh
+-endif
++HOST_TCL := /usr/bin/jimsh
++TCL := /usr/bin/jimsh
+ JIM_CONFIGURE_OPTS = --disable-lineedit \
+ --with-out-jim-ext="stdlib posix load signal syslog" --prefix=/usr
+
+@@ -49,7 +45,7 @@ jim/libjim.a:
+ dispatcher-script: usb_modeswitch.tcl
+ sed 's_!/usr/bin/tclsh_!'"$(TCL)"'_' < usb_modeswitch.tcl > usb_modeswitch_dispatcher
+
+-dispatcher-shared: jim/libjim.so dispatcher.c usb_modeswitch.string
++dispatcher-shared: dispatcher.c usb_modeswitch.string
+ $(CC) dispatcher.c $(LDFLAGS) -Ljim -ljim -Ijim -o usb_modeswitch_dispatcher $(CFLAGS)
+
+ dispatcher-static: jim/libjim.a dispatcher.c usb_modeswitch.string
diff --git a/debian/patches/0003-Detect-if-systemd-is-running-not-only-if-its-corresp.patch b/debian/patches/0003-Detect-if-systemd-is-running-not-only-if-its-corresp.patch
new file mode 100644
index 0000000..4845b1b
--- /dev/null
+++ b/debian/patches/0003-Detect-if-systemd-is-running-not-only-if-its-corresp.patch
@@ -0,0 +1,27 @@
+From 84a4b792609cb4c8012c2ee167c503bef3d025b4 Mon Sep 17 00:00:00 2001
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 30 Aug 2016 14:24:05 +0200
+Subject: Detect if systemd is running, not only if its corresponding
+ configfiles is installed
+
+ Also change the systemctl path to fit Debian's
+
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/725394
+---
+ usb_modeswitch.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usb_modeswitch.sh b/usb_modeswitch.sh
+index eb3fa3e..f5f2f70 100755
+--- a/usb_modeswitch.sh
++++ b/usb_modeswitch.sh
+@@ -63,7 +63,7 @@ fi
+
+ PATH=/bin:/sbin:/usr/bin:/usr/sbin
+ init_path=`readlink -f /sbin/init`
+-if [ `basename $init_path` = "systemd" ]; then
++if [ `basename $init_path` = "systemd" ] && [ -d "/run/systemd/system/" ]; then # Test if systemd is running
+ systemctl --no-block start usb_modeswitch@$p2.service
+ elif [ -e "/etc/init/usb-modeswitch-upstart.conf" ]; then
+ initctl emit --no-wait usb-modeswitch-upstart UMS_PARAM=$p2
diff --git a/debian/patches/0004-Set-TMPDIR-run-for-usb_modeswitch_dispatcher.patch b/debian/patches/0004-Set-TMPDIR-run-for-usb_modeswitch_dispatcher.patch
new file mode 100644
index 0000000..43253d6
--- /dev/null
+++ b/debian/patches/0004-Set-TMPDIR-run-for-usb_modeswitch_dispatcher.patch
@@ -0,0 +1,45 @@
+From e481cac2dd04ac19546dfd48ac6d58c52df0512a Mon Sep 17 00:00:00 2001
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 30 Aug 2016 14:24:06 +0200
+Subject: Set TMPDIR=/run for usb_modeswitch_dispatcher
+
+It might be run before /tmp/ is available.
+---
+ usb-modeswitch-upstart.conf | 1 +
+ usb_modeswitch.sh | 1 +
+ usb_modeswitch@.service | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/usb-modeswitch-upstart.conf b/usb-modeswitch-upstart.conf
+index 0d82b69..1fda4ba 100644
+--- a/usb-modeswitch-upstart.conf
++++ b/usb-modeswitch-upstart.conf
+@@ -1,5 +1,6 @@
+ start on usb-modeswitch-upstart
+ task
++env TMPDIR=/run
+ script
+ exec /usr/sbin/usb_modeswitch_dispatcher --switch-mode $UMS_PARAM
+ end script
+diff --git a/usb_modeswitch.sh b/usb_modeswitch.sh
+index f5f2f70..1f0c57e 100755
+--- a/usb_modeswitch.sh
++++ b/usb_modeswitch.sh
+@@ -47,6 +47,7 @@ case "$1" in
+ device_in "link_list" $v_id $p_id
+ if [ "$?" = "1" ]; then
+ if [ -e "/usr/sbin/usb_modeswitch_dispatcher" ]; then
++ export TMPDIR=/run
+ exec usb_modeswitch_dispatcher $1 $2 2>>/dev/null
+ fi
+ fi
+diff --git a/usb_modeswitch@.service b/usb_modeswitch@.service
+index f74a8bf..182604a 100644
+--- a/usb_modeswitch@.service
++++ b/usb_modeswitch@.service
+@@ -5,4 +5,5 @@ Description=USB_ModeSwitch_%i
+ Type=oneshot
+ ExecStart=/usr/sbin/usb_modeswitch_dispatcher --switch-mode %i
+ #ExecStart=/bin/echo %i
++Environment="TMPDIR=/run"
+
diff --git a/debian/patches/0005-Allow-replacing-pkg-config-with-triplet-pkg-config.patch b/debian/patches/0005-Allow-replacing-pkg-config-with-triplet-pkg-config.patch
new file mode 100644
index 0000000..61d4214
--- /dev/null
+++ b/debian/patches/0005-Allow-replacing-pkg-config-with-triplet-pkg-config.patch
@@ -0,0 +1,24 @@
+From ee66b303471dd66435e1531ef19f2b32f12845f4 Mon Sep 17 00:00:00 2001
+From: Helmut Grohne <helmut@subdivi.de>
+Date: Tue, 30 Aug 2016 14:27:55 +0200
+Subject: Allow replacing pkg-config with <triplet>-pkg-config
+
+Bug-Debian: https://bugs.debian.org/836018
+---
+ Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 4f3634a..5007881 100644
+--- a/Makefile
++++ b/Makefile
+@@ -2,7 +2,8 @@ PROG = usb_modeswitch
+ VERS = 2.5.2
+ CC ?= gcc
+ CFLAGS += -Wall
+-LIBS = `pkg-config --libs --cflags libusb-1.0`
++PKG_CONFIG ?= pkg-config
++LIBS = `$(PKG_CONFIG) --libs --cflags libusb-1.0`
+ RM = /bin/rm -f
+ OBJS = usb_modeswitch.c
+ PREFIX = $(DESTDIR)/usr
diff --git a/debian/patches/0006-Add-Documentation-pointer-in-systemd-service-unit.patch b/debian/patches/0006-Add-Documentation-pointer-in-systemd-service-unit.patch
new file mode 100644
index 0000000..ab578f3
--- /dev/null
+++ b/debian/patches/0006-Add-Documentation-pointer-in-systemd-service-unit.patch
@@ -0,0 +1,20 @@
+From 52511ac77b0c4d97d6c52b8a27868f93bc6417c8 Mon Sep 17 00:00:00 2001
+From: Didier Raboud <odyx@debian.org>
+Date: Fri, 25 Aug 2017 09:24:12 +0200
+Subject: Add Documentation pointer in systemd service unit
+
+---
+ usb_modeswitch@.service | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/usb_modeswitch@.service b/usb_modeswitch@.service
+index 182604a..be430b0 100644
+--- a/usb_modeswitch@.service
++++ b/usb_modeswitch@.service
+@@ -1,5 +1,6 @@
+ [Unit]
+ Description=USB_ModeSwitch_%i
++Documentation=man:usb_modeswitch_dispatcher(1)
+
+ [Service]
+ Type=oneshot
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..cf04a4d
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,6 @@
+0001-Fix-official-l-y-typo.patch
+0002-Use-package-provided-jimsh-and-libjim.patch
+0003-Detect-if-systemd-is-running-not-only-if-its-corresp.patch
+0004-Set-TMPDIR-run-for-usb_modeswitch_dispatcher.patch
+0005-Allow-replacing-pkg-config-with-triplet-pkg-config.patch
+0006-Add-Documentation-pointer-in-systemd-service-unit.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..91e4ee3
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,35 @@
+#!/usr/bin/make -f
+
+export DEB_CFLAGS_MAINT_APPEND = $(shell dpkg-buildflags --get CPPFLAGS)
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+include /usr/share/dpkg/architecture.mk
+ifeq ($(origin CC),default)
+CC = $(DEB_HOST_GNU_TYPE)-gcc
+endif
+export PKG_CONFIG = $(DEB_HOST_GNU_TYPE)-pkg-config
+
+%:
+ dh $@
+
+override_dh_auto_build:
+ dh_auto_build -- CC=$(CC) shared
+
+# This allows to select what I want instead of deleting what I don't
+override_dh_auto_install:
+ DESTDIR=debian/tmp/ make CC=$(CC) install-shared
+
+get-orig-source:
+ set -e;\
+ quilt pop -af || true ;\
+ rm -Rf .pc ;\
+ gbp import-orig --no-pristine-tar --no-merge --uscan --upstream-branch=upstream/latest;\
+ git checkout upstream/latest-repack ;\
+ utag=`git describe --exact-match heads/upstream/latest | sed -e 's#^upstream/##'` ;\
+ git merge upstream/$$utag -m "Merge upstream $$utag version" ;\
+ urtag=$$utag+repack0 ;\
+ git tag upstream/$$urtag -m "Upstream repacked $$utag version" ;\
+ git archive --format=tar --prefix=usb-modeswitch-$$urtag/ upstream/$$urtag | xz -6e > ../usb-modeswitch_$$urtag.orig.tar.xz ;\
+ pristine-tar commit ../usb-modeswitch_$$urtag.orig.tar.xz upstream/$$urtag ;\
+ git checkout debian/master ;\
+ git merge upstream/$$urtag -m "Merge upstream-repacked $$urtag version"
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/usb-modeswitch.dirs b/debian/usb-modeswitch.dirs
new file mode 100644
index 0000000..3268a28
--- /dev/null
+++ b/debian/usb-modeswitch.dirs
@@ -0,0 +1 @@
+/var/lib/usb_modeswitch
diff --git a/debian/usb-modeswitch.docs b/debian/usb-modeswitch.docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/debian/usb-modeswitch.docs
@@ -0,0 +1 @@
+README
diff --git a/debian/usb-modeswitch.install b/debian/usb-modeswitch.install
new file mode 100644
index 0000000..f4b8234
--- /dev/null
+++ b/debian/usb-modeswitch.install
@@ -0,0 +1,6 @@
+usr/sbin/usb_modeswitch
+usr/sbin/usb_modeswitch_dispatcher
+lib/udev/usb_modeswitch
+usr/share/man/*
+etc/usb_modeswitch.conf
+usb_modeswitch@.service lib/systemd/system/
diff --git a/debian/usb-modeswitch.maintscript b/debian/usb-modeswitch.maintscript
new file mode 100644
index 0000000..4254b47
--- /dev/null
+++ b/debian/usb-modeswitch.maintscript
@@ -0,0 +1 @@
+rm_conffile /etc/init/usb-modeswitch-upstart.conf 2.5.1+repack0-1~
diff --git a/debian/usb-modeswitch.prerm b/debian/usb-modeswitch.prerm
new file mode 100644
index 0000000..948838d
--- /dev/null
+++ b/debian/usb-modeswitch.prerm
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = remove ];
+then
+ # Also remove the runtime files.
+ rm -f /var/lib/usb_modeswitch/last_seen
+ rm -f /var/lib/usb_modeswitch/bind_list
+fi
+
+#DEBHELPER#
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..50a1828
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\+repack\d*$//,repacksuffix=+repack \
+http://www.draisberghof.de/usb_modeswitch/ usb-modeswitch-([\d.]*)\.tar\.bz2