forked from mirrors/nixpkgs
* KVM 86. This one finally seems to have decent CIFS performance
again. svn path=/nixpkgs/trunk/; revision=15825
This commit is contained in:
parent
6645fcb0c5
commit
97ad838137
|
@ -1,38 +0,0 @@
|
|||
{stdenv, fetchurl, kernelHeaders, zlib, e2fsprogs, SDL, alsaLib, pkgconfig, rsync}:
|
||||
|
||||
assert stdenv.isLinux;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "kvm-84";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/kvm/${name}.tar.gz";
|
||||
sha256 = "13lqhy4lpxqby7qj3l1cdbj73c7jmvkq73bc5wchwn0l0dkjsjlk";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Allow setting the path to Samba through $QEMU_SMBD_COMMAND.
|
||||
./smbd-path-r2.patch
|
||||
# The makefile copies stuff from the kernel directory and then
|
||||
# tries to modify the copy, but it must be made writable first.
|
||||
./readonly-kernel-r3.patch
|
||||
];
|
||||
|
||||
configureFlags = "--with-patched-kernel --kerneldir=${kernelHeaders}";
|
||||
|
||||
# e2fsprogs is needed for libuuid.
|
||||
# rsync is a weird dependency used for copying kernel header files.
|
||||
buildInputs = [zlib e2fsprogs SDL alsaLib pkgconfig rsync];
|
||||
|
||||
preConfigure = ''
|
||||
for i in configure user/configure; do
|
||||
substituteInPlace $i --replace /bin/bash $shell
|
||||
done
|
||||
substituteInPlace libkvm/Makefile --replace kvm_para.h kvm.h # !!! quick hack
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://kvm.qumranet.com/;
|
||||
description = "A full virtualization solution for Linux on x86 hardware containing virtualization extensions";
|
||||
};
|
||||
}
|
39
pkgs/os-specific/linux/kvm/86.nix
Normal file
39
pkgs/os-specific/linux/kvm/86.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{stdenv, fetchurl, kernelHeaders, zlib, SDL, alsaLib, pkgconfig, pciutils}:
|
||||
|
||||
assert stdenv.isLinux;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "kvm-86";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/kvm/${name}.tar.gz";
|
||||
sha256 = "17fq2dyd0qla0yiddyiqvb8kz3sfy6dhy9fi9y7xcbhs26s0wxax";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Allow setting the path to Samba through $QEMU_SMBD_COMMAND.
|
||||
./smbd-path-r3.patch
|
||||
];
|
||||
|
||||
configureFlags = "--enable-io-thread";
|
||||
|
||||
# e2fsprogs is needed for libuuid.
|
||||
# rsync is a weird dependency used for copying kernel header files.
|
||||
buildInputs = [zlib SDL alsaLib pkgconfig pciutils];
|
||||
|
||||
preConfigure = ''
|
||||
for i in configure kvm/configure kvm/user/configure; do
|
||||
substituteInPlace $i --replace /bin/bash $shell
|
||||
done
|
||||
|
||||
substituteInPlace kvm/libkvm/Makefile --replace kvm_para.h kvm.h # !!! quick hack
|
||||
|
||||
# This prevents the kernel module from being built.
|
||||
rm kvm/kernel/configure
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://kvm.qumranet.com/;
|
||||
description = "A full virtualization solution for Linux on x86 hardware containing virtualization extensions";
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
diff -rc kvm-69-orig/kernel/Makefile kvm-69/kernel/Makefile
|
||||
*** kvm-69-orig/kernel/Makefile 2008-05-12 13:30:43.000000000 +0200
|
||||
--- kvm-69/kernel/Makefile 2008-06-04 17:23:34.000000000 +0200
|
||||
***************
|
||||
*** 48,53 ****
|
||||
--- 48,54 ----
|
||||
"$(LINUX)"/./include/linux/kvm*.h \
|
||||
"$(LINUX)"/./include/asm-*/kvm*.h \
|
||||
$T/
|
||||
+ chmod -R u+w $T
|
||||
|
||||
set -e && for i in $(find $T -name '*.h'); do \
|
||||
$(call unifdef,$$i); done
|
||||
Only in kvm-69/kernel: Makefile~
|
|
@ -1,25 +1,25 @@
|
|||
diff -rc kvm-82-orig/qemu/net.c kvm-82/qemu/net.c
|
||||
*** kvm-82-orig/qemu/net.c 2008-12-24 15:24:58.000000000 +0100
|
||||
--- kvm-82/qemu/net.c 2009-01-13 12:59:15.000000000 +0100
|
||||
diff -rc kvm-86/net.c kvm-86-new/net.c
|
||||
*** kvm-86/net.c 2009-05-19 18:29:02.000000000 +0200
|
||||
--- kvm-86-new/net.c 2009-06-02 17:41:15.000000000 +0200
|
||||
***************
|
||||
*** 560,570 ****
|
||||
slirp_init();
|
||||
*** 684,694 ****
|
||||
slirp_init(slirp_restrict, slirp_ip);
|
||||
}
|
||||
|
||||
! /* XXX: better tmp dir construction */
|
||||
! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d", getpid());
|
||||
! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%ld", (long)getpid());
|
||||
! if (mkdir(smb_dir, 0700) < 0) {
|
||||
! fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir);
|
||||
! exit(1);
|
||||
}
|
||||
snprintf(smb_conf, sizeof(smb_conf), "%s/%s", smb_dir, "smb.conf");
|
||||
|
||||
--- 560,572 ----
|
||||
slirp_init();
|
||||
--- 684,696 ----
|
||||
slirp_init(slirp_restrict, slirp_ip);
|
||||
}
|
||||
|
||||
! while (1) {
|
||||
! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d.%d", getpid(), random());
|
||||
! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%ld.%d", (long) getpid(), random());
|
||||
! if (mkdir(smb_dir, 0700) == 0) break;
|
||||
! if (errno != EEXIST) {
|
||||
! fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir);
|
||||
|
@ -28,11 +28,11 @@ diff -rc kvm-82-orig/qemu/net.c kvm-82/qemu/net.c
|
|||
}
|
||||
snprintf(smb_conf, sizeof(smb_conf), "%s/%s", smb_dir, "smb.conf");
|
||||
|
||||
diff -rc kvm-82-orig/qemu/net.h kvm-82/qemu/net.h
|
||||
*** kvm-82-orig/qemu/net.h 2008-12-24 15:24:58.000000000 +0100
|
||||
--- kvm-82/qemu/net.h 2009-01-13 12:58:28.000000000 +0100
|
||||
diff -rc kvm-86/net.h kvm-86-new/net.h
|
||||
*** kvm-86/net.h 2009-05-19 18:29:02.000000000 +0200
|
||||
--- kvm-86-new/net.h 2009-06-02 17:39:17.000000000 +0200
|
||||
***************
|
||||
*** 99,105 ****
|
||||
*** 129,135 ****
|
||||
#ifdef __sun__
|
||||
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
|
||||
#else
|
||||
|
@ -40,7 +40,7 @@ diff -rc kvm-82-orig/qemu/net.h kvm-82/qemu/net.h
|
|||
#endif
|
||||
|
||||
#endif
|
||||
--- 99,105 ----
|
||||
--- 129,135 ----
|
||||
#ifdef __sun__
|
||||
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
|
||||
#else
|
|
@ -5192,8 +5192,8 @@ let
|
|||
inherit (glibc) kernelHeaders;
|
||||
};
|
||||
|
||||
kvm84 = import ../os-specific/linux/kvm/84.nix {
|
||||
inherit fetchurl stdenv zlib e2fsprogs SDL alsaLib pkgconfig rsync;
|
||||
kvm86 = import ../os-specific/linux/kvm/86.nix {
|
||||
inherit fetchurl stdenv zlib SDL alsaLib pkgconfig pciutils;
|
||||
inherit (glibc) kernelHeaders;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue