Blob Blame History Raw
%define githead 04387139e3b
Name:           bochs
Version:        2.3.8
Release:        0.9.git%{githead}%{?dist}
Summary:        Portable x86 PC emulator
Group:          Applications/Emulators
License:        LGPLv2+
URL:            http://bochs.sourceforge.net/
#Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
# git clone git://git.kernel.org/pub/scm/virt/bochs/bochs.git
# cd bochs
# git archive --format=tar --prefix=%{name}-%{version}/ %{githead} | gzip > ../%{name}-%{version}.tar.gz
Source0:        %{name}-%{version}.tar.gz

# This should not live here, but letting it in the kvm package would produce another noarch package we would
# then have to get rid of in the future. So let it be.
# git clone git://git.kernel.org/pub/scm/linux/kernel/git/avi/qemu-kvm.git
# cd kvm
# git archive --format=tar --prefix=kvm-bios/ HEAD bios | gzip > ../../kvm-bios.tar.gz
Source1:	kvm-bios.tar.gz

Patch0:	%{name}-0001_bx-qemu.patch
Patch1:	%{name}-0002_kvm-bios-update-smbios-table-to-report-memory-above-4g.patch
Patch2:	%{name}-0003_kvm-bios-generate-mptable-unconditionally.patch
Patch3:	%{name}-0004_kvm-bios-resolve-memory-device-roll-over-reporting--issues-with-32g-guests.patch
Patch4:	%{name}-0005_kvm-bios-fix-smbios-memory-device-length-boundary--condition.patch
Patch5:	%{name}-0006_qemu-bios-use-preprocessor-for-pci-link-routing.patch
Patch6:	%{name}-0007_bios-add-26-pci-slots,-bringing-the-total-to-32.patch
Patch7:	%{name}-0008_qemu-bios-provide-gpe-_l0x-methods.patch
Patch8:	%{name}-0009_qemu-bios-pci-hotplug-support.patch
Patch9:	%{name}-0010_bios-mark-the-acpi-sci-interrupt-as-connected-to-irq-9.patch
Patch10:	%{name}-0011_read-additional-acpi-tables-from-a-vm.patch
Patch11:	%{name}-nonet-build.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  libXt-devel libXpm-devel SDL-devel readline-devel byacc
BuildRequires:  docbook-utils
BuildRequires:  gtk2-devel
#BuildRequires:  wxGTK-devel
%ifarch %{ix86} x86_64
BuildRequires:  svgalib-devel
BuildRequires:	dev86 iasl
%endif
Requires:	%{name}-bios = %{version}-%{release}
Requires:	vgabios

%description
Bochs is a portable x86 PC emulation software package that emulates
enough of the x86 CPU, related AT hardware, and BIOS to run DOS,
Windows '95, Minix 2.0, and other OS's, all on your workstation.


%package        debugger
Summary:        Bochs with builtin debugger
Group:          Applications/Emulators
Requires:       %{name} = %{version}-%{release}

%description    debugger
Special version of bochs compiled with the builtin debugger.


%package        gdb
Summary:        Bochs with support for debugging with gdb
Group:          Applications/Emulators
Requires:       %{name} = %{version}-%{release}

%description    gdb
Special version of bochs compiled with a gdb stub so that the software running
inside the emulator can be debugged with gdb.

%ifarch %{ix86} x86_64
# building firmwares are quite tricky, because they often has to be built on
# their native architecture (or in a cross-capable compiler, that we lack in
# koji), and deployed everywhere. Recent koji builders support a feature
# that allow us to build packages in a single architecture, and create noarch
# subpackages that will be deployed everywhere. Because the package can only
# be built in certain architectures, the main package has to use
# BuildArch: <nativearch>, or something like that.
# Note that using ExclusiveArch is _wrong_, because it will prevent the noarch
# packages from getting into the excluded repositories.
%package	bios
Summary:	Bochs bios
Group:		Applications/Emulators
BuildArch:	noarch
Provides:	bochs-bios-data = 2.3.8.1
Obsoletes:	bochs-bios-data < 2.3.8.1


%description bios
Bochs BIOS is a free implementation of a x86 BIOS provided by the Bochs projects.
It can also be used in other emulators, such as QEMU
%endif

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p0 -z .nonet

%setup -b 1
mv ../kvm-bios ./

