* [gentoo-commits] repo/gentoo:master commit in: sys-apps/usb_modeswitch/, sys-apps/usb_modeswitch/files/
@ 2025-03-10 3:41 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-03-10 3:41 UTC (permalink / raw
To: gentoo-commits
commit: dde66c941d335b7b47fbd92e1f61aab7155422fd
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 10 03:33:06 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 10 03:33:06 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dde66c94
sys-apps/usb_modeswitch: fix build w/ C23
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-apps/usb_modeswitch/files/c23.patch | 23 ++++++++++++++++++++++
...2.6.1.ebuild => usb_modeswitch-2.6.1-r1.ebuild} | 7 +++++--
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/sys-apps/usb_modeswitch/files/c23.patch b/sys-apps/usb_modeswitch/files/c23.patch
new file mode 100644
index 000000000000..de91abdad721
--- /dev/null
+++ b/sys-apps/usb_modeswitch/files/c23.patch
@@ -0,0 +1,23 @@
+get_current_config_value doesn't take any arguments, dev is a global variable.
+
+Bug: https://bugs.gentoo.org/944427
+--- a/usb_modeswitch.c
++++ b/usb_modeswitch.c
+@@ -570,7 +570,7 @@ int main(int argc, char **argv)
+ /* Get current configuration of default device, note value if Configuration
+ * parameter is set. Also sets active_config
+ */
+- currentConfigVal = get_current_config_value(dev);
++ currentConfigVal = get_current_config_value();
+ if (Configuration > -1) {
+ SHOW_PROGRESS(output,"Current configuration number is %d\n", currentConfigVal);
+ } else
+@@ -772,7 +772,7 @@ int main(int argc, char **argv)
+ if (Configuration > 0) {
+ if (currentConfigVal != Configuration) {
+ if (switchConfiguration()) {
+- currentConfigVal = get_current_config_value(dev);
++ currentConfigVal = get_current_config_value();
+ if (currentConfigVal == Configuration) {
+ SHOW_PROGRESS(output,"The configuration was set successfully\n");
+ } else {
diff --git a/sys-apps/usb_modeswitch/usb_modeswitch-2.6.1.ebuild b/sys-apps/usb_modeswitch/usb_modeswitch-2.6.1-r1.ebuild
similarity index 92%
rename from sys-apps/usb_modeswitch/usb_modeswitch-2.6.1.ebuild
rename to sys-apps/usb_modeswitch/usb_modeswitch-2.6.1-r1.ebuild
index d20c200a940a..bac271999447 100644
--- a/sys-apps/usb_modeswitch/usb_modeswitch-2.6.1.ebuild
+++ b/sys-apps/usb_modeswitch/usb_modeswitch-2.6.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -30,7 +30,10 @@ BDEPEND="virtual/pkgconfig"
CONFIG_CHECK="~USB_SERIAL"
-PATCHES=( "${FILESDIR}/usb_modeswitch.sh-tmpdir.patch" )
+PATCHES=(
+ "${FILESDIR}/usb_modeswitch.sh-tmpdir.patch"
+ "${FILESDIR}/c23.patch"
+)
src_prepare() {
default
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/usb_modeswitch/, sys-apps/usb_modeswitch/files/
@ 2017-02-03 21:47 Robin H. Johnson
0 siblings, 0 replies; 2+ messages in thread
From: Robin H. Johnson @ 2017-02-03 21:47 UTC (permalink / raw
To: gentoo-commits
commit: 2e2ceb709324edec7baf64370ba3d3070e8d43f2
Author: Maciej S. Szmigiero <mail <AT> maciej <DOT> szmigiero <DOT> name>
AuthorDate: Sun Jan 8 22:47:56 2017 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Fri Feb 3 21:47:32 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e2ceb70
sys-apps/usb_modeswitch: udev scripts need RW temporary directory
/lib/udev/usb_modeswitch script and usb_modeswitch_dispatcher Tcl script
that it calls both need a writable temporary directory which is a
problematic requirement for example if usb_modeswitch is triggered by a
module loaded during system startup.
Fortunately, /run is available RW very early at boot so let's redirect them
there instead.
Fixes a case where system startup with an USB modem plugged in would often
result in this modem not being switched correctly if USB host controller
modules are loaded via the "modules" service.
Gentoo-Bug: https://bugs.gentoo.org/565262
Fixes: https://github.com/gentoo/gentoo/pull/3389
Package-Manager: Portage-2.3.3, Repoman-2.3.1
(cherry picked from commit 1cede4c86a4e691cd51f82aad27c2a4e543cacdd)
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
.../files/usb_modeswitch.sh-tmpdir.patch | 18 ++++++++++++++++++
...tch-2.4.0.ebuild => usb_modeswitch-2.4.0-r1.ebuild} | 3 ++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/sys-apps/usb_modeswitch/files/usb_modeswitch.sh-tmpdir.patch b/sys-apps/usb_modeswitch/files/usb_modeswitch.sh-tmpdir.patch
new file mode 100644
index 00000000..5039d44
--- /dev/null
+++ b/sys-apps/usb_modeswitch/files/usb_modeswitch.sh-tmpdir.patch
@@ -0,0 +1,18 @@
+Script that this patch modifies and usb_modeswitch_dispatcher Tcl script
+that is being called by it both need a writable temporary directory which
+is a problematic requirement for example if usb_modeswitch is triggered
+by a module loaded during system startup.
+Fortunately, /run is available very early at boot so let's redirect them
+there instead.
+
+--- a/usb_modeswitch.sh 2016-11-29 17:29:47.000000000 +0100
++++ b/usb_modeswitch.sh 2016-11-30 01:11:51.747993839 +0100
+@@ -17,6 +17,8 @@
+ return 0
+ }
+
++export TMPDIR=/run
++
+ if [ $(expr "$1" : "--.*") ]; then
+ p_id=$4
+ if [ -z $p_id ]; then
diff --git a/sys-apps/usb_modeswitch/usb_modeswitch-2.4.0.ebuild b/sys-apps/usb_modeswitch/usb_modeswitch-2.4.0-r1.ebuild
similarity index 94%
rename from sys-apps/usb_modeswitch/usb_modeswitch-2.4.0.ebuild
rename to sys-apps/usb_modeswitch/usb_modeswitch-2.4.0-r1.ebuild
index ceb9bfd..74132f3 100644
--- a/sys-apps/usb_modeswitch/usb_modeswitch-2.4.0.ebuild
+++ b/sys-apps/usb_modeswitch/usb_modeswitch-2.4.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -37,6 +37,7 @@ CONFIG_CHECK="~USB_SERIAL"
src_prepare() {
sed -i -e '/install.*BIN/s:-s::' Makefile || die
+ epatch "${FILESDIR}/usb_modeswitch.sh-tmpdir.patch"
}
src_compile() {
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-10 3:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10 3:41 [gentoo-commits] repo/gentoo:master commit in: sys-apps/usb_modeswitch/, sys-apps/usb_modeswitch/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2017-02-03 21:47 Robin H. Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox