diff options
author | Didier Raboud <odyx@debian.org> | 2020-07-10 23:01:46 +0200 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2020-07-10 23:01:46 +0200 |
commit | 995b14e535cabaf7e328147caf2b8996c126079a (patch) | |
tree | 5e9dfbc6eb3d4685101e6949e562315bbf58463f | |
parent | 4df100465de2dce6026b6c5aec584ee10b92f270 (diff) |
Commit patch queue (exported by git-debrebase)
[git-debrebase make-patches: export and commit patches]
6 files changed, 138 insertions, 0 deletions
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..58e85d9 --- /dev/null +++ b/debian/patches/0001-Fix-official-l-y-typo.patch @@ -0,0 +1,21 @@ +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 1b201cf..38f715e 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-Detect-if-systemd-is-running-not-only-if-its-corresp.patch b/debian/patches/0002-Detect-if-systemd-is-running-not-only-if-its-corresp.patch new file mode 100644 index 0000000..969a4ea --- /dev/null +++ b/debian/patches/0002-Detect-if-systemd-is-running-not-only-if-its-corresp.patch @@ -0,0 +1,26 @@ +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 437431e..2c15784 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 restart 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/0003-Set-TMPDIR-run-for-usb_modeswitch_dispatcher.patch b/debian/patches/0003-Set-TMPDIR-run-for-usb_modeswitch_dispatcher.patch new file mode 100644 index 0000000..4fd7622 --- /dev/null +++ b/debian/patches/0003-Set-TMPDIR-run-for-usb_modeswitch_dispatcher.patch @@ -0,0 +1,44 @@ +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 2c15784..fe53925 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 22d2ea7..ea40c8d 100644 +--- a/usb_modeswitch@.service ++++ b/usb_modeswitch@.service +@@ -6,4 +6,5 @@ Type=oneshot + ExecStart=/usr/sbin/usb_modeswitch_dispatcher --switch-mode %i + # Testing + #ExecStart=/bin/echo "usb_modeswitch.service: device name is %i" ++Environment="TMPDIR=/run" + diff --git a/debian/patches/0004-Allow-replacing-pkg-config-with-triplet-pkg-config.patch b/debian/patches/0004-Allow-replacing-pkg-config-with-triplet-pkg-config.patch new file mode 100644 index 0000000..e22f051 --- /dev/null +++ b/debian/patches/0004-Allow-replacing-pkg-config-with-triplet-pkg-config.patch @@ -0,0 +1,23 @@ +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 bcd512f..aa1c5c8 100644 +--- a/Makefile ++++ b/Makefile +@@ -2,7 +2,8 @@ PROG = usb_modeswitch + VERS = 2.6.1 + CC ?= gcc + CFLAGS += -Wall -Wno-deprecated-declarations +-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/0005-Add-Documentation-pointer-in-systemd-service-unit.patch b/debian/patches/0005-Add-Documentation-pointer-in-systemd-service-unit.patch new file mode 100644 index 0000000..a237f4c --- /dev/null +++ b/debian/patches/0005-Add-Documentation-pointer-in-systemd-service-unit.patch @@ -0,0 +1,19 @@ +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 ea40c8d..1962b43 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..76b1c3d --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,5 @@ +0001-Fix-official-l-y-typo.patch +0002-Detect-if-systemd-is-running-not-only-if-its-corresp.patch +0003-Set-TMPDIR-run-for-usb_modeswitch_dispatcher.patch +0004-Allow-replacing-pkg-config-with-triplet-pkg-config.patch +0005-Add-Documentation-pointer-in-systemd-service-unit.patch |