diff options
author | Michael Januszewski <spock@gentoo.org> | 2007-02-10 13:42:59 +0000 |
---|---|---|
committer | Michael Januszewski <spock@gentoo.org> | 2007-02-10 13:42:59 +0000 |
commit | edf642f698da8fa140ce71042a4b864185e8a8f7 (patch) | |
tree | 72108b55237dfce514aea5ff471319a52e1fcd93 /app-admin | |
parent | Stable on ppc wrt bug 165717 (diff) | |
download | gentoo-2-edf642f698da8fa140ce71042a4b864185e8a8f7.tar.gz gentoo-2-edf642f698da8fa140ce71042a4b864185e8a8f7.tar.bz2 gentoo-2-edf642f698da8fa140ce71042a4b864185e8a8f7.zip |
Remove SATA sense checks so that hddtemp works with 2.6.20+ kernels (bug #165453).
(Portage version: 2.1.2-r9)
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/hddtemp/ChangeLog | 9 | ||||
-rw-r--r-- | app-admin/hddtemp/files/digest-hddtemp-0.3_beta15-r1 | 3 | ||||
-rw-r--r-- | app-admin/hddtemp/files/hddtemp-0.3_beta15-satacmds.patch | 26 | ||||
-rw-r--r-- | app-admin/hddtemp/hddtemp-0.3_beta15-r1.ebuild | 59 |
4 files changed, 96 insertions, 1 deletions
diff --git a/app-admin/hddtemp/ChangeLog b/app-admin/hddtemp/ChangeLog index d1bbfc91825b..66c3f6444b79 100644 --- a/app-admin/hddtemp/ChangeLog +++ b/app-admin/hddtemp/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-admin/hddtemp # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/ChangeLog,v 1.49 2007/02/10 13:33:33 spock Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/ChangeLog,v 1.50 2007/02/10 13:42:59 spock Exp $ + +*hddtemp-0.3_beta15-r1 (10 Feb 2007) + + 10 Feb 2007; Michał Januszewski <spock@gentoo.org> + +files/hddtemp-0.3_beta15-satacmds.patch, +hddtemp-0.3_beta15-r1.ebuild: + Remove SATA sense checks so that hddtemp works with 2.6.20+ kernels (bug + #165453). 10 Feb 2007; Michał Januszewski <spock@gentoo.org> -files/hddtemp-0.3_beta14-sizeofdsk.patch, -hddtemp-0.3_beta14.ebuild, diff --git a/app-admin/hddtemp/files/digest-hddtemp-0.3_beta15-r1 b/app-admin/hddtemp/files/digest-hddtemp-0.3_beta15-r1 new file mode 100644 index 000000000000..e041ddf87393 --- /dev/null +++ b/app-admin/hddtemp/files/digest-hddtemp-0.3_beta15-r1 @@ -0,0 +1,3 @@ +MD5 8b829339e1ae9df701684ec239021bb8 hddtemp-0.3-beta15.tar.bz2 256372 +RMD160 82b6affbbb14d23b5a8f3fecf3fff7acc0bd9def hddtemp-0.3-beta15.tar.bz2 256372 +SHA256 618541584054093d53be8a2d9e81c97174f30f00af91cb8700a97e442d79ef5b hddtemp-0.3-beta15.tar.bz2 256372 diff --git a/app-admin/hddtemp/files/hddtemp-0.3_beta15-satacmds.patch b/app-admin/hddtemp/files/hddtemp-0.3_beta15-satacmds.patch new file mode 100644 index 000000000000..d67e0681f33f --- /dev/null +++ b/app-admin/hddtemp/files/hddtemp-0.3_beta15-satacmds.patch @@ -0,0 +1,26 @@ +diff -Naurp hddtemp-0.3-beta15-orig/src/satacmds.c hddtemp-0.3-beta15/src/satacmds.c +--- hddtemp-0.3-beta15-orig/src/satacmds.c 2007-02-10 14:25:15.000000000 +0100 ++++ hddtemp-0.3-beta15/src/satacmds.c 2007-02-10 14:26:53.000000000 +0100 +@@ -54,7 +54,6 @@ int sata_pass_thru(int device, unsigned + unsigned char cdb[16]; + unsigned char sense[32]; + int dxfer_direction; +- int ret; + + memset(cdb, 0, sizeof(cdb)); + cdb[0] = ATA_16; +@@ -78,13 +77,7 @@ int sata_pass_thru(int device, unsigned + cdb[6] = cmd[1]; + cdb[14] = cmd[0]; + +- ret = scsi_SG_IO(device, cdb, sizeof(cdb), buffer, cmd[3] * 512, sense, sizeof(sense), dxfer_direction); +- +- /* Verify SATA magics */ +- if (sense[0] != 0x72 || sense[7] != 0x0e || sense[9] != 0x0e || sense[10] != 0x00) +- return 1; +- else +- return ret; ++ return scsi_SG_IO(device, cdb, sizeof(cdb), buffer, cmd[3] * 512, sense, sizeof(sense), dxfer_direction); + } + + void sata_fixstring(unsigned char *s, int bytecount) diff --git a/app-admin/hddtemp/hddtemp-0.3_beta15-r1.ebuild b/app-admin/hddtemp/hddtemp-0.3_beta15-r1.ebuild new file mode 100644 index 000000000000..8af3f52c6493 --- /dev/null +++ b/app-admin/hddtemp/hddtemp-0.3_beta15-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r1.ebuild,v 1.1 2007/02/10 13:42:59 spock Exp $ + +inherit eutils + +MY_P=${P/_beta/-beta} + +DESCRIPTION="A simple utility to read the temperature of SMART capable hard drives" +HOMEPAGE="http://www.guzu.net/linux/hddtemp.php" +SRC_URI="http://www.guzu.net/files/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86" +IUSE="nls" + +DEPEND="" + +S="${WORKDIR}/${MY_P}" + +src_unpack() { + unpack ${A} + epatch ${FILESDIR}/${P}-satacmds.patch + epatch ${FILESDIR}/${P}-byteswap.patch +} + +src_compile() { + local myconf + + myconf="--with-db-path=/usr/share/hddtemp/hddtemp.db" + # disabling nls breaks compiling + use nls || myconf="--disable-nls ${myconf}" + econf ${myconf} || die + emake || die +} + +src_install() { + make DESTDIR=${D} install || die + dodoc README TODO ChangeLog + + insinto /usr/share/hddtemp + doins ${FILESDIR}/hddtemp.db + + newconfd ${FILESDIR}/hddtemp-conf.d hddtemp + newinitd ${FILESDIR}/hddtemp-init hddtemp +} + +pkg_postinst() { + einfo "In order to update your hddtemp database, run:" + einfo " emerge --config =${CATEGORY}/${PF}" +} + +pkg_config() { + cd ${ROOT}/usr/share/hddtemp + + einfo "Trying to download the latest hddtemp.db file" + wget http://www.guzu.net/linux/hddtemp.db -O hddtemp.db +} |