diff options
author | 2007-09-09 11:46:41 +0000 | |
---|---|---|
committer | 2007-09-09 11:46:41 +0000 | |
commit | 7d78cad6c238246e8037f1f61918c3371d145a85 (patch) | |
tree | 880f9dc3c583caeeab9533bfe9b6b1111408a44c /app-emulation/bochs | |
parent | fix small typo (diff) | |
download | gentoo-2-7d78cad6c238246e8037f1f61918c3371d145a85.tar.gz gentoo-2-7d78cad6c238246e8037f1f61918c3371d145a85.tar.bz2 gentoo-2-7d78cad6c238246e8037f1f61918c3371d145a85.zip |
New version + sec fixes see bug #145446 and bug #188148
(Portage version: 2.1.3.7)
Diffstat (limited to 'app-emulation/bochs')
-rw-r--r-- | app-emulation/bochs/ChangeLog | 11 | ||||
-rw-r--r-- | app-emulation/bochs/bochs-2.3.ebuild | 108 | ||||
-rw-r--r-- | app-emulation/bochs/files/bochs-2.3-floppy.patch | 35 | ||||
-rw-r--r-- | app-emulation/bochs/files/bochs-2.3-ne2k.patch | 19 | ||||
-rw-r--r-- | app-emulation/bochs/files/bochs-2.3-redog.patch | 11 | ||||
-rw-r--r-- | app-emulation/bochs/files/digest-bochs-2.3 | 6 |
6 files changed, 189 insertions, 1 deletions
diff --git a/app-emulation/bochs/ChangeLog b/app-emulation/bochs/ChangeLog index f6fbcadb0aab..6ae94dcef5bf 100644 --- a/app-emulation/bochs/ChangeLog +++ b/app-emulation/bochs/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for app-emulation/bochs # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/bochs/ChangeLog,v 1.66 2007/07/27 17:56:13 lu_zero Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/bochs/ChangeLog,v 1.67 2007/09/09 11:46:40 lu_zero Exp $ + +*bochs-2.3 (09 Sep 2007) + + 09 Sep 2007; Luca Barbato <lu_zero@gentoo.org> + +files/bochs-2.3-floppy.patch, +files/bochs-2.3-ne2k.patch, + +files/bochs-2.3-redog.patch, +bochs-2.3.ebuild: + New version, patches to make it build and avoid security issues pointed by + Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>, fixes bug #188148 and + bug #145446 27 Jul 2007; Luca Barbato <lu_zero@gentoo.org> files/digest-bochs-2.2.6, +files/digest-bochs-2.3, Manifest: diff --git a/app-emulation/bochs/bochs-2.3.ebuild b/app-emulation/bochs/bochs-2.3.ebuild new file mode 100644 index 000000000000..f51eb7496260 --- /dev/null +++ b/app-emulation/bochs/bochs-2.3.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/bochs/bochs-2.3.ebuild,v 1.1 2007/09/09 11:46:40 lu_zero Exp $ + +inherit eutils wxwidgets + +DESCRIPTION="a LGPL-ed pc emulator" +HOMEPAGE="http://bochs.sourceforge.net/" +SRC_URI="mirror://sourceforge/bochs/${P}.tar.gz + http://bochs.sourceforge.net/guestos/dlxlinux4.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" +IUSE="debugger readline sdl wxwindows X ncurses vnc" + +RDEPEND="virtual/libc + X? ( x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXpm ) + sdl? ( media-libs/libsdl ) + wxwindows? ( >=x11-libs/wxGTK-2.6 ) + readline? ( sys-libs/readline ) + ncurses? ( sys-libs/ncurses )" + +DEPEND="${RDEPEND} + X? ( x11-proto/xproto ) + >=sys-apps/sed-4 + >=app-text/opensp-1.5" + +src_unpack() { + unpack ${P}.tar.gz + cd ${S} + sed -i \ + -e "s:\$(WGET) \$(DLXLINUX_TAR_URL):cp ${DISTDIR}/dlxlinux4.tar.gz .:" \ + -e "s:BOCHSDIR=:BOCHSDIR=/usr/$(get_libdir)/bochs#:" \ + -e 's: $(BOCHSDIR): $(DESTDIR)$(BOCHSDIR):g' Makefile.in || \ + die "sed Makefile.in failed" + +# Make it use the correct path to gtk-2 + sed -i -e "s:/opt/gnome:/usr:" configure +# Fix some bad coding for gcc-4.1 compliance + sed -i -e "s:\#ifndef PARANOID:\#if 0:" iodev/hdimage.h +# Make sure wxwindows 2.6 is used in case both 2.6 and 2.4 are installed + sed -i -e "s:wx-config:wx-config-2.6:" configure +# wx unicode patches from fedora and bits the fedora missed +# epatch ${DISTDIR}/${P}-unicode.patch.gz + epatch ${FILESDIR}/${P}-redog.patch + epatch ${FILESDIR}/${P}-floppy.patch + epatch ${FILESDIR}/${P}-ne2k.patch +} + +src_compile() { + export WX_GTK_VER=2.6 + + use wxwindows && \ + need-wxwidgets gtk2 + + [[ "$ARCH" == "x86" ]] \ + && myconf="--enable-idle-hack --enable-fast-function-calls" + myconf="${myconf} `use_with sdl`" + myconf="${myconf} `use_enable readline`" + use wxwindows && \ + myconf="${myconf} --with-wx" + use wxwindows || \ + myconf="${myconf} --without-wx" + use debugger && \ + myconf="$myconf --enable-debugger --enable-disasm \ + --enable-x86-debugger --enable-iodebug" + use debugger || \ + myconf="$myconf --enable-gdb-stub" + use vnc && \ + myconf="$myconf --with-rfb" + + use X && \ + myconf="$myconf --with-x11" + + use ncurses && \ + myconf="$myconf --with-term" + + if ! use X && ! use ncurses && ! use vnc && ! use sdl + then + myconf="$myconf --with-nogui" + fi + +# needed to use gtk2 includes and libs + autoconf + ./configure \ + --enable-usb --enable-pci --enable-vbe \ + --enable-sse=2 --enable-3dnow --enable-plugins \ + --enable-cpu-level=6 --enable-all-optimizations \ + --enable-ne2000 --enable-sb16=linux --enable-clgd54xx \ + --enable-apic --enable-compressed-hd \ + --enable-pni --enable-sep --host=${CHOST} \ + --libdir=/usr/$(get_libdir) --prefix=/usr \ + ${myconf} || die "configure failed" + + emake || die "emake failed" +} + +src_install() { + make DESTDIR=${D} install unpack_dlx || die "make install failed" + #workaround + make prefix=${D}/usr install_dlx + + dodoc CHANGES README TESTFORM.txt || die "dodoc failed" +} diff --git a/app-emulation/bochs/files/bochs-2.3-floppy.patch b/app-emulation/bochs/files/bochs-2.3-floppy.patch new file mode 100644 index 000000000000..0e0ae6a9d924 --- /dev/null +++ b/app-emulation/bochs/files/bochs-2.3-floppy.patch @@ -0,0 +1,35 @@ +Index: iodev/floppy.cc +=================================================================== +RCS file: /cvsroot/bochs/bochs/iodev/floppy.cc,v +retrieving revision 1.106 +retrieving revision 1.107 +diff -u -p -r1.106 -r1.107 +--- iodev/floppy.cc 6 Apr 2007 15:22:17 -0000 1.106 ++++ iodev/floppy.cc 21 Aug 2007 14:18:16 -0000 1.107 +@@ -1785,7 +1785,7 @@ bx_bool bx_floppy_ctrl_c::evaluate_media + } + media->sectors = media->heads * media->tracks * media->sectors_per_track; + } +- return(1); // success ++ return (media->sectors > 0); // success + } + + else if ( S_ISCHR(stat_buf.st_mode) +@@ -1805,7 +1805,7 @@ bx_bool bx_floppy_ctrl_c::evaluate_media + media->heads = floppy_type[type_idx].hd; + media->sectors_per_track = floppy_type[type_idx].spt; + media->sectors = floppy_type[type_idx].sectors; +- return 1; ++ return (media->sectors > 0); + } + media->tracks = floppy_geom.track; + media->heads = floppy_geom.head; +@@ -1822,7 +1822,7 @@ bx_bool bx_floppy_ctrl_c::evaluate_media + media->sectors_per_track = floppy_type[type_idx].spt; + media->sectors = floppy_type[type_idx].sectors; + #endif +- return 1; // success ++ return (media->sectors > 0); // success + } else { + // unknown file type + BX_ERROR(("unknown mode type")); diff --git a/app-emulation/bochs/files/bochs-2.3-ne2k.patch b/app-emulation/bochs/files/bochs-2.3-ne2k.patch new file mode 100644 index 000000000000..558cf636a8f7 --- /dev/null +++ b/app-emulation/bochs/files/bochs-2.3-ne2k.patch @@ -0,0 +1,19 @@ +Index: iodev/ne2k.cc +=================================================================== +RCS file: /cvsroot/bochs/bochs/iodev/ne2k.cc,v +retrieving revision 1.91 +retrieving revision 1.92 +diff -u -p -r1.91 -r1.92 +--- iodev/ne2k.cc 3 Feb 2007 17:56:35 -0000 1.91 ++++ iodev/ne2k.cc 10 Mar 2007 15:17:31 -0000 1.92 +@@ -1278,8 +1278,8 @@ void bx_ne2k_c::rx_handler(void *arg, co + */ + void bx_ne2k_c::rx_frame(const void *buf, unsigned io_len) + { +- unsigned pages; +- unsigned avail; ++ int pages; ++ int avail; + unsigned idx; + int wrapped; + int nextpage; diff --git a/app-emulation/bochs/files/bochs-2.3-redog.patch b/app-emulation/bochs/files/bochs-2.3-redog.patch new file mode 100644 index 000000000000..e1bdb3bf4d17 --- /dev/null +++ b/app-emulation/bochs/files/bochs-2.3-redog.patch @@ -0,0 +1,11 @@ +--- bochs-2.3.orig/iodev/hdimage.cc 2006-09-17 02:28:23.000000000 +0300 ++++ bochs-2.3/iodev/hdimage.cc 2006-09-17 02:28:53.000000000 +0300 +@@ -1586,7 +1586,7 @@ + sprintf (logname, "%s%s", pathname, UNDOABLE_REDOLOG_EXTENSION); + } + +- if (redolog->open(logname,REDOLOG_SUBTYPE_UNDOABLE,size) < 0) ++ if (redolog->open(logname, REDOLOG_SUBTYPE_UNDOABLE) < 0) + { + if (redolog->create(logname, REDOLOG_SUBTYPE_UNDOABLE, size) < 0) + { diff --git a/app-emulation/bochs/files/digest-bochs-2.3 b/app-emulation/bochs/files/digest-bochs-2.3 new file mode 100644 index 000000000000..dbf8637976a1 --- /dev/null +++ b/app-emulation/bochs/files/digest-bochs-2.3 @@ -0,0 +1,6 @@ +MD5 100c02fbcd402c2b4862d0251be539fd bochs-2.3.tar.gz 3812273 +RMD160 545e0bf3edd0fdd073a107e835f90c65451c100e bochs-2.3.tar.gz 3812273 +SHA256 fd926f3915d0619ddde8dedd02dac661f3233d77f3fc2ec7f94e1e028398497a bochs-2.3.tar.gz 3812273 +MD5 21c153f5aa391395c35f0c2f660da972 dlxlinux4.tar.gz 1504868 +RMD160 29fd31dd0f77edacecabd9f053206a486635e7f1 dlxlinux4.tar.gz 1504868 +SHA256 68b35f850ce69f4050ed85064e15d756245d57e84ddc1d52678b0e2a97dbf73e dlxlinux4.tar.gz 1504868 |