summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schweizer <genstef@gentoo.org>2005-06-12 16:28:33 +0000
committerStefan Schweizer <genstef@gentoo.org>2005-06-12 16:28:33 +0000
commit38fbfcc80b7c8ae910c746643fabaf57db5b35fd (patch)
treeb11c952964b9e13e5a87f7aec0d88a145b69f6ce /app-laptop/omnibook
parentStable on ppc. (diff)
downloadhistorical-38fbfcc80b7c8ae910c746643fabaf57db5b35fd.tar.gz
historical-38fbfcc80b7c8ae910c746643fabaf57db5b35fd.tar.bz2
historical-38fbfcc80b7c8ae910c746643fabaf57db5b35fd.zip
Fix obtest segfault thanks to Andrew D. Keyser (aka Legoguy) <andrewdk@sbcglobal.net> in bug 86335
Package-Manager: portage-1.589-cvs
Diffstat (limited to 'app-laptop/omnibook')
-rw-r--r--app-laptop/omnibook/ChangeLog9
-rw-r--r--app-laptop/omnibook/Manifest5
-rw-r--r--app-laptop/omnibook/files/digest-omnibook-20050217-r11
-rw-r--r--app-laptop/omnibook/files/omnibook-fix-obtest-segfault.patch54
-rw-r--r--app-laptop/omnibook/omnibook-20050217-r1.ebuild48
5 files changed, 115 insertions, 2 deletions
diff --git a/app-laptop/omnibook/ChangeLog b/app-laptop/omnibook/ChangeLog
index 68a73f19b2dd..4be732ed4995 100644
--- a/app-laptop/omnibook/ChangeLog
+++ b/app-laptop/omnibook/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-laptop/omnibook
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-laptop/omnibook/ChangeLog,v 1.7 2005/05/10 17:21:27 genstef Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/omnibook/ChangeLog,v 1.8 2005/06/12 16:28:33 genstef Exp $
+
+*omnibook-20050217-r1 (12 Jun 2005)
+
+ 12 Jun 2005; Stefan Schweizer <genstef@gentoo.org>
+ +files/omnibook-fix-obtest-segfault.patch, +omnibook-20050217-r1.ebuild:
+ Fix obtest segfault thanks to Andrew D. Keyser (aka Legoguy)
+ <andrewdk@sbcglobal.net> in bug 86335
10 May 2005; Stefan Schweizer <genstef@gentoo.org>
-omnibook-20040916.ebuild, omnibook-20050217.ebuild:
diff --git a/app-laptop/omnibook/Manifest b/app-laptop/omnibook/Manifest
index b1ec21dacd5e..742401421f38 100644
--- a/app-laptop/omnibook/Manifest
+++ b/app-laptop/omnibook/Manifest
@@ -1,4 +1,7 @@
+MD5 30cb2293af222fa772eeba6a183b0631 omnibook-20050217-r1.ebuild 1058
MD5 f58dd95b2c1af2f9e9a8861abb497153 omnibook-20050217.ebuild 993
-MD5 19463bf193d9563a9cd4ec780c56b94b ChangeLog 2089
+MD5 0054e8971a46e804b1519ff2c9c316f2 ChangeLog 2358
MD5 f17c483cfcc1efe580afd0b737d3f2c3 metadata.xml 264
+MD5 2d8576708b1ba220c34b3844d5a9e7ec files/digest-omnibook-20050217-r1 70
MD5 2d8576708b1ba220c34b3844d5a9e7ec files/digest-omnibook-20050217 70
+MD5 5f8b7eeae3ca3cc3a29c274546cba038 files/omnibook-fix-obtest-segfault.patch 1426
diff --git a/app-laptop/omnibook/files/digest-omnibook-20050217-r1 b/app-laptop/omnibook/files/digest-omnibook-20050217-r1
new file mode 100644
index 000000000000..9139f57a657a
--- /dev/null
+++ b/app-laptop/omnibook/files/digest-omnibook-20050217-r1
@@ -0,0 +1 @@
+MD5 4bc497f9fca691f4ff5dc3d7eae7da83 omnibook-2005-02-17.tar.gz 53017
diff --git a/app-laptop/omnibook/files/omnibook-fix-obtest-segfault.patch b/app-laptop/omnibook/files/omnibook-fix-obtest-segfault.patch
new file mode 100644
index 000000000000..ba8a2b190d2f
--- /dev/null
+++ b/app-laptop/omnibook/files/omnibook-fix-obtest-segfault.patch
@@ -0,0 +1,54 @@
+This patch was written by Andrew D. Keyser (aka Legoguy) <andrewdk@sbcglobal.net>
+to fix the segfaulting problem described in http://bugs.gentoo.org/86335
+Description:
+Don't know why this even worked before, but the 'q' variable was never set in
+the case of -r, -c, -k, -i, or -s flags - but it was still operated on after
+the switch, so that caused a segfault. Moved the iopl check above the switch
+and moved the operations on q into the switch.
+Fixes problem.
+
+diff -urp omnibook-2005-02-17.orig/misc/obtest/obtest.c omnibook-2005-02-17/misc/obtest/obtest.c
+--- omnibook-2005-02-17.orig/misc/obtest/obtest.c 2005-06-12 18:09:07.000000000 +0200
++++ omnibook-2005-02-17/misc/obtest/obtest.c 2005-06-12 18:09:35.000000000 +0200
+@@ -297,13 +297,18 @@ int main(int argc, char *argv[])
+ if (sw[0] != '-')
+ usage(argv[0]);
+
++ if (iopl(3)) {
++ perror("iopl");
++ exit (1);
++ }
++
+ switch (sw[1]) {
+ case 'r':
+ case 'c':
+ case 'k':
+ case 'i':
+ case 's':
+- if (argc == 3)
++ if (argc == 3)
+ p = argv[2];
+ else
+ usage(argv[0]);
+@@ -313,6 +318,7 @@ int main(int argc, char *argv[])
+ if (argc == 4) {
+ p = argv[2];
+ q = argv[3];
++ data = ntoi(q);
+ } else
+ usage(argv[0]);
+ break;
+@@ -320,13 +326,7 @@ int main(int argc, char *argv[])
+ usage(argv[0]);
+ }
+
+- if (iopl(3)) {
+- perror("iopl");
+- exit (1);
+- }
+-
+ a = ntoi(p);
+- data = ntoi(q);
+
+ switch (sw[1]) {
+ case 'w':
diff --git a/app-laptop/omnibook/omnibook-20050217-r1.ebuild b/app-laptop/omnibook/omnibook-20050217-r1.ebuild
new file mode 100644
index 000000000000..34ba0e7548d8
--- /dev/null
+++ b/app-laptop/omnibook/omnibook-20050217-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/omnibook/omnibook-20050217-r1.ebuild,v 1.1 2005/06/12 16:28:33 genstef Exp $
+
+inherit linux-mod eutils
+
+MY_P="${PN}-${PV:0:4}-${PV:4:2}-${PV:6:2}"
+
+DESCRIPTION="Linux kernel module for HP Omnibook support"
+HOMEPAGE="http://www.sourceforge.net/projects/omke"
+SRC_URI="mirror://sourceforge/omke/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+KEYWORDS="x86 -ppc"
+IUSE=""
+S="${WORKDIR}/${MY_P}"
+
+MODULE_NAMES="omnibook(char:)"
+BUILD_TARGETS=" "
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KERNEL=${KV_MAJOR}.${KV_MINOR} KSRC=${KV_DIR}"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/omnibook-fix-obtest-segfault.patch
+ convert_to_m Makefile
+}
+
+src_compile() {
+ cd misc/obtest
+ emake || die "make obtest failed"
+
+ linux-mod_src_compile
+}
+
+src_install() {
+ dosbin misc/obtest/obtest
+ dodoc doc/*
+ docinto misc
+ dodoc misc/*.patch misc/*.txt
+ docinto hotkeys
+ dodoc misc/hotkeys/*
+
+ linux-mod_src_install
+}