Sorry to bother you, but your name was listed as the bug contact for
yaboot. If this is incorrect or out-of-date, please let me know who
has taken over supporting yaboot and ybin.
Thanks!
Rick
Begin forwarded message:
From: Rick Thomas <rbthomas@dillserver.rcthomas.org>
Date: May 6, 2010 1:59:09 AM EDT
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: lastest Sid upgrade breakes yaboot.conf and (maybe) ybin
Package: yaboot
Version: 1.3.13a-1
Severity: important
The latest kernel upgrade modifies yaboot.conf in bad ways.
1) It puts spaces around the "=" and quotes the argument, which
confuses ybin.
# diff /etc/yaboot.conf.old /etc/yaboot.conf
9c9,12
< boot=/dev/hda2
---
>
> # boot = /dev/hda2
> boot = "/dev/disk/by-label/bootstrap"
>
12c15,18
< root=/dev/hda6
---
>
> # root = /dev/hda6
> root = "UUID=88a47bea-8c36-4a09-b418-747e2396feb2"
>
ybin thinks the space between the "=" and the RHS and the quotes-
marks are part of the RHS.
It then says that the file "/dev/disk/by-label/bootstrap" (including
the quote-marks) doesn't exist.
If I remove the quote-marks, it still fails, beacuse it thinks the
leading space is part of the file name.
If I remove the leading space *and* the quote marks, it gets
further... But...
2) Later on, ofpath gets called on /dev/disk/by-label/bootstrap
which ofpath is unable to parse.
It says "ofpath: Device: /dev/bootstrap is not supported".
This could probably be fixed by running $boot thru "readlink -f" to
canonicalize it,
but that part of ybin is complicated enough that I decided it should
be done by an expert.
Hope this helps!
Rick
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: powerpc (ppc)
Kernel: Linux 2.6.32-5-powerpc
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Versions of packages yaboot depends on:
ii libc6 2.10.2-7 Embedded GNU C Library:
Shared lib
Versions of packages yaboot recommends:
ii hfsutils 3.2.6-11 Tools for reading and
writing Maci
ii powerpc-utils 1.1.3-24 Various utilities for
Linux/PowerP
yaboot suggests no packages.
-- no debconf information
Has anybody else noticed this problem?
In the absence of any word from anybody else, I'm working on a patch
to /usr/sbin/ybin that takes these changes into account, but I'd
feel better if somebody who knew what he/she was doing could take a
look at my patch and pass it along to the PTBs. I'm just a tester.
I report bugs. I'm not a DD (and don't want to be one!) so actually
fixing bugs is not my job. On the other hand, I think it would be a
shame to let something like this go forward into the release just
because nobody cared enough to get it fixed.
Enjoy!
Rick
Here's a patch that makes ybin strip off leading and trailing
whitespace and (0 or 1) leading and trailing quote marks. It also
passes arguments for ofpath thru "readlink -f" before calling ofpath.
I've tested it on my PowerMac G4. It works there. I don't know if
it will work in the other environments where yaboot is needed. I
don't have the necessary hardware for testing that.
Others please try it.
Enjoy!
Rick
*** /usr/sbin/ybin Sun Jul 16 07:45:35 2006
--- /tmp/ybin Sun May 9 00:14:04 2010
***************
*** 190,196 ****
{
case "$1" in
str)
! v=`grep "^$2[\ ,=]" "$CONF"` ; echo "${v#*=}"
;;
flag)
grep "^$2\>" "$CONF" > /dev/null && echo 0 || echo 1
--- 190,209 ----
{
case "$1" in
str)
! v=`grep "^$2[\ ,=]" "$CONF"`
! v="${v#*=}"
! # trim off leading and trailing blanks or tabs
! w=""
! while [ "$w" != "$v" ]
! do
! w="$v"
! v="${v##[ ]}"
! v="${v%%[ ]}"
! done
! # and zero or one leading and trailing quotes
! v="${v##[\'\"]}"
! v="${v%%[\'\"]}"
! echo "$v"
;;
flag)
grep "^$2\>" "$CONF" > /dev/null && echo 0 || echo 1
***************
*** 201,206 ****
--- 214,224 ----
esac
}
+ fofpath()
+ {
+ $OFPATH "$(readlink -f "$1")"
+ }
+
## check for existence of a configuration file, and make sure we have
## read permission.
confexist()
***************
*** 611,617 ****
## figure out bootstrap device OF pathname if user did not
supply it.
if [ -z "$ofboot" ] ; then
[ "$VERBOSE" = 1 ] && echo "$PRG: Finding OpenFirmware device path
to \`$boot'..."
! ofboot="$($OFPATH $boot)"
if [ $? != 0 ] ; then
echo 1>&2 "$PRG: Unable to find OpenFirmware path for boot=
$boot"
echo 1>&2 "$PRG: Please add ofboot=<path> where <path> is the
OpenFirmware path to $boot to $CONF"
--- 629,635 ----
## figure out bootstrap device OF pathname if user did not
supply it.
if [ -z "$ofboot" ] ; then
[ "$VERBOSE" = 1 ] && echo "$PRG: Finding OpenFirmware device path
to \`$boot'..."
! ofboot="$(fofpath $boot)"
if [ $? != 0 ] ; then
echo 1>&2 "$PRG: Unable to find OpenFirmware path for boot=
$boot"
echo 1>&2 "$PRG: Please add ofboot=<path> where <path> is the
OpenFirmware path to $boot to $CONF"
***************
*** 626,632 ****
/dev/*)
[ "$VERBOSE" = 1 ] && echo "$PRG: Finding OpenFirmware device
path to \`$bsd'..."
local sbsd="$bsd"
! bsd="$($OFPATH $bsd)"
if [ $? != 0 ] ; then
echo 1>&2 "$PRG: Unable to determine OpenFirmware path for
bsd=$sbsd"
echo 1>&2 "$PRG: Try specifying the real OpenFirmware path
for bsd=$sbsd in $CONF"
--- 644,650 ----
/dev/*)
[ "$VERBOSE" = 1 ] && echo "$PRG: Finding OpenFirmware device
path to \`$bsd'..."
local sbsd="$bsd"
! bsd="$(fofpath $bsd)"
if [ $? != 0 ] ; then
echo 1>&2 "$PRG: Unable to determine OpenFirmware path for
bsd=$sbsd"
echo 1>&2 "$PRG: Try specifying the real OpenFirmware path
for bsd=$sbsd in $CONF"
***************
*** 645,651 ****
/dev/*)
[ "$VERBOSE" = 1 ] && echo "$PRG: Finding OpenFirmware device
path to \`$macos'..."
local smacos="$macos"
! macos="$($OFPATH $macos)"
if [ $? != 0 ] ; then
echo 1>&2 "$PRG: Unable to determine OpenFirmware path for
macos=$smacos"
echo 1>&2 "$PRG: Try specifying the real OpenFirmware path
for macos=$smacos in $CONF"
--- 663,669 ----
/dev/*)
[ "$VERBOSE" = 1 ] && echo "$PRG: Finding OpenFirmware device
path to \`$macos'..."
local smacos="$macos"
! macos="$(fofpath $macos)"
if [ $? != 0 ] ; then
echo 1>&2 "$PRG: Unable to determine OpenFirmware path for
macos=$smacos"
echo 1>&2 "$PRG: Try specifying the real OpenFirmware path
for macos=$smacos in $CONF"
***************
*** 664,670 ****
/dev/*)
[ "$VERBOSE" = 1 ] && echo "$PRG: Finding OpenFirmware device
path to \`$macosx'..."
local smacosx="$macosx"
! macosx="$($OFPATH $macosx)"
if [ $? != 0 ] ; then
echo 1>&2 "$PRG: Unable to determine OpenFirmware path for
macosx=$smacosx"
echo 1>&2 "$PRG: Try specifying the real OpenFirmware path
for macosx=$smacosx in $CONF"
--- 682,688 ----
/dev/*)
[ "$VERBOSE" = 1 ] && echo "$PRG: Finding OpenFirmware device
path to \`$macosx'..."
local smacosx="$macosx"
! macosx="$(fofpath $macosx)"
if [ $? != 0 ] ; then
echo 1>&2 "$PRG: Unable to determine OpenFirmware path for
macosx=$smacosx"
echo 1>&2 "$PRG: Try specifying the real OpenFirmware path
for macosx=$smacosx in $CONF"
***************
*** 683,689 ****
/dev/*)
[ "$VERBOSE" = 1 ] && echo "$PRG: Finding OpenFirmware device
path to \`$darwin'..."
local sdarwin="$darwin"
! darwin="$($OFPATH $darwin)"
if [ $? != 0 ] ; then
echo 1>&2 "$PRG: Unable to determine OpenFirmware path for
darwin=$sdarwin"
echo 1>&2 "$PRG: Try specifying the real OpenFirmware path
for darwin=$sdarwin in $CONF"
--- 701,707 ----
/dev/*)
[ "$VERBOSE" = 1 ] && echo "$PRG: Finding OpenFirmware device
path to \`$darwin'..."
local sdarwin="$darwin"
! darwin="$(fofpath $darwin)"
if [ $? != 0 ] ; then
echo 1>&2 "$PRG: Unable to determine OpenFirmware path for
darwin=$sdarwin"
echo 1>&2 "$PRG: Try specifying the real OpenFirmware path
for darwin=$sdarwin in $CONF"