# Fix up some man page paths.
sed -i \
  -e 's|/usr/local/share/doc/bochs/|%{_docdir}/%{name}-%{version}/|' \
  -e 's|/usr/local/share/|%{_datadir}/|' \
  doc/man/*.*
# remove executable bits from sources to make rpmlint happy with the debuginfo
chmod -x `find -name '*.cc' -o -name '*.h' -o -name '*.inc'`
# Fix CHANGES encoding
iconv -f ISO_8859-2 -t UTF8 CHANGES > CHANGES.tmp
mv CHANGES.tmp CHANGES


%build
%ifarch %{ix86} x86_64
ARCH_CONFIGURE_FLAGS=--with-svga
%endif
# Note: the CPU level, MMX et al affect what the emulator will emulate, they
# are not properties of the build target architecture.
# Note2: passing --enable-pcidev will change bochs license from LGPLv2+ to
# LGPLv2 (and requires a kernel driver to be usefull)
CONFIGURE_FLAGS=" \
  --enable-plugins \
  --enable-ne2000 \
  --enable-pci \
  --enable-all-optimizations \
  --enable-vbe \
  --enable-clgd54xx \
  --enable-3dnow \
  --enable-sb16=linux \
  --with-x11 \
  --with-nogui \
  --with-term \
  --with-rfb \
  --with-sdl \
  --without-wx \
  --enable-cpu-level=6 \
  $ARCH_CONFIGURE_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS -DPARANOID"

%configure $CONFIGURE_FLAGS --enable-x86-debugger --enable-debugger
make %{?_smp_mflags}
mv bochs bochs-debugger
make dist-clean

%configure $CONFIGURE_FLAGS --enable-x86-debugger --enable-gdb-stub
make %{?_smp_mflags}
mv bochs bochs-gdb
make dist-clean

%configure $CONFIGURE_FLAGS
make %{?_smp_mflags}

%ifarch %{ix86} x86_64
cd bios
make bios
cd ../kvm-bios/bios
make bios
cp BIOS-bochs-latest ../../bios/BIOS-bochs-kvm
%endif

%install
rm -rf $RPM_BUILD_ROOT _installed-docs
make install DESTDIR=$RPM_BUILD_ROOT
rm -rf $RPM_BUILD_ROOT%{_prefix}/share/bochs/VGABIOS*
ln -s %{_prefix}/share/vgabios/VGABIOS-lgpl-latest.bin $RPM_BUILD_ROOT%{_prefix}/share/bochs/VGABIOS-lgpl-latest
ln -s %{_prefix}/share/vgabios/VGABIOS-lgpl-latest.cirrus.bin $RPM_BUILD_ROOT%{_prefix}/share/bochs/VGABIOS-lgpl-latest.cirrus
ln -s %{_prefix}/share/vgabios/VGABIOS-lgpl-latest.cirrus.debug.bin $RPM_BUILD_ROOT%{_prefix}/share/bochs/VGABIOS-lgpl-latest.cirrus.debug
ln -s %{_prefix}/share/vgabios/VGABIOS-lgpl-latest.debug.bin $RPM_BUILD_ROOT%{_prefix}/share/bochs/VGABIOS-lgpl-latest.debug
%ifnarch %{ix86} x86_64
rm -rf $RPM_BUILD_ROOT%{_prefix}/share/bochs/*BIOS*
%endif
install -m 755 bochs-debugger bochs-gdb $RPM_BUILD_ROOT%{_bindir}
mv $RPM_BUILD_ROOT%{_docdir}/bochs _installed-docs
rm $RPM_BUILD_ROOT%{_mandir}/man1/bochs-dlx.1*


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc _installed-docs/* README-*
%{_bindir}/bochs
%{_bindir}/bxcommit
%{_bindir}/bximage
# Note: must include *.la in %{_libdir}/bochs/plugins/
%{_libdir}/bochs/
%{_mandir}/man1/bochs.1*
%{_mandir}/man1/bxcommit.1*
%{_mandir}/man1/bximage.1*
%{_mandir}/man5/bochsrc.5*
%dir %{_datadir}/bochs/
%{_datadir}/bochs/keymaps/

%ifarch %{ix86} x86_64
%files bios
%defattr(-,root,root,-)
%{_datadir}/bochs/BIOS*
%{_datadir}/bochs/VGABIOS*
%endif


%files debugger
%defattr(-,root,root,-)
%{_bindir}/bochs-debugger

%files gdb
%defattr(-,root,root,-)
%{_bindir}/bochs-gdb


%changelog
* Fri Dec 04 2009 Jon Ciesla <limb@jcomserv.net> 2.3.8-0.9.git04387139e3b
- Include symlinks to VGABIOS in vgabios rpm, BZ 544310.
- Enable cpu level 6.

* Fri Jul 31 2009 Glauber Costa <glommer@redhat.com> - 2:0.10.50-14.kvm88
- replace kvm-bios with a more modern version, and refresh instructions on how to get it.

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.8-0.7.git04387139e3b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Mar 11 2009 Glauber Costa <glommer@redhat.com> 2.3.8-0.6.git04387139e3b
- Fix Obsoletes/Provides pair.

* Wed Mar 11 2009 Glauber Costa <glommer@redhat.com> 2.3.8-0.5.git04387139e3b
- kvm needs a slightly different bios due to irq routing, so build it too.
  from kvm source. This is not ideal, but avoids the creation of yet another
  noarch subpackage.

* Fri Mar 06 2009 Glauber Costa <glommer@redhat.com> 2.3.8-0.4.git04387139e3b
- Provide and Obsolete bochs-bios-data to make sure no one is harmed during
  updates.

* Thu Mar 05 2009 Glauber Costa <glommer@redhat.com> 2.3.8-0.3.git04387139e3b
- added patches ;-)

* Thu Mar 05 2009 Glauber Costa <glommer@redhat.com> 2.3.8-0.2.git04387139e3b
- this time with sources added.

* Thu Mar 05 2009 Glauber Costa <glommer@redhat.com> 2.3.8-0.1.git04387139e3b
- updated to git 04387139e3b, and applied qemu's patch ontop.

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Dec 18 2008 Hans de Goede <hdegoede@redhat.com> 2.3.7-2
- Remove dlxlinux sub package, we cannot build this from source (rh 476878)

* Mon Jun  9 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3.7-1
- New upstream release 2.3.7

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.3.6-3
- Autorebuild for GCC 4.3

* Fri Jan 11 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3.6-2
- Fix compilation with gcc 4.3

* Mon Dec 24 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3.6-1
- New upstream release 2.3.6

* Sun Sep 16 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3.5-1
- New upstream release 2.3.5

* Wed Aug 22 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-7
- Fix CVE-2007-2894 (really fix bz 241799)

* Sun Aug  5 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-6
- Update License tag for new Licensing Guidelines compliance

* Wed Jul 18 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-5
- Fix CVE-2007-2893 (bz 241799)

* Mon Dec 18 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-4
- rebuilt without wxGTK as wxGTK is even more broken with wxGTK 2.8 then it
  was with 2.6

* Thu Oct 05 2006 Christian Iseli <Christian.Iseli@licr.org> 2.3-3
 - rebuilt for unwind info generation, broken in gcc-4.1.1-21

* Fri Sep 22 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-2
- Add -debugger and -gdb sub packages which contain special versions of
  bochs compiled with the buildin debugger resp. the gdb-stub (bz 206508)

* Sun Aug 27 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-1
- New upstream version 2.3 (final)

* Thu Aug 10 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-0.1.pre3
- New upstream version 2.3.pre3

* Mon Jul 17 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3-0.1.pre2
- New upstream version 2.3.pre2
- Drop upstreamed wx26 patch

* Wed Feb 15 2006 Hans de Goede <j.w.r.degoede@hhs.nl> - 2.2.6-1
- New upstream version 2.2.6
- Rebuild for new gcc4.1 and glibc
- Remove --enable-pae as that requires a CPU level of 6 with the new version
- Remove a few configure switches which are identical to the
  upstream defaults and thus don't do anything
- Add --enable-clgd54xx
- Add --with-svga which adds support for svgalib as display (x86(_64) only)
- Fix compile with wxGTK-2.6 and unconditionalize wxGTK build

* Fri Dec 16 2005 Ville Skyttä <ville.skytta at iki.fi> - 2.2.1-2
- Adapt to modular X.
- Fix build with g++ 4.1.0.
- Conditionalize wxGTK build and default it to off (build failures w/2.6.x).
- Use sed instead of dos2unix and perl during build.

* Sat Jul  9 2005 Ville Skyttä <ville.skytta at iki.fi> - 2.2.1-1
- 2.2.1, precision patch applied upstream.

* Sun May 29 2005 Ville Skyttä <ville.skytta at iki.fi> - 2.2-2
- Try to fix x86_64 build.

* Sat May 28 2005 Ville Skyttä <ville.skytta at iki.fi> - 2.2-1
- 2.2, buildpaths and fpu-regparms patches applied upstream, pthread and
  ncurses linking hacks no longer needed.
- Use upstream default display library, wx is clunky with wxGTK2 2.4.x.
- Enable 3DNow! emulation and the SDL display library.

* Sun May 22 2005 Jeremy Katz <katzj@redhat.com> - 2.1.1-3
- rebuild on all arches

* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.1.1-2
- rebuilt

* Sun Dec  5 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.1.1-1
- Update to 2.1.1.
- Enable PAE and 4M pages support.
- Loosen version in dlxlinux to main dependency.
- BuildRequire ncurses-devel instead of ncurses-c++-devel for FC3.
- Apply upstream fpu-regparm patch to fix the build on FC3.

* Fri Jan 16 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.1-0.fdr.2
- Fix RFB linking, force pthreads.
- dos2unix some -dlxlinux files.

* Mon Jan 12 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.1-0.fdr.1
- Update to 2.1.
- Make sure everything is built with GTK2.
- Add "--with debugger" rpmbuild option.
- Put SDL build behind the "--with sdl" rpmbuild option due to startup crashes.

* Sun Nov 30 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.1-0.fdr.0.3.pre2
- Update to 2.1pre2.

* Tue Oct 21 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.1-0.fdr.0.2.pre1
- Remove .cvsignore from docs.

* Sat Oct 11 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.1-0.fdr.0.1.pre1
- Update to 2.1pre1.
- Enable 3DNow! on athlon.
- Other cosmetic tweaks.

* Sat Jul 19 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.0.2-0.fdr.3
- List wanted GUIs explicitly, exclude svgalib (bug 306).

* Wed May 21 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.0.2-0.fdr.2
- Rebuild with wxGTK2.

* Tue May 20 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.0.2-0.fdr.1
- First Fedora release, based on upstream SRPM.