source: projects/specs/trunk/k/kvm/kvm-vl.spec @ 521

Revision 521, 8.0 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

Line 
1Summary: Kernel-based Virtual Machine
2Summary(ja): カーネルベースの仮想マシン
3Name: kvm
4Version: 83
5Release: 1%{?_dist_release}
6License: GPLv2+ and LGPLv2+
7Group: Development/Tools
8URL: http://kvm.qumranet.com/kvmwiki
9Source0: %{name}-%{version}.tar.gz
10Source1: %{name}.modules
11Patch2: %{name}-62-block-rw-range-check.patch
12# patches from upstream qemu
13
14BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
15BuildRequires: SDL-devel
16# to build the bios
17BuildRequires: dev86
18BuildRequires: iasl
19BuildRequires: %{_includedir}/gnu/stubs-32.h
20BuildRequires: zlib-devel
21# TLS / x509 auth in VNC server
22BuildRequires: gnutls-devel
23# for the docs
24BuildRequires: texi2html
25BuildRequires: rsync
26# kvm kernel side is only x86/x86_64 as that's where the hardware is
27ExclusiveArch: %{ix86} x86_64
28
29%description
30KVM (for Kernel-based Virtual Machine) is a full virtualization solution
31for Linux on x86 hardware.
32
33Using KVM, one can run multiple virtual machines running unmodified Linux
34or Windows images. Each virtual machine has private virtualized hardware:
35a network card, disk, graphics adapter, etc.
36
37%prep
38%setup -q
39%patch2 -p1
40
41# "configure --kerneldir" looks for this
42# FIXME: kvm-84 or later shouldn't need this anymore, see:
43# http://git.kernel.org/?p=linux/kernel/git/marcelo/kvm-userspace.git;a=commit;h=4f45aa2db
44echo "%{name}-%{version}" > $(pwd)/kernel/.kernelrelease
45
46# we must not use any of the binaries from the qemu/pc-bios/ directory,
47# as they don't have the corresponding sources shipped with them
48rm -f qemu/pc-bios/*.{bin,x,dtb} qemu/pc-bios/openbios-*
49find qemu/pc-bios -exec file {} \; | grep '\(data\|BIOS\|executable\)' && \
50    echo "Found some binary blobs in qemu/pc-bios!" && exit 1
51
52%build
53# systems like rhel build system does not have a recent enough linker so
54# --build-id works. this option is used fedora 8 onwards for giving info
55# to the debug packages.
56
57build_id_available() {
58        echo "int main () { return 0; }" | gcc -x c -Wl,--build-id - 2>/dev/null
59}
60
61if build_id_available; then
62        qemuldflags="-Wl,--build-id";
63else
64        qemuldflags="";
65fi
66
67
68# we need to install the data bits in a different path
69sed -i 's/datasuffix=\"\/share\/qemu\"/datasuffix=\"\/share\/kvm\"/' qemu/configure
70./configure \
71   --with-patched-kernel \
72   --kerneldir=$(pwd)/kernel \
73   --prefix=%{_prefix} \
74   --qemu-ldflags=$qemuldflags \
75   --disable-blobs \
76   --audio-drv-list=sdl,alsa,oss
77
78# build the bios, and fix it's makefile
79sed -i 's/gcc -m32/gcc/' bios/Makefile
80make bios
81
82make vgabios
83
84# we can't use RPM_OPT_FLAGS for the same reasons as qemu (#208026) for the
85# qemu bits.  so let's set it for the other pieces.  this requires some
86# manual keeping up of what is in the kvm tree.
87sed -i 's/CFLAGS =/CFLAGS +=/' user/Makefile
88echo "CFLAGS=$RPM_OPT_FLAGS" >> user/config.mak
89make %{?_smp_mflags}
90
91
92%install
93rm -rf $RPM_BUILD_ROOT
94make DESTDIR=$RPM_BUILD_ROOT install
95
96# we have to have our own copies of the bios/keymaps due to incompat with
97# qemu 0.9.  include the man page
98mv $RPM_BUILD_ROOT/%{_mandir}/man1/qemu.1* $RPM_BUILD_ROOT/%{_mandir}/man1/qemu-kvm.1
99rm -rf $RPM_BUILD_ROOT/%{_mandir}/man*/qemu-img* $RPM_BUILD_ROOT/%{_docdir}
100rm -f $RPM_BUILD_ROOT/%{_bindir}/qemu-img
101# no shared lib, static libs
102rm -fr $RPM_BUILD_ROOT/%{_includedir} $RPM_BUILD_ROOT/%{_libdir}
103
104# make install gives it bogus execute permissiions
105chmod -x $RPM_BUILD_ROOT/%{_mandir}/man1/qemu-kvm.1*
106
107install -d $RPM_BUILD_ROOT/%{_datadir}/%{name}
108for i in bios.bin extboot.bin vgabios.bin vgabios-cirrus.bin
109do
110  install -m 0644 qemu/pc-bios/$i $RPM_BUILD_ROOT/%{_datadir}/%{name}/$i
111done
112
113mv $RPM_BUILD_ROOT/%{_bindir}/qemu-system-x86_64 $RPM_BUILD_ROOT/%{_bindir}/qemu-kvm
114
115mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/modules
116install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/modules/kvm.modules
117install -m 0755 user/kvmtrace %{buildroot}/%{_bindir}/
118install -m 0755 user/kvmtrace_format %{buildroot}/%{_bindir}/
119
120# the pxe etherboot images will be symlinks to the images on
121# /usr/share/etherboot, as KVM doesn't know how to look
122# for other paths, yet.
123pxe_link() {
124  ln -s ../etherboot/$2.rom %{buildroot}/usr/share/kvm/pxe-$1.bin
125}
126
127pxe_link e1000 e1000-82542
128pxe_link ne2k_pci ne
129pxe_link pcnet pcnet32
130pxe_link rtl8139 rtl8139
131pxe_link virtio virtio-net
132
133
134%post
135# load kvm modules now, so we can make sure no reboot is needed.
136# If there's already a kvm module installed, we don't mess with it
137sh /%{_sysconfdir}/sysconfig/modules/kvm.modules
138
139
140%clean
141rm -rf $RPM_BUILD_ROOT
142
143
144%files
145%defattr(-,root,root,-)
146%{_bindir}/*
147%{_mandir}/*
148%{_datadir}/%{name}
149%{_sysconfdir}/sysconfig/modules/%{name}.modules
150
151%changelog
152* Mon Jan 19 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 83-1
153- new upstream release
154- build with gnutls-1.6.3
155
156* Mon Jul 07 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 70-1
157- new upstream release
158- import patches from fedora
159
160* Thu Nov 01 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 48-0vl1
161- initial build for Vine Linux
162- update to kvm-48
163
164* Mon Oct 15 2007 Daniel P. Berrange <berrange@redhat.com> - 36-7.fc8
165- Fixed PXE boot when KVM is enabled (rhbz #331191)
166
167* Wed Sep 26 2007 Daniel P. Berrange <berrange@redhat.com> - 36-6.fc8
168- Fixed rtl8139 checksum calculation for Vista (rhbz #308201)
169
170* Mon Sep 24 2007 Jeremy Katz <katzj@redhat.com> - 36-5
171- fix build on x86_64
172
173* Mon Sep 24 2007 Jeremy Katz <katzj@redhat.com> - 36-3
174- add support for selecting boot device at runtime
175
176* Tue Sep  4 2007 Jeremy Katz <katzj@redhat.com> - 36-2
177- rebase vnc auth patch
178
179* Tue Sep  4 2007 Jeremy Katz <katzj@redhat.com> - 36-1
180- update to kvm-36
181
182* Mon Aug 27 2007 Daniel P. Berrange <berrange@redhat.com> - 35-3.fc8
183- Added patch for VNC password auth and TLS+x509 cert auth
184
185* Mon Aug 20 2007 Jeremy Katz <katzj@redhat.com> - 35-2
186- add fix for ATAPI from upstream qemu
187
188* Mon Aug 20 2007 Jeremy Katz <katzj@redhat.com> - 35-1
189- update to kvm-35
190- patch to use -Wl,--build-id so that we get debuginfo
191
192* Thu Jul 19 2007 Jeremy Katz <katzj@redhat.com> - 31-1
193- update to kvm-31
194
195* Mon Jul 16 2007 Jeremy Katz <katzj@redhat.com> - 28-2
196- add patch from danpb to fix mac addrs of multiple 8139 nics (#247641)
197
198* Wed Jun 13 2007 Jeremy Katz <katzj@redhat.com> - 28-1
199- update to kvm-28
200
201* Sat Jun  9 2007 Jeremy Katz <katzj@redhat.com> - 27-1
202- update to kvm-27
203
204* Tue May 29 2007 Jeremy Katz <katzj@redhat.com> - 26-1
205- update to kvm-26
206
207* Wed May 16 2007 Jeremy Katz <katzj@redhat.com> - 24-1
208- update to kvm-24
209
210* Wed Apr 25 2007 Jeremy Katz <katzj@redhat.com> - 19-2
211- fix kernel and ramdisk being specified on the command line (#237879)
212
213* Tue Apr 17 2007 Jeremy Katz <katzj@redhat.com> - 19-1
214- update to kvm-19
215- use rtl8139 as the default nic emulation instead of ne2k_pci (#236790)
216
217* Mon Mar 26 2007 Jeremy Katz <katzj@redhat.com> - 15-2
218- add file so that kvm modules get loaded on boot
219
220* Wed Mar  7 2007 Jeremy Katz <katzj@redhat.com> - 15-1
221- update to kvm-15
222
223* Mon Feb 26 2007 Jeremy Katz <katzj@redhat.com> - 14-2
224- use default optflags for non-qemu pieces (#230012)
225
226* Fri Feb 23 2007 Jeremy Katz <katzj@redhat.com> - 14-1
227- update to kvm-14
228- note: this requires a kernel that's 2.6.21-rc1 or newer
229
230* Mon Feb 19 2007 Jeremy Katz <katzj@redhat.com> - 12-3
231- add the buildrequires for the docs to build
232
233* Mon Feb 19 2007 Jeremy Katz <katzj@redhat.com> - 12-2
234- include bios and keymaps in the kvm package since we need a slightly
235  different version for kvm now
236- include man page
237
238* Fri Jan 26 2007 Jeremy Katz <katzj@redhat.com> - 12-1
239- update to kvm-12
240- add qemu patch for better ATAPI DMA support (which works with ata_piix)
241
242* Fri Jan 19 2007 Jeremy Katz <katzj@redhat.com> - 11-1
243- update to kvm-11
244
245* Fri Jan  5 2007 Jeremy Katz <katzj@redhat.com> - 9-1
246- update to kvm-9
247
248* Wed Jan  3 2007 Jeremy Katz <katzj@redhat.com> - 7-4
249- actually build without -devel...
250
251* Wed Dec 20 2006 Jeremy Katz <katzj@redhat.com> - 7-3
252- remove the -devel subpackage since there's no shared lib upstream yet
253- direct download link for source
254
255* Tue Dec 19 2006 Jeremy Katz <katzj@redhat.com> - 7-2
256- BR e2fsprogs-devel
257
258* Tue Dec 19 2006 Jeremy Katz <katzj@redhat.com> - 7-1
259- Initial build
260
Note: See TracBrowser for help on using the repository browser.