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

Bastian Blank waldi at alioth.debian.org
Sun Mar 11 14:25:35 CET 2007


Author: waldi
Date: Sun Mar 11 13:25:35 2007
New Revision: 8352

Added:
   dists/trunk/linux-2.6/debian/templates/image.plain.bug/
   dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-0version
   dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-1tainted
   dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-dmesg
   dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-modules
   dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-pci
   dists/trunk/linux-2.6/debian/templates/image.plain.bug/script
Modified:
   dists/trunk/linux-2.6/debian/rules.real
Log:
Add reportbug scripts.

* debian/rules.real: Install bug files.
* debian/templates/image.plain.bug: Add.


Modified: dists/trunk/linux-2.6/debian/rules.real
==============================================================================
--- dists/trunk/linux-2.6/debian/rules.real	(original)
+++ dists/trunk/linux-2.6/debian/rules.real	Sun Mar 11 13:25:35 2007
@@ -412,6 +412,9 @@
 	$(MAKE) -f debian/rules.real \
 	  install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain_templates \
 	  PACKAGE_DIR='$(PACKAGE_DIR)' REAL_VERSION='$(REAL_VERSION)'
+	$(MAKE) -f debian/rules.real \
+	  install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain_bug \
+	  PACKAGE_DIR='$(PACKAGE_DIR)' PACKAGE_NAME='$(PACKAGE_NAME)' REAL_VERSION='$(REAL_VERSION)'
 	$(MAKE) -f debian/rules.real install-base
 
 install-image-amd64-$(SUBARCH)-$(FLAVOUR)-plain_image \
@@ -456,6 +459,12 @@
 	chmod 755 '$(PACKAGE_DIR)'/DEBIAN/{config,{pre,post}*}
 	chmod 644 '$(PACKAGE_DIR)'/DEBIAN/templates
 
+install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain_bug:
+	dh_installdirs usr/share/bug/$(PACKAGE_NAME)
+	dh_install debian/templates/image.plain.bug/* usr/share/bug/$(PACKAGE_NAME)
+	chmod 755 '$(PACKAGE_DIR)'/usr/share/bug/$(PACKAGE_NAME)/script
+	echo "RELEASE='$(REAL_VERSION)'" > '$(PACKAGE_DIR)'/usr/share/bug/$(PACKAGE_NAME)/info
+
 install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-s390-tape:
 	dh_testdir
 	dh_testroot

Added: dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-0version
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-0version	Sun Mar 11 13:25:35 2007
@@ -0,0 +1,9 @@
+add_0version() {
+  echo -n '** Version: ' >&3
+  cat /proc/version >&3
+  echo >&3
+}
+
+ask_0version() {
+  true
+}

Added: dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-1tainted
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-1tainted	Sun Mar 11 13:25:35 2007
@@ -0,0 +1,28 @@
+TAINT_PROPRIETARY_MODULE=1
+TAINT_FORCED_MODULE=2
+TAINT_UNSAFE_SMP=4
+TAINT_FORCED_RMMOD=8
+TAINT_MACHINE_CHECK=16
+TAINT_BAD_PAGE=32
+
+add_1tainted() {
+  tainted=$(cat /proc/sys/kernel/tainted)
+  if [ "$tainted" -gt 0 ]; then
+    local s
+    [ $(($tainted & $TAINT_PROPRIETARY_MODULE)) ] && s="P" || s="G"
+    [ $(($tainted & $TAINT_FORCED_MODULE)) ] && s="${s}F"
+    [ $(($tainted & $TAINT_UNSAFE_SMP)) ] && s="${s}S"
+    [ $(($tainted & $TAINT_FORCED_RMMOD)) ] && s="${s}R"
+    [ $(($tainted & $TAINT_MACHINE_CHECK)) ] && s="${s}M"
+    [ $(($tainted & $TAINT_BAD_PAGE)) ] && s="${s}B"
+    echo '** Tainted:' $s >&3
+    echo >&3
+  else
+    echo '** Not tainted' >&3
+    echo >&3
+  fi
+}
+
+ask_1tainted() {
+  true
+}

Added: dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-dmesg
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-dmesg	Sun Mar 11 13:25:35 2007
@@ -0,0 +1,9 @@
+add_dmesg() {
+  echo '** Kernel log:' >&3
+  dmesg | tail -n 100 >&3
+  echo >&3
+}
+
+ask_dmesg() {
+  true
+}

Added: dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-modules
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-modules	Sun Mar 11 13:25:35 2007
@@ -0,0 +1,10 @@
+add_modules() {
+  echo '** Loaded modules:' >&3
+  lsmod >&3
+  echo >&3
+}
+
+ask_modules() {
+  true
+}
+

Added: dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-pci
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/templates/image.plain.bug/include-pci	Sun Mar 11 13:25:35 2007
@@ -0,0 +1,14 @@
+add_pci() {
+  echo '** PCI devices:' >&3
+  if command -v lspci > /dev/null; then
+    lspci -nnvv >&3
+  else
+    echo 'not available' >&3
+  fi
+  echo >&3
+}
+
+ask_pci() {
+  true
+}
+

Added: dists/trunk/linux-2.6/debian/templates/image.plain.bug/script
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/templates/image.plain.bug/script	Sun Mar 11 13:25:35 2007
@@ -0,0 +1,22 @@
+#!/bin/bash
+set -e
+
+dir="$(dirname $0)"
+
+. "$dir"/info
+
+for file in "$dir"/include-*; do
+  name="$(echo $file | sed -e 's,^.*/include-,,')"
+  hooks+=($name)
+  . "$file"
+done
+
+if [ "$RELEASE" == "$(uname -r)" ]; then
+  for hook in ${hooks[@]}; do
+    add_$hook
+  done
+else
+  for hook in ${hooks[@]}; do
+    ask_$hook
+  done
+fi



More information about the Kernel-svn-changes mailing list