[kernel] r14418 - in dists/lenny/linux-2.6/debian: . templates/image.plain.bug

Ben Hutchings benh at alioth.debian.org
Mon Oct 19 23:07:52 UTC 2009


Author: benh
Date: Mon Oct 19 23:07:50 2009
New Revision: 14418

Log:
Update bug script from trunk

Added:
   dists/lenny/linux-2.6/debian/templates/image.plain.bug/control
   dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-model
   dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-network
   dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-usb
   dists/lenny/linux-2.6/debian/templates/image.plain.bug/presubj
Modified:
   dists/lenny/linux-2.6/debian/changelog
   dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-1tainted
   dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-dmesg
   dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-pci
   dists/lenny/linux-2.6/debian/templates/image.plain.bug/script

Modified: dists/lenny/linux-2.6/debian/changelog
==============================================================================
--- dists/lenny/linux-2.6/debian/changelog	Mon Oct 19 22:45:24 2009	(r14417)
+++ dists/lenny/linux-2.6/debian/changelog	Mon Oct 19 23:07:50 2009	(r14418)
@@ -26,6 +26,15 @@
   * acenic: Pass up error code from ace_load_firmware(), avoiding an oops
     (Closes: #521383)
   * axnet_cs: Reclaim Netgear FA411 from pcnet_cs (Closes: #550935)
+  * Update bug script from trunk:
+    - Update taint checks
+    - Prompt submitters to run the kernel version they're reporting on
+      or otherwise record boot messages
+    - Include PCI device list even if the running kernel doesn't match
+    - Include model information
+    - Include firmware package status
+    - Include network configuration and status (optional)
+    - Include USB device list
 
   [ dann frazier ]
   * autofs4: don't make expiring dentry negative, avoiding an oops

Added: dists/lenny/linux-2.6/debian/templates/image.plain.bug/control
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/templates/image.plain.bug/control	Mon Oct 19 23:07:50 2009	(r14418)
@@ -0,0 +1,2 @@
+Submit-As: linux-2.6
+Package-Status: firmware-bnx2 firmware-bnx2x firmware-ipw2x00 firmware-ivtv firmware-iwlwifi firmware-linux firmware-linux-nonfree firmware-qlogic firmware-ralink

Modified: dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-1tainted
==============================================================================
--- dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-1tainted	Mon Oct 19 22:45:24 2009	(r14417)
+++ dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-1tainted	Mon Oct 19 23:07:50 2009	(r14418)
@@ -1,30 +1,39 @@
-TAINT_PROPRIETARY_MODULE=1
-TAINT_FORCED_MODULE=2
-TAINT_UNSAFE_SMP=4
-TAINT_FORCED_RMMOD=8
-TAINT_MACHINE_CHECK=16
-TAINT_BAD_PAGE=32
-TAINT_USER=64
-TAINT_DIE=128
-TAINT_OVERRIDDEN_ACPI_TABLE=256
-TAINT_WARN=512
+TAINT_PROPRIETARY_MODULE=0
+TAINT_FORCED_MODULE=1
+TAINT_UNSAFE_SMP=2
+TAINT_FORCED_RMMOD=3
+TAINT_MACHINE_CHECK=4
+TAINT_BAD_PAGE=5
+TAINT_USER=6
+TAINT_DIE=7
+TAINT_OVERRIDDEN_ACPI_TABLE=8
+TAINT_WARN=9
+TAINT_CRAP=10
+
+_check() {
+  if [ $(($tainted & 1<<$1)) -ne 0 ]; then
+    result_short="$result_short$2"
+    result_long="$result_long * $3\n"
+  fi
+}
 
 add_1tainted() {
   tainted=$(cat /proc/sys/kernel/tainted)
   if [ "$tainted" -gt 0 ]; then
-    local s
-    [ $(($tainted & $TAINT_PROPRIETARY_MODULE)) -ne 0 ] && s="P" || s="G"
-    [ $(($tainted & $TAINT_FORCED_MODULE)) -ne 0 ] && s="${s}F" || s="$s "
-    [ $(($tainted & $TAINT_UNSAFE_SMP)) -ne 0 ] && s="${s}S" || s="$s "
-    [ $(($tainted & $TAINT_FORCED_RMMOD)) -ne 0 ] && s="${s}R" || s="$s "
-    [ $(($tainted & $TAINT_MACHINE_CHECK)) -ne 0 ] && s="${s}M" || s="$s "
-    [ $(($tainted & $TAINT_BAD_PAGE)) -ne 0 ] && s="${s}B" || s="$s "
-    [ $(($tainted & $TAINT_USER)) -ne 0 ] && s="${s}U" || s="$s "
-    [ $(($tainted & $TAINT_DIE)) -ne 0 ] && s="${s}D" || s="$s "
-    [ $(($tainted & $TAINT_OVERRIDDEN_ACPI_TABLE)) -ne 0 ] && s="${s}A" || s="$s "
-    [ $(($tainted & $TAINT_WARN)) -ne 0 ] && s="${s}W" || s="$s "
-    echo '** Tainted:' $s "($tainted)" >&3
-    echo >&3
+    local result_short result_long
+    _check $TAINT_PROPRIETARY_MODULE 'P' 'Proprietary module has been loaded.'
+    _check $TAINT_FORCED_MODULE 'F' 'Module has been forcibly loaded.'
+    _check $TAINT_UNSAFE_SMP 'S' 'SMP with CPUs not designed for SMP.'
+    _check $TAINT_FORCED_RMMOD 'R' 'User forced a module unload.'
+    _check $TAINT_MACHINE_CHECK 'M' 'System experienced a machine check exception.'
+    _check $TAINT_BAD_PAGE 'B' 'System has hit bad_page.'
+    _check $TAINT_USER 'U' 'Userspace-defined naughtiness.'
+    _check $TAINT_DIE 'D' 'Kernel has oopsed before.'
+    _check $TAINT_OVERRIDDEN_ACPI_TABLE 'A' 'ACPI table overridden.'
+    _check $TAINT_WARN 'W' 'Taint on warning.'
+    _check $TAINT_CRAP 'C' 'Module from drivers/staging has been loaded.'
+    echo "** Tainted: $result_short ($tainted)" >&3
+    printf "$result_long" >&3
   else
     echo '** Not tainted' >&3
     echo >&3

Modified: dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-dmesg
==============================================================================
--- dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-dmesg	Mon Oct 19 22:45:24 2009	(r14417)
+++ dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-dmesg	Mon Oct 19 23:07:50 2009	(r14418)
@@ -5,5 +5,8 @@
 }
 
 ask_dmesg() {
-  true
+  # Remind the user to attach the kernel log.  This should also trigger
+  # a reminder in some MUAs if the user tries to send without it.
+  echo '** Kernel log: boot messages should be attached' >&3
+  echo >&3
 }

Added: dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-model
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-model	Mon Oct 19 23:07:50 2009	(r14418)
@@ -0,0 +1,52 @@
+grep_model() {
+  case "$(uname -m)" in
+  alpha)
+    egrep '^(system (type|variation|revision)|platform string)\b' /proc/cpuinfo
+    ;;
+  arm)
+    egrep '^(Processor|Hardware|Revision)\b' /proc/cpuinfo
+    ;;
+  i386|ia64|x86_64)
+    local found=
+    for name in {sys,product,chassis,bios,board}_{vendor,name,version}; do
+      if [ -f /sys/class/dmi/id/$name ]; then
+	echo -n "$name: "
+	cat /sys/class/dmi/id/$name
+	found=y
+      fi
+    done
+    test -n "$found"
+    ;;
+  mips|mips64)
+    egrep '^(system type|cpu model)\b' /proc/cpuinfo
+    ;;
+  parisc|parisc64)
+    egrep '^(model|[hs]version)\b' /proc/cpuinfo
+    ;;
+  ppc|ppc64)
+    egrep -i '^(board|machine|model|motherboard|platform|revision|vendor)\b' /proc/cpuinfo
+    ;;
+  s390|s390x)
+    egrep '^processor\b' /proc/cpuinfo
+    ;;
+  sparc|sparc64)
+    egrep '^(cpu|fpu|pmu|prom|type)\b' /proc/cpuinfo
+    ;;
+  *)
+    false
+    ;;
+  esac
+}
+
+add_model() {
+  local found=
+  echo '** Model information' >&3
+  grep_model >&3 2>/dev/null || echo "not available" >&3
+  echo >&3
+}
+
+ask_model() {
+  # This is still valid as long as the bug is being reported on the same
+  # system.
+  test $same_system = nop || add_model
+}

