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

Bug#606441: marked as done (unblock: yaboot/1.3.13a-1squeeze1)



Your message dated Sat, 11 Dec 2010 19:12:41 +0100
with message-id <4D03BF19.9010300@dogguy.org>
and subject line Re: Bug#606441: unblock: yaboot/1.3.13a-1squeeze1
has caused the Debian Bug report #606441,
regarding unblock: yaboot/1.3.13a-1squeeze1
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.)


-- 
606441: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=606441
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: freeze-exception

Please unblock package yaboot

I sponsored an uploaded of yaboot to testing-proposed-updates with the
following changes to fix RC bugs:

 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.

The package has to go thourgh t-p-u because there is a newer upstream version
already uploaded to sid.
As nowbody answered to my pre approval request to debian-release[1]. I guessed
this is the right way to do it.
A debdiff to the current version in squeeze is attached.

Gaudenz

[1]  http://lists.debian.org/debian-release/2010/12/msg00210.html

unblock yaboot/1.3.13a-1squeeze1

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.32-5-powerpc
diff -u yaboot-1.3.13a/debian/control yaboot-1.3.13a/debian/control
--- yaboot-1.3.13a/debian/control
+++ yaboot-1.3.13a/debian/control
@@ -2,7 +2,7 @@
 Section: admin
 Priority: important
 Maintainer: Debootloaders Yaboot Maintainers Team <debootloaders-yaboot@lists.alioth.debian.org>
-Uploaders: Sven Luther <luther@debian.org>, Aurélien GÉRÔME <ag@roxor.cx>
+Uploaders: Sven Luther <luther@debian.org>, Aurélien GÉRÔME <ag@roxor.cx>, Milan Kupcevic <milan@physics.harvard.edu>
 Build-Depends: debhelper (>= 4), e2fslibs-dev (>= 1.27)
 Standards-Version: 3.7.2
 
diff -u yaboot-1.3.13a/debian/changelog yaboot-1.3.13a/debian/changelog
--- yaboot-1.3.13a/debian/changelog
+++ yaboot-1.3.13a/debian/changelog
@@ -1,3 +1,15 @@
+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.
+
+ -- Milan Kupcevic <milan@physics.harvard.edu>  Sun, 05 Dec 2010 10:34:50 -0500
+
 yaboot (1.3.13a-1) unstable; urgency=high
 
   * Convert debian/control from ISO_8859-15 to UTF-8.
diff -u yaboot-1.3.13a/debian/copyright yaboot-1.3.13a/debian/copyright
--- yaboot-1.3.13a/debian/copyright
+++ yaboot-1.3.13a/debian/copyright
@@ -33,6 +33,11 @@
 
 ###
 
+## ofpath: determine OpenFirmware path from unix device node
+## Copyright (C) 2010 Milan Kupcevic
+## Copyright (C) 2000, 2001, 2002, 2003 Ethan Benson
+## Copyright (C) 2000 Olaf Hering <olh@suse.de>
+
 ## ybin (YaBoot INstaller) installs/updates the yaboot bootloader.
 ## Copyright (C) 2000, 2001 Ethan Benson
 
diff -u yaboot-1.3.13a/ybin/ofpath yaboot-1.3.13a/ybin/ofpath
--- yaboot-1.3.13a/ybin/ofpath
+++ yaboot-1.3.13a/ybin/ofpath
@@ -3,6 +3,9 @@
 ###############################################################################
 ##
 ## ofpath: determine OpenFirmware path from unix device node
+##
+## Copyright (C) 2010 Milan Kupcevic
+##
 ## Copyright (C) 2000, 2001, 2002, 2003 Ethan Benson
 ##
 ## Portions based on show_of_path.sh:
@@ -27,7 +30,7 @@
 
 PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
 PRG="${0##*/}"
-VERSION=1.0.7
+VERSION=1.0.7+debian1
 DEBUG=0
 export LC_COLLATE=C
 
@@ -36,9 +39,10 @@
 {
 echo \
 "$PRG $VERSION
-Written by Ethan Benson
+Written by Ethan Benson, portions rewritten by Milan Kupcevic
 Portions based on show_of_path.sh written by Olaf Hering
 
+Copyright (C) 2010 Milan Kupcevic
 Copyright (C) 2000, 2001, 2002, 2003 Ethan Benson
 Portions Copyright (C) 2000 Olaf Hering
 This is free software; see the source for copying conditions.  There is NO
@@ -181,140 +185,124 @@
     return 0
 }
 
+# read OpenFirmware device path from its corresponding devspec
+find_of_path()
+{
+  [ -z "$1" ] && return
+  [ -f "$1/devspec" ] && {
+    OF_PATH="`cat $1/devspec`"
+    SYS_PATH="$1"
+    return
+  }
+  find_of_path "${1%/*}"
+}
+
 ## this finds information we need on both newworld and oldworld macs.
 ## mainly what scsi host a disk is attached to.
 scsiinfo()
 {
-    ## see if system has scsi at all
-    if [ ! -f /proc/scsi/scsi ] ; then
-	local kver="$(uname -r)"
-	case "$kver" in
-	    2.5.*|2.6.*)
-		if [ -d /sys/bus/scsi/devices -a \
-		    -n "$(ls /sys/bus/scsi/devices 2>/dev/null)" ] ; then
-		    echo 1>&2 "$PRG: /proc/scsi/scsi does not exist"
-		    echo 1>&2 "$PRG: Make sure you compiled your kernel with CONFIG_SCSI_PROC_FS=y"
-		    return 1
-		fi
-		;;
-	esac
-	echo 1>&2 "$PRG: /dev/$DEVNODE: Device not configured"
-	return 1
-    fi
-
-    ## first we have to figure out the SCSI ID, have to do that
-    ## anyway [to] find the attached scsi disks = "Direct-Access" and
-    ## stop at sda=1 sdb=2 or whatever count in 3 lines steps
-
-    ## get last letter of device node, ie sda -> a
-    SUBNODE=${DEVNODE##*sd}
-
-    ## turn SUBNODE above into a number starting at 1, ie a -> 1
-    SUBDEV="$(smalltr $SUBNODE)"
-    [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: SUBNODE=$SUBNODE SUBDEV=$SUBDEV"
-
-    DEVCOUNT=0
-
-    ## copy scsi file into a variable removing "Attached Devices"
-    ## which is the first line. this avoids a lot of
-    ## [incmopatible] crap later, and improves readability.
-
-    ## find number of lines once and recycle that number, to save
-    ## some time (linecount is a bit slow). subtract one line
-    ## to scrap Attached Devices:
-
-    SCSILINES="$(($(linecount /proc/scsi/scsi) - 1))"
-
-    if [ "$SUBDEV" -gt "$(cat /proc/scsi/scsi | grep Direct-Access | linecount)" ] ; then
-	echo 1>&2 "$PRG: /dev/$DEVNODE: Device not configured"
-	return 1
-    fi
-
-    PROCSCSI="$(cat /proc/scsi/scsi | tail -n $SCSILINES)"
-
-    for i in $(smallseq $(($SCSILINES / 3))) ; do
-
-	## put every scsi device into one single line
-	DEVINFO="$(echo "$PROCSCSI" | head -n $(($i * 3)) | tail -n 3)"
-	[ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVINFO=$DEVINFO"
-
-	## cut the type field, expect "Direct-Access" later.
-	DEVTYPE="$(v=$(echo ${DEVINFO##*Type: }) ; echo ${v%% *})"
-	[ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVTYPE=$DEVTYPE"
-
-	## get the device id.
-	DEVID="$(v=$(echo ${DEVINFO##*Id: }) ; n=$(echo ${v%% *}) ; echo ${n#*0})"
-	[ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVID=$DEVID"
-
-	## get the scsi host id.
-	DEVHOST="$(v=$(echo ${DEVINFO##*Host: scsi}) ; echo ${v%% *})"
-	[ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVHOST=$DEVHOST"
-
-	if [ "$DEVTYPE" = "Direct-Access" ] ; then
-	    DEVCOUNT="$(($DEVCOUNT + 1))"
-	    [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVCOUNT=$DEVCOUNT"
-	    if [ "$SUBDEV" = "$DEVCOUNT" ] ; then
-		DEVICE_HOST=$DEVHOST
-		DEVICE_ID=$DEVID
-		[ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVICE_HOST=$DEVICE_HOST"
-		break
-	    fi
-	fi
-    done
-
-    ## figure out what the scsi driver is, it is /proc/scsi/dirname.
-    [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVICE_HOST=$DEVICE_HOST"
-    SCSI_DRIVER="$(x=`ls /proc/scsi/*/$DEVICE_HOST 2>/dev/null | cat` ; y=`echo ${x##*proc/scsi/}` ; echo ${y%%/*})"
-    [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: SCSI_DRIVER=$SCSI_DRIVER"
-
-    ## figure out which host we found.
-    SCSI_HOSTNUMBER="$(v=`ls /proc/scsi/$SCSI_DRIVER/* 2>/dev/null | cat | grep -n "$DEVICE_HOST\>"` ; echo ${v%%:*})"
-    [ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: SCSI_HOSTNUMBER=$SCSI_HOSTNUMBER"
+
+  SYS_DEVICE="`readlink -f /sys/block/$DEVNODE/device`"
+
+  [ -e "$SYS_DEVICE" ] && {
+
+    SCSI_DEVICE=${SYS_DEVICE##*/}
+    HOST_ID=${SCSI_DEVICE%%:*}
+    BUS_ID=`T=${SCSI_DEVICE#*:}; echo ${T%%:*}`
+    DEVICE_ID=`T=${SCSI_DEVICE#*:*:}; echo ${T%%:*}`
+    LUN_ID=${SCSI_DEVICE##*:}
+
+    OF_PATH=;find_of_path "$SYS_DEVICE"
+
+    SCSI_DRIVER=`cat /sys/class/scsi_host/host$HOST_ID/proc_name 2>/dev/null`
+
+    SCSI_NAME=`cat /proc/device-tree$OF_PATH/name 2>/dev/null`
+
+    IEEE1394_ID=`cat /sys/block/$DEVNODE/device/ieee1394_id 2>/dev/null`
+    IEEE1394_ID=${IEEE1394_ID%%:*}
+
+    PLUG_ID=$(ls -dv $SYS_PATH/host* 2>/dev/null | grep -n "/host$HOST_ID$")
+    PLUG_ID=$((${PLUG_ID%%:*}-1))
+
+    PART=${PARTITION:+:$PARTITION}
+
+    [ "$LUN_ID" != "0" ] && LUNX=`printf ",%x" $LUN_ID`
+
+    [ "$DEBUG" = "1" ] && {
+      echo SYS_DEVICE=$SYS_DEVICE
+      echo SCSI_DEVICE=$SCSI_DEVICE
+      echo HOST_ID=$HOST_ID
+      echo BUS_ID=$BUS_ID
+      echo DEVICE_ID=$DEVICE_ID
+      echo LUN_ID=$LUN_ID
+      echo PLUG_ID=$PLUG_ID
+      echo IEEE1394_ID=$IEEE1394_ID
+      echo SCSI_NAME=$SCSI_NAME
+      echo SCSI_DRIVER=$SCSI_DRIVER
+      echo SYS_PATH=$SYS_PATH
+      echo OF_PATH=$OF_PATH
+      echo PART=$PART
+      echo LUNX=$LUNX
+    }
+
+    SCSI_DRIVER=${SCSI_DRIVER:?}
+
+    [ -z "$OF_PATH" ] && {
+      echo 1>&2 "Cannot find $DEVNODE among OpenFirmware registered devices"
+
+      exit 1
+    }
 
     return 0
+  }
+
+  echo 1>&2 "Link /sys/block/$DEVNODE/device does not exist"
+
+  exit 1
 }
 
-## generic function that can find OF device paths for scsi devices,
+## add OF device node to the host OF path,
 ## must be run after scsiinfo().
 scsi_ofpath()
 {
-    case "$SCSI_DRIVER" in
-	aic7xxx)
-	    HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do
-			lgrep "$i" "^ADPT" "^pci900[45]" "^pciclass,01000" ; done)"
-	    DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
-	    echo "${DEVICE_PATH##*device-tree}/@$DEVICE_ID:$PARTITION"
-	    ;;
-	sym53c8xx)
-	    HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do
-			lgrep "$i" "^Symbios" "^pci1000" "^pciclass,01000" ; done)"
-	    DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
-	    echo "${DEVICE_PATH##*device-tree}/@$DEVICE_ID:$PARTITION"
-	    ;;
-	mesh)
-	    HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do
-			lgrep "$i" "mesh" ; done)"
-	    DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
-	    echo "${DEVICE_PATH##*device-tree}/@$DEVICE_ID:$PARTITION"
-	    ;;
-	ata_k2|sata_svw)
-	    HOST_LIST="$(for i in `find /proc/device-tree -name compatible ` ; do
-			lgrep "$i" "k2-sata" ; done | sort)"
-	    DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
-	    echo "${DEVICE_PATH##*device-tree}/disk@0:$PARTITION"
-	    ;;
-	sbp2)
-	    HOST_LIST="$(for i in `find /proc/device-tree -name name` ; do
-	    		lgrep "$i" "sbp-2" ; done)"
-	    DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
-	    echo "${DEVICE_PATH##*device-tree}/disk@0:$PARTITION"
-	    ;;
-	*)
-	    echo 1>&2 "$PRG: Driver: $SCSI_DRIVER is not supported"
-	    return 1
-	    ;;
+
+  if [ -d "/proc/device-tree$OF_PATH/sas" ] ; then
+
+    SAS_ID=$(( ($BUS_ID << 16) | ($DEVICE_ID << 8) | $LUN_ID)) 
+    printf "%s/sas/disk@%x%s\n" $OF_PATH $SAS_ID $LUNX$PART
+
+  elif [ -d "/proc/device-tree$OF_PATH/scsi@`printf %x $BUS_ID`" ] ; then
+
+    printf "%s/scsi@%x/@%x%s\n" $OF_PATH $BUS_ID $DEVICE_ID $LUNX$PART
+
+  else
+
+    case "$SCSI_DRIVER-$SCSI_NAME" in
+      aic7xxx-*|sym53c8xx-*|mesh-*|*-scsi)
+        printf "%s/@%x%s\n" $OF_PATH $DEVICE_ID $LUNX$PART 
+        ;;
+      sata_sil-*|sata_vsc-*)
+        printf "%s/@%x%s\n" $OF_PATH $(($PLUG_ID * 2)) $PART
+        ;;
+      sata_svw-*|*-pci-ata)
+        printf "%s/@%x/@%x%s\n" $OF_PATH $PLUG_ID $DEVICE_ID $PART
+        ;;
+      sbp2-*)
+        IEEE1394_ID=${IEEE1394_ID:?}
+        printf "%s/node@%s/sbp-2/@%x%s\n" $OF_PATH $IEEE1394_ID $DEVICE_ID $PART
+        ;;
+      ipr-obsidian)
+        printf "%s/@%x,%x%s\n" $OF_PATH $BUS_ID $DEVICE_ID $LUNX$PART
+        ;;
+      *)
+        echo 1>&2 "${PRG}: ${SCSI_NAME} (${SCSI_DRIVER}) is not supported"
+        return 1
+        ;;
     esac
