diff options
author | Wulf Krueger <philantrop@gentoo.org> | 2007-08-22 22:20:11 +0000 |
---|---|---|
committer | Wulf Krueger <philantrop@gentoo.org> | 2007-08-22 22:20:11 +0000 |
commit | dbc04aecf76f954f564ff69a8c41c047204a1cdb (patch) | |
tree | 9318831c8eda08502b2b558de4175a71bc9a30e5 | |
parent | Check for WIRELESS_EXT kernel configuration option instead of NET_RADIO. (diff) | |
download | philantrop-dbc04aecf76f954f564ff69a8c41c047204a1cdb.tar.gz philantrop-dbc04aecf76f954f564ff69a8c41c047204a1cdb.tar.bz2 philantrop-dbc04aecf76f954f564ff69a8c41c047204a1cdb.zip |
Version bump to kvm-36. Pulled in some changes from bug 157987.
Some cleaning.
svn path=/trunk/; revision=31
-rw-r--r-- | app-emulation/kvm/ChangeLog | 6 | ||||
-rw-r--r-- | app-emulation/kvm/Manifest | 62 | ||||
-rw-r--r-- | app-emulation/kvm/files/digest-kvm-36-r1 | 3 | ||||
-rw-r--r-- | app-emulation/kvm/files/kvm-kvm.patch | 114 | ||||
-rw-r--r-- | app-emulation/kvm/files/qemu-configure.patch | 11 | ||||
-rw-r--r-- | app-emulation/kvm/files/qemu-vl.c.patch | 11 | ||||
-rw-r--r-- | app-emulation/kvm/files/scripts-qemu-ifup.patch | 26 | ||||
-rw-r--r-- | app-emulation/kvm/kvm-33.ebuild | 8 | ||||
-rw-r--r-- | app-emulation/kvm/kvm-35.ebuild | 8 | ||||
-rw-r--r-- | app-emulation/kvm/kvm-36-r1.ebuild | 122 | ||||
-rw-r--r-- | app-emulation/kvm/metadata.xml | 9 |
11 files changed, 360 insertions, 20 deletions
diff --git a/app-emulation/kvm/ChangeLog b/app-emulation/kvm/ChangeLog index ab9a752..1573393 100644 --- a/app-emulation/kvm/ChangeLog +++ b/app-emulation/kvm/ChangeLog @@ -2,6 +2,12 @@ # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 22 Aug 2007; Wulf C. Krueger <philantrop@gentoo.org> +files/kvm-kvm.patch, + +files/qemu-configure.patch, +files/qemu-vl.c.patch, + +files/scripts-qemu-ifup.patch, +metadata.xml, kvm-33.ebuild, + kvm-35.ebuild, +kvm-36-r1.ebuild: + Version bump to kvm-36. Pulled in some changes from bug 157987. Some cleaning. + 13 Aug 2007; Wulf C. Krueger <philantrop@gentoo.org> -kvm-27.ebuild, -kvm-28.ebuild, -kvm-29.ebuild, -kvm-31.ebuild, +kvm-34.ebuild: Version bump to 34. diff --git a/app-emulation/kvm/Manifest b/app-emulation/kvm/Manifest index a531e16..87ba40a 100644 --- a/app-emulation/kvm/Manifest +++ b/app-emulation/kvm/Manifest @@ -1,3 +1,10 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX kvm-kvm.patch 3506 RMD160 80e46ff357060c90f6d19f14d4f216c40ee0b26a SHA1 0bb8473725698bfb5997f962fd501493cde0e9c7 SHA256 bb1c3a2a16ef511b92f596d21ba005d88aee347a2a50a5da20d91229398ce2ef +MD5 09611c7bc9c955a13e2d65b241cfd405 files/kvm-kvm.patch 3506 +RMD160 80e46ff357060c90f6d19f14d4f216c40ee0b26a files/kvm-kvm.patch 3506 +SHA256 bb1c3a2a16ef511b92f596d21ba005d88aee347a2a50a5da20d91229398ce2ef files/kvm-kvm.patch 3506 AUX kvm_add-scripts-qemu-ifup.patch 359 RMD160 d66e31dedd21c5fb752721ae2bc86caaf0e1301d SHA1 3e5eede431640625a2cfc03c4f1a39b0bd3f33fe SHA256 7f47028bc50cc669bebe1ca70e667a296715601601be71049a2f7c1d211bb320 MD5 11750a6894c39ab6350cb62c034b6796 files/kvm_add-scripts-qemu-ifup.patch 359 RMD160 d66e31dedd21c5fb752721ae2bc86caaf0e1301d files/kvm_add-scripts-qemu-ifup.patch 359 @@ -10,23 +17,54 @@ AUX kvm_use_etc_kvm_kvm-ifup.patch 437 RMD160 d1127dd655b94fc518c9bb9abc7e8a72b7 MD5 3c362ab33d2691d93b538cf965090dfe files/kvm_use_etc_kvm_kvm-ifup.patch 437 RMD160 d1127dd655b94fc518c9bb9abc7e8a72b75e0330 files/kvm_use_etc_kvm_kvm-ifup.patch 437 SHA256 3c49a8a11f5941f148f09ad3bedda6fa2513e83d746f39060be09b05beec48ce files/kvm_use_etc_kvm_kvm-ifup.patch 437 +AUX qemu-configure.patch 310 RMD160 abd1b6930bc9ab0edcb5dcc1f753f1c8abb10419 SHA1 c4c5e339c602075c10f658587d5359385da65940 SHA256 df3d5086b934ee7a5ffed0832283a1a9c1120230fe397aedf1454fe1aa6c54a3 +MD5 2bd148274e1aab150c80098488b5c01e files/qemu-configure.patch 310 +RMD160 abd1b6930bc9ab0edcb5dcc1f753f1c8abb10419 files/qemu-configure.patch 310 +SHA256 df3d5086b934ee7a5ffed0832283a1a9c1120230fe397aedf1454fe1aa6c54a3 files/qemu-configure.patch 310 +AUX qemu-vl.c.patch 324 RMD160 f13c7e22a0d13dc1364cd1e587ab664457a687ac SHA1 80ad27e47f3daa85813e0707b966de794126ed98 SHA256 d511b15344e066e21cd783a0fb04704506172d46bb795b7dbafde954aedcaa37 +MD5 9d5d51e2d41c6e94e07177ee5787d224 files/qemu-vl.c.patch 324 +RMD160 f13c7e22a0d13dc1364cd1e587ab664457a687ac files/qemu-vl.c.patch 324 +SHA256 d511b15344e066e21cd783a0fb04704506172d46bb795b7dbafde954aedcaa37 files/qemu-vl.c.patch 324 +AUX scripts-qemu-ifup.patch 847 RMD160 631b0804395115eb12aa411017982ca41233a181 SHA1 c673d50f8cab0c5d16789a9e021b2df71e0f4b97 SHA256 09e519488c0aa9b2ea6001d46c51ca3058e35409299bc13e79c9cb7cdac6e532 +MD5 734e3f36bed683479dd8de7d5a0c251d files/scripts-qemu-ifup.patch 847 +RMD160 631b0804395115eb12aa411017982ca41233a181 files/scripts-qemu-ifup.patch 847 +SHA256 09e519488c0aa9b2ea6001d46c51ca3058e35409299bc13e79c9cb7cdac6e532 files/scripts-qemu-ifup.patch 847 DIST kvm-33.tar.gz 2250014 RMD160 724a87ac61f7b5a1ac8d9f43c700fa55d0fc5d8f SHA1 699e6bcdf52840f7779f4836b3a42549b5a123ec SHA256 b9ed69b2416ec1d7dd0d4d66092eb3f259329771ca3da75e3e0dc101ca83c24c DIST kvm-35.tar.gz 2285167 RMD160 9770d3654e339c7ae5fd67c51d9edd8fc44e94e1 SHA1 5e20b856915091c2eb9da2adf47ef95cf6346e8b SHA256 08cc019b019289b08fca445d19b5a79b2372fe1e728acd718a15c5b37c7c0ba3 -EBUILD kvm-33.ebuild 2171 RMD160 0dc06e97ae84d865a96a0b99c109aba24775d0fc SHA1 ab20fea2653aa4e06a089f32363fe9ca639eda41 SHA256 86c790582915c211de577c9b82b87129ad7cdafd49ba3307a372007f3d6e9c83 -MD5 00f0ddcbdd70ff884ff80872d0748475 kvm-33.ebuild 2171 -RMD160 0dc06e97ae84d865a96a0b99c109aba24775d0fc kvm-33.ebuild 2171 -SHA256 86c790582915c211de577c9b82b87129ad7cdafd49ba3307a372007f3d6e9c83 kvm-33.ebuild 2171 -EBUILD kvm-35.ebuild 2171 RMD160 0dc06e97ae84d865a96a0b99c109aba24775d0fc SHA1 ab20fea2653aa4e06a089f32363fe9ca639eda41 SHA256 86c790582915c211de577c9b82b87129ad7cdafd49ba3307a372007f3d6e9c83 -MD5 00f0ddcbdd70ff884ff80872d0748475 kvm-35.ebuild 2171 -RMD160 0dc06e97ae84d865a96a0b99c109aba24775d0fc kvm-35.ebuild 2171 -SHA256 86c790582915c211de577c9b82b87129ad7cdafd49ba3307a372007f3d6e9c83 kvm-35.ebuild 2171 -MISC ChangeLog 366 RMD160 3c6143dc4db0beadf11ed724e71f123d5adc96a5 SHA1 e8d6ef3e480b90bdf941de2aee2bbaac71216e6c SHA256 c8b5177c17accd13c24d405ccbf62b932e7c707563f71d5639791e862d71ed16 -MD5 2322766bd45ab287ea8cb8a73180c304 ChangeLog 366 -RMD160 3c6143dc4db0beadf11ed724e71f123d5adc96a5 ChangeLog 366 -SHA256 c8b5177c17accd13c24d405ccbf62b932e7c707563f71d5639791e862d71ed16 ChangeLog 366 +DIST kvm-36.tar.gz 2562588 RMD160 b6cd150ffa0aae075bcd80571ec359c7ee8c685c SHA1 173cc293835bec231271542e4abd80252b5c014a SHA256 5e8125ff0c77908eb566f1a1c535646a53ff4865305da2d0348d7af9b91d7680 +EBUILD kvm-33.ebuild 2123 RMD160 f325225eabe825df2a66a2ec71eada62cd23c578 SHA1 0a7479974fbb1a78d2555282bb2cd0a4dd6365eb SHA256 6dfeb6b87f64159722f5f8dbe145f157f399758e5aafe9f10bdd1ad35ebfd11d +MD5 6a3e06972a864b566ce7beeb5a8826a5 kvm-33.ebuild 2123 +RMD160 f325225eabe825df2a66a2ec71eada62cd23c578 kvm-33.ebuild 2123 +SHA256 6dfeb6b87f64159722f5f8dbe145f157f399758e5aafe9f10bdd1ad35ebfd11d kvm-33.ebuild 2123 +EBUILD kvm-35.ebuild 2123 RMD160 f325225eabe825df2a66a2ec71eada62cd23c578 SHA1 0a7479974fbb1a78d2555282bb2cd0a4dd6365eb SHA256 6dfeb6b87f64159722f5f8dbe145f157f399758e5aafe9f10bdd1ad35ebfd11d +MD5 6a3e06972a864b566ce7beeb5a8826a5 kvm-35.ebuild 2123 +RMD160 f325225eabe825df2a66a2ec71eada62cd23c578 kvm-35.ebuild 2123 +SHA256 6dfeb6b87f64159722f5f8dbe145f157f399758e5aafe9f10bdd1ad35ebfd11d kvm-35.ebuild 2123 +EBUILD kvm-36-r1.ebuild 3737 RMD160 6a379f0428878be6333a6bbae55548306d9cc1df SHA1 0868be4ed35102dce527d90279c4f5392066cb88 SHA256 9bd98d353c8aa6b7e93a84f7d14a42fb5885ce148d673115f338f59f59205cc7 +MD5 6398f55119a67f01cde3e55ea64d4887 kvm-36-r1.ebuild 3737 +RMD160 6a379f0428878be6333a6bbae55548306d9cc1df kvm-36-r1.ebuild 3737 +SHA256 9bd98d353c8aa6b7e93a84f7d14a42fb5885ce148d673115f338f59f59205cc7 kvm-36-r1.ebuild 3737 +MISC ChangeLog 680 RMD160 5010390a1444697b809d1528fbb52a135e570dd0 SHA1 7d25cb8ce231eda27985417416d1a94f612c4746 SHA256 74472f62cecbe89ec2656a666bf1224d64b85e144772ab918e104f542421ef46 +MD5 23188e2cda026a5bfc65e8beba1cc38f ChangeLog 680 +RMD160 5010390a1444697b809d1528fbb52a135e570dd0 ChangeLog 680 +SHA256 74472f62cecbe89ec2656a666bf1224d64b85e144772ab918e104f542421ef46 ChangeLog 680 +MISC metadata.xml 413 RMD160 dd5972a65a0cc44b4a9bd61cbcfe197270bb355f SHA1 c14660bd6d54594bef13c86f243308fc92687eb0 SHA256 32796ad3337db69538c94738b611438b27e6f199d19df26f0e20a471e313c988 +MD5 5c1d1436d6cc39b3b6bf03f9d4b611ec metadata.xml 413 +RMD160 dd5972a65a0cc44b4a9bd61cbcfe197270bb355f metadata.xml 413 +SHA256 32796ad3337db69538c94738b611438b27e6f199d19df26f0e20a471e313c988 metadata.xml 413 MD5 369c549663a4318cfe06f2ed0ec0ef5c files/digest-kvm-33 223 RMD160 5d8a738bdecf4d72f84b28d0b24e795a6102fc13 files/digest-kvm-33 223 SHA256 3b137942fafc98f059158041b40db37a2cca4c736363e8fd7ef18841299ebfa1 files/digest-kvm-33 223 MD5 a054cc7eecc3344a807db791b7c4a61f files/digest-kvm-35 223 RMD160 dcdf440cca2f064f2257326925880d2302241ac0 files/digest-kvm-35 223 SHA256 a7a7565ddec84a9ebe3f989ea56ef81159b0a414c68fc5c9aaf24148c7b42457 files/digest-kvm-35 223 +MD5 2771a4b4b83a0701984a6690fc5e0b10 files/digest-kvm-36-r1 223 +RMD160 328cdebc94ca3e7aa898b3d0b261e75d96da6be2 files/digest-kvm-36-r1 223 +SHA256 fe5c3e109884a1d9c4327e864486c03e075c2bdb00562606d8e8f4c922718147 files/digest-kvm-36-r1 223 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.6 (GNU/Linux) + +iD8DBQFGzLYSCkvF58q80IkRAucqAJwPAT/fww10vBWlbXMBnknViZfXRgCfV21Q +TvbXFuGaEr7c0CWh5ob9J+8= +=kO68 +-----END PGP SIGNATURE----- diff --git a/app-emulation/kvm/files/digest-kvm-36-r1 b/app-emulation/kvm/files/digest-kvm-36-r1 new file mode 100644 index 0000000..d928a79 --- /dev/null +++ b/app-emulation/kvm/files/digest-kvm-36-r1 @@ -0,0 +1,3 @@ +MD5 0fdbc4a6228f3876166fc0d6f01bb668 kvm-36.tar.gz 2562588 +RMD160 b6cd150ffa0aae075bcd80571ec359c7ee8c685c kvm-36.tar.gz 2562588 +SHA256 5e8125ff0c77908eb566f1a1c535646a53ff4865305da2d0348d7af9b91d7680 kvm-36.tar.gz 2562588 diff --git a/app-emulation/kvm/files/kvm-kvm.patch b/app-emulation/kvm/files/kvm-kvm.patch new file mode 100644 index 0000000..1fd8420 --- /dev/null +++ b/app-emulation/kvm/files/kvm-kvm.patch @@ -0,0 +1,114 @@ +--- kvm.orig 2007-07-25 09:22:14.042411511 -0500 ++++ kvm 2007-07-25 09:24:54.087531962 -0500 +@@ -17,18 +17,10 @@ + config = ShellConfigParser() + config.read('config.mak') + +-external_module = config.get('shell', 'want_module') + privileged = os.getuid() == 0 + + optparser = optparse.OptionParser() + +-optparser.add_option('--no-reload-module', +- help = 'do not reload kvm module', +- action = 'store_false', +- dest = 'reload', +- default = privileged, +- ) +- + optparser.add_option('--install', + help = 'start up guest in installer boot cd', + action = 'store_true', +@@ -67,12 +59,6 @@ + default = None, + ) + +-optparser.add_option('--no-kvm', +- help = 'use standard qemu, without kvm', +- action = 'store_false', +- dest = 'kvm', +- default = True, +- ) + optparser.add_option('--image', + help = 'select disk image', + dest = 'image', +@@ -124,52 +110,14 @@ + if len(args) > 1: + options.cdrom = args[1] + +-def remove_module(module): +- module = module.replace('-', '_') +- lines = commands.getoutput('/sbin/lsmod').split('\n') +- for x in lines: +- if x.startswith(module + ' '): +- if os.spawnl(os.P_WAIT, '/sbin/rmmod', 'rmmod', module) != 0: +- raise Exception('failed to remove %s module' % (module,)) +- +-def insert_module(module): +- if os.spawnl(os.P_WAIT, '/sbin/insmod', 'insmod', +- 'kernel/%s.ko' % (module,)) != 0: +- raise Exception('failed to load kvm module') +- +-def probe_module(module): +- if os.spawnl(os.P_WAIT, '/sbin/modprobe', 'modprobe', module) != 0: +- raise Exception('failed to load kvm module') +- +-def vendor(): +- for x in file('/proc/cpuinfo').readlines(): +- m = re.match(r'vendor_id[ \t]*: *([a-zA-Z]+),*', x) +- if m: +- return m.group(1) +- return unknown +- +-vendor_module = { +- 'GenuineIntel': 'kvm-intel', +- 'AuthenticAMD': 'kvm-amd', +- }[vendor()] +- +-if options.kvm and options.reload: +- for module in [vendor_module, 'kvm']: +- remove_module(module) +- if external_module: +- insmod = insert_module +- else: +- insmod = probe_module +- for module in ['kvm', vendor_module]: +- insmod(module) +- commands.getstatusoutput('/sbin/udevsettle') +- if not os.access('/dev/kvm', os.F_OK): +- print '/dev/kvm not present' ++commands.getstatusoutput('/sbin/udevsettle') ++if not os.access('/dev/kvm', os.F_OK): ++ print '/dev/kvm not present' + + disk = options.image + if options.install: + (status, output) = commands.getstatusoutput( +- 'qemu/qemu-img create -f qcow2 "%s" 10G' % disk) ++ 'qemu-img create -f qcow2 "%s" 10G' % disk) + if status: + raise Exception, output + +@@ -184,12 +132,6 @@ + else: + cmd = 'qemu' + +-local_cmd = 'qemu/' + arch + '-softmmu/' + cmd +-if os.access(local_cmd, os.F_OK): +- cmd = local_cmd +-else: +- cmd = '/usr/bin/kvm' +- + qemu_args = (cmd, '-boot', bootdisk, + '-hda', disk, '-m', str(options.memory), + '-serial', 'file:/tmp/serial.log', +@@ -200,9 +142,6 @@ + if options.cdrom: + qemu_args += ('-cdrom', options.cdrom,) + +-if not options.kvm: +- qemu_args += ('-no-kvm',) +- + if options.debugger: + qemu_args += ('-s',) + diff --git a/app-emulation/kvm/files/qemu-configure.patch b/app-emulation/kvm/files/qemu-configure.patch new file mode 100644 index 0000000..d4d80c9 --- /dev/null +++ b/app-emulation/kvm/files/qemu-configure.patch @@ -0,0 +1,11 @@ +--- qemu/configure.orig 2007-07-25 09:08:58.429072090 -0500 ++++ qemu/configure 2007-07-25 09:09:31.710968717 -0500 +@@ -584,7 +584,7 @@ + prefix="/usr/local" + fi + mandir="$prefix/share/man" +-datadir="$prefix/share/qemu" ++datadir="$prefix/share/kvm" + docdir="$prefix/share/doc/qemu" + bindir="$prefix/bin" + fi diff --git a/app-emulation/kvm/files/qemu-vl.c.patch b/app-emulation/kvm/files/qemu-vl.c.patch new file mode 100644 index 0000000..0fc7ec2 --- /dev/null +++ b/app-emulation/kvm/files/qemu-vl.c.patch @@ -0,0 +1,11 @@ +--- qemu/vl.c.orig 2007-04-22 07:40:44.000000000 +0200 ++++ qemu/vl.c 2007-04-22 07:43:27.000000000 +0200 +@@ -92,7 +92,7 @@ + #include "qemu-kvm.h" + #endif + +-#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup" ++#define DEFAULT_NETWORK_SCRIPT "/etc/kvm/qemu-ifup" + #ifdef __sun__ + #define SMBD_COMMAND "/usr/sfw/sbin/smbd" + #else diff --git a/app-emulation/kvm/files/scripts-qemu-ifup.patch b/app-emulation/kvm/files/scripts-qemu-ifup.patch new file mode 100644 index 0000000..cd9a16f --- /dev/null +++ b/app-emulation/kvm/files/scripts-qemu-ifup.patch @@ -0,0 +1,26 @@ +--- scripts/qemu-ifup.orig 2007-04-28 12:43:42.514362441 -0500 ++++ scripts/qemu-ifup 2007-04-28 14:30:36.507875100 -0500 +@@ -1,5 +1,19 @@ + #!/bin/sh +- +-switch=$(/sbin/ip route list | awk '/^default / { print $NF }') +-/sbin/ifconfig $1 0.0.0.0 up +-/usr/sbin/brctl addif ${switch} $1 ++cmd="" ++if [ "$EUID" != 0 ]; then ++ if [ -x "/usr/bin/sudo" ]; then ++ cmd="/usr/bin/sudo " ++ else ++ echo "You must have sudo or root privileges to bring up a network interface" ++ exit 0 ++ fi ++fi ++echo "Bringing up interface $1" ++switch=$(/sbin/ip route list | awk '/^default / { print $5 }') ++if [[ $(/sbin/ifconfig | grep -c $1) -gt 0 ]]; then ++ ${cmd}/sbin/brctl delif ${switch} $1 ++ ${cmd}/sbin/ifconfig $1 down ++fi ++${cmd}/usr/bin/tunctl -u $(/usr/bin/whoami) -t $1 ++${cmd}/sbin/ifconfig $1 0.0.0.0 promisc up ++${cmd}/sbin/brctl addif ${switch} $1 diff --git a/app-emulation/kvm/kvm-33.ebuild b/app-emulation/kvm/kvm-33.ebuild index 641eac9..93deaa8 100644 --- a/app-emulation/kvm/kvm-33.ebuild +++ b/app-emulation/kvm/kvm-33.ebuild @@ -6,7 +6,7 @@ inherit linux-mod eutils SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" -DESCRIPTION="KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V)" +DESCRIPTION="KVM is a full virtualisation solution for Linux on hardware containing virtualization extensions (Intel VT or AMD-V)" HOMEPAGE="http://kvm.qumranet.com/kvmwiki" LICENSE="GPL-2" @@ -17,8 +17,8 @@ IUSE="" RESTRICT="mirror" MODULE_NAMES="kernel/kvm(extra:) - kernel/kvm-intel(extra:) - kernel/kvm-amd(extra:)" + kernel/kvm-intel(extra:) + kernel/kvm-amd(extra:)" BUILD_TARGETS="kernel" src_unpack() { @@ -69,7 +69,7 @@ src_install() { if use amd64; then mv ${D}/usr/bin/qemu-system-x86_64 ${D}/usr/bin/kvm-system-x86_64 else - mv ${D}/usr/bin/qemu ${D}/usr/bin/kvm + mv ${D}/usr/bin/qemu ${D}/usr/bin/kvm fi mv ${D}/usr/share/doc/qemu ${D}/usr/share/doc/kvm diff --git a/app-emulation/kvm/kvm-35.ebuild b/app-emulation/kvm/kvm-35.ebuild index 641eac9..93deaa8 100644 --- a/app-emulation/kvm/kvm-35.ebuild +++ b/app-emulation/kvm/kvm-35.ebuild @@ -6,7 +6,7 @@ inherit linux-mod eutils SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" -DESCRIPTION="KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V)" +DESCRIPTION="KVM is a full virtualisation solution for Linux on hardware containing virtualization extensions (Intel VT or AMD-V)" HOMEPAGE="http://kvm.qumranet.com/kvmwiki" LICENSE="GPL-2" @@ -17,8 +17,8 @@ IUSE="" RESTRICT="mirror" MODULE_NAMES="kernel/kvm(extra:) - kernel/kvm-intel(extra:) - kernel/kvm-amd(extra:)" + kernel/kvm-intel(extra:) + kernel/kvm-amd(extra:)" BUILD_TARGETS="kernel" src_unpack() { @@ -69,7 +69,7 @@ src_install() { if use amd64; then mv ${D}/usr/bin/qemu-system-x86_64 ${D}/usr/bin/kvm-system-x86_64 else - mv ${D}/usr/bin/qemu ${D}/usr/bin/kvm + mv ${D}/usr/bin/qemu ${D}/usr/bin/kvm fi mv ${D}/usr/share/doc/qemu ${D}/usr/share/doc/kvm diff --git a/app-emulation/kvm/kvm-36-r1.ebuild b/app-emulation/kvm/kvm-36-r1.ebuild new file mode 100644 index 0000000..c905751 --- /dev/null +++ b/app-emulation/kvm/kvm-36-r1.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit linux-mod eutils + +DESCRIPTION="KVM is a full virtualisation solution for Linux on hardware containing virtualization extensions (Intel VT or AMD-V)" +HOMEPAGE="http://kvm.qumranet.com/kvmwiki" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" +DEPEND=">=media-libs/libsdl-1.2.11 + >=media-libs/alsa-lib-1.0.13 + app-text/texi2html + !app-emulation/qemu + dev-lang/python + >=sys-fs/e2fsprogs-1.39" +RDEPEND="${DEPEND} + sys-apps/usermode-utilities" + +RESTRICT="strip" + +BUILD_TARGETS="all" +MODULE_NAMES="kvm(extra:"${S}"/kernel:"${S}"/kernel) + kvm-intel(extra:"${S}"/kernel:"${S}"/kernel) + kvm-amd(extra:"${S}"/kernel:"${S}"/kernel)" + +QA_TEXTRELS="usr/bin/qemu + usr/bin/qemu-system-sparc + usr/bin/qemu-system-arm + usr/bin/qemu-system-ppc + usr/bin/qemu-system-mips + usr/bin/qemu-system-x86_64" +QA_EXECSTACK="usr/share/kvm/openbios-sparc32" +QA_WX_LOAD="usr/share/kvm/openbios-sparc32" + +src_unpack() { + # Don't continue if the KVM modules that come with the kernel are compiled + if linux_chkconfig_present KVM ; then + eerror "${P} doesn't work with the kernel modules" + die "${PN} module is included in the kernel" + fi + unpack ${A} + cd "${S}" + + # Change script to change some options. + epatch ${FILESDIR}/kvm-kvm.patch + # Improve the ifup script to allow for non-root use, etc. + epatch ${FILESDIR}/scripts-qemu-ifup.patch + # Change the path to the network stuff to /etc/kvm + epatch ${FILESDIR}/qemu-vl.c.patch + # Change the DATADIR to kvm instead of qemu + epatch ${FILESDIR}/qemu-configure.patch +} + +src_compile() { + # fix make install to not install modules + sed -i -e '/$(kcmd)/d' ${WORKDIR}/${P}/Makefile + + # The included qemu is not intended to run without kvm. Thus, we can use + # gcc4 as well and disable the gcc-check for gcc3. + conf_opts="--prefix=/usr --disable-gcc-check --qemu-cc=gcc" + + linux-mod_pkg_setup + + # Non-standard configure script. So econf doesn't work here. + ./configure ${conf_opts} || die "Configure failed" + + linux-mod_src_compile + + emake user qemu || die "make failed" +} + +src_install() { + # fix make install to not install modules + sed -i -e '/$(kcmd)/d' ${WORKDIR}/${P}/Makefile + + emake DESTDIR="${D}" install || die "make install failed" + linux-mod_src_install + + exeinto /usr/bin/ + doexe ${S}/kvm ${S}/kvm_stat + + mv ${D}/usr/share/doc/qemu ${D}/usr/share/doc/kvm + mv ${D}/usr/share/man/man1/qemu.1 ${D}/usr/share/man/man1/kvm.1 + + insinto /etc/udev/rules.d/ + doins ${WORKDIR}/${P}/scripts/65-kvm.rules + + insinto /etc/kvm/ + insopts -m0755 + doins ${WORKDIR}/${P}/scripts/qemu-ifup +} + +pkg_postinst() { + linux-mod_pkg_postinst + enewgroup kvm + + elog "Make sure you have the kernel module loaded before running kvm." + elog "The easiest way to ensure that the kernel module is loaded is to load it" + elog "on boot." + elog "For AMD CPUs:" + elog "echo kvm-amd >> /etc/modules.autoload.d/kernel-2.6" + elog "For Intel CPUs:" + elog "echo kvm-intel >> /etc/modules.autoload.d/kernel-2.6" + echo + elog "Make sure your user is in the 'kvm' group" + elog "Just run 'gpasswd -a <USER> kvm', then have <USER> re-login." + echo + elog "If qemu complains about not having a 1024 Hz timer, then run this:" + elog "echo dev.rtc.max-user-freq=1024 >> /etc/sysctl.conf" + echo + elog "If you want network support in the guest OS, you'll need to make" + elog "sure you compile in support for 802.1d Ethernet Bridging in the " + elog "kernel, set up a bridge network interface and make sure you" + elog "compile Universal TUN/TAP device driver support as a kernel module" + elog "and make it load on boot:" + elog "echo tun >> /etc/modules.autoload.d/kernel-2.6" +} diff --git a/app-emulation/kvm/metadata.xml b/app-emulation/kvm/metadata.xml new file mode 100644 index 0000000..77f5b83 --- /dev/null +++ b/app-emulation/kvm/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>no-herd</herd> +<maintainer> + <email>philantrop@gentoo.org</email> +</maintainer> +<longdescription>KVM (Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V).</longdescription> +</pkgmetadata> |