Added: dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-network
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-network	Mon Oct 19 23:07:50 2009	(r14418)
@@ -0,0 +1,38 @@
+add_network() {
+  yesno "Include network configuration and status from this computer? " nop
+  test $REPLY = yep || return 0
+
+  echo '** Network interface configuration:' >&3
+  cat /etc/network/interfaces >&3
+  echo >&3
+  echo '** Network status:' >&3
+  if command -v ip >/dev/null; then
+    echo '*** IP interfaces and addresses:' >&3
+    ip address show >&3
+    echo >&3
+  fi
+  echo '*** Device statistics:' >&3
+  cat /proc/net/dev >&3
+  echo >&3
+  if command -v netstat >/dev/null; then
+    echo '*** Protocol statistics:' >&3
+    netstat -s >&3 || true
+    echo >&3
+  fi
+  echo '*** Device features:' >&3
+  for dir in /sys/class/net/*; do
+    echo -n "${dir##*/}: " >&3
+    cat "$dir"/features >&3
+  done
+  echo >&3
+}
+
+ask_network() {
+  test $same_system = yep || return 0
+  yesno "Include network configuration from this computer? " nop
+  test $REPLY = yep || return 0
+
+  echo '** Network interface configuration:' >&3
+  cat /etc/network/interfaces >&3
+  echo >&3
+}

Modified: dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-pci
==============================================================================
--- dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-pci	Mon Oct 19 22:45:24 2009	(r14417)
+++ dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-pci	Mon Oct 19 23:07:50 2009	(r14418)
@@ -9,6 +9,8 @@
 }
 
 ask_pci() {
-  true
+  # This information shouldn't vary much between kernel versions, so
+  # include it anyway.
+  test $same_system = nop || add_pci
 }
 

Added: dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-usb
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/templates/image.plain.bug/include-usb	Mon Oct 19 23:07:50 2009	(r14418)
@@ -0,0 +1,15 @@
+add_usb() {
+  echo '** USB devices:' >&3
+  if command -v lsusb >/dev/null; then
+    lsusb >&3
+  else
+    echo 'not available' >&3
+  fi
+  echo >&3
+}
+
+ask_usb() {
+  # This information shouldn't vary much between kernel versions, so
+  # include it anyway.
+  test $same_system = nop || add_usb 
+}

Added: dists/lenny/linux-2.6/debian/templates/image.plain.bug/presubj
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/templates/image.plain.bug/presubj	Mon Oct 19 23:07:50 2009	(r14418)
@@ -0,0 +1,7 @@
+Please ensure that you are currently running the kernel version that you
+are reporting on.  This will allow your bug report to include useful
+diagnostic information about the running kernel.
+
+If you are reporting that the kernel fails to boot, please use a digital
+camera, serial console or netconsole to record the boot messages and
+attach these to your report.

Modified: dists/lenny/linux-2.6/debian/templates/image.plain.bug/script
==============================================================================
--- dists/lenny/linux-2.6/debian/templates/image.plain.bug/script	Mon Oct 19 22:45:24 2009	(r14417)
+++ dists/lenny/linux-2.6/debian/templates/image.plain.bug/script	Mon Oct 19 23:07:50 2009	(r14418)
@@ -1,6 +1,8 @@
 #!/bin/bash
 set -e
 
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
 dir="$(dirname $0)"
 
 . "$dir"/info
@@ -16,6 +18,8 @@
     add_$hook
   done
 else
+  yesno "Does the bug you are reporting affect this computer? " yep
+  same_system=$REPLY
   for hook in ${hooks[@]}; do
     ask_$hook
   done



More information about the Kernel-svn-changes mailing list