Your message dated Thu, 09 Dec 2010 09:17:04 +0000
with message-id <[email protected]>
and subject line Bug#289201: fixed in yaboot 1.3.13a-1squeeze1
has caused the Debian Bug report #289201,
regarding yaboot: ofpath doesn't recognize several scsi controllers that don't 
provice /proc/scsi infos
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 [email protected]
immediately.)


-- 
289201: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=289201
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: yaboot
Version: 1.3.13-3
Severity: wishlist

Some SCSI controllers (like ipr, emulex, etc.) don't provide required
informations in /proc/scsi/<modname>/*. In this case ofpath fails to
retrieve the OF path and Debian installations fail while installing the
bootloader.

The attached patch adds the possibility to look for the required
attributes in /sys - if this is available and the former methods failed
with the "Unkown driver" message.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.28
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
diff -Naur yaboot-1.3.13-debian/ybin/ofpath yaboot-1.3.13.sysfs/ybin/ofpath
--- yaboot-1.3.13-debian/ybin/ofpath    2004-07-11 20:12:42.000000000 +0000
+++ yaboot-1.3.13.sysfs/ybin/ofpath     2005-01-07 18:44:17.113905264 +0000
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
 
 ###############################################################################
 ##
@@ -7,7 +7,7 @@
 ##
 ## Portions based on show_of_path.sh:
 ##
-## Copyright (C) 2000 Olaf Hering <[email protected]>
+## Copyright (C) 2000,2004 Olaf Hering <[email protected]>
 ## 
 ## This program is free software; you can redistribute it and/or
 ## modify it under the terms of the GNU General Public License
@@ -304,8 +304,12 @@
            echo 
"${DEVICE_PATH##*device-tree}/k2-s...@$device_id/d...@0:$PARTITION"
            ;;
        *)
-           echo 1>&2 "$PRG: Driver: $SCSI_DRIVER is not supported"
-           return 1
+           if grep -q '[[:space:]]sysfs' /proc/filesystems; then
+               try_sysfs_ofpath
+           else
+               echo 1>&2 "$PRG: Driver: $SCSI_DRIVER is not supported"
+               return 1
+           fi
            ;;
     esac
     return 0
@@ -834,6 +838,315 @@
     fi
 }
 
+## try sysfs based method here
+try_sysfs_ofpath()
+{
+    file=$device
+
+    # check if we run on a NewWorld PowerMacintosh
+    if [ -f /proc/device-tree/openprom/model ] ; then
+        while read openfirmware ofversion; do
+       case "$openfirmware" in
+         iMac,1|OpenFirmware)  MACHINE="pmac_new" ;;
+         Open)                 MACHINE="pmac_old" ;;
+       esac
+        done < <(cat /proc/device-tree/openprom/model;echo)
+    fi
+    
+    if [ "$MACHINE" = "pmac_old" ]; then
+        echo 1>&2 "ERROR: This machine is an Oldworld, no need for firmware 
pathnames"
+        exit 1
+    fi
+    
+    if [ -b $file ] ; then
+        read i i i i file_major file_minor i < <(ls -l "$file")
+        file_major="${file_major%%,*}"
+        file_minor="${file_minor##*,}"
+        file=/
+    else
+        mystat="`type -p stat`"
+        if [ -z "$mystat" -o ! -x "$mystat" ] ; then
+       echo 1>&2 "ERROR: GNU stat required"
+       exit 1
+        fi
+    
+        file_majorminor=$($mystat --format="%d" "$file")
+        file_major="$[file_majorminor >> 8]"
+        file_minor="$[file_majorminor & 255]"
+    
+        file_mountp=$file
+        while [ "$file_mountp" -a $($mystat --format="%d" 
"/${file_mountp%/*}") == $file_majorminor ]; do
+       file_mountp="${file_mountp%/*}"
+        done
+    fi
+    file_majorminor=$file_major:$file_minor
+    
+    file_sysfs_path=
+    # assert that /sys is mounted, else try to mount, on fail complain
+    if test -d /sys/block || mount -t sysfs sysfs /sys; then
+        for i in $(find /sys/block -name dev); do
+       : looking at $i
+       if [ "$(< $i)" = "$file_majorminor" ] ; then file_sysfs_path=$i ; break 
; fi
+        done
+    else
+        echo 1>&2 "ERROR: sysfs not mounted on /sys and attempt to mount 
failed"
+        echo 1>&2 may be no kernel 2.6.x?
+        exit 1
+    fi
+    
+    if [ -z "$file_sysfs_path" ] ; then
+        [ "$quietmode" ] || echo 1>&2 "ERROR: can not find major:minor 
$file_majorminor for $file"
+        exit 1
+    fi
+    
+    
+    file_sysfs_dir="${file_sysfs_path%/dev}"
+    if [ ! -L "$file_sysfs_dir/device" ] ; then
+        # maybe a partition
+        file_partition="${file_sysfs_dir##*[a-z]}"
+        file_sysfs_dir="${file_sysfs_dir%/*}"
+        if [ ! -L "$file_sysfs_dir/device" ] ; then
+       [ "$quietmode" ] || echo 1>&2 "ERROR: driver for sysfs path 
$file_sysfs_dir has no full sysfs support"
+       exit 1
+        fi
+    fi
+    
+    cd "$file_sysfs_dir/device"
+    file_full_sysfs_path="`/bin/pwd`"
+    file_storage_type=
+    cd "$file_full_sysfs_path"
+    case "$file_full_sysfs_path" in
+        */ide[0-9]*/[0-9]*)
+               file_storage_type=ide
+               of_disk_ide_channel="${file_full_sysfs_path##*.}"
+               cd ../..
+               if [[ "$of_disk_ide_channel" == */* ]]; then
+           of_disk_ide_channel="${of_disk_ide_channel%%/*}"
+           cd ../..
+       fi
+               ;;
+        */host[0-9]*/[0-9]*:[0-9]*:[0-9]*:[0-9]*)
+               # file_storage_type=scsi !! or vscsi, will be determined later
+       spec="${file_full_sysfs_path##*/host[0-9]*/}"
+       read of_disk_scsi_host of_disk_scsi_chan of_disk_scsi_id 
of_disk_scsi_lun <<< ${spec//:/ }
+       cd ../..
+       ;;
+    esac
+
+    if [ -f ../devspec ]; then
+        devspec=../devspec
+    else
+        devspec=devspec
+    fi
+
+    if [ -f $devspec ] ; then
+        read file_of_hw_devtype < $devspec
+        file_of_hw_devtype=/proc/device-tree${file_of_hw_devtype}
+        if ! [ -f ${file_of_hw_devtype}/device_type ]; then
+       # check for s...@$of_disk_scsi_chan/device_type else bail out ..
+       file_of_hw_devtype="${file_of_hw_devtype}/s...@${of_disk_scsi_chan}"
+        fi
+        if [ -f ${file_of_hw_devtype}/device_type ] ; then
+       case "$(< ${file_of_hw_devtype}/device_type)" in
+           k2-sata-root)
+               : found k2-sata-root, guessing channel
+               counter=0
+               for i in host[0-9]*; do
+                   : working on virtual scsi host $i
+                   case "$file_full_sysfs_path" in
+                       */$i/*)
+                           : found $i $counter
+                           break
+                           ;;
+                       *) ;;
+                   esac
+                   (( counter++ ))
+               done
+               of_device_path=`grep -l block 
${file_of_hw_devtype}/*...@$counter/*/device_type`
+               of_device_path=${of_device_path%/device_type}
+               of_device_path=${of_device_path##/proc/device-tree}
+               file_storage_type=sata
+               ;;
+           scsi*)
+               file_storage_type=scsi
+               ;;
+           ide|ata)
+               # TODO
+               # check for right file-storage_type == ide ??
+               ;;
+           pci-ide|pci-ata)
+               of_device_path=`grep -l block 
${file_of_hw_devtype}/*...@*/*/device_type`
+               of_device_path=${of_device_path%/device_type}
+               of_device_path=${of_device_path##/proc/device-tree}
+               file_storage_type=pci-ide
+               # TODO
+               # check for right file-storage_type == ide ??
+               ;;
+           vscsi)
+               file_storage_type=vscsi
+               ;;
+           *)
+               echo 1>&2 "ERROR: Unknown device type $(< 
${file_of_hw_devtype}/device_type)"
+               exit 1
+       esac
+        else
+       echo 1>&2 "ERROR: no device_type found in ${file_of_hw_devtype}"
+       exit 1
+        fi
+    
+        case "$file_storage_type" in
+            ide)
+           
file_of_hw_path="${file_of_hw_devtype##/proc/device-tree}/d...@$of_disk_ide_channel"
+           ;;
+            scsi)
+           file_of_hw_path=$(printf "%s/s...@%x,%x"  
"${file_of_hw_devtype##/proc/device-tree}" $of_disk_scsi_id $of_disk_scsi_lun)
+           ;;
+            sata|pci-ide)
+           file_of_hw_path=$of_device_path
+           ;;
+            vscsi)
+           (( of_disk_vscsi_nr = ( (2 << 14) | (of_disk_scsi_chan<<5) |  
(of_disk_scsi_id<<8) |  of_disk_scsi_lun ) <<48 ));
+           if [ -d ${file_of_hw_devtype}/disk ]; then
+               of_disk_vscsi_dir=disk
+           elif [ -d ${file_of_hw_devtype}/sd ]; then
+               of_disk_vscsi_dir=sd
+           else
+               echo >&2 "ERROR: Could not find a known hard disk directory 
under '${file_of_hw_devtype}'"
+               exit 1
+           fi  
+           file_of_hw_path=$(printf "%s/%...@%lx"  
"${file_of_hw_devtype##/proc/device-tree}" $of_disk_vscsi_dir $of_disk_vscsi_nr)
+           ;;
+        esac
+    else # no 'devspec' found
+        echo >&2 "WARNING: No devspec file found for $file_full_sysfs_path"
+    
+       # find the path via the device-tree
+       dev_vendor="$(< vendor)"
+       dev_device="$(< device)"
+       dev_subsystem_vendor="$(< subsystem_vendor)"
+       dev_subsystem_device="$(< subsystem_device)"
+       for i in `find /proc/device-tree -name vendor-id`
+       do
+               : looking at $i
+               dev_of_pci_id=
+               while read a vendor_id
+               do
+                       dev_of_pci_id="0x$vendor_id"
+                       break
+               done  < <(od --read-bytes=8 --width=8 -t x4 $i)
+               : vendor-id $dev_of_pci_id
+               dev_of_pci_id=$(($dev_of_pci_id))
+               dev_vendor=$(($dev_vendor))
+               if [ "$dev_of_pci_id" != "$dev_vendor" ] ; then continue ; fi
+               if [ ! -f "${i%/*}/device-id" ] ; then continue ; fi
+               while read a device_id
+               do
+                       dev_of_pci_id="0x$device_id"
+                       break
+               done < <(od --read-bytes=8 --width=8 -t x4 "${i%/*}/device-id")
+               : device-id $dev_of_pci_id
+               dev_of_pci_id=$(($dev_of_pci_id))
+               dev_device=$(($dev_device))
+               if [ "$dev_of_pci_id" != "$dev_device" ] ; then continue ; fi
+               if [ -f "${i%/*}/subsystem-vendor-id" ] ; then
+                       while read a sub_vendor_id
+                       do
+                               dev_of_pci_id="0x$sub_vendor_id"
+                               break
+                       done < <(od --read-bytes=8 --width=8 -t x4 
"${i%/*}/subsystem-vendor-id")
+                       : sub-vendor-id $dev_of_pci_id
+                       dev_of_pci_id=$(($dev_of_pci_id))
+                       dev_subsystem_vendor=$(($dev_subsystem_vendor))
+                       if [ "$dev_of_pci_id" != "$dev_subsystem_vendor" ] ; 
then continue ; fi
+                       while read a sub_device_id
+                       do
+                               dev_of_pci_id="0x$sub_device_id"
+                               break
+                       done < <(od --read-bytes=8 --width=8 -t x4 
"${i%/*}/subsystem-id")
+                       : sub-device-id $dev_of_pci_id
+                       dev_of_pci_id=$(($dev_of_pci_id))
+                       dev_subsystem_device=$(($dev_subsystem_device))
+                       if [ "$dev_of_pci_id" != "$dev_subsystem_device" ] ; 
then continue ; fi
+               fi
+               : found $i
+               if [ -z "$of_device_list" ] ; then
+                       of_device_list="${i%/*}"
+               else
+                       of_device_list="$of_device_list ${i%/*}"
+               fi
+       done
+       case "$of_device_list" in
+           *\ *)
+               : more than one controler found, fun
+               for i in $of_device_list
+               do
+               : working on $i
+                       while read a addr
+                       do
+                       addr="0x$addr"
+                       break
+                       done < <(od -t x8 -j4 -N8 < $i/assigned-addresses)
+               : addr $addr , pure guess ...
+               grep -q ^$addr resource || continue
+               : found $i
+               of_device_list=$i
+               break
+               done
+               ;;
+           *)
+               ;;
+       esac
+    
+       case "$(< $of_device_list/device_type)" in
+           k2-sata-root)
+               : found k2-sata-root, guessing channel
+               counter=0
+               for i in host[0-9]*; do
+                   : working on virtual scsi host $i
+                   case "$file_full_sysfs_path" in
+                       */$i/*)
+                           : found $i $counter
+                           break
+                           ;;
+                       *) ;;
+                   esac
+                   let counter++
+               done
+               file_storage_type=sata
+               of_device_path=`grep -l block 
$of_device_list/*...@$counter/*/device_type`
+               ;;
+           *)
+               of_device_path=`grep -l block $of_device_list/*/device_type`
+               ;;
+       esac
+    
+       of_device_path=${of_device_path%/device_type}
+       case "$file_storage_type" in
+           ide)
+               
file_of_hw_path="${of_device_path##/proc/device-tr...@$of_disk_ide_channel"
+               ;;
+           scsi)
+               file_of_hw_path=$(printf  "%s/s...@%x,%x"  
"${of_device_path##/proc/device-tree}" $of_disk_scsi_id $of_disk_scsi_lun)
+               ;;
+           sata)
+               file_of_hw_path="${of_device_path##/proc/device-tree}"
+               ;;
+       esac
+       # no "devspec" available
+    fi
+    
+    #
+    # done
+    #
+    
+    # print the resulting open firmware path
+    if [ "$file" != "/" ] ; then
+        echo 
${file_of_hw_path}${file_partition:+:$file_partition},${file#$file_mountp}
+    else
+        echo ${file_of_hw_path}${file_partition:+:$file_partition}
+    fi
+}
+
 ## parse command line switches.
 if [ $# != 0 ] ; then
     while true ; do

--- End Message ---
--- Begin Message ---
Source: yaboot
Source-Version: 1.3.13a-1squeeze1

We believe that the bug you reported is fixed in the latest version of
yaboot, which is due to be installed in the Debian FTP archive:

yaboot_1.3.13a-1squeeze1.diff.gz
  to main/y/yaboot/yaboot_1.3.13a-1squeeze1.diff.gz
yaboot_1.3.13a-1squeeze1.dsc
  to main/y/yaboot/yaboot_1.3.13a-1squeeze1.dsc
yaboot_1.3.13a-1squeeze1_powerpc.deb
  to main/y/yaboot/yaboot_1.3.13a-1squeeze1_powerpc.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Milan Kupcevic <[email protected]> (supplier of updated yaboot package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 05 Dec 2010 10:34:50 -0500
Source: yaboot
Binary: yaboot
Architecture: source powerpc
Version: 1.3.13a-1squeeze1
Distribution: testing-proposed-updates
Urgency: low
Maintainer: Debootloaders Yaboot Maintainers Team 
<[email protected]>
Changed-By: Milan Kupcevic <[email protected]>
Description: 
 yaboot     - Yet Another Bootloader
Closes: 289201 342833 377097 572869 580455
Changes: 
 yaboot (1.3.13a-1squeeze1) testing-proposed-updates; urgency=low
 .
   * Team upload.
   * Get scsi, sata, and firewire drive info from sysfs as legacy /proc/scsi
     interface does not exist anymore.
     (Closes: #572869, #377097, #342833, #289201)
   * Use persistent device naming symlinks, UUID and LABEL tags instead of
     unix block device names. (Closes: #580455)
   * debian/copyright: Add copyright notice from ofpath.
Checksums-Sha1: 
 0cba98166cd23e26d083674feeffb29f5f5759b6 1469 yaboot_1.3.13a-1squeeze1.dsc
 9aa43b08c6fcaeac8333d9193801568cca4b46a4 17679 yaboot_1.3.13a-1squeeze1.diff.gz
 345931f766d70829ba1db09b4240f339de8714b6 211588 
yaboot_1.3.13a-1squeeze1_powerpc.deb
Checksums-Sha256: 
 47a54da0acf0b6d563656965482c09aedd53ea6af045efe050258c16d785e66e 1469 
yaboot_1.3.13a-1squeeze1.dsc
 35618ce211f67f758f945b4d6fdf6d420db7fbeaeb8a60829d5aa2d10ad75045 17679 
yaboot_1.3.13a-1squeeze1.diff.gz
 fa3b954c1ac4f346750666b30a6c36758ce9c31841fa2842c436873092bc8a62 211588 
yaboot_1.3.13a-1squeeze1_powerpc.deb
Files: 
 01f8a9b134407569923bc380311f4213 1469 admin important 
yaboot_1.3.13a-1squeeze1.dsc
 ed00d1d6700ea2df00e7ec706edd294a 17679 admin important 
yaboot_1.3.13a-1squeeze1.diff.gz
 3987a8ee5185755f4e1652c41cf5f133 211588 admin important 
yaboot_1.3.13a-1squeeze1_powerpc.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEVAwUBTQCdck0yN7tZsYcyAQhf+wf/SQS3CssJ93ZVJ2PeqoAYcGcnIuvV54aA
NsmmRKY+nvIkq15pMWMKXikrC5afKzTlf4S/NjqV5YQn0MA/K8AdG+nqNVrQSS/J
RBo/EhHQ4HucbpQ3Qc87633C/JHi+0QvE5aqgTT2d2YpOJsX8MMQz9M5wStaFoa+
rpzenKQkLUn/Qqwzs8wYNtaQVzGRCN7c3xoi6S2/NkZTDcrb39NeG9e6PeIZrg7l
pxg3rJZHLrEIS0tTf640IYeLJymUxLQKGONcsEt70pgWqYAaMDap6nyWYMjCe9oQ
kPbENryQk5tHF7crRn1jVXEFZD3O+ipaAQfeRDnQ3TTI019zdV7wtA==
=YYYg
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to