-    return 0
+
+  fi
+
+  return 0
 }
 
 ide_ofpath()
@@ -414,11 +402,11 @@
 
 	case "$DEVNODE" in
 	    hda|hdc|hde|hdg|hdi|hdk|hdm|hdo)
-		echo "${DEVSPEC}${MASTER}:$PARTITION"
+		echo "${DEVSPEC}${MASTER}${PARTITION:+:${PARTITION}}"
 		return 0
 		;;
 	    hdb|hdd|hdf|hdh|hdj|hdl|hdn|hdp)
-		echo "${DEVSPEC}${SLAVE}:$PARTITION"
+		echo "${DEVSPEC}${SLAVE}${PARTITION:+:${PARTITION}}"
 		return 0
 		;;
 	    *)
@@ -669,12 +657,6 @@
 {
     case "$DEVNODE" in
 	sd*)
-	    if ls -l /proc/device-tree | grep -q ^lr ; then
-		true
-	    else
-		echo 1>&2 "$PRG: /proc/device-tree is broken."
-		return 1
-	    fi
 
 	    ## use common scsiinfo function to get info we need.
 	    scsiinfo || return 1
only in patch2:
unchanged:
--- yaboot-1.3.13a.orig/ybin/ybin
+++ yaboot-1.3.13a/ybin/ybin
@@ -1589,6 +1589,13 @@
     exit 1
 fi
 
+## also accept symlink names in quotes or with escaped characters
+boot="`readlink -f \"$(eval echo ${boot})\"`"
+bsd="`readlink -f \"$(eval echo ${bsd})\"`"
+macos="`readlink -f \"$(eval echo ${macos})\"`"
+macosx="`readlink -f \"$(eval echo ${macosx})\"`"
+darwin="`readlink -f \"$(eval echo ${darwin})\"`"
+
 ## if there is still no config file use the automatic generation to make a
 ## generic yaboot.conf. do this before the confcheck to avoid wierd errors.
 if [ "$bootconf" = /dev/null ] ; then
only in patch2:
unchanged:
--- yaboot-1.3.13a.orig/ybin/yabootconfig
+++ yaboot-1.3.13a/ybin/yabootconfig
@@ -27,7 +27,7 @@
     PATH="${PATH}:${PATH_PREFIX}/sbin:${PATH_PREFIX}/bin:${PATH_PREFIX}/usr/sbin:${PATH_PREFIX}/usr/bin:${PATH_PREFIX}/usr/local/sbin:${PATH_PREFIX}/usr/local/bin"
 fi
 PRG="${0##*/}"
-VERSION=1.0.8
+VERSION=1.0.8+debian1
 CHROOT=/
 ## $CONFIG is relative to $CHROOT
 CONFIG=etc/yaboot.conf
@@ -720,6 +720,27 @@
     INITRDIMGS="\tinitrd=$INITRDIMG\n\tinitrd-size=8192\n"
 fi
 
+## Get a symlink which always points to the correct block device.
+## If it does not exist, give the unix block device name back.
+devsymlink() {
+  [ "$2" != "nobyid" ] && BYID="/dev/disk/by-id/scsi* /dev/disk/by-id/*"
+  for SYMLINK in $BYID /dev/disk/by-uuid/* /dev/disk/by-label/*; do
+    [ "`readlink -f "$SYMLINK"`" = "$1" ] && {
+      echo $SYMLINK
+      return
+    }
+  done
+  echo $1
+}
+
+## Get UUID= or LABEL= for the given unix partition block device.
+## If it could not be determined, give the unix partition block device back.
+uuidlabel() {
+  echo `devsymlink "$1" nobyid` \
+  | sed -e "s,/dev/disk/by-uuid/,UUID=," \
+        -e "s,/dev/disk/by-label/,LABEL=,"
+}
+
 ## generate global section of yaboot.conf
 GLOBAL="## yaboot.conf generated by $PRG $VERSION
 ##
@@ -727,9 +748,9 @@
 ${HEADER}##
 ## For a dual-boot menu, add one or more of: 
 ## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ\n
-boot=${BOOT}${DEVICE:-}
+boot=\"`devsymlink "${BOOT}"`\"${DEVICE:-}
 partition=$PARTITION
-root=$ROOT
+root=\"`uuidlabel "${ROOT}"`\"
 timeout=30
 install=${INSTALL}${OFBOOT:-}\n"
 

--- End Message ---
--- Begin Message ---
On 12/11/2010 06:16 PM, Otavio Salvador wrote:
> On Fri, Dec 10, 2010 at 19:52, Mehdi Dogguy <mehdi@dogguy.org> wrote:
>> On 12/09/2010 10:27 AM, Gaudenz Steinlin wrote:
>>>
>>> I sponsored an uploaded of yaboot to testing-proposed-updates with the
>>> following changes to fix RC bugs:
>>>
>>>  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.
>>>
>>> The package has to go thourgh t-p-u because there is a newer upstream version
>>> already uploaded to sid.
>>
>> I'm ok to approve this upload but I prefer to have an ack from Otavio (or
>> boot folks) first.
> 
> Please accept it however in the yaboot case I would prefer to try to
> get a newer version into squeeze after this fix has been done. So in
> my opinion we ought:
> 
>  - accept the t-p-u upload;

Done.

>  - get those fixes into the sid one and if it proves stable get it into squeeze.

I wonder how the "if" part will be checked in such short timeframe.

Regards,

-- 
Mehdi Dogguy مهدي الدڤي
http://dogguy.org/


--- End Message ---

Reply to: