[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1061465: marked as done (bookworm-pu: package usbutils/014-1+deb12u1)



Your message dated Sat, 10 Feb 2024 13:11:21 +0000
with message-id <E1rYn8b-002ybz-PB@coccia.debian.org>
and subject line Released with 12.5
has caused the Debian Bug report #1061465,
regarding bookworm-pu: package usbutils/014-1+deb12u1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1061465: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061465
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian.org@packages.debian.org
Usertags: pu
X-Debbugs-Cc: usbutils@packages.debian.org
Control: affects -1 + src:usbutils

[ Reason ]
The usbutils package contains a simple shell script called usb-devices
to list all USB devices with their basic characteristics. A regression
has been introduced in the version in bookworm, which causes some
devices behind hubs to be missed.

[ Impact ]
As the script is working partially listing some of the USB devices,
users might come to the wrong conclusion about the attached USB devices.

[ Tests ]
There is no automated testing for this shell script, however the fix has
been tested manually.

[ Risks ]
The patch is really simple and the fix has been in testing/unstable for
about 7 months without any reported issue.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
The changes consists in pulling the upstream patch into the package. The
print_device() function is called recursively to go through the USB
tree. The variables are global by default, so the values of the caller
got overwritten by the callee. The solution is to declare those
variables as local.
diff -Nru usbutils-014/debian/changelog usbutils-014/debian/changelog
--- usbutils-014/debian/changelog	2021-08-18 22:40:42.000000000 +0200
+++ usbutils-014/debian/changelog	2024-01-24 22:32:47.000000000 +0100
@@ -1,3 +1,10 @@
+usbutils (1:014-1+deb12u1) bookworm; urgency=medium
+
+  * Add 01-usb-devices-use-local-variable-type-to-handle-recurs.patch to fix
+    usb-devices not printing all devices.  Closes: #1052307.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 24 Jan 2024 22:32:47 +0100
+
 usbutils (1:014-1) unstable; urgency=medium
 
   * New upstream version:
diff -Nru usbutils-014/debian/patches/01-usb-devices-use-local-variable-type-to-handle-recurs.patch usbutils-014/debian/patches/01-usb-devices-use-local-variable-type-to-handle-recurs.patch
--- usbutils-014/debian/patches/01-usb-devices-use-local-variable-type-to-handle-recurs.patch	1970-01-01 01:00:00.000000000 +0100
+++ usbutils-014/debian/patches/01-usb-devices-use-local-variable-type-to-handle-recurs.patch	2024-01-24 22:32:47.000000000 +0100
@@ -0,0 +1,39 @@
+From b1c31712134d2b28877bbe01de1526a256ca676c Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Fri, 15 Oct 2021 16:07:17 +0200
+Subject: [PATCH] usb-devices: use 'local' variable type to handle recursion
+
+When recursing into a long USB tree, the local variables in the
+print_device() function would get confused and take on the value of the
+previous device it printed.  This caused devices to not get printed out
+at all, the exact opposite of what we wanted.
+
+Resolve this by using the non-POSIX 'local' variable declaration.
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ usb-devices | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/usb-devices b/usb-devices
+index 4e14608..9aca88d 100755
+--- a/usb-devices
++++ b/usb-devices
+@@ -101,10 +101,10 @@ print_interface() {
+ }
+ 
+ print_device() {
+-	devpath=$1
+-	parent=$2
+-	level=$3
+-	count=$4
++	local devpath=$1
++	local parent=$2
++	local level=$3
++	local count=$4
+ 
+ 	[ -d $devpath ] || return
+ 	cd $devpath
+-- 
+2.42.0
+
diff -Nru usbutils-014/debian/patches/series usbutils-014/debian/patches/series
--- usbutils-014/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ usbutils-014/debian/patches/series	2024-01-24 22:32:47.000000000 +0100
@@ -0,0 +1 @@
+01-usb-devices-use-local-variable-type-to-handle-recurs.patch

--- End Message ---
--- Begin Message ---
Version: 12.5

The upload requested in this bug has been released as part of 12.5.

--- End Message ---

Reply to: