summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Jezak <josejx@gentoo.org>2010-05-31 23:53:37 +0000
committerJoseph Jezak <josejx@gentoo.org>2010-05-31 23:53:37 +0000
commit0641f255bb3c15e96a4c36d2cb143788fdc491f0 (patch)
tree6fded97e95ae9463be58d247eeb7ff210d5ab6c9 /sys-boot/yaboot-static
parentAdd patch for sysfs paths in ofpath from bug #253614. (diff)
downloadgentoo-2-0641f255bb3c15e96a4c36d2cb143788fdc491f0.tar.gz
gentoo-2-0641f255bb3c15e96a4c36d2cb143788fdc491f0.tar.bz2
gentoo-2-0641f255bb3c15e96a4c36d2cb143788fdc491f0.zip
Add patch for sysfs paths in ofpath from bug #253614.
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'sys-boot/yaboot-static')
-rw-r--r--sys-boot/yaboot-static/ChangeLog10
-rw-r--r--sys-boot/yaboot-static/files/sysfs-ofpath.patch105
-rw-r--r--sys-boot/yaboot-static/yaboot-static-1.3.14-r1.ebuild33
3 files changed, 146 insertions, 2 deletions
diff --git a/sys-boot/yaboot-static/ChangeLog b/sys-boot/yaboot-static/ChangeLog
index 6ad85ec0e30e..1381dd2131f9 100644
--- a/sys-boot/yaboot-static/ChangeLog
+++ b/sys-boot/yaboot-static/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-boot/yaboot-static
-# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot-static/ChangeLog,v 1.20 2008/05/23 07:07:04 corsair Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot-static/ChangeLog,v 1.21 2010/05/31 23:53:36 josejx Exp $
+
+*yaboot-static-1.3.14-r1 (31 May 2010)
+
+ 31 May 2010; Joseph Jezak <josejx@gentoo.org>
+ +yaboot-static-1.3.14-r1.ebuild, +files/sysfs-ofpath.patch:
+ Add patch for sysfs paths in ofpath from bug #253614.
23 May 2008; Markus Rothe <corsair@gentoo.org>
yaboot-static-1.3.14.ebuild:
diff --git a/sys-boot/yaboot-static/files/sysfs-ofpath.patch b/sys-boot/yaboot-static/files/sysfs-ofpath.patch
new file mode 100644
index 000000000000..7a3659100495
--- /dev/null
+++ b/sys-boot/yaboot-static/files/sysfs-ofpath.patch
@@ -0,0 +1,105 @@
+--- usr/sbin/ofpath 2008-08-03 04:00:35.000000000 -0400
++++ usr/sbin/ofpath 2009-01-09 13:46:12.000000000 -0500
+@@ -337,15 +337,18 @@
+
+ ide_ofpath()
+ {
+- if [ ! -L "/proc/ide/$DEVNODE" ] ; then
++ if [ ! -L "/proc/ide/$DEVNODE" ] && [ ! -e "/sys/block/$DEVNODE" ] ; then
+ echo 1>&2 "$PRG: /dev/$DEVNODE: Device not configured"
+ return 1
+ fi
+
+- local IDEBUS="$(v=`readlink /proc/ide/$DEVNODE` ; echo ${v%%/*} )"
+- if [ -z "$IDEBUS" ] ; then
+- echo 1>&2 "$PRG: BUG: IDEBUS == NULL"
+- return 1
++ if [ -L "/proc/ide/$DEVNODE" ] ; then
++ local USE_OLD_PROC=1
++ local IDEBUS="$(v=`readlink /proc/ide/$DEVNODE` ; echo ${v%%/*} )"
++ if [ -z "$IDEBUS" ] ; then
++ echo 1>&2 "$PRG: BUG: IDEBUS == NULL"
++ return 1
++ fi
+ fi
+
+ case "$(uname -r)" in
+@@ -363,7 +366,8 @@
+ echo 1>&2 "$PRG: Unable to determine sysfs mountpoint"
+ return 1
+ fi
+- local OF1275IDE="${SYS}/block/${DEVNODE}/device/../../devspec"
++ local OF1275IDE=$(cd -P "${SYS}/block/${DEVNODE}/device" && pwd)
++ OF1275IDE="${OF1275IDE}/../../devspec"
+ ;;
+ *)
+ local OF1275IDE="/proc/ide/$IDEBUS/devspec"
+@@ -402,34 +406,41 @@
+ return 1
+ fi
+
+- if [ ! -f "/proc/ide/${IDEBUS}/channel" ] ; then
+- echo 1>&2 "$PRG: KERNEL BUG: /proc/ide/${IDEBUS}/channel does not exist"
+- return 1
+- fi
+-
+- case "$(cat /proc/device-tree${DEVSPEC}/device_type 2> /dev/null)" in
+- ide|ata)
+- local MASTER="/disk@0"
+- local SLAVE="/disk@1"
+- ;;
+- pci-ide|pci-ata)
+- local MASTER="/@$(cat /proc/ide/${IDEBUS}/channel)/disk@0"
+- local SLAVE="/@$(cat /proc/ide/${IDEBUS}/channel)/disk@1"
+- ;;
+- scsi) ## some lame controllers pretend they are scsi, hopefully all kludges are created equal.
+- local MASTER="/@$(($(cat /proc/ide/${IDEBUS}/channel) * 2 + 0))"
+- local SLAVE="/@$(($(cat /proc/ide/${IDEBUS}/channel) * 2 + 1))"
+- ;;
+- spi)
+- local MASTER="/disk@$(cat /proc/ide/${IDEBUS}/channel),0"
+- local SLAVE="/disk@$(cat /proc/ide/${IDEBUS}/channel),1"
+- ;;
+- *)
+- echo 1>&2 "$PRG: Unsupported IDE device type: \"$(cat /proc/device-tree${DEVSPEC}/device_type 2> /dev/null)\""
+- return 1
+- ;;
+- esac
++
++ if [ "${USE_OLD_PROC}" = "1" ] ; then
++ if [ ! -f "/proc/ide/${IDEBUS}/channel" ] ; then
++ echo 1>&2 "$PRG: KERNEL BUG: /proc/ide/${IDEBUS}/channel does not exist"
++ return 1
++ fi
+
++ case "$(cat /proc/device-tree${DEVSPEC}/device_type 2> /dev/null)" in
++ ide|ata)
++ local MASTER="/disk@0"
++ local SLAVE="/disk@1"
++ ;;
++ pci-ide|pci-ata)
++ local MASTER="/@$(cat /proc/ide/${IDEBUS}/channel)/disk@0"
++ local SLAVE="/@$(cat /proc/ide/${IDEBUS}/channel)/disk@1"
++ ;;
++ scsi) ## some lame controllers pretend they are scsi, hopefully all kludges are created equal.
++ local MASTER="/@$(($(cat /proc/ide/${IDEBUS}/channel) * 2 + 0))"
++ local SLAVE="/@$(($(cat /proc/ide/${IDEBUS}/channel) * 2 + 1))"
++ ;;
++ spi)
++ local MASTER="/disk@$(cat /proc/ide/${IDEBUS}/channel),0"
++ local SLAVE="/disk@$(cat /proc/ide/${IDEBUS}/channel),1"
++ ;;
++ *)
++ echo 1>&2 "$PRG: Unsupported IDE device type: \"$(cat /proc/device-tree${DEVSPEC}/device_type 2> /dev/null)\""
++ return 1
++ ;;
++ esac
++ else
++ ### I don't know what other disks would look like... FIXME
++ local MASTER="/disk@0"
++ local SLAVE="/disk@1"
++ fi
++
+ case "$DEVNODE" in
+ hda|hdc|hde|hdg|hdi|hdk|hdm|hdo)
+ echo "${DEVSPEC}${MASTER}:$PARTITION"
diff --git a/sys-boot/yaboot-static/yaboot-static-1.3.14-r1.ebuild b/sys-boot/yaboot-static/yaboot-static-1.3.14-r1.ebuild
new file mode 100644
index 000000000000..c473244335be
--- /dev/null
+++ b/sys-boot/yaboot-static/yaboot-static-1.3.14-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot-static/yaboot-static-1.3.14-r1.ebuild,v 1.1 2010/05/31 23:53:36 josejx Exp $
+
+inherit eutils
+
+DESCRIPTION="Static yaboot ppc boot loader for machines with open firmware"
+
+HOMEPAGE="http://penguinppc.org/projects/yaboot/"
+SRC_URI="mirror://gentoo/yaboot-static-${PV}.tbz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~ppc64"
+IUSE="ibm"
+DEPEND="!sys-boot/yaboot
+ sys-apps/powerpc-utils"
+RDEPEND="!ibm? ( sys-fs/hfsutils
+ sys-fs/hfsplusutils
+ sys-fs/mac-fdisk )"
+PROVIDE="virtual/bootloader"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch "${FILESDIR}"/sysfs-ofpath.patch
+}
+
+src_install() {
+ # don't blow away the user's old conf file
+ mv "${WORKDIR}/etc/yaboot.conf" "${WORKDIR}/etc/yaboot.conf.unconfigured" \
+ || die "mv failed"
+ cp -pPR "${WORKDIR}"/* "${D}" || die "cp failed"